oak-domain 2.6.7 → 2.6.9

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 (62) hide show
  1. package/lib/base-app-domain/ActionAuth/Schema.d.ts +156 -0
  2. package/lib/base-app-domain/ActionAuth/Schema.js +2 -0
  3. package/lib/base-app-domain/ActionAuth/Storage.d.ts +3 -0
  4. package/lib/base-app-domain/ActionAuth/Storage.js +49 -0
  5. package/lib/base-app-domain/EntityDict.d.ts +8 -0
  6. package/lib/base-app-domain/Modi/Storage.js +5 -0
  7. package/lib/base-app-domain/ModiEntity/Schema.d.ts +112 -4
  8. package/lib/base-app-domain/ModiEntity/Storage.js +4 -1
  9. package/lib/base-app-domain/Oper/Storage.js +3 -0
  10. package/lib/base-app-domain/OperEntity/Schema.d.ts +112 -4
  11. package/lib/base-app-domain/OperEntity/Storage.js +4 -1
  12. package/lib/base-app-domain/Relation/Schema.d.ts +160 -0
  13. package/lib/base-app-domain/Relation/Schema.js +2 -0
  14. package/lib/base-app-domain/Relation/Storage.d.ts +3 -0
  15. package/lib/base-app-domain/Relation/Storage.js +57 -0
  16. package/lib/base-app-domain/RelationAuth/Schema.d.ts +156 -0
  17. package/lib/base-app-domain/RelationAuth/Schema.js +2 -0
  18. package/lib/base-app-domain/RelationAuth/Storage.d.ts +3 -0
  19. package/lib/base-app-domain/RelationAuth/Storage.js +49 -0
  20. package/lib/base-app-domain/Storage.js +20 -12
  21. package/lib/base-app-domain/User/Schema.d.ts +11 -0
  22. package/lib/base-app-domain/UserEntityGrant/Storage.js +3 -0
  23. package/lib/base-app-domain/UserRelation/Schema.d.ts +175 -0
  24. package/lib/base-app-domain/UserRelation/Schema.js +2 -0
  25. package/lib/base-app-domain/UserRelation/Storage.d.ts +3 -0
  26. package/lib/base-app-domain/UserRelation/Storage.js +36 -0
  27. package/lib/base-app-domain/_SubQuery.d.ts +32 -0
  28. package/lib/checkers/index.js +1 -0
  29. package/lib/compiler/schemalBuilder.js +4 -1
  30. package/lib/entities/ActionAuth.d.ts +11 -0
  31. package/lib/entities/ActionAuth.js +30 -0
  32. package/lib/entities/Relation.d.ts +8 -0
  33. package/lib/entities/Relation.js +33 -0
  34. package/lib/entities/RelationAuth.d.ts +11 -0
  35. package/lib/entities/RelationAuth.js +30 -0
  36. package/lib/entities/UserRelation.d.ts +7 -0
  37. package/lib/entities/UserRelation.js +28 -0
  38. package/lib/store/CascadeStore.js +5 -4
  39. package/lib/store/checker.d.ts +1 -0
  40. package/lib/store/checker.js +200 -19
  41. package/lib/store/modi.js +2 -2
  42. package/lib/store/relation.js +1 -0
  43. package/lib/timers/vaccum.js +4 -4
  44. package/lib/types/Auth.d.ts +1 -1
  45. package/lib/types/Connector.d.ts +6 -0
  46. package/lib/types/Entity.d.ts +2 -1
  47. package/lib/types/Exception.d.ts +5 -2
  48. package/lib/types/Exception.js +15 -1
  49. package/lib/utils/SimpleConnector.d.ts +15 -2
  50. package/lib/utils/SimpleConnector.js +39 -4
  51. package/lib/utils/money.d.ts +2 -1
  52. package/lib/utils/money.js +17 -1
  53. package/lib/utils/validator.js +1 -1
  54. package/lib/utils/version.d.ts +7 -0
  55. package/lib/utils/version.js +21 -0
  56. package/package.json +1 -1
  57. package/src/entities/ActionAuth.ts +49 -0
  58. package/src/entities/Relation.ts +49 -0
  59. package/src/entities/RelationAuth.ts +49 -0
  60. package/src/entities/UserRelation.ts +44 -0
  61. package/lib/checkers/SyncCheckExecutor.d.ts +0 -9
  62. package/lib/checkers/SyncCheckExecutor.js +0 -103
