oak-domain 2.6.8 → 2.6.10

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 (52) 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/ModiEntity/Schema.d.ts +112 -4
  7. package/lib/base-app-domain/ModiEntity/Storage.js +1 -1
  8. package/lib/base-app-domain/OperEntity/Schema.d.ts +112 -4
  9. package/lib/base-app-domain/OperEntity/Storage.js +1 -1
  10. package/lib/base-app-domain/Relation/Schema.d.ts +160 -0
  11. package/lib/base-app-domain/Relation/Schema.js +2 -0
  12. package/lib/base-app-domain/Relation/Storage.d.ts +3 -0
  13. package/lib/base-app-domain/Relation/Storage.js +57 -0
  14. package/lib/base-app-domain/RelationAuth/Schema.d.ts +156 -0
  15. package/lib/base-app-domain/RelationAuth/Schema.js +2 -0
  16. package/lib/base-app-domain/RelationAuth/Storage.d.ts +3 -0
  17. package/lib/base-app-domain/RelationAuth/Storage.js +49 -0
  18. package/lib/base-app-domain/Storage.js +20 -12
  19. package/lib/base-app-domain/User/Schema.d.ts +11 -0
  20. package/lib/base-app-domain/UserRelation/Schema.d.ts +175 -0
  21. package/lib/base-app-domain/UserRelation/Schema.js +2 -0
  22. package/lib/base-app-domain/UserRelation/Storage.d.ts +3 -0
  23. package/lib/base-app-domain/UserRelation/Storage.js +36 -0
  24. package/lib/base-app-domain/_SubQuery.d.ts +32 -0
  25. package/lib/entities/ActionAuth.d.ts +11 -0
  26. package/lib/entities/ActionAuth.js +30 -0
  27. package/lib/entities/Relation.d.ts +8 -0
  28. package/lib/entities/Relation.js +33 -0
  29. package/lib/entities/RelationAuth.d.ts +11 -0
  30. package/lib/entities/RelationAuth.js +30 -0
  31. package/lib/entities/UserRelation.d.ts +7 -0
  32. package/lib/entities/UserRelation.js +28 -0
  33. package/lib/store/CascadeStore.js +5 -4
  34. package/lib/store/actionDef.js +50 -36
  35. package/lib/store/checker.js +47 -19
  36. package/lib/types/Auth.d.ts +1 -1
  37. package/lib/types/Connector.d.ts +6 -0
  38. package/lib/types/Entity.d.ts +1 -0
  39. package/lib/types/Port.d.ts +3 -2
  40. package/lib/utils/SimpleConnector.d.ts +15 -2
  41. package/lib/utils/SimpleConnector.js +39 -4
  42. package/lib/utils/money.d.ts +2 -1
  43. package/lib/utils/money.js +17 -1
  44. package/lib/utils/version.d.ts +7 -0
  45. package/lib/utils/version.js +21 -0
  46. package/package.json +1 -1
  47. package/src/entities/ActionAuth.ts +49 -0
  48. package/src/entities/Relation.ts +49 -0
  49. package/src/entities/RelationAuth.ts +49 -0
  50. package/src/entities/UserRelation.ts +44 -0
  51. package/lib/checkers/SyncCheckExecutor.d.ts +0 -9
  52. 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,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;
@@ -15,7 +15,7 @@ exports.desc = {
15
15
  params: {
16
16
  length: 32
17
17
  },
18
- ref: ["user", "userEntityGrant"]
18
+ ref: ["actionAuth", "relation", "relationAuth", "user", "userEntityGrant", "userRelation"]
19
19
  },
