oak-domain 5.1.15 → 5.1.17

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 (99) 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 +60 -54
  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 +4 -4
  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/modi.js +72 -70
  80. package/lib/store/triggers.js +14 -14
  81. package/lib/timers/vaccum.d.ts +1 -1
  82. package/lib/types/Auth.d.ts +6 -5
  83. package/lib/types/Cluster.d.ts +1 -0
  84. package/lib/types/Configuration.d.ts +9 -0
  85. package/lib/types/Entity.d.ts +5 -1
  86. package/lib/types/EntityDesc.d.ts +1 -1
  87. package/lib/types/Exception.d.ts +26 -21
  88. package/lib/types/Exception.js +81 -71
  89. package/lib/types/Expression.d.ts +4 -1
  90. package/lib/types/Port.d.ts +1 -1
  91. package/lib/types/Trigger.d.ts +1 -1
  92. package/lib/types/Watcher.d.ts +3 -3
  93. package/lib/utils/projection.d.ts +2 -2
  94. package/lib/utils/relationPath.d.ts +4 -4
  95. package/lib/utils/relationPath.js +1 -1
  96. package/lib/utils/row.d.ts +8 -0
  97. package/lib/utils/row.js +8 -0
  98. package/lib/utils/validator.d.ts +2 -2
  99. package/package.json +2 -2
@@ -1,222 +1,19 @@
1
- import { ForeignKey } from "../../types/DataType";
2
- import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "../../types/Demand";
3
- import { OneOf } from "../../types/Polyfill";
4
- import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "../../types/Entity";
5
- import { Action, ParticularAction, UserState } from "./Action";
6
- import { RelationAction } from "../../actions/action";
7
- import { String, Text } from "../../types/DataType";
8
- import * as Oper from "../Oper/Schema";
9
- import * as UserEntityClaim from "../UserEntityClaim/Schema";
10
- import * as UserRelation from "../UserRelation/Schema";
11
- import * as ModiEntity from "../ModiEntity/Schema";
12
- import * as OperEntity from "../OperEntity/Schema";
13
- export type OpSchema = EntityShape & {
14
- name?: String<16> | null;
15
- nickname?: String<64> | null;
16
- password?: Text | null;
17
- refId?: ForeignKey<"user"> | null;
18
- userState?: UserState | null;
19
- };
20
- export type OpAttr = keyof OpSchema;
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 & {
28
- ref?: Schema | null;
29
- oper$operator?: Array<Oper.Schema>;
30
- user$ref?: Array<Schema>;
31
- userEntityClaim$user?: Array<UserEntityClaim.Schema>;
32
- userRelation$user?: Array<UserRelation.Schema>;
33
- modiEntity$entity?: Array<ModiEntity.Schema>;
34
- operEntity$entity?: Array<OperEntity.Schema>;
35
- } & {
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>;
49
- };
50
- type AttrFilter = {
51
- id: Q_StringValue;
52
- $$createAt$$: Q_DateValue;
53
- $$seq$$: Q_NumberValue;
54
- $$updateAt$$: Q_DateValue;
55
- name: Q_StringValue;
56
- nickname: Q_StringValue;
57
- password: Q_StringValue;
58
- refId: Q_StringValue;
59
- ref: Filter;
60
- userState: Q_EnumValue<UserState>;
61
- oper$operator: Oper.Filter & SubQueryPredicateMetadata;
62
- user$ref: Filter & SubQueryPredicateMetadata;
63
- userEntityClaim$user: UserEntityClaim.Filter & SubQueryPredicateMetadata;
64
- userRelation$user: UserRelation.Filter & SubQueryPredicateMetadata;
65
- modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
66
- operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
67
- };
68
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
69
- export type Projection = {
70
- "#id"?: NodeId;
71
- [k: string]: any;
72
- id?: number;
73
- $$createAt$$?: number;
74
- $$updateAt$$?: number;
75
- $$seq$$?: number;
76
- name?: number;
77
- nickname?: number;
78
- password?: number;
79
- refId?: number;
80
- ref?: Projection;
81
- userState?: number;
82
- oper$operator?: Oper.Selection & {
83
- $entity: "oper";
84
- };
85
- user$ref?: Selection & {
86
- $entity: "user";
87
- };
88
- userEntityClaim$user?: UserEntityClaim.Selection & {
89
- $entity: "userEntityClaim";
90
- };
91
- userRelation$user?: UserRelation.Selection & {
92
- $entity: "userRelation";
93
- };
94
- modiEntity$entity?: ModiEntity.Selection & {
95
- $entity: "modiEntity";
96
- };
97
- operEntity$entity?: OperEntity.Selection & {
98
- $entity: "operEntity";
99
- };
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 & {
122
- $entity: "operEntity";
123
- };
124
- };
125
- type UserIdProjection = OneOf<{
126
- id: number;
127
- refId: number;
128
- }>;
129
- export type SortAttr = {
130
- id: number;
131
- } | {
132
- $$createAt$$: number;
133
- } | {
134
- $$seq$$: number;
135
- } | {
136
- $$updateAt$$: number;
137
- } | {
138
- name: number;
139
- } | {
140
- nickname: number;
141
- } | {
142
- password: number;
143
- } | {
144
- refId: number;
145
- } | {
146
- ref: SortAttr;
147
- } | {
148
- userState: number;
149
- } | {
150
- [k: string]: any;
151
- } | OneOf<ExprOp<OpAttr | string>>;
152
- export type SortNode = {
153
- $attr: SortAttr;
154
- $direction?: "asc" | "desc";
155
- };
156
- export type Sorter = SortNode[];
157
- export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
158
- export type Selection<P extends Object = Projection> = SelectOperation<P>;
159
- export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
160
- export type CreateOperationData = FormCreateData<Omit<OpSchema, "refId">> & (({
161
- refId?: never;
162
- ref?: CreateSingleOperation;
163
- } | {
164
- refId: ForeignKey<"ref">;
165
- ref?: UpdateOperation;
166
- } | {
167
- ref?: never;
168
- refId?: ForeignKey<"ref">;
169
- })) & {
170
- oper$operator?: OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "operator" | "operatorId">, Omit<Oper.Filter, "operator" | "operatorId">> | OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">> | OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "operator" | "operatorId">, Omit<Oper.Filter, "operator" | "operatorId">>>;
171
- user$ref?: OakOperation<UpdateOperation["action"], Omit<UpdateOperationData, "ref" | "refId">, Omit<Filter, "ref" | "refId">> | OakOperation<"create", Omit<CreateOperationData, "ref" | "refId">[]> | Array<OakOperation<"create", Omit<CreateOperationData, "ref" | "refId">> | OakOperation<UpdateOperation["action"], Omit<UpdateOperationData, "ref" | "refId">, Omit<Filter, "ref" | "refId">>>;
172
- userEntityClaim$user?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "user" | "userId">, Omit<UserEntityClaim.Filter, "user" | "userId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "user" | "userId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "user" | "userId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "user" | "userId">, Omit<UserEntityClaim.Filter, "user" | "userId">>>;
173
- userRelation$user?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "user" | "userId">, Omit<UserRelation.Filter, "user" | "userId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "user" | "userId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "user" | "userId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "user" | "userId">, Omit<UserRelation.Filter, "user" | "userId">>>;
174
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
175
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
176
- };
177
- export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
178
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
179
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
180
- export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "refId">> & (({
181
- ref?: CreateSingleOperation;
182
- refId?: never;
183
- } | {
184
- ref?: UpdateOperation;
185
- refId?: never;
186
- } | {
187
- ref?: RemoveOperation;
188
- refId?: never;
189
- } | {
190
- ref?: never;
191
- refId?: ForeignKey<"ref"> | null;
192
- })) & {
193
- [k: string]: any;
194
- oper$operator?: OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "operator" | "operatorId">, Omit<Oper.Filter, "operator" | "operatorId">> | OakOperation<Oper.RemoveOperation["action"], Omit<Oper.RemoveOperationData, "operator" | "operatorId">, Omit<Oper.Filter, "operator" | "operatorId">> | OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">> | OakOperation<Oper.UpdateOperation["action"], Omit<Oper.UpdateOperationData, "operator" | "operatorId">, Omit<Oper.Filter, "operator" | "operatorId">> | OakOperation<Oper.RemoveOperation["action"], Omit<Oper.RemoveOperationData, "operator" | "operatorId">, Omit<Oper.Filter, "operator" | "operatorId">>>;
195
- user$ref?: OakOperation<UpdateOperation["action"], Omit<UpdateOperationData, "ref" | "refId">, Omit<Filter, "ref" | "refId">> | OakOperation<RemoveOperation["action"], Omit<RemoveOperationData, "ref" | "refId">, Omit<Filter, "ref" | "refId">> | OakOperation<"create", Omit<CreateOperationData, "ref" | "refId">[]> | Array<OakOperation<"create", Omit<CreateOperationData, "ref" | "refId">> | OakOperation<UpdateOperation["action"], Omit<UpdateOperationData, "ref" | "refId">, Omit<Filter, "ref" | "refId">> | OakOperation<RemoveOperation["action"], Omit<RemoveOperationData, "ref" | "refId">, Omit<Filter, "ref" | "refId">>>;
196
- userEntityClaim$user?: OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "user" | "userId">, Omit<UserEntityClaim.Filter, "user" | "userId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "user" | "userId">, Omit<UserEntityClaim.Filter, "user" | "userId">> | OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "user" | "userId">[]> | Array<OakOperation<"create", Omit<UserEntityClaim.CreateOperationData, "user" | "userId">> | OakOperation<UserEntityClaim.UpdateOperation["action"], Omit<UserEntityClaim.UpdateOperationData, "user" | "userId">, Omit<UserEntityClaim.Filter, "user" | "userId">> | OakOperation<UserEntityClaim.RemoveOperation["action"], Omit<UserEntityClaim.RemoveOperationData, "user" | "userId">, Omit<UserEntityClaim.Filter, "user" | "userId">>>;
197
- userRelation$user?: OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "user" | "userId">, Omit<UserRelation.Filter, "user" | "userId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "user" | "userId">, Omit<UserRelation.Filter, "user" | "userId">> | OakOperation<"create", Omit<UserRelation.CreateOperationData, "user" | "userId">[]> | Array<OakOperation<"create", Omit<UserRelation.CreateOperationData, "user" | "userId">> | OakOperation<UserRelation.UpdateOperation["action"], Omit<UserRelation.UpdateOperationData, "user" | "userId">, Omit<UserRelation.Filter, "user" | "userId">> | OakOperation<UserRelation.RemoveOperation["action"], Omit<UserRelation.RemoveOperationData, "user" | "userId">, Omit<UserRelation.Filter, "user" | "userId">>>;
198
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
199
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
200
- };
201
- export type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>;
202
- export type RemoveOperationData = {} & (({
203
- ref?: UpdateOperation | RemoveOperation;
204
- }));
205
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
206
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
207
- export type UserIdSubQuery = Selection<UserIdProjection>;
208
- export type EntityDef = {
209
- Schema: Schema;
210
- OpSchema: OpSchema;
211
- Action: OakMakeAction<Action | RelationAction> | string;
212
- Selection: Selection;
213
- Aggregation: Aggregation;
214
- Operation: Operation;
215
- Create: CreateOperation;
216
- Update: UpdateOperation;
217
- Remove: RemoveOperation;
218
- CreateSingle: CreateSingleOperation;
219
- CreateMulti: CreateMultipleOperation;
220
- ParticularAction: ParticularAction;
221
- };
222
- export {};
1
+ export * from "./_baseSchema";
2
+ import { User } from "../EntityDict";
3
+ export type Schema = User["Schema"];
4
+ export type Action = User["Action"];
5
+ export type Projection = User["Projection"];
6
+ export type Filter = User["Filter"];
7
+ export type SortNode = User["SortNode"];
8
+ export type Sorter = User["Sorter"];
9
+ export type Selection = User["Selection"];
10
+ export type Aggregation = User["Aggregation"];
11
+ export type CreateOperationData = User["CreateOperationData"];
12
+ export type CreateSingle = User["CreateSingle"];
13
+ export type CreateMulti = User["CreateMulti"];
14
+ export type Create = User["Create"];
15
+ export type UpdateOperationData = User["UpdateOperationData"];
16
+ export type Update = User["Update"];
17
+ export type RemoveOperationData = User["RemoveOperationData"];
18
+ export type Remove = User["Remove"];
19
+ export type Operation = User["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,53 @@
1
+ import { ForeignKey } from "../../types/DataType";
2
+ import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
3
+ import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
4
+ import { Action, ParticularAction, UserState } from "./Action";
5
+ import { RelationAction } from "../../actions/action";
6
+ import { String, Text } from "../../types/DataType";
7
+ export type OpSchema = EntityShape & {
8
+ name?: String<16> | null;
9
+ nickname?: String<64> | null;
10
+ password?: Text | null;
11
+ refId?: ForeignKey<"user"> | null;
12
+ userState?: UserState | null;
13
+ } & {
14
+ [A in ExpressionKey]?: any;
15
+ };
16
+ export type OpAttr = keyof OpSchema;
17
+ export type OpFilter = {
18
+ id: Q_StringValue;
19
+ $$createAt$$: Q_DateValue;
20
+ $$seq$$: Q_NumberValue;
21
+ $$updateAt$$: Q_DateValue;
22
+ name: Q_StringValue;
23
+ nickname: Q_StringValue;
24
+ password: Q_StringValue;
25
+ refId: Q_StringValue;
26
+ userState: Q_EnumValue<UserState>;
27
+ } & ExprOp<OpAttr | string>;
28
+ export type OpProjection = {
29
+ "#id"?: NodeId;
30
+ [k: string]: any;
31
+ id?: number;
32
+ $$createAt$$?: number;
33
+ $$updateAt$$?: number;
34
+ $$seq$$?: number;
35
+ name?: number;
36
+ nickname?: number;
37
+ password?: number;
38
+ refId?: number;
39
+ userState?: number;
40
+ } & Partial<ExprOp<OpAttr | string>>;
41
+ export type OpSortAttr = Partial<{
42
+ id: number;
43
+ $$createAt$$: number;
44
+ $$seq$$: number;
45
+ $$updateAt$$: number;
46
+ name: number;
47
+ nickname: number;
48
+ password: number;
49
+ userState: number;
50
+ [k: string]: any;
51
+ } | ExprOp<OpAttr | string>>;
52
+ export type OpAction = OakMakeAction<Action | RelationAction | string>;
53
+ export type OpUpdateAction = "update" | ParticularAction | string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,264 +1,19 @@
1
- import { ForeignKey } from "../../types/DataType";
2
- import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "../../types/Demand";
3
- import { OneOf } from "../../types/Polyfill";
4
- import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "../../types/Entity";
5
- import { GenericAction } from "../../actions/action";
6
- import { String } from "../../types/DataType";
7
- import * as UserEntityGrant from "../UserEntityGrant/Schema";
8
- import * as User from "../User/Schema";
9
- import * as Relation from "../Relation/Schema";
10
- import * as UserRelation from "../UserRelation/Schema";
11
- import * as ModiEntity from "../ModiEntity/Schema";
12
- import * as OperEntity from "../OperEntity/Schema";
13
- export type OpSchema = EntityShape & {
14
- uegId: ForeignKey<"userEntityGrant">;
15
- userId: ForeignKey<"user">;
16
- relationId: ForeignKey<"relation">;
17
- claimEntityId: String<64>;
18
- userRelationId: ForeignKey<"userRelation">;
19
- };
20
- export type OpAttr = keyof OpSchema;
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 & {
24
- ueg: UserEntityGrant.Schema;
25
- user: User.Schema;
26
- relation: Relation.Schema;
27
- userRelation: UserRelation.Schema;
28
- modiEntity$entity?: Array<ModiEntity.Schema>;
29
- operEntity$entity?: Array<OperEntity.Schema>;
30
- } & {
31
- [A in ExpressionKey]?: any;
32
- } & {
33
- [A in ModiEntity$entityAggr]?: AggregationResult<ModiEntity.Schema>;
34
- } & {
35
- [A in OperEntity$entityAggr]?: AggregationResult<OperEntity.Schema>;
36
- };
37
- type AttrFilter = {
38
- id: Q_StringValue;
39
- $$createAt$$: Q_DateValue;
40
- $$seq$$: Q_NumberValue;
41
- $$updateAt$$: Q_DateValue;
42
- uegId: Q_StringValue;
43
- ueg: UserEntityGrant.Filter;
44
- userId: Q_StringValue;
45
- user: User.Filter;
46
- relationId: Q_StringValue;
47
- relation: Relation.Filter;
48
- claimEntityId: Q_StringValue;
49
- userRelationId: Q_StringValue;
50
- userRelation: UserRelation.Filter;
51
- modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
52
- operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
53
- };
54
- export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
55
- export type Projection = {
56
- "#id"?: NodeId;
57
- [k: string]: any;
58
- id?: number;
59
- $$createAt$$?: number;
60
- $$updateAt$$?: number;
61
- $$seq$$?: number;
62
- uegId?: number;
63
- ueg?: UserEntityGrant.Projection;
64
- userId?: number;
65
- user?: User.Projection;
66
- relationId?: number;
67
- relation?: Relation.Projection;
68
- claimEntityId?: number;
69
- userRelationId?: number;
70
- userRelation?: UserRelation.Projection;
71
- modiEntity$entity?: ModiEntity.Selection & {
72
- $entity: "modiEntity";
73
- };
74
- operEntity$entity?: OperEntity.Selection & {
75
- $entity: "operEntity";
76
- };
77
- } & Partial<ExprOp<OpAttr | string>> & {
78
- [A in ModiEntity$entityAggr]?: ModiEntity.Aggregation & {
79
- $entity: "modiEntity";
80
- };
81
- } & {
82
- [A in OperEntity$entityAggr]?: OperEntity.Aggregation & {
83
- $entity: "operEntity";
84
- };
85
- };
86
- type UserEntityClaimIdProjection = OneOf<{
87
- id: number;
88
- }>;
89
- type UserEntityGrantIdProjection = OneOf<{
90
- uegId: number;
91
- }>;
92
- type UserIdProjection = OneOf<{
93
- userId: number;
94
- }>;
95
- type RelationIdProjection = OneOf<{
96
- relationId: number;
97
- }>;
98
- type UserRelationIdProjection = OneOf<{
99
- userRelationId: number;
100
- }>;
101
- export type SortAttr = {
102
- id: number;
103
- } | {
104
- $$createAt$$: number;
105
- } | {
106
- $$seq$$: number;
107
- } | {
108
- $$updateAt$$: number;
109
- } | {
110
- uegId: number;
111
- } | {
112
- ueg: UserEntityGrant.SortAttr;
113
- } | {
114
- userId: number;
115
- } | {
116
- user: User.SortAttr;
117
- } | {
118
- relationId: number;
119
- } | {
120
- relation: Relation.SortAttr;
121
- } | {
122
- claimEntityId: number;
123
- } | {
124
- userRelationId: number;
125
- } | {
126
- userRelation: UserRelation.SortAttr;
127
- } | {
128
- [k: string]: any;
129
- } | OneOf<ExprOp<OpAttr | string>>;
130
- export type SortNode = {
131
- $attr: SortAttr;
132
- $direction?: "asc" | "desc";
133
- };
134
- export type Sorter = SortNode[];
135
- export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
136
- export type Selection<P extends Object = Projection> = SelectOperation<P>;
137
- export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
138
- export type CreateOperationData = FormCreateData<Omit<OpSchema, "uegId" | "userId" | "relationId" | "userRelationId">> & (({
139
- uegId?: never;
140
- ueg: UserEntityGrant.CreateSingleOperation;
141
- } | {
142
- uegId: ForeignKey<"ueg">;
143
- ueg?: UserEntityGrant.UpdateOperation;
144
- } | {
145
- ueg?: never;
146
- uegId: ForeignKey<"ueg">;
147
- }) & ({
148
- userId?: never;
149
- user: User.CreateSingleOperation;
150
- } | {
151
- userId: ForeignKey<"user">;
152
- user?: User.UpdateOperation;
153
- } | {
154
- user?: never;
155
- userId: ForeignKey<"user">;
156
- }) & ({
157
- relationId?: never;
158
- relation: Relation.CreateSingleOperation;
159
- } | {
160
- relationId: ForeignKey<"relation">;
161
- relation?: Relation.UpdateOperation;
162
- } | {
163
- relation?: never;
164
- relationId: ForeignKey<"relation">;
165
- }) & ({
166
- userRelationId?: never;
167
- userRelation: UserRelation.CreateSingleOperation;
168
- } | {
169
- userRelationId: ForeignKey<"userRelation">;
170
- userRelation?: UserRelation.UpdateOperation;
171
- } | {
172
- userRelation?: never;
173
- userRelationId: ForeignKey<"userRelation">;
174
- })) & {
175
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
176
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
177
- };
178
- export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
179
- export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
180
- export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
181
- export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "uegId" | "userId" | "relationId" | "userRelationId">> & (({
182
- ueg?: UserEntityGrant.CreateSingleOperation;
183
- uegId?: never;
184
- } | {
185
- ueg?: UserEntityGrant.UpdateOperation;
186
- uegId?: never;
187
- } | {
188
- ueg?: UserEntityGrant.RemoveOperation;
189
- uegId?: never;
190
- } | {
191
- ueg?: never;
192
- uegId?: ForeignKey<"ueg">;
193
- }) & ({
194
- user?: User.CreateSingleOperation;
195
- userId?: never;
196
- } | {
197
- user?: User.UpdateOperation;
198
- userId?: never;
199
- } | {
200
- user?: User.RemoveOperation;
201
- userId?: never;
202
- } | {
203
- user?: never;
204
- userId?: ForeignKey<"user">;
205
- }) & ({
206
- relation?: Relation.CreateSingleOperation;
207
- relationId?: never;
208
- } | {
209
- relation?: Relation.UpdateOperation;
210
- relationId?: never;
211
- } | {
212
- relation?: Relation.RemoveOperation;
213
- relationId?: never;
214
- } | {
215
- relation?: never;
216
- relationId?: ForeignKey<"relation">;
217
- }) & ({
218
- userRelation?: UserRelation.CreateSingleOperation;
219
- userRelationId?: never;
220
- } | {
221
- userRelation?: UserRelation.UpdateOperation;
222
- userRelationId?: never;
223
- } | {
224
- userRelation?: UserRelation.RemoveOperation;
225
- userRelationId?: never;
226
- } | {
227
- userRelation?: never;
228
- userRelationId?: ForeignKey<"userRelation">;
229
- })) & {
230
- [k: string]: any;
231
- modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
232
- operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
233
- };
234
- export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
235
- export type RemoveOperationData = {} & (({
236
- ueg?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
237
- }) & ({
238
- user?: User.UpdateOperation | User.RemoveOperation;
239
- }) & ({
240
- relation?: Relation.UpdateOperation | Relation.RemoveOperation;
241
- }) & ({
242
- userRelation?: UserRelation.UpdateOperation | UserRelation.RemoveOperation;
243
- }));
244
- export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
245
- export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
246
- export type UserEntityGrantIdSubQuery = Selection<UserEntityGrantIdProjection>;
247
- export type UserIdSubQuery = Selection<UserIdProjection>;
248
- export type RelationIdSubQuery = Selection<RelationIdProjection>;
249
- export type UserRelationIdSubQuery = Selection<UserRelationIdProjection>;
250
- export type UserEntityClaimIdSubQuery = Selection<UserEntityClaimIdProjection>;
251
- export type EntityDef = {
252
- Schema: Schema;
253
- OpSchema: OpSchema;
254
- Action: OakMakeAction<GenericAction> | string;
255
- Selection: Selection;
256
- Aggregation: Aggregation;
257
- Operation: Operation;
258
- Create: CreateOperation;
259
- Update: UpdateOperation;
260
- Remove: RemoveOperation;
261
- CreateSingle: CreateSingleOperation;
262
- CreateMulti: CreateMultipleOperation;
263
- };
264
- export {};
1
+ export * from "./_baseSchema";
2
+ import { UserEntityClaim } from "../EntityDict";
3
+ export type Schema = UserEntityClaim["Schema"];
4
+ export type Action = UserEntityClaim["Action"];
5
+ export type Projection = UserEntityClaim["Projection"];
6
+ export type Filter = UserEntityClaim["Filter"];
7
+ export type SortNode = UserEntityClaim["SortNode"];
8
+ export type Sorter = UserEntityClaim["Sorter"];
9
+ export type Selection = UserEntityClaim["Selection"];
10
+ export type Aggregation = UserEntityClaim["Aggregation"];
11
+ export type CreateOperationData = UserEntityClaim["CreateOperationData"];
12
+ export type CreateSingle = UserEntityClaim["CreateSingle"];
13
+ export type CreateMulti = UserEntityClaim["CreateMulti"];
14
+ export type Create = UserEntityClaim["Create"];
15
+ export type UpdateOperationData = UserEntityClaim["UpdateOperationData"];
16
+ export type Update = UserEntityClaim["Update"];
17
+ export type RemoveOperationData = UserEntityClaim["RemoveOperationData"];
18
+ export type Remove = UserEntityClaim["Remove"];
19
+ export type Operation = UserEntityClaim["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,49 @@
1
+ import { ForeignKey } from "../../types/DataType";
2
+ import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, ExprOp, ExpressionKey } from "../../types/Demand";
3
+ import { MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
4
+ import { GenericAction } from "../../actions/action";
5
+ import { String } from "../../types/DataType";
6
+ export type OpSchema = EntityShape & {
7
+ uegId: ForeignKey<"userEntityGrant">;
8
+ userId: ForeignKey<"user">;
9
+ relationId: ForeignKey<"relation">;
10
+ claimEntityId: String<64>;
11
+ userRelationId: ForeignKey<"userRelation">;
12
+ } & {
13
+ [A in ExpressionKey]?: any;
14
+ };
15
+ export type OpAttr = keyof OpSchema;
16
+ export type OpFilter = {
17
+ id: Q_StringValue;
18
+ $$createAt$$: Q_DateValue;
19
+ $$seq$$: Q_NumberValue;
20
+ $$updateAt$$: Q_DateValue;
21
+ uegId: Q_StringValue;
22
+ userId: Q_StringValue;
23
+ relationId: Q_StringValue;
24
+ claimEntityId: Q_StringValue;
25
+ userRelationId: Q_StringValue;
26
+ } & ExprOp<OpAttr | string>;
27
+ export type OpProjection = {
28
+ "#id"?: NodeId;
29
+ [k: string]: any;
30
+ id?: number;
31
+ $$createAt$$?: number;
32
+ $$updateAt$$?: number;
33
+ $$seq$$?: number;
34
+ uegId?: number;
35
+ userId?: number;
36
+ relationId?: number;
37
+ claimEntityId?: number;
38
+ userRelationId?: number;
39
+ } & Partial<ExprOp<OpAttr | string>>;
40
+ export type OpSortAttr = Partial<{
41
+ id: number;
42
+ $$createAt$$: number;
43
+ $$seq$$: number;
44
+ $$updateAt$$: number;
45
+ claimEntityId: number;
46
+ [k: string]: any;
47
+ } | ExprOp<OpAttr | string>>;
48
+ export type OpAction = OakMakeAction<GenericAction | string>;
49
+ export type OpUpdateAction = "update" | string;