UNPKG

nsn-service-type

Version:

NSN服务类型定义组件

28 lines (19 loc) 790 B
import { RoleDept, RoleResource } from 'nsn-entity'; export type RoleAuthResParams = Pick<RoleResource, 'roleId' | 'resourcesIdList'> export type RoleAuthReportParams = Pick<RoleResource, 'roleId' | 'reportIdList'> export type RoleAuthDataParams = Pick<RoleDept, 'roleId' | "deptIdList"> export interface RoleTreeMarkParams { /** 用户ID */ user_id: string; } /** 系统-角色 服务 */ export interface RoleService { /** 给角色授权资源 */ auth_res: (params: RoleAuthResParams) => Promise<any>; /** 给角色授权数据 */ auth_data: (params: RoleAuthDataParams) => Promise<any>; /** 资源树查询 */ tree_mark: (params: RoleTreeMarkParams) => Promise<any>; /** 给角色授权报表 */ auth_report: (params: RoleAuthReportParams) => Promise<any>; }