import { String, Boolean, Text, Datetime, ForeignKey } from "oak-domain/lib/types/DataType"; import { Q_DateValue, Q_BooleanValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, FulltextFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand"; import { OneOf } from "oak-domain/lib/types/Polyfill"; import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape, AggregationResult } from "oak-domain/lib/types/Entity"; import { Action, ParticularAction, UserState, IdState } from "./Action"; import { RelationAction } from "oak-domain/lib/actions/action"; import * as Oper from "../Oper/Schema"; import * as UserRelation from "../UserRelation/Schema"; import * as Email from "../Email/Schema"; import * as Message from "../Message/Schema"; import * as Mobile from "../Mobile/Schema"; import * as Token from "../Token/Schema"; import * as UserEntityGrant from "../UserEntityGrant/Schema"; import * as UserSystem from "../UserSystem/Schema"; import * as UserWechatPublicTag from "../UserWechatPublicTag/Schema"; import * as WechatLogin from "../WechatLogin/Schema"; import * as WechatUser from "../WechatUser/Schema"; import * as ModiEntity from "../ModiEntity/Schema"; import * as OperEntity from "../OperEntity/Schema"; import * as ExtraFile from "../ExtraFile/Schema"; import * as WechatQrCode from "../WechatQrCode/Schema"; export declare type OpSchema = EntityShape & { name?: String<16> | null; nickname?: String<64> | null; password?: Text | null; passwordSha1?: Text | null; birth?: Datetime | null; gender?: ('male' | 'female') | null; idCardType?: ('ID-Card' | 'passport' | 'Mainland-passport') | null; idNumber?: String<32> | null; refId?: ForeignKey<"user"> | null; isRoot?: Boolean | null; idState?: IdState | null; userState?: UserState | null; }; export declare type OpAttr = keyof OpSchema; export declare type Schema = EntityShape & { name?: String<16> | null; nickname?: String<64> | null; password?: Text | null; passwordSha1?: Text | null; birth?: Datetime | null; gender?: ('male' | 'female') | null; idCardType?: ('ID-Card' | 'passport' | 'Mainland-passport') | null; idNumber?: String<32> | null; refId?: ForeignKey<"user"> | null; isRoot?: Boolean | null; idState?: IdState | null; userState?: UserState | null; ref?: Schema | null; oper$operator?: Array; oper$operator$$aggr?: AggregationResult; user$ref?: Array; user$ref$$aggr?: AggregationResult; userRelation$user?: Array; userRelation$user$$aggr?: AggregationResult; email$user?: Array; email$user$$aggr?: AggregationResult; message$user?: Array; message$user$$aggr?: AggregationResult; mobile$user?: Array; mobile$user$$aggr?: AggregationResult; token$user?: Array; token$user$$aggr?: AggregationResult; token$player?: Array; token$player$$aggr?: AggregationResult; userEntityGrant$granter?: Array; userEntityGrant$granter$$aggr?: AggregationResult; userEntityGrant$grantee?: Array; userEntityGrant$grantee$$aggr?: AggregationResult; userSystem$user?: Array; userSystem$user$$aggr?: AggregationResult; userWechatPublicTag$user?: Array; userWechatPublicTag$user$$aggr?: AggregationResult; wechatLogin$user?: Array; wechatLogin$user$$aggr?: AggregationResult; wechatUser$user?: Array; wechatUser$user$$aggr?: AggregationResult; modiEntity$entity?: Array; modiEntity$entity$$aggr?: AggregationResult; operEntity$entity?: Array; operEntity$entity$$aggr?: AggregationResult; extraFile$entity?: Array; extraFile$entity$$aggr?: AggregationResult; wechatQrCode$entity?: Array; wechatQrCode$entity$$aggr?: AggregationResult; } & { [A in ExpressionKey]?: any; }; declare type AttrFilter = { id: Q_StringValue; $$createAt$$: Q_DateValue; $$seq$$: Q_StringValue; $$updateAt$$: Q_DateValue; name: Q_StringValue; nickname: Q_StringValue; password: Q_StringValue; passwordSha1: Q_StringValue; birth: Q_DateValue; gender: Q_EnumValue<'male' | 'female'>; idCardType: Q_EnumValue<'ID-Card' | 'passport' | 'Mainland-passport'>; idNumber: Q_StringValue; refId: Q_StringValue; ref: Filter; isRoot: Q_BooleanValue; idState: Q_EnumValue; userState: Q_EnumValue; oper$operator: Oper.Filter; user$ref: Filter; userRelation$user: UserRelation.Filter; email$user: Email.Filter; message$user: Message.Filter; mobile$user: Mobile.Filter; token$user: Token.Filter; token$player: Token.Filter; userEntityGrant$granter: UserEntityGrant.Filter; userEntityGrant$grantee: UserEntityGrant.Filter; userSystem$user: UserSystem.Filter; userWechatPublicTag$user: UserWechatPublicTag.Filter; wechatLogin$user: WechatLogin.Filter; wechatUser$user: WechatUser.Filter; modiEntity$entity: ModiEntity.Filter; operEntity$entity: OperEntity.Filter; extraFile$entity: ExtraFile.Filter; wechatQrCode$entity: WechatQrCode.Filter; }; export declare type Filter = MakeFilter & FulltextFilter>; export declare type Projection = { "#id"?: NodeId; [k: string]: any; id?: number; $$createAt$$?: number; $$updateAt$$?: number; $$seq$$?: number; name?: number; nickname?: number; password?: number; passwordSha1?: number; birth?: number; gender?: number; idCardType?: number; idNumber?: number; refId?: number; ref?: Projection; isRoot?: number; idState?: number; userState?: number; oper$operator?: Oper.Selection & { $entity: "oper"; }; oper$operator$$aggr?: Oper.Aggregation & { $entity: "oper"; }; user$ref?: Selection & { $entity: "user"; }; user$ref$$aggr?: Aggregation & { $entity: "user"; }; userRelation$user?: UserRelation.Selection & { $entity: "userRelation"; }; userRelation$user$$aggr?: UserRelation.Aggregation & { $entity: "userRelation"; }; email$user?: Email.Selection & { $entity: "email"; }; email$user$$aggr?: Email.Aggregation & { $entity: "email"; }; message$user?: Message.Selection & { $entity: "message"; }; message$user$$aggr?: Message.Aggregation & { $entity: "message"; }; mobile$user?: Mobile.Selection & { $entity: "mobile"; }; mobile$user$$aggr?: Mobile.Aggregation & { $entity: "mobile"; }; token$user?: Token.Selection & { $entity: "token"; }; token$user$$aggr?: Token.Aggregation & { $entity: "token"; }; token$player?: Token.Selection & { $entity: "token"; }; token$player$$aggr?: Token.Aggregation & { $entity: "token"; }; userEntityGrant$granter?: UserEntityGrant.Selection & { $entity: "userEntityGrant"; }; userEntityGrant$granter$$aggr?: UserEntityGrant.Aggregation & { $entity: "userEntityGrant"; }; userEntityGrant$grantee?: UserEntityGrant.Selection & { $entity: "userEntityGrant"; }; userEntityGrant$grantee$$aggr?: UserEntityGrant.Aggregation & { $entity: "userEntityGrant"; }; userSystem$user?: UserSystem.Selection & { $entity: "userSystem"; }; userSystem$user$$aggr?: UserSystem.Aggregation & { $entity: "userSystem"; }; userWechatPublicTag$user?: UserWechatPublicTag.Selection & { $entity: "userWechatPublicTag"; }; userWechatPublicTag$user$$aggr?: UserWechatPublicTag.Aggregation & { $entity: "userWechatPublicTag"; }; wechatLogin$user?: WechatLogin.Selection & { $entity: "wechatLogin"; }; wechatLogin$user$$aggr?: WechatLogin.Aggregation & { $entity: "wechatLogin"; }; wechatUser$user?: WechatUser.Selection & { $entity: "wechatUser"; }; wechatUser$user$$aggr?: WechatUser.Aggregation & { $entity: "wechatUser"; }; modiEntity$entity?: ModiEntity.Selection & { $entity: "modiEntity"; }; modiEntity$entity$$aggr?: ModiEntity.Aggregation & { $entity: "modiEntity"; }; operEntity$entity?: OperEntity.Selection & { $entity: "operEntity"; }; operEntity$entity$$aggr?: OperEntity.Aggregation & { $entity: "operEntity"; }; extraFile$entity?: ExtraFile.Selection & { $entity: "extraFile"; }; extraFile$entity$$aggr?: ExtraFile.Aggregation & { $entity: "extraFile"; }; wechatQrCode$entity?: WechatQrCode.Selection & { $entity: "wechatQrCode"; }; wechatQrCode$entity$$aggr?: WechatQrCode.Aggregation & { $entity: "wechatQrCode"; }; } & Partial>; declare type UserIdProjection = OneOf<{ id: number; refId: number; }>; export declare type SortAttr = { id: number; } | { $$createAt$$: number; } | { $$seq$$: number; } | { $$updateAt$$: number; } | { name: number; } | { nickname: number; } | { password: number; } | { passwordSha1: number; } | { birth: number; } | { gender: number; } | { idCardType: number; } | { idNumber: number; } | { refId: number; } | { ref: SortAttr; } | { isRoot: number; } | { idState: number; } | { userState: number; } | { [k: string]: any; } | OneOf>; export declare type SortNode = { $attr: SortAttr; $direction?: "asc" | "desc"; }; export declare type Sorter = SortNode[]; export declare type SelectOperation

= OakSelection<"select", P, Filter, Sorter>; export declare type Selection

= SelectOperation

; export declare type Aggregation = DeduceAggregation; export declare type CreateOperationData = FormCreateData> & (({ refId?: never; ref?: CreateSingleOperation; } | { refId: String<64>; ref?: UpdateOperation; } | { refId?: String<64>; })) & { oper$operator?: OakOperation<"create", Omit[]> | Array>>; user$ref?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; userRelation$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; email$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; message$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; mobile$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; token$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; token$player?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; userEntityGrant$granter?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; userEntityGrant$grantee?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; userSystem$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; userWechatPublicTag$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; wechatLogin$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; wechatUser$user?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; modiEntity$entity?: OakOperation<"create", Omit[]> | Array>>; operEntity$entity?: OakOperation<"create", Omit[]> | Array>>; extraFile$entity?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; wechatQrCode$entity?: OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit>>; }; export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>; export declare type CreateMultipleOperation = OakOperation<"create", Array>; export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation; export declare type UpdateOperationData = FormUpdateData> & (({ ref: CreateSingleOperation; refId?: never; } | { ref: UpdateOperation; refId?: never; } | { ref: RemoveOperation; refId?: never; } | { ref?: never; refId?: String<64> | null; })) & { [k: string]: any; oper$operator?: OakOperation<"create", Omit[]> | Array>>; user$ref?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; userRelation$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; email$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; message$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; mobile$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; token$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; token$player?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; userEntityGrant$granter?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; userEntityGrant$grantee?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; userSystem$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; userWechatPublicTag$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; wechatLogin$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; wechatUser$user?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; modiEntity$entity?: OakOperation<"create", Omit[]> | Array>>; operEntity$entity?: OakOperation<"create", Omit[]> | Array>>; extraFile$entity?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; wechatQrCode$entity?: OakOperation, Omit> | OakOperation, Omit> | OakOperation<"create", Omit[]> | Array> | OakOperation, Omit> | OakOperation, Omit>>; }; export declare type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>; export declare type RemoveOperationData = {} & (({ ref?: UpdateOperation | RemoveOperation; })); export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>; export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation; export declare type UserIdSubQuery = Selection; export declare type EntityDef = { Schema: Schema; OpSchema: OpSchema; Action: OakMakeAction | string; Selection: Selection; Aggregation: Aggregation; Operation: Operation; Create: CreateOperation; Update: UpdateOperation; Remove: RemoveOperation; CreateSingle: CreateSingleOperation; CreateMulti: CreateMultipleOperation; ParticularAction: ParticularAction; }; export {};