// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 获取权限列表 POST /casbin/getPolicyPathByRoleId */
export async function postCasbinGetPolicyPathByRoleId(
  body: API.CasbinInReceive,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PolicyPathResponse; msg?: string }>(
    `/api/v1/casbin/getPolicyPathByRoleId`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 更新角色api权限 POST /casbin/UpdateCasbin */
export async function postCasbinUpdateCasbin(
  body: API.CasbinInReceive,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/casbin/UpdateCasbin`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
