oak-domain 2.6.10 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/lib/actions/action.d.ts +1 -1
  2. package/lib/actions/action.js +2 -2
  3. package/lib/base-app-domain/ActionAuth/Schema.d.ts +25 -21
  4. package/lib/base-app-domain/ActionAuth/Storage.js +6 -13
  5. package/lib/base-app-domain/ActionDefDict.d.ts +1 -0
  6. package/lib/base-app-domain/ActionDefDict.js +3 -1
  7. package/lib/base-app-domain/EntityDict.d.ts +2 -0
  8. package/lib/base-app-domain/I18n/Schema.d.ts +129 -0
  9. package/lib/base-app-domain/I18n/Schema.js +2 -0
  10. package/lib/base-app-domain/I18n/Storage.d.ts +3 -0
  11. package/lib/base-app-domain/I18n/Storage.js +59 -0
  12. package/lib/base-app-domain/Modi/Action.d.ts +1 -1
  13. package/lib/base-app-domain/Modi/Schema.d.ts +10 -9
  14. package/lib/base-app-domain/ModiEntity/Schema.d.ts +42 -28
  15. package/lib/base-app-domain/ModiEntity/Storage.js +1 -1
  16. package/lib/base-app-domain/Oper/Schema.d.ts +15 -13
  17. package/lib/base-app-domain/OperEntity/Schema.d.ts +41 -27
  18. package/lib/base-app-domain/OperEntity/Storage.js +1 -1
  19. package/lib/base-app-domain/Relation/Schema.d.ts +50 -22
  20. package/lib/base-app-domain/Relation/Storage.js +1 -4
  21. package/lib/base-app-domain/Relation.d.ts +10 -0
  22. package/lib/base-app-domain/Relation.js +10 -0
  23. package/lib/base-app-domain/RelationAuth/Schema.d.ts +67 -43
  24. package/lib/base-app-domain/RelationAuth/Storage.js +9 -12
  25. package/lib/base-app-domain/Storage.js +20 -18
  26. package/lib/base-app-domain/User/Action.d.ts +1 -1
  27. package/lib/base-app-domain/User/Schema.d.ts +20 -14
  28. package/lib/base-app-domain/User/Storage.js +1 -2
  29. package/lib/base-app-domain/UserEntityGrant/Action.d.ts +5 -0
  30. package/lib/base-app-domain/UserEntityGrant/Action.js +5 -0
  31. package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +53 -17
  32. package/lib/base-app-domain/UserEntityGrant/Storage.js +5 -7
  33. package/lib/base-app-domain/UserRelation/Schema.d.ts +35 -16
  34. package/lib/base-app-domain/UserRelation/Storage.js +21 -1
  35. package/lib/base-app-domain/_SubQuery.d.ts +40 -4
  36. package/lib/base-app-domain/index.d.ts +1 -0
  37. package/lib/base-app-domain/index.js +1 -0
  38. package/lib/checkers/index.d.ts +2 -2
  39. package/lib/checkers/index.js +2 -5
  40. package/lib/compiler/env.d.ts +3 -1
  41. package/lib/compiler/env.js +12 -2
  42. package/lib/compiler/localeBuilder.d.ts +22 -0
  43. package/lib/compiler/localeBuilder.js +169 -0
  44. package/lib/compiler/schemalBuilder.d.ts +9 -0
  45. package/lib/compiler/schemalBuilder.js +774 -362
  46. package/lib/entities/ActionAuth.d.ts +3 -2
  47. package/lib/entities/ActionAuth.js +21 -22
  48. package/lib/entities/I18n.d.ts +9 -0
  49. package/lib/entities/I18n.js +37 -0
  50. package/lib/entities/Modi.js +35 -33
  51. package/lib/entities/ModiEntity.js +12 -10
  52. package/lib/entities/Oper.js +15 -13
  53. package/lib/entities/OperEntity.js +12 -10
  54. package/lib/entities/Relation.d.ts +3 -3
  55. package/lib/entities/Relation.js +27 -25
  56. package/lib/entities/RelationAuth.d.ts +2 -5
  57. package/lib/entities/RelationAuth.js +27 -23
  58. package/lib/entities/User.js +20 -18
  59. package/lib/entities/UserEntityGrant.d.ts +2 -1
  60. package/lib/entities/UserEntityGrant.js +12 -7
  61. package/lib/entities/UserRelation.d.ts +3 -0
  62. package/lib/entities/UserRelation.js +30 -20
  63. package/lib/store/AsyncRowStore.d.ts +3 -0
  64. package/lib/store/AsyncRowStore.js +3 -0
  65. package/lib/store/CascadeStore.d.ts +9 -3
  66. package/lib/store/CascadeStore.js +247 -113
  67. package/lib/store/RelationAuth.d.ts +96 -0
  68. package/lib/store/RelationAuth.js +1307 -0
  69. package/lib/store/TriggerExecutor.d.ts +1 -2
  70. package/lib/store/TriggerExecutor.js +22 -22
  71. package/lib/store/actionAuth.d.ts +4 -0
  72. package/lib/store/actionAuth.js +40 -0
  73. package/lib/store/actionDef.d.ts +4 -3
  74. package/lib/store/actionDef.js +14 -10
  75. package/lib/store/checker.d.ts +2 -9
  76. package/lib/store/checker.js +39 -815
  77. package/lib/store/filter.d.ts +31 -18
  78. package/lib/store/filter.js +1256 -422
  79. package/lib/store/modi.d.ts +1 -1
  80. package/lib/store/modi.js +108 -9
  81. package/lib/store/relation.d.ts +3 -4
  82. package/lib/timers/oper.js +1 -1
  83. package/lib/timers/vaccum.js +2 -2
  84. package/lib/triggers/index.d.ts +2 -3
  85. package/lib/triggers/index.js +2 -5
  86. package/lib/types/Auth.d.ts +5 -0
  87. package/lib/types/DataType.d.ts +3 -0
  88. package/lib/types/Demand.d.ts +11 -0
  89. package/lib/types/Demand.js +2 -1
  90. package/lib/types/Entity.d.ts +10 -3
  91. package/lib/types/EntityDesc.d.ts +8 -0
  92. package/lib/types/EntityDesc.js +2 -0
  93. package/lib/types/Environment.d.ts +57 -0
  94. package/lib/types/Environment.js +2 -0
  95. package/lib/types/Exception.d.ts +6 -0
  96. package/lib/types/Exception.js +25 -1
  97. package/lib/types/Logger.d.ts +1 -0
  98. package/lib/types/RowStore.d.ts +6 -4
  99. package/lib/types/Style.d.ts +1 -1
  100. package/lib/types/Trigger.d.ts +4 -5
  101. package/lib/types/Trigger.js +11 -6
  102. package/lib/types/index.d.ts +2 -0
  103. package/lib/types/index.js +2 -0
  104. package/lib/utils/SimpleConnector.js +1 -1
  105. package/lib/utils/string.d.ts +6 -0
  106. package/lib/utils/string.js +13 -1
  107. package/lib/utils/uuid.d.ts +5 -0
  108. package/lib/utils/uuid.js +64 -1
  109. package/package.json +3 -3
  110. package/src/entities/ActionAuth.ts +25 -33
  111. package/src/entities/I18n.ts +46 -0
  112. package/src/entities/Modi.ts +36 -36
  113. package/src/entities/ModiEntity.ts +14 -13
  114. package/src/entities/Oper.ts +17 -16
  115. package/src/entities/OperEntity.ts +13 -11
  116. package/src/entities/Relation.ts +31 -37
  117. package/src/entities/RelationAuth.ts +31 -37
  118. package/src/entities/User.ts +24 -21
  119. package/src/entities/UserEntityGrant.ts +16 -14
  120. package/src/entities/UserRelation.ts +33 -27
  121. package/lib/triggers/modi.d.ts +0 -5
  122. package/lib/triggers/modi.js +0 -72
