import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand"; import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity"; import { Action, ParticularAction, IState } from "./Action"; import { String } from "oak-domain/lib/types/DataType"; export type OpSchema = EntityShape & { targetEntity: String<32>; entity: String<32>; entityId: String<64>; action: String<24>; data: Object; filter?: Object | null; extra?: Object | null; iState?: IState | null; } & { [A in ExpressionKey]?: any; }; export type OpAttr = keyof OpSchema; export type OpFilter = { id: Q_StringValue; $$createAt$$: Q_DateValue; $$seq$$: Q_NumberValue; $$updateAt$$: Q_DateValue; targetEntity: Q_StringValue; entity: Q_StringValue; entityId: Q_StringValue; action: Q_StringValue; data: Object; filter: Object; extra: Object; iState: Q_EnumValue; } & ExprOp; export type OpProjection = { "#id"?: NodeId; [k: string]: any; id?: number; $$createAt$$?: number; $$updateAt$$?: number; $$seq$$?: number; targetEntity?: number; entity?: number; entityId?: number; action?: number; data?: number | Object; filter?: number | Object; extra?: number | Object; iState?: number; } & Partial>; export type OpSortAttr = Partial<{ id: number; $$createAt$$: number; $$seq$$: number; $$updateAt$$: number; targetEntity: number; entity: number; entityId: number; action: number; iState: number; [k: string]: any; } | ExprOp>; export type OpAction = OakMakeAction; export type OpUpdateAction = "update" | ParticularAction | string;