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.
Files changed (99) hide show
  1. package/lib/base-app-domain/ActionAuth/Schema.d.ts +19 -171
  2. package/lib/base-app-domain/ActionAuth/Schema.js +2 -0
  3. package/lib/base-app-domain/ActionAuth/_baseSchema.d.ts +44 -0
  4. package/lib/base-app-domain/ActionAuth/_baseSchema.js +2 -0
  5. package/lib/base-app-domain/EntityDict.d.ts +695 -14
  6. package/lib/base-app-domain/I18n/Schema.d.ts +19 -129
  7. package/lib/base-app-domain/I18n/Schema.js +2 -0
  8. package/lib/base-app-domain/I18n/_baseSchema.d.ts +51 -0
  9. package/lib/base-app-domain/I18n/_baseSchema.js +2 -0
  10. package/lib/base-app-domain/Log/Schema.d.ts +19 -141
  11. package/lib/base-app-domain/Log/Schema.js +2 -0
  12. package/lib/base-app-domain/Log/Style.d.ts +2 -2
  13. package/lib/base-app-domain/Log/_baseSchema.d.ts +44 -0
  14. package/lib/base-app-domain/Log/_baseSchema.js +2 -0
  15. package/lib/base-app-domain/Modi/Schema.d.ts +19 -130
  16. package/lib/base-app-domain/Modi/Schema.js +2 -0
  17. package/lib/base-app-domain/Modi/Style.d.ts +2 -2
  18. package/lib/base-app-domain/Modi/_baseSchema.d.ts +61 -0
  19. package/lib/base-app-domain/Modi/_baseSchema.js +2 -0
  20. package/lib/base-app-domain/ModiEntity/Schema.d.ts +19 -367
  21. package/lib/base-app-domain/ModiEntity/Schema.js +2 -0
  22. package/lib/base-app-domain/ModiEntity/Storage.js +1 -2
  23. package/lib/base-app-domain/ModiEntity/_baseSchema.d.ts +44 -0
  24. package/lib/base-app-domain/ModiEntity/_baseSchema.js +2 -0
  25. package/lib/base-app-domain/Oper/Schema.d.ts +19 -201
  26. package/lib/base-app-domain/Oper/Schema.js +2 -0
  27. package/lib/base-app-domain/Oper/Style.d.ts +2 -2
  28. package/lib/base-app-domain/Oper/_baseSchema.d.ts +67 -0
  29. package/lib/base-app-domain/Oper/_baseSchema.js +2 -0
  30. package/lib/base-app-domain/OperEntity/Schema.d.ts +19 -367
  31. package/lib/base-app-domain/OperEntity/Schema.js +2 -0
  32. package/lib/base-app-domain/OperEntity/Storage.js +1 -2
  33. package/lib/base-app-domain/OperEntity/_baseSchema.d.ts +44 -0
  34. package/lib/base-app-domain/OperEntity/_baseSchema.js +2 -0
  35. package/lib/base-app-domain/Path/Schema.d.ts +19 -157
  36. package/lib/base-app-domain/Path/Schema.js +2 -0
  37. package/lib/base-app-domain/Path/_baseSchema.d.ts +52 -0
  38. package/lib/base-app-domain/Path/_baseSchema.js +2 -0
  39. package/lib/base-app-domain/Relation/Schema.d.ts +19 -198
  40. package/lib/base-app-domain/Relation/Schema.js +2 -0
  41. package/lib/base-app-domain/Relation/_baseSchema.d.ts +48 -0
  42. package/lib/base-app-domain/Relation/_baseSchema.js +2 -0
  43. package/lib/base-app-domain/RelationAuth/Schema.d.ts +19 -199
  44. package/lib/base-app-domain/RelationAuth/Schema.js +2 -0
  45. package/lib/base-app-domain/RelationAuth/_baseSchema.d.ts +41 -0
  46. package/lib/base-app-domain/RelationAuth/_baseSchema.js +2 -0
  47. package/lib/base-app-domain/User/Schema.d.ts +19 -222
  48. package/lib/base-app-domain/User/Schema.js +2 -0
  49. package/lib/base-app-domain/User/Style.d.ts +2 -2
  50. package/lib/base-app-domain/User/_baseSchema.d.ts +53 -0
  51. package/lib/base-app-domain/User/_baseSchema.js +2 -0
  52. package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +19 -264
  53. package/lib/base-app-domain/UserEntityClaim/Schema.js +2 -0
  54. package/lib/base-app-domain/UserEntityClaim/_baseSchema.d.ts +49 -0
  55. package/lib/base-app-domain/UserEntityClaim/_baseSchema.js +2 -0
  56. package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +19 -136
  57. package/lib/base-app-domain/UserEntityGrant/Schema.js +2 -0
  58. package/lib/base-app-domain/UserEntityGrant/_baseSchema.d.ts +46 -0
  59. package/lib/base-app-domain/UserEntityGrant/_baseSchema.js +2 -0
  60. package/lib/base-app-domain/UserRelation/Schema.d.ts +19 -212
  61. package/lib/base-app-domain/UserRelation/Schema.js +2 -0
  62. package/lib/base-app-domain/UserRelation/_baseSchema.d.ts +47 -0
  63. package/lib/base-app-domain/UserRelation/_baseSchema.js +2 -0
  64. package/lib/compiler/localeBuilder.d.ts +1 -0
  65. package/lib/compiler/localeBuilder.js +9 -2
  66. package/lib/compiler/schemalBuilder.d.ts +1 -0
  67. package/lib/compiler/schemalBuilder.js +1368 -186
  68. package/lib/data/i18n.d.ts +3 -0
  69. package/lib/data/i18n.js +32 -0
  70. package/lib/store/CascadeStore.d.ts +3 -3
  71. package/lib/store/CascadeStore.js +60 -54
  72. package/lib/store/RelationAuth.d.ts +1 -1
  73. package/lib/store/RelationAuth.js +6 -6
  74. package/lib/store/TriggerExecutor.js +11 -5
  75. package/lib/store/checker.js +4 -4
  76. package/lib/store/filter.d.ts +11 -11
  77. package/lib/store/filter.js +14 -8
  78. package/lib/store/modi.d.ts +2 -2
  79. package/lib/store/modi.js +72 -70
  80. package/lib/store/triggers.js +14 -14
  81. package/lib/timers/vaccum.d.ts +1 -1
  82. package/lib/types/Auth.d.ts +6 -5
  83. package/lib/types/Cluster.d.ts +1 -0
  84. package/lib/types/Configuration.d.ts +9 -0
  85. package/lib/types/Entity.d.ts +5 -1
  86. package/lib/types/EntityDesc.d.ts +1 -1
  87. package/lib/types/Exception.d.ts +26 -21
  88. package/lib/types/Exception.js +81 -71
  89. package/lib/types/Expression.d.ts +4 -1
  90. package/lib/types/Port.d.ts +1 -1
  91. package/lib/types/Trigger.d.ts +1 -1
  92. package/lib/types/Watcher.d.ts +3 -3
  93. package/lib/utils/projection.d.ts +2 -2
  94. package/lib/utils/relationPath.d.ts +4 -4
  95. package/lib/utils/relationPath.js +1 -1
  96. package/lib/utils/row.d.ts +8 -0
  97. package/lib/utils/row.js +8 -0
  98. package/lib/utils/validator.d.ts +2 -2
  99. package/package.json +2 -2