@@ -8,7 +8,7 @@ export declare type RelationAction = 'grant' | 'revoke';
8
8
  export declare const readOnlyActions: string[];
9
9
  export declare const appendOnlyActions: string[];
10
10
  export declare const excludeUpdateActions: string[];
11
- export declare const exludeRemoveActions: string[];
11
+ export declare const excludeRemoveActions: string[];
12
12
  export declare const genericActions: string[];
13
13
  export declare const relationActions: string[];
14
14
  export declare type AbleAction = 'enable' | 'disable';
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeAbleActionDef = exports.relationActions = exports.genericActions = exports.exludeRemoveActions = exports.excludeUpdateActions = exports.appendOnlyActions = exports.readOnlyActions = void 0;
3
+ exports.makeAbleActionDef = exports.relationActions = exports.genericActions = exports.excludeRemoveActions = exports.excludeUpdateActions = exports.appendOnlyActions = exports.readOnlyActions = void 0;
4
4
  exports.readOnlyActions = ['count', 'stat', 'download', 'select', 'aggregate'];
5
5
  exports.appendOnlyActions = exports.readOnlyActions.concat('create');
6
6
  exports.excludeUpdateActions = exports.appendOnlyActions.concat('remove');
7
- exports.exludeRemoveActions = exports.appendOnlyActions.concat('update');
7
+ exports.excludeRemoveActions = exports.appendOnlyActions.concat('update');
8
8
  exports.genericActions = exports.excludeUpdateActions.concat('update');
