oak-domain 4.1.0 → 4.2.0
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 +185 -185
- package/lib/base-app-domain/ActionDefDict.d.ts +2 -2
- package/lib/base-app-domain/I18n/Schema.d.ts +128 -128
- package/lib/base-app-domain/Modi/Schema.d.ts +135 -135
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +383 -383
- package/lib/base-app-domain/Oper/Schema.d.ts +158 -152
- package/lib/base-app-domain/Oper/Storage.js +19 -1
- package/lib/base-app-domain/OperEntity/Schema.d.ts +372 -372
- package/lib/base-app-domain/Path/Schema.d.ts +148 -148
- package/lib/base-app-domain/Relation/Schema.d.ts +187 -187
- package/lib/base-app-domain/RelationAuth/Schema.d.ts +213 -213
- package/lib/base-app-domain/User/Action.d.ts +1 -0
- package/lib/base-app-domain/User/Action.js +3 -3
- package/lib/base-app-domain/User/Schema.d.ts +209 -209
- package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +263 -263
- package/lib/base-app-domain/UserEntityGrant/Action.d.ts +5 -5
- package/lib/base-app-domain/UserEntityGrant/Action.js +5 -5
- package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +130 -130
- package/lib/base-app-domain/UserRelation/Schema.d.ts +207 -207
- package/lib/compiler/localeBuilder.d.ts +27 -27
- package/lib/compiler/localeBuilder.js +215 -215
- package/lib/compiler/routerBuilder.js +263 -263
- package/lib/compiler/schemalBuilder.js +4167 -4160
- package/lib/entities/Oper.d.ts +2 -1
- package/lib/entities/Oper.js +16 -1
- package/lib/entities/User.d.ts +10 -0
- package/lib/entities/User.js +3 -2
- package/lib/index.d.ts +0 -22
- package/lib/index.js +1 -35
- package/lib/store/AsyncRowStore.d.ts +66 -65
- package/lib/store/AsyncRowStore.js +180 -180
- package/lib/store/CascadeStore.js +7 -31
- package/lib/store/RelationAuth.d.ts +103 -103
- package/lib/store/RelationAuth.js +1209 -1343
- package/lib/store/SyncRowStore.d.ts +29 -29
- package/lib/store/TriggerExecutor.js +468 -468
- package/lib/store/actionDef.js +278 -278
- package/lib/store/checker.js +487 -487
- package/lib/triggers/index.d.ts +2 -2
- package/lib/triggers/index.js +21 -1
- package/lib/types/Aspect.d.ts +13 -13
- package/lib/types/Configuration.d.ts +42 -0
- package/lib/types/Configuration.js +3 -0
- package/lib/types/Connector.d.ts +38 -38
- package/lib/types/Context.d.ts +7 -7
- package/lib/types/Entity.d.ts +4 -4
- package/lib/types/Environment.d.ts +93 -93
- package/lib/types/Exception.d.ts +155 -155
- package/lib/types/Exception.js +436 -436
- package/lib/types/Sync.d.ts +48 -0
- package/lib/types/Sync.js +8 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/SimpleConnector.d.ts +64 -64
- package/lib/utils/SimpleConnector.js +206 -206
- package/lib/utils/assert.d.ts +5 -5
- package/lib/utils/projection.d.ts +1 -1
- package/lib/utils/relationPath.d.ts +31 -0
- package/lib/utils/relationPath.js +202 -0
- package/package.json +51 -51
- package/src/entities/ActionAuth.ts +41 -41
- package/src/entities/I18n.ts +45 -45
- package/src/entities/Modi.ts +69 -69
- package/src/entities/ModiEntity.ts +26 -26
- package/src/entities/Oper.ts +48 -32
- package/src/entities/OperEntity.ts +27 -27
- package/src/entities/Path.ts +43 -43
- package/src/entities/Relation.ts +43 -43
- package/src/entities/RelationAuth.ts +44 -44
- package/src/entities/User.ts +48 -48
- package/src/entities/UserEntityClaim.ts +29 -29
- package/src/entities/UserEntityGrant.ts +24 -24
- package/src/entities/UserRelation.ts +50 -50
|
@@ -1,185 +1,185 @@
|
|
|
1
|
-
import { ForeignKey, JsonProjection } from "../../types/DataType";
|
|
2
|
-
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, JsonFilter, SubQueryPredicateMetadata } from "../../types/Demand";
|
|
3
|
-
import { OneOf } from "../../types/Polyfill";
|
|
4
|
-
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "../../types/Entity";
|
|
5
|
-
import { GenericAction } from "../../actions/action";
|
|
6
|
-
import * as Relation from "../Relation/Schema";
|
|
7
|
-
import * as Path from "../Path/Schema";
|
|
8
|
-
import * as ModiEntity from "../ModiEntity/Schema";
|
|
9
|
-
import * as OperEntity from "../OperEntity/Schema";
|
|
10
|
-
type Actions = string[];
|
|
11
|
-
export type OpSchema = EntityShape & {
|
|
12
|
-
relationId?: ForeignKey<"relation"> | null;
|
|
13
|
-
pathId: ForeignKey<"path">;
|
|
14
|
-
deActions: Actions;
|
|
15
|
-
};
|
|
16
|
-
export type OpAttr = keyof OpSchema;
|
|
17
|
-
export type Schema = EntityShape & {
|
|
18
|
-
relationId?: ForeignKey<"relation"> | null;
|
|
19
|
-
pathId: ForeignKey<"path">;
|
|
20
|
-
deActions: Actions;
|
|
21
|
-
relation?: Relation.Schema | null;
|
|
22
|
-
path: Path.Schema;
|
|
23
|
-
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
24
|
-
modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
|
|
25
|
-
operEntity$entity?: Array<OperEntity.Schema>;
|
|
26
|
-
operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
|
|
27
|
-
} & {
|
|
28
|
-
[A in ExpressionKey]?: any;
|
|
29
|
-
};
|
|
30
|
-
type AttrFilter = {
|
|
31
|
-
id: Q_StringValue;
|
|
32
|
-
$$createAt$$: Q_DateValue;
|
|
33
|
-
$$seq$$: Q_NumberValue;
|
|
34
|
-
$$updateAt$$: Q_DateValue;
|
|
35
|
-
relationId: Q_StringValue;
|
|
36
|
-
relation: Relation.Filter;
|
|
37
|
-
pathId: Q_StringValue;
|
|
38
|
-
path: Path.Filter;
|
|
39
|
-
deActions: JsonFilter<Actions>;
|
|
40
|
-
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
41
|
-
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
42
|
-
};
|
|
43
|
-
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
44
|
-
export type Projection = {
|
|
45
|
-
"#id"?: NodeId;
|
|
46
|
-
[k: string]: any;
|
|
47
|
-
id?: number;
|
|
48
|
-
$$createAt$$?: number;
|
|
49
|
-
$$updateAt$$?: number;
|
|
50
|
-
$$seq$$?: number;
|
|
51
|
-
relationId?: number;
|
|
52
|
-
relation?: Relation.Projection;
|
|
53
|
-
pathId?: number;
|
|
54
|
-
path?: Path.Projection;
|
|
55
|
-
deActions?: number | JsonProjection<Actions>;
|
|
56
|
-
modiEntity$entity?: ModiEntity.Selection & {
|
|
57
|
-
$entity: "modiEntity";
|
|
58
|
-
};
|
|
59
|
-
modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
|
|
60
|
-
$entity: "modiEntity";
|
|
61
|
-
};
|
|
62
|
-
operEntity$entity?: OperEntity.Selection & {
|
|
63
|
-
$entity: "operEntity";
|
|
64
|
-
};
|
|
65
|
-
operEntity$entity$$aggr?: OperEntity.Aggregation & {
|
|
66
|
-
$entity: "operEntity";
|
|
67
|
-
};
|
|
68
|
-
} & Partial<ExprOp<OpAttr | string>>;
|
|
69
|
-
type ActionAuthIdProjection = OneOf<{
|
|
70
|
-
id: number;
|
|
71
|
-
}>;
|
|
72
|
-
type RelationIdProjection = OneOf<{
|
|
73
|
-
relationId: number;
|
|
74
|
-
}>;
|
|
75
|
-
type PathIdProjection = OneOf<{
|
|
76
|
-
pathId: number;
|
|
77
|
-
}>;
|
|
78
|
-
export type SortAttr = {
|
|
79
|
-
id: number;
|
|
80
|
-
} | {
|
|
81
|
-
$$createAt$$: number;
|
|
82
|
-
} | {
|
|
83
|
-
$$seq$$: number;
|
|
84
|
-
} | {
|
|
85
|
-
$$updateAt$$: number;
|
|
86
|
-
} | {
|
|
87
|
-
relationId: number;
|
|
88
|
-
} | {
|
|
89
|
-
relation: Relation.SortAttr;
|
|
90
|
-
} | {
|
|
91
|
-
pathId: number;
|
|
92
|
-
} | {
|
|
93
|
-
path: Path.SortAttr;
|
|
94
|
-
} | {
|
|
95
|
-
deActions: number;
|
|
96
|
-
} | {
|
|
97
|
-
[k: string]: any;
|
|
98
|
-
} | OneOf<ExprOp<OpAttr | string>>;
|
|
99
|
-
export type SortNode = {
|
|
100
|
-
$attr: SortAttr;
|
|
101
|
-
$direction?: "asc" | "desc";
|
|
102
|
-
};
|
|
103
|
-
export type Sorter = SortNode[];
|
|
104
|
-
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
105
|
-
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
106
|
-
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
107
|
-
export type CreateOperationData = FormCreateData<Omit<OpSchema, "relationId" | "pathId">> & (({
|
|
108
|
-
relationId?: never;
|
|
109
|
-
relation?: Relation.CreateSingleOperation;
|
|
110
|
-
} | {
|
|
111
|
-
relationId: ForeignKey<"relation">;
|
|
112
|
-
relation?: Relation.UpdateOperation;
|
|
113
|
-
} | {
|
|
114
|
-
relation?: never;
|
|
115
|
-
relationId?: ForeignKey<"relation">;
|
|
116
|
-
}) & ({
|
|
117
|
-
pathId?: never;
|
|
118
|
-
path: Path.CreateSingleOperation;
|
|
119
|
-
} | {
|
|
120
|
-
pathId: ForeignKey<"path">;
|
|
121
|
-
path?: Path.UpdateOperation;
|
|
122
|
-
} | {
|
|
123
|
-
path?: never;
|
|
124
|
-
pathId: ForeignKey<"path">;
|
|
125
|
-
})) & {
|
|
126
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
127
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
128
|
-
};
|
|
129
|
-
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
130
|
-
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
131
|
-
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
132
|
-
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "relationId" | "pathId">> & (({
|
|
133
|
-
relation?: Relation.CreateSingleOperation;
|
|
134
|
-
relationId?: never;
|
|
135
|
-
} | {
|
|
136
|
-
relation?: Relation.UpdateOperation;
|
|
137
|
-
relationId?: never;
|
|
138
|
-
} | {
|
|
139
|
-
relation?: Relation.RemoveOperation;
|
|
140
|
-
relationId?: never;
|
|
141
|
-
} | {
|
|
142
|
-
relation?: never;
|
|
143
|
-
relationId?: ForeignKey<"relation"> | null;
|
|
144
|
-
}) & ({
|
|
145
|
-
path?: Path.CreateSingleOperation;
|
|
146
|
-
pathId?: never;
|
|
147
|
-
} | {
|
|
148
|
-
path?: Path.UpdateOperation;
|
|
149
|
-
pathId?: never;
|
|
150
|
-
} | {
|
|
151
|
-
path?: Path.RemoveOperation;
|
|
152
|
-
pathId?: never;
|
|
153
|
-
} | {
|
|
154
|
-
path?: never;
|
|
155
|
-
pathId?: ForeignKey<"path">;
|
|
156
|
-
})) & {
|
|
157
|
-
[k: string]: any;
|
|
158
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
159
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
160
|
-
};
|
|
161
|
-
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
162
|
-
export type RemoveOperationData = {} & (({
|
|
163
|
-
relation?: Relation.UpdateOperation | Relation.RemoveOperation;
|
|
164
|
-
}) & ({
|
|
165
|
-
path?: Path.UpdateOperation | Path.RemoveOperation;
|
|
166
|
-
}));
|
|
167
|
-
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
168
|
-
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
169
|
-
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
|
170
|
-
export type PathIdSubQuery = Selection<PathIdProjection>;
|
|
171
|
-
export type ActionAuthIdSubQuery = Selection<ActionAuthIdProjection>;
|
|
172
|
-
export type EntityDef = {
|
|
173
|
-
Schema: Schema;
|
|
174
|
-
OpSchema: OpSchema;
|
|
175
|
-
Action: OakMakeAction<GenericAction> | string;
|
|
176
|
-
Selection: Selection;
|
|
177
|
-
Aggregation: Aggregation;
|
|
178
|
-
Operation: Operation;
|
|
179
|
-
Create: CreateOperation;
|
|
180
|
-
Update: UpdateOperation;
|
|
181
|
-
Remove: RemoveOperation;
|
|
182
|
-
CreateSingle: CreateSingleOperation;
|
|
183
|
-
CreateMulti: CreateMultipleOperation;
|
|
184
|
-
};
|
|
185
|
-
export {};
|
|
1
|
+
import { ForeignKey, JsonProjection } from "../../types/DataType";
|
|
2
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, JsonFilter, SubQueryPredicateMetadata } from "../../types/Demand";
|
|
3
|
+
import { OneOf } from "../../types/Polyfill";
|
|
4
|
+
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "../../types/Entity";
|
|
5
|
+
import { GenericAction } from "../../actions/action";
|
|
6
|
+
import * as Relation from "../Relation/Schema";
|
|
7
|
+
import * as Path from "../Path/Schema";
|
|
8
|
+
import * as ModiEntity from "../ModiEntity/Schema";
|
|
9
|
+
import * as OperEntity from "../OperEntity/Schema";
|
|
10
|
+
type Actions = string[];
|
|
11
|
+
export type OpSchema = EntityShape & {
|
|
12
|
+
relationId?: ForeignKey<"relation"> | null;
|
|
13
|
+
pathId: ForeignKey<"path">;
|
|
14
|
+
deActions: Actions;
|
|
15
|
+
};
|
|
16
|
+
export type OpAttr = keyof OpSchema;
|
|
17
|
+
export type Schema = EntityShape & {
|
|
18
|
+
relationId?: ForeignKey<"relation"> | null;
|
|
19
|
+
pathId: ForeignKey<"path">;
|
|
20
|
+
deActions: Actions;
|
|
21
|
+
relation?: Relation.Schema | null;
|
|
22
|
+
path: Path.Schema;
|
|
23
|
+
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
24
|
+
modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
|
|
25
|
+
operEntity$entity?: Array<OperEntity.Schema>;
|
|
26
|
+
operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
|
|
27
|
+
} & {
|
|
28
|
+
[A in ExpressionKey]?: any;
|
|
29
|
+
};
|
|
30
|
+
type AttrFilter = {
|
|
31
|
+
id: Q_StringValue;
|
|
32
|
+
$$createAt$$: Q_DateValue;
|
|
33
|
+
$$seq$$: Q_NumberValue;
|
|
34
|
+
$$updateAt$$: Q_DateValue;
|
|
35
|
+
relationId: Q_StringValue;
|
|
36
|
+
relation: Relation.Filter;
|
|
37
|
+
pathId: Q_StringValue;
|
|
38
|
+
path: Path.Filter;
|
|
39
|
+
deActions: JsonFilter<Actions>;
|
|
40
|
+
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
41
|
+
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
42
|
+
};
|
|
43
|
+
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
44
|
+
export type Projection = {
|
|
45
|
+
"#id"?: NodeId;
|
|
46
|
+
[k: string]: any;
|
|
47
|
+
id?: number;
|
|
48
|
+
$$createAt$$?: number;
|
|
49
|
+
$$updateAt$$?: number;
|
|
50
|
+
$$seq$$?: number;
|
|
51
|
+
relationId?: number;
|
|
52
|
+
relation?: Relation.Projection;
|
|
53
|
+
pathId?: number;
|
|
54
|
+
path?: Path.Projection;
|
|
55
|
+
deActions?: number | JsonProjection<Actions>;
|
|
56
|
+
modiEntity$entity?: ModiEntity.Selection & {
|
|
57
|
+
$entity: "modiEntity";
|
|
58
|
+
};
|
|
59
|
+
modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
|
|
60
|
+
$entity: "modiEntity";
|
|
61
|
+
};
|
|
62
|
+
operEntity$entity?: OperEntity.Selection & {
|
|
63
|
+
$entity: "operEntity";
|
|
64
|
+
};
|
|
65
|
+
operEntity$entity$$aggr?: OperEntity.Aggregation & {
|
|
66
|
+
$entity: "operEntity";
|
|
67
|
+
};
|
|
68
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
69
|
+
type ActionAuthIdProjection = OneOf<{
|
|
70
|
+
id: number;
|
|
71
|
+
}>;
|
|
72
|
+
type RelationIdProjection = OneOf<{
|
|
73
|
+
relationId: number;
|
|
74
|
+
}>;
|
|
75
|
+
type PathIdProjection = OneOf<{
|
|
76
|
+
pathId: number;
|
|
77
|
+
}>;
|
|
78
|
+
export type SortAttr = {
|
|
79
|
+
id: number;
|
|
80
|
+
} | {
|
|
81
|
+
$$createAt$$: number;
|
|
82
|
+
} | {
|
|
83
|
+
$$seq$$: number;
|
|
84
|
+
} | {
|
|
85
|
+
$$updateAt$$: number;
|
|
86
|
+
} | {
|
|
87
|
+
relationId: number;
|
|
88
|
+
} | {
|
|
89
|
+
relation: Relation.SortAttr;
|
|
90
|
+
} | {
|
|
91
|
+
pathId: number;
|
|
92
|
+
} | {
|
|
93
|
+
path: Path.SortAttr;
|
|
94
|
+
} | {
|
|
95
|
+
deActions: number;
|
|
96
|
+
} | {
|
|
97
|
+
[k: string]: any;
|
|
98
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
99
|
+
export type SortNode = {
|
|
100
|
+
$attr: SortAttr;
|
|
101
|
+
$direction?: "asc" | "desc";
|
|
102
|
+
};
|
|
103
|
+
export type Sorter = SortNode[];
|
|
104
|
+
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
105
|
+
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
106
|
+
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
107
|
+
export type CreateOperationData = FormCreateData<Omit<OpSchema, "relationId" | "pathId">> & (({
|
|
108
|
+
relationId?: never;
|
|
109
|
+
relation?: Relation.CreateSingleOperation;
|
|
110
|
+
} | {
|
|
111
|
+
relationId: ForeignKey<"relation">;
|
|
112
|
+
relation?: Relation.UpdateOperation;
|
|
113
|
+
} | {
|
|
114
|
+
relation?: never;
|
|
115
|
+
relationId?: ForeignKey<"relation">;
|
|
116
|
+
}) & ({
|
|
117
|
+
pathId?: never;
|
|
118
|
+
path: Path.CreateSingleOperation;
|
|
119
|
+
} | {
|
|
120
|
+
pathId: ForeignKey<"path">;
|
|
121
|
+
path?: Path.UpdateOperation;
|
|
122
|
+
} | {
|
|
123
|
+
path?: never;
|
|
124
|
+
pathId: ForeignKey<"path">;
|
|
125
|
+
})) & {
|
|
126
|
+
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
127
|
+
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
128
|
+
};
|
|
129
|
+
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
130
|
+
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
131
|
+
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
132
|
+
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "relationId" | "pathId">> & (({
|
|
133
|
+
relation?: Relation.CreateSingleOperation;
|
|
134
|
+
relationId?: never;
|
|
135
|
+
} | {
|
|
136
|
+
relation?: Relation.UpdateOperation;
|
|
137
|
+
relationId?: never;
|
|
138
|
+
} | {
|
|
139
|
+
relation?: Relation.RemoveOperation;
|
|
140
|
+
relationId?: never;
|
|
141
|
+
} | {
|
|
142
|
+
relation?: never;
|
|
143
|
+
relationId?: ForeignKey<"relation"> | null;
|
|
144
|
+
}) & ({
|
|
145
|
+
path?: Path.CreateSingleOperation;
|
|
146
|
+
pathId?: never;
|
|
147
|
+
} | {
|
|
148
|
+
path?: Path.UpdateOperation;
|
|
149
|
+
pathId?: never;
|
|
150
|
+
} | {
|
|
151
|
+
path?: Path.RemoveOperation;
|
|
152
|
+
pathId?: never;
|
|
153
|
+
} | {
|
|
154
|
+
path?: never;
|
|
155
|
+
pathId?: ForeignKey<"path">;
|
|
156
|
+
})) & {
|
|
157
|
+
[k: string]: any;
|
|
158
|
+
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
159
|
+
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
160
|
+
};
|
|
161
|
+
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
162
|
+
export type RemoveOperationData = {} & (({
|
|
163
|
+
relation?: Relation.UpdateOperation | Relation.RemoveOperation;
|
|
164
|
+
}) & ({
|
|
165
|
+
path?: Path.UpdateOperation | Path.RemoveOperation;
|
|
166
|
+
}));
|
|
167
|
+
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
168
|
+
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
169
|
+
export type RelationIdSubQuery = Selection<RelationIdProjection>;
|
|
170
|
+
export type PathIdSubQuery = Selection<PathIdProjection>;
|
|
171
|
+
export type ActionAuthIdSubQuery = Selection<ActionAuthIdProjection>;
|
|
172
|
+
export type EntityDef = {
|
|
173
|
+
Schema: Schema;
|
|
174
|
+
OpSchema: OpSchema;
|
|
175
|
+
Action: OakMakeAction<GenericAction> | string;
|
|
176
|
+
Selection: Selection;
|
|
177
|
+
Aggregation: Aggregation;
|
|
178
|
+
Operation: Operation;
|
|
179
|
+
Create: CreateOperation;
|
|
180
|
+
Update: UpdateOperation;
|
|
181
|
+
Remove: RemoveOperation;
|
|
182
|
+
CreateSingle: CreateSingleOperation;
|
|
183
|
+
CreateMulti: CreateMultipleOperation;
|
|
184
|
+
};
|
|
185
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const ActionDefDict: {
|
|
2
2
|
modi: {
|
|
3
|
-
iState: import("
|
|
3
|
+
iState: import("../types").ActionDef<string, string>;
|
|
4
4
|
};
|
|
5
5
|
user: {
|
|
6
|
-
userState: import("
|
|
6
|
+
userState: import("../types").ActionDef<string, string>;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "../../types/Demand";
|
|
2
|
-
import { OneOf } from "../../types/Polyfill";
|
|
3
|
-
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "../../types/Entity";
|
|
4
|
-
import { GenericAction } from "../../actions/action";
|
|
5
|
-
import { String } from "../../types/DataType";
|
|
6
|
-
import * as ModiEntity from "../ModiEntity/Schema";
|
|
7
|
-
import * as OperEntity from "../OperEntity/Schema";
|
|
8
|
-
export type OpSchema = EntityShape & {
|
|
9
|
-
module: String<64>;
|
|
10
|
-
position: String<188>;
|
|
11
|
-
namespace: String<256>;
|
|
12
|
-
language: String<32>;
|
|
13
|
-
data: Object;
|
|
14
|
-
};
|
|
15
|
-
export type OpAttr = keyof OpSchema;
|
|
16
|
-
export type Schema = EntityShape & {
|
|
17
|
-
module: String<64>;
|
|
18
|
-
position: String<188>;
|
|
19
|
-
namespace: String<256>;
|
|
20
|
-
language: String<32>;
|
|
21
|
-
data: Object;
|
|
22
|
-
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
23
|
-
modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
|
|
24
|
-
operEntity$entity?: Array<OperEntity.Schema>;
|
|
25
|
-
operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
|
|
26
|
-
} & {
|
|
27
|
-
[A in ExpressionKey]?: any;
|
|
28
|
-
};
|
|
29
|
-
type AttrFilter = {
|
|
30
|
-
id: Q_StringValue;
|
|
31
|
-
$$createAt$$: Q_DateValue;
|
|
32
|
-
$$seq$$: Q_NumberValue;
|
|
33
|
-
$$updateAt$$: Q_DateValue;
|
|
34
|
-
module: Q_StringValue;
|
|
35
|
-
position: Q_StringValue;
|
|
36
|
-
namespace: Q_StringValue;
|
|
37
|
-
language: Q_StringValue;
|
|
38
|
-
data: Object;
|
|
39
|
-
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
40
|
-
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
41
|
-
};
|
|
42
|
-
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
43
|
-
export type Projection = {
|
|
44
|
-
"#id"?: NodeId;
|
|
45
|
-
[k: string]: any;
|
|
46
|
-
id?: number;
|
|
47
|
-
$$createAt$$?: number;
|
|
48
|
-
$$updateAt$$?: number;
|
|
49
|
-
$$seq$$?: number;
|
|
50
|
-
module?: number;
|
|
51
|
-
position?: number;
|
|
52
|
-
namespace?: number;
|
|
53
|
-
language?: number;
|
|
54
|
-
data?: number | Object;
|
|
55
|
-
modiEntity$entity?: ModiEntity.Selection & {
|
|
56
|
-
$entity: "modiEntity";
|
|
57
|
-
};
|
|
58
|
-
modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
|
|
59
|
-
$entity: "modiEntity";
|
|
60
|
-
};
|
|
61
|
-
operEntity$entity?: OperEntity.Selection & {
|
|
62
|
-
$entity: "operEntity";
|
|
63
|
-
};
|
|
64
|
-
operEntity$entity$$aggr?: OperEntity.Aggregation & {
|
|
65
|
-
$entity: "operEntity";
|
|
66
|
-
};
|
|
67
|
-
} & Partial<ExprOp<OpAttr | string>>;
|
|
68
|
-
type I18nIdProjection = OneOf<{
|
|
69
|
-
id: number;
|
|
70
|
-
}>;
|
|
71
|
-
export type SortAttr = {
|
|
72
|
-
id: number;
|
|
73
|
-
} | {
|
|
74
|
-
$$createAt$$: number;
|
|
75
|
-
} | {
|
|
76
|
-
$$seq$$: number;
|
|
77
|
-
} | {
|
|
78
|
-
$$updateAt$$: number;
|
|
79
|
-
} | {
|
|
80
|
-
module: number;
|
|
81
|
-
} | {
|
|
82
|
-
position: number;
|
|
83
|
-
} | {
|
|
84
|
-
namespace: number;
|
|
85
|
-
} | {
|
|
86
|
-
language: number;
|
|
87
|
-
} | {
|
|
88
|
-
[k: string]: any;
|
|
89
|
-
} | OneOf<ExprOp<OpAttr | string>>;
|
|
90
|
-
export type SortNode = {
|
|
91
|
-
$attr: SortAttr;
|
|
92
|
-
$direction?: "asc" | "desc";
|
|
93
|
-
};
|
|
94
|
-
export type Sorter = SortNode[];
|
|
95
|
-
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
96
|
-
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
97
|
-
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
98
|
-
export type CreateOperationData = FormCreateData<OpSchema> & {
|
|
99
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
100
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
101
|
-
};
|
|
102
|
-
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
103
|
-
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
104
|
-
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
105
|
-
export type UpdateOperationData = FormUpdateData<OpSchema> & {
|
|
106
|
-
[k: string]: any;
|
|
107
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
108
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
109
|
-
};
|
|
110
|
-
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
111
|
-
export type RemoveOperationData = {};
|
|
112
|
-
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
113
|
-
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
114
|
-
export type I18nIdSubQuery = Selection<I18nIdProjection>;
|
|
115
|
-
export type EntityDef = {
|
|
116
|
-
Schema: Schema;
|
|
117
|
-
OpSchema: OpSchema;
|
|
118
|
-
Action: OakMakeAction<GenericAction> | string;
|
|
119
|
-
Selection: Selection;
|
|
120
|
-
Aggregation: Aggregation;
|
|
121
|
-
Operation: Operation;
|
|
122
|
-
Create: CreateOperation;
|
|
123
|
-
Update: UpdateOperation;
|
|
124
|
-
Remove: RemoveOperation;
|
|
125
|
-
CreateSingle: CreateSingleOperation;
|
|
126
|
-
CreateMulti: CreateMultipleOperation;
|
|
127
|
-
};
|
|
128
|
-
export {};
|
|
1
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "../../types/Demand";
|
|
2
|
+
import { OneOf } from "../../types/Polyfill";
|
|
3
|
+
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "../../types/Entity";
|
|
4
|
+
import { GenericAction } from "../../actions/action";
|
|
5
|
+
import { String } from "../../types/DataType";
|
|
6
|
+
import * as ModiEntity from "../ModiEntity/Schema";
|
|
7
|
+
import * as OperEntity from "../OperEntity/Schema";
|
|
8
|
+
export type OpSchema = EntityShape & {
|
|
9
|
+
module: String<64>;
|
|
10
|
+
position: String<188>;
|
|
11
|
+
namespace: String<256>;
|
|
12
|
+
language: String<32>;
|
|
13
|
+
data: Object;
|
|
14
|
+
};
|
|
15
|
+
export type OpAttr = keyof OpSchema;
|
|
16
|
+
export type Schema = EntityShape & {
|
|
17
|
+
module: String<64>;
|
|
18
|
+
position: String<188>;
|
|
19
|
+
namespace: String<256>;
|
|
20
|
+
language: String<32>;
|
|
21
|
+
data: Object;
|
|
22
|
+
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
23
|
+
modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
|
|
24
|
+
operEntity$entity?: Array<OperEntity.Schema>;
|
|
25
|
+
operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
|
|
26
|
+
} & {
|
|
27
|
+
[A in ExpressionKey]?: any;
|
|
28
|
+
};
|
|
29
|
+
type AttrFilter = {
|
|
30
|
+
id: Q_StringValue;
|
|
31
|
+
$$createAt$$: Q_DateValue;
|
|
32
|
+
$$seq$$: Q_NumberValue;
|
|
33
|
+
$$updateAt$$: Q_DateValue;
|
|
34
|
+
module: Q_StringValue;
|
|
35
|
+
position: Q_StringValue;
|
|
36
|
+
namespace: Q_StringValue;
|
|
37
|
+
language: Q_StringValue;
|
|
38
|
+
data: Object;
|
|
39
|
+
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
40
|
+
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
41
|
+
};
|
|
42
|
+
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
43
|
+
export type Projection = {
|
|
44
|
+
"#id"?: NodeId;
|
|
45
|
+
[k: string]: any;
|
|
46
|
+
id?: number;
|
|
47
|
+
$$createAt$$?: number;
|
|
48
|
+
$$updateAt$$?: number;
|
|
49
|
+
$$seq$$?: number;
|
|
50
|
+
module?: number;
|
|
51
|
+
position?: number;
|
|
52
|
+
namespace?: number;
|
|
53
|
+
language?: number;
|
|
54
|
+
data?: number | Object;
|
|
55
|
+
modiEntity$entity?: ModiEntity.Selection & {
|
|
56
|
+
$entity: "modiEntity";
|
|
57
|
+
};
|
|
58
|
+
modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
|
|
59
|
+
$entity: "modiEntity";
|
|
60
|
+
};
|
|
61
|
+
operEntity$entity?: OperEntity.Selection & {
|
|
62
|
+
$entity: "operEntity";
|
|
63
|
+
};
|
|
64
|
+
operEntity$entity$$aggr?: OperEntity.Aggregation & {
|
|
65
|
+
$entity: "operEntity";
|
|
66
|
+
};
|
|
67
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
68
|
+
type I18nIdProjection = OneOf<{
|
|
69
|
+
id: number;
|
|
70
|
+
}>;
|
|
71
|
+
export type SortAttr = {
|
|
72
|
+
id: number;
|
|
73
|
+
} | {
|
|
74
|
+
$$createAt$$: number;
|
|
75
|
+
} | {
|
|
76
|
+
$$seq$$: number;
|
|
77
|
+
} | {
|
|
78
|
+
$$updateAt$$: number;
|
|
79
|
+
} | {
|
|
80
|
+
module: number;
|
|
81
|
+
} | {
|
|
82
|
+
position: number;
|
|
83
|
+
} | {
|
|
84
|
+
namespace: number;
|
|
85
|
+
} | {
|
|
86
|
+
language: number;
|
|
87
|
+
} | {
|
|
88
|
+
[k: string]: any;
|
|
89
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
90
|
+
export type SortNode = {
|
|
91
|
+
$attr: SortAttr;
|
|
92
|
+
$direction?: "asc" | "desc";
|
|
93
|
+
};
|
|
94
|
+
export type Sorter = SortNode[];
|
|
95
|
+
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
96
|
+
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
97
|
+
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
98
|
+
export type CreateOperationData = FormCreateData<OpSchema> & {
|
|
99
|
+
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
100
|
+
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
101
|
+
};
|
|
102
|
+
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
103
|
+
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
104
|
+
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
105
|
+
export type UpdateOperationData = FormUpdateData<OpSchema> & {
|
|
106
|
+
[k: string]: any;
|
|
107
|
+
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
108
|
+
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
109
|
+
};
|
|
110
|
+
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
111
|
+
export type RemoveOperationData = {};
|
|
112
|
+
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
113
|
+
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
114
|
+
export type I18nIdSubQuery = Selection<I18nIdProjection>;
|
|
115
|
+
export type EntityDef = {
|
|
116
|
+
Schema: Schema;
|
|
117
|
+
OpSchema: OpSchema;
|
|
118
|
+
Action: OakMakeAction<GenericAction> | string;
|
|
119
|
+
Selection: Selection;
|
|
120
|
+
Aggregation: Aggregation;
|
|
121
|
+
Operation: Operation;
|
|
122
|
+
Create: CreateOperation;
|
|
123
|
+
Update: UpdateOperation;
|
|
124
|
+
Remove: RemoveOperation;
|
|
125
|
+
CreateSingle: CreateSingleOperation;
|
|
126
|
+
CreateMulti: CreateMultipleOperation;
|
|
127
|
+
};
|
|
128
|
+
export {};
|