import { String, Text, ForeignKey } from "../../types/DataType"; import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "../../types/Demand"; import { OneOf } from "../../types/Polyfill"; import * as SubQuery from "../_SubQuery"; import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape, AggregationResult } from "../../types/Entity"; import { Action, ParticularAction, UserState } from "./Action"; import { RelationAction } from "../../actions/action"; import * as Oper from "../Oper/Schema"; import * as UserRelation from "../UserRelation/Schema"; import * as ModiEntity from "../ModiEntity/Schema"; import * as OperEntity from "../OperEntity/Schema"; export declare type OpSchema = EntityShape & { name?: String<16> | null; nickname?: String<64> | null; password?: Text | null; refId?: ForeignKey<"user"> | 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; refId?: ForeignKey<"user"> | 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; modiEntity$entity?: Array; modiEntity$entity$$aggr?: AggregationResult; operEntity$entity?: Array; operEntity$entity$$aggr?: AggregationResult; } & { [A in ExpressionKey]?: any; }; declare type AttrFilter = { id: Q_StringValue | SubQuery.UserIdSubQuery; $$createAt$$: Q_DateValue; $$seq$$: Q_StringValue; $$updateAt$$: Q_DateValue; name: Q_StringValue; nickname: Q_StringValue; password: Q_StringValue; refId: Q_StringValue | SubQuery.UserIdSubQuery; ref: Filter; userState: Q_EnumValue; }; export declare type Filter = MakeFilter>; export declare type Projection = { "#id"?: NodeId; [k: string]: any; id?: number; $$createAt$$?: number; $$updateAt$$?: number; $$seq$$?: number; name?: number; nickname?: number; password?: number; refId?: number; ref?: Projection; 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"; }; 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"; }; } & 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; } | { refId: number; } | { ref: SortAttr; } | { 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

= Omit, "action">; 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, Filter> | OakOperation<"create", Omit[]> | Array> | OakOperation, Filter>>; userRelation$user?: OakOperation, UserRelation.Filter> | OakOperation<"create", Omit[]> | Array> | OakOperation, UserRelation.Filter>>; modiEntity$entity?: OakOperation<"create", Omit[]> | Array>>; operEntity$entity?: OakOperation<"create", Omit[]> | Array>>; }; 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?: UpdateOperation | RemoveOperation | OakOperation<"create", Omit[]> | Array> | UpdateOperation | RemoveOperation>; userRelation$user?: UserRelation.UpdateOperation | UserRelation.RemoveOperation | OakOperation<"create", Omit[]> | Array> | UserRelation.UpdateOperation | UserRelation.RemoveOperation>; modiEntity$entity?: OakOperation<"create", Omit[]> | Array>>; operEntity$entity?: OakOperation<"create", Omit[]> | Array>>; }; 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 {};