9
9
  exports.relationActions = ['grant', 'revoke'];
10
10
  var makeAbleActionDef = function (initialState) { return ({
@@ -1,26 +1,28 @@
1
- import { String, ForeignKey } from "../../types/DataType";
2
- import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "../../types/Demand";
1
+ import { ForeignKey, JsonProjection } from "../../types/DataType";
2
+ import { Q_DateValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, JsonFilter, SubQueryPredicateMetadata } from "../../types/Demand";
3
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";
4
+ import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult } from "../../types/Entity";
6
5
  import { GenericAction } from "../../actions/action";
6
+ import { String } from "../../types/DataType";
7
+ import { EntityShape } from "../../types/Entity";
7
8
  import * as Relation from "../Relation/Schema";
8
9
  import * as ModiEntity from "../ModiEntity/Schema";
9
10
  import * as OperEntity from "../OperEntity/Schema";
10
11
  declare type Actions = string[];
12
+ declare type Paths = string[];
11
13
  export declare type OpSchema = EntityShape & {
12
- relationId: ForeignKey<"relation">;
13
- path: String<256>;
14
+ relationId?: ForeignKey<"relation"> | null;
15
+ paths: Paths;
14
16
  destEntity: String<32>;
15
17
  deActions: Actions;
16
18
  };
17
19
  export declare type OpAttr = keyof OpSchema;
18
20
  export declare type Schema = EntityShape & {
19
- relationId: ForeignKey<"relation">;
20
- path: String<256>;
21
+ relationId?: ForeignKey<"relation"> | null;
22
+ paths: Paths;
21
23
  destEntity: String<32>;
22
24
  deActions: Actions;
23
- relation: Relation.Schema;
25
+ relation?: Relation.Schema | null;
24
26
  modiEntity$entity?: Array<ModiEntity.Schema>;
25
27
  modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
26
28
  operEntity$entity?: Array<OperEntity.Schema>;
@@ -29,15 +31,17 @@ export declare type Schema = EntityShape & {
29
31
  [A in ExpressionKey]?: any;
30
32
  };
31
33
  declare type AttrFilter = {
32
- id: Q_StringValue | SubQuery.ActionAuthIdSubQuery;
34
+ id: Q_StringValue;
33
35
  $$createAt$$: Q_DateValue;
34
36
  $$seq$$: Q_StringValue;
35
37
  $$updateAt$$: Q_DateValue;
36
- relationId: Q_StringValue | SubQuery.RelationIdSubQuery;
38
+ relationId: Q_StringValue;
37
39
  relation: Relation.Filter;
38
- path: Q_StringValue;
40
+ paths: JsonFilter<Paths>;
39
41
  destEntity: Q_StringValue;
40
- deActions: Q_EnumValue<Actions>;
42
+ deActions: JsonFilter<Actions>;
43
+ modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
44
+ operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
41
45
  };
42
46
  export declare type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
43
47
  export declare type Projection = {
@@ -49,9 +53,9 @@ export declare type Projection = {
49
53
  $$seq$$?: number;
50
54
  relationId?: number;
51
55
  relation?: Relation.Projection;
52
- path?: number;
56
+ paths?: number | JsonProjection<Paths>;
53
57
  destEntity?: number;
54
- deActions?: number;
58
+ deActions?: number | JsonProjection<Actions>;
55
59
  modiEntity$entity?: ModiEntity.Selection & {
56
60
  $entity: "modiEntity";
57
61
  };
@@ -84,7 +88,7 @@ export declare type SortAttr = {
84
88
  } | {
85
89
  relation: Relation.SortAttr;
86
90
  } | {
87
- path: number;
91
+ paths: number;
88
92
  } | {
89
93
  destEntity: number;
90
94
  } | {
@@ -98,16 +102,16 @@ export declare type SortNode = {
98
102
  };
99
103
  export declare type Sorter = SortNode[];
100
104
  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">;
105
+ export declare type Selection<P extends Object = Projection> = SelectOperation<P>;
102
106
  export declare type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
103
107
  export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "relationId">> & (({
104
108
  relationId?: never;
105
- relation: Relation.CreateSingleOperation;
109
+ relation?: Relation.CreateSingleOperation;
106
110
  } | {
107
- relationId: String<64>;
111
+ relationId: ForeignKey<"relation">;
108
112
  relation?: Relation.UpdateOperation;
109
113
  } | {
110
- relationId: String<64>;
114
+ relationId?: ForeignKey<"relation">;
111
115
  })) & {
112
116
  modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
113
117
  operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
@@ -126,7 +130,7 @@ export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "relatio
126
130
  relationId?: never;
127
131
  } | {
128
132
  relation?: never;
129
- relationId?: String<64> | null;
133
+ relationId?: ForeignKey<"relation"> | null;
130
134
  })) & {
131
135
  [k: string]: any;
132
136
  modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
@@ -5,16 +5,12 @@ var action_1 = require("../../actions/action");
5
5
  exports.desc = {
6
6
  attributes: {
7
7
  relationId: {
8
- notNull: true,
9
8
  type: "ref",
10
9
  ref: "relation"
11
10
  },
12
- path: {
11
+ paths: {
13
12
  notNull: true,
14
- type: "varchar",
15
- params: {
16
- length: 256
17
- }
13
+ type: "object"
18
14
  },
19
15
  destEntity: {
20
16
  notNull: true,
@@ -32,18 +28,15 @@ exports.desc = {
32
28
  actions: action_1.genericActions,
33
29
  indexes: [
34
30
  {
35
- name: 'index_relation_path',
31
+ name: 'index_entity_relation',
36
32
  attributes: [
37
33
  {
38
- name: "relationId"
34
+ name: 'destEntity'
39
35
  },
40
36
  {
41
- name: 'path'
37
+ name: "relationId"
42
38
  },
43
- ],
44
- config: {
45
- unique: true
46
- }
39
+ ]
47
40
  }
48
41
  ]
49
42
  };
@@ -5,4 +5,5 @@ export declare const ActionDefDict: {
5
5
  user: {
6
6
  userState: import("../types").ActionDef<string, string>;
7
7
  };
8
+ userEntityGrant: {};
8
9
  };
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionDefDict = void 0;
4
4
  var Action_1 = require("./Modi/Action");
5
5
  var Action_2 = require("./User/Action");
6
+ var Action_3 = require("./UserEntityGrant/Action");
6
7
  exports.ActionDefDict = {
7
8
  modi: Action_1.ActionDefDict,
8
- user: Action_2.ActionDefDict
9
+ user: Action_2.ActionDefDict,
10
+ userEntityGrant: Action_3.ActionDefDict
9
11
  };
@@ -1,4 +1,5 @@
1
1
  import { EntityDef as ActionAuth } from "./ActionAuth/Schema";
2
+ import { EntityDef as I18n } from "./I18n/Schema";
2
3
  import { EntityDef as Modi } from "./Modi/Schema";
3
4
  import { EntityDef as ModiEntity } from "./ModiEntity/Schema";
4
5
  import { EntityDef as Oper } from "./Oper/Schema";
@@ -10,6 +11,7 @@ import { EntityDef as UserEntityGrant } from "./UserEntityGrant/Schema";
10
11
  import { EntityDef as UserRelation } from "./UserRelation/Schema";
11
12
  export declare type EntityDict = {
12
13
  actionAuth: ActionAuth;
14
+ i18n: I18n;
13
15
  modi: Modi;
14
16
  modiEntity: ModiEntity;
15
17
  oper: Oper;
@@ -0,0 +1,129 @@
1
+ import { Q_DateValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "../../types/Demand";
2
+ import { OneOf } from "../../types/Polyfill";
3
+ import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult } from "../../types/Entity";
4
+ import { ReadOnlyAction } from "../../actions/action";
5
+ import { String } from "../../types/DataType";
6
+ import { EntityShape } from "../../types/Entity";
7
+ import * as ModiEntity from "../ModiEntity/Schema";
8
+ import * as OperEntity from "../OperEntity/Schema";
9
+ export declare type OpSchema = EntityShape & {
10
+ module: String<64>;
11
+ position: String<188>;
12
+ namespace: String<256>;
13
+ language: String<32>;
14
+ data: Object;
15
+ };
16
+ export declare type OpAttr = keyof OpSchema;
17
+ export declare type Schema = EntityShape & {
18
+ module: String<64>;
19
+ position: String<188>;
20
+ namespace: String<256>;
21
+ language: String<32>;
22
+ data: Object;
23
+ modiEntity$entity?: Array<ModiEntity.Schema>;
24
+ modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
25
+ operEntity$entity?: Array<OperEntity.Schema>;
26
+ operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
27
+ } & {
28
+ [A in ExpressionKey]?: any;
29
+ };
30
+ declare type AttrFilter = {
31
+ id: Q_StringValue;
32
+ $$createAt$$: Q_DateValue;
33
+ $$seq$$: Q_StringValue;
34
+ $$updateAt$$: Q_DateValue;
35
+ module: Q_StringValue;
36
+ position: Q_StringValue;
37
+ namespace: Q_StringValue;
38
+ language: Q_StringValue;
39
+ data: Object;
40
+ modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
41
+ operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
42
+ };
43
+ export declare type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
44
+ export declare type Projection = {
45
+ "#id"?: NodeId;
46
+ [k: string]: any;
47
+ id?: number;
48
+ $$createAt$$?: number;
49
+ $$updateAt$$?: number;
50
+ $$seq$$?: number;
51
+ module?: number;
52
+ position?: number;
53
+ namespace?: number;
54
+ language?: number;
55
+ data?: number | Object;
56
+ modiEntity$entity?: ModiEntity.Selection & {
57
+ $entity: "modiEntity";
58
+ };
59
+ modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
60
+ $entity: "modiEntity";
61
+ };
62
+ operEntity$entity?: OperEntity.Selection & {
63
+ $entity: "operEntity";
64
+ };
65
+ operEntity$entity$$aggr?: OperEntity.Aggregation & {
66
+ $entity: "operEntity";
67
+ };
68
+ } & Partial<ExprOp<OpAttr | string>>;
69
+ declare type I18nIdProjection = OneOf<{
70
+ id: number;
71
+ }>;
72
+ export declare type SortAttr = {
73
+ id: number;
74
+ } | {
75
+ $$createAt$$: number;
76
+ } | {
77
+ $$seq$$: number;
78
+ } | {
79
+ $$updateAt$$: number;
80
+ } | {
81
+ module: number;
82
+ } | {
83
+ position: number;
84
+ } | {
85
+ namespace: number;
86
+ } | {
87
+ language: number;
88
+ } | {
89
+ [k: string]: any;
90
+ } | OneOf<ExprOp<OpAttr | string>>;
91
+ export declare type SortNode = {
92
+ $attr: SortAttr;
93
+ $direction?: "asc" | "desc";
94
+ };
95
+ export declare type Sorter = SortNode[];
96
+ export declare type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
97
+ export declare type Selection<P extends Object = Projection> = SelectOperation<P>;
98
+ export declare type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
99
+ export declare type CreateOperationData = FormCreateData<OpSchema> & {
100
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
101
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
102
+ };
103
+ export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
104
+ export declare type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
105
+ export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
106
+ export declare type UpdateOperationData = FormUpdateData<OpSchema> & {
107
+ [k: string]: any;
108
+ modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
109
+ operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
110
+ };
111
+ export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
112
+ export declare type RemoveOperationData = {};
113
+ export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
114
+ export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation;
115
+ export declare type I18nIdSubQuery = Selection<I18nIdProjection>;
116
+ export declare type EntityDef = {
117
+ Schema: Schema;
118
+ OpSchema: OpSchema;
119
+ Action: OakMakeAction<ReadOnlyAction> | string;
120
+ Selection: Selection;
121
+ Aggregation: Aggregation;
122
+ Operation: Operation;
123
+ Create: CreateOperation;
124
+ Update: UpdateOperation;
125
+ Remove: RemoveOperation;
126
+ CreateSingle: CreateSingleOperation;
127
+ CreateMulti: CreateMultipleOperation;
128
+ };
129
+ 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,59 @@
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
+ module: {
8
+ notNull: true,
9
+ type: "varchar",
10
+ params: {
11
+ length: 64
12
+ }
13
+ },
14
+ position: {
15
+ notNull: true,
16
+ type: "varchar",
17
+ params: {
18
+ length: 188
19
+ }
20
+ },
21
+ namespace: {
22
+ notNull: true,
23
+ type: "varchar",
24
+ params: {
25
+ length: 256
26
+ }
27
+ },
28
+ language: {
29
+ notNull: true,
30
+ type: "varchar",
31
+ params: {
32
+ length: 32
33
+ }
34
+ },
35
+ data: {
36
+ notNull: true,
37
+ type: "object"
38
+ }
39
+ },
40
+ static: true,
41
+ actionType: "readOnly",
42
+ actions: action_1.readOnlyActions,
43
+ indexes: [
44
+ {
45
+ name: 'namespace_language',
46
+ attributes: [
47
+ {
48
+ name: 'namespace'
49
+ },
50
+ {
51
+ name: 'language'
52
+ }
53
+ ],
54
+ config: {
55
+ unique: true
56
+ }
57
+ }
58
+ ]
59
+ };
@@ -3,8 +3,8 @@ import { GenericAction } from "../../actions/action";
3
3
  export declare type IState = 'active' | 'applied' | 'abandoned' | string;
4
4
  export declare type IAction = 'apply' | 'abandon' | string;
5
5
  export declare type ParticularAction = IAction;
6
- export declare type Action = GenericAction | ParticularAction | string;
7
6
  export declare const actions: string[];
7
+ export declare type Action = GenericAction | ParticularAction | string;
8
8
  export declare const ActionDefDict: {
9
9
  iState: ActionDef<string, string>;
10
10
  };
@@ -1,9 +1,9 @@
1
- import { String } from "../../types/DataType";
2
- import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "../../types/Demand";
1
+ import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "../../types/Demand";
3
2
  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";
3
+ import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult } from "../../types/Entity";
6
4
  import { Action, ParticularAction, IState } from "./Action";
5
+ import { String } from "../../types/DataType";
6
+ import { EntityShape } from "../../types/Entity";
7
7
  import * as ModiEntity from "../ModiEntity/Schema";
8
8
  export declare type OpSchema = EntityShape & {
9
9
  targetEntity: String<32>;
@@ -31,7 +31,7 @@ export declare type Schema = EntityShape & {
31
31
  [A in ExpressionKey]?: any;
32
32
  };
33
33
  declare type AttrFilter = {
34
- id: Q_StringValue | SubQuery.ModiIdSubQuery;
34
+ id: Q_StringValue;
35
35
  $$createAt$$: Q_DateValue;
36
36
  $$seq$$: Q_StringValue;
37
37
  $$updateAt$$: Q_DateValue;
@@ -43,6 +43,7 @@ declare type AttrFilter = {
43
43
  filter: Object;
44
44
  extra: Object;
45
45
  iState: Q_EnumValue<IState>;
46
+ modiEntity$modi: ModiEntity.Filter & SubQueryPredicateMetadata;
46
47
  };
47
48
  export declare type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
48
49
  export declare type Projection = {
@@ -56,9 +57,9 @@ export declare type Projection = {
56
57
  entity?: number;
57
58
  entityId?: number;
58
59
  action?: number;
59
- data?: number;
60
- filter?: number;
61
- extra?: number;
60
+ data?: number | Object;
61
+ filter?: number | Object;
62
+ extra?: number | Object;
62
63
  iState?: number;
63
64
  modiEntity$modi?: ModiEntity.Selection & {
64
65
  $entity: "modiEntity";
@@ -97,7 +98,7 @@ export declare type SortNode = {
97
98
  };
98
99
  export declare type Sorter = SortNode[];
99
100
  export declare type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
100
- export declare type Selection<P extends Object = Projection> = Omit<SelectOperation<P>, "action">;
101
+ export declare type Selection<P extends Object = Projection> = SelectOperation<P>;
101
102
  export declare type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
102
103
  export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
103
104
  entity?: string;