oak-domain 5.1.16 → 5.1.18

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 (96) hide show
  1. package/lib/base-app-domain/ActionAuth/Schema.d.ts +19 -171
  2. package/lib/base-app-domain/ActionAuth/Schema.js +2 -0
  3. package/lib/base-app-domain/ActionAuth/_baseSchema.d.ts +44 -0
  4. package/lib/base-app-domain/ActionAuth/_baseSchema.js +2 -0
  5. package/lib/base-app-domain/EntityDict.d.ts +695 -14
  6. package/lib/base-app-domain/I18n/Schema.d.ts +19 -129
  7. package/lib/base-app-domain/I18n/Schema.js +2 -0
  8. package/lib/base-app-domain/I18n/_baseSchema.d.ts +51 -0
  9. package/lib/base-app-domain/I18n/_baseSchema.js +2 -0
  10. package/lib/base-app-domain/Log/Schema.d.ts +19 -141
  11. package/lib/base-app-domain/Log/Schema.js +2 -0
  12. package/lib/base-app-domain/Log/Style.d.ts +2 -2
  13. package/lib/base-app-domain/Log/_baseSchema.d.ts +44 -0
  14. package/lib/base-app-domain/Log/_baseSchema.js +2 -0
  15. package/lib/base-app-domain/Modi/Schema.d.ts +19 -130
  16. package/lib/base-app-domain/Modi/Schema.js +2 -0
  17. package/lib/base-app-domain/Modi/Style.d.ts +2 -2
  18. package/lib/base-app-domain/Modi/_baseSchema.d.ts +61 -0
  19. package/lib/base-app-domain/Modi/_baseSchema.js +2 -0
  20. package/lib/base-app-domain/ModiEntity/Schema.d.ts +19 -367
  21. package/lib/base-app-domain/ModiEntity/Schema.js +2 -0
  22. package/lib/base-app-domain/ModiEntity/Storage.js +1 -2
  23. package/lib/base-app-domain/ModiEntity/_baseSchema.d.ts +44 -0
  24. package/lib/base-app-domain/ModiEntity/_baseSchema.js +2 -0
  25. package/lib/base-app-domain/Oper/Schema.d.ts +19 -201
  26. package/lib/base-app-domain/Oper/Schema.js +2 -0
  27. package/lib/base-app-domain/Oper/Style.d.ts +2 -2
  28. package/lib/base-app-domain/Oper/_baseSchema.d.ts +67 -0
  29. package/lib/base-app-domain/Oper/_baseSchema.js +2 -0
  30. package/lib/base-app-domain/OperEntity/Schema.d.ts +19 -367
  31. package/lib/base-app-domain/OperEntity/Schema.js +2 -0
  32. package/lib/base-app-domain/OperEntity/Storage.js +1 -2
  33. package/lib/base-app-domain/OperEntity/_baseSchema.d.ts +44 -0
  34. package/lib/base-app-domain/OperEntity/_baseSchema.js +2 -0
  35. package/lib/base-app-domain/Path/Schema.d.ts +19 -157
  36. package/lib/base-app-domain/Path/Schema.js +2 -0
  37. package/lib/base-app-domain/Path/_baseSchema.d.ts +52 -0
  38. package/lib/base-app-domain/Path/_baseSchema.js +2 -0
  39. package/lib/base-app-domain/Relation/Schema.d.ts +19 -198
  40. package/lib/base-app-domain/Relation/Schema.js +2 -0
  41. package/lib/base-app-domain/Relation/_baseSchema.d.ts +48 -0
  42. package/lib/base-app-domain/Relation/_baseSchema.js +2 -0
  43. package/lib/base-app-domain/RelationAuth/Schema.d.ts +19 -199
  44. package/lib/base-app-domain/RelationAuth/Schema.js +2 -0
  45. package/lib/base-app-domain/RelationAuth/_baseSchema.d.ts +41 -0
  46. package/lib/base-app-domain/RelationAuth/_baseSchema.js +2 -0
  47. package/lib/base-app-domain/User/Schema.d.ts +19 -222
  48. package/lib/base-app-domain/User/Schema.js +2 -0
  49. package/lib/base-app-domain/User/Style.d.ts +2 -2
  50. package/lib/base-app-domain/User/_baseSchema.d.ts +53 -0
  51. package/lib/base-app-domain/User/_baseSchema.js +2 -0
  52. package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +19 -264
  53. package/lib/base-app-domain/UserEntityClaim/Schema.js +2 -0
  54. package/lib/base-app-domain/UserEntityClaim/_baseSchema.d.ts +49 -0
  55. package/lib/base-app-domain/UserEntityClaim/_baseSchema.js +2 -0
  56. package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +19 -136
  57. package/lib/base-app-domain/UserEntityGrant/Schema.js +2 -0
  58. package/lib/base-app-domain/UserEntityGrant/_baseSchema.d.ts +46 -0
  59. package/lib/base-app-domain/UserEntityGrant/_baseSchema.js +2 -0
  60. package/lib/base-app-domain/UserRelation/Schema.d.ts +19 -212
  61. package/lib/base-app-domain/UserRelation/Schema.js +2 -0
  62. package/lib/base-app-domain/UserRelation/_baseSchema.d.ts +47 -0
  63. package/lib/base-app-domain/UserRelation/_baseSchema.js +2 -0
  64. package/lib/compiler/localeBuilder.d.ts +1 -0
  65. package/lib/compiler/localeBuilder.js +9 -2
  66. package/lib/compiler/schemalBuilder.d.ts +1 -0
  67. package/lib/compiler/schemalBuilder.js +1368 -186
  68. package/lib/data/i18n.d.ts +3 -0
  69. package/lib/data/i18n.js +32 -0
  70. package/lib/store/CascadeStore.d.ts +3 -3
  71. package/lib/store/CascadeStore.js +28 -27
  72. package/lib/store/RelationAuth.d.ts +1 -1
  73. package/lib/store/RelationAuth.js +6 -6
  74. package/lib/store/TriggerExecutor.js +11 -5
  75. package/lib/store/checker.js +1 -1
  76. package/lib/store/filter.d.ts +11 -11
  77. package/lib/store/filter.js +14 -8
  78. package/lib/store/modi.d.ts +2 -2
  79. package/lib/store/triggers.js +14 -14
  80. package/lib/timers/vaccum.d.ts +1 -1
  81. package/lib/types/Auth.d.ts +4 -4
  82. package/lib/types/Cluster.d.ts +1 -0
  83. package/lib/types/Configuration.d.ts +9 -0
  84. package/lib/types/Entity.d.ts +5 -1
  85. package/lib/types/EntityDesc.d.ts +1 -1
  86. package/lib/types/Exception.d.ts +26 -21
  87. package/lib/types/Exception.js +81 -71
  88. package/lib/types/Expression.d.ts +4 -1
  89. package/lib/types/Port.d.ts +1 -1
  90. package/lib/types/Trigger.d.ts +1 -1
  91. package/lib/types/Watcher.d.ts +3 -3
  92. package/lib/utils/projection.d.ts +2 -2
  93. package/lib/utils/relationPath.d.ts +4 -4
  94. package/lib/utils/relationPath.js +1 -1
  95. package/lib/utils/validator.d.ts +2 -2
  96. package/package.json +2 -2
