oak-domain 4.0.2 → 4.1.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.
Files changed (38) hide show
  1. package/lib/base-app-domain/ActionAuth/Schema.d.ts +185 -186
  2. package/lib/base-app-domain/I18n/Schema.d.ts +128 -129
  3. package/lib/base-app-domain/Modi/Schema.d.ts +135 -136
  4. package/lib/base-app-domain/ModiEntity/Schema.d.ts +383 -384
  5. package/lib/base-app-domain/Oper/Schema.d.ts +152 -153
  6. package/lib/base-app-domain/OperEntity/Schema.d.ts +372 -373
  7. package/lib/base-app-domain/Path/Schema.d.ts +148 -149
  8. package/lib/base-app-domain/Relation/Schema.d.ts +187 -188
  9. package/lib/base-app-domain/RelationAuth/Schema.d.ts +213 -214
  10. package/lib/base-app-domain/User/Schema.d.ts +209 -210
  11. package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +263 -264
  12. package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +130 -131
  13. package/lib/base-app-domain/UserRelation/Schema.d.ts +207 -208
  14. package/lib/compiler/localeBuilder.d.ts +27 -27
  15. package/lib/compiler/localeBuilder.js +12 -10
  16. package/lib/compiler/routerBuilder.d.ts +1 -1
  17. package/lib/compiler/routerBuilder.js +7 -1
  18. package/lib/compiler/schemalBuilder.js +4156 -3565
  19. package/lib/store/AsyncRowStore.d.ts +65 -65
  20. package/lib/store/AsyncRowStore.js +180 -176
  21. package/lib/store/CascadeStore.d.ts +109 -109
  22. package/lib/store/CascadeStore.js +1748 -1748
  23. package/lib/store/RelationAuth.d.ts +103 -96
  24. package/lib/store/RelationAuth.js +1343 -1336
  25. package/lib/store/SyncRowStore.d.ts +29 -29
  26. package/lib/store/TriggerExecutor.js +1 -1
  27. package/lib/store/actionDef.js +4 -4
  28. package/lib/store/checker.js +487 -487
  29. package/lib/types/Aspect.d.ts +13 -13
  30. package/lib/types/Connector.d.ts +38 -38
  31. package/lib/types/Context.d.ts +7 -7
  32. package/lib/types/Environment.d.ts +93 -90
  33. package/lib/types/Exception.d.ts +155 -147
  34. package/lib/types/Exception.js +436 -406
  35. package/lib/utils/SimpleConnector.d.ts +64 -64
  36. package/lib/utils/SimpleConnector.js +1 -1
  37. package/lib/utils/assert.d.ts +0 -1
  38. package/package.json +1 -1