20
20
  entityId: {
21
21
  notNull: true,
@@ -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 Oper from "../Oper/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
  operId: ForeignKey<"oper">;
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
  operId: ForeignKey<"oper">;
18
- entity: "user" | "userEntityGrant" | string;
22
+ entity: "actionAuth" | "relation" | "relationAuth" | "user" | "userEntityGrant" | "userRelation" | string;
19
23
  entityId: String<64>;
20
24
  oper: Oper.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
  oper: Oper.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
  oper?: Oper.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 OperEntityIdProjection = OneOf<{
54
70
  id: number;
@@ -56,12 +72,24 @@ declare type OperEntityIdProjection = OneOf<{
56
72
  declare type OperIdProjection = OneOf<{
57
73
  operId: 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>>;
@@ -99,6 +135,39 @@ export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity"
99
135
  } | {
100
136
  operId: String<64>;
101
137
  })) & ({
138
+ entity?: never;
139
+ entityId?: never;
140
+ actionAuth: ActionAuth.CreateSingleOperation;
141
+ } | {
142
+ entity: "actionAuth";
143
+ entityId: String<64>;
144
+ actionAuth: ActionAuth.UpdateOperation;
145
+ } | {
146
+ entity: "actionAuth";
147
+ entityId: String<64>;
148
+ } | {
149
+ entity?: never;
150
+ entityId?: never;
151
+ relation: Relation.CreateSingleOperation;
152
+ } | {
153
+ entity: "relation";
154
+ entityId: String<64>;
155
+ relation: Relation.UpdateOperation;
156
+ } | {
157
+ entity: "relation";
158
+ entityId: String<64>;
159
+ } | {
160
+ entity?: never;
161
+ entityId?: never;
162
+ relationAuth: RelationAuth.CreateSingleOperation;
163
+ } | {
164
+ entity: "relationAuth";
165
+ entityId: String<64>;
166
+ relationAuth: RelationAuth.UpdateOperation;
167
+ } | {
168
+ entity: "relationAuth";
169
+ entityId: String<64>;
170
+ } | {
102
171
  entity?: never;
103
172
  entityId?: never;
104
173
  user: User.CreateSingleOperation;
@@ -120,6 +189,17 @@ export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity"
120
189
  } | {
121
190
  entity: "userEntityGrant";
122
191
  entityId: String<64>;
192
+ } | {
193
+ entity?: never;
194
+ entityId?: never;
195
+ userRelation: UserRelation.CreateSingleOperation;
196
+ } | {
197
+ entity: "userRelation";
198
+ entityId: String<64>;
199
+ userRelation: UserRelation.UpdateOperation;
200
+ } | {
201
+ entity: "userRelation";
202
+ entityId: String<64>;
123
203
  } | {
124
204
  entity?: string;
125
205
  entityId?: string;
@@ -135,6 +215,18 @@ export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity"
135
215
  oper?: never;
136
216
  operId?: String<64> | null;
137
217
  })) & ({
218
+ actionAuth?: ActionAuth.CreateSingleOperation | ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
219
+ entityId?: never;
220
+ entity?: never;
221
+ } | {
222
+ relation?: Relation.CreateSingleOperation | Relation.UpdateOperation | Relation.RemoveOperation;
223
+ entityId?: never;
224
+ entity?: never;
225
+ } | {
226
+ relationAuth?: RelationAuth.CreateSingleOperation | RelationAuth.UpdateOperation | RelationAuth.RemoveOperation;
227
+ entityId?: never;
228
+ entity?: never;
229
+ } | {
138
230
  user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
139
231
  entityId?: never;
140
232
  entity?: never;
@@ -143,24 +235,40 @@ export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity"
143
235
  entityId?: never;
144
236
  entity?: never;
145
237
  } | {
146
- entity?: ("user" | "userEntityGrant" | string) | null;
238
+ userRelation?: UserRelation.CreateSingleOperation | UserRelation.UpdateOperation | UserRelation.RemoveOperation;
239
+ entityId?: never;
240
+ entity?: never;
241
+ } | {
242
+ entity?: ("actionAuth" | "relation" | "relationAuth" | "user" | "userEntityGrant" | "userRelation" | string) | null;
147
243
  entityId?: String<64> | null;
148
244
  }) & {
149
245
  [k: string]: any;
150
246
  };
151
247
  export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
152
248
  export declare type RemoveOperationData = {} & ({
249
+ actionAuth?: ActionAuth.UpdateOperation | ActionAuth.RemoveOperation;
250
+ } | {
251
+ relation?: Relation.UpdateOperation | Relation.RemoveOperation;
252
+ } | {
253
+ relationAuth?: RelationAuth.UpdateOperation | RelationAuth.RemoveOperation;
254
+ } | {
153
255
  user?: User.UpdateOperation | User.RemoveOperation;
154
256
  } | {
155
257
  userEntityGrant?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
258
+ } | {
259
+ userRelation?: UserRelation.UpdateOperation | UserRelation.RemoveOperation;
156
260
  } | {
157
261
  [k: string]: any;
158
262
  });
159
263
  export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
160
264
  export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation;
161
265
  export declare type OperIdSubQuery = Selection<OperIdProjection>;
266
+ export declare type ActionAuthIdSubQuery = Selection<ActionAuthIdProjection>;
267
+ export declare type RelationIdSubQuery = Selection<RelationIdProjection>;
268
+ export declare type RelationAuthIdSubQuery = Selection<RelationAuthIdProjection>;
162
269
  export declare type UserIdSubQuery = Selection<UserIdProjection>;
163
270
  export declare type UserEntityGrantIdSubQuery = Selection<UserEntityGrantIdProjection>;
271
+ export declare type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
164
272
  export declare type OperEntityIdSubQuery = Selection<OperEntityIdProjection>;
165
273
  export declare type EntityDef = {
166
274
  Schema: Schema;