import { IReturnResult } from '../../type/base'; /** * 图片验证码返回结果 */ export interface CaptchaImageResult { base: string; top: number; slider: string; sliderWidth?: number; sliderHegiht?: number; } /** * 校验图片验证码参数 */ export interface CheckCaptchaImageParams { moveX: number; moveYList: number[]; rid?: string; } /** * 小鱼账号登录参数 * * @property { boolean } enhancePassword - 不校验密码安全策略 * @property { boolean } checkPasswordExpirationTime - 检查密码过期时间 * @property { boolean } checkPasswordEnhance - 不检查密码强度 * @property { boolean } checkTwoFactors - 检查双因子登录 */ export interface LoginOtherParams { enhancePassword?: boolean; checkPasswordExpirationTime?: boolean; checkPasswordEnhance?: boolean; checkTwoFactors?: boolean; extId?: string; extUserId?: string; } /** * 登录状态返回结果 */ export interface XYLoginStateData extends IReturnResult { state: XYLoginState; } /** * 登录状态 */ export declare enum XYLoginState { /** * 登录中 */ LoggingIn = "LoggingIn", /** * 已登录成功 */ LoggedIn = "LoggedIn", /** * 已退出登录 */ LoggedOut = "LoggedOut", /** * 刷新token */ TokenRefresh = "TokenRefresh" } /** * 密码组成 * * @property { boolean } digit - 是否包含数字 * @property { boolean } lowerCase - 是否包含小写字母 * @property { boolean } specialChar - 是否包含特殊字符 * @property { boolean } upperCase - 是否包含大写字母 */ export interface XYPasswordComposition { digit: boolean; lowerCase: boolean; specialChar: boolean; upperCase: boolean; } /** * 小鱼账号配置 * * @property { boolean } enhancePassword - 不校验密码安全策略 * @property { string } passwordLength - 密码长度(格式: 8-16) * @property { XYPasswordComposition } passwordComposition - 密码组成 * @property { number } passwordMaxLength - 密码最大长度 * @property { number } passwordMinLength - 密码最小长度 * @property { string } passwordValidationRegex - 密码验证正则表达式 * @property { string } enhancedPasswordRegex - 增强密码验证正则表达式, 兼容登录密码规则 */ export interface XYAccountConfig { enhancePassword: boolean; passwordLength: string; passwordComposition?: XYPasswordComposition; passwordMaxLength?: number; passwordMinLength?: number; passwordValidationRegex?: string; enhancedPasswordRegex?: string; } /** * 重置密码参数 * * @property { string } account - 用户账号 * @property { string } password - 旧密码, 如果是验证码登录,此值可不传 * @property { string } newPassword - 新密码 * @property { string } verificationCode - 验证码, 如果是账号密码登录,此值可不传 * @property { boolean } enhancePassword - 是否增强密码 */ export interface XYResetPasswordParams { account: string; password?: string; newPassword: string; verificationCode?: string; enhancePassword?: boolean; }