@@ -0,0 +1,156 @@
1
+ import { String, ForeignKey } from "../../types/DataType";
2
+ import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "../../types/Demand";
3
+ import { OneOf } from "../../types/Polyfill";
4
+ import * as SubQuery from "../_SubQuery";
5
+ import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape, AggregationResult } from "../../types/Entity";
6
+ import { GenericAction } from "../../actions/action";
7
+ import * as Relation from "../Relation/Schema";
8
+ import * as ModiEntity from "../ModiEntity/Schema";
9
+ import * as OperEntity from "../OperEntity/Schema";
10
+ declare type Actions = string[];
11
+ export declare type OpSchema = EntityShape & {
12
+ relationId: ForeignKey<"relation">;
13
+ path: String<256>;
14
+ destEntity: String<32>;
15
+ deActions: Actions;
16
+ };
17
+ export declare type OpAttr = keyof OpSchema;
18
+ export declare type Schema = EntityShape & {
19
+ relationId: ForeignKey<"relation">;
20
+ path: String<256>;
21
+ destEntity: String<32>;
22
+ deActions: Actions;
23
+ relation: Relation.Schema;
24
+ modiEntity$entity?: Array<ModiEntity.Schema>;
25
+ modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
26
+ operEntity$entity?: Array<OperEntity.Schema>;
27
+ operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
28
+ } & {
29
+ [A in ExpressionKey]?: any;
30
+ };
31
+ declare type AttrFilter = {
32
+ id: Q_StringValue | SubQuery.ActionAuthIdSubQuery;
33
+ $$createAt$$: Q_DateValue;
34
+ $$seq$$: Q_StringValue;
35
+ $$updateAt$$: Q_DateValue;
36
+ relationId: Q_StringValue | SubQuery.RelationIdSubQuery;
37
+ relation: Relation.Filter;
38
+ path: Q_StringValue;
39
+ destEntity: Q_StringValue;
40
+ deActions: Q_EnumValue<Actions>;
41
+ };
42
+ export declare type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
43
+ export declare type Projection = {
44
+ "#id"?: NodeId;
45
+ [k: string]: any;
46
+ id?: number;
47
+ $$createAt$$?: number;
48
+ $$updateAt$$?: number;
49
+ $$seq$$?: number;
50
+ relationId?: number;
51
+ relation?: Relation.Projection;
52
+ path?: number;
53
+ destEntity?: number;
54
+ deActions?: number;
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
+ declare type ActionAuthIdProjection = OneOf<{
69
+ id: number;
70
+ }>;
71
+ declare type RelationIdProjection = OneOf<{
72
+ relationId: number;
73
+ }>;
74
+ export declare type SortAttr = {
75
+ id: number;
76
+ } | {
77
+ $$createAt$$: number;
78
+ } | {
79
+ $$seq$$: number;
80
+ } | {
81
+ $$updateAt$$: number;
82
+ } | {
83
+ relationId: number;
84
+ } | {
85
+ relation: Relation.SortAttr;
86
+ } | {
87
+ path: number;
88
+ } | {
89
+ destEntity: number;
90
+ } | {
91
+ deActions: number;
92
+ } | {
93
+ [k: string]: any;
94
+ } | OneOf<ExprOp<OpAttr | string>>;
95
+ export declare type SortNode = {
96
+ $attr: SortAttr;
97
+ $direction?: "asc" | "desc";
98
+ };
99
+ export declare type Sorter = SortNode[];
100
+ export declare type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
101
+ export declare type Selection<P extends Object = Projection> = Omit<SelectOperation<P>, "action">;
102
+ export declare type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
103
+ export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "relationId">> & (({
104
+ relationId?: never;
105
+ relation: Relation.CreateSingleOperation;
106
+ } | {
107
+ relationId: String<64>;
108
+ relation?: Relation.UpdateOperation;
109
+ } | {
110
+ relationId: String<64>;
111
+ })) & {
112
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
113
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
114
+ };
115
+ export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
116
+ export declare type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
117
+ export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
118
+ export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "relationId">> & (({
119
+ relation: Relation.CreateSingleOperation;
120
+ relationId?: never;
121
+ } | {
122
+ relation: Relation.UpdateOperation;
123
+ relationId?: never;
124
+ } | {
125
+ relation: Relation.RemoveOperation;
126
+ relationId?: never;
127
+ } | {
128
+ relation?: never;
129
+ relationId?: String<64> | null;
130
+ })) & {
131
+ [k: string]: any;
132
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
133
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
134
+ };
135
+ export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
136
+ export declare type RemoveOperationData = {} & (({
137
+ relation?: Relation.UpdateOperation | Relation.RemoveOperation;
138
+ }));
139
+ export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
140
+ export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation;
141
+ export declare type RelationIdSubQuery = Selection<RelationIdProjection>;
142
+ export declare type ActionAuthIdSubQuery = Selection<ActionAuthIdProjection>;
143
+ export declare type EntityDef = {
144
+ Schema: Schema;
145
+ OpSchema: OpSchema;
146
+ Action: OakMakeAction<GenericAction> | string;
147
+ Selection: Selection;
148
+ Aggregation: Aggregation;
149
+ Operation: Operation;
150
+ Create: CreateOperation;
151
+ Update: UpdateOperation;
152
+ Remove: RemoveOperation;
153
+ CreateSingle: CreateSingleOperation;
154
+ CreateMulti: CreateMultipleOperation;
155
+ };
156
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { StorageDesc } from "../../types/Storage";
2
+ import { OpSchema } from "./Schema";
3
+ export declare const desc: StorageDesc<OpSchema>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.desc = void 0;
4
+ var action_1 = require("../../actions/action");
5
+ exports.desc = {
6
+ attributes: {
7
+ relationId: {
8
+ notNull: true,
9
+ type: "ref",
10
+ ref: "relation"
11
+ },
12
+ path: {
13
+ notNull: true,
14
+ type: "varchar",
15
+ params: {
16
+ length: 256
17
+ }
18
+ },
19
+ destEntity: {
20
+ notNull: true,
21
+ type: "varchar",
22
+ params: {
23
+ length: 32
24
+ }
25
+ },
26
+ deActions: {
27
+ notNull: true,
28
+ type: "object"
29
+ }
30
+ },
31
+ actionType: "crud",
32
+ actions: action_1.genericActions,
33
+ indexes: [
34
+ {
35
+ name: 'index_relation_path',
36
+ attributes: [
37
+ {
38
+ name: "relationId"
39
+ },
40
+ {
41
+ name: 'path'
42
+ },
43
+ ],
44
+ config: {
45
+ unique: true
46
+ }
47
+ }
48
+ ]
49
+ };
@@ -1,14 +1,22 @@
1
+ import { EntityDef as ActionAuth } from "./ActionAuth/Schema";
1
2
  import { EntityDef as Modi } from "./Modi/Schema";
2
3
  import { EntityDef as ModiEntity } from "./ModiEntity/Schema";
3
4
  import { EntityDef as Oper } from "./Oper/Schema";
4
5
  import { EntityDef as OperEntity } from "./OperEntity/Schema";
6
+ import { EntityDef as Relation } from "./Relation/Schema";
7
+ import { EntityDef as RelationAuth } from "./RelationAuth/Schema";
5
8
  import { EntityDef as User } from "./User/Schema";
6
9
  import { EntityDef as UserEntityGrant } from "./UserEntityGrant/Schema";
10
+ import { EntityDef as UserRelation } from "./UserRelation/Schema";
7
11
  export declare type EntityDict = {
12
+ actionAuth: ActionAuth;
8
13
  modi: Modi;
9
14
  modiEntity: ModiEntity;
10
15
  oper: Oper;
11
16
  operEntity: OperEntity;
17
+ relation: Relation;
18
+ relationAuth: RelationAuth;
12
19
  user: User;
13
20
  userEntityGrant: UserEntityGrant;
21
+ userRelation: UserRelation;
14
22
  };
@@ -5,30 +5,35 @@ var Action_1 = require("./Action");
5
5
  exports.desc = {
6
6
  attributes: {
7
7
  targetEntity: {
8
+ notNull: true,
8
9
  type: "varchar",
9
10
  params: {
10
11
  length: 32
11
12
  }
12
13
  },
13
14
  entity: {
15
+ notNull: true,
14
16
  type: "varchar",
15
17
  params: {
16
18
  length: 32
17
19
  }
18
20
  },
19
21
  entityId: {
22
+ notNull: true,
20
23
  type: "varchar",
21
24
  params: {
22
25
  length: 64
23
26
  }
24
27
  },
25
28
  action: {
29
+ notNull: true,
26
30
  type: "varchar",
27
31
  params: {
28
32
  length: 16
29
33
  }
30
34
  },
31
35
  data: {
36
+ notNull: true,
32
37
  type: "object"
33
38
  },
34
39
  filter: {
@@ -5,21 +5,29 @@ import * as SubQuery from "../_SubQuery";
5
5
  import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
6
6
  import { AppendOnlyAction } from "../../actions/action";
7
7
  import * as Modi from "../Modi/Schema";
8
+ import * as ActionAuth from "../ActionAuth/Schema";
9
+ import * as Relation from "../Relation/Schema";
10
+ import * as RelationAuth from "../RelationAuth/Schema";
8
11
  import * as User from "../User/Schema";
9
12
  import * as UserEntityGrant from "../UserEntityGrant/Schema";
13
+ import * as UserRelation from "../UserRelation/Schema";
10
14
  export declare type OpSchema = EntityShape & {
11
15
  modiId: ForeignKey<"modi">;
12
- entity: "user" | "userEntityGrant" | string;
16
+ entity: "actionAuth" | "relation" | "relationAuth" | "user" | "userEntityGrant" | "userRelation" | string;
13
17
  entityId: String<64>;
14
18
  };
15
19
  export declare type OpAttr = keyof OpSchema;
16
20
  export declare type Schema = EntityShape & {
17
21
  modiId: ForeignKey<"modi">;
18
- entity: "user" | "userEntityGrant" | string;
22
+ entity: "actionAuth" | "relation" | "relationAuth" | "user" | "userEntityGrant" | "userRelation" | string;
19
23
  entityId: String<64>;
20
24
  modi: Modi.Schema;
25
+ actionAuth?: ActionAuth.Schema;
26
+ relation?: Relation.Schema;
27
+ relationAuth?: RelationAuth.Schema;
21
28
  user?: User.Schema;
22
29
  userEntityGrant?: UserEntityGrant.Schema;
30
+ userRelation?: UserRelation.Schema;
23
31
  } & {
24
32
  [A in ExpressionKey]?: any;
25
33
  };
@@ -32,10 +40,14 @@ declare type AttrFilter<E> = {
32
40
  modi: Modi.Filter;
33
41
  entity: E;
34
42
  entityId: Q_StringValue;
43
+ actionAuth: ActionAuth.Filter;
44
+ relation: Relation.Filter;
45
+ relationAuth: RelationAuth.Filter;
35
46
  user: User.Filter;
36
47
  userEntityGrant: UserEntityGrant.Filter;
48
+ userRelation: UserRelation.Filter;
37
49
  };
38
- export declare type Filter<E = Q_EnumValue<"user" | "userEntityGrant" | string>> = MakeFilter<AttrFilter<E> & ExprOp<OpAttr | string>>;
50
+ export declare type Filter<E = Q_EnumValue<"actionAuth" | "relation" | "relationAuth" | "user" | "userEntityGrant" | "userRelation" | string>> = MakeFilter<AttrFilter<E> & ExprOp<OpAttr | string>>;
39
51
  export declare type Projection = {
40
52
  "#id"?: NodeId;
41
53
  [k: string]: any;
@@ -47,8 +59,12 @@ export declare type Projection = {
47
59
  modi?: Modi.Projection;
48
60
  entity?: number;
49
61
  entityId?: number;
62
+ actionAuth?: ActionAuth.Projection;
63
+ relation?: Relation.Projection;
64
+ relationAuth?: RelationAuth.Projection;
50
65
  user?: User.Projection;
51
66
  userEntityGrant?: UserEntityGrant.Projection;
67
+ userRelation?: UserRelation.Projection;
52
68
  } & Partial<ExprOp<OpAttr | string>>;
53
69
  declare type ModiEntityIdProjection = OneOf<{
54
70
  id: number;
@@ -56,12 +72,24 @@ declare type ModiEntityIdProjection = OneOf<{
56
72
  declare type ModiIdProjection = OneOf<{
57
73
  modiId: number;
58
74
  }>;
75
+ declare type ActionAuthIdProjection = OneOf<{
76
+ entityId: number;
77
+ }>;
78
+ declare type RelationIdProjection = OneOf<{
79
+ entityId: number;
80
+ }>;
81
+ declare type RelationAuthIdProjection = OneOf<{
82
+ entityId: number;
83
+ }>;
59
84
  declare type UserIdProjection = OneOf<{
60
85
  entityId: number;
61
86
  }>;
62
87
  declare type UserEntityGrantIdProjection = OneOf<{
63
88
  entityId: number;
64
89
  }>;
90
+ declare type UserRelationIdProjection = OneOf<{
91
+ entityId: number;
92
+ }>;
65
93
  export declare type SortAttr = {
66
94
  id: number;
67
95
  } | {
@@ -78,10 +106,18 @@ export declare type SortAttr = {
78
106
  entity: number;
79
107
  } | {
80
108
  entityId: number;
109
+ } | {
110
+ actionAuth: ActionAuth.SortAttr;
111
+ } | {
112
+ relation: Relation.SortAttr;
113
+ } | {
114
+ relationAuth: RelationAuth.SortAttr;
81
115
  } | {
82
116
  user: User.SortAttr;
83
117
  } | {
84
118
  userEntityGrant: UserEntityGrant.SortAttr;
119
+ } | {
120
+ userRelation: UserRelation.SortAttr;
85
121
  } | {
86
122
  [k: string]: any;
87
123
  } | OneOf<ExprOp<OpAttr | string>>;
@@ -102,6 +138,39 @@ export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity"
102
138
  } | {
103
139
  modiId: String<64>;
104
140
  })) & ({
141
+ entity?: never;
142
+ entityId?: never;
143
+ actionAuth: ActionAuth.CreateSingleOperation;
144
+ } | {
145
+ entity: "actionAuth";
146
+ entityId: String<64>;
147
+ actionAuth: ActionAuth.UpdateOperation;
148
+ } | {
149
+ entity: "actionAuth";
150
+ entityId: String<64>;
151
+ } | {
152
+ entity?: never;
153
+ entityId?: never;
154
+ relation: Relation.CreateSingleOperation;
155
+ } | {
156
+ entity: "relation";
157
+ entityId: String<64>;
158
+ relation: Relation.UpdateOperation;
159
+ } | {
160
+ entity: "relation";
161
+ entityId: String<64>;
162
+ } | {
163
+ entity?: never;
164
+ entityId?: never;
165
+ relationAuth: RelationAuth.CreateSingleOperation;
166
+ } | {
167
+ entity: "relationAuth";
168
+ entityId: String<64>;
169
+ relationAuth: RelationAuth.UpdateOperation;
170
+ } | {
171
+ entity: "relationAuth";
172
+ entityId: String<64>;
173
+ } | {
105
174
  entity?: never;
106
175
  entityId?: never;
107
176
  user: User.CreateSingleOperation;
@@ -123,6 +192,17 @@ export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity"
123
192
  } | {
124
193
  entity: "userEntityGrant";
125
194
  entityId: String<64>;
195
+ } | {
196
+ entity?: never;
197
+ entityId?: never;
198
+ userRelation: UserRelation.CreateSingleOperation;
199
+ } | {
200
+ entity: "userRelation";
201
+ entityId: String<64>;
202
+ userRelation: UserRelation.UpdateOperation;
203
+ } | {
204
+ entity: "userRelation";
205
+ entityId: String<64>;
126
206
  } | {
127
207
  entity?: string;
128
208
  entityId?: string;
@@ -144,6 +224,18 @@ export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity"
144
224
  modi?: never;
145
225
  modiId?: String<64> | null;
146
226
  })) & ({
227
+ actionAuth?: ActionAuth.CreateSingleOperation | ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
228
+ entityId?: never;
229
+ entity?: never;
230
+ } | {
231
+ relation?: Relation.CreateSingleOperation | Relation.UpdateOperation | Relation.RemoveOperation;
232
+ entityId?: never;
233
+ entity?: never;
234
+ } | {
235
+ relationAuth?: RelationAuth.CreateSingleOperation | RelationAuth.UpdateOperation | RelationAuth.RemoveOperation;
236
+ entityId?: never;
237
+ entity?: never;
238
+ } | {
147
239
  user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
148
240
  entityId?: never;
149
241
  entity?: never;
@@ -152,7 +244,11 @@ export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity"
152
244
  entityId?: never;
153
245
  entity?: never;
154
246
  } | {
155
- entity?: ("user" | "userEntityGrant" | string) | null;
247
+ userRelation?: UserRelation.CreateSingleOperation | UserRelation.UpdateOperation | UserRelation.RemoveOperation;
248
+ entityId?: never;
249
+ entity?: never;
250
+ } | {
251
+ entity?: ("actionAuth" | "relation" | "relationAuth" | "user" | "userEntityGrant" | "userRelation" | string) | null;
156
252
  entityId?: String<64> | null;
157
253
  }) & {
158
254
  [k: string]: any;
@@ -161,17 +257,29 @@ export declare type UpdateOperation = OakOperation<"update" | string, UpdateOper
161
257
  export declare type RemoveOperationData = {} & (({
162
258
  modi?: Modi.UpdateOperation | Modi.RemoveOperation;
163
259
  })) & ({
260
+ actionAuth?: ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
261
+ } | {
262
+ relation?: Relation.UpdateOperation | Relation.RemoveOperation;
263
+ } | {
264
+ relationAuth?: RelationAuth.UpdateOperation | RelationAuth.RemoveOperation;
265
+ } | {
164
266
  user?: User.UpdateOperation | User.RemoveOperation;
165
267
  } | {
166
268
  userEntityGrant?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
269
+ } | {
270
+ userRelation?: UserRelation.UpdateOperation | UserRelation.RemoveOperation;
167
271
  } | {
168
272
  [k: string]: any;
169
273
  });
170
274
  export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
171
275
  export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation;
172
276
  export declare type ModiIdSubQuery = Selection<ModiIdProjection>;
277
+ export declare type ActionAuthIdSubQuery = Selection<ActionAuthIdProjection>;
278
+ export declare type RelationIdSubQuery = Selection<RelationIdProjection>;
279
+ export declare type RelationAuthIdSubQuery = Selection<RelationAuthIdProjection>;
173
280
  export declare type UserIdSubQuery = Selection<UserIdProjection>;
174
281
  export declare type UserEntityGrantIdSubQuery = Selection<UserEntityGrantIdProjection>;
282
+ export declare type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
175
283
  export declare type ModiEntityIdSubQuery = Selection<ModiEntityIdProjection>;
176
284
  export declare type EntityDef = {
177
285
  Schema: Schema;
@@ -5,17 +5,20 @@ var action_1 = require("../../actions/action");
5
5
  exports.desc = {
6
6
  attributes: {
7
7
  modiId: {
8
+ notNull: true,
8
9
  type: "ref",
9
10
  ref: "modi"
10
11
  },
11
12
  entity: {
13
+ notNull: true,
12
14
  type: "varchar",
13
15
  params: {
14
16
  length: 32
15
17
  },
16
- ref: ["user", "userEntityGrant"]
18
+ ref: ["actionAuth", "relation", "relationAuth", "user", "userEntityGrant", "userRelation"]
17
19
  },
18
20
  entityId: {
21
+ notNull: true,
19
22
  type: "varchar",
20
23
  params: {
21
24
  length: 64
@@ -5,12 +5,14 @@ var action_1 = require("../../actions/action");
5
5
  exports.desc = {
6
6
  attributes: {
7
7
  action: {
8
+ notNull: true,
8
9
  type: "varchar",
9
10
  params: {
10
11
  length: 16
11
12
  }
12
13
  },
13
14
  data: {
15
+ notNull: true,
14
16
  type: "object"
15
17
  },
16
18
  filter: {
@@ -24,6 +26,7 @@ exports.desc = {
24
26
  ref: "user"
25
27
  },
26
28
  targetEntity: {
29
+ notNull: true,
27
30
  type: "varchar",
28
31
  params: {
29
32
  length: 32