@@ -1,149 +1,148 @@
1
- import { Q_DateValue, Q_BooleanValue, 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 } from "../../types/Entity";
4
- import { GenericAction } from "../../actions/action";
5
- import { String, Boolean } from "../../types/DataType";
6
- import { EntityShape } from "../../types/Entity";
7
- import * as ActionAuth from "../ActionAuth/Schema";
8
- import * as RelationAuth from "../RelationAuth/Schema";
9
- import * as ModiEntity from "../ModiEntity/Schema";
10
- import * as OperEntity from "../OperEntity/Schema";
11
- export type OpSchema = EntityShape & {
12
- destEntity: String<32>;
13
- value: String<256>;
14
- recursive: Boolean;
15
- sourceEntity: String<32>;
16
- };
17
- export type OpAttr = keyof OpSchema;
18
- export type Schema = EntityShape & {
19
- destEntity: String<32>;
20
- value: String<256>;
21
- recursive: Boolean;
22
- sourceEntity: String<32>;
23
- actionAuth$path?: Array<ActionAuth.Schema>;
24
- actionAuth$path$$aggr?: AggregationResult<ActionAuth.Schema>;
25
- relationAuth$path?: Array<RelationAuth.Schema>;
26
- relationAuth$path$$aggr?: AggregationResult<RelationAuth.Schema>;
27
- modiEntity$entity?: Array<ModiEntity.Schema>;
28
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
29
- operEntity$entity?: Array<OperEntity.Schema>;
30
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
31
- } & {
32
- [A in ExpressionKey]?: any;
33
- };
34
- type AttrFilter = {
35
- id: Q_StringValue;
36
- $$createAt$$: Q_DateValue;
37
- $$seq$$: Q_NumberValue;
38
- $$updateAt$$: Q_DateValue;
39
- destEntity: Q_StringValue;
40
- value: Q_StringValue;
41
- recursive: Q_BooleanValue;
42
- sourceEntity: Q_StringValue;
43
- actionAuth$path: ActionAuth.Filter & SubQueryPredicateMetadata;
44
- relationAuth$path: RelationAuth.Filter & SubQueryPredicateMetadata;
45
- modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
46
- operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
47
- };
48
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
49
- export type Projection = {
50
- "#id"?: NodeId;
51
- [k: string]: any;
52
- id?: number;
53
- $$createAt$$?: number;
54
- $$updateAt$$?: number;
55
- $$seq$$?: number;
56
- destEntity?: number;
57
- value?: number;
58
- recursive?: number;
59
- sourceEntity?: number;
60
- actionAuth$path?: ActionAuth.Selection & {
61
- $entity: "actionAuth";
62
- };
63
- actionAuth$path$$aggr?: ActionAuth.Aggregation & {
64
- $entity: "actionAuth";
65
- };
66
- relationAuth$path?: RelationAuth.Selection & {
67
- $entity: "relationAuth";
68
- };
69
- relationAuth$path$$aggr?: RelationAuth.Aggregation & {
70
- $entity: "relationAuth";
71
- };
72
- modiEntity$entity?: ModiEntity.Selection & {
73
- $entity: "modiEntity";
74
- };
75
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
76
- $entity: "modiEntity";
77
- };
78
- operEntity$entity?: OperEntity.Selection & {
79
- $entity: "operEntity";
80
- };
81
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
82
- $entity: "operEntity";
83
- };
84
- } & Partial<ExprOp<OpAttr | string>>;
85
- type PathIdProjection = OneOf<{
86
- id: number;
87
- }>;
88
- export type SortAttr = {
89
- id: number;
90
- } | {
91
- $$createAt$$: number;
92
- } | {
93
- $$seq$$: number;
94
- } | {
95
- $$updateAt$$: number;
96
- } | {
97
- destEntity: number;
98
- } | {
99
- value: number;
100
- } | {
101
- recursive: number;
102
- } | {
103
- sourceEntity: number;
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<OpSchema> & {
116
- actionAuth$path?: OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">> | OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">>>;
117
- relationAuth$path?: OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">> | OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">>>;
118
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
119
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
120
- };
121
- export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
122
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
123
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
124
- export type UpdateOperationData = FormUpdateData<OpSchema> & {
125
- [k: string]: any;
126
- actionAuth$path?: OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<ActionAuth.RemoveOperation["action"], Omit<ActionAuth.RemoveOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">> | OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<ActionAuth.RemoveOperation["action"], Omit<ActionAuth.RemoveOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">>>;
127
- relationAuth$path?: OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<RelationAuth.RemoveOperation["action"], Omit<RelationAuth.RemoveOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">> | OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<RelationAuth.RemoveOperation["action"], Omit<RelationAuth.RemoveOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">>>;
128
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
129
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
130
- };
131
- export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
132
- export type RemoveOperationData = {};
133
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
134
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
135
- export type PathIdSubQuery = Selection<PathIdProjection>;
136
- export type EntityDef = {
137
- Schema: Schema;
138
- OpSchema: OpSchema;
139
- Action: OakMakeAction<GenericAction> | string;
140
- Selection: Selection;
141
- Aggregation: Aggregation;
142
- Operation: Operation;
143
- Create: CreateOperation;
144
- Update: UpdateOperation;
145
- Remove: RemoveOperation;
146
- CreateSingle: CreateSingleOperation;
147
- CreateMulti: CreateMultipleOperation;
148
- };
149
- export {};
1
+ import { Q_DateValue, Q_BooleanValue, 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, Boolean } from "../../types/DataType";
6
+ import * as ActionAuth from "../ActionAuth/Schema";
7
+ import * as RelationAuth from "../RelationAuth/Schema";
8
+ import * as ModiEntity from "../ModiEntity/Schema";
9
+ import * as OperEntity from "../OperEntity/Schema";
10
+ export type OpSchema = EntityShape & {
11
+ destEntity: String<32>;
12
+ value: String<256>;
13
+ recursive: Boolean;
14
+ sourceEntity: String<32>;
15
+ };
16
+ export type OpAttr = keyof OpSchema;
17
+ export type Schema = EntityShape & {
18
+ destEntity: String<32>;
19
+ value: String<256>;
20
+ recursive: Boolean;
21
+ sourceEntity: String<32>;
22
+ actionAuth$path?: Array<ActionAuth.Schema>;
23
+ actionAuth$path$$aggr?: AggregationResult<ActionAuth.Schema>;
24
+ relationAuth$path?: Array<RelationAuth.Schema>;
25
+ relationAuth$path$$aggr?: AggregationResult<RelationAuth.Schema>;
26
+ modiEntity$entity?: Array<ModiEntity.Schema>;
27
+ modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
28
+ operEntity$entity?: Array<OperEntity.Schema>;
29
+ operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
30
+ } & {
31
+ [A in ExpressionKey]?: any;
32
+ };
33
+ type AttrFilter = {
34
+ id: Q_StringValue;
35
+ $$createAt$$: Q_DateValue;
36
+ $$seq$$: Q_NumberValue;
37
+ $$updateAt$$: Q_DateValue;
38
+ destEntity: Q_StringValue;
39
+ value: Q_StringValue;
40
+ recursive: Q_BooleanValue;
41
+ sourceEntity: Q_StringValue;
42
+ actionAuth$path: ActionAuth.Filter & SubQueryPredicateMetadata;
43
+ relationAuth$path: RelationAuth.Filter & SubQueryPredicateMetadata;
44
+ modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
45
+ operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
46
+ };
47
+ export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
48
+ export type Projection = {
49
+ "#id"?: NodeId;
50
+ [k: string]: any;
51
+ id?: number;
52
+ $$createAt$$?: number;
53
+ $$updateAt$$?: number;
54
+ $$seq$$?: number;
55
+ destEntity?: number;
56
+ value?: number;
57
+ recursive?: number;
58
+ sourceEntity?: number;
59
+ actionAuth$path?: ActionAuth.Selection & {
60
+ $entity: "actionAuth";
61
+ };
62
+ actionAuth$path$$aggr?: ActionAuth.Aggregation & {
63
+ $entity: "actionAuth";
64
+ };
65
+ relationAuth$path?: RelationAuth.Selection & {
66
+ $entity: "relationAuth";
67
+ };
68
+ relationAuth$path$$aggr?: RelationAuth.Aggregation & {
69
+ $entity: "relationAuth";
70
+ };
71
+ modiEntity$entity?: ModiEntity.Selection & {
72
+ $entity: "modiEntity";
73
+ };
74
+ modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
75
+ $entity: "modiEntity";
76
+ };
77
+ operEntity$entity?: OperEntity.Selection & {
78
+ $entity: "operEntity";
79
+ };
80
+ operEntity$entity$$aggr?: OperEntity.Aggregation & {
81
+ $entity: "operEntity";
82
+ };
83
+ } & Partial<ExprOp<OpAttr | string>>;
84
+ type PathIdProjection = OneOf<{
85
+ id: number;
86
+ }>;
87
+ export type SortAttr = {
88
+ id: number;
89
+ } | {
90
+ $$createAt$$: number;
91
+ } | {
92
+ $$seq$$: number;
93
+ } | {
94
+ $$updateAt$$: number;
95
+ } | {
96
+ destEntity: number;
97
+ } | {
98
+ value: number;
99
+ } | {
100
+ recursive: number;
101
+ } | {
102
+ sourceEntity: number;
103
+ } | {
104
+ [k: string]: any;
105
+ } | OneOf<ExprOp<OpAttr | string>>;
106
+ export type SortNode = {
107
+ $attr: SortAttr;
108
+ $direction?: "asc" | "desc";
109
+ };
110
+ export type Sorter = SortNode[];
111
+ export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
112
+ export type Selection<P extends Object = Projection> = SelectOperation<P>;
113
+ export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
114
+ export type CreateOperationData = FormCreateData<OpSchema> & {
115
+ actionAuth$path?: OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">> | OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">>>;
116
+ relationAuth$path?: OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">> | OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">>>;
117
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
118
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
119
+ };
120
+ export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
121
+ export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
122
+ export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
123
+ export type UpdateOperationData = FormUpdateData<OpSchema> & {
124
+ [k: string]: any;
125
+ actionAuth$path?: OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<ActionAuth.RemoveOperation["action"], Omit<ActionAuth.RemoveOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<ActionAuth.CreateOperationData, "path" | "pathId">> | OakOperation<ActionAuth.UpdateOperation["action"], Omit<ActionAuth.UpdateOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">> | OakOperation<ActionAuth.RemoveOperation["action"], Omit<ActionAuth.RemoveOperationData, "path" | "pathId">, Omit<ActionAuth.Filter, "path" | "pathId">>>;
126
+ relationAuth$path?: OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<RelationAuth.RemoveOperation["action"], Omit<RelationAuth.RemoveOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">[]> | Array<OakOperation<"create", Omit<RelationAuth.CreateOperationData, "path" | "pathId">> | OakOperation<RelationAuth.UpdateOperation["action"], Omit<RelationAuth.UpdateOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">> | OakOperation<RelationAuth.RemoveOperation["action"], Omit<RelationAuth.RemoveOperationData, "path" | "pathId">, Omit<RelationAuth.Filter, "path" | "pathId">>>;
127
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
128
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
129
+ };
130
+ export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
131
+ export type RemoveOperationData = {};
132
+ export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
133
+ export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
134
+ export type PathIdSubQuery = Selection<PathIdProjection>;
135
+ export type EntityDef = {
136
+ Schema: Schema;
137
+ OpSchema: OpSchema;
138
+ Action: OakMakeAction<GenericAction> | string;
139
+ Selection: Selection;
140
+ Aggregation: Aggregation;
141
+ Operation: Operation;
142
+ Create: CreateOperation;
143
+ Update: UpdateOperation;
144
+ Remove: RemoveOperation;
145
+ CreateSingle: CreateSingleOperation;
146
+ CreateMulti: CreateMultipleOperation;
147
+ };
148
+ export {};