oak-general-business/es/entities/Passport.d.ts

38 lines
1.1 KiB
TypeScript

import { Boolean } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { Schema as System } from './System';
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
export type Type = 'password' | 'sms' | 'email' | 'wechatWeb' | 'wechatMp' | 'wechatPublic' | 'wechatPublicForWeb' | 'wechatMpForWeb' | 'wechatNative';
export type SmsConfig = {
mockSend?: boolean;
defaultOrigin?: 'ali' | 'tencent' | 'ctyun';
templateName?: string;
codeDuration?: number;
digit?: number;
};
export type EmailConfig = {
mockSend?: boolean;
account: string;
subject: string;
text?: string;
html?: string;
codeDuration?: number;
digit?: number;
emailSuffix?: string[];
};
export type PfwConfig = {
appId: string;
};
export type MfwConfig = {
appId: string;
};
export interface Schema extends EntityShape {
system: System;
type: Type;
config?: SmsConfig | EmailConfig | PfwConfig | MfwConfig;
enabled: Boolean;
}
export declare const entityDesc: EntityDesc<Schema, '', '', {
type: Schema['type'];
}>;