oak-domain 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/actions/action.d.ts +16 -16
- package/lib/actions/action.js +17 -17
- package/lib/actions/relation.d.ts +1 -1
- package/lib/actions/relation.js +2 -2
- package/lib/base-app-domain/ActionDefDict.d.ts +5 -5
- package/lib/base-app-domain/ActionDefDict.js +7 -7
- package/lib/base-app-domain/EntityDict.d.ts +12 -12
- 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 +161 -161
- 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 +176 -176
- 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 +26 -26
- package/lib/base-app-domain/Oper/Schema.d.ts +158 -158
- 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 +193 -193
- 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 +26 -26
- package/lib/base-app-domain/Storage.d.ts +3 -3
- package/lib/base-app-domain/Storage.js +15 -15
- package/lib/base-app-domain/User/Schema.d.ts +137 -137
- 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 +25 -25
- package/lib/base-app-domain/_SubQuery.d.ts +36 -36
- 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 +8 -8
- 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 +3137 -3137
- 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 +7 -7
- package/lib/entities/User.js +12 -12
- package/lib/store/AsyncRowStore.d.ts +45 -45
- package/lib/store/AsyncRowStore.js +180 -180
- package/lib/store/CascadeStore.d.ts +89 -89
- package/lib/store/CascadeStore.js +1515 -1511
- package/lib/store/SyncRowStore.d.ts +26 -26
- package/lib/store/SyncRowStore.js +45 -45
- package/lib/store/TriggerExecutor.d.ts +32 -32
- package/lib/store/TriggerExecutor.js +470 -470
- package/lib/store/actionDef.d.ts +9 -9
- package/lib/store/actionDef.js +135 -135
- package/lib/store/checker.d.ts +6 -6
- package/lib/store/checker.js +218 -165
- package/lib/store/filter.d.ts +99 -99
- package/lib/store/filter.js +855 -855
- package/lib/store/modi.d.ts +13 -13
- package/lib/store/modi.js +172 -172
- package/lib/store/relation.d.ts +13 -13
- package/lib/store/relation.js +64 -64
- package/lib/store/selection.d.ts +7 -7
- package/lib/store/selection.js +228 -228
- 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 +14 -14
- 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 +12 -12
- package/lib/types/Aspect.js +4 -4
- package/lib/types/Auth.d.ts +57 -31
- package/lib/types/Auth.js +2 -2
- package/lib/types/Connector.d.ts +26 -26
- package/lib/types/Connector.js +9 -9
- package/lib/types/Context.d.ts +6 -6
- 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/Entity.d.ts +159 -159
- package/lib/types/Entity.js +15 -15
- package/lib/types/Exception.d.ts +83 -83
- package/lib/types/Exception.js +252 -252
- package/lib/types/Expression.d.ts +141 -141
- package/lib/types/Expression.js +387 -387
- 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/RowStore.d.ts +12 -12
- package/lib/types/RowStore.js +34 -34
- package/lib/types/Storage.d.ts +55 -55
- package/lib/types/Storage.js +2 -2
- package/lib/types/Trigger.d.ts +88 -89
- package/lib/types/Trigger.js +39 -39
- 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 +18 -18
- package/lib/types/index.js +21 -21
- package/lib/types/schema/DataTypes.d.ts +32 -32
- package/lib/types/schema/DataTypes.js +3 -3
- package/lib/utils/SimpleConnector.d.ts +30 -30
- package/lib/utils/SimpleConnector.js +102 -102
- 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/geo.d.ts +4 -4
- package/lib/utils/geo.js +24 -24
- package/lib/utils/lodash.d.ts +5 -5
- package/lib/utils/lodash.js +38 -38
- 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/uuid.d.ts +12 -12
- package/lib/utils/uuid.js +182 -182
- package/lib/utils/validator.d.ts +23 -23
- package/lib/utils/validator.js +123 -123
- package/package.json +47 -47
- 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 +19 -19
|
@@ -1,193 +1,193 @@
|
|
|
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, Operation as OakOperation, 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
|
-
export declare type OpSchema = EntityShape & {
|
|
11
|
-
operId: ForeignKey<"oper">;
|
|
12
|
-
entity: "modi" | "user" | string;
|
|
13
|
-
entityId: String<64>;
|
|
14
|
-
};
|
|
15
|
-
export declare type OpAttr = keyof OpSchema;
|
|
16
|
-
export declare type Schema = EntityShape & {
|
|
17
|
-
operId: ForeignKey<"oper">;
|
|
18
|
-
entity: "modi" | "user" | string;
|
|
19
|
-
entityId: String<64>;
|
|
20
|
-
oper: Oper.Schema;
|
|
21
|
-
modi?: Modi.Schema;
|
|
22
|
-
user?: User.Schema;
|
|
23
|
-
} & {
|
|
24
|
-
[A in ExpressionKey]?: any;
|
|
25
|
-
};
|
|
26
|
-
declare type AttrFilter<E> = {
|
|
27
|
-
id: Q_StringValue | SubQuery.OperEntityIdSubQuery;
|
|
28
|
-
$$createAt$$: Q_DateValue;
|
|
29
|
-
$$seq$$: Q_StringValue;
|
|
30
|
-
$$updateAt$$: Q_DateValue;
|
|
31
|
-
operId: Q_StringValue | SubQuery.OperIdSubQuery;
|
|
32
|
-
oper: Oper.Filter;
|
|
33
|
-
entity: E;
|
|
34
|
-
entityId: Q_StringValue;
|
|
35
|
-
modi: Modi.Filter;
|
|
36
|
-
user: User.Filter;
|
|
37
|
-
};
|
|
38
|
-
export declare type Filter<E = Q_EnumValue<"modi" | "user" | string>> = MakeFilter<AttrFilter<E> & ExprOp<OpAttr | string>>;
|
|
39
|
-
export declare type Projection = {
|
|
40
|
-
"#id"?: NodeId;
|
|
41
|
-
[k: string]: any;
|
|
42
|
-
id: number;
|
|
43
|
-
$$createAt$$?: number;
|
|
44
|
-
$$updateAt$$?: number;
|
|
45
|
-
$$seq$$?: number;
|
|
46
|
-
operId?: number;
|
|
47
|
-
oper?: Oper.Projection;
|
|
48
|
-
entity?: number;
|
|
49
|
-
entityId?: number;
|
|
50
|
-
modi?: Modi.Projection;
|
|
51
|
-
user?: User.Projection;
|
|
52
|
-
} & Partial<ExprOp<OpAttr | string>>;
|
|
53
|
-
export declare type ExportProjection = {
|
|
54
|
-
"#id"?: NodeId;
|
|
55
|
-
[k: string]: any;
|
|
56
|
-
id?: string;
|
|
57
|
-
$$createAt$$?: string;
|
|
58
|
-
$$updateAt$$?: string;
|
|
59
|
-
$$seq$$?: string;
|
|
60
|
-
operId?: string;
|
|
61
|
-
oper?: Oper.ExportProjection;
|
|
62
|
-
entity?: string;
|
|
63
|
-
entityId?: string;
|
|
64
|
-
modi?: Modi.ExportProjection;
|
|
65
|
-
user?: User.ExportProjection;
|
|
66
|
-
} & Partial<ExprOp<OpAttr | string>>;
|
|
67
|
-
declare type OperEntityIdProjection = OneOf<{
|
|
68
|
-
id: number;
|
|
69
|
-
}>;
|
|
70
|
-
declare type OperIdProjection = OneOf<{
|
|
71
|
-
operId: number;
|
|
72
|
-
}>;
|
|
73
|
-
declare type ModiIdProjection = OneOf<{
|
|
74
|
-
entityId: number;
|
|
75
|
-
}>;
|
|
76
|
-
declare type UserIdProjection = OneOf<{
|
|
77
|
-
entityId: number;
|
|
78
|
-
}>;
|
|
79
|
-
export declare type SortAttr = {
|
|
80
|
-
id: number;
|
|
81
|
-
} | {
|
|
82
|
-
$$createAt$$: number;
|
|
83
|
-
} | {
|
|
84
|
-
$$seq$$: number;
|
|
85
|
-
} | {
|
|
86
|
-
$$updateAt$$: number;
|
|
87
|
-
} | {
|
|
88
|
-
operId: number;
|
|
89
|
-
} | {
|
|
90
|
-
oper: Oper.SortAttr;
|
|
91
|
-
} | {
|
|
92
|
-
entity: number;
|
|
93
|
-
} | {
|
|
94
|
-
entityId: number;
|
|
95
|
-
} | {
|
|
96
|
-
modi: Modi.SortAttr;
|
|
97
|
-
} | {
|
|
98
|
-
user: User.SortAttr;
|
|
99
|
-
} | {
|
|
100
|
-
[k: string]: any;
|
|
101
|
-
} | OneOf<ExprOp<OpAttr | string>>;
|
|
102
|
-
export declare type SortNode = {
|
|
103
|
-
$attr: SortAttr;
|
|
104
|
-
$direction?: "asc" | "desc";
|
|
105
|
-
};
|
|
106
|
-
export declare type Sorter = SortNode[];
|
|
107
|
-
export declare type SelectOperation<P extends Object = Projection> = Omit<OakOperation<"select", P, Filter, Sorter>, "id">;
|
|
108
|
-
export declare type Selection<P extends Object = Projection> = Omit<SelectOperation<P>, "action">;
|
|
109
|
-
export declare type Exportation = OakOperation<"export", ExportProjection, Filter, Sorter>;
|
|
110
|
-
export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
111
|
-
operId?: never;
|
|
112
|
-
oper: Oper.CreateSingleOperation;
|
|
113
|
-
} | {
|
|
114
|
-
operId: String<64>;
|
|
115
|
-
})) & ({
|
|
116
|
-
entity?: never;
|
|
117
|
-
entityId?: never;
|
|
118
|
-
modi: Modi.CreateSingleOperation;
|
|
119
|
-
} | {
|
|
120
|
-
entity: "modi";
|
|
121
|
-
entityId: String<64>;
|
|
122
|
-
modi: Modi.UpdateOperation;
|
|
123
|
-
} | {
|
|
124
|
-
entity: "modi";
|
|
125
|
-
entityId: String<64>;
|
|
126
|
-
} | {
|
|
127
|
-
entity?: never;
|
|
128
|
-
entityId?: never;
|
|
129
|
-
user: User.CreateSingleOperation;
|
|
130
|
-
} | {
|
|
131
|
-
entity: "user";
|
|
132
|
-
entityId: String<64>;
|
|
133
|
-
user: User.UpdateOperation;
|
|
134
|
-
} | {
|
|
135
|
-
entity: "user";
|
|
136
|
-
entityId: String<64>;
|
|
137
|
-
} | {
|
|
138
|
-
entity?: string;
|
|
139
|
-
entityId?: string;
|
|
140
|
-
[K: string]: any;
|
|
141
|
-
});
|
|
142
|
-
export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
143
|
-
export declare type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
144
|
-
export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
145
|
-
export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
146
|
-
oper: Oper.CreateSingleOperation;
|
|
147
|
-
operId?: never;
|
|
148
|
-
} | {
|
|
149
|
-
oper?: never;
|
|
150
|
-
operId?: String<64> | null;
|
|
151
|
-
})) & ({
|
|
152
|
-
modi?: Modi.CreateSingleOperation | Modi.UpdateOperation | Modi.RemoveOperation;
|
|
153
|
-
entityId?: never;
|
|
154
|
-
entity?: never;
|
|
155
|
-
} | {
|
|
156
|
-
user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
|
|
157
|
-
entityId?: never;
|
|
158
|
-
entity?: never;
|
|
159
|
-
} | {
|
|
160
|
-
entity?: ("modi" | "user" | string) | null;
|
|
161
|
-
entityId?: String<64> | null;
|
|
162
|
-
}) & {
|
|
163
|
-
[k: string]: any;
|
|
164
|
-
};
|
|
165
|
-
export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
166
|
-
export declare type RemoveOperationData = {} & ({
|
|
167
|
-
modi?: Modi.UpdateOperation | Modi.RemoveOperation;
|
|
168
|
-
} | {
|
|
169
|
-
user?: User.UpdateOperation | User.RemoveOperation;
|
|
170
|
-
} | {
|
|
171
|
-
[k: string]: any;
|
|
172
|
-
});
|
|
173
|
-
export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
174
|
-
export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation | SelectOperation;
|
|
175
|
-
export declare type OperIdSubQuery = Selection<OperIdProjection>;
|
|
176
|
-
export declare type ModiIdSubQuery = Selection<ModiIdProjection>;
|
|
177
|
-
export declare type UserIdSubQuery = Selection<UserIdProjection>;
|
|
178
|
-
export declare type OperEntityIdSubQuery = Selection<OperEntityIdProjection>;
|
|
179
|
-
export declare type NativeAttr = OpAttr | `oper.${Oper.NativeAttr}` | `entity.${Modi.NativeAttr}` | `entity.${User.NativeAttr}`;
|
|
180
|
-
export declare type FullAttr = NativeAttr;
|
|
181
|
-
export declare type EntityDef = {
|
|
182
|
-
Schema: Schema;
|
|
183
|
-
OpSchema: OpSchema;
|
|
184
|
-
Action: OakMakeAction<AppendOnlyAction> | string;
|
|
185
|
-
Selection: Selection;
|
|
186
|
-
Operation: Operation;
|
|
187
|
-
Create: CreateOperation;
|
|
188
|
-
Update: UpdateOperation;
|
|
189
|
-
Remove: RemoveOperation;
|
|
190
|
-
CreateSingle: CreateSingleOperation;
|
|
191
|
-
CreateMulti: CreateMultipleOperation;
|
|
192
|
-
};
|
|
193
|
-
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, Operation as OakOperation, 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
|
+
export declare type OpSchema = EntityShape & {
|
|
11
|
+
operId: ForeignKey<"oper">;
|
|
12
|
+
entity: "modi" | "user" | string;
|
|
13
|
+
entityId: String<64>;
|
|
14
|
+
};
|
|
15
|
+
export declare type OpAttr = keyof OpSchema;
|
|
16
|
+
export declare type Schema = EntityShape & {
|
|
17
|
+
operId: ForeignKey<"oper">;
|
|
18
|
+
entity: "modi" | "user" | string;
|
|
19
|
+
entityId: String<64>;
|
|
20
|
+
oper: Oper.Schema;
|
|
21
|
+
modi?: Modi.Schema;
|
|
22
|
+
user?: User.Schema;
|
|
23
|
+
} & {
|
|
24
|
+
[A in ExpressionKey]?: any;
|
|
25
|
+
};
|
|
26
|
+
declare type AttrFilter<E> = {
|
|
27
|
+
id: Q_StringValue | SubQuery.OperEntityIdSubQuery;
|
|
28
|
+
$$createAt$$: Q_DateValue;
|
|
29
|
+
$$seq$$: Q_StringValue;
|
|
30
|
+
$$updateAt$$: Q_DateValue;
|
|
31
|
+
operId: Q_StringValue | SubQuery.OperIdSubQuery;
|
|
32
|
+
oper: Oper.Filter;
|
|
33
|
+
entity: E;
|
|
34
|
+
entityId: Q_StringValue;
|
|
35
|
+
modi: Modi.Filter;
|
|
36
|
+
user: User.Filter;
|
|
37
|
+
};
|
|
38
|
+
export declare type Filter<E = Q_EnumValue<"modi" | "user" | string>> = MakeFilter<AttrFilter<E> & ExprOp<OpAttr | string>>;
|
|
39
|
+
export declare type Projection = {
|
|
40
|
+
"#id"?: NodeId;
|
|
41
|
+
[k: string]: any;
|
|
42
|
+
id: number;
|
|
43
|
+
$$createAt$$?: number;
|
|
44
|
+
$$updateAt$$?: number;
|
|
45
|
+
$$seq$$?: number;
|
|
46
|
+
operId?: number;
|
|
47
|
+
oper?: Oper.Projection;
|
|
48
|
+
entity?: number;
|
|
49
|
+
entityId?: number;
|
|
50
|
+
modi?: Modi.Projection;
|
|
51
|
+
user?: User.Projection;
|
|
52
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
53
|
+
export declare type ExportProjection = {
|
|
54
|
+
"#id"?: NodeId;
|
|
55
|
+
[k: string]: any;
|
|
56
|
+
id?: string;
|
|
57
|
+
$$createAt$$?: string;
|
|
58
|
+
$$updateAt$$?: string;
|
|
59
|
+
$$seq$$?: string;
|
|
60
|
+
operId?: string;
|
|
61
|
+
oper?: Oper.ExportProjection;
|
|
62
|
+
entity?: string;
|
|
63
|
+
entityId?: string;
|
|
64
|
+
modi?: Modi.ExportProjection;
|
|
65
|
+
user?: User.ExportProjection;
|
|
66
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
67
|
+
declare type OperEntityIdProjection = OneOf<{
|
|
68
|
+
id: number;
|
|
69
|
+
}>;
|
|
70
|
+
declare type OperIdProjection = OneOf<{
|
|
71
|
+
operId: number;
|
|
72
|
+
}>;
|
|
73
|
+
declare type ModiIdProjection = OneOf<{
|
|
74
|
+
entityId: number;
|
|
75
|
+
}>;
|
|
76
|
+
declare type UserIdProjection = OneOf<{
|
|
77
|
+
entityId: number;
|
|
78
|
+
}>;
|
|
79
|
+
export declare type SortAttr = {
|
|
80
|
+
id: number;
|
|
81
|
+
} | {
|
|
82
|
+
$$createAt$$: number;
|
|
83
|
+
} | {
|
|
84
|
+
$$seq$$: number;
|
|
85
|
+
} | {
|
|
86
|
+
$$updateAt$$: number;
|
|
87
|
+
} | {
|
|
88
|
+
operId: number;
|
|
89
|
+
} | {
|
|
90
|
+
oper: Oper.SortAttr;
|
|
91
|
+
} | {
|
|
92
|
+
entity: number;
|
|
93
|
+
} | {
|
|
94
|
+
entityId: number;
|
|
95
|
+
} | {
|
|
96
|
+
modi: Modi.SortAttr;
|
|
97
|
+
} | {
|
|
98
|
+
user: User.SortAttr;
|
|
99
|
+
} | {
|
|
100
|
+
[k: string]: any;
|
|
101
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
102
|
+
export declare type SortNode = {
|
|
103
|
+
$attr: SortAttr;
|
|
104
|
+
$direction?: "asc" | "desc";
|
|
105
|
+
};
|
|
106
|
+
export declare type Sorter = SortNode[];
|
|
107
|
+
export declare type SelectOperation<P extends Object = Projection> = Omit<OakOperation<"select", P, Filter, Sorter>, "id">;
|
|
108
|
+
export declare type Selection<P extends Object = Projection> = Omit<SelectOperation<P>, "action">;
|
|
109
|
+
export declare type Exportation = OakOperation<"export", ExportProjection, Filter, Sorter>;
|
|
110
|
+
export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
111
|
+
operId?: never;
|
|
112
|
+
oper: Oper.CreateSingleOperation;
|
|
113
|
+
} | {
|
|
114
|
+
operId: String<64>;
|
|
115
|
+
})) & ({
|
|
116
|
+
entity?: never;
|
|
117
|
+
entityId?: never;
|
|
118
|
+
modi: Modi.CreateSingleOperation;
|
|
119
|
+
} | {
|
|
120
|
+
entity: "modi";
|
|
121
|
+
entityId: String<64>;
|
|
122
|
+
modi: Modi.UpdateOperation;
|
|
123
|
+
} | {
|
|
124
|
+
entity: "modi";
|
|
125
|
+
entityId: String<64>;
|
|
126
|
+
} | {
|
|
127
|
+
entity?: never;
|
|
128
|
+
entityId?: never;
|
|
129
|
+
user: User.CreateSingleOperation;
|
|
130
|
+
} | {
|
|
131
|
+
entity: "user";
|
|
132
|
+
entityId: String<64>;
|
|
133
|
+
user: User.UpdateOperation;
|
|
134
|
+
} | {
|
|
135
|
+
entity: "user";
|
|
136
|
+
entityId: String<64>;
|
|
137
|
+
} | {
|
|
138
|
+
entity?: string;
|
|
139
|
+
entityId?: string;
|
|
140
|
+
[K: string]: any;
|
|
141
|
+
});
|
|
142
|
+
export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
143
|
+
export declare type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
144
|
+
export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
145
|
+
export declare type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId" | "operId">> & (({
|
|
146
|
+
oper: Oper.CreateSingleOperation;
|
|
147
|
+
operId?: never;
|
|
148
|
+
} | {
|
|
149
|
+
oper?: never;
|
|
150
|
+
operId?: String<64> | null;
|
|
151
|
+
})) & ({
|
|
152
|
+
modi?: Modi.CreateSingleOperation | Modi.UpdateOperation | Modi.RemoveOperation;
|
|
153
|
+
entityId?: never;
|
|
154
|
+
entity?: never;
|
|
155
|
+
} | {
|
|
156
|
+
user?: User.CreateSingleOperation | User.UpdateOperation | User.RemoveOperation;
|
|
157
|
+
entityId?: never;
|
|
158
|
+
entity?: never;
|
|
159
|
+
} | {
|
|
160
|
+
entity?: ("modi" | "user" | string) | null;
|
|
161
|
+
entityId?: String<64> | null;
|
|
162
|
+
}) & {
|
|
163
|
+
[k: string]: any;
|
|
164
|
+
};
|
|
165
|
+
export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
166
|
+
export declare type RemoveOperationData = {} & ({
|
|
167
|
+
modi?: Modi.UpdateOperation | Modi.RemoveOperation;
|
|
168
|
+
} | {
|
|
169
|
+
user?: User.UpdateOperation | User.RemoveOperation;
|
|
170
|
+
} | {
|
|
171
|
+
[k: string]: any;
|
|
172
|
+
});
|
|
173
|
+
export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
174
|
+
export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation | SelectOperation;
|
|
175
|
+
export declare type OperIdSubQuery = Selection<OperIdProjection>;
|
|
176
|
+
export declare type ModiIdSubQuery = Selection<ModiIdProjection>;
|
|
177
|
+
export declare type UserIdSubQuery = Selection<UserIdProjection>;
|
|
178
|
+
export declare type OperEntityIdSubQuery = Selection<OperEntityIdProjection>;
|
|
179
|
+
export declare type NativeAttr = OpAttr | `oper.${Oper.NativeAttr}` | `entity.${Modi.NativeAttr}` | `entity.${User.NativeAttr}`;
|
|
180
|
+
export declare type FullAttr = NativeAttr;
|
|
181
|
+
export declare type EntityDef = {
|
|
182
|
+
Schema: Schema;
|
|
183
|
+
OpSchema: OpSchema;
|
|
184
|
+
Action: OakMakeAction<AppendOnlyAction> | string;
|
|
185
|
+
Selection: Selection;
|
|
186
|
+
Operation: Operation;
|
|
187
|
+
Create: CreateOperation;
|
|
188
|
+
Update: UpdateOperation;
|
|
189
|
+
Remove: RemoveOperation;
|
|
190
|
+
CreateSingle: CreateSingleOperation;
|
|
191
|
+
CreateMulti: CreateMultipleOperation;
|
|
192
|
+
};
|
|
193
|
+
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,26 +1,26 @@
|
|
|
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
|
-
},
|
|
17
|
-
entityId: {
|
|
18
|
-
type: "varchar",
|
|
19
|
-
params: {
|
|
20
|
-
length: 64
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
actionType: "appendOnly",
|
|
25
|
-
actions: action_1.appendOnlyActions
|
|
26
|
-
};
|
|
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
|
+
},
|
|
17
|
+
entityId: {
|
|
18
|
+
type: "varchar",
|
|
19
|
+
params: {
|
|
20
|
+
length: 64
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
actionType: "appendOnly",
|
|
25
|
+
actions: action_1.appendOnlyActions
|
|
26
|
+
};
|
|
@@ -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,15 +1,15 @@
|
|
|
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
|
-
exports.storageSchema = {
|
|
10
|
-
modi: Storage_1.desc,
|
|
11
|
-
modiEntity: Storage_2.desc,
|
|
12
|
-
oper: Storage_3.desc,
|
|
13
|
-
operEntity: Storage_4.desc,
|
|
14
|
-
user: Storage_5.desc
|
|
15
|
-
};
|
|
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
|
+
exports.storageSchema = {
|
|
10
|
+
modi: Storage_1.desc,
|
|
11
|
+
modiEntity: Storage_2.desc,
|
|
12
|
+
oper: Storage_3.desc,
|
|
13
|
+
operEntity: Storage_4.desc,
|
|
14
|
+
user: Storage_5.desc
|
|
15
|
+
};
|