113 lines
2.7 KiB
TypeScript
113 lines
2.7 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import request from "../request";
|
|
|
|
/** 创建权限 POST /operation/createPermission */
|
|
export async function createPermission(
|
|
body: BusinessAPI.PermissionCreateCmd,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<BusinessAPI.SingleResponsePermissionVO>(
|
|
"/operation/createPermission",
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|
|
|
|
/** 删除权限 POST /operation/destroyPermission */
|
|
export async function destroyPermission(
|
|
body: BusinessAPI.PermissionDestroyCmd,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<BusinessAPI.Response>("/operation/destroyPermission", {
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 权限列表 GET /operation/listPermission */
|
|
export async function listPermission(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: BusinessAPI.listPermissionParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<BusinessAPI.MultiResponsePermissionVO>(
|
|
"/operation/listPermission",
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|
|
|
|
/** 权限分页 GET /operation/pagePermission */
|
|
export async function pagePermission(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: BusinessAPI.pagePermissionParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<BusinessAPI.PageResponsePermissionVO>(
|
|
"/operation/pagePermission",
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
permissionPageQry: undefined,
|
|
...params["permissionPageQry"],
|
|
},
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|
|
|
|
/** 查看权限 GET /operation/showPermission */
|
|
export async function showPermission(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: BusinessAPI.showPermissionParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<BusinessAPI.SingleResponsePermissionVO>(
|
|
"/operation/showPermission",
|
|
{
|
|
method: "GET",
|
|
params: {
|
|
...params,
|
|
permissionShowQry: undefined,
|
|
...params["permissionShowQry"],
|
|
},
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|
|
|
|
/** 更新权限 POST /operation/updatePermission */
|
|
export async function updatePermission(
|
|
body: BusinessAPI.PermissionUpdateCmd,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<BusinessAPI.SingleResponsePermissionVO>(
|
|
"/operation/updatePermission",
|
|
{
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|