oak-domain 2.5.2 → 2.6.2
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/actions/action.d.ts +16 -16
- package/lib/actions/action.js +17 -17
- package/lib/actions/relation.d.ts +5 -5
- package/lib/actions/relation.js +38 -38
- package/lib/base-app-domain/ActionDefDict.d.ts +8 -8
- package/lib/base-app-domain/ActionDefDict.js +9 -9
- package/lib/base-app-domain/EntityDict.d.ts +14 -14
- package/lib/base-app-domain/EntityDict.js +2 -2
- package/lib/base-app-domain/Modi/Action.d.ts +10 -10
- package/lib/base-app-domain/Modi/Action.js +14 -14
- package/lib/base-app-domain/Modi/Schema.d.ts +146 -146
- package/lib/base-app-domain/Modi/Schema.js +2 -2
- package/lib/base-app-domain/Modi/Storage.d.ts +3 -3
- package/lib/base-app-domain/Modi/Storage.js +60 -60
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +189 -189
- package/lib/base-app-domain/ModiEntity/Schema.js +2 -2
- package/lib/base-app-domain/ModiEntity/Storage.d.ts +3 -3
- package/lib/base-app-domain/ModiEntity/Storage.js +27 -27
- package/lib/base-app-domain/Oper/Schema.d.ts +144 -144
- package/lib/base-app-domain/Oper/Schema.js +2 -2
- package/lib/base-app-domain/Oper/Storage.d.ts +3 -3
- package/lib/base-app-domain/Oper/Storage.js +29 -29
- package/lib/base-app-domain/OperEntity/Schema.d.ts +205 -205
- package/lib/base-app-domain/OperEntity/Schema.js +2 -2
- package/lib/base-app-domain/OperEntity/Storage.d.ts +3 -3
- package/lib/base-app-domain/OperEntity/Storage.js +27 -27
- package/lib/base-app-domain/Storage.d.ts +3 -3
- package/lib/base-app-domain/Storage.js +17 -17
- package/lib/base-app-domain/User/Action.d.ts +10 -10
- package/lib/base-app-domain/User/Action.js +12 -12
- package/lib/base-app-domain/User/Schema.d.ts +180 -180
- package/lib/base-app-domain/User/Schema.js +2 -2
- package/lib/base-app-domain/User/Storage.d.ts +3 -3
- package/lib/base-app-domain/User/Storage.js +36 -36
- package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +121 -121
- package/lib/base-app-domain/UserEntityGrant/Schema.js +2 -2
- package/lib/base-app-domain/UserEntityGrant/Storage.d.ts +3 -3
- package/lib/base-app-domain/UserEntityGrant/Storage.js +28 -28
- package/lib/base-app-domain/_SubQuery.d.ts +44 -44
- package/lib/base-app-domain/_SubQuery.js +2 -2
- package/lib/base-app-domain/index.d.ts +3 -3
- package/lib/base-app-domain/index.js +6 -6
- package/lib/checkers/index.d.ts +5 -5
- package/lib/checkers/index.js +16 -16
- package/lib/compiler/env.d.ts +11 -11
- package/lib/compiler/env.js +39 -39
- package/lib/compiler/schemalBuilder.d.ts +2 -2
- package/lib/compiler/schemalBuilder.js +3355 -3355
- package/lib/compiler/uiBuilder.d.ts +1 -1
- package/lib/compiler/uiBuilder.js +3 -3
- package/lib/entities/Modi.d.ts +11 -11
- package/lib/entities/Modi.js +46 -46
- package/lib/entities/ModiEntity.d.ts +8 -8
- package/lib/entities/ModiEntity.js +15 -15
- package/lib/entities/Oper.d.ts +10 -10
- package/lib/entities/Oper.js +17 -17
- package/lib/entities/OperEntity.d.ts +8 -8
- package/lib/entities/OperEntity.js +15 -15
- package/lib/entities/User.d.ts +8 -8
- package/lib/entities/User.js +28 -28
- package/lib/entities/UserEntityGrant.d.ts +7 -7
- package/lib/entities/UserEntityGrant.js +12 -12
- package/lib/store/AsyncRowStore.d.ts +51 -48
- package/lib/store/AsyncRowStore.js +189 -183
- package/lib/store/CascadeStore.d.ts +91 -91
- package/lib/store/CascadeStore.js +1634 -1603
- package/lib/store/SyncRowStore.d.ts +29 -29
- package/lib/store/SyncRowStore.js +48 -48
- package/lib/store/TriggerExecutor.d.ts +32 -32
- package/lib/store/TriggerExecutor.js +532 -532
- package/lib/store/actionDef.d.ts +9 -9
- package/lib/store/actionDef.js +333 -333
- package/lib/store/checker.d.ts +26 -26
- package/lib/store/checker.js +829 -867
- package/lib/store/filter.d.ts +109 -109
- package/lib/store/filter.js +893 -893
- package/lib/store/modi.d.ts +13 -13
- package/lib/store/modi.js +216 -216
- package/lib/store/relation.d.ts +13 -13
- package/lib/store/relation.js +66 -66
- package/lib/store/selection.d.ts +19 -7
- package/lib/store/selection.js +265 -238
- package/lib/triggers/index.d.ts +6 -6
- package/lib/triggers/index.js +11 -11
- package/lib/triggers/modi.d.ts +5 -5
- package/lib/triggers/modi.js +72 -72
- package/lib/types/Action.d.ts +20 -20
- package/lib/types/Action.js +2 -2
- package/lib/types/AppLoader.d.ts +11 -11
- package/lib/types/AppLoader.js +10 -10
- package/lib/types/Aspect.d.ts +13 -12
- package/lib/types/Aspect.js +4 -4
- package/lib/types/Auth.d.ts +69 -69
- package/lib/types/Auth.js +2 -2
- package/lib/types/Connector.d.ts +27 -26
- package/lib/types/Connector.js +9 -9
- package/lib/types/Context.d.ts +7 -7
- package/lib/types/Context.js +3 -3
- package/lib/types/DataType.d.ts +18 -18
- package/lib/types/DataType.js +5 -5
- package/lib/types/Demand.d.ts +77 -77
- package/lib/types/Demand.js +9 -9
- package/lib/types/Endpoint.d.ts +11 -11
- package/lib/types/Endpoint.js +3 -3
- package/lib/types/Entity.d.ts +183 -183
- package/lib/types/Entity.js +14 -14
- package/lib/types/Exception.d.ts +100 -98
- package/lib/types/Exception.js +327 -283
- package/lib/types/Expression.d.ts +163 -163
- package/lib/types/Expression.js +427 -427
- package/lib/types/Geo.d.ts +18 -18
- package/lib/types/Geo.js +2 -2
- package/lib/types/Locale.d.ts +24 -24
- package/lib/types/Locale.js +2 -2
- package/lib/types/Logger.d.ts +5 -5
- package/lib/types/Logger.js +3 -3
- package/lib/types/Polyfill.d.ts +23 -23
- package/lib/types/Polyfill.js +2 -2
- package/lib/types/Port.d.ts +17 -17
- package/lib/types/Port.js +2 -2
- package/lib/types/RowStore.d.ts +12 -12
- package/lib/types/RowStore.js +34 -34
- package/lib/types/Storage.d.ts +56 -56
- package/lib/types/Storage.js +2 -2
- package/lib/types/Timer.d.ts +13 -13
- package/lib/types/Timer.js +2 -2
- package/lib/types/Trigger.d.ts +109 -109
- package/lib/types/Trigger.js +49 -49
- package/lib/types/Txn.d.ts +2 -2
- package/lib/types/Txn.js +3 -3
- package/lib/types/Watcher.d.ts +19 -19
- package/lib/types/Watcher.js +4 -4
- package/lib/types/index.d.ts +21 -21
- package/lib/types/index.js +24 -24
- package/lib/types/schema/DataTypes.d.ts +32 -32
- package/lib/types/schema/DataTypes.js +3 -3
- package/lib/utils/SimpleConnector.d.ts +35 -30
- package/lib/utils/SimpleConnector.js +134 -117
- package/lib/utils/assert.d.ts +5 -5
- package/lib/utils/assert.js +9 -9
- package/lib/utils/concurrent.d.ts +15 -15
- package/lib/utils/concurrent.js +89 -89
- package/lib/utils/cron.d.ts +1 -1
- package/lib/utils/cron.js +18 -18
- package/lib/utils/date.d.ts +1 -1
- package/lib/utils/date.js +18 -18
- package/lib/utils/geo.d.ts +4 -4
- package/lib/utils/geo.js +24 -24
- package/lib/utils/lodash.d.ts +20 -20
- package/lib/utils/lodash.js +55 -55
- package/lib/utils/random/random.d.ts +1 -1
- package/lib/utils/random/random.js +24 -24
- package/lib/utils/random/random.mp.d.ts +1 -1
- package/lib/utils/random/random.mp.js +25 -25
- package/lib/utils/random/random.web.d.ts +1 -1
- package/lib/utils/random/random.web.js +17 -17
- package/lib/utils/string.d.ts +22 -22
- package/lib/utils/string.js +70 -70
- package/lib/utils/url.d.ts +1 -0
- package/lib/utils/url.js +12 -0
- package/lib/utils/uuid.d.ts +12 -12
- package/lib/utils/uuid.js +194 -194
- package/lib/utils/validator.d.ts +23 -23
- package/lib/utils/validator.js +123 -123
- package/package.json +48 -48
- package/src/entities/Modi.ts +68 -68
- package/src/entities/ModiEntity.ts +24 -24
- package/src/entities/Oper.ts +28 -28
- package/src/entities/OperEntity.ts +24 -24
- package/src/entities/User.ts +44 -44
- package/src/entities/UserEntityGrant.ts +24 -24
|
@@ -1,205 +1,205 @@
|
|
|
1
|
-
import { String, ForeignKey } from "../../types/DataType";
|
|
2
|
-
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "../../types/Demand";
|
|
3
|
-
import { OneOf } from "../../types/Polyfill";
|
|
4
|
-
import * as SubQuery from "../_SubQuery";
|
|
5
|
-
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
|
|
6
|
-
import { AppendOnlyAction } from "../../actions/action";
|
|
7
|
-
import * as Oper from "../Oper/Schema";
|
|
8
|
-
import * as Modi from "../Modi/Schema";
|
|
9
|
-
import * as User from "../User/Schema";
|
|
10
|
-
import * as UserEntityGrant from "../UserEntityGrant/Schema";
|
|
11
|
-
export declare type OpSchema = EntityShape & {
|
|
12
|
-
operId: ForeignKey<"oper">;
|
|
13
|
-
entity: "modi" | "user" | "userEntityGrant" | string;
|
|
14
|
-
entityId: String<64>;
|
|
15
|
-
};
|
|
16
|
-
export declare type OpAttr = keyof OpSchema;
|
|
17
|
-
export declare type Schema = EntityShape & {
|
|
18
|
-
operId: ForeignKey<"oper">;
|
|
19
|
-
entity: "modi" | "user" | "userEntityGrant" | string;
|
|
20
|
-
entityId: String<64>;
|
|
21
|
-
oper: Oper.Schema;
|
|
22
|
-
modi?: Modi.Schema;
|
|
23
|
-
user?: User.Schema;
|
|
24
|
-
userEntityGrant?: UserEntityGrant.Schema;
|
|
25
|
-
} & {
|
|
26
|
-
[A in ExpressionKey]?: any;
|
|
27
|
-
};
|
|
28
|
-
declare type AttrFilter<E> = {
|
|
29
|
-
id: Q_StringValue | SubQuery.OperEntityIdSubQuery;
|
|
30
|
-
$$createAt$$: Q_DateValue;
|
|
31
|
-
$$seq$$: Q_StringValue;
|
|
32
|
-
$$updateAt$$: Q_DateValue;
|
|
33
|
-
operId: Q_StringValue | SubQuery.OperIdSubQuery;
|
|
34
|
-
oper: Oper.Filter;
|
|
35
|
-
entity: E;
|
|
36
|
-
entityId: Q_StringValue;
|
|
37
|
-
modi: Modi.Filter;
|
|
38
|
-
user: User.Filter;
|
|
39
|
-
userEntityGrant: UserEntityGrant.Filter;
|
|
40
|
-
};
|
|
41
|
-
export declare type Filter<E = Q_EnumValue<"modi" | "user" | "userEntityGrant" | string>> = MakeFilter<AttrFilter<E> & ExprOp<OpAttr | string>>;
|
|
42
|
-
export declare type Projection = {
|
|
43
|
-
"#id"?: NodeId;
|
|
44
|
-
[k: string]: any;
|
|
45
|
-
id?: number;
|
|
46
|
-
$$createAt$$?: number;
|
|
47
|
-
$$updateAt$$?: number;
|
|
48
|
-
$$seq$$?: number;
|
|
49
|
-
operId?: number;
|
|
50
|
-
oper?: Oper.Projection;
|
|
51
|
-
entity?: number;
|
|
52
|
-
entityId?: number;
|
|
53
|
-
modi?: Modi.Projection;
|
|
54
|
-
user?: User.Projection;
|
|
55
|
-
userEntityGrant?: UserEntityGrant.Projection;
|
|
56
|
-
} & Partial<ExprOp<OpAttr | string>>;
|
|
57
|
-
declare type OperEntityIdProjection = OneOf<{
|
|
58
|
-
id: number;
|
|
59
|
-
}>;
|
|
60
|
-
declare type OperIdProjection = OneOf<{
|
|
61
|
-
operId: number;
|
|
62
|
-
}>;
|
|
63
|
-
declare type ModiIdProjection = OneOf<{
|
|
64
|
-
entityId: number;
|
|
65
|
-
}>;
|
|
66
|
-
declare type UserIdProjection = OneOf<{
|
|
67
|
-
entityId: number;
|
|
68
|
-
}>;
|
|
69
|
-
declare type UserEntityGrantIdProjection = OneOf<{
|
|
70
|
-
entityId: number;
|
|
71
|
-
}>;
|
|
72
|
-
export declare type SortAttr = {
|
|
73
|
-
id: number;
|
|
74
|
-
} | {
|
|
75
|
-
$$createAt$$: number;
|
|
76
|
-
} | {
|
|
77
|
-
$$seq$$: number;
|
|
78
|
-
} | {
|
|
79
|
-
$$updateAt$$: number;
|
|
80
|
-
} | {
|
|
81
|
-
operId: number;
|
|
82
|
-
} | {
|
|
83
|
-
oper: Oper.SortAttr;
|
|
84
|
-
} | {
|
|
85
|
-
entity: number;
|
|
86
|
-
} | {
|
|
87
|
-
entityId: number;
|
|
88
|
-
} | {
|
|
89
|
-
modi: Modi.SortAttr;
|
|
90
|
-
} | {
|
|
91
|
-
user: User.SortAttr;
|
|
92
|
-
} | {
|
|
93
|
-
userEntityGrant: UserEntityGrant.SortAttr;
|
|
94
|
-
} | {
|
|
95
|
-
[k: string]: any;
|
|
96
|
-
} | OneOf<ExprOp<OpAttr | string>>;
|
|
97
|
-
export declare type SortNode = {
|
|
98
|
-
$attr: SortAttr;
|
|
99
|
-
$direction?: "asc" | "desc";
|
|
100
|
-
};
|
|
101
|
-
export declare type Sorter = SortNode[];
|
|
102
|
-
export declare type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
103
|
-
export declare type Selection<P extends Object = Projection> = Omit<SelectOperation<P>, "action">;
|
|
104
|
-
export declare type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
105
|
-
export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
106
|
-
operId?: never;
|
|
107
|
-
oper: Oper.CreateSingleOperation;
|
|
108
|
-
} | {
|
|
109
|
-
operId: String<64>;
|
|
110
|
-
})) & ({
|
|
111
|
-
entity?: never;
|
|
112
|
-
entityId?: never;
|
|
113
|
-
modi: Modi.CreateSingleOperation;
|
|
114
|
-
} | {
|
|
115
|
-
entity: "modi";
|
|
116
|
-
entityId: String<64>;
|
|
117
|
-
modi: Modi.UpdateOperation;
|
|
118
|
-
} | {
|
|
119
|
-
entity: "modi";
|
|
120
|
-
entityId: String<64>;
|
|
121
|
-
} | {
|
|
122
|
-
entity?: never;
|
|
123
|
-
entityId?: never;
|
|
124
|
-
user: User.CreateSingleOperation;
|
|
125
|
-
} | {
|
|
126
|
-
entity: "user";
|
|
127
|
-
entityId: String<64>;
|
|
128
|
-
user: User.UpdateOperation;
|
|
129
|
-
} | {
|
|
130
|
-
entity: "user";
|
|
131
|
-
entityId: String<64>;
|
|
132
|
-
} | {
|
|
133
|
-
entity?: never;
|
|
134
|
-
entityId?: never;
|
|
135
|
-
userEntityGrant: UserEntityGrant.CreateSingleOperation;
|
|
136
|
-
} | {
|
|
137
|
-
entity: "userEntityGrant";
|
|
138
|
-
entityId: String<64>;
|
|
139
|
-
userEntityGrant: UserEntityGrant.UpdateOperation;
|
|
140
|
-
} | {
|
|
141
|
-
entity: "userEntityGrant";
|
|
142
|
-
entityId: String<64>;
|
|
143
|
-
} | {
|
|
144
|
-
entity?: string;
|
|
145
|
-
entityId?: string;
|
|
146
|
-
[K: string]: any;
|
|
147
|
-
});
|
|
148
|
-
export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
149
|
-
export declare type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
150
|
-
export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
151
|
-
export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
152
|
-
oper: Oper.CreateSingleOperation;
|
|
153
|
-
operId?: never;
|
|
154
|
-
} | {
|
|
155
|
-
oper?: never;
|
|
156
|
-
operId?: String<64> | null;
|
|
157
|
-
})) & ({
|
|
158
|
-
modi?: Modi.CreateSingleOperation | Modi.UpdateOperation | Modi.RemoveOperation;
|
|
159
|
-
entityId?: never;
|
|
160
|
-
entity?: never;
|
|
161
|
-
} | {
|
|
162
|
-
user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
|
|
163
|
-
entityId?: never;
|
|
164
|
-
entity?: never;
|
|
165
|
-
} | {
|
|
166
|
-
userEntityGrant?: UserEntityGrant.CreateSingleOperation | UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
|
|
167
|
-
entityId?: never;
|
|
168
|
-
entity?: never;
|
|
169
|
-
} | {
|
|
170
|
-
entity?: ("modi" | "user" | "userEntityGrant" | string) | null;
|
|
171
|
-
entityId?: String<64> | null;
|
|
172
|
-
}) & {
|
|
173
|
-
[k: string]: any;
|
|
174
|
-
};
|
|
175
|
-
export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
176
|
-
export declare type RemoveOperationData = {} & ({
|
|
177
|
-
modi?: Modi.UpdateOperation | Modi.RemoveOperation;
|
|
178
|
-
} | {
|
|
179
|
-
user?: User.UpdateOperation | User.RemoveOperation;
|
|
180
|
-
} | {
|
|
181
|
-
userEntityGrant?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
|
|
182
|
-
} | {
|
|
183
|
-
[k: string]: any;
|
|
184
|
-
});
|
|
185
|
-
export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
186
|
-
export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
187
|
-
export declare type OperIdSubQuery = Selection<OperIdProjection>;
|
|
188
|
-
export declare type ModiIdSubQuery = Selection<ModiIdProjection>;
|
|
189
|
-
export declare type UserIdSubQuery = Selection<UserIdProjection>;
|
|
190
|
-
export declare type UserEntityGrantIdSubQuery = Selection<UserEntityGrantIdProjection>;
|
|
191
|
-
export declare type OperEntityIdSubQuery = Selection<OperEntityIdProjection>;
|
|
192
|
-
export declare type EntityDef = {
|
|
193
|
-
Schema: Schema;
|
|
194
|
-
OpSchema: OpSchema;
|
|
195
|
-
Action: OakMakeAction<AppendOnlyAction> | string;
|
|
196
|
-
Selection: Selection;
|
|
197
|
-
Aggregation: Aggregation;
|
|
198
|
-
Operation: Operation;
|
|
199
|
-
Create: CreateOperation;
|
|
200
|
-
Update: UpdateOperation;
|
|
201
|
-
Remove: RemoveOperation;
|
|
202
|
-
CreateSingle: CreateSingleOperation;
|
|
203
|
-
CreateMulti: CreateMultipleOperation;
|
|
204
|
-
};
|
|
205
|
-
export {};
|
|
1
|
+
import { String, ForeignKey } from "../../types/DataType";
|
|
2
|
+
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "../../types/Demand";
|
|
3
|
+
import { OneOf } from "../../types/Polyfill";
|
|
4
|
+
import * as SubQuery from "../_SubQuery";
|
|
5
|
+
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape } from "../../types/Entity";
|
|
6
|
+
import { AppendOnlyAction } from "../../actions/action";
|
|
7
|
+
import * as Oper from "../Oper/Schema";
|
|
8
|
+
import * as Modi from "../Modi/Schema";
|
|
9
|
+
import * as User from "../User/Schema";
|
|
10
|
+
import * as UserEntityGrant from "../UserEntityGrant/Schema";
|
|
11
|
+
export declare type OpSchema = EntityShape & {
|
|
12
|
+
operId: ForeignKey<"oper">;
|
|
13
|
+
entity: "modi" | "user" | "userEntityGrant" | string;
|
|
14
|
+
entityId: String<64>;
|
|
15
|
+
};
|
|
16
|
+
export declare type OpAttr = keyof OpSchema;
|
|
17
|
+
export declare type Schema = EntityShape & {
|
|
18
|
+
operId: ForeignKey<"oper">;
|
|
19
|
+
entity: "modi" | "user" | "userEntityGrant" | string;
|
|
20
|
+
entityId: String<64>;
|
|
21
|
+
oper: Oper.Schema;
|
|
22
|
+
modi?: Modi.Schema;
|
|
23
|
+
user?: User.Schema;
|
|
24
|
+
userEntityGrant?: UserEntityGrant.Schema;
|
|
25
|
+
} & {
|
|
26
|
+
[A in ExpressionKey]?: any;
|
|
27
|
+
};
|
|
28
|
+
declare type AttrFilter<E> = {
|
|
29
|
+
id: Q_StringValue | SubQuery.OperEntityIdSubQuery;
|
|
30
|
+
$$createAt$$: Q_DateValue;
|
|
31
|
+
$$seq$$: Q_StringValue;
|
|
32
|
+
$$updateAt$$: Q_DateValue;
|
|
33
|
+
operId: Q_StringValue | SubQuery.OperIdSubQuery;
|
|
34
|
+
oper: Oper.Filter;
|
|
35
|
+
entity: E;
|
|
36
|
+
entityId: Q_StringValue;
|
|
37
|
+
modi: Modi.Filter;
|
|
38
|
+
user: User.Filter;
|
|
39
|
+
userEntityGrant: UserEntityGrant.Filter;
|
|
40
|
+
};
|
|
41
|
+
export declare type Filter<E = Q_EnumValue<"modi" | "user" | "userEntityGrant" | string>> = MakeFilter<AttrFilter<E> & ExprOp<OpAttr | string>>;
|
|
42
|
+
export declare type Projection = {
|
|
43
|
+
"#id"?: NodeId;
|
|
44
|
+
[k: string]: any;
|
|
45
|
+
id?: number;
|
|
46
|
+
$$createAt$$?: number;
|
|
47
|
+
$$updateAt$$?: number;
|
|
48
|
+
$$seq$$?: number;
|
|
49
|
+
operId?: number;
|
|
50
|
+
oper?: Oper.Projection;
|
|
51
|
+
entity?: number;
|
|
52
|
+
entityId?: number;
|
|
53
|
+
modi?: Modi.Projection;
|
|
54
|
+
user?: User.Projection;
|
|
55
|
+
userEntityGrant?: UserEntityGrant.Projection;
|
|
56
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
57
|
+
declare type OperEntityIdProjection = OneOf<{
|
|
58
|
+
id: number;
|
|
59
|
+
}>;
|
|
60
|
+
declare type OperIdProjection = OneOf<{
|
|
61
|
+
operId: number;
|
|
62
|
+
}>;
|
|
63
|
+
declare type ModiIdProjection = OneOf<{
|
|
64
|
+
entityId: number;
|
|
65
|
+
}>;
|
|
66
|
+
declare type UserIdProjection = OneOf<{
|
|
67
|
+
entityId: number;
|
|
68
|
+
}>;
|
|
69
|
+
declare type UserEntityGrantIdProjection = OneOf<{
|
|
70
|
+
entityId: number;
|
|
71
|
+
}>;
|
|
72
|
+
export declare type SortAttr = {
|
|
73
|
+
id: number;
|
|
74
|
+
} | {
|
|
75
|
+
$$createAt$$: number;
|
|
76
|
+
} | {
|
|
77
|
+
$$seq$$: number;
|
|
78
|
+
} | {
|
|
79
|
+
$$updateAt$$: number;
|
|
80
|
+
} | {
|
|
81
|
+
operId: number;
|
|
82
|
+
} | {
|
|
83
|
+
oper: Oper.SortAttr;
|
|
84
|
+
} | {
|
|
85
|
+
entity: number;
|
|
86
|
+
} | {
|
|
87
|
+
entityId: number;
|
|
88
|
+
} | {
|
|
89
|
+
modi: Modi.SortAttr;
|
|
90
|
+
} | {
|
|
91
|
+
user: User.SortAttr;
|
|
92
|
+
} | {
|
|
93
|
+
userEntityGrant: UserEntityGrant.SortAttr;
|
|
94
|
+
} | {
|
|
95
|
+
[k: string]: any;
|
|
96
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
97
|
+
export declare type SortNode = {
|
|
98
|
+
$attr: SortAttr;
|
|
99
|
+
$direction?: "asc" | "desc";
|
|
100
|
+
};
|
|
101
|
+
export declare type Sorter = SortNode[];
|
|
102
|
+
export declare type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
103
|
+
export declare type Selection<P extends Object = Projection> = Omit<SelectOperation<P>, "action">;
|
|
104
|
+
export declare type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
105
|
+
export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
106
|
+
operId?: never;
|
|
107
|
+
oper: Oper.CreateSingleOperation;
|
|
108
|
+
} | {
|
|
109
|
+
operId: String<64>;
|
|
110
|
+
})) & ({
|
|
111
|
+
entity?: never;
|
|
112
|
+
entityId?: never;
|
|
113
|
+
modi: Modi.CreateSingleOperation;
|
|
114
|
+
} | {
|
|
115
|
+
entity: "modi";
|
|
116
|
+
entityId: String<64>;
|
|
117
|
+
modi: Modi.UpdateOperation;
|
|
118
|
+
} | {
|
|
119
|
+
entity: "modi";
|
|
120
|
+
entityId: String<64>;
|
|
121
|
+
} | {
|
|
122
|
+
entity?: never;
|
|
123
|
+
entityId?: never;
|
|
124
|
+
user: User.CreateSingleOperation;
|
|
125
|
+
} | {
|
|
126
|
+
entity: "user";
|
|
127
|
+
entityId: String<64>;
|
|
128
|
+
user: User.UpdateOperation;
|
|
129
|
+
} | {
|
|
130
|
+
entity: "user";
|
|
131
|
+
entityId: String<64>;
|
|
132
|
+
} | {
|
|
133
|
+
entity?: never;
|
|
134
|
+
entityId?: never;
|
|
135
|
+
userEntityGrant: UserEntityGrant.CreateSingleOperation;
|
|
136
|
+
} | {
|
|
137
|
+
entity: "userEntityGrant";
|
|
138
|
+
entityId: String<64>;
|
|
139
|
+
userEntityGrant: UserEntityGrant.UpdateOperation;
|
|
140
|
+
} | {
|
|
141
|
+
entity: "userEntityGrant";
|
|
142
|
+
entityId: String<64>;
|
|
143
|
+
} | {
|
|
144
|
+
entity?: string;
|
|
145
|
+
entityId?: string;
|
|
146
|
+
[K: string]: any;
|
|
147
|
+
});
|
|
148
|
+
export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
149
|
+
export declare type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
150
|
+
export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
151
|
+
export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
152
|
+
oper: Oper.CreateSingleOperation;
|
|
153
|
+
operId?: never;
|
|
154
|
+
} | {
|
|
155
|
+
oper?: never;
|
|
156
|
+
operId?: String<64> | null;
|
|
157
|
+
})) & ({
|
|
158
|
+
modi?: Modi.CreateSingleOperation | Modi.UpdateOperation | Modi.RemoveOperation;
|
|
159
|
+
entityId?: never;
|
|
160
|
+
entity?: never;
|
|
161
|
+
} | {
|
|
162
|
+
user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
|
|
163
|
+
entityId?: never;
|
|
164
|
+
entity?: never;
|
|
165
|
+
} | {
|
|
166
|
+
userEntityGrant?: UserEntityGrant.CreateSingleOperation | UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
|
|
167
|
+
entityId?: never;
|
|
168
|
+
entity?: never;
|
|
169
|
+
} | {
|
|
170
|
+
entity?: ("modi" | "user" | "userEntityGrant" | string) | null;
|
|
171
|
+
entityId?: String<64> | null;
|
|
172
|
+
}) & {
|
|
173
|
+
[k: string]: any;
|
|
174
|
+
};
|
|
175
|
+
export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
176
|
+
export declare type RemoveOperationData = {} & ({
|
|
177
|
+
modi?: Modi.UpdateOperation | Modi.RemoveOperation;
|
|
178
|
+
} | {
|
|
179
|
+
user?: User.UpdateOperation | User.RemoveOperation;
|
|
180
|
+
} | {
|
|
181
|
+
userEntityGrant?: UserEntityGrant.UpdateOperation | UserEntityGrant.RemoveOperation;
|
|
182
|
+
} | {
|
|
183
|
+
[k: string]: any;
|
|
184
|
+
});
|
|
185
|
+
export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
186
|
+
export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
187
|
+
export declare type OperIdSubQuery = Selection<OperIdProjection>;
|
|
188
|
+
export declare type ModiIdSubQuery = Selection<ModiIdProjection>;
|
|
189
|
+
export declare type UserIdSubQuery = Selection<UserIdProjection>;
|
|
190
|
+
export declare type UserEntityGrantIdSubQuery = Selection<UserEntityGrantIdProjection>;
|
|
191
|
+
export declare type OperEntityIdSubQuery = Selection<OperEntityIdProjection>;
|
|
192
|
+
export declare type EntityDef = {
|
|
193
|
+
Schema: Schema;
|
|
194
|
+
OpSchema: OpSchema;
|
|
195
|
+
Action: OakMakeAction<AppendOnlyAction> | string;
|
|
196
|
+
Selection: Selection;
|
|
197
|
+
Aggregation: Aggregation;
|
|
198
|
+
Operation: Operation;
|
|
199
|
+
Create: CreateOperation;
|
|
200
|
+
Update: UpdateOperation;
|
|
201
|
+
Remove: RemoveOperation;
|
|
202
|
+
CreateSingle: CreateSingleOperation;
|
|
203
|
+
CreateMulti: CreateMultipleOperation;
|
|
204
|
+
};
|
|
205
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StorageDesc } from "../../types/Storage";
|
|
2
|
-
import { OpSchema } from "./Schema";
|
|
3
|
-
export declare const desc: StorageDesc<OpSchema>;
|
|
1
|
+
import { StorageDesc } from "../../types/Storage";
|
|
2
|
+
import { OpSchema } from "./Schema";
|
|
3
|
+
export declare const desc: StorageDesc<OpSchema>;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.desc = void 0;
|
|
4
|
-
var action_1 = require("../../actions/action");
|
|
5
|
-
exports.desc = {
|
|
6
|
-
attributes: {
|
|
7
|
-
operId: {
|
|
8
|
-
type: "ref",
|
|
9
|
-
ref: "oper"
|
|
10
|
-
},
|
|
11
|
-
entity: {
|
|
12
|
-
type: "varchar",
|
|
13
|
-
params: {
|
|
14
|
-
length: 32
|
|
15
|
-
},
|
|
16
|
-
ref: ["modi", "user", "userEntityGrant"]
|
|
17
|
-
},
|
|
18
|
-
entityId: {
|
|
19
|
-
type: "varchar",
|
|
20
|
-
params: {
|
|
21
|
-
length: 64
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
actionType: "appendOnly",
|
|
26
|
-
actions: action_1.appendOnlyActions
|
|
27
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.desc = void 0;
|
|
4
|
+
var action_1 = require("../../actions/action");
|
|
5
|
+
exports.desc = {
|
|
6
|
+
attributes: {
|
|
7
|
+
operId: {
|
|
8
|
+
type: "ref",
|
|
9
|
+
ref: "oper"
|
|
10
|
+
},
|
|
11
|
+
entity: {
|
|
12
|
+
type: "varchar",
|
|
13
|
+
params: {
|
|
14
|
+
length: 32
|
|
15
|
+
},
|
|
16
|
+
ref: ["modi", "user", "userEntityGrant"]
|
|
17
|
+
},
|
|
18
|
+
entityId: {
|
|
19
|
+
type: "varchar",
|
|
20
|
+
params: {
|
|
21
|
+
length: 64
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
actionType: "appendOnly",
|
|
26
|
+
actions: action_1.appendOnlyActions
|
|
27
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StorageSchema } from "../types/Storage";
|
|
2
|
-
import { EntityDict } from "./EntityDict";
|
|
3
|
-
export declare const storageSchema: StorageSchema<EntityDict>;
|
|
1
|
+
import { StorageSchema } from "../types/Storage";
|
|
2
|
+
import { EntityDict } from "./EntityDict";
|
|
3
|
+
export declare const storageSchema: StorageSchema<EntityDict>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storageSchema = void 0;
|
|
4
|
-
var Storage_1 = require("./Modi/Storage");
|
|
5
|
-
var Storage_2 = require("./ModiEntity/Storage");
|
|
6
|
-
var Storage_3 = require("./Oper/Storage");
|
|
7
|
-
var Storage_4 = require("./OperEntity/Storage");
|
|
8
|
-
var Storage_5 = require("./User/Storage");
|
|
9
|
-
var Storage_6 = require("./UserEntityGrant/Storage");
|
|
10
|
-
exports.storageSchema = {
|
|
11
|
-
modi: Storage_1.desc,
|
|
12
|
-
modiEntity: Storage_2.desc,
|
|
13
|
-
oper: Storage_3.desc,
|
|
14
|
-
operEntity: Storage_4.desc,
|
|
15
|
-
user: Storage_5.desc,
|
|
16
|
-
userEntityGrant: Storage_6.desc
|
|
17
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.storageSchema = void 0;
|
|
4
|
+
var Storage_1 = require("./Modi/Storage");
|
|
5
|
+
var Storage_2 = require("./ModiEntity/Storage");
|
|
6
|
+
var Storage_3 = require("./Oper/Storage");
|
|
7
|
+
var Storage_4 = require("./OperEntity/Storage");
|
|
8
|
+
var Storage_5 = require("./User/Storage");
|
|
9
|
+
var Storage_6 = require("./UserEntityGrant/Storage");
|
|
10
|
+
exports.storageSchema = {
|
|
11
|
+
modi: Storage_1.desc,
|
|
12
|
+
modiEntity: Storage_2.desc,
|
|
13
|
+
oper: Storage_3.desc,
|
|
14
|
+
operEntity: Storage_4.desc,
|
|
15
|
+
user: Storage_5.desc,
|
|
16
|
+
userEntityGrant: Storage_6.desc
|
|
17
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ActionDef } from "../../types/Action";
|
|
2
|
-
import { GenericAction, RelationAction } from "../../actions/action";
|
|
3
|
-
export declare type UserAction = 'mergeTo' | string;
|
|
4
|
-
export declare type UserState = 'normal' | 'merged' | string;
|
|
5
|
-
export declare type ParticularAction = UserAction;
|
|
6
|
-
export declare type Action = GenericAction | ParticularAction | RelationAction | string;
|
|
7
|
-
export declare const actions: string[];
|
|
8
|
-
export declare const ActionDefDict: {
|
|
9
|
-
userState: ActionDef<string, string>;
|
|
10
|
-
};
|
|
1
|
+
import { ActionDef } from "../../types/Action";
|
|
2
|
+
import { GenericAction, RelationAction } from "../../actions/action";
|
|
3
|
+
export declare type UserAction = 'mergeTo' | string;
|
|
4
|
+
export declare type UserState = 'normal' | 'merged' | string;
|
|
5
|
+
export declare type ParticularAction = UserAction;
|
|
6
|
+
export declare type Action = GenericAction | ParticularAction | RelationAction | string;
|
|
7
|
+
export declare const actions: string[];
|
|
8
|
+
export declare const ActionDefDict: {
|
|
9
|
+
userState: ActionDef<string, string>;
|
|
10
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionDefDict = exports.actions = void 0;
|
|
4
|
-
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "grant", "revoke", "mergeTo"];
|
|
5
|
-
var UserActionDef = {
|
|
6
|
-
stm: {
|
|
7
|
-
mergeTo: ['normal', 'merged']
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
exports.ActionDefDict = {
|
|
11
|
-
userState: UserActionDef
|
|
12
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionDefDict = exports.actions = void 0;
|
|
4
|
+
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "grant", "revoke", "mergeTo"];
|
|
5
|
+
var UserActionDef = {
|
|
6
|
+
stm: {
|
|
7
|
+
mergeTo: ['normal', 'merged']
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
exports.ActionDefDict = {
|
|
11
|
+
userState: UserActionDef
|
|
12
|
+
};
|