@@ -1,129 +1,19 @@
1
- import { Q_DateValue, Q_NumberValue, 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, EntityShape } from "../../types/Entity";
4
- import { GenericAction } from "../../actions/action";
5
- import { String } from "../../types/DataType";
6
- import * as ModiEntity from "../ModiEntity/Schema";
7
- import * as OperEntity from "../OperEntity/Schema";
8
- export type OpSchema = EntityShape & {
9
- module: String<64>;
10
- position: String<188>;
11
- namespace: String<256>;
12
- language: String<32>;
13
- data: Object;
14
- };
15
- export type OpAttr = keyof OpSchema;
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
- modiEntity$entity?: Array<ModiEntity.Schema>;
20
- operEntity$entity?: Array<OperEntity.Schema>;
21
- } & {
22
- [A in ExpressionKey]?: any;
23
- } & {
24
- [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
25
- } & {
26
- [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
27
- };
28
- type AttrFilter = {
29
- id: Q_StringValue;
30
- $$createAt$$: Q_DateValue;
31
- $$seq$$: Q_NumberValue;
32
- $$updateAt$$: Q_DateValue;
33
- module: Q_StringValue;
34
- position: Q_StringValue;
35
- namespace: Q_StringValue;
36
- language: Q_StringValue;
37
- data: Object;
38
- modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
39
- operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
40
- };
41
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
42
- export type Projection = {
43
- "#id"?: NodeId;
44
- [k: string]: any;
45
- id?: number;
46
- $$createAt$$?: number;
47
- $$updateAt$$?: number;
48
- $$seq$$?: number;
49
- module?: number;
50
- position?: number;
51
- namespace?: number;
52
- language?: number;
53
- data?: number | Object;
54
- modiEntity$entity?: ModiEntity.Selection & {
55
- $entity: "modiEntity";
56
- };
57
- operEntity$entity?: OperEntity.Selection & {
58
- $entity: "operEntity";
59
- };
60
- } & Partial<ExprOp<OpAttr | string>> & {
61
- [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
62
- $entity: "modiEntity";
63
- };
64
- } & {
65
- [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
66
- $entity: "operEntity";
67
- };
68
- };
69
- type I18nIdProjection = OneOf<{
70
- id: number;
71
- }>;
72
- export 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 type SortNode = {
92
- $attr: SortAttr;
93
- $direction?: "asc" | "desc";
94
- };
95
- export type Sorter = SortNode[];
96
- export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
97
- export type Selection<P extends Object = Projection> = SelectOperation<P>;
98
- export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
99
- export 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 type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
104
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
105
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
106
- export 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 type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
112
- export type RemoveOperationData = {};
113
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
114
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
115
- export type I18nIdSubQuery = Selection<I18nIdProjection>;
116
- export type EntityDef = {
117
- Schema: Schema;
118
- OpSchema: OpSchema;
119
- Action: OakMakeAction<GenericAction> | 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 {};
1
+ export * from "./_baseSchema";
2
+ import { I18n } from "../EntityDict";
3
+ export type Schema = I18n["Schema"];
4
+ export type Action = I18n["Action"];
5
+ export type Projection = I18n["Projection"];
6
+ export type Filter = I18n["Filter"];
7
+ export type SortNode = I18n["SortNode"];
8
+ export type Sorter = I18n["Sorter"];
9
+ export type Selection = I18n["Selection"];
10
+ export type Aggregation = I18n["Aggregation"];
11
+ export type CreateOperationData = I18n["CreateOperationData"];
12
+ export type CreateSingle = I18n["CreateSingle"];
13
+ export type CreateMulti = I18n["CreateMulti"];
14
+ export type Create = I18n["Create"];
15
+ export type UpdateOperationData = I18n["UpdateOperationData"];
16
+ export type Update = I18n["Update"];
17
+ export type RemoveOperationData = I18n["RemoveOperationData"];
18
+ export type Remove = I18n["Remove"];
19
+ export type Operation = I18n["Operation"];
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./_baseSchema"), exports);
@@ -0,0 +1,51 @@
1
+ import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
2
+ import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
3
+ import { GenericAction } from "../../actions/action";
4
+ import { String } from "../../types/DataType";
5
+ export type OpSchema = EntityShape & {
6
+ module: String<64>;
7
+ position: String<188>;
8
+ namespace: String<256>;
9
+ language: String<32>;
10
+ data: Object;
11
+ } & {
12
+ [A in ExpressionKey]?: any;
13
+ };
14
+ export type OpAttr = keyof OpSchema;
15
+ export type OpFilter = {
16
+ id: Q_StringValue;
17
+ $$createAt$$: Q_DateValue;
18
+ $$seq$$: Q_NumberValue;
19
+ $$updateAt$$: Q_DateValue;
20
+ module: Q_StringValue;
21
+ position: Q_StringValue;
22
+ namespace: Q_StringValue;
23
+ language: Q_StringValue;
24
+ data: Object;
25
+ } & ExprOp<OpAttr | string>;
26
+ export type OpProjection = {
27
+ "#id"?: NodeId;
28
+ [k: string]: any;
29
+ id?: number;
30
+ $$createAt$$?: number;
31
+ $$updateAt$$?: number;
32
+ $$seq$$?: number;
33
+ module?: number;
34
+ position?: number;
35
+ namespace?: number;
36
+ language?: number;
37
+ data?: number | Object;
38
+ } & Partial<ExprOp<OpAttr | string>>;
39
+ export type OpSortAttr = Partial<{
40
+ id: number;
41
+ $$createAt$$: number;
42
+ $$seq$$: number;
43
+ $$updateAt$$: number;
44
+ module: number;
45
+ position: number;
46
+ namespace: number;
47
+ language: number;
48
+ [k: string]: any;
49
+ } | ExprOp<OpAttr | string>>;
50
+ export type OpAction = OakMakeAction<GenericAction | string>;
51
+ export type OpUpdateAction = "update" | string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,141 +1,19 @@
1
- import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, 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, EntityShape } from "../../types/Entity";
4
- import { Action, ParticularAction } from "./Action";
5
- import { String } from "../../types/DataType";
6
- import * as Oper from "../Oper/Schema";
7
- import * as ModiEntity from "../ModiEntity/Schema";
8
- import * as OperEntity from "../OperEntity/Schema";
9
- export type OpSchema = EntityShape & {
10
- entity: String<32>;
11
- entityId: String<64>;
12
- iState: "normal" | "rollbacked";
13
- };
14
- export type OpAttr = keyof OpSchema;
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
- oper$log?: Array<Oper.Schema>;
20
- modiEntity$entity?: Array<ModiEntity.Schema>;
21
- operEntity$entity?: Array<OperEntity.Schema>;
22
- } & {
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>;
30
- };
31
- type AttrFilter = {
32
- id: Q_StringValue;
33
- $$createAt$$: Q_DateValue;
34
- $$seq$$: Q_NumberValue;
35
- $$updateAt$$: Q_DateValue;
36
- entity: Q_StringValue;
37
- entityId: Q_StringValue;
38
- iState: Q_EnumValue<"normal" | "rollbacked">;
39
- oper$log: Oper.Filter & SubQueryPredicateMetadata;
40
- modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
41
- operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
42
- };
43
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
44
- export type Projection = {
45
- "#id"?: NodeId;
46
- [k: string]: any;
47
- id?: number;
48
- $$createAt$$?: number;
49
- $$updateAt$$?: number;
50
- $$seq$$?: number;
51
- entity?: number;
52
- entityId?: number;
53
- iState?: number;
54
- oper$log?: Oper.Selection & {
55
- $entity: "oper";
56
- };
57
- modiEntity$entity?: ModiEntity.Selection & {
58
- $entity: "modiEntity";
59
- };
60
- operEntity$entity?: OperEntity.Selection & {
61
- $entity: "operEntity";
62
- };
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 & {
73
- $entity: "operEntity";
74
- };
75
- };
76
- type LogIdProjection = OneOf<{
77
- id: number;
78
- }>;
79
- export type SortAttr = {
80
- id: number;
81
- } | {
82
- $$createAt$$: number;
83
- } | {
84
- $$seq$$: number;
85
- } | {
86
- $$updateAt$$: number;
87
- } | {
88
- entity: number;
89
- } | {
90
- entityId: number;
91
- } | {
92
- iState: number;
93
- } | {
94
- [k: string]: any;
95
- } | OneOf<ExprOp<OpAttr | string>>;
96
- export type SortNode = {
97
- $attr: SortAttr;
98
- $direction?: "asc" | "desc";
99
- };
100
- export type Sorter = SortNode[];
101
- export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
102
- export type Selection<P extends Object = Projection> = SelectOperation<P>;
103
- export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
104
- export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
105
- entity?: string;
106
- entityId?: string;
107
- [K: string]: any;
108
- }) & {
109
- oper$log?: OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "log" | "logId">, Omit<Oper.Filter, "log" | "logId">> | OakOperation<"create", Omit<Oper.CreateOperationData, "log" | "logId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "log" | "logId">> | OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "log" | "logId">, Omit<Oper.Filter, "log" | "logId">>>;
110
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
111
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
112
- };
113
- export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
114
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
115
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
116
- export type UpdateOperationData = FormUpdateData<OpSchema> & {
117
- [k: string]: any;
118
- oper$log?: OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "log" | "logId">, Omit<Oper.Filter, "log" | "logId">> | OakOperation<Oper.RemoveOperation["action"], Omit<Oper.RemoveOperationData, "log" | "logId">, Omit<Oper.Filter, "log" | "logId">> | OakOperation<"create", Omit<Oper.CreateOperationData, "log" | "logId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "log" | "logId">> | OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "log" | "logId">, Omit<Oper.Filter, "log" | "logId">> | OakOperation<Oper.RemoveOperation["action"], Omit<Oper.RemoveOperationData, "log" | "logId">, Omit<Oper.Filter, "log" | "logId">>>;
119
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
120
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
121
- };
122
- export type UpdateOperation = OakOperation<"update" | ParticularAction | string, UpdateOperationData, Filter, Sorter>;
123
- export type RemoveOperationData = {};
124
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
125
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
126
- export type LogIdSubQuery = Selection<LogIdProjection>;
127
- export type EntityDef = {
128
- Schema: Schema;
129
- OpSchema: OpSchema;
130
- Action: OakMakeAction<Action> | string;
131
- Selection: Selection;
132
- Aggregation: Aggregation;
133
- Operation: Operation;
134
- Create: CreateOperation;
135
- Update: UpdateOperation;
136
- Remove: RemoveOperation;
137
- CreateSingle: CreateSingleOperation;
138
- CreateMulti: CreateMultipleOperation;
139
- ParticularAction: ParticularAction;
140
- };
141
- export {};
1
+ export * from "./_baseSchema";
2
+ import { Log } from "../EntityDict";
3
+ export type Schema = Log["Schema"];
4
+ export type Action = Log["Action"];
5
+ export type Projection = Log["Projection"];
6
+ export type Filter = Log["Filter"];
7
+ export type SortNode = Log["SortNode"];
8
+ export type Sorter = Log["Sorter"];
9
+ export type Selection = Log["Selection"];
10
+ export type Aggregation = Log["Aggregation"];
11
+ export type CreateOperationData = Log["CreateOperationData"];
12
+ export type CreateSingle = Log["CreateSingle"];
13
+ export type CreateMulti = Log["CreateMulti"];
14
+ export type Create = Log["Create"];
15
+ export type UpdateOperationData = Log["UpdateOperationData"];
16
+ export type Update = Log["Update"];
17
+ export type RemoveOperationData = Log["RemoveOperationData"];
18
+ export type Remove = Log["Remove"];
19
+ export type Operation = Log["Operation"];
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./_baseSchema"), exports);
@@ -1,3 +1,3 @@
1
- import { EntityDef } from "./Schema";
1
+ import { Action, OpSchema } from "./Schema";
2
2
  import { StyleDef } from "../../types/Style";
