oak-domain 4.1.0 → 4.2.1
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.
- package/lib/base-app-domain/ActionAuth/Schema.d.ts +185 -185
- package/lib/base-app-domain/ActionDefDict.d.ts +2 -2
- package/lib/base-app-domain/I18n/Schema.d.ts +128 -128
- package/lib/base-app-domain/Modi/Schema.d.ts +135 -135
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +383 -383
- package/lib/base-app-domain/Oper/Schema.d.ts +158 -152
- package/lib/base-app-domain/Oper/Storage.js +19 -1
- package/lib/base-app-domain/OperEntity/Schema.d.ts +372 -372
- package/lib/base-app-domain/Path/Schema.d.ts +148 -148
- package/lib/base-app-domain/Relation/Schema.d.ts +187 -187
- package/lib/base-app-domain/RelationAuth/Schema.d.ts +213 -213
- package/lib/base-app-domain/User/Action.d.ts +1 -0
- package/lib/base-app-domain/User/Action.js +3 -3
- package/lib/base-app-domain/User/Schema.d.ts +209 -209
- package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +263 -263
- package/lib/base-app-domain/UserEntityGrant/Action.d.ts +5 -5
- package/lib/base-app-domain/UserEntityGrant/Action.js +5 -5
- package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +130 -130
- package/lib/base-app-domain/UserRelation/Schema.d.ts +207 -207
- package/lib/compiler/localeBuilder.d.ts +27 -27
- package/lib/compiler/localeBuilder.js +215 -215
- package/lib/compiler/routerBuilder.js +263 -263
- package/lib/compiler/schemalBuilder.js +4167 -4160
- package/lib/entities/Oper.d.ts +2 -1
- package/lib/entities/Oper.js +16 -1
- package/lib/entities/User.d.ts +10 -0
- package/lib/entities/User.js +3 -2
- package/lib/index.d.ts +0 -22
- package/lib/index.js +1 -35
- package/lib/store/AsyncRowStore.d.ts +66 -65
- package/lib/store/AsyncRowStore.js +180 -180
- package/lib/store/CascadeStore.js +7 -31
- package/lib/store/RelationAuth.d.ts +103 -103
- package/lib/store/RelationAuth.js +1179 -1343
- package/lib/store/SyncRowStore.d.ts +29 -29
- package/lib/store/TriggerExecutor.js +468 -468
- package/lib/store/actionDef.js +278 -278
- package/lib/store/checker.js +487 -487
- package/lib/triggers/index.d.ts +2 -2
- package/lib/triggers/index.js +21 -1
- package/lib/types/Aspect.d.ts +13 -13
- package/lib/types/Configuration.d.ts +42 -0
- package/lib/types/Configuration.js +3 -0
- package/lib/types/Connector.d.ts +38 -38
- package/lib/types/Context.d.ts +7 -7
- package/lib/types/Entity.d.ts +4 -4
- package/lib/types/Environment.d.ts +93 -93
- package/lib/types/Exception.d.ts +155 -155
- package/lib/types/Exception.js +436 -436
- package/lib/types/Sync.d.ts +48 -0
- package/lib/types/Sync.js +8 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/SimpleConnector.d.ts +64 -64
- package/lib/utils/SimpleConnector.js +206 -206
- package/lib/utils/assert.d.ts +5 -5
- package/lib/utils/projection.d.ts +1 -1
- package/lib/utils/relationPath.d.ts +31 -0
- package/lib/utils/relationPath.js +202 -0
- package/package.json +51 -51
- package/src/entities/ActionAuth.ts +41 -41
- package/src/entities/I18n.ts +45 -45
- package/src/entities/Modi.ts +69 -69
- package/src/entities/ModiEntity.ts +26 -26
- package/src/entities/Oper.ts +48 -32
- package/src/entities/OperEntity.ts +27 -27
- package/src/entities/Path.ts +43 -43
- package/src/entities/Relation.ts +43 -43
- package/src/entities/RelationAuth.ts +44 -44
- package/src/entities/User.ts +48 -48
- package/src/entities/UserEntityClaim.ts +29 -29
- package/src/entities/UserEntityGrant.ts +24 -24
- package/src/entities/UserRelation.ts +50 -50
|
@@ -1,209 +1,209 @@
|
|
|
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
|
-
export type Schema = EntityShape & {
|
|
22
|
-
name?: String<16> | null;
|
|
23
|
-
nickname?: String<64> | null;
|
|
24
|
-
password?: Text | null;
|
|
25
|
-
refId?: ForeignKey<"user"> | null;
|
|
26
|
-
userState?: UserState | null;
|
|
27
|
-
ref?: Schema | null;
|
|
28
|
-
oper$operator?: Array<Oper.Schema>;
|
|
29
|
-
oper$operator$$aggr?: AggregationResult<Oper.Schema>;
|
|
30
|
-
user$ref?: Array<Schema>;
|
|
31
|
-
user$ref$$aggr?: AggregationResult<Schema>;
|
|
32
|
-
userEntityClaim$user?: Array<UserEntityClaim.Schema>;
|
|
33
|
-
userEntityClaim$user$$aggr?: AggregationResult<UserEntityClaim.Schema>;
|
|
34
|
-
userRelation$user?: Array<UserRelation.Schema>;
|
|
35
|
-
userRelation$user$$aggr?: AggregationResult<UserRelation.Schema>;
|
|
36
|
-
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
37
|
-
modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
|
|
38
|
-
operEntity$entity?: Array<OperEntity.Schema>;
|
|
39
|
-
operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
|
|
40
|
-
} & {
|
|
41
|
-
[A in ExpressionKey]?: any;
|
|
42
|
-
};
|
|
43
|
-
type AttrFilter = {
|
|
44
|
-
id: Q_StringValue;
|
|
45
|
-
$$createAt$$: Q_DateValue;
|
|
46
|
-
$$seq$$: Q_NumberValue;
|
|
47
|
-
$$updateAt$$: Q_DateValue;
|
|
48
|
-
name: Q_StringValue;
|
|
49
|
-
nickname: Q_StringValue;
|
|
50
|
-
password: Q_StringValue;
|
|
51
|
-
refId: Q_StringValue;
|
|
52
|
-
ref: Filter;
|
|
53
|
-
userState: Q_EnumValue<UserState>;
|
|
54
|
-
oper$operator: Oper.Filter & SubQueryPredicateMetadata;
|
|
55
|
-
user$ref: Filter & SubQueryPredicateMetadata;
|
|
56
|
-
userEntityClaim$user: UserEntityClaim.Filter & SubQueryPredicateMetadata;
|
|
57
|
-
userRelation$user: UserRelation.Filter & SubQueryPredicateMetadata;
|
|
58
|
-
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
59
|
-
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
60
|
-
};
|
|
61
|
-
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
62
|
-
export type Projection = {
|
|
63
|
-
"#id"?: NodeId;
|
|
64
|
-
[k: string]: any;
|
|
65
|
-
id?: number;
|
|
66
|
-
$$createAt$$?: number;
|
|
67
|
-
$$updateAt$$?: number;
|
|
68
|
-
$$seq$$?: number;
|
|
69
|
-
name?: number;
|
|
70
|
-
nickname?: number;
|
|
71
|
-
password?: number;
|
|
72
|
-
refId?: number;
|
|
73
|
-
ref?: Projection;
|
|
74
|
-
userState?: number;
|
|
75
|
-
oper$operator?: Oper.Selection & {
|
|
76
|
-
$entity: "oper";
|
|
77
|
-
};
|
|
78
|
-
oper$operator$$aggr?: Oper.Aggregation & {
|
|
79
|
-
$entity: "oper";
|
|
80
|
-
};
|
|
81
|
-
user$ref?: Selection & {
|
|
82
|
-
$entity: "user";
|
|
83
|
-
};
|
|
84
|
-
user$ref$$aggr?: Aggregation & {
|
|
85
|
-
$entity: "user";
|
|
86
|
-
};
|
|
87
|
-
userEntityClaim$user?: UserEntityClaim.Selection & {
|
|
88
|
-
$entity: "userEntityClaim";
|
|
89
|
-
};
|
|
90
|
-
userEntityClaim$user$$aggr?: UserEntityClaim.Aggregation & {
|
|
91
|
-
$entity: "userEntityClaim";
|
|
92
|
-
};
|
|
93
|
-
userRelation$user?: UserRelation.Selection & {
|
|
94
|
-
$entity: "userRelation";
|
|
95
|
-
};
|
|
96
|
-
userRelation$user$$aggr?: UserRelation.Aggregation & {
|
|
97
|
-
$entity: "userRelation";
|
|
98
|
-
};
|
|
99
|
-
modiEntity$entity?: ModiEntity.Selection & {
|
|
100
|
-
$entity: "modiEntity";
|
|
101
|
-
};
|
|
102
|
-
modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
|
|
103
|
-
$entity: "modiEntity";
|
|
104
|
-
};
|
|
105
|
-
operEntity$entity?: OperEntity.Selection & {
|
|
106
|
-
$entity: "operEntity";
|
|
107
|
-
};
|
|
108
|
-
operEntity$entity$$aggr?: OperEntity.Aggregation & {
|
|
109
|
-
$entity: "operEntity";
|
|
110
|
-
};
|
|
111
|
-
} & Partial<ExprOp<OpAttr | string>>;
|
|
112
|
-
type UserIdProjection = OneOf<{
|
|
113
|
-
id: number;
|
|
114
|
-
refId: number;
|
|
115
|
-
}>;
|
|
116
|
-
export type SortAttr = {
|
|
117
|
-
id: number;
|
|
118
|
-
} | {
|
|
119
|
-
$$createAt$$: number;
|
|
120
|
-
} | {
|
|
121
|
-
$$seq$$: number;
|
|
122
|
-
} | {
|
|
123
|
-
$$updateAt$$: number;
|
|
124
|
-
} | {
|
|
125
|
-
name: number;
|
|
126
|
-
} | {
|
|
127
|
-
nickname: number;
|
|
128
|
-
} | {
|
|
129
|
-
password: number;
|
|
130
|
-
} | {
|
|
131
|
-
refId: number;
|
|
132
|
-
} | {
|
|
133
|
-
ref: SortAttr;
|
|
134
|
-
} | {
|
|
135
|
-
userState: number;
|
|
136
|
-
} | {
|
|
137
|
-
[k: string]: any;
|
|
138
|
-
} | OneOf<ExprOp<OpAttr | string>>;
|
|
139
|
-
export type SortNode = {
|
|
140
|
-
$attr: SortAttr;
|
|
141
|
-
$direction?: "asc" | "desc";
|
|
142
|
-
};
|
|
143
|
-
export type Sorter = SortNode[];
|
|
144
|
-
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
145
|
-
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
146
|
-
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
147
|
-
export type CreateOperationData = FormCreateData<Omit<OpSchema, "refId">> & (({
|
|
148
|
-
refId?: never;
|
|
149
|
-
ref?: CreateSingleOperation;
|
|
150
|
-
} | {
|
|
151
|
-
refId: ForeignKey<"ref">;
|
|
152
|
-
ref?: UpdateOperation;
|
|
153
|
-
} | {
|
|
154
|
-
ref?: never;
|
|
155
|
-
refId?: ForeignKey<"ref">;
|
|
156
|
-
})) & {
|
|
157
|
-
oper$operator?: OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">>>;
|
|
158
|
-
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">>>;
|
|
159
|
-
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">>>;
|
|
160
|
-
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">>>;
|
|
161
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
162
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
163
|
-
};
|
|
164
|
-
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
165
|
-
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
166
|
-
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
167
|
-
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "refId">> & (({
|
|
168
|
-
ref?: CreateSingleOperation;
|
|
169
|
-
refId?: never;
|
|
170
|
-
} | {
|
|
171
|
-
ref?: UpdateOperation;
|
|
172
|
-
refId?: never;
|
|
173
|
-
} | {
|
|
174
|
-
ref?: RemoveOperation;
|
|
175
|
-
refId?: never;
|
|
176
|
-
} | {
|
|
177
|
-
ref?: never;
|
|
178
|
-
refId?: ForeignKey<"ref"> | null;
|
|
179
|
-
})) & {
|
|
180
|
-
[k: string]: any;
|
|
181
|
-
oper$operator?: OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">>>;
|
|
182
|
-
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">>>;
|
|
183
|
-
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">>>;
|
|
184
|
-
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">>>;
|
|
185
|
-
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
186
|
-
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
187
|
-
};
|
|
188
|
-
export type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>;
|
|
189
|
-
export type RemoveOperationData = {} & (({
|
|
190
|
-
ref?: UpdateOperation | RemoveOperation;
|
|
191
|
-
}));
|
|
192
|
-
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
193
|
-
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
194
|
-
export type UserIdSubQuery = Selection<UserIdProjection>;
|
|
195
|
-
export type EntityDef = {
|
|
196
|
-
Schema: Schema;
|
|
197
|
-
OpSchema: OpSchema;
|
|
198
|
-
Action: OakMakeAction<Action | RelationAction> | string;
|
|
199
|
-
Selection: Selection;
|
|
200
|
-
Aggregation: Aggregation;
|
|
201
|
-
Operation: Operation;
|
|
202
|
-
Create: CreateOperation;
|
|
203
|
-
Update: UpdateOperation;
|
|
204
|
-
Remove: RemoveOperation;
|
|
205
|
-
CreateSingle: CreateSingleOperation;
|
|
206
|
-
CreateMulti: CreateMultipleOperation;
|
|
207
|
-
ParticularAction: ParticularAction;
|
|
208
|
-
};
|
|
209
|
-
export {};
|
|
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
|
+
export type Schema = EntityShape & {
|
|
22
|
+
name?: String<16> | null;
|
|
23
|
+
nickname?: String<64> | null;
|
|
24
|
+
password?: Text | null;
|
|
25
|
+
refId?: ForeignKey<"user"> | null;
|
|
26
|
+
userState?: UserState | null;
|
|
27
|
+
ref?: Schema | null;
|
|
28
|
+
oper$operator?: Array<Oper.Schema>;
|
|
29
|
+
oper$operator$$aggr?: AggregationResult<Oper.Schema>;
|
|
30
|
+
user$ref?: Array<Schema>;
|
|
31
|
+
user$ref$$aggr?: AggregationResult<Schema>;
|
|
32
|
+
userEntityClaim$user?: Array<UserEntityClaim.Schema>;
|
|
33
|
+
userEntityClaim$user$$aggr?: AggregationResult<UserEntityClaim.Schema>;
|
|
34
|
+
userRelation$user?: Array<UserRelation.Schema>;
|
|
35
|
+
userRelation$user$$aggr?: AggregationResult<UserRelation.Schema>;
|
|
36
|
+
modiEntity$entity?: Array<ModiEntity.Schema>;
|
|
37
|
+
modiEntity$entity$$aggr?: AggregationResult<ModiEntity.Schema>;
|
|
38
|
+
operEntity$entity?: Array<OperEntity.Schema>;
|
|
39
|
+
operEntity$entity$$aggr?: AggregationResult<OperEntity.Schema>;
|
|
40
|
+
} & {
|
|
41
|
+
[A in ExpressionKey]?: any;
|
|
42
|
+
};
|
|
43
|
+
type AttrFilter = {
|
|
44
|
+
id: Q_StringValue;
|
|
45
|
+
$$createAt$$: Q_DateValue;
|
|
46
|
+
$$seq$$: Q_NumberValue;
|
|
47
|
+
$$updateAt$$: Q_DateValue;
|
|
48
|
+
name: Q_StringValue;
|
|
49
|
+
nickname: Q_StringValue;
|
|
50
|
+
password: Q_StringValue;
|
|
51
|
+
refId: Q_StringValue;
|
|
52
|
+
ref: Filter;
|
|
53
|
+
userState: Q_EnumValue<UserState>;
|
|
54
|
+
oper$operator: Oper.Filter & SubQueryPredicateMetadata;
|
|
55
|
+
user$ref: Filter & SubQueryPredicateMetadata;
|
|
56
|
+
userEntityClaim$user: UserEntityClaim.Filter & SubQueryPredicateMetadata;
|
|
57
|
+
userRelation$user: UserRelation.Filter & SubQueryPredicateMetadata;
|
|
58
|
+
modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata;
|
|
59
|
+
operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata;
|
|
60
|
+
};
|
|
61
|
+
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
62
|
+
export type Projection = {
|
|
63
|
+
"#id"?: NodeId;
|
|
64
|
+
[k: string]: any;
|
|
65
|
+
id?: number;
|
|
66
|
+
$$createAt$$?: number;
|
|
67
|
+
$$updateAt$$?: number;
|
|
68
|
+
$$seq$$?: number;
|
|
69
|
+
name?: number;
|
|
70
|
+
nickname?: number;
|
|
71
|
+
password?: number;
|
|
72
|
+
refId?: number;
|
|
73
|
+
ref?: Projection;
|
|
74
|
+
userState?: number;
|
|
75
|
+
oper$operator?: Oper.Selection & {
|
|
76
|
+
$entity: "oper";
|
|
77
|
+
};
|
|
78
|
+
oper$operator$$aggr?: Oper.Aggregation & {
|
|
79
|
+
$entity: "oper";
|
|
80
|
+
};
|
|
81
|
+
user$ref?: Selection & {
|
|
82
|
+
$entity: "user";
|
|
83
|
+
};
|
|
84
|
+
user$ref$$aggr?: Aggregation & {
|
|
85
|
+
$entity: "user";
|
|
86
|
+
};
|
|
87
|
+
userEntityClaim$user?: UserEntityClaim.Selection & {
|
|
88
|
+
$entity: "userEntityClaim";
|
|
89
|
+
};
|
|
90
|
+
userEntityClaim$user$$aggr?: UserEntityClaim.Aggregation & {
|
|
91
|
+
$entity: "userEntityClaim";
|
|
92
|
+
};
|
|
93
|
+
userRelation$user?: UserRelation.Selection & {
|
|
94
|
+
$entity: "userRelation";
|
|
95
|
+
};
|
|
96
|
+
userRelation$user$$aggr?: UserRelation.Aggregation & {
|
|
97
|
+
$entity: "userRelation";
|
|
98
|
+
};
|
|
99
|
+
modiEntity$entity?: ModiEntity.Selection & {
|
|
100
|
+
$entity: "modiEntity";
|
|
101
|
+
};
|
|
102
|
+
modiEntity$entity$$aggr?: ModiEntity.Aggregation & {
|
|
103
|
+
$entity: "modiEntity";
|
|
104
|
+
};
|
|
105
|
+
operEntity$entity?: OperEntity.Selection & {
|
|
106
|
+
$entity: "operEntity";
|
|
107
|
+
};
|
|
108
|
+
operEntity$entity$$aggr?: OperEntity.Aggregation & {
|
|
109
|
+
$entity: "operEntity";
|
|
110
|
+
};
|
|
111
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
112
|
+
type UserIdProjection = OneOf<{
|
|
113
|
+
id: number;
|
|
114
|
+
refId: number;
|
|
115
|
+
}>;
|
|
116
|
+
export type SortAttr = {
|
|
117
|
+
id: number;
|
|
118
|
+
} | {
|
|
119
|
+
$$createAt$$: number;
|
|
120
|
+
} | {
|
|
121
|
+
$$seq$$: number;
|
|
122
|
+
} | {
|
|
123
|
+
$$updateAt$$: number;
|
|
124
|
+
} | {
|
|
125
|
+
name: number;
|
|
126
|
+
} | {
|
|
127
|
+
nickname: number;
|
|
128
|
+
} | {
|
|
129
|
+
password: number;
|
|
130
|
+
} | {
|
|
131
|
+
refId: number;
|
|
132
|
+
} | {
|
|
133
|
+
ref: SortAttr;
|
|
134
|
+
} | {
|
|
135
|
+
userState: number;
|
|
136
|
+
} | {
|
|
137
|
+
[k: string]: any;
|
|
138
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
139
|
+
export type SortNode = {
|
|
140
|
+
$attr: SortAttr;
|
|
141
|
+
$direction?: "asc" | "desc";
|
|
142
|
+
};
|
|
143
|
+
export type Sorter = SortNode[];
|
|
144
|
+
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
145
|
+
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
146
|
+
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
147
|
+
export type CreateOperationData = FormCreateData<Omit<OpSchema, "refId">> & (({
|
|
148
|
+
refId?: never;
|
|
149
|
+
ref?: CreateSingleOperation;
|
|
150
|
+
} | {
|
|
151
|
+
refId: ForeignKey<"ref">;
|
|
152
|
+
ref?: UpdateOperation;
|
|
153
|
+
} | {
|
|
154
|
+
ref?: never;
|
|
155
|
+
refId?: ForeignKey<"ref">;
|
|
156
|
+
})) & {
|
|
157
|
+
oper$operator?: OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">>>;
|
|
158
|
+
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">>>;
|
|
159
|
+
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">>>;
|
|
160
|
+
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">>>;
|
|
161
|
+
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
162
|
+
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
163
|
+
};
|
|
164
|
+
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
165
|
+
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
166
|
+
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
167
|
+
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "refId">> & (({
|
|
168
|
+
ref?: CreateSingleOperation;
|
|
169
|
+
refId?: never;
|
|
170
|
+
} | {
|
|
171
|
+
ref?: UpdateOperation;
|
|
172
|
+
refId?: never;
|
|
173
|
+
} | {
|
|
174
|
+
ref?: RemoveOperation;
|
|
175
|
+
refId?: never;
|
|
176
|
+
} | {
|
|
177
|
+
ref?: never;
|
|
178
|
+
refId?: ForeignKey<"ref"> | null;
|
|
179
|
+
})) & {
|
|
180
|
+
[k: string]: any;
|
|
181
|
+
oper$operator?: OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<Oper.CreateOperationData, "operator" | "operatorId">>>;
|
|
182
|
+
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">>>;
|
|
183
|
+
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">>>;
|
|
184
|
+
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">>>;
|
|
185
|
+
modiEntity$entity?: OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<ModiEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
186
|
+
operEntity$entity?: OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<OperEntity.CreateOperationData, "entity" | "entityId">>>;
|
|
187
|
+
};
|
|
188
|
+
export type UpdateOperation = OakOperation<"update" | ParticularAction | RelationAction | string, UpdateOperationData, Filter, Sorter>;
|
|
189
|
+
export type RemoveOperationData = {} & (({
|
|
190
|
+
ref?: UpdateOperation | RemoveOperation;
|
|
191
|
+
}));
|
|
192
|
+
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
193
|
+
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
194
|
+
export type UserIdSubQuery = Selection<UserIdProjection>;
|
|
195
|
+
export type EntityDef = {
|
|
196
|
+
Schema: Schema;
|
|
197
|
+
OpSchema: OpSchema;
|
|
198
|
+
Action: OakMakeAction<Action | RelationAction> | string;
|
|
199
|
+
Selection: Selection;
|
|
200
|
+
Aggregation: Aggregation;
|
|
201
|
+
Operation: Operation;
|
|
202
|
+
Create: CreateOperation;
|
|
203
|
+
Update: UpdateOperation;
|
|
204
|
+
Remove: RemoveOperation;
|
|
205
|
+
CreateSingle: CreateSingleOperation;
|
|
206
|
+
CreateMulti: CreateMultipleOperation;
|
|
207
|
+
ParticularAction: ParticularAction;
|
|
208
|
+
};
|
|
209
|
+
export {};
|