oak-general-business/lib/oak-app-domain/ToDo/_baseSchema.d.ts

74 lines
2.3 KiB
TypeScript

import { JsonProjection } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
import { RelationAction } from "oak-domain/lib/actions/action";
import { Text, String } from "oak-domain/lib/types/DataType";
export type RedirectToProps = {
batchPath: string;
singlePath?: string;
};
export type OpSchema = EntityShape & {
title: Text;
description?: Text | null;
targetEntity: String<32>;
targetFilter: Object;
action: String<32>;
redirectTo: RedirectToProps;
entity: String<32>;
entityId: String<64>;
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;
title: Q_StringValue;
description: Q_StringValue;
targetEntity: Q_StringValue;
targetFilter: Object;
action: Q_StringValue;
redirectTo: JsonFilter<RedirectToProps>;
entity: Q_StringValue;
entityId: Q_StringValue;
iState: Q_EnumValue<IState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
"#id"?: NodeId;
[k: string]: any;
id?: number;
$$createAt$$?: number;
$$updateAt$$?: number;
$$seq$$?: number;
title?: number;
description?: number;
targetEntity?: number;
targetFilter?: number | Object;
action?: number;
redirectTo?: number | JsonProjection<RedirectToProps>;
entity?: number;
entityId?: number;
iState?: number;
} & Partial<ExprOp<OpAttr | string>>;
export type OpSortAttr = Partial<{
id: number;
$$createAt$$: number;
$$seq$$: number;
$$updateAt$$: number;
title: number;
description: number;
targetEntity: number;
action: number;
redirectTo: number;
entity: number;
entityId: number;
iState: number;
[k: string]: any;
} | ExprOp<OpAttr | string>>;
export type OpAction = OakMakeAction<Action | RelationAction | string>;
export type OpUpdateAction = "update" | ParticularAction | string;