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

33 lines
1.0 KiB
TypeScript

import { Boolean, Text, Datetime } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { Schema as User } from './User';
import { Schema as WechatQrCode } from './WechatQrCode';
import { QrCodeType } from '../types/Config';
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
import { Schema as Token } from './Token';
import { Schema as WechatUser } from './WechatUser';
type Router = {
pathname: string;
props?: Record<string, any>;
state?: Record<string, any>;
};
export interface Schema extends EntityShape {
user?: User;
type: 'bind' | 'login';
successed: Boolean;
remark?: Text;
qrCodeType: QrCodeType;
expiresAt?: Datetime;
expired?: Boolean;
codes: Array<WechatQrCode>;
tokens?: Array<Token>;
wechatUser?: WechatUser;
router?: Router;
}
export type Action = 'success';
export declare const entityDesc: EntityDesc<Schema, Action, '', {
type: Schema['type'];
qrCodeType: QrCodeType;
}>;
export {};