@@ -0,0 +1,61 @@
1
+ import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
2
+ import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
3
+ import { Action, ParticularAction, IState } from "./Action";
4
+ import { String } from "../../types/DataType";
5
+ export type OpSchema = EntityShape & {
6
+ targetEntity: String<32>;
7
+ entity: String<32>;
8
+ entityId: String<64>;
9
+ action: String<24>;
10
+ data: Object;
11
+ filter?: Object | null;
12
+ extra?: Object | null;
13
+ iState?: IState | null;
14
+ } & {
15
+ [A in ExpressionKey]?: any;
16
+ };
17
+ export type OpAttr = keyof OpSchema;
18
+ export type OpFilter = {
19
+ id: Q_StringValue;
20
+ $$createAt$$: Q_DateValue;
21
+ $$seq$$: Q_NumberValue;
22
+ $$updateAt$$: Q_DateValue;
23
+ targetEntity: Q_StringValue;
24
+ entity: Q_StringValue;
25
+ entityId: Q_StringValue;
26
+ action: Q_StringValue;
27
+ data: Object;
28
+ filter: Object;
29
+ extra: Object;
30
+ iState: Q_EnumValue<IState>;
31
+ } & ExprOp<OpAttr | string>;
32
+ export type OpProjection = {
33
+ "#id"?: NodeId;
34
+ [k: string]: any;
35
+ id?: number;
36
+ $$createAt$$?: number;
37
+ $$updateAt$$?: number;
38
+ $$seq$$?: number;
39
+ targetEntity?: number;
40
+ entity?: number;
41
+ entityId?: number;
42
+ action?: number;
43
+ data?: number | Object;
44
+ filter?: number | Object;
45
+ extra?: number | Object;
46
+ iState?: number;
47
+ } & Partial<ExprOp<OpAttr | string>>;
48
+ export type OpSortAttr = Partial<{
49
+ id: number;
50
+ $$createAt$$: number;
51
+ $$seq$$: number;
52
+ $$updateAt$$: number;
53
+ targetEntity: number;
54
+ entity: number;
55
+ entityId: number;
56
+ action: number;
57
+ iState: number;
58
+ [k: string]: any;
59
+ } | ExprOp<OpAttr | string>>;
60
+ export type OpAction = OakMakeAction<Action | string>;
61
+ export type OpUpdateAction = "update" | ParticularAction | string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,367 +1,19 @@
1
- import { ForeignKey } from "../../types/DataType";
2
- import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "../../types/Demand";
3
- import { OneOf } from "../../types/Polyfill";
4
- import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
5
- import { AppendOnlyAction } from "../../actions/action";
6
- import { String } from "../../types/DataType";
7
- import * as Modi from "../Modi/Schema";
8
- import * as ActionAuth from "../ActionAuth/Schema";
9
- import * as I18n from "../I18n/Schema";
10
- import * as Log from "../Log/Schema";
11
- import * as Path from "../Path/Schema";
12
- import * as Relation from "../Relation/Schema";
13
- import * as RelationAuth from "../RelationAuth/Schema";
14
- import * as User from "../User/Schema";
15
- import * as UserEntityClaim from "../UserEntityClaim/Schema";
16
- import * as UserEntityGrant from "../UserEntityGrant/Schema";
17
- import * as UserRelation from "../UserRelation/Schema";
18
- export type OpSchema = EntityShape & {
19
- modiId: ForeignKey<"modi">;
20
- entity: "actionAuth" | "i18n" | "log" | "path" | "relation" | "relationAuth" | "user" | "userEntityClaim" | "userEntityGrant" | "userRelation" | string;
21
- entityId: String<64>;
22
- };
23
- export type OpAttr = keyof OpSchema;
24
- export type Schema = OpSchema & {
25
- modi: Modi.Schema;
26
- actionAuth?: ActionAuth.Schema;
27
- i18n?: I18n.Schema;
28
- log?: Log.Schema;
29
- path?: Path.Schema;
30
- relation?: Relation.Schema;
31
- relationAuth?: RelationAuth.Schema;
32
- user?: User.Schema;
33
- userEntityClaim?: UserEntityClaim.Schema;
34
- userEntityGrant?: UserEntityGrant.Schema;
35
- userRelation?: UserRelation.Schema;
36
- } & {
37
- [A in ExpressionKey]?: any;
38
- };
39
- type AttrFilter = {
40
- id: Q_StringValue;
41
- $$createAt$$: Q_DateValue;
42
- $$seq$$: Q_NumberValue;
43
- $$updateAt$$: Q_DateValue;
44
- modiId: Q_StringValue;
45
- modi: Modi.Filter;
46
- entity: Q_EnumValue<"actionAuth" | "i18n" | "log" | "path" | "relation" | "relationAuth" | "user" | "userEntityClaim" | "userEntityGrant" | "userRelation" | string>;
47
- entityId: Q_StringValue;
48
- actionAuth: ActionAuth.Filter;
49
- i18n: I18n.Filter;
50
- log: Log.Filter;
51
- path: Path.Filter;
52
- relation: Relation.Filter;
53
- relationAuth: RelationAuth.Filter;
54
- user: User.Filter;
55
- userEntityClaim: UserEntityClaim.Filter;
56
- userEntityGrant: UserEntityGrant.Filter;
57
- userRelation: UserRelation.Filter;
58
- };
59
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
60
- export type Projection = {
61
- "#id"?: NodeId;
62
- [k: string]: any;
63
- id?: number;
64
- $$createAt$$?: number;
65
- $$updateAt$$?: number;
66
- $$seq$$?: number;
67
- modiId?: number;
68
- modi?: Modi.Projection;
69
- entity?: number;
70
- entityId?: number;
71
- actionAuth?: ActionAuth.Projection;
72
- i18n?: I18n.Projection;
73
- log?: Log.Projection;
74
- path?: Path.Projection;
75
- relation?: Relation.Projection;
76
- relationAuth?: RelationAuth.Projection;
77
- user?: User.Projection;
78
- userEntityClaim?: UserEntityClaim.Projection;
79
- userEntityGrant?: UserEntityGrant.Projection;
80
- userRelation?: UserRelation.Projection;
81
- } & Partial<ExprOp<OpAttr | string>>;
82
- type ModiEntityIdProjection = OneOf<{
83
- id: number;
84
- }>;
85
- type ModiIdProjection = OneOf<{
86
- modiId: number;
87
- }>;
88
- type ActionAuthIdProjection = OneOf<{
89
- entityId: number;
90
- }>;
91
- type I18nIdProjection = OneOf<{
92
- entityId: number;
93
- }>;
94
- type LogIdProjection = OneOf<{
95
- entityId: number;
96
- }>;
97
- type PathIdProjection = OneOf<{
98
- entityId: number;
99
- }>;
100
- type RelationIdProjection = OneOf<{
101
- entityId: number;
102
- }>;
103
- type RelationAuthIdProjection = OneOf<{
104
- entityId: number;
105
- }>;
106
- type UserIdProjection = OneOf<{
107
- entityId: number;
108
- }>;
109
- type UserEntityClaimIdProjection = OneOf<{
110
- entityId: number;
111
- }>;
112
- type UserEntityGrantIdProjection = OneOf<{
113
- entityId: number;
114
- }>;
115
- type UserRelationIdProjection = OneOf<{
116
- entityId: number;
117
- }>;
118
- export type SortAttr = {
119
- id: number;
120
- } | {
121
- $$createAt$$: number;
122
- } | {
123
- $$seq$$: number;
124
- } | {
125
- $$updateAt$$: number;
126
- } | {
127
- modiId: number;
128
- } | {
129
- modi: Modi.SortAttr;
130
- } | {
131
- entity: number;
132
- } | {
133
- entityId: number;
134
- } | {
135
- actionAuth: ActionAuth.SortAttr;
136
- } | {
137
- i18n: I18n.SortAttr;
138
- } | {
139
- log: Log.SortAttr;
140
- } | {
141
- path: Path.SortAttr;
142
- } | {
143
- relation: Relation.SortAttr;
144
- } | {
145
- relationAuth: RelationAuth.SortAttr;
146
- } | {
147
- user: User.SortAttr;
148
- } | {
149
- userEntityClaim: UserEntityClaim.SortAttr;
150
- } | {
151
- userEntityGrant: UserEntityGrant.SortAttr;
152
- } | {
153
- userRelation: UserRelation.SortAttr;
154
- } | {
155
- [k: string]: any;
156
- } | OneOf<ExprOp<OpAttr | string>>;
157
- export type SortNode = {
158
- $attr: SortAttr;
159
- $direction?: "asc" | "desc";
160
- };
161
- export type Sorter = SortNode[];
162
- export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
163
- export type Selection<P extends Object = Projection> = SelectOperation<P>;
164
- export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
165
- export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "modiId">> & (({
166
- modiId?: never;
167
- modi: Modi.CreateSingleOperation;
168
- } | {
169
- modiId: ForeignKey<"modi">;
170
- modi?: Modi.UpdateOperation;
171
- } | {
172
- modi?: never;
173
- modiId: ForeignKey<"modi">;
174
- })) & ({
175
- entity: "actionAuth";
176
- entityId: ForeignKey<"ActionAuth">;
177
- actionAuth?: never;
178
- } | {
179
- entity: "i18n";
180
- entityId: ForeignKey<"I18n">;
181
- i18n?: never;
182
- } | {
183
- entity?: never;
184
- entityId?: never;
185
- log: Log.CreateSingleOperation;
186
- } | {
187
- entity: "log";
188
- entityId: ForeignKey<"Log">;
189
- log?: Log.UpdateOperation;
190
- } | {
191
- entity: "log";
192
- entityId: ForeignKey<"Log">;
193
- log?: never;
194
- } | {
195
- entity: "path";
196
- entityId: ForeignKey<"Path">;
197
- path?: never;
198
- } | {
199
- entity?: never;
200
- entityId?: never;
201
- relation: Relation.CreateSingleOperation;
202
- } | {
203
- entity: "relation";
204
- entityId: ForeignKey<"Relation">;
205
- relation?: Relation.UpdateOperation;
206
- } | {
207
- entity: "relation";
208
- entityId: ForeignKey<"Relation">;
209
- relation?: never;
210
- } | {
211
- entity: "relationAuth";
212
- entityId: ForeignKey<"RelationAuth">;
213
- relationAuth?: never;
214
- } | {
215
- entity?: never;
216
- entityId?: never;
217
- user: User.CreateSingleOperation;
218
- } | {
219
- entity: "user";
220
- entityId: ForeignKey<"User">;
221
- user?: User.UpdateOperation;
222
- } | {
223
- entity: "user";
224
- entityId: ForeignKey<"User">;
225
- user?: never;
226
- } | {
227
- entity?: never;
228
- entityId?: never;
229
- userEntityClaim: UserEntityClaim.CreateSingleOperation;
230
- } | {
231
- entity: "userEntityClaim";
232
- entityId: ForeignKey<"UserEntityClaim">;
233
- userEntityClaim?: UserEntityClaim.UpdateOperation;
234
- } | {
235
- entity: "userEntityClaim";
236
- entityId: ForeignKey<"UserEntityClaim">;
237
- userEntityClaim?: never;
238
- } | {
239
- entity?: never;
240
- entityId?: never;
241
- userEntityGrant: UserEntityGrant.CreateSingleOperation;
242
- } | {
243
- entity: "userEntityGrant";
244
- entityId: ForeignKey<"UserEntityGrant">;
245
- userEntityGrant?: UserEntityGrant.UpdateOperation;
246
- } | {
247
- entity: "userEntityGrant";
248
- entityId: ForeignKey<"UserEntityGrant">;
249
- userEntityGrant?: never;
250
- } | {
251
- entity?: never;
252
- entityId?: never;
253
- userRelation: UserRelation.CreateSingleOperation;
254
- } | {
255
- entity: "userRelation";
256
- entityId: ForeignKey<"UserRelation">;
257
- userRelation?: UserRelation.UpdateOperation;
258
- } | {
259
- entity: "userRelation";
260
- entityId: ForeignKey<"UserRelation">;
261
- userRelation?: never;
262
- } | {
263
- entity?: string;
264
- entityId?: string;
265
- [K: string]: any;
266
- });
267
- export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
268
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
269
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
270
- export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId" | "modiId">> & (({
271
- modi?: Modi.CreateSingleOperation;
272
- modiId?: never;
273
- } | {
274
- modi?: Modi.UpdateOperation;
275
- modiId?: never;
276
- } | {
277
- modi?: Modi.RemoveOperation;
278
- modiId?: never;
279
- } | {
280
- modi?: never;
281
- modiId?: ForeignKey<"modi">;
282
- })) & ({
283
- log?: Log.CreateSingleOperation | Log.UpdateOperation | Log.RemoveOperation;
284
- entityId?: never;
285
- entity?: never;
286
- } | {
287
- relation?: Relation.CreateSingleOperation | Relation.UpdateOperation | Relation.RemoveOperation;
288
- entityId?: never;
289
- entity?: never;
290
- } | {
291
- user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
292
- entityId?: never;
293
- entity?: never;
294
- } | {
295
- userEntityClaim?: UserEntityClaim.CreateSingleOperation | UserEntityClaim.UpdateOperation | UserEntityClaim.RemoveOperation;
296
- entityId?: never;
297
- entity?: never;
298
- } | {
299
- userEntityGrant?: UserEntityGrant.CreateSingleOperation | UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
300
- entityId?: never;
301
- entity?: never;
302
- } | {
303
- userRelation?: UserRelation.CreateSingleOperation | UserRelation.UpdateOperation | UserRelation.RemoveOperation;
304
- entityId?: never;
305
- entity?: never;
306
- } | {
307
- entity?: ("actionAuth" | "i18n" | "log" | "path" | "relation" | "relationAuth" | "user" | "userEntityClaim" | "userEntityGrant" | "userRelation" | string) | null;
308
- entityId?: ForeignKey<"ActionAuth" | "I18n" | "Log" | "Path" | "Relation" | "RelationAuth" | "User" | "UserEntityClaim" | "UserEntityGrant" | "UserRelation"> | null;
309
- actionAuth?: never;
310
- i18n?: never;
311
- log?: never;
312
- path?: never;
313
- relation?: never;
314
- relationAuth?: never;
315
- user?: never;
316
- userEntityClaim?: never;
317
- userEntityGrant?: never;
318
- userRelation?: never;
319
- }) & {
320
- [k: string]: any;
321
- };
322
- export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
323
- export type RemoveOperationData = {} & (({
324
- modi?: Modi.UpdateOperation | Modi.RemoveOperation;
325
- })) & ({
326
- log?: Log.UpdateOperation | Log.RemoveOperation;
327
- } | {
328
- relation?: Relation.UpdateOperation | Relation.RemoveOperation;
329
- } | {
330
- user?: User.UpdateOperation | User.RemoveOperation;
331
- } | {
332
- userEntityClaim?: UserEntityClaim.UpdateOperation | UserEntityClaim.RemoveOperation;
333
- } | {
334
- userEntityGrant?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
335
- } | {
336
- userRelation?: UserRelation.UpdateOperation | UserRelation.RemoveOperation;
337
- } | {
338
- [k: string]: any;
339
- });
340
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
341
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
342
- export type ModiIdSubQuery = Selection<ModiIdProjection>;
343
- export type ActionAuthIdSubQuery = Selection<ActionAuthIdProjection>;
344
- export type I18nIdSubQuery = Selection<I18nIdProjection>;
345
- export type LogIdSubQuery = Selection<LogIdProjection>;
346
- export type PathIdSubQuery = Selection<PathIdProjection>;
347
- export type RelationIdSubQuery = Selection<RelationIdProjection>;
348
- export type RelationAuthIdSubQuery = Selection<RelationAuthIdProjection>;
349
- export type UserIdSubQuery = Selection<UserIdProjection>;
350
- export type UserEntityClaimIdSubQuery = Selection<UserEntityClaimIdProjection>;
351
- export type UserEntityGrantIdSubQuery = Selection<UserEntityGrantIdProjection>;
352
- export type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
353
- export type ModiEntityIdSubQuery = Selection<ModiEntityIdProjection>;
354
- export type EntityDef = {
355
- Schema: Schema;
356
- OpSchema: OpSchema;
357
- Action: OakMakeAction<AppendOnlyAction> | string;
358
- Selection: Selection;
359
- Aggregation: Aggregation;
360
- Operation: Operation;
361
- Create: CreateOperation;
362
- Update: UpdateOperation;
363
- Remove: RemoveOperation;
364
- CreateSingle: CreateSingleOperation;
365
- CreateMulti: CreateMultipleOperation;
366
- };
367
- export {};
1
+ export * from "./_baseSchema";
2
+ import { ModiEntity } from "../EntityDict";
3
+ export type Schema = ModiEntity["Schema"];
4
+ export type Action = ModiEntity["Action"];
5
+ export type Projection = ModiEntity["Projection"];
6
+ export type Filter = ModiEntity["Filter"];
7
+ export type SortNode = ModiEntity["SortNode"];
8
+ export type Sorter = ModiEntity["Sorter"];
9
+ export type Selection = ModiEntity["Selection"];
10
+ export type Aggregation = ModiEntity["Aggregation"];
11
+ export type CreateOperationData = ModiEntity["CreateOperationData"];
12
+ export type CreateSingle = ModiEntity["CreateSingle"];
13
+ export type CreateMulti = ModiEntity["CreateMulti"];
14
+ export type Create = ModiEntity["Create"];
15
+ export type UpdateOperationData = ModiEntity["UpdateOperationData"];
16
+ export type Update = ModiEntity["Update"];
17
+ export type RemoveOperationData = ModiEntity["RemoveOperationData"];
18
+ export type Remove = ModiEntity["Remove"];
19
+ export type Operation = ModiEntity["Operation"];
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./_baseSchema"), exports);
@@ -14,8 +14,7 @@ exports.desc = {
14
14
  type: "varchar",
15
15
  params: {
16
16
  length: 32
17
- },
18
- ref: ["actionAuth", "i18n", "log", "path", "relation", "relationAuth", "user", "userEntityClaim", "userEntityGrant", "userRelation"]
17
+ }
19
18
  },
