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.
Files changed (73) hide show
  1. package/lib/base-app-domain/ActionAuth/Schema.d.ts +185 -185
  2. package/lib/base-app-domain/ActionDefDict.d.ts +2 -2
  3. package/lib/base-app-domain/I18n/Schema.d.ts +128 -128
  4. package/lib/base-app-domain/Modi/Schema.d.ts +135 -135
  5. package/lib/base-app-domain/ModiEntity/Schema.d.ts +383 -383
  6. package/lib/base-app-domain/Oper/Schema.d.ts +158 -152
  7. package/lib/base-app-domain/Oper/Storage.js +19 -1
  8. package/lib/base-app-domain/OperEntity/Schema.d.ts +372 -372
  9. package/lib/base-app-domain/Path/Schema.d.ts +148 -148
  10. package/lib/base-app-domain/Relation/Schema.d.ts +187 -187
  11. package/lib/base-app-domain/RelationAuth/Schema.d.ts +213 -213
  12. package/lib/base-app-domain/User/Action.d.ts +1 -0
  13. package/lib/base-app-domain/User/Action.js +3 -3
  14. package/lib/base-app-domain/User/Schema.d.ts +209 -209
  15. package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +263 -263
  16. package/lib/base-app-domain/UserEntityGrant/Action.d.ts +5 -5
  17. package/lib/base-app-domain/UserEntityGrant/Action.js +5 -5
  18. package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +130 -130
  19. package/lib/base-app-domain/UserRelation/Schema.d.ts +207 -207
  20. package/lib/compiler/localeBuilder.d.ts +27 -27
  21. package/lib/compiler/localeBuilder.js +215 -215
  22. package/lib/compiler/routerBuilder.js +263 -263
  23. package/lib/compiler/schemalBuilder.js +4167 -4160
  24. package/lib/entities/Oper.d.ts +2 -1
  25. package/lib/entities/Oper.js +16 -1
  26. package/lib/entities/User.d.ts +10 -0
  27. package/lib/entities/User.js +3 -2
  28. package/lib/index.d.ts +0 -22
  29. package/lib/index.js +1 -35
  30. package/lib/store/AsyncRowStore.d.ts +66 -65
  31. package/lib/store/AsyncRowStore.js +180 -180
  32. package/lib/store/CascadeStore.js +7 -31
  33. package/lib/store/RelationAuth.d.ts +103 -103
  34. package/lib/store/RelationAuth.js +1209 -1343
  35. package/lib/store/SyncRowStore.d.ts +29 -29
  36. package/lib/store/TriggerExecutor.js +468 -468
  37. package/lib/store/actionDef.js +278 -278
  38. package/lib/store/checker.js +487 -487
  39. package/lib/triggers/index.d.ts +2 -2
  40. package/lib/triggers/index.js +21 -1
  41. package/lib/types/Aspect.d.ts +13 -13
  42. package/lib/types/Configuration.d.ts +42 -0
  43. package/lib/types/Configuration.js +3 -0
  44. package/lib/types/Connector.d.ts +38 -38
  45. package/lib/types/Context.d.ts +7 -7
  46. package/lib/types/Entity.d.ts +4 -4
  47. package/lib/types/Environment.d.ts +93 -93
  48. package/lib/types/Exception.d.ts +155 -155
  49. package/lib/types/Exception.js +436 -436
  50. package/lib/types/Sync.d.ts +48 -0
  51. package/lib/types/Sync.js +8 -0
  52. package/lib/types/index.d.ts +1 -0
  53. package/lib/types/index.js +1 -0
  54. package/lib/utils/SimpleConnector.d.ts +64 -64
  55. package/lib/utils/SimpleConnector.js +206 -206
  56. package/lib/utils/assert.d.ts +5 -5
  57. package/lib/utils/projection.d.ts +1 -1
  58. package/lib/utils/relationPath.d.ts +31 -0
  59. package/lib/utils/relationPath.js +202 -0
  60. package/package.json +51 -51
  61. package/src/entities/ActionAuth.ts +41 -41
  62. package/src/entities/I18n.ts +45 -45
  63. package/src/entities/Modi.ts +69 -69
  64. package/src/entities/ModiEntity.ts +26 -26
  65. package/src/entities/Oper.ts +48 -32
  66. package/src/entities/OperEntity.ts +27 -27
  67. package/src/entities/Path.ts +43 -43
  68. package/src/entities/Relation.ts +43 -43
  69. package/src/entities/RelationAuth.ts +44 -44
  70. package/src/entities/User.ts +48 -48
  71. package/src/entities/UserEntityClaim.ts +29 -29
  72. package/src/entities/UserEntityGrant.ts +24 -24
  73. package/src/entities/UserRelation.ts +50 -50
