///
/** 用户所有相关的操作 */
import * as S from 'ufc-schema';
export interface CurrentUser {
avatar?: string;
name?: string;
title?: string;
group?: string;
signature?: string;
tags?: Array<{
key: string;
label: string;
}>;
userid?: string;
unreadCount?: number;
}
export interface UserModelState {
currentUser?: CurrentUser;
}
export declare class UserModel implements CurrentUser {
name: string;
constructor(data?: Partial);
}
export interface NoticeIconData {
avatar?: string | React.ReactNode;
title?: React.ReactNode;
description?: React.ReactNode;
datetime?: React.ReactNode;
extra?: React.ReactNode;
style?: React.CSSProperties;
key?: string | number;
read?: boolean;
}
export interface NoticeItem extends NoticeIconData {
id: string;
type: string;
status: string;
}
export interface GlobalModelState {
collapsed: boolean;
notices: NoticeItem[];
}
/** 获取全部用户信息 */
export declare function getUsers({ pageNum, pageSize, searchText, roleId, }: S.SearchUser): Promise<{
data: S.User[];
meta: S.Meta;
}>;
/** 获取当前用户的个人信息 */
export declare function getProfile(): Promise;
/** 获取当前租户下所有用户 */
export declare function getTenantUsers(): Promise;
/** 增加用户 */
export declare function addUser(user: Partial<{
email: string;
avatarFileId: S.Id;
username: string;
nickname: string;
password: string;
phoneNumber: string;
remark: string;
roleIds: S.Id[];
}>): Promise;
/** 更新用户信息 */
export declare function updateUserInfo(userId: S.Id, { remark, roleIds }: {
remark: string;
roleIds: S.Id[];
}): Promise;
/** 更新角色 */
export declare function updateUser(user: S.User): Promise;
/** 重置密码 */
export declare function resetPassword({ password, phoneNumber, verificationCode, }: {
password: string;
phoneNumber: string;
verificationCode: string;
}): Promise;
/** 更新角色密码 */
export declare function updateUserPassword(currentPassword: string, newPassword: string): Promise;
/** 删除用户 */
export declare function deleteUser(userId: S.Id): Promise;
/** 发送邮件 */
export declare function sendEmialCode(sendDst: string, password: string): Promise;
/** 激活邮箱 */
export declare function bindEmail(code: string): Promise;
/** 获取手机验证码 */
export declare function getVerificationCode(sendDst: string, password: string): Promise;
/** 更新绑定手机 */
export declare function bindPhoneNumber(password: string, phoneNumber: string, verificationCode: string): Promise;
/** 获取租户所有应用列表 */
export declare function getUfcApplication(): Promise;
/** 获取绑定微信二维码 */
export declare function getWechatCode(): Promise;
/** 解绑微信 */
export declare function unbindWechat(): Promise;
/** 获取微信二维码信息 */
export declare function getQrcodeTicket(ticket: string): Promise;
/**
* 导出用户资料
*/
export declare function getUserExcel({ meta }: {
meta: S.Meta;
}): Promise;