nsn-service-type
Version:
NSN服务类型定义组件
50 lines (35 loc) • 1.33 kB
TypeScript
import { User } from "nsn-entity";
import { YesNoEnum } from 'nsn-enum';
export interface UserOfDeptParams {
/** 部门ID */
deptId: string;
}
export type UserResetPwdParams = Pick<User, 'id' | 'password'>
export type UserUpdatePwdParams = Pick<User, 'password' | 'newPassword'>
export interface UserAuthRoleParams {
/** 用户 */
userId: string;
/** 角色列表 */
roleIdList: Array<string>;
}
export type UserUpdateProfileParams = {} & User
export type UserToggleAgreementedParams = Pick<User, 'agreemented'>
/** 系统-用户 服务 */
export interface UserService {
/** 账号登录信息 */
info: () => Promise<any>;
/** 管理员重置密码 */
reset_pwd: (params: UserResetPwdParams) => Promise<any>;
/** 用户修改密码 */
update_pwd: (params: UserUpdatePwdParams) => Promise<any>;
/** 查询部门下的用户 */
of_dept: (params: UserOfDeptParams) => Promise<any>;
/** 给用户授权角色 */
auth_role: (params: UserAuthRoleParams) => Promise<any>;
/** 更新用户信息 */
update_profile: (params: UserUpdateProfileParams) => Promise<any>;
/** 管理员统一设置所有用户信息 */
reset_profile: (params: UserUpdateProfileParams) => Promise<any>;
/** 同意用户协议 */
toggle_agreemented: (params: UserToggleAgreementedParams) => Promise<any>;
}