3
- export declare const style: StyleDef<EntityDef["OpSchema"], EntityDef["Action"]>;
3
+ export declare const style: StyleDef<OpSchema, Action>;
@@ -0,0 +1,44 @@
1
+ import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
2
+ import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
3
+ import { Action, ParticularAction } from "./Action";
4
+ import { String } from "../../types/DataType";
5
+ export type OpSchema = EntityShape & {
6
+ entity: String<32>;
7
+ entityId: String<64>;
8
+ iState: "normal" | "rollbacked";
9
+ } & {
10
+ [A in ExpressionKey]?: any;
11
+ };
12
+ export type OpAttr = keyof OpSchema;
13
+ export type OpFilter = {
14
+ id: Q_StringValue;
15
+ $$createAt$$: Q_DateValue;
16
+ $$seq$$: Q_NumberValue;
17
+ $$updateAt$$: Q_DateValue;
18
+ entity: Q_StringValue;
19
+ entityId: Q_StringValue;
20
+ iState: Q_EnumValue<"normal" | "rollbacked">;
21
+ } & ExprOp<OpAttr | string>;
22
+ export type OpProjection = {
23
+ "#id"?: NodeId;
24
+ [k: string]: any;
25
+ id?: number;
26
+ $$createAt$$?: number;
27
+ $$updateAt$$?: number;
28
+ $$seq$$?: number;
29
+ entity?: number;
30
+ entityId?: number;
31
+ iState?: number;
32
+ } & Partial<ExprOp<OpAttr | string>>;
33
+ export type OpSortAttr = Partial<{
34
+ id: number;
35
+ $$createAt$$: number;
36
+ $$seq$$: number;
37
+ $$updateAt$$: number;
38
+ entity: number;
39
+ entityId: number;
40
+ iState: number;
41
+ [k: string]: any;
42
+ } | ExprOp<OpAttr | string>>;
43
+ export type OpAction = OakMakeAction<Action | string>;
44
+ export type OpUpdateAction = "update" | ParticularAction | string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,130 +1,19 @@
1
- import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, 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, EntityShape } from "../../types/Entity";
4
- import { Action, ParticularAction, IState } from "./Action";
5
- import { String } from "../../types/DataType";
6
- import * as ModiEntity from "../ModiEntity/Schema";
7
- export type OpSchema = EntityShape & {
8
- targetEntity: String<32>;
9
- entity: String<32>;
10
- entityId: String<64>;
11
- action: String<24>;
12
- data: Object;
13
- filter?: Object | null;
14
- extra?: Object | null;
15
- iState?: IState | null;
16
- };
17
- export type OpAttr = keyof OpSchema;
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 & {
20
- modiEntity$modi?: Array<ModiEntity.Schema>;
21
- } & {
22
- [A in ExpressionKey]?: any;
23
- } & {
24
- [A in ModiEntity$modiAggr]?: AggregationResult<ModiEntity.Schema>;
25
- };
26
- type AttrFilter = {
27
- id: Q_StringValue;
28
- $$createAt$$: Q_DateValue;
29
- $$seq$$: Q_NumberValue;
30
- $$updateAt$$: Q_DateValue;
31
- targetEntity: Q_StringValue;
32
- entity: Q_StringValue;
33
- entityId: Q_StringValue;
34
- action: Q_StringValue;
35
- data: Object;
36
- filter: Object;
37
- extra: Object;
38
- iState: Q_EnumValue<IState>;
39
- modiEntity$modi: ModiEntity.Filter & SubQueryPredicateMetadata;
40
- };
41
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
42
- export type Projection = {
43
- "#id"?: NodeId;
44
- [k: string]: any;
45
- id?: number;
46
- $$createAt$$?: number;
47
- $$updateAt$$?: number;
48
- $$seq$$?: number;
49
- targetEntity?: number;
50
- entity?: number;
51
- entityId?: number;
52
- action?: number;
53
- data?: number | Object;
54
- filter?: number | Object;
55
- extra?: number | Object;
56
- iState?: number;
57
- modiEntity$modi?: ModiEntity.Selection & {
58
- $entity: "modiEntity";
59
- };
60
- } & Partial<ExprOp<OpAttr | string>> & {
61
- [A in ModiEntity$modiAggr]?: ModiEntity.Aggregation & {
62
- $entity: "modiEntity";
63
- };
64
- };
65
- type ModiIdProjection = OneOf<{
66
- id: number;
67
- }>;
68
- export type SortAttr = {
69
- id: number;
70
- } | {
71
- $$createAt$$: number;
72
- } | {
73
- $$seq$$: number;
74
- } | {
75
- $$updateAt$$: number;
76
- } | {
77
- targetEntity: number;
78
- } | {
79
- entity: number;
80
- } | {
81
- entityId: number;
82
- } | {
83
- action: number;
84
- } | {
85
- iState: number;
86
- } | {
87
- [k: string]: any;
88
- } | OneOf<ExprOp<OpAttr | string>>;
89
- export type SortNode = {
90
- $attr: SortAttr;
91
- $direction?: "asc" | "desc";
92
- };
93
- export type Sorter = SortNode[];
94
- export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
95
- export type Selection<P extends Object = Projection> = SelectOperation<P>;
96
- export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
97
- export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
98
- entity?: string;
99
- entityId?: string;
100
- [K: string]: any;
101
- }) & {
102
- modiEntity$modi?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "modi" | "modiId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "modi" | "modiId">>>;
103
- };
104
- export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
105
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
106
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
107
- export type UpdateOperationData = FormUpdateData<OpSchema> & {
108
- [k: string]: any;
109
- modiEntity$modi?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "modi" | "modiId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "modi" | "modiId">>>;
110
- };
111
- export type UpdateOperation = OakOperation<"update" | ParticularAction | string, UpdateOperationData, Filter, Sorter>;
112
- export type RemoveOperationData = {};
113
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
114
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
115
- export type ModiIdSubQuery = Selection<ModiIdProjection>;
116
- export type EntityDef = {
117
- Schema: Schema;
118
- OpSchema: OpSchema;
119
- Action: OakMakeAction<Action> | 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
- ParticularAction: ParticularAction;
129
- };
130
- export {};
1
+ export * from "./_baseSchema";
2
+ import { Modi } from "../EntityDict";
3
+ export type Schema = Modi["Schema"];
4
+ export type Action = Modi["Action"];
5
+ export type Projection = Modi["Projection"];
6
+ export type Filter = Modi["Filter"];
7
+ export type SortNode = Modi["SortNode"];
8
+ export type Sorter = Modi["Sorter"];
9
+ export type Selection = Modi["Selection"];
10
+ export type Aggregation = Modi["Aggregation"];
11
+ export type CreateOperationData = Modi["CreateOperationData"];
12
+ export type CreateSingle = Modi["CreateSingle"];
13
+ export type CreateMulti = Modi["CreateMulti"];
14
+ export type Create = Modi["Create"];
15
+ export type UpdateOperationData = Modi["UpdateOperationData"];
16
+ export type Update = Modi["Update"];
17
+ export type RemoveOperationData = Modi["RemoveOperationData"];
18
+ export type Remove = Modi["Remove"];
19
+ export type Operation = Modi["Operation"];
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./_baseSchema"), exports);
@@ -1,3 +1,3 @@
1
- import { EntityDef } from "./Schema";
1
+ import { Action, OpSchema } from "./Schema";
2
2
  import { StyleDef } from "../../types/Style";
3
- export declare const style: StyleDef<EntityDef["OpSchema"], EntityDef["Action"]>;
3
+ export declare const style: StyleDef<OpSchema, Action>;