oak-domain 5.1.15 → 5.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base-app-domain/ActionAuth/Schema.d.ts +19 -171
- package/lib/base-app-domain/ActionAuth/Schema.js +2 -0
- package/lib/base-app-domain/ActionAuth/_baseSchema.d.ts +44 -0
- package/lib/base-app-domain/ActionAuth/_baseSchema.js +2 -0
- package/lib/base-app-domain/EntityDict.d.ts +695 -14
- package/lib/base-app-domain/I18n/Schema.d.ts +19 -129
- package/lib/base-app-domain/I18n/Schema.js +2 -0
- package/lib/base-app-domain/I18n/_baseSchema.d.ts +51 -0
- package/lib/base-app-domain/I18n/_baseSchema.js +2 -0
- package/lib/base-app-domain/Log/Schema.d.ts +19 -141
- package/lib/base-app-domain/Log/Schema.js +2 -0
- package/lib/base-app-domain/Log/Style.d.ts +2 -2
- package/lib/base-app-domain/Log/_baseSchema.d.ts +44 -0
- package/lib/base-app-domain/Log/_baseSchema.js +2 -0
- package/lib/base-app-domain/Modi/Schema.d.ts +19 -130
- package/lib/base-app-domain/Modi/Schema.js +2 -0
- package/lib/base-app-domain/Modi/Style.d.ts +2 -2
- package/lib/base-app-domain/Modi/_baseSchema.d.ts +61 -0
- package/lib/base-app-domain/Modi/_baseSchema.js +2 -0
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +19 -367
- package/lib/base-app-domain/ModiEntity/Schema.js +2 -0
- package/lib/base-app-domain/ModiEntity/Storage.js +1 -2
- package/lib/base-app-domain/ModiEntity/_baseSchema.d.ts +44 -0
- package/lib/base-app-domain/ModiEntity/_baseSchema.js +2 -0
- package/lib/base-app-domain/Oper/Schema.d.ts +19 -201
- package/lib/base-app-domain/Oper/Schema.js +2 -0
- package/lib/base-app-domain/Oper/Style.d.ts +2 -2
- package/lib/base-app-domain/Oper/_baseSchema.d.ts +67 -0
- package/lib/base-app-domain/Oper/_baseSchema.js +2 -0
- package/lib/base-app-domain/OperEntity/Schema.d.ts +19 -367
- package/lib/base-app-domain/OperEntity/Schema.js +2 -0
- package/lib/base-app-domain/OperEntity/Storage.js +1 -2
- package/lib/base-app-domain/OperEntity/_baseSchema.d.ts +44 -0
- package/lib/base-app-domain/OperEntity/_baseSchema.js +2 -0
- package/lib/base-app-domain/Path/Schema.d.ts +19 -157
- package/lib/base-app-domain/Path/Schema.js +2 -0
- package/lib/base-app-domain/Path/_baseSchema.d.ts +52 -0
- package/lib/base-app-domain/Path/_baseSchema.js +2 -0
- package/lib/base-app-domain/Relation/Schema.d.ts +19 -198
- package/lib/base-app-domain/Relation/Schema.js +2 -0
- package/lib/base-app-domain/Relation/_baseSchema.d.ts +48 -0
- package/lib/base-app-domain/Relation/_baseSchema.js +2 -0
- package/lib/base-app-domain/RelationAuth/Schema.d.ts +19 -199
- package/lib/base-app-domain/RelationAuth/Schema.js +2 -0
- package/lib/base-app-domain/RelationAuth/_baseSchema.d.ts +41 -0
- package/lib/base-app-domain/RelationAuth/_baseSchema.js +2 -0
- package/lib/base-app-domain/User/Schema.d.ts +19 -222
- package/lib/base-app-domain/User/Schema.js +2 -0
- package/lib/base-app-domain/User/Style.d.ts +2 -2
- package/lib/base-app-domain/User/_baseSchema.d.ts +53 -0
- package/lib/base-app-domain/User/_baseSchema.js +2 -0
- package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +19 -264
- package/lib/base-app-domain/UserEntityClaim/Schema.js +2 -0
- package/lib/base-app-domain/UserEntityClaim/_baseSchema.d.ts +49 -0
- package/lib/base-app-domain/UserEntityClaim/_baseSchema.js +2 -0
- package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +19 -136
- package/lib/base-app-domain/UserEntityGrant/Schema.js +2 -0
- package/lib/base-app-domain/UserEntityGrant/_baseSchema.d.ts +46 -0
- package/lib/base-app-domain/UserEntityGrant/_baseSchema.js +2 -0
- package/lib/base-app-domain/UserRelation/Schema.d.ts +19 -212
- package/lib/base-app-domain/UserRelation/Schema.js +2 -0
- package/lib/base-app-domain/UserRelation/_baseSchema.d.ts +47 -0
- package/lib/base-app-domain/UserRelation/_baseSchema.js +2 -0
- package/lib/compiler/localeBuilder.d.ts +1 -0
- package/lib/compiler/localeBuilder.js +9 -2
- package/lib/compiler/schemalBuilder.d.ts +1 -0
- package/lib/compiler/schemalBuilder.js +1368 -186
- package/lib/data/i18n.d.ts +3 -0
- package/lib/data/i18n.js +32 -0
- package/lib/store/CascadeStore.d.ts +3 -3
- package/lib/store/CascadeStore.js +60 -54
- package/lib/store/RelationAuth.d.ts +1 -1
- package/lib/store/RelationAuth.js +6 -6
- package/lib/store/TriggerExecutor.js +11 -5
- package/lib/store/checker.js +4 -4
- package/lib/store/filter.d.ts +11 -11
- package/lib/store/filter.js +14 -8
- package/lib/store/modi.d.ts +2 -2
- package/lib/store/modi.js +72 -70
- package/lib/store/triggers.js +14 -14
- package/lib/timers/vaccum.d.ts +1 -1
- package/lib/types/Auth.d.ts +6 -5
- package/lib/types/Cluster.d.ts +1 -0
- package/lib/types/Configuration.d.ts +9 -0
- package/lib/types/Entity.d.ts +5 -1
- package/lib/types/EntityDesc.d.ts +1 -1
- package/lib/types/Exception.d.ts +26 -21
- package/lib/types/Exception.js +81 -71
- package/lib/types/Expression.d.ts +4 -1
- package/lib/types/Port.d.ts +1 -1
- package/lib/types/Trigger.d.ts +1 -1
- package/lib/types/Watcher.d.ts +3 -3
- package/lib/utils/projection.d.ts +2 -2
- package/lib/utils/relationPath.d.ts +4 -4
- package/lib/utils/relationPath.js +1 -1
- package/lib/utils/row.d.ts +8 -0
- package/lib/utils/row.js +8 -0
- package/lib/utils/validator.d.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
|
|
2
|
+
import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
|
|
3
|
+
import { GenericAction } from "../../actions/action";
|
|
4
|
+
import { String, Boolean } from "../../types/DataType";
|
|
5
|
+
export type OpSchema = EntityShape & {
|
|
6
|
+
destEntity: String<32>;
|
|
7
|
+
value: String<256>;
|
|
8
|
+
recursive: Boolean;
|
|
9
|
+
sourceEntity: String<32>;
|
|
10
|
+
desc?: String<256> | null;
|
|
11
|
+
} & {
|
|
12
|
+
[A in ExpressionKey]?: any;
|
|
13
|
+
};
|
|
14
|
+
export type OpAttr = keyof OpSchema;
|
|
15
|
+
export type OpFilter = {
|
|
16
|
+
id: Q_StringValue;
|
|
17
|
+
$$createAt$$: Q_DateValue;
|
|
18
|
+
$$seq$$: Q_NumberValue;
|
|
19
|
+
$$updateAt$$: Q_DateValue;
|
|
20
|
+
destEntity: Q_StringValue;
|
|
21
|
+
value: Q_StringValue;
|
|
22
|
+
recursive: Q_BooleanValue;
|
|
23
|
+
sourceEntity: Q_StringValue;
|
|
24
|
+
desc: Q_StringValue;
|
|
25
|
+
} & ExprOp<OpAttr | string>;
|
|
26
|
+
export type OpProjection = {
|
|
27
|
+
"#id"?: NodeId;
|
|
28
|
+
[k: string]: any;
|
|
29
|
+
id?: number;
|
|
30
|
+
$$createAt$$?: number;
|
|
31
|
+
$$updateAt$$?: number;
|
|
32
|
+
$$seq$$?: number;
|
|
33
|
+
destEntity?: number;
|
|
34
|
+
value?: number;
|
|
35
|
+
recursive?: number;
|
|
36
|
+
sourceEntity?: number;
|
|
37
|
+
desc?: number;
|
|
38
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
39
|
+
export type OpSortAttr = Partial<{
|
|
40
|
+
id: number;
|
|
41
|
+
$$createAt$$: number;
|
|
42
|
+
$$seq$$: number;
|
|
43
|
+
$$updateAt$$: number;
|
|
44
|
+
destEntity: number;
|
|
45
|
+
value: number;
|
|
46
|
+
recursive: number;
|
|
47
|
+
sourceEntity: number;
|
|
48
|
+
desc: number;
|
|
49
|
+
[k: string]: any;
|
|
50
|
+
} | ExprOp<OpAttr | string>>;
|
|
51
|
+
export type OpAction = OakMakeAction<GenericAction | string>;
|
|
52
|
+
export type OpUpdateAction = "update" | string;
|
|
@@ -1,198 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export type
|
|
19
|
-
type
|
|
20
|
-
type RelationAuth$sourceRelationAggr = "relationAuth$sourceRelation$$aggr" | "relationAuth$sourceRelation$$0$$aggr" | "relationAuth$sourceRelation$$1$$aggr" | "relationAuth$sourceRelation$$2$$aggr" | "relationAuth$sourceRelation$$3$$aggr" | "relationAuth$sourceRelation$$4$$aggr" | "relationAuth$sourceRelation$$5$$aggr" | "relationAuth$sourceRelation$$6$$aggr" | "relationAuth$sourceRelation$$7$$aggr" | "relationAuth$sourceRelation$$8$$aggr" | "relationAuth$sourceRelation$$9$$aggr";
|
|
21
|
-
type RelationAuth$destRelationAggr = "relationAuth$destRelation$$aggr" | "relationAuth$destRelation$$0$$aggr" | "relationAuth$destRelation$$1$$aggr" | "relationAuth$destRelation$$2$$aggr" | "relationAuth$destRelation$$3$$aggr" | "relationAuth$destRelation$$4$$aggr" | "relationAuth$destRelation$$5$$aggr" | "relationAuth$destRelation$$6$$aggr" | "relationAuth$destRelation$$7$$aggr" | "relationAuth$destRelation$$8$$aggr" | "relationAuth$destRelation$$9$$aggr";
|
|
22
|
-
type UserEntityClaim$relationAggr = "userEntityClaim$relation$$aggr" | "userEntityClaim$relation$$0$$aggr" | "userEntityClaim$relation$$1$$aggr" | "userEntityClaim$relation$$2$$aggr" | "userEntityClaim$relation$$3$$aggr" | "userEntityClaim$relation$$4$$aggr" | "userEntityClaim$relation$$5$$aggr" | "userEntityClaim$relation$$6$$aggr" | "userEntityClaim$relation$$7$$aggr" | "userEntityClaim$relation$$8$$aggr" | "userEntityClaim$relation$$9$$aggr";
|
|
23
|
-
type UserRelation$relationAggr = "userRelation$relation$$aggr" | "userRelation$relation$$0$$aggr" | "userRelation$relation$$1$$aggr" | "userRelation$relation$$2$$aggr" | "userRelation$relation$$3$$aggr" | "userRelation$relation$$4$$aggr" | "userRelation$relation$$5$$aggr" | "userRelation$relation$$6$$aggr" | "userRelation$relation$$7$$aggr" | "userRelation$relation$$8$$aggr" | "userRelation$relation$$9$$aggr";
|
|
24
|
-
type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
|
|
25
|
-
type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
|
|
26
|
-
export type Schema = OpSchema & {
|
|
27
|
-
actionAuth$relation?: Array<ActionAuth.Schema>;
|
|
28
|
-
relationAuth$sourceRelation?: Array<RelationAuth.Schema>;
|
|
29
|
-
relationAuth$destRelation?: Array<RelationAuth.Schema>;
|
|
30
|
-
userEntityClaim$relation?: Array<UserEntityClaim.Schema>;
|
|
31
|
-
userRelation$relation?: Array<UserRelation.Schema>;
|
|
32
|
-
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
33
|
-
operEntity$entity?: Array<OperEntity.Schema>;
|
|
34
|
-
} & {
|
|
35
|
-
[A in ExpressionKey]?: any;
|
|
36
|
-
} & {
|
|
37
|
-
[A in ActionAuth$relationAggr]?: AggregationResult<ActionAuth.Schema>;
|
|
38
|
-
} & {
|
|
39
|
-
[A in RelationAuth$sourceRelationAggr]?: AggregationResult<RelationAuth.Schema>;
|
|
40
|
-
} & {
|
|
41
|
-
[A in RelationAuth$destRelationAggr]?: AggregationResult<RelationAuth.Schema>;
|
|
42
|
-
} & {
|
|
43
|
-
[A in UserEntityClaim$relationAggr]?: AggregationResult<UserEntityClaim.Schema>;
|
|
44
|
-
} & {
|
|
45
|
-
[A in UserRelation$relationAggr]?: AggregationResult<UserRelation.Schema>;
|
|
46
|
-
} & {
|
|
47
|
-
[A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
|
|
48
|
-
} & {
|
|
49
|
-
[A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
|
|
50
|
-
};
|
|
51
|
-
type AttrFilter = {
|
|
52
|
-
id: Q_StringValue;
|
|
53
|
-
$$createAt$$: Q_DateValue;
|
|
54
|
-
$$seq$$: Q_NumberValue;
|
|
55
|
-
$$updateAt$$: Q_DateValue;
|
|
56
|
-
entity: Q_StringValue;
|
|
57
|
-
entityId: Q_StringValue;
|
|
58
|
-
name: Q_StringValue;
|
|
59
|
-
display: Q_StringValue;
|
|
60
|
-
actionAuth$relation: ActionAuth.Filter & SubQueryPredicateMetadata;
|
|
61
|
-
relationAuth$sourceRelation: RelationAuth.Filter & SubQueryPredicateMetadata;
|
|
62
|
-
relationAuth$destRelation: RelationAuth.Filter & SubQueryPredicateMetadata;
|
|
63
|
-
userEntityClaim$relation: UserEntityClaim.Filter & SubQueryPredicateMetadata;
|
|
64
|
-
userRelation$relation: UserRelation.Filter & SubQueryPredicateMetadata;
|
|
65
|
-
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
66
|
-
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
67
|
-
};
|
|
68
|
-
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
69
|
-
export type Projection = {
|
|
70
|
-
"#id"?: NodeId;
|
|
71
|
-
[k: string]: any;
|
|
72
|
-
id?: number;
|
|
73
|
-
$$createAt$$?: number;
|
|
74
|
-
$$updateAt$$?: number;
|
|
75
|
-
$$seq$$?: number;
|
|
76
|
-
entity?: number;
|
|
77
|
-
entityId?: number;
|
|
78
|
-
name?: number;
|
|
79
|
-
display?: number;
|
|
80
|
-
actionAuth$relation?: ActionAuth.Selection & {
|
|
81
|
-
$entity: "actionAuth";
|
|
82
|
-
};
|
|
83
|
-
relationAuth$sourceRelation?: RelationAuth.Selection & {
|
|
84
|
-
$entity: "relationAuth";
|
|
85
|
-
};
|
|
86
|
-
relationAuth$destRelation?: RelationAuth.Selection & {
|
|
87
|
-
$entity: "relationAuth";
|
|
88
|
-
};
|
|
89
|
-
userEntityClaim$relation?: UserEntityClaim.Selection & {
|
|
90
|
-
$entity: "userEntityClaim";
|
|
91
|
-
};
|
|
92
|
-
userRelation$relation?: UserRelation.Selection & {
|
|
93
|
-
$entity: "userRelation";
|
|
94
|
-
};
|
|
95
|
-
modiEntity$entity?: ModiEntity.Selection & {
|
|
96
|
-
$entity: "modiEntity";
|
|
97
|
-
};
|
|
98
|
-
operEntity$entity?: OperEntity.Selection & {
|
|
99
|
-
$entity: "operEntity";
|
|
100
|
-
};
|
|
101
|
-
} & Partial<ExprOp<OpAttr | string>> & {
|
|
102
|
-
[A in ActionAuth$relationAggr]?: ActionAuth.Aggregation & {
|
|
103
|
-
$entity: "actionAuth";
|
|
104
|
-
};
|
|
105
|
-
} & {
|
|
106
|
-
[A in RelationAuth$sourceRelationAggr]?: RelationAuth.Aggregation & {
|
|
107
|
-
$entity: "relationAuth";
|
|
108
|
-
};
|
|
109
|
-
} & {
|
|
110
|
-
[A in RelationAuth$destRelationAggr]?: RelationAuth.Aggregation & {
|
|
111
|
-
$entity: "relationAuth";
|
|
112
|
-
};
|
|
113
|
-
} & {
|
|
114
|
-
[A in UserEntityClaim$relationAggr]?: UserEntityClaim.Aggregation & {
|
|
115
|
-
$entity: "userEntityClaim";
|
|
116
|
-
};
|
|
117
|
-
} & {
|
|
118
|
-
[A in UserRelation$relationAggr]?: UserRelation.Aggregation & {
|
|
119
|
-
$entity: "userRelation";
|
|
120
|
-
};
|
|
121
|
-
} & {
|
|
122
|
-
[A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
|
|
123
|
-
$entity: "modiEntity";
|
|
124
|
-
};
|
|
125
|
-
} & {
|
|
126
|
-
[A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
|
|
127
|
-
$entity: "operEntity";
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
type RelationIdProjection = OneOf<{
|
|
131
|
-
id: number;
|
|
132
|
-
}>;
|
|
133
|
-
export type SortAttr = {
|
|
134
|
-
id: number;
|
|
135
|
-
} | {
|
|
136
|
-
$$createAt$$: number;
|
|
137
|
-
} | {
|
|
138
|
-
$$seq$$: number;
|
|
139
|
-
} | {
|
|
140
|
-
$$updateAt$$: number;
|
|
141
|
-
} | {
|
|
142
|
-
entity: number;
|
|
143
|
-
} | {
|
|
144
|
-
entityId: number;
|
|
145
|
-
} | {
|
|
146
|
-
name: number;
|
|
147
|
-
} | {
|
|
148
|
-
display: number;
|
|
149
|
-
} | {
|
|
150
|
-
[k: string]: any;
|
|
151
|
-
} | OneOf<ExprOp<OpAttr | string>>;
|
|
152
|
-
export type SortNode = {
|
|
153
|
-
$attr: SortAttr;
|
|
154
|
-
$direction?: "asc" | "desc";
|
|
155
|
-
};
|
|
156
|
-
export type Sorter = SortNode[];
|
|
157
|
-
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
158
|
-
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
159
|
-
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
160
|
-
export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
|
161
|
-
entity?: string;
|
|
162
|
-
entityId?: string;
|
|
163
|
-
[K: string]: any;
|
|
164
|
-
}) & {
|
|
165
|
-
userEntityClaim$relation?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "relation" | "relationId">, Omit<UserEntityClaim.Filter, "relation" | "relationId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "relation" | "relationId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "relation" | "relationId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "relation" | "relationId">, Omit<UserEntityClaim.Filter, "relation" | "relationId">>>;
|
|
166
|
-
userRelation$relation?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "relation" | "relationId">, Omit<UserRelation.Filter, "relation" | "relationId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "relation" | "relationId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "relation" | "relationId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "relation" | "relationId">, Omit<UserRelation.Filter, "relation" | "relationId">>>;
|
|
167
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
168
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
169
|
-
};
|
|
170
|
-
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
171
|
-
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
172
|
-
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
173
|
-
export type UpdateOperationData = FormUpdateData<OpSchema> & {
|
|
174
|
-
[k: string]: any;
|
|
175
|
-
userEntityClaim$relation?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "relation" | "relationId">, Omit<UserEntityClaim.Filter, "relation" | "relationId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "relation" | "relationId">, Omit<UserEntityClaim.Filter, "relation" | "relationId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "relation" | "relationId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "relation" | "relationId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "relation" | "relationId">, Omit<UserEntityClaim.Filter, "relation" | "relationId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "relation" | "relationId">, Omit<UserEntityClaim.Filter, "relation" | "relationId">>>;
|
|
176
|
-
userRelation$relation?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "relation" | "relationId">, Omit<UserRelation.Filter, "relation" | "relationId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "relation" | "relationId">, Omit<UserRelation.Filter, "relation" | "relationId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "relation" | "relationId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "relation" | "relationId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "relation" | "relationId">, Omit<UserRelation.Filter, "relation" | "relationId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "relation" | "relationId">, Omit<UserRelation.Filter, "relation" | "relationId">>>;
|
|
177
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
178
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
179
|
-
};
|
|
180
|
-
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
181
|
-
export type RemoveOperationData = {};
|
|
182
|
-
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
183
|
-
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
184
|
-
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
|
185
|
-
export type EntityDef = {
|
|
186
|
-
Schema: Schema;
|
|
187
|
-
OpSchema: OpSchema;
|
|
188
|
-
Action: OakMakeAction<GenericAction> | string;
|
|
189
|
-
Selection: Selection;
|
|
190
|
-
Aggregation: Aggregation;
|
|
191
|
-
Operation: Operation;
|
|
192
|
-
Create: CreateOperation;
|
|
193
|
-
Update: UpdateOperation;
|
|
194
|
-
Remove: RemoveOperation;
|
|
195
|
-
CreateSingle: CreateSingleOperation;
|
|
196
|
-
CreateMulti: CreateMultipleOperation;
|
|
197
|
-
};
|
|
198
|
-
export {};
|
|
1
|
+
export * from "./_baseSchema";
|
|
2
|
+
import { Relation } from "../EntityDict";
|
|
3
|
+
export type Schema = Relation["Schema"];
|
|
4
|
+
export type Action = Relation["Action"];
|
|
5
|
+
export type Projection = Relation["Projection"];
|
|
6
|
+
export type Filter = Relation["Filter"];
|
|
7
|
+
export type SortNode = Relation["SortNode"];
|
|
8
|
+
export type Sorter = Relation["Sorter"];
|
|
9
|
+
export type Selection = Relation["Selection"];
|
|
10
|
+
export type Aggregation = Relation["Aggregation"];
|
|
11
|
+
export type CreateOperationData = Relation["CreateOperationData"];
|
|
12
|
+
export type CreateSingle = Relation["CreateSingle"];
|
|
13
|
+
export type CreateMulti = Relation["CreateMulti"];
|
|
14
|
+
export type Create = Relation["Create"];
|
|
15
|
+
export type UpdateOperationData = Relation["UpdateOperationData"];
|
|
16
|
+
export type Update = Relation["Update"];
|
|
17
|
+
export type RemoveOperationData = Relation["RemoveOperationData"];
|
|
18
|
+
export type Remove = Relation["Remove"];
|
|
19
|
+
export type Operation = Relation["Operation"];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
|
|
2
|
+
import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
|
|
3
|
+
import { GenericAction } from "../../actions/action";
|
|
4
|
+
import { String } from "../../types/DataType";
|
|
5
|
+
export type OpSchema = EntityShape & {
|
|
6
|
+
entity: String<32>;
|
|
7
|
+
entityId?: String<64> | null;
|
|
8
|
+
name?: String<32> | null;
|
|
9
|
+
display?: String<32> | null;
|
|
10
|
+
} & {
|
|
11
|
+
[A in ExpressionKey]?: any;
|
|
12
|
+
};
|
|
13
|
+
export type OpAttr = keyof OpSchema;
|
|
14
|
+
export type OpFilter = {
|
|
15
|
+
id: Q_StringValue;
|
|
16
|
+
$$createAt$$: Q_DateValue;
|
|
17
|
+
$$seq$$: Q_NumberValue;
|
|
18
|
+
$$updateAt$$: Q_DateValue;
|
|
19
|
+
entity: Q_StringValue;
|
|
20
|
+
entityId: Q_StringValue;
|
|
21
|
+
name: Q_StringValue;
|
|
22
|
+
display: Q_StringValue;
|
|
23
|
+
} & ExprOp<OpAttr | string>;
|
|
24
|
+
export type OpProjection = {
|
|
25
|
+
"#id"?: NodeId;
|
|
26
|
+
[k: string]: any;
|
|
27
|
+
id?: number;
|
|
28
|
+
$$createAt$$?: number;
|
|
29
|
+
$$updateAt$$?: number;
|
|
30
|
+
$$seq$$?: number;
|
|
31
|
+
entity?: number;
|
|
32
|
+
entityId?: number;
|
|
33
|
+
name?: number;
|
|
34
|
+
display?: number;
|
|
35
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
36
|
+
export type OpSortAttr = Partial<{
|
|
37
|
+
id: number;
|
|
38
|
+
$$createAt$$: number;
|
|
39
|
+
$$seq$$: number;
|
|
40
|
+
$$updateAt$$: number;
|
|
41
|
+
entity: number;
|
|
42
|
+
entityId: number;
|
|
43
|
+
name: number;
|
|
44
|
+
display: number;
|
|
45
|
+
[k: string]: any;
|
|
46
|
+
} | ExprOp<OpAttr | string>>;
|
|
47
|
+
export type OpAction = OakMakeAction<GenericAction | string>;
|
|
48
|
+
export type OpUpdateAction = "update" | string;
|
|
@@ -1,199 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export type
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
path: Path.Schema;
|
|
21
|
-
destRelation: Relation.Schema;
|
|
22
|
-
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
23
|
-
operEntity$entity?: Array<OperEntity.Schema>;
|
|
24
|
-
} & {
|
|
25
|
-
[A in ExpressionKey]?: any;
|
|
26
|
-
} & {
|
|
27
|
-
[A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
|
|
28
|
-
} & {
|
|
29
|
-
[A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
|
|
30
|
-
};
|
|
31
|
-
type AttrFilter = {
|
|
32
|
-
id: Q_StringValue;
|
|
33
|
-
$$createAt$$: Q_DateValue;
|
|
34
|
-
$$seq$$: Q_NumberValue;
|
|
35
|
-
$$updateAt$$: Q_DateValue;
|
|
36
|
-
sourceRelationId: Q_StringValue;
|
|
37
|
-
sourceRelation: Relation.Filter;
|
|
38
|
-
pathId: Q_StringValue;
|
|
39
|
-
path: Path.Filter;
|
|
40
|
-
destRelationId: Q_StringValue;
|
|
41
|
-
destRelation: Relation.Filter;
|
|
42
|
-
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
43
|
-
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
44
|
-
};
|
|
45
|
-
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
46
|
-
export type Projection = {
|
|
47
|
-
"#id"?: NodeId;
|
|
48
|
-
[k: string]: any;
|
|
49
|
-
id?: number;
|
|
50
|
-
$$createAt$$?: number;
|
|
51
|
-
$$updateAt$$?: number;
|
|
52
|
-
$$seq$$?: number;
|
|
53
|
-
sourceRelationId?: number;
|
|
54
|
-
sourceRelation?: Relation.Projection;
|
|
55
|
-
pathId?: number;
|
|
56
|
-
path?: Path.Projection;
|
|
57
|
-
destRelationId?: number;
|
|
58
|
-
destRelation?: Relation.Projection;
|
|
59
|
-
modiEntity$entity?: ModiEntity.Selection & {
|
|
60
|
-
$entity: "modiEntity";
|
|
61
|
-
};
|
|
62
|
-
operEntity$entity?: OperEntity.Selection & {
|
|
63
|
-
$entity: "operEntity";
|
|
64
|
-
};
|
|
65
|
-
} & Partial<ExprOp<OpAttr | string>> & {
|
|
66
|
-
[A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
|
|
67
|
-
$entity: "modiEntity";
|
|
68
|
-
};
|
|
69
|
-
} & {
|
|
70
|
-
[A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
|
|
71
|
-
$entity: "operEntity";
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
type RelationAuthIdProjection = OneOf<{
|
|
75
|
-
id: number;
|
|
76
|
-
}>;
|
|
77
|
-
type RelationIdProjection = OneOf<{
|
|
78
|
-
sourceRelationId: number;
|
|
79
|
-
destRelationId: number;
|
|
80
|
-
}>;
|
|
81
|
-
type PathIdProjection = OneOf<{
|
|
82
|
-
pathId: number;
|
|
83
|
-
}>;
|
|
84
|
-
export type SortAttr = {
|
|
85
|
-
id: number;
|
|
86
|
-
} | {
|
|
87
|
-
$$createAt$$: number;
|
|
88
|
-
} | {
|
|
89
|
-
$$seq$$: number;
|
|
90
|
-
} | {
|
|
91
|
-
$$updateAt$$: number;
|
|
92
|
-
} | {
|
|
93
|
-
sourceRelationId: number;
|
|
94
|
-
} | {
|
|
95
|
-
sourceRelation: Relation.SortAttr;
|
|
96
|
-
} | {
|
|
97
|
-
pathId: number;
|
|
98
|
-
} | {
|
|
99
|
-
path: Path.SortAttr;
|
|
100
|
-
} | {
|
|
101
|
-
destRelationId: number;
|
|
102
|
-
} | {
|
|
103
|
-
destRelation: Relation.SortAttr;
|
|
104
|
-
} | {
|
|
105
|
-
[k: string]: any;
|
|
106
|
-
} | OneOf<ExprOp<OpAttr | string>>;
|
|
107
|
-
export type SortNode = {
|
|
108
|
-
$attr: SortAttr;
|
|
109
|
-
$direction?: "asc" | "desc";
|
|
110
|
-
};
|
|
111
|
-
export type Sorter = SortNode[];
|
|
112
|
-
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
113
|
-
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
114
|
-
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
115
|
-
export type CreateOperationData = FormCreateData<Omit<OpSchema, "sourceRelationId" | "pathId" | "destRelationId">> & (({
|
|
116
|
-
sourceRelationId?: never;
|
|
117
|
-
sourceRelation: Relation.CreateSingleOperation;
|
|
118
|
-
} | {
|
|
119
|
-
sourceRelationId: ForeignKey<"sourceRelation">;
|
|
120
|
-
sourceRelation?: Relation.UpdateOperation;
|
|
121
|
-
} | {
|
|
122
|
-
sourceRelation?: never;
|
|
123
|
-
sourceRelationId: ForeignKey<"sourceRelation">;
|
|
124
|
-
}) & {
|
|
125
|
-
path?: never;
|
|
126
|
-
pathId: ForeignKey<"path">;
|
|
127
|
-
} & ({
|
|
128
|
-
destRelationId?: never;
|
|
129
|
-
destRelation: Relation.CreateSingleOperation;
|
|
130
|
-
} | {
|
|
131
|
-
destRelationId: ForeignKey<"destRelation">;
|
|
132
|
-
destRelation?: Relation.UpdateOperation;
|
|
133
|
-
} | {
|
|
134
|
-
destRelation?: never;
|
|
135
|
-
destRelationId: ForeignKey<"destRelation">;
|
|
136
|
-
})) & {
|
|
137
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
138
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
139
|
-
};
|
|
140
|
-
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
141
|
-
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
142
|
-
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
143
|
-
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "sourceRelationId" | "pathId" | "destRelationId">> & (({
|
|
144
|
-
sourceRelation?: Relation.CreateSingleOperation;
|
|
145
|
-
sourceRelationId?: never;
|
|
146
|
-
} | {
|
|
147
|
-
sourceRelation?: Relation.UpdateOperation;
|
|
148
|
-
sourceRelationId?: never;
|
|
149
|
-
} | {
|
|
150
|
-
sourceRelation?: Relation.RemoveOperation;
|
|
151
|
-
sourceRelationId?: never;
|
|
152
|
-
} | {
|
|
153
|
-
sourceRelation?: never;
|
|
154
|
-
sourceRelationId?: ForeignKey<"sourceRelation">;
|
|
155
|
-
}) & {
|
|
156
|
-
path?: never;
|
|
157
|
-
pathId?: ForeignKey<"path">;
|
|
158
|
-
} & ({
|
|
159
|
-
destRelation?: Relation.CreateSingleOperation;
|
|
160
|
-
destRelationId?: never;
|
|
161
|
-
} | {
|
|
162
|
-
destRelation?: Relation.UpdateOperation;
|
|
163
|
-
destRelationId?: never;
|
|
164
|
-
} | {
|
|
165
|
-
destRelation?: Relation.RemoveOperation;
|
|
166
|
-
destRelationId?: never;
|
|
167
|
-
} | {
|
|
168
|
-
destRelation?: never;
|
|
169
|
-
destRelationId?: ForeignKey<"destRelation">;
|
|
170
|
-
})) & {
|
|
171
|
-
[k: string]: any;
|
|
172
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
173
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
174
|
-
};
|
|
175
|
-
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
176
|
-
export type RemoveOperationData = {} & (({
|
|
177
|
-
sourceRelation?: Relation.UpdateOperation | Relation.RemoveOperation;
|
|
178
|
-
}) & ({
|
|
179
|
-
destRelation?: Relation.UpdateOperation | Relation.RemoveOperation;
|
|
180
|
-
}));
|
|
181
|
-
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
182
|
-
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
183
|
-
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
|
184
|
-
export type PathIdSubQuery = Selection<PathIdProjection>;
|
|
185
|
-
export type RelationAuthIdSubQuery = Selection<RelationAuthIdProjection>;
|
|
186
|
-
export type EntityDef = {
|
|
187
|
-
Schema: Schema;
|
|
188
|
-
OpSchema: OpSchema;
|
|
189
|
-
Action: OakMakeAction<GenericAction> | string;
|
|
190
|
-
Selection: Selection;
|
|
191
|
-
Aggregation: Aggregation;
|
|
192
|
-
Operation: Operation;
|
|
193
|
-
Create: CreateOperation;
|
|
194
|
-
Update: UpdateOperation;
|
|
195
|
-
Remove: RemoveOperation;
|
|
196
|
-
CreateSingle: CreateSingleOperation;
|
|
197
|
-
CreateMulti: CreateMultipleOperation;
|
|
198
|
-
};
|
|
199
|
-
export {};
|
|
1
|
+
export * from "./_baseSchema";
|
|
2
|
+
import { RelationAuth } from "../EntityDict";
|
|
3
|
+
export type Schema = RelationAuth["Schema"];
|
|
4
|
+
export type Action = RelationAuth["Action"];
|
|
5
|
+
export type Projection = RelationAuth["Projection"];
|
|
6
|
+
export type Filter = RelationAuth["Filter"];
|
|
7
|
+
export type SortNode = RelationAuth["SortNode"];
|
|
8
|
+
export type Sorter = RelationAuth["Sorter"];
|
|
9
|
+
export type Selection = RelationAuth["Selection"];
|
|
10
|
+
export type Aggregation = RelationAuth["Aggregation"];
|
|
11
|
+
export type CreateOperationData = RelationAuth["CreateOperationData"];
|
|
12
|
+
export type CreateSingle = RelationAuth["CreateSingle"];
|
|
13
|
+
export type CreateMulti = RelationAuth["CreateMulti"];
|
|
14
|
+
export type Create = RelationAuth["Create"];
|
|
15
|
+
export type UpdateOperationData = RelationAuth["UpdateOperationData"];
|
|
16
|
+
export type Update = RelationAuth["Update"];
|
|
17
|
+
export type RemoveOperationData = RelationAuth["RemoveOperationData"];
|
|
18
|
+
export type Remove = RelationAuth["Remove"];
|
|
19
|
+
export type Operation = RelationAuth["Operation"];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ForeignKey } from "../../types/DataType";
|
|
2
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
|
|
3
|
+
import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
|
|
4
|
+
import { GenericAction } from "../../actions/action";
|
|
5
|
+
export type OpSchema = EntityShape & {
|
|
6
|
+
sourceRelationId: ForeignKey<"relation">;
|
|
7
|
+
pathId: ForeignKey<"path">;
|
|
8
|
+
destRelationId: ForeignKey<"relation">;
|
|
9
|
+
} & {
|
|
10
|
+
[A in ExpressionKey]?: any;
|
|
11
|
+
};
|
|
12
|
+
export type OpAttr = keyof OpSchema;
|
|
13
|
+
export type OpFilter = {
|
|
14
|
+
id: Q_StringValue;
|
|
15
|
+
$$createAt$$: Q_DateValue;
|
|
16
|
+
$$seq$$: Q_NumberValue;
|
|
17
|
+
$$updateAt$$: Q_DateValue;
|
|
18
|
+
sourceRelationId: Q_StringValue;
|
|
19
|
+
pathId: Q_StringValue;
|
|
20
|
+
destRelationId: Q_StringValue;
|
|
21
|
+
} & ExprOp<OpAttr | string>;
|
|
22
|
+
export type OpProjection = {
|
|
23
|
+
"#id"?: NodeId;
|
|
24
|
+
[k: string]: any;
|
|
25
|
+
id?: number;
|
|
26
|
+
$$createAt$$?: number;
|
|
27
|
+
$$updateAt$$?: number;
|
|
28
|
+
$$seq$$?: number;
|
|
29
|
+
sourceRelationId?: number;
|
|
30
|
+
pathId?: number;
|
|
31
|
+
destRelationId?: number;
|
|
32
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
33
|
+
export type OpSortAttr = Partial<{
|
|
34
|
+
id: number;
|
|
35
|
+
$$createAt$$: number;
|
|
36
|
+
$$seq$$: number;
|
|
37
|
+
$$updateAt$$: number;
|
|
38
|
+
[k: string]: any;
|
|
39
|
+
} | ExprOp<OpAttr | string>>;
|
|
40
|
+
export type OpAction = OakMakeAction<GenericAction | string>;
|
|
41
|
+
export type OpUpdateAction = "update" | string;
|