UNPKG

@apulis/group-selector

Version:

change user group at navbar

52 lines (51 loc) 1.37 kB
export interface IPassword { oldPassword: string; newPassword: string; rptPassword: string; } export interface Response<T = any> { code: number; data: T; msg?: string; } export interface IUser { username?: string; id?: number; firstLogin?: boolean; createdAt?: number; creatorName?: string; userGroupId?: number; userGroup?: IGroupListItem; userGroups: IGroupListItem[]; organizationId?: number; organization?: any; email?: string; } export interface IGroupListItem { id: number; account: string; nickName: string; desc?: string; updatedAt?: number; createdAt: number; creatorName: string; creatorId?: number; organization: any; organizationId?: number; resource: any; maxResource?: number; minResource?: number; policies: any[]; type: 0 | 1 | 2 | 3 | 4 | 5 | 6; } export declare type RequestMethod = 'head' | 'link' | 'options' | 'get' | 'GET' | 'delete' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'LINK' | 'unlink' | 'UNLINK'; export interface RequestConfig { method?: RequestMethod; data?: any; params?: any; headers?: any; } export interface Context { currentUser?: IUser; } export declare type requestFunc = (path: string, params: RequestConfig) => Promise<Response<any>>;