@@ -1,207 +1,207 @@
1
- import { ForeignKey } from "../../types/DataType";
2
- import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, 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 { String } from "../../types/DataType";
7
- import * as User from "../User/Schema";
8
- import * as Relation from "../Relation/Schema";
9
- import * as UserEntityClaim from "../UserEntityClaim/Schema";
10
- import * as ModiEntity from "../ModiEntity/Schema";
11
- import * as OperEntity from "../OperEntity/Schema";
12
- export type OpSchema = EntityShape & {
13
- userId: ForeignKey<"user">;
14
- relationId: ForeignKey<"relation">;
15
- entity: String<32>;
16
- entityId: String<64>;
17
- };
18
- export type OpAttr = keyof OpSchema;
19
- export type Schema = EntityShape & {
20
- userId: ForeignKey<"user">;
21
- relationId: ForeignKey<"relation">;
22
- entity: String<32>;
23
- entityId: String<64>;
24
- user: User.Schema;
25
- relation: Relation.Schema;
26
- userEntityClaim$userRelation?: Array<UserEntityClaim.Schema>;
27
- userEntityClaim$userRelation$$aggr?: AggregationResult<UserEntityClaim.Schema>;
28
- modiEntity$entity?: Array<ModiEntity.Schema>;
29
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
30
- operEntity$entity?: Array<OperEntity.Schema>;
31
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
32
- } & {
33
- [A in ExpressionKey]?: any;
34
- };
35
- type AttrFilter = {
36
- id: Q_StringValue;
37
- $$createAt$$: Q_DateValue;
38
- $$seq$$: Q_NumberValue;
39
- $$updateAt$$: Q_DateValue;
40
- userId: Q_StringValue;
41
- user: User.Filter;
42
- relationId: Q_StringValue;
43
- relation: Relation.Filter;
44
- entity: Q_StringValue;
45
- entityId: Q_StringValue;
46
- userEntityClaim$userRelation: UserEntityClaim.Filter & SubQueryPredicateMetadata;
47
- modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
48
- operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
49
- };
50
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
51
- export type Projection = {
52
- "#id"?: NodeId;
53
- [k: string]: any;
54
- id?: number;
55
- $$createAt$$?: number;
56
- $$updateAt$$?: number;
57
- $$seq$$?: number;
58
- userId?: number;
59
- user?: User.Projection;
60
- relationId?: number;
61
- relation?: Relation.Projection;
62
- entity?: number;
63
- entityId?: number;
64
- userEntityClaim$userRelation?: UserEntityClaim.Selection & {
65
- $entity: "userEntityClaim";
66
- };
67
- userEntityClaim$userRelation$$aggr?: UserEntityClaim.Aggregation & {
68
- $entity: "userEntityClaim";
69
- };
70
- modiEntity$entity?: ModiEntity.Selection & {
71
- $entity: "modiEntity";
72
- };
73
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
74
- $entity: "modiEntity";
75
- };
76
- operEntity$entity?: OperEntity.Selection & {
77
- $entity: "operEntity";
78
- };
79
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
80
- $entity: "operEntity";
81
- };
82
- } & Partial<ExprOp<OpAttr | string>>;
83
- type UserRelationIdProjection = OneOf<{
84
- id: number;
85
- }>;
86
- type UserIdProjection = OneOf<{
87
- userId: number;
88
- }>;
89
- type RelationIdProjection = OneOf<{
90
- relationId: number;
91
- }>;
92
- export type SortAttr = {
93
- id: number;
94
- } | {
95
- $$createAt$$: number;
96
- } | {
97
- $$seq$$: number;
98
- } | {
99
- $$updateAt$$: number;
100
- } | {
101
- userId: number;
102
- } | {
103
- user: User.SortAttr;
104
- } | {
105
- relationId: number;
106
- } | {
107
- relation: Relation.SortAttr;
108
- } | {
109
- entity: number;
110
- } | {
111
- entityId: number;
112
- } | {
113
- [k: string]: any;
114
- } | OneOf<ExprOp<OpAttr | string>>;
115
- export type SortNode = {
116
- $attr: SortAttr;
117
- $direction?: "asc" | "desc";
118
- };
119
- export type Sorter = SortNode[];
120
- export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
121
- export type Selection<P extends Object = Projection> = SelectOperation<P>;
122
- export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
123
- export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "userId" | "relationId">> & (({
124
- userId?: never;
125
- user: User.CreateSingleOperation;
126
- } | {
127
- userId: ForeignKey<"user">;
128
- user?: User.UpdateOperation;
129
- } | {
130
- user?: never;
131
- userId: ForeignKey<"user">;
132
- }) & ({
133
- relationId?: never;
134
- relation: Relation.CreateSingleOperation;
135
- } | {
136
- relationId: ForeignKey<"relation">;
137
- relation?: Relation.UpdateOperation;
138
- } | {
139
- relation?: never;
140
- relationId: ForeignKey<"relation">;
141
- })) & ({
142
- entity?: string;
143
- entityId?: string;
144
- [K: string]: any;
145
- }) & {
146
- userEntityClaim$userRelation?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">>>;
147
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
148
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
149
- };
150
- export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
151
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
152
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
153
- export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "userId" | "relationId">> & (({
154
- user?: User.CreateSingleOperation;
155
- userId?: never;
156
- } | {
157
- user?: User.UpdateOperation;
158
- userId?: never;
159
- } | {
160
- user?: User.RemoveOperation;
161
- userId?: never;
162
- } | {
163
- user?: never;
164
- userId?: ForeignKey<"user">;
165
- }) & ({
166
- relation?: Relation.CreateSingleOperation;
167
- relationId?: never;
168
- } | {
169
- relation?: Relation.UpdateOperation;
170
- relationId?: never;
171
- } | {
172
- relation?: Relation.RemoveOperation;
173
- relationId?: never;
174
- } | {
175
- relation?: never;
176
- relationId?: ForeignKey<"relation">;
177
- })) & {
178
- [k: string]: any;
179
- userEntityClaim$userRelation?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">>>;
180
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
181
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
182
- };
183
- export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
184
- export type RemoveOperationData = {} & (({
185
- user?: User.UpdateOperation | User.RemoveOperation;
186
- }) & ({
187
- relation?: Relation.UpdateOperation | Relation.RemoveOperation;
188
- }));
189
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
190
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
191
- export type UserIdSubQuery = Selection<UserIdProjection>;
192
- export type RelationIdSubQuery = Selection<RelationIdProjection>;
193
- export type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
194
- export type EntityDef = {
195
- Schema: Schema;
196
- OpSchema: OpSchema;
197
- Action: OakMakeAction<GenericAction> | string;
198
- Selection: Selection;
199
- Aggregation: Aggregation;
200
- Operation: Operation;
201
- Create: CreateOperation;
202
- Update: UpdateOperation;
203
- Remove: RemoveOperation;
204
- CreateSingle: CreateSingleOperation;
205
- CreateMulti: CreateMultipleOperation;
206
- };
207
- export {};
1
+ import { ForeignKey } from "../../types/DataType";
2
+ import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, 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 { String } from "../../types/DataType";
7
+ import * as User from "../User/Schema";
8
+ import * as Relation from "../Relation/Schema";
9
+ import * as UserEntityClaim from "../UserEntityClaim/Schema";
10
+ import * as ModiEntity from "../ModiEntity/Schema";
11
+ import * as OperEntity from "../OperEntity/Schema";
12
+ export type OpSchema = EntityShape & {
13
+ userId: ForeignKey<"user">;
14
+ relationId: ForeignKey<"relation">;
15
+ entity: String<32>;
16
+ entityId: String<64>;
17
+ };
18
+ export type OpAttr = keyof OpSchema;
19
+ export type Schema = EntityShape & {
20
+ userId: ForeignKey<"user">;
21
+ relationId: ForeignKey<"relation">;
22
+ entity: String<32>;
23
+ entityId: String<64>;
24
+ user: User.Schema;
25
+ relation: Relation.Schema;
26
+ userEntityClaim$userRelation?: Array<UserEntityClaim.Schema>;
27
+ userEntityClaim$userRelation$$aggr?: AggregationResult<UserEntityClaim.Schema>;
28
+ modiEntity$entity?: Array<ModiEntity.Schema>;
29
+ modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
30
+ operEntity$entity?: Array<OperEntity.Schema>;
31
+ operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
32
+ } & {
33
+ [A in ExpressionKey]?: any;
34
+ };
35
+ type AttrFilter = {
36
+ id: Q_StringValue;
37
+ $$createAt$$: Q_DateValue;
38
+ $$seq$$: Q_NumberValue;
39
+ $$updateAt$$: Q_DateValue;
40
+ userId: Q_StringValue;
41
+ user: User.Filter;
42
+ relationId: Q_StringValue;
43
+ relation: Relation.Filter;
44
+ entity: Q_StringValue;
45
+ entityId: Q_StringValue;
46
+ userEntityClaim$userRelation: UserEntityClaim.Filter & SubQueryPredicateMetadata;
47
+ modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
48
+ operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
49
+ };
50
+ export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
51
+ export type Projection = {
52
+ "#id"?: NodeId;
53
+ [k: string]: any;
54
+ id?: number;
55
+ $$createAt$$?: number;
56
+ $$updateAt$$?: number;
57
+ $$seq$$?: number;
58
+ userId?: number;
59
+ user?: User.Projection;
60
+ relationId?: number;
61
+ relation?: Relation.Projection;
62
+ entity?: number;
63
+ entityId?: number;
64
+ userEntityClaim$userRelation?: UserEntityClaim.Selection & {
65
+ $entity: "userEntityClaim";
66
+ };
67
+ userEntityClaim$userRelation$$aggr?: UserEntityClaim.Aggregation & {
68
+ $entity: "userEntityClaim";
69
+ };
70
+ modiEntity$entity?: ModiEntity.Selection & {
71
+ $entity: "modiEntity";
72
+ };
73
+ modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
74
+ $entity: "modiEntity";
75
+ };
76
+ operEntity$entity?: OperEntity.Selection & {
77
+ $entity: "operEntity";
78
+ };
79
+ operEntity$entity$$aggr?: OperEntity.Aggregation & {
80
+ $entity: "operEntity";
81
+ };
82
+ } & Partial<ExprOp<OpAttr | string>>;
83
+ type UserRelationIdProjection = OneOf<{
84
+ id: number;
85
+ }>;
86
+ type UserIdProjection = OneOf<{
87
+ userId: number;
88
+ }>;
89
+ type RelationIdProjection = OneOf<{
90
+ relationId: number;
91
+ }>;
92
+ export type SortAttr = {
93
+ id: number;
94
+ } | {
95
+ $$createAt$$: number;
96
+ } | {
97
+ $$seq$$: number;
98
+ } | {
99
+ $$updateAt$$: number;
100
+ } | {
101
+ userId: number;
102
+ } | {
103
+ user: User.SortAttr;
104
+ } | {
105
+ relationId: number;
106
+ } | {
107
+ relation: Relation.SortAttr;
108
+ } | {
109
+ entity: number;
110
+ } | {
111
+ entityId: number;
112
+ } | {
113
+ [k: string]: any;
114
+ } | OneOf<ExprOp<OpAttr | string>>;
115
+ export type SortNode = {
116
+ $attr: SortAttr;
117
+ $direction?: "asc" | "desc";
118
+ };
119
+ export type Sorter = SortNode[];
120
+ export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
121
+ export type Selection<P extends Object = Projection> = SelectOperation<P>;
122
+ export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
123
+ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "userId" | "relationId">> & (({
124
+ userId?: never;
125
+ user: User.CreateSingleOperation;
126
+ } | {
127
+ userId: ForeignKey<"user">;
128
+ user?: User.UpdateOperation;
129
+ } | {
130
+ user?: never;
131
+ userId: ForeignKey<"user">;
132
+ }) & ({
133
+ relationId?: never;
134
+ relation: Relation.CreateSingleOperation;
135
+ } | {
136
+ relationId: ForeignKey<"relation">;
137
+ relation?: Relation.UpdateOperation;
138
+ } | {
139
+ relation?: never;
140
+ relationId: ForeignKey<"relation">;
141
+ })) & ({
142
+ entity?: string;
143
+ entityId?: string;
144
+ [K: string]: any;
145
+ }) & {
146
+ userEntityClaim$userRelation?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">>>;
147
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
148
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
149
+ };
150
+ export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
151
+ export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
152
+ export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
153
+ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "userId" | "relationId">> & (({
154
+ user?: User.CreateSingleOperation;
155
+ userId?: never;
156
+ } | {
157
+ user?: User.UpdateOperation;
158
+ userId?: never;
159
+ } | {
160
+ user?: User.RemoveOperation;
161
+ userId?: never;
162
+ } | {
163
+ user?: never;
164
+ userId?: ForeignKey<"user">;
165
+ }) & ({
166
+ relation?: Relation.CreateSingleOperation;
167
+ relationId?: never;
168
+ } | {
169
+ relation?: Relation.UpdateOperation;
170
+ relationId?: never;
171
+ } | {
172
+ relation?: Relation.RemoveOperation;
173
+ relationId?: never;
174
+ } | {
175
+ relation?: never;
176
+ relationId?: ForeignKey<"relation">;
177
+ })) & {
178
+ [k: string]: any;
179
+ userEntityClaim$userRelation?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "userRelation" | "userRelationId">, Omit<UserEntityClaim.Filter, "userRelation" | "userRelationId">>>;
180
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
181
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
182
+ };
183
+ export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
184
+ export type RemoveOperationData = {} & (({
185
+ user?: User.UpdateOperation | User.RemoveOperation;
186
+ }) & ({
187
+ relation?: Relation.UpdateOperation | Relation.RemoveOperation;
188
+ }));
189
+ export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
190
+ export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
191
+ export type UserIdSubQuery = Selection<UserIdProjection>;
192
+ export type RelationIdSubQuery = Selection<RelationIdProjection>;
193
+ export type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
194
+ export type EntityDef = {
195
+ Schema: Schema;
196
+ OpSchema: OpSchema;
197
+ Action: OakMakeAction<GenericAction> | string;
198
+ Selection: Selection;
199
+ Aggregation: Aggregation;
200
+ Operation: Operation;
201
+ Create: CreateOperation;
202
+ Update: UpdateOperation;
203
+ Remove: RemoveOperation;
204
+ CreateSingle: CreateSingleOperation;
205
+ CreateMulti: CreateMultipleOperation;
206
+ };
207
+ export {};
@@ -1,27 +1,27 @@
1
- /// <reference types="node" />
2
- import { Hash } from 'crypto';
3
- /**
4
- * 这个类的作用是把项目和所有相关的模块下的locales编译成为src/data/i18n中的数据
5
- */
6
- export default class LocaleBuilder {
7
- asLib: boolean;
8
- dependencies: string[];
9
- pwd: string;
10
- locales: Record<string, [string, string, string, object]>;
11
- hash: Hash;
12
- constructor(asLib?: boolean);
13
- /**
14
- * 将locales输出成为data/i18n.ts中的数据
15
- * 如果有Dependency需要引出来
16
- */
17
- private outputDataFile;
18
- /**
19
- * 这里不能直接用require, webpack貌似有缓存
20
- * @param filepath
21
- */
22
- private readLocaleFileContent;
23
- private parseFile;
24
- private traverse;
25
- private buildProject;
26
- build(watch?: boolean): void;
27
- }
1
+ /// <reference types="node" />
2
+ import { Hash } from 'crypto';
3
+ /**
4
+ * 这个类的作用是把项目和所有相关的模块下的locales编译成为src/data/i18n中的数据
5
+ */
6
+ export default class LocaleBuilder {
7
+ asLib: boolean;
8
+ dependencies: string[];
9
+ pwd: string;
10
+ locales: Record<string, [string, string, string, object]>;
11
+ hash: Hash;
12
+ constructor(asLib?: boolean);
13
+ /**
14
+ * 将locales输出成为data/i18n.ts中的数据
15
+ * 如果有Dependency需要引出来
16
+ */
17
+ private outputDataFile;
18
+ /**
19
+ * 这里不能直接用require, webpack貌似有缓存
20
+ * @param filepath
21
+ */
22
+ private readLocaleFileContent;
23
+ private parseFile;
24
+ private traverse;
25
+ private buildProject;
26
+ build(watch?: boolean): void;
27
+ }