20
19
  entityId: {
21
20
  notNull: true,
@@ -0,0 +1,44 @@
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 { AppendOnlyAction } from "../../actions/action";
5
+ import { String } from "../../types/DataType";
6
+ export type OpSchema = EntityShape & {
7
+ modiId: ForeignKey<"modi">;
8
+ entity: String<32>;
9
+ entityId: String<64>;
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
+ modiId: Q_StringValue;
20
+ entity: Q_StringValue;
21
+ entityId: Q_StringValue;
22
+ } & ExprOp<OpAttr | string>;
23
+ export type OpProjection = {
24
+ "#id"?: NodeId;
25
+ [k: string]: any;
26
+ id?: number;
27
+ $$createAt$$?: number;
28
+ $$updateAt$$?: number;
29
+ $$seq$$?: number;
30
+ modiId?: number;
31
+ entity?: number;
32
+ entityId?: number;
33
+ } & Partial<ExprOp<OpAttr | string>>;
34
+ export type OpSortAttr = Partial<{
35
+ id: number;
36
+ $$createAt$$: number;
37
+ $$seq$$: number;
38
+ $$updateAt$$: number;
39
+ entity: number;
40
+ entityId: number;
41
+ [k: string]: any;
42
+ } | ExprOp<OpAttr | string>>;
43
+ export type OpAction = OakMakeAction<AppendOnlyAction | string>;
44
+ export type OpUpdateAction = "update" | string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });