oak-domain 5.1.6 → 5.1.7

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.
@@ -14,18 +14,19 @@ export type OpSchema = EntityShape & {
14
14
  deActions: Actions;
15
15
  };
16
16
  export type OpAttr = keyof OpSchema;
17
- export type Schema = EntityShape & {
18
- relationId?: ForeignKey<"relation"> | null;
19
- pathId: ForeignKey<"path">;
20
- deActions: Actions;
17
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
18
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
19
+ export type Schema = OpSchema & {
21
20
  relation?: Relation.Schema | null;
22
21
  path: Path.Schema;
23
22
  modiEntity$entity?: Array<ModiEntity.Schema>;
24
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
25
23
  operEntity$entity?: Array<OperEntity.Schema>;
26
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
27
24
  } & {
28
25
  [A in ExpressionKey]?: any;
26
+ } & {
27
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
28
+ } & {
29
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
29
30
  };
30
31
  type AttrFilter = {
31
32
  id: Q_StringValue;
@@ -56,16 +57,18 @@ export type Projection = {
56
57
  modiEntity$entity?: ModiEntity.Selection & {
57
58
  $entity: "modiEntity";
58
59
  };
59
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
60
- $entity: "modiEntity";
61
- };
62
60
  operEntity$entity?: OperEntity.Selection & {
63
61
  $entity: "operEntity";
64
62
  };
65
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
63
+ } & Partial<ExprOp<OpAttr | string>> & {
64
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
65
+ $entity: "modiEntity";
66
+ };
67
+ } & {
68
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
66
69
  $entity: "operEntity";
67
70
  };
68
- } & Partial<ExprOp<OpAttr | string>>;
71
+ };
69
72
  type ActionAuthIdProjection = OneOf<{
70
73
  id: number;
71
74
  }>;
@@ -13,18 +13,17 @@ export type OpSchema = EntityShape & {
13
13
  data: Object;
14
14
  };
15
15
  export type OpAttr = keyof OpSchema;
16
- export type Schema = EntityShape & {
17
- module: String<64>;
18
- position: String<188>;
19
- namespace: String<256>;
20
- language: String<32>;
21
- data: Object;
16
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
17
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
18
+ export type Schema = OpSchema & {
22
19
  modiEntity$entity?: Array<ModiEntity.Schema>;
23
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
24
20
  operEntity$entity?: Array<OperEntity.Schema>;
25
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
26
21
  } & {
27
22
  [A in ExpressionKey]?: any;
23
+ } & {
24
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
25
+ } & {
26
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
28
27
  };
29
28
  type AttrFilter = {
30
29
  id: Q_StringValue;
@@ -55,16 +54,18 @@ export type Projection = {
55
54
  modiEntity$entity?: ModiEntity.Selection & {
56
55
  $entity: "modiEntity";
57
56
  };
58
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
59
- $entity: "modiEntity";
60
- };
61
57
  operEntity$entity?: OperEntity.Selection & {
62
58
  $entity: "operEntity";
63
59
  };
64
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
60
+ } & Partial<ExprOp<OpAttr | string>> & {
61
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
62
+ $entity: "modiEntity";
63
+ };
64
+ } & {
65
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
65
66
  $entity: "operEntity";
66
67
  };
67
- } & Partial<ExprOp<OpAttr | string>>;
68
+ };
68
69
  type I18nIdProjection = OneOf<{
69
70
  id: number;
70
71
  }>;
@@ -12,18 +12,21 @@ export type OpSchema = EntityShape & {
12
12
  iState: "normal" | "rollbacked";
13
13
  };
14
14
  export type OpAttr = keyof OpSchema;
15
- export type Schema = EntityShape & {
16
- entity: String<32>;
17
- entityId: String<64>;
18
- iState: "normal" | "rollbacked";
15
+ type Oper$logAggr = "oper$log$$aggr" | "oper$log$$0$$aggr" | "oper$log$$1$$aggr" | "oper$log$$2$$aggr" | "oper$log$$3$$aggr" | "oper$log$$4$$aggr" | "oper$log$$5$$aggr" | "oper$log$$6$$aggr" | "oper$log$$7$$aggr" | "oper$log$$8$$aggr" | "oper$log$$9$$aggr";
16
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
17
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
18
+ export type Schema = OpSchema & {
19
19
  oper$log?: Array<Oper.Schema>;
20
- oper$log$$aggr?: AggregationResult<Oper.Schema>;
21
20
  modiEntity$entity?: Array<ModiEntity.Schema>;
22
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
23
21
  operEntity$entity?: Array<OperEntity.Schema>;
24
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
25
22
  } & {
26
23
  [A in ExpressionKey]?: any;
24
+ } & {
25
+ [A in Oper$logAggr]?: AggregationResult<Oper.Schema>;
26
+ } & {
27
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
28
+ } & {
29
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
27
30
  };
28
31
  type AttrFilter = {
29
32
  id: Q_StringValue;
@@ -51,22 +54,25 @@ export type Projection = {
51
54
  oper$log?: Oper.Selection & {
52
55
  $entity: "oper";
53
56
  };
54
- oper$log$$aggr?: Oper.Aggregation & {
55
- $entity: "oper";
56
- };
57
57
  modiEntity$entity?: ModiEntity.Selection & {
58
58
  $entity: "modiEntity";
59
59
  };
60
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
61
- $entity: "modiEntity";
62
- };
63
60
  operEntity$entity?: OperEntity.Selection & {
64
61
  $entity: "operEntity";
65
62
  };
66
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
63
+ } & Partial<ExprOp<OpAttr | string>> & {
64
+ [A in Oper$logAggr]?: Oper.Aggregation & {
65
+ $entity: "oper";
66
+ };
67
+ } & {
68
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
69
+ $entity: "modiEntity";
70
+ };
71
+ } & {
72
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
67
73
  $entity: "operEntity";
68
74
  };
69
- } & Partial<ExprOp<OpAttr | string>>;
75
+ };
70
76
  type LogIdProjection = OneOf<{
71
77
  id: number;
72
78
  }>;
@@ -15,19 +15,13 @@ export type OpSchema = EntityShape & {
15
15
  iState?: IState | null;
16
16
  };
17
17
  export type OpAttr = keyof OpSchema;
18
- export type Schema = EntityShape & {
19
- targetEntity: String<32>;
20
- entity: String<32>;
21
- entityId: String<64>;
22
- action: String<24>;
23
- data: Object;
24
- filter?: Object | null;
25
- extra?: Object | null;
26
- iState?: IState | null;
18
+ type ModiEntity$modiAggr = "modiEntity$modi$$aggr" | "modiEntity$modi$$0$$aggr" | "modiEntity$modi$$1$$aggr" | "modiEntity$modi$$2$$aggr" | "modiEntity$modi$$3$$aggr" | "modiEntity$modi$$4$$aggr" | "modiEntity$modi$$5$$aggr" | "modiEntity$modi$$6$$aggr" | "modiEntity$modi$$7$$aggr" | "modiEntity$modi$$8$$aggr" | "modiEntity$modi$$9$$aggr";
19
+ export type Schema = OpSchema & {
27
20
  modiEntity$modi?: Array<ModiEntity.Schema>;
28
- modiEntity$modi$$aggr?: AggregationResult<ModiEntity.Schema>;
29
21
  } & {
30
22
  [A in ExpressionKey]?: any;
23
+ } & {
24
+ [A in ModiEntity$modiAggr]?: AggregationResult<ModiEntity.Schema>;
31
25
  };
32
26
  type AttrFilter = {
33
27
  id: Q_StringValue;
@@ -63,10 +57,11 @@ export type Projection = {
63
57
  modiEntity$modi?: ModiEntity.Selection & {
64
58
  $entity: "modiEntity";
65
59
  };
66
- modiEntity$modi$$aggr?: ModiEntity.Aggregation & {
60
+ } & Partial<ExprOp<OpAttr | string>> & {
61
+ [A in ModiEntity$modiAggr]?: ModiEntity.Aggregation & {
67
62
  $entity: "modiEntity";
68
63
  };
69
- } & Partial<ExprOp<OpAttr | string>>;
64
+ };
70
65
  type ModiIdProjection = OneOf<{
71
66
  id: number;
72
67
  }>;
@@ -21,10 +21,7 @@ export type OpSchema = EntityShape & {
21
21
  entityId: String<64>;
22
22
  };
23
23
  export type OpAttr = keyof OpSchema;
24
- export type Schema = EntityShape & {
25
- modiId: ForeignKey<"modi">;
26
- entity: "actionAuth" | "i18n" | "log" | "path" | "relation" | "relationAuth" | "user" | "userEntityClaim" | "userEntityGrant" | "userRelation" | string;
27
- entityId: String<64>;
24
+ export type Schema = OpSchema & {
28
25
  modi: Modi.Schema;
29
26
  actionAuth?: ActionAuth.Schema;
30
27
  i18n?: I18n.Schema;
@@ -20,23 +20,15 @@ export type OpSchema = EntityShape & {
20
20
  iState?: IState | null;
21
21
  };
22
22
  export type OpAttr = keyof OpSchema;
23
- export type Schema = EntityShape & {
24
- action: String<24>;
25
- data: Object;
26
- filter?: Object | null;
27
- extra?: Object | null;
28
- operatorId?: ForeignKey<"user"> | null;
29
- targetEntity: String<32>;
30
- bornAt?: Datetime | null;
31
- logId?: ForeignKey<"log"> | null;
32
- undoData?: Object | null;
33
- iState?: IState | null;
23
+ type OperEntity$operAggr = "operEntity$oper$$aggr" | "operEntity$oper$$0$$aggr" | "operEntity$oper$$1$$aggr" | "operEntity$oper$$2$$aggr" | "operEntity$oper$$3$$aggr" | "operEntity$oper$$4$$aggr" | "operEntity$oper$$5$$aggr" | "operEntity$oper$$6$$aggr" | "operEntity$oper$$7$$aggr" | "operEntity$oper$$8$$aggr" | "operEntity$oper$$9$$aggr";
24
+ export type Schema = OpSchema & {
34
25
  operator?: User.Schema | null;
35
26
  log?: Log.Schema | null;
36
27
  operEntity$oper?: Array<OperEntity.Schema>;
37
- operEntity$oper$$aggr?: AggregationResult<OperEntity.Schema>;
38
28
  } & {
39
29
  [A in ExpressionKey]?: any;
30
+ } & {
31
+ [A in OperEntity$operAggr]?: AggregationResult<OperEntity.Schema>;
40
32
  };
41
33
  type AttrFilter = {
42
34
  id: Q_StringValue;
@@ -80,10 +72,11 @@ export type Projection = {
80
72
  operEntity$oper?: OperEntity.Selection & {
81
73
  $entity: "operEntity";
82
74
  };
83
- operEntity$oper$$aggr?: OperEntity.Aggregation & {
75
+ } & Partial<ExprOp<OpAttr | string>> & {
76
+ [A in OperEntity$operAggr]?: OperEntity.Aggregation & {
84
77
  $entity: "operEntity";
85
78
  };
86
- } & Partial<ExprOp<OpAttr | string>>;
79
+ };
87
80
  type OperIdProjection = OneOf<{
88
81
  id: number;
89
82
  }>;
@@ -21,10 +21,7 @@ export type OpSchema = EntityShape & {
21
21
  entityId: String<64>;
22
22
  };
23
23
  export type OpAttr = keyof OpSchema;
24
- export type Schema = EntityShape & {
25
- operId: ForeignKey<"oper">;
26
- entity: "actionAuth" | "i18n" | "log" | "path" | "relation" | "relationAuth" | "user" | "userEntityClaim" | "userEntityGrant" | "userRelation" | string;
27
- entityId: String<64>;
24
+ export type Schema = OpSchema & {
28
25
  oper: Oper.Schema;
29
26
  actionAuth?: ActionAuth.Schema;
30
27
  i18n?: I18n.Schema;
@@ -15,22 +15,25 @@ export type OpSchema = EntityShape & {
15
15
  desc?: String<256> | null;
16
16
  };
17
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
- desc?: String<256> | null;
18
+ type ActionAuth$pathAggr = "actionAuth$path$$aggr" | "actionAuth$path$$0$$aggr" | "actionAuth$path$$1$$aggr" | "actionAuth$path$$2$$aggr" | "actionAuth$path$$3$$aggr" | "actionAuth$path$$4$$aggr" | "actionAuth$path$$5$$aggr" | "actionAuth$path$$6$$aggr" | "actionAuth$path$$7$$aggr" | "actionAuth$path$$8$$aggr" | "actionAuth$path$$9$$aggr";
19
+ type RelationAuth$pathAggr = "relationAuth$path$$aggr" | "relationAuth$path$$0$$aggr" | "relationAuth$path$$1$$aggr" | "relationAuth$path$$2$$aggr" | "relationAuth$path$$3$$aggr" | "relationAuth$path$$4$$aggr" | "relationAuth$path$$5$$aggr" | "relationAuth$path$$6$$aggr" | "relationAuth$path$$7$$aggr" | "relationAuth$path$$8$$aggr" | "relationAuth$path$$9$$aggr";
20
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
21
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
22
+ export type Schema = OpSchema & {
24
23
  actionAuth$path?: Array<ActionAuth.Schema>;
25
- actionAuth$path$$aggr?: AggregationResult<ActionAuth.Schema>;
26
24
  relationAuth$path?: Array<RelationAuth.Schema>;
27
- relationAuth$path$$aggr?: AggregationResult<RelationAuth.Schema>;
28
25
  modiEntity$entity?: Array<ModiEntity.Schema>;
29
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
30
26
  operEntity$entity?: Array<OperEntity.Schema>;
31
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
32
27
  } & {
33
28
  [A in ExpressionKey]?: any;
29
+ } & {
30
+ [A in ActionAuth$pathAggr]?: AggregationResult<ActionAuth.Schema>;
31
+ } & {
32
+ [A in RelationAuth$pathAggr]?: AggregationResult<RelationAuth.Schema>;
33
+ } & {
34
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
35
+ } & {
36
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
34
37
  };
35
38
  type AttrFilter = {
36
39
  id: Q_StringValue;
@@ -63,28 +66,32 @@ export type Projection = {
63
66
  actionAuth$path?: ActionAuth.Selection & {
64
67
  $entity: "actionAuth";
65
68
  };
66
- actionAuth$path$$aggr?: ActionAuth.Aggregation & {
67
- $entity: "actionAuth";
68
- };
69
69
  relationAuth$path?: RelationAuth.Selection & {
70
70
  $entity: "relationAuth";
71
71
  };
72
- relationAuth$path$$aggr?: RelationAuth.Aggregation & {
73
- $entity: "relationAuth";
74
- };
75
72
  modiEntity$entity?: ModiEntity.Selection & {
76
73
  $entity: "modiEntity";
77
74
  };
78
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
79
- $entity: "modiEntity";
80
- };
81
75
  operEntity$entity?: OperEntity.Selection & {
82
76
  $entity: "operEntity";
83
77
  };
84
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
78
+ } & Partial<ExprOp<OpAttr | string>> & {
79
+ [A in ActionAuth$pathAggr]?: ActionAuth.Aggregation & {
80
+ $entity: "actionAuth";
81
+ };
82
+ } & {
83
+ [A in RelationAuth$pathAggr]?: RelationAuth.Aggregation & {
84
+ $entity: "relationAuth";
85
+ };
86
+ } & {
87
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
88
+ $entity: "modiEntity";
89
+ };
90
+ } & {
91
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
85
92
  $entity: "operEntity";
86
93
  };
87
- } & Partial<ExprOp<OpAttr | string>>;
94
+ };
88
95
  type PathIdProjection = OneOf<{
89
96
  id: number;
90
97
  }>;
@@ -16,27 +16,37 @@ export type OpSchema = EntityShape & {
16
16
  display?: String<32> | null;
17
17
  };
18
18
  export type OpAttr = keyof OpSchema;
19
- export type Schema = EntityShape & {
20
- entity: String<32>;
21
- entityId?: String<64> | null;
22
- name?: String<32> | null;
23
- display?: String<32> | null;
19
+ type ActionAuth$relationAggr = "actionAuth$relation$$aggr" | "actionAuth$relation$$0$$aggr" | "actionAuth$relation$$1$$aggr" | "actionAuth$relation$$2$$aggr" | "actionAuth$relation$$3$$aggr" | "actionAuth$relation$$4$$aggr" | "actionAuth$relation$$5$$aggr" | "actionAuth$relation$$6$$aggr" | "actionAuth$relation$$7$$aggr" | "actionAuth$relation$$8$$aggr" | "actionAuth$relation$$9$$aggr";
20
+ type RelationAuth$sourceRelationAggr = "relationAuth$sourceRelation$$aggr" | "relationAuth$sourceRelation$$0$$aggr" | "relationAuth$sourceRelation$$1$$aggr" | "relationAuth$sourceRelation$$2$$aggr" | "relationAuth$sourceRelation$$3$$aggr" | "relationAuth$sourceRelation$$4$$aggr" | "relationAuth$sourceRelation$$5$$aggr" | "relationAuth$sourceRelation$$6$$aggr" | "relationAuth$sourceRelation$$7$$aggr" | "relationAuth$sourceRelation$$8$$aggr" | "relationAuth$sourceRelation$$9$$aggr";
21
+ type RelationAuth$destRelationAggr = "relationAuth$destRelation$$aggr" | "relationAuth$destRelation$$0$$aggr" | "relationAuth$destRelation$$1$$aggr" | "relationAuth$destRelation$$2$$aggr" | "relationAuth$destRelation$$3$$aggr" | "relationAuth$destRelation$$4$$aggr" | "relationAuth$destRelation$$5$$aggr" | "relationAuth$destRelation$$6$$aggr" | "relationAuth$destRelation$$7$$aggr" | "relationAuth$destRelation$$8$$aggr" | "relationAuth$destRelation$$9$$aggr";
22
+ type UserEntityClaim$relationAggr = "userEntityClaim$relation$$aggr" | "userEntityClaim$relation$$0$$aggr" | "userEntityClaim$relation$$1$$aggr" | "userEntityClaim$relation$$2$$aggr" | "userEntityClaim$relation$$3$$aggr" | "userEntityClaim$relation$$4$$aggr" | "userEntityClaim$relation$$5$$aggr" | "userEntityClaim$relation$$6$$aggr" | "userEntityClaim$relation$$7$$aggr" | "userEntityClaim$relation$$8$$aggr" | "userEntityClaim$relation$$9$$aggr";
23
+ type UserRelation$relationAggr = "userRelation$relation$$aggr" | "userRelation$relation$$0$$aggr" | "userRelation$relation$$1$$aggr" | "userRelation$relation$$2$$aggr" | "userRelation$relation$$3$$aggr" | "userRelation$relation$$4$$aggr" | "userRelation$relation$$5$$aggr" | "userRelation$relation$$6$$aggr" | "userRelation$relation$$7$$aggr" | "userRelation$relation$$8$$aggr" | "userRelation$relation$$9$$aggr";
24
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
25
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
26
+ export type Schema = OpSchema & {
24
27
  actionAuth$relation?: Array<ActionAuth.Schema>;
25
- actionAuth$relation$$aggr?: AggregationResult<ActionAuth.Schema>;
26
28
  relationAuth$sourceRelation?: Array<RelationAuth.Schema>;
27
- relationAuth$sourceRelation$$aggr?: AggregationResult<RelationAuth.Schema>;
28
29
  relationAuth$destRelation?: Array<RelationAuth.Schema>;
29
- relationAuth$destRelation$$aggr?: AggregationResult<RelationAuth.Schema>;
30
30
  userEntityClaim$relation?: Array<UserEntityClaim.Schema>;
31
- userEntityClaim$relation$$aggr?: AggregationResult<UserEntityClaim.Schema>;
32
31
  userRelation$relation?: Array<UserRelation.Schema>;
33
- userRelation$relation$$aggr?: AggregationResult<UserRelation.Schema>;
34
32
  modiEntity$entity?: Array<ModiEntity.Schema>;
35
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
36
33
  operEntity$entity?: Array<OperEntity.Schema>;
37
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
38
34
  } & {
39
35
  [A in ExpressionKey]?: any;
36
+ } & {
37
+ [A in ActionAuth$relationAggr]?: AggregationResult<ActionAuth.Schema>;
38
+ } & {
39
+ [A in RelationAuth$sourceRelationAggr]?: AggregationResult<RelationAuth.Schema>;
40
+ } & {
41
+ [A in RelationAuth$destRelationAggr]?: AggregationResult<RelationAuth.Schema>;
42
+ } & {
43
+ [A in UserEntityClaim$relationAggr]?: AggregationResult<UserEntityClaim.Schema>;
44
+ } & {
45
+ [A in UserRelation$relationAggr]?: AggregationResult<UserRelation.Schema>;
46
+ } & {
47
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
48
+ } & {
49
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
40
50
  };
41
51
  type AttrFilter = {
42
52
  id: Q_StringValue;
@@ -70,46 +80,53 @@ export type Projection = {
70
80
  actionAuth$relation?: ActionAuth.Selection & {
71
81
  $entity: "actionAuth";
72
82
  };
73
- actionAuth$relation$$aggr?: ActionAuth.Aggregation & {
74
- $entity: "actionAuth";
75
- };
76
83
  relationAuth$sourceRelation?: RelationAuth.Selection & {
77
84
  $entity: "relationAuth";
78
85
  };
79
- relationAuth$sourceRelation$$aggr?: RelationAuth.Aggregation & {
80
- $entity: "relationAuth";
81
- };
82
86
  relationAuth$destRelation?: RelationAuth.Selection & {
83
87
  $entity: "relationAuth";
84
88
  };
85
- relationAuth$destRelation$$aggr?: RelationAuth.Aggregation & {
86
- $entity: "relationAuth";
87
- };
88
89
  userEntityClaim$relation?: UserEntityClaim.Selection & {
89
90
  $entity: "userEntityClaim";
90
91
  };
91
- userEntityClaim$relation$$aggr?: UserEntityClaim.Aggregation & {
92
- $entity: "userEntityClaim";
93
- };
94
92
  userRelation$relation?: UserRelation.Selection & {
95
93
  $entity: "userRelation";
96
94
  };
97
- userRelation$relation$$aggr?: UserRelation.Aggregation & {
98
- $entity: "userRelation";
99
- };
100
95
  modiEntity$entity?: ModiEntity.Selection & {
101
96
  $entity: "modiEntity";
102
97
  };
103
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
104
- $entity: "modiEntity";
105
- };
106
98
  operEntity$entity?: OperEntity.Selection & {
107
99
  $entity: "operEntity";
108
100
  };
109
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
101
+ } & Partial<ExprOp<OpAttr | string>> & {
102
+ [A in ActionAuth$relationAggr]?: ActionAuth.Aggregation & {
103
+ $entity: "actionAuth";
104
+ };
105
+ } & {
106
+ [A in RelationAuth$sourceRelationAggr]?: RelationAuth.Aggregation & {
107
+ $entity: "relationAuth";
108
+ };
109
+ } & {
110
+ [A in RelationAuth$destRelationAggr]?: RelationAuth.Aggregation & {
111
+ $entity: "relationAuth";
112
+ };
113
+ } & {
114
+ [A in UserEntityClaim$relationAggr]?: UserEntityClaim.Aggregation & {
115
+ $entity: "userEntityClaim";
116
+ };
117
+ } & {
118
+ [A in UserRelation$relationAggr]?: UserRelation.Aggregation & {
119
+ $entity: "userRelation";
120
+ };
121
+ } & {
122
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
123
+ $entity: "modiEntity";
124
+ };
125
+ } & {
126
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
110
127
  $entity: "operEntity";
111
128
  };
112
- } & Partial<ExprOp<OpAttr | string>>;
129
+ };
113
130
  type RelationIdProjection = OneOf<{
114
131
  id: number;
115
132
  }>;
@@ -13,19 +13,20 @@ export type OpSchema = EntityShape & {
13
13
  destRelationId: ForeignKey<"relation">;
14
14
  };
15
15
  export type OpAttr = keyof OpSchema;
16
- export type Schema = EntityShape & {
17
- sourceRelationId: ForeignKey<"relation">;
18
- pathId: ForeignKey<"path">;
19
- destRelationId: ForeignKey<"relation">;
16
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
17
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
18
+ export type Schema = OpSchema & {
20
19
  sourceRelation: Relation.Schema;
21
20
  path: Path.Schema;
22
21
  destRelation: Relation.Schema;
23
22
  modiEntity$entity?: Array<ModiEntity.Schema>;
24
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
25
23
  operEntity$entity?: Array<OperEntity.Schema>;
26
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
27
24
  } & {
28
25
  [A in ExpressionKey]?: any;
26
+ } & {
27
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
28
+ } & {
29
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
29
30
  };
30
31
  type AttrFilter = {
31
32
  id: Q_StringValue;
@@ -58,16 +59,18 @@ export type Projection = {
58
59
  modiEntity$entity?: ModiEntity.Selection & {
59
60
  $entity: "modiEntity";
60
61
  };
61
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
62
- $entity: "modiEntity";
63
- };
64
62
  operEntity$entity?: OperEntity.Selection & {
65
63
  $entity: "operEntity";
66
64
  };
67
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
65
+ } & Partial<ExprOp<OpAttr | string>> & {
66
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
67
+ $entity: "modiEntity";
68
+ };
69
+ } & {
70
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
68
71
  $entity: "operEntity";
69
72
  };
70
- } & Partial<ExprOp<OpAttr | string>>;
73
+ };
71
74
  type RelationAuthIdProjection = OneOf<{
72
75
  id: number;
73
76
  }>;
@@ -18,27 +18,34 @@ export type OpSchema = EntityShape & {
18
18
  userState?: UserState | null;
19
19
  };
20
20
  export type OpAttr = keyof OpSchema;
21
- export type Schema = EntityShape & {
22
- name?: String<16> | null;
23
- nickname?: String<64> | null;
24
- password?: Text | null;
25
- refId?: ForeignKey<"user"> | null;
26
- userState?: UserState | null;
21
+ type Oper$operatorAggr = "oper$operator$$aggr" | "oper$operator$$0$$aggr" | "oper$operator$$1$$aggr" | "oper$operator$$2$$aggr" | "oper$operator$$3$$aggr" | "oper$operator$$4$$aggr" | "oper$operator$$5$$aggr" | "oper$operator$$6$$aggr" | "oper$operator$$7$$aggr" | "oper$operator$$8$$aggr" | "oper$operator$$9$$aggr";
22
+ type User$refAggr = "user$ref$$aggr" | "user$ref$$0$$aggr" | "user$ref$$1$$aggr" | "user$ref$$2$$aggr" | "user$ref$$3$$aggr" | "user$ref$$4$$aggr" | "user$ref$$5$$aggr" | "user$ref$$6$$aggr" | "user$ref$$7$$aggr" | "user$ref$$8$$aggr" | "user$ref$$9$$aggr";
23
+ type UserEntityClaim$userAggr = "userEntityClaim$user$$aggr" | "userEntityClaim$user$$0$$aggr" | "userEntityClaim$user$$1$$aggr" | "userEntityClaim$user$$2$$aggr" | "userEntityClaim$user$$3$$aggr" | "userEntityClaim$user$$4$$aggr" | "userEntityClaim$user$$5$$aggr" | "userEntityClaim$user$$6$$aggr" | "userEntityClaim$user$$7$$aggr" | "userEntityClaim$user$$8$$aggr" | "userEntityClaim$user$$9$$aggr";
24
+ type UserRelation$userAggr = "userRelation$user$$aggr" | "userRelation$user$$0$$aggr" | "userRelation$user$$1$$aggr" | "userRelation$user$$2$$aggr" | "userRelation$user$$3$$aggr" | "userRelation$user$$4$$aggr" | "userRelation$user$$5$$aggr" | "userRelation$user$$6$$aggr" | "userRelation$user$$7$$aggr" | "userRelation$user$$8$$aggr" | "userRelation$user$$9$$aggr";
25
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
26
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
27
+ export type Schema = OpSchema & {
27
28
  ref?: Schema | null;
28
29
  oper$operator?: Array<Oper.Schema>;
29
- oper$operator$$aggr?: AggregationResult<Oper.Schema>;
30
30
  user$ref?: Array<Schema>;
31
- user$ref$$aggr?: AggregationResult<Schema>;
32
31
  userEntityClaim$user?: Array<UserEntityClaim.Schema>;
33
- userEntityClaim$user$$aggr?: AggregationResult<UserEntityClaim.Schema>;
34
32
  userRelation$user?: Array<UserRelation.Schema>;
35
- userRelation$user$$aggr?: AggregationResult<UserRelation.Schema>;
36
33
  modiEntity$entity?: Array<ModiEntity.Schema>;
37
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
38
34
  operEntity$entity?: Array<OperEntity.Schema>;
39
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
40
35
  } & {
41
36
  [A in ExpressionKey]?: any;
37
+ } & {
38
+ [A in Oper$operatorAggr]?: AggregationResult<Oper.Schema>;
39
+ } & {
40
+ [A in User$refAggr]?: AggregationResult<Schema>;
41
+ } & {
42
+ [A in UserEntityClaim$userAggr]?: AggregationResult<UserEntityClaim.Schema>;
43
+ } & {
44
+ [A in UserRelation$userAggr]?: AggregationResult<UserRelation.Schema>;
45
+ } & {
46
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
47
+ } & {
48
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
42
49
  };
43
50
  type AttrFilter = {
44
51
  id: Q_StringValue;
@@ -75,40 +82,46 @@ export type Projection = {
75
82
  oper$operator?: Oper.Selection & {
76
83
  $entity: "oper";
77
84
  };
78
- oper$operator$$aggr?: Oper.Aggregation & {
79
- $entity: "oper";
80
- };
81
85
  user$ref?: Selection & {
82
86
  $entity: "user";
83
87
  };
84
- user$ref$$aggr?: Aggregation & {
85
- $entity: "user";
86
- };
87
88
  userEntityClaim$user?: UserEntityClaim.Selection & {
88
89
  $entity: "userEntityClaim";
89
90
  };
90
- userEntityClaim$user$$aggr?: UserEntityClaim.Aggregation & {
91
- $entity: "userEntityClaim";
92
- };
93
91
  userRelation$user?: UserRelation.Selection & {
94
92
  $entity: "userRelation";
95
93
  };
96
- userRelation$user$$aggr?: UserRelation.Aggregation & {
97
- $entity: "userRelation";
98
- };
99
94
  modiEntity$entity?: ModiEntity.Selection & {
100
95
  $entity: "modiEntity";
101
96
  };
102
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
103
- $entity: "modiEntity";
104
- };
105
97
  operEntity$entity?: OperEntity.Selection & {
106
98
  $entity: "operEntity";
107
99
  };
108
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
100
+ } & Partial<ExprOp<OpAttr | string>> & {
101
+ [A in Oper$operatorAggr]?: Oper.Aggregation & {
102
+ $entity: "oper";
103
+ };
104
+ } & {
105
+ [A in User$refAggr]?: Aggregation & {
106
+ $entity: "user";
107
+ };
108
+ } & {
109
+ [A in UserEntityClaim$userAggr]?: UserEntityClaim.Aggregation & {
110
+ $entity: "userEntityClaim";
111
+ };
112
+ } & {
113
+ [A in UserRelation$userAggr]?: UserRelation.Aggregation & {
114
+ $entity: "userRelation";
115
+ };
116
+ } & {
117
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
118
+ $entity: "modiEntity";
119
+ };
120
+ } & {
121
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
109
122
  $entity: "operEntity";
110
123
  };
111
- } & Partial<ExprOp<OpAttr | string>>;
124
+ };
112
125
  type UserIdProjection = OneOf<{
113
126
  id: number;
114
127
  refId: number;
@@ -18,22 +18,21 @@ export type OpSchema = EntityShape & {
18
18
  userRelationId: ForeignKey<"userRelation">;
19
19
  };
20
20
  export type OpAttr = keyof OpSchema;
21
- export type Schema = EntityShape & {
22
- uegId: ForeignKey<"userEntityGrant">;
23
- userId: ForeignKey<"user">;
24
- relationId: ForeignKey<"relation">;
25
- claimEntityId: String<64>;
26
- userRelationId: ForeignKey<"userRelation">;
21
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
22
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
23
+ export type Schema = OpSchema & {
27
24
  ueg: UserEntityGrant.Schema;
28
25
  user: User.Schema;
29
26
  relation: Relation.Schema;
30
27
  userRelation: UserRelation.Schema;
31
28
  modiEntity$entity?: Array<ModiEntity.Schema>;
32
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
33
29
  operEntity$entity?: Array<OperEntity.Schema>;
34
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
35
30
  } & {
36
31
  [A in ExpressionKey]?: any;
32
+ } & {
33
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
34
+ } & {
35
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
37
36
  };
38
37
  type AttrFilter = {
39
38
  id: Q_StringValue;
@@ -72,16 +71,18 @@ export type Projection = {
72
71
  modiEntity$entity?: ModiEntity.Selection & {
73
72
  $entity: "modiEntity";
74
73
  };
75
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
76
- $entity: "modiEntity";
77
- };
78
74
  operEntity$entity?: OperEntity.Selection & {
79
75
  $entity: "operEntity";
80
76
  };
81
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
77
+ } & Partial<ExprOp<OpAttr | string>> & {
78
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
79
+ $entity: "modiEntity";
80
+ };
81
+ } & {
82
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
82
83
  $entity: "operEntity";
83
84
  };
84
- } & Partial<ExprOp<OpAttr | string>>;
85
+ };
85
86
  type UserEntityClaimIdProjection = OneOf<{
86
87
  id: number;
87
88
  }>;
@@ -14,18 +14,21 @@ export type OpSchema = EntityShape & {
14
14
  relationIds: RelationIds;
15
15
  };
16
16
  export type OpAttr = keyof OpSchema;
17
- export type Schema = EntityShape & {
18
- relationEntity: String<32>;
19
- relationEntityFilter: Object;
20
- relationIds: RelationIds;
17
+ type UserEntityClaim$uegAggr = "userEntityClaim$ueg$$aggr" | "userEntityClaim$ueg$$0$$aggr" | "userEntityClaim$ueg$$1$$aggr" | "userEntityClaim$ueg$$2$$aggr" | "userEntityClaim$ueg$$3$$aggr" | "userEntityClaim$ueg$$4$$aggr" | "userEntityClaim$ueg$$5$$aggr" | "userEntityClaim$ueg$$6$$aggr" | "userEntityClaim$ueg$$7$$aggr" | "userEntityClaim$ueg$$8$$aggr" | "userEntityClaim$ueg$$9$$aggr";
18
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
19
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
20
+ export type Schema = OpSchema & {
21
21
  userEntityClaim$ueg?: Array<UserEntityClaim.Schema>;
22
- userEntityClaim$ueg$$aggr?: AggregationResult<UserEntityClaim.Schema>;
23
22
  modiEntity$entity?: Array<ModiEntity.Schema>;
24
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
25
23
  operEntity$entity?: Array<OperEntity.Schema>;
26
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
27
24
  } & {
28
25
  [A in ExpressionKey]?: any;
26
+ } & {
27
+ [A in UserEntityClaim$uegAggr]?: AggregationResult<UserEntityClaim.Schema>;
28
+ } & {
29
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
30
+ } & {
31
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
29
32
  };
30
33
  type AttrFilter = {
31
34
  id: Q_StringValue;
@@ -53,22 +56,25 @@ export type Projection = {
53
56
  userEntityClaim$ueg?: UserEntityClaim.Selection & {
54
57
  $entity: "userEntityClaim";
55
58
  };
56
- userEntityClaim$ueg$$aggr?: UserEntityClaim.Aggregation & {
57
- $entity: "userEntityClaim";
58
- };
59
59
  modiEntity$entity?: ModiEntity.Selection & {
60
60
  $entity: "modiEntity";
61
61
  };
62
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
63
- $entity: "modiEntity";
64
- };
65
62
  operEntity$entity?: OperEntity.Selection & {
66
63
  $entity: "operEntity";
67
64
  };
68
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
65
+ } & Partial<ExprOp<OpAttr | string>> & {
66
+ [A in UserEntityClaim$uegAggr]?: UserEntityClaim.Aggregation & {
67
+ $entity: "userEntityClaim";
68
+ };
69
+ } & {
70
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
71
+ $entity: "modiEntity";
72
+ };
73
+ } & {
74
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
69
75
  $entity: "operEntity";
70
76
  };
71
- } & Partial<ExprOp<OpAttr | string>>;
77
+ };
72
78
  type UserEntityGrantIdProjection = OneOf<{
73
79
  id: number;
74
80
  }>;
@@ -16,21 +16,23 @@ export type OpSchema = EntityShape & {
16
16
  entityId: String<64>;
17
17
  };
18
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>;
19
+ type UserEntityClaim$userRelationAggr = "userEntityClaim$userRelation$$aggr" | "userEntityClaim$userRelation$$0$$aggr" | "userEntityClaim$userRelation$$1$$aggr" | "userEntityClaim$userRelation$$2$$aggr" | "userEntityClaim$userRelation$$3$$aggr" | "userEntityClaim$userRelation$$4$$aggr" | "userEntityClaim$userRelation$$5$$aggr" | "userEntityClaim$userRelation$$6$$aggr" | "userEntityClaim$userRelation$$7$$aggr" | "userEntityClaim$userRelation$$8$$aggr" | "userEntityClaim$userRelation$$9$$aggr";
20
+ type ModiEntity$entityAggr = "modiEntity$entity$$aggr" | "modiEntity$entity$$0$$aggr" | "modiEntity$entity$$1$$aggr" | "modiEntity$entity$$2$$aggr" | "modiEntity$entity$$3$$aggr" | "modiEntity$entity$$4$$aggr" | "modiEntity$entity$$5$$aggr" | "modiEntity$entity$$6$$aggr" | "modiEntity$entity$$7$$aggr" | "modiEntity$entity$$8$$aggr" | "modiEntity$entity$$9$$aggr";
21
+ type OperEntity$entityAggr = "operEntity$entity$$aggr" | "operEntity$entity$$0$$aggr" | "operEntity$entity$$1$$aggr" | "operEntity$entity$$2$$aggr" | "operEntity$entity$$3$$aggr" | "operEntity$entity$$4$$aggr" | "operEntity$entity$$5$$aggr" | "operEntity$entity$$6$$aggr" | "operEntity$entity$$7$$aggr" | "operEntity$entity$$8$$aggr" | "operEntity$entity$$9$$aggr";
22
+ export type Schema = OpSchema & {
24
23
  user: User.Schema;
25
24
  relation: Relation.Schema;
26
25
  userEntityClaim$userRelation?: Array<UserEntityClaim.Schema>;
27
- userEntityClaim$userRelation$$aggr?: AggregationResult<UserEntityClaim.Schema>;
28
26
  modiEntity$entity?: Array<ModiEntity.Schema>;
29
- modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
30
27
  operEntity$entity?: Array<OperEntity.Schema>;
31
- operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
32
28
  } & {
33
29
  [A in ExpressionKey]?: any;
30
+ } & {
31
+ [A in UserEntityClaim$userRelationAggr]?: AggregationResult<UserEntityClaim.Schema>;
32
+ } & {
33
+ [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
34
+ } & {
35
+ [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
34
36
  };
35
37
  type AttrFilter = {
36
38
  id: Q_StringValue;
@@ -64,22 +66,25 @@ export type Projection = {
64
66
  userEntityClaim$userRelation?: UserEntityClaim.Selection & {
65
67
  $entity: "userEntityClaim";
66
68
  };
67
- userEntityClaim$userRelation$$aggr?: UserEntityClaim.Aggregation & {
68
- $entity: "userEntityClaim";
69
- };
70
69
  modiEntity$entity?: ModiEntity.Selection & {
71
70
  $entity: "modiEntity";
72
71
  };
73
- modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
74
- $entity: "modiEntity";
75
- };
76
72
  operEntity$entity?: OperEntity.Selection & {
77
73
  $entity: "operEntity";
78
74
  };
79
- operEntity$entity$$aggr?: OperEntity.Aggregation & {
75
+ } & Partial<ExprOp<OpAttr | string>> & {
76
+ [A in UserEntityClaim$userRelationAggr]?: UserEntityClaim.Aggregation & {
77
+ $entity: "userEntityClaim";
78
+ };
79
+ } & {
80
+ [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
81
+ $entity: "modiEntity";
82
+ };
83
+ } & {
84
+ [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
80
85
  $entity: "operEntity";
81
86
  };
82
- } & Partial<ExprOp<OpAttr | string>>;
87
+ };
83
88
  type UserRelationIdProjection = OneOf<{
84
89
  id: number;
85
90
  }>;
@@ -285,7 +285,7 @@ function outputContext(depGraph, sourceFile, printer, filename) {
285
285
  const { statements } = sourceFile;
286
286
  const isBackend = filename.includes('BackendRuntimeContext');
287
287
  const statements2 = [
288
- factory.createImportDeclaration(undefined, factory.createImportClause(false, factory.createIdentifier(isBackend ? "BaseBackendRuntimeContext" : "BaseFrontendRuntimeContext"), undefined), factory.createStringLiteral(`${root}/es/context/${isBackend ? 'BackendRuntimeContext' : 'FrontendRuntimeContext'}`), undefined),
288
+ factory.createImportDeclaration(undefined, factory.createImportClause(false, factory.createIdentifier(isBackend ? "BaseBackendRuntimeContext" : "BaseFrontendRuntimeContext"), undefined), factory.createStringLiteral(`${root}/${isBackend ? 'lib' : 'es'}/context/${isBackend ? 'BackendRuntimeContext' : 'FrontendRuntimeContext'}`), undefined),
289
289
  ...statements
290
290
  ];
291
291
  const result = printer.printList(ts.ListFormat.SourceFileStatements, factory.createNodeArray(statements2), sourceFile);
@@ -1452,8 +1452,6 @@ function constructSchema(statements, entity) {
1452
1452
  foreignKeySet[entityName].forEach((foreignKey) => {
1453
1453
  const identifier = `${entityNameLc}$${foreignKey}`;
1454
1454
  members2.push(factory.createPropertySignature(undefined, identifier, factory.createToken(ts.SyntaxKind.QuestionToken), factory.createTypeReferenceNode(factory.createIdentifier("Array"), [factory.createTypeReferenceNode(createForeignRef(entity, entityName, 'Schema'), undefined)])));
1455
- const aggrIdentifier = `${entityNameLc}$${foreignKey}$$aggr`;
1456
- members2.push(factory.createPropertySignature(undefined, aggrIdentifier, factory.createToken(ts.SyntaxKind.QuestionToken), factory.createTypeReferenceNode(factory.createIdentifier("AggregationResult"), [factory.createTypeReferenceNode(createForeignRef(entity, entityName, 'Schema'), undefined)])));
1457
1455
  });
1458
1456
  }
1459
1457
  }
@@ -1472,12 +1470,28 @@ function constructSchema(statements, entity) {
1472
1470
  factory.createTypeReferenceNode('EntityShape'),
1473
1471
  factory.createTypeLiteralNode(members)
1474
1472
  ])), factory.createTypeAliasDeclaration([factory.createModifier(ts.SyntaxKind.ExportKeyword)], factory.createIdentifier("OpAttr"), undefined, factory.createTypeOperatorNode(ts.SyntaxKind.KeyOfKeyword, factory.createTypeReferenceNode(factory.createIdentifier("OpSchema"), undefined))));
1473
+ const otmAggrMappedNodes = [];
1474
+ for (const entityName in foreignKeySet) {
1475
+ const entityNameLc = (0, string_1.firstLetterLowerCase)(entityName);
1476
+ foreignKeySet[entityName].forEach((foreignKey) => {
1477
+ const typeAliasIdentifier = `${entityName}$${foreignKey}Aggr`;
1478
+ const typeStringLiterals = [`${entityNameLc}$${foreignKey}$$aggr`];
1479
+ let i = 0;
1480
+ while (i < 10) {
1481
+ typeStringLiterals.push(`${entityNameLc}$${foreignKey}$$${i}$$aggr`);
1482
+ i++;
1483
+ }
1484
+ statements.push(factory.createTypeAliasDeclaration(undefined, factory.createIdentifier(typeAliasIdentifier), undefined, factory.createUnionTypeNode(typeStringLiterals.map(literal => factory.createLiteralTypeNode(factory.createStringLiteral(literal))))));
1485
+ otmAggrMappedNodes.push(factory.createMappedTypeNode(undefined, factory.createTypeParameterDeclaration(undefined, factory.createIdentifier("A"), factory.createTypeReferenceNode(factory.createIdentifier(typeAliasIdentifier), undefined), undefined), undefined, factory.createToken(ts.SyntaxKind.QuestionToken), factory.createTypeReferenceNode(factory.createIdentifier("AggregationResult"), [factory.createTypeReferenceNode(createForeignRef(entity, entityName, 'Schema'), undefined)]), undefined));
1486
+ });
1487
+ }
1475
1488
  statements.push(factory.createTypeAliasDeclaration([
1476
1489
  factory.createModifier(ts.SyntaxKind.ExportKeyword)
1477
1490
  ], factory.createIdentifier('Schema'), undefined, factory.createIntersectionTypeNode([
1478
- factory.createTypeReferenceNode('EntityShape'),
1479
- factory.createTypeLiteralNode(members.concat(members2)),
1480
- factory.createMappedTypeNode(undefined, factory.createTypeParameterDeclaration(undefined, factory.createIdentifier("A"), factory.createTypeReferenceNode(factory.createIdentifier("ExpressionKey"), undefined), undefined), undefined, factory.createToken(ts.SyntaxKind.QuestionToken), factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword), undefined)
1491
+ factory.createTypeReferenceNode('OpSchema'),
1492
+ factory.createTypeLiteralNode(members2),
1493
+ factory.createMappedTypeNode(undefined, factory.createTypeParameterDeclaration(undefined, factory.createIdentifier("A"), factory.createTypeReferenceNode(factory.createIdentifier("ExpressionKey"), undefined), undefined), undefined, factory.createToken(ts.SyntaxKind.QuestionToken), factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword), undefined),
1494
+ ...otmAggrMappedNodes,
1481
1495
  ])));
1482
1496
  }
1483
1497
  /**
@@ -1777,6 +1791,7 @@ function constructProjection(statements, entity) {
1777
1791
  });
1778
1792
  }
1779
1793
  // 一对多的projection
1794
+ const otmAggrMappedNodes = [];
1780
1795
  const { [entity]: oneToManySet } = OneToMany;
1781
1796
  if (oneToManySet) {
1782
1797
  const foreignKeySet = {};
@@ -1793,7 +1808,7 @@ function constructProjection(statements, entity) {
1793
1808
  const entityNameLc = (0, string_1.firstLetterLowerCase)(entityName);
1794
1809
  foreignKeySet[entityName].forEach((foreignKey) => {
1795
1810
  const identifier = `${entityNameLc}$${foreignKey}`;
1796
- const aggrIdentifier = `${entityNameLc}$${foreignKey}$$aggr`;
1811
+ const typeAliasIdentifier = `${entityName}$${foreignKey}Aggr`;
1797
1812
  properties.push([identifier, false,
1798
1813
  factory.createIntersectionTypeNode([
1799
1814
  factory.createTypeReferenceNode(createForeignRef(entity, entityName, 'Selection'), undefined),
@@ -1815,14 +1830,13 @@ function constructProjection(statements, entity) {
1815
1830
  )
1816
1831
  ])
1817
1832
  ]) */
1818
- ], [aggrIdentifier, false,
1819
- factory.createIntersectionTypeNode([
1820
- factory.createTypeReferenceNode(createForeignRef(entity, entityName, 'Aggregation'), undefined),
1821
- factory.createTypeLiteralNode([
1822
- factory.createPropertySignature(undefined, factory.createIdentifier("$entity"), undefined, factory.createLiteralTypeNode(factory.createStringLiteral((0, string_1.firstLetterLowerCase)(entityName))))
1823
- ])
1824
- ])
1825
1833
  ]);
1834
+ otmAggrMappedNodes.push(factory.createMappedTypeNode(undefined, factory.createTypeParameterDeclaration(undefined, factory.createIdentifier("A"), factory.createTypeReferenceNode(factory.createIdentifier(typeAliasIdentifier), undefined), undefined), undefined, factory.createToken(ts.SyntaxKind.QuestionToken), factory.createIntersectionTypeNode([
1835
+ factory.createTypeReferenceNode(createForeignRef(entity, entityName, 'Aggregation'), undefined),
1836
+ factory.createTypeLiteralNode([
1837
+ factory.createPropertySignature(undefined, factory.createIdentifier("$entity"), undefined, factory.createLiteralTypeNode(factory.createStringLiteral((0, string_1.firstLetterLowerCase)(entityName))))
1838
+ ])
1839
+ ]), undefined));
1826
1840
  });
1827
1841
  }
1828
1842
  }
@@ -1848,6 +1862,7 @@ function constructProjection(statements, entity) {
1848
1862
  return factory.createPropertySignature(undefined, n, q ? undefined : factory.createToken(ts.SyntaxKind.QuestionToken), v || factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword));
1849
1863
  }))),
1850
1864
  exprNode,
1865
+ ...otmAggrMappedNodes,
1851
1866
  ])));
1852
1867
  // ExportProjection,下载查询的投影
1853
1868
  // 已经废弃。By Xc 2023.01.08
@@ -361,5 +361,42 @@ exports.logTriggers = [
361
361
  }, {});
362
362
  return (result.oper?.remove || 0) + (result2.log?.remove || 0);
363
363
  }
364
- }
364
+ },
365
+ // 在删除log时,解除与此log关联的oper
366
+ {
367
+ name: '当删除log时,解除与此log关联的oper',
368
+ entity: 'log',
369
+ action: 'remove',
370
+ when: 'before',
371
+ fn: async ({ operation }, context) => {
372
+ const { filter } = operation;
373
+ (0, assert_1.default)(filter);
374
+ // 查询这次删除操作涉及到的所有log
375
+ const logs = await context.select('log', {
376
+ data: {
377
+ id: 1,
378
+ oper$log: {
379
+ $entity: 'oper',
380
+ data: {
381
+ id: 1,
382
+ },
383
+ },
384
+ },
385
+ filter,
386
+ }, {});
387
+ const operIds = logs.flatMap(log => log.oper$log.map(oper => oper.id));
388
+ let result = 0;
389
+ for (const operId of operIds) {
390
+ const result2 = await context.operate('oper', {
391
+ id: operId,
392
+ action: 'update',
393
+ data: {
394
+ logId: null,
395
+ },
396
+ }, {});
397
+ result += result2.oper?.update || 0;
398
+ }
399
+ return result;
400
+ }
401
+ },
365
402
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oak-domain",
3
- "version": "5.1.6",
3
+ "version": "5.1.7",
4
4
  "author": {
5
5
  "name": "XuChang"
6
6
  },