import { String, Text, Datetime, Image, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType"; import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, FulltextFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand"; import { OneOf } from "oak-domain/lib/types/Polyfill"; import * as SubQuery from "../_SubQuery"; import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity"; import { Action, ParticularAction, UserState, IdState } from "./Action"; import * as System from "../System/Schema"; import * as Oper from "../Oper/Schema"; import * as Email from "../Email/Schema"; import * as Mobile from "../Mobile/Schema"; import * as UserRole from "../UserRole/Schema"; import * as UserSystem from "../UserSystem/Schema"; import * as Token from "../Token/Schema"; import * as UserEntityGrant from "../UserEntityGrant/Schema"; import * as WechatUser from "../WechatUser/Schema"; import * as OperEntity from "../OperEntity/Schema"; import * as ModiEntity from "../ModiEntity/Schema"; import * as ExtraFile from "../ExtraFile/Schema"; export declare type OpSchema = { id: PrimaryKey; $$createAt$$: Datetime; $$updateAt$$: Datetime; $$deleteAt$$?: Datetime | null; name?: String<16> | null; nickname?: String<64> | null; password?: Text | null; passwordSha1?: Text | null; birth?: Datetime | null; gender?: ('male' | 'female') | null; avatar?: Image | null; idCardType?: ('ID-Card' | 'passport' | 'Mainland-passport') | null; idNumber?: String<32> | null; refId?: ForeignKey<"user"> | null; systemId: ForeignKey<"system">; idState?: IdState | null; userState?: UserState | null; }; export declare type OpAttr = keyof OpSchema; export declare type Schema = { id: PrimaryKey; $$createAt$$: Datetime; $$updateAt$$: Datetime; $$deleteAt$$?: Datetime | null; name?: String<16> | null; nickname?: String<64> | null; password?: Text | null; passwordSha1?: Text | null; birth?: Datetime | null; gender?: ('male' | 'female') | null; avatar?: Image | null; idCardType?: ('ID-Card' | 'passport' | 'Mainland-passport') | null; idNumber?: String<32> | null; refId?: ForeignKey<"user"> | null; systemId: ForeignKey<"system">; idState?: IdState | null; userState?: UserState | null; ref?: Schema | null; system: System.Schema; oper$operator?: Array; email$user?: Array; mobile$user?: Array; userRole$user?: Array; userSystem$user?: Array; token$user?: Array; token$player?: Array; user$ref?: Array; userEntityGrant$granter?: Array; userEntityGrant$grantee?: Array; wechatUser$user?: Array; operEntity$entity?: Array; modiEntity$entity?: Array; extraFile$entity?: Array; } & { [A in ExpressionKey]?: any; }; declare type AttrFilter = { id: Q_StringValue | SubQuery.UserIdSubQuery; $$createAt$$: Q_DateValue; $$updateAt$$: Q_DateValue; name: Q_StringValue; nickname: Q_StringValue; password: Q_StringValue; passwordSha1: Q_StringValue; birth: Q_DateValue; gender: Q_EnumValue<'male' | 'female'>; avatar: Q_StringValue; idCardType: Q_EnumValue<'ID-Card' | 'passport' | 'Mainland-passport'>; idNumber: Q_StringValue; refId: Q_StringValue | SubQuery.UserIdSubQuery; ref: Filter; systemId: Q_StringValue | SubQuery.SystemIdSubQuery; system: System.Filter; idState: Q_EnumValue; userState: Q_EnumValue; }; export declare type Filter = MakeFilter & FulltextFilter>; export declare type Projection = { "#id"?: NodeId; [k: string]: any; id: 1; $$createAt$$?: 1; $$updateAt$$?: 1; name?: 1; nickname?: 1; password?: 1; passwordSha1?: 1; birth?: 1; gender?: 1; avatar?: 1; idCardType?: 1; idNumber?: 1; refId?: 1; ref?: Projection; systemId?: 1; system?: System.Projection; idState?: 1; userState?: 1; oper$operator?: Oper.Selection & { $entity: "oper"; }; email$user?: Email.Selection & { $entity: "email"; }; mobile$user?: Mobile.Selection & { $entity: "mobile"; }; userRole$user?: UserRole.Selection & { $entity: "userRole"; }; userSystem$user?: UserSystem.Selection & { $entity: "userSystem"; }; token$user?: Token.Selection & { $entity: "token"; }; token$player?: Token.Selection & { $entity: "token"; }; user$ref?: Selection & { $entity: "user"; }; userEntityGrant$granter?: UserEntityGrant.Selection & { $entity: "userEntityGrant"; }; userEntityGrant$grantee?: UserEntityGrant.Selection & { $entity: "userEntityGrant"; }; wechatUser$user?: WechatUser.Selection & { $entity: "wechatUser"; }; operEntity$entity?: OperEntity.Selection & { $entity: "operEntity"; }; modiEntity$entity?: ModiEntity.Selection & { $entity: "modiEntity"; }; extraFile$entity?: ExtraFile.Selection & { $entity: "extraFile"; }; } & Partial>; export declare type ExportProjection = { "#id"?: NodeId; [k: string]: any; id?: string; $$createAt$$?: string; $$updateAt$$?: string; name?: string; nickname?: string; password?: string; passwordSha1?: string; birth?: string; gender?: string; avatar?: string; idCardType?: string; idNumber?: string; refId?: string; ref?: ExportProjection; systemId?: string; system?: System.ExportProjection; idState?: string; userState?: string; oper$operator?: Oper.Exportation & { $entity: "oper"; }; email$user?: Email.Exportation & { $entity: "email"; }; mobile$user?: Mobile.Exportation & { $entity: "mobile"; }; userRole$user?: UserRole.Exportation & { $entity: "userRole"; }; userSystem$user?: UserSystem.Exportation & { $entity: "userSystem"; }; token$user?: Token.Exportation & { $entity: "token"; }; token$player?: Token.Exportation & { $entity: "token"; }; user$ref?: Exportation & { $entity: "user"; }; userEntityGrant$granter?: UserEntityGrant.Exportation & { $entity: "userEntityGrant"; }; userEntityGrant$grantee?: UserEntityGrant.Exportation & { $entity: "userEntityGrant"; }; wechatUser$user?: WechatUser.Exportation & { $entity: "wechatUser"; }; operEntity$entity?: OperEntity.Exportation & { $entity: "operEntity"; }; modiEntity$entity?: ModiEntity.Exportation & { $entity: "modiEntity"; }; extraFile$entity?: ExtraFile.Exportation & { $entity: "extraFile"; }; } & Partial>; declare type UserIdProjection = OneOf<{ id: 1; refId: 1; }>; declare type SystemIdProjection = OneOf<{ systemId: 1; }>; export declare type SortAttr = { id: 1; } | { $$createAt$$: 1; } | { $$updateAt$$: 1; } | { name: 1; } | { nickname: 1; } | { password: 1; } | { passwordSha1: 1; } | { birth: 1; } | { gender: 1; } | { avatar: 1; } | { idCardType: 1; } | { idNumber: 1; } | { refId: 1; } | { ref: SortAttr; } | { systemId: 1; } | { system: System.SortAttr; } | { idState: 1; } | { userState: 1; } | { [k: string]: any; } | OneOf>; export declare type SortNode = { $attr: SortAttr; $direction?: "asc" | "desc"; }; export declare type Sorter = SortNode[]; export declare type SelectOperation

= Omit, "id">; export declare type Selection

= Omit, "action">; export declare type Exportation = OakOperation<"export", ExportProjection, Filter, Sorter>; export declare type CreateOperationData = FormCreateData> & (({ refId?: never | null; ref?: CreateSingleOperation; } | { refId?: String<64>; ref?: UpdateOperation; }) & ({ systemId?: never | null; system: System.CreateSingleOperation; } | { systemId: String<64>; system?: System.UpdateOperation; })) & { oper$operator?: OakOperation, Oper.Filter> | Array | Omit[]> | OakOperation, Oper.Filter>>; email$user?: OakOperation, Email.Filter> | Array | Omit[]> | OakOperation, Email.Filter>>; mobile$user?: OakOperation, Mobile.Filter> | Array | Omit[]> | OakOperation, Mobile.Filter>>; userRole$user?: OakOperation, UserRole.Filter> | Array | Omit[]> | OakOperation, UserRole.Filter>>; userSystem$user?: OakOperation, UserSystem.Filter> | Array | Omit[]> | OakOperation, UserSystem.Filter>>; token$user?: OakOperation, Token.Filter> | Array | Omit[]> | OakOperation, Token.Filter>>; token$player?: OakOperation, Token.Filter> | Array | Omit[]> | OakOperation, Token.Filter>>; user$ref?: OakOperation, Filter> | Array | Omit[]> | OakOperation, Filter>>; userEntityGrant$granter?: OakOperation, UserEntityGrant.Filter> | Array | Omit[]> | OakOperation, UserEntityGrant.Filter>>; userEntityGrant$grantee?: OakOperation, UserEntityGrant.Filter> | Array | Omit[]> | OakOperation, UserEntityGrant.Filter>>; wechatUser$user?: OakOperation, WechatUser.Filter> | Array | Omit[]> | OakOperation, WechatUser.Filter>>; operEntity$entity?: OakOperation, OperEntity.Filter> | Array | Omit[]> | OakOperation, OperEntity.Filter>>; modiEntity$entity?: OakOperation, ModiEntity.Filter> | Array | Omit[]> | OakOperation, ModiEntity.Filter>>; extraFile$entity?: OakOperation, ExtraFile.Filter> | Array | Omit[]> | OakOperation, ExtraFile.Filter>>; }; 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 | UpdateOperation | RemoveOperation; refId?: undefined; } | { ref?: undefined; refId?: String<64> | null; }) & ({ system?: System.CreateSingleOperation | System.UpdateOperation | System.RemoveOperation; systemId?: undefined; } | { system?: undefined; systemId?: String<64> | null; })) & { [k: string]: any; opers$operator?: Oper.UpdateOperation | Oper.RemoveOperation | Array | Omit[]> | Oper.UpdateOperation | Oper.RemoveOperation>; emails$user?: Email.UpdateOperation | Email.RemoveOperation | Array | Omit[]> | Email.UpdateOperation | Email.RemoveOperation>; mobiles$user?: Mobile.UpdateOperation | Mobile.RemoveOperation | Array | Omit[]> | Mobile.UpdateOperation | Mobile.RemoveOperation>; userRoles$user?: UserRole.UpdateOperation | UserRole.RemoveOperation | Array | Omit[]> | UserRole.UpdateOperation | UserRole.RemoveOperation>; userSystems$user?: UserSystem.UpdateOperation | UserSystem.RemoveOperation | Array | Omit[]> | UserSystem.UpdateOperation | UserSystem.RemoveOperation>; tokens$user?: Token.UpdateOperation | Token.RemoveOperation | Array | Omit[]> | Token.UpdateOperation | Token.RemoveOperation>; tokens$player?: Token.UpdateOperation | Token.RemoveOperation | Array | Omit[]> | Token.UpdateOperation | Token.RemoveOperation>; users$ref?: UpdateOperation | RemoveOperation | Array | Omit[]> | UpdateOperation | RemoveOperation>; userEntityGrants$granter?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation | Array | Omit[]> | UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation>; userEntityGrants$grantee?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation | Array | Omit[]> | UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation>; wechatUsers$user?: WechatUser.UpdateOperation | WechatUser.RemoveOperation | Array | Omit[]> | WechatUser.UpdateOperation | WechatUser.RemoveOperation>; operEntitys$entity?: OperEntity.UpdateOperation | OperEntity.RemoveOperation | Array | Omit[]> | OperEntity.UpdateOperation | OperEntity.RemoveOperation>; modiEntitys$entity?: ModiEntity.UpdateOperation | ModiEntity.RemoveOperation | Array | Omit[]> | ModiEntity.UpdateOperation | ModiEntity.RemoveOperation>; extraFiles$entity?: ExtraFile.UpdateOperation | ExtraFile.RemoveOperation | Array | Omit[]> | ExtraFile.UpdateOperation | ExtraFile.RemoveOperation>; }; export declare type UpdateOperation = OakOperation; export declare type RemoveOperationData = {} & (({ ref?: UpdateOperation; } | { ref?: RemoveOperation; }) & ({ system?: System.UpdateOperation; } | { system?: System.RemoveOperation; })); export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>; export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation | SelectOperation; export declare type UserIdSubQuery = Selection; export declare type SystemIdSubQuery = Selection; export declare type NativeAttr = OpAttr | `ref.${OpAttr}` | `ref.ref.${OpAttr}` | `ref.ref.ref.${OpAttr}` | `system.${System.NativeAttr}`; export declare type FullAttr = NativeAttr | `opers$${number}.${Oper.NativeAttr}` | `emails$${number}.${Email.NativeAttr}` | `mobiles$${number}.${Mobile.NativeAttr}` | `userRoles$${number}.${UserRole.NativeAttr}` | `userSystems$${number}.${UserSystem.NativeAttr}` | `tokens$user$${number}.${Token.NativeAttr}` | `tokens$player$${number}.${Token.NativeAttr}` | `users$${number}.${NativeAttr}` | `userEntityGrants$granter$${number}.${UserEntityGrant.NativeAttr}` | `userEntityGrants$grantee$${number}.${UserEntityGrant.NativeAttr}` | `wechatUsers$${number}.${WechatUser.NativeAttr}` | `operEntitys$${number}.${OperEntity.NativeAttr}` | `modiEntitys$${number}.${ModiEntity.NativeAttr}` | `extraFiles$${number}.${ExtraFile.NativeAttr}`; export declare type EntityDef = { Schema: Schema; OpSchema: OpSchema; Action: OakMakeAction | string; Selection: Selection; Operation: Operation; Create: CreateOperation; Update: UpdateOperation; Remove: RemoveOperation; CreateSingle: CreateSingleOperation; CreateMulti: CreateMultipleOperation; ParticularAction: ParticularAction; }; export {};