@ahoo-wang/fetcher-wow 4.0.0 → 5.0.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/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.es.js +557 -556
- package/dist/index.es.js.map +1 -1
- package/dist/query/aggregation.d.ts +5 -5
- package/dist/query/aggregation.d.ts.map +1 -1
- package/dist/query/filter.d.ts +16 -14
- package/dist/query/filter.d.ts.map +1 -1
- package/dist/query/locale/{en_US.cjs.js → en_US.cjs} +1 -1
- package/dist/query/locale/en_US.cjs.map +1 -0
- package/dist/query/locale/{zh_CN.cjs.js → zh_CN.cjs} +1 -1
- package/dist/query/locale/zh_CN.cjs.map +1 -0
- package/dist/query/queryClients.d.ts +1 -1
- package/dist/query/queryClients.d.ts.map +1 -1
- package/package.json +12 -12
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/query/locale/en_US.cjs.js.map +0 -1
- package/dist/query/locale/zh_CN.cjs.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ContentTypeValues as e, combineURLs as t } from "@ahoo-wang/fetcher";
|
|
2
2
|
import { JsonEventStreamResultExtractor as n } from "@ahoo-wang/fetcher-eventstream";
|
|
3
|
-
import { api as r, attribute as i, autoGeneratedError as a, body as o, endpoint as s, get as c, path as l, post as u, request as
|
|
3
|
+
import { api as r, attribute as i, autoGeneratedError as a, body as o, endpoint as s, get as c, path as l, post as u, request as d } from "@ahoo-wang/fetcher-decorator";
|
|
4
4
|
//#region \0@oxc-project+runtime@0.144.0/helpers/esm/decorateMetadata.js
|
|
5
|
-
function
|
|
5
|
+
function f(e, t) {
|
|
6
6
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region \0@oxc-project+runtime@0.144.0/helpers/esm/decorateParam.js
|
|
10
|
-
function
|
|
10
|
+
function p(e, t) {
|
|
11
11
|
return function(n, r) {
|
|
12
12
|
t(n, r, e);
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region \0@oxc-project+runtime@0.144.0/helpers/esm/decorate.js
|
|
17
|
-
function
|
|
17
|
+
function m(e, t, n, r) {
|
|
18
18
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
19
19
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
20
20
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
@@ -22,7 +22,7 @@ function p(e, t, n, r) {
|
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/command/commandClient.ts
|
|
25
|
-
var
|
|
25
|
+
var h = class {
|
|
26
26
|
constructor(e) {
|
|
27
27
|
this.apiMetadata = e;
|
|
28
28
|
}
|
|
@@ -33,27 +33,27 @@ var m = class {
|
|
|
33
33
|
throw a(e, t);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
m([
|
|
37
37
|
s(),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
],
|
|
38
|
+
p(0, d()),
|
|
39
|
+
p(1, i()),
|
|
40
|
+
f("design:type", Function),
|
|
41
|
+
f("design:paramtypes", [Object, typeof Record > "u" ? Object : Record]),
|
|
42
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
43
|
+
], h.prototype, "send", null), m([
|
|
44
44
|
s(void 0, void 0, {
|
|
45
45
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
46
46
|
resultExtractor: n
|
|
47
47
|
}),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
],
|
|
48
|
+
p(0, d()),
|
|
49
|
+
p(1, i()),
|
|
50
|
+
f("design:type", Function),
|
|
51
|
+
f("design:paramtypes", [Object, typeof Record > "u" ? Object : Record]),
|
|
52
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
53
|
+
], h.prototype, "sendAndWaitStream", null), h = m([r(), f("design:paramtypes", [Object])], h);
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/command/commandHeaders.ts
|
|
56
|
-
var
|
|
56
|
+
var ee = class e {
|
|
57
57
|
static {
|
|
58
58
|
this.COMMAND_HEADERS_PREFIX = "Command-";
|
|
59
59
|
}
|
|
@@ -123,15 +123,15 @@ var te = class e {
|
|
|
123
123
|
static {
|
|
124
124
|
this.COMMAND_HEADER_X_PREFIX = `${e.COMMAND_HEADERS_PREFIX}Header-`;
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, te = /* @__PURE__ */ function(e) {
|
|
127
127
|
return e.SENT = "SENT", e.PROCESSED = "PROCESSED", e.SNAPSHOT = "SNAPSHOT", e.PROJECTED = "PROJECTED", e.EVENT_HANDLED = "EVENT_HANDLED", e.SAGA_HANDLED = "SAGA_HANDLED", e;
|
|
128
|
-
}({}),
|
|
128
|
+
}({}), g = /* @__PURE__ */ function(e) {
|
|
129
129
|
return e.AND = "AND", e.OR = "OR", e.NOR = "NOR", e.ID = "ID", e.IDS = "IDS", e.AGGREGATE_ID = "AGGREGATE_ID", e.AGGREGATE_IDS = "AGGREGATE_IDS", e.TENANT_ID = "TENANT_ID", e.OWNER_ID = "OWNER_ID", e.SPACE_ID = "SPACE_ID", e.DELETED = "DELETED", e.ALL = "ALL", e.EQ = "EQ", e.NE = "NE", e.GT = "GT", e.LT = "LT", e.GTE = "GTE", e.LTE = "LTE", e.CONTAINS = "CONTAINS", e.IN = "IN", e.NOT_IN = "NOT_IN", e.BETWEEN = "BETWEEN", e.ALL_IN = "ALL_IN", e.STARTS_WITH = "STARTS_WITH", e.ENDS_WITH = "ENDS_WITH", e.ELEM_MATCH = "ELEM_MATCH", e.NULL = "NULL", e.NOT_NULL = "NOT_NULL", e.TRUE = "TRUE", e.FALSE = "FALSE", e.EXISTS = "EXISTS", e.TODAY = "TODAY", e.BEFORE_TODAY = "BEFORE_TODAY", e.TOMORROW = "TOMORROW", e.THIS_WEEK = "THIS_WEEK", e.NEXT_WEEK = "NEXT_WEEK", e.LAST_WEEK = "LAST_WEEK", e.THIS_MONTH = "THIS_MONTH", e.LAST_MONTH = "LAST_MONTH", e.RECENT_DAYS = "RECENT_DAYS", e.EARLIER_DAYS = "EARLIER_DAYS", e.MATCH = "MATCH", e.RAW = "RAW", e;
|
|
130
|
-
}({}),
|
|
130
|
+
}({}), ne = /* @__PURE__ */ new Set([
|
|
131
131
|
"AND",
|
|
132
132
|
"OR",
|
|
133
133
|
"NOR"
|
|
134
|
-
]),
|
|
134
|
+
]), re = /* @__PURE__ */ new Set([
|
|
135
135
|
"NULL",
|
|
136
136
|
"NOT_NULL",
|
|
137
137
|
"TRUE",
|
|
@@ -147,10 +147,10 @@ var te = class e {
|
|
|
147
147
|
]);
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/query/condition.ts
|
|
150
|
-
function
|
|
150
|
+
function _(e) {
|
|
151
151
|
return !!e;
|
|
152
152
|
}
|
|
153
|
-
var
|
|
153
|
+
var ie = class {
|
|
154
154
|
static {
|
|
155
155
|
this.IGNORE_CASE_OPTION_KEY = "ignoreCase";
|
|
156
156
|
}
|
|
@@ -161,337 +161,337 @@ var ae = class {
|
|
|
161
161
|
this.DATE_PATTERN_OPTION_KEY = "datePattern";
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
-
function
|
|
164
|
+
function v(e) {
|
|
165
165
|
if (e !== void 0) return { ignoreCase: e };
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function y(e, t) {
|
|
168
168
|
if (e === void 0 && t === void 0) return;
|
|
169
169
|
let n = {};
|
|
170
170
|
return e !== void 0 && (n.datePattern = e), t !== void 0 && (n.zoneId = t), n;
|
|
171
171
|
}
|
|
172
|
-
var
|
|
172
|
+
var b = /* @__PURE__ */ function(e) {
|
|
173
173
|
return e.ACTIVE = "ACTIVE", e.DELETED = "DELETED", e.ALL = "ALL", e;
|
|
174
174
|
}({});
|
|
175
|
-
function
|
|
176
|
-
if (e.length === 0) return
|
|
177
|
-
if (e.length === 1) return
|
|
175
|
+
function ae(...e) {
|
|
176
|
+
if (e.length === 0) return C();
|
|
177
|
+
if (e.length === 1) return _(e[0]) ? e[0] : C();
|
|
178
178
|
let t = [];
|
|
179
179
|
return e.forEach((e) => {
|
|
180
|
-
e?.operator ===
|
|
181
|
-
}), t.length === 0 ?
|
|
182
|
-
operator:
|
|
180
|
+
e?.operator === g.ALL || !_(e) || (e.operator === g.AND && e.children ? t.push(...e.children) : t.push(e));
|
|
181
|
+
}), t.length === 0 ? C() : {
|
|
182
|
+
operator: g.AND,
|
|
183
183
|
children: t
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
let t = e?.filter((e) =>
|
|
188
|
-
return t.length === 0 ?
|
|
189
|
-
operator:
|
|
186
|
+
function oe(...e) {
|
|
187
|
+
let t = e?.filter((e) => _(e));
|
|
188
|
+
return t.length === 0 ? C() : {
|
|
189
|
+
operator: g.OR,
|
|
190
190
|
children: t
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
return e.length === 0 ?
|
|
195
|
-
operator:
|
|
193
|
+
function se(...e) {
|
|
194
|
+
return e.length === 0 ? C() : {
|
|
195
|
+
operator: g.NOR,
|
|
196
196
|
children: e
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function ce(e) {
|
|
200
200
|
return {
|
|
201
|
-
operator:
|
|
201
|
+
operator: g.ID,
|
|
202
202
|
value: e
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function le(e) {
|
|
206
206
|
return {
|
|
207
|
-
operator:
|
|
207
|
+
operator: g.IDS,
|
|
208
208
|
value: e
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function x(e) {
|
|
212
212
|
return {
|
|
213
|
-
operator:
|
|
213
|
+
operator: g.AGGREGATE_ID,
|
|
214
214
|
value: e
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function ue(e) {
|
|
218
218
|
return {
|
|
219
|
-
operator:
|
|
219
|
+
operator: g.AGGREGATE_IDS,
|
|
220
220
|
value: e
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function de(e) {
|
|
224
224
|
return {
|
|
225
|
-
operator:
|
|
225
|
+
operator: g.TENANT_ID,
|
|
226
226
|
value: e
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function fe(e) {
|
|
230
230
|
return {
|
|
231
|
-
operator:
|
|
231
|
+
operator: g.OWNER_ID,
|
|
232
232
|
value: e
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function pe(e) {
|
|
236
236
|
return {
|
|
237
|
-
operator:
|
|
237
|
+
operator: g.SPACE_ID,
|
|
238
238
|
value: e
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function S(e) {
|
|
242
242
|
return {
|
|
243
|
-
operator:
|
|
243
|
+
operator: g.DELETED,
|
|
244
244
|
value: e
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
return
|
|
247
|
+
function me() {
|
|
248
|
+
return S("ACTIVE");
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
return { operator:
|
|
250
|
+
function C() {
|
|
251
|
+
return { operator: g.ALL };
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function he(e, t) {
|
|
254
254
|
return {
|
|
255
255
|
field: e,
|
|
256
|
-
operator:
|
|
256
|
+
operator: g.EQ,
|
|
257
257
|
value: t
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function ge(e, t) {
|
|
261
261
|
return {
|
|
262
262
|
field: e,
|
|
263
|
-
operator:
|
|
263
|
+
operator: g.NE,
|
|
264
264
|
value: t
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function _e(e, t) {
|
|
268
268
|
return {
|
|
269
269
|
field: e,
|
|
270
|
-
operator:
|
|
270
|
+
operator: g.GT,
|
|
271
271
|
value: t
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ve(e, t) {
|
|
275
275
|
return {
|
|
276
276
|
field: e,
|
|
277
|
-
operator:
|
|
277
|
+
operator: g.LT,
|
|
278
278
|
value: t
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function ye(e, t) {
|
|
282
282
|
return {
|
|
283
283
|
field: e,
|
|
284
|
-
operator:
|
|
284
|
+
operator: g.GTE,
|
|
285
285
|
value: t
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function be(e, t) {
|
|
289
289
|
return {
|
|
290
290
|
field: e,
|
|
291
|
-
operator:
|
|
291
|
+
operator: g.LTE,
|
|
292
292
|
value: t
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
let r =
|
|
295
|
+
function xe(e, t, n) {
|
|
296
|
+
let r = v(n);
|
|
297
297
|
return {
|
|
298
298
|
field: e,
|
|
299
|
-
operator:
|
|
299
|
+
operator: g.CONTAINS,
|
|
300
300
|
value: t,
|
|
301
301
|
options: r
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function Se(e, ...t) {
|
|
305
305
|
return {
|
|
306
306
|
field: e,
|
|
307
|
-
operator:
|
|
307
|
+
operator: g.IN,
|
|
308
308
|
value: t
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Ce(e, ...t) {
|
|
312
312
|
return {
|
|
313
313
|
field: e,
|
|
314
|
-
operator:
|
|
314
|
+
operator: g.NOT_IN,
|
|
315
315
|
value: t
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function we(e, t, n) {
|
|
319
319
|
return {
|
|
320
320
|
field: e,
|
|
321
|
-
operator:
|
|
321
|
+
operator: g.BETWEEN,
|
|
322
322
|
value: [t, n]
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Te(e, ...t) {
|
|
326
326
|
return {
|
|
327
327
|
field: e,
|
|
328
|
-
operator:
|
|
328
|
+
operator: g.ALL_IN,
|
|
329
329
|
value: t
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
let r =
|
|
332
|
+
function Ee(e, t, n) {
|
|
333
|
+
let r = v(n);
|
|
334
334
|
return {
|
|
335
335
|
field: e,
|
|
336
|
-
operator:
|
|
336
|
+
operator: g.STARTS_WITH,
|
|
337
337
|
value: t,
|
|
338
338
|
options: r
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function De(e, t) {
|
|
342
342
|
return {
|
|
343
343
|
field: e,
|
|
344
|
-
operator:
|
|
344
|
+
operator: g.MATCH,
|
|
345
345
|
value: t
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
let r =
|
|
348
|
+
function Oe(e, t, n) {
|
|
349
|
+
let r = v(n);
|
|
350
350
|
return {
|
|
351
351
|
field: e,
|
|
352
|
-
operator:
|
|
352
|
+
operator: g.ENDS_WITH,
|
|
353
353
|
value: t,
|
|
354
354
|
options: r
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function ke(e, t) {
|
|
358
358
|
return {
|
|
359
359
|
field: e,
|
|
360
|
-
operator:
|
|
360
|
+
operator: g.ELEM_MATCH,
|
|
361
361
|
children: [t]
|
|
362
362
|
};
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Ae(e) {
|
|
365
365
|
return {
|
|
366
366
|
field: e,
|
|
367
|
-
operator:
|
|
367
|
+
operator: g.NULL
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function je(e) {
|
|
371
371
|
return {
|
|
372
372
|
field: e,
|
|
373
|
-
operator:
|
|
373
|
+
operator: g.NOT_NULL
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function Me(e) {
|
|
377
377
|
return {
|
|
378
378
|
field: e,
|
|
379
|
-
operator:
|
|
379
|
+
operator: g.TRUE
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Ne(e) {
|
|
383
383
|
return {
|
|
384
384
|
field: e,
|
|
385
|
-
operator:
|
|
385
|
+
operator: g.FALSE
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Pe(e, t = !0) {
|
|
389
389
|
return {
|
|
390
390
|
field: e,
|
|
391
|
-
operator:
|
|
391
|
+
operator: g.EXISTS,
|
|
392
392
|
value: t
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
let r =
|
|
395
|
+
function Fe(e, t, n) {
|
|
396
|
+
let r = y(t, n);
|
|
397
397
|
return {
|
|
398
398
|
field: e,
|
|
399
|
-
operator:
|
|
399
|
+
operator: g.TODAY,
|
|
400
400
|
options: r
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
let i =
|
|
403
|
+
function Ie(e, t, n, r) {
|
|
404
|
+
let i = y(n, r);
|
|
405
405
|
return {
|
|
406
406
|
field: e,
|
|
407
|
-
operator:
|
|
407
|
+
operator: g.BEFORE_TODAY,
|
|
408
408
|
value: t,
|
|
409
409
|
options: i
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
let r =
|
|
412
|
+
function Le(e, t, n) {
|
|
413
|
+
let r = y(t, n);
|
|
414
414
|
return {
|
|
415
415
|
field: e,
|
|
416
|
-
operator:
|
|
416
|
+
operator: g.TOMORROW,
|
|
417
417
|
options: r
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
let r =
|
|
420
|
+
function Re(e, t, n) {
|
|
421
|
+
let r = y(t, n);
|
|
422
422
|
return {
|
|
423
423
|
field: e,
|
|
424
|
-
operator:
|
|
424
|
+
operator: g.THIS_WEEK,
|
|
425
425
|
options: r
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
429
|
-
let r =
|
|
428
|
+
function ze(e, t, n) {
|
|
429
|
+
let r = y(t, n);
|
|
430
430
|
return {
|
|
431
431
|
field: e,
|
|
432
|
-
operator:
|
|
432
|
+
operator: g.NEXT_WEEK,
|
|
433
433
|
options: r
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
let r =
|
|
436
|
+
function Be(e, t, n) {
|
|
437
|
+
let r = y(t, n);
|
|
438
438
|
return {
|
|
439
439
|
field: e,
|
|
440
|
-
operator:
|
|
440
|
+
operator: g.LAST_WEEK,
|
|
441
441
|
options: r
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
let r =
|
|
444
|
+
function Ve(e, t, n) {
|
|
445
|
+
let r = y(t, n);
|
|
446
446
|
return {
|
|
447
447
|
field: e,
|
|
448
|
-
operator:
|
|
448
|
+
operator: g.THIS_MONTH,
|
|
449
449
|
options: r
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
let r =
|
|
452
|
+
function He(e, t, n) {
|
|
453
|
+
let r = y(t, n);
|
|
454
454
|
return {
|
|
455
455
|
field: e,
|
|
456
|
-
operator:
|
|
456
|
+
operator: g.LAST_MONTH,
|
|
457
457
|
options: r
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
let i =
|
|
460
|
+
function Ue(e, t, n, r) {
|
|
461
|
+
let i = y(n, r);
|
|
462
462
|
return {
|
|
463
463
|
field: e,
|
|
464
|
-
operator:
|
|
464
|
+
operator: g.RECENT_DAYS,
|
|
465
465
|
value: t,
|
|
466
466
|
options: i
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
function
|
|
470
|
-
let i =
|
|
469
|
+
function We(e, t, n, r) {
|
|
470
|
+
let i = y(n, r);
|
|
471
471
|
return {
|
|
472
472
|
field: e,
|
|
473
|
-
operator:
|
|
473
|
+
operator: g.EARLIER_DAYS,
|
|
474
474
|
value: t,
|
|
475
475
|
options: i
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Ge(e) {
|
|
479
479
|
return {
|
|
480
|
-
operator:
|
|
480
|
+
operator: g.RAW,
|
|
481
481
|
value: e
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
//#endregion
|
|
485
485
|
//#region src/query/filter.ts
|
|
486
|
-
var
|
|
486
|
+
var Ke = /* @__PURE__ */ function(e) {
|
|
487
487
|
return e.MATCH_ALL = "MATCH_ALL", e.MATCH_NONE = "MATCH_NONE", e.ID = "ID", e.IDS = "IDS", e.AGGREGATE_ID = "AGGREGATE_ID", e.AGGREGATE_IDS = "AGGREGATE_IDS", e.TENANT_ID = "TENANT_ID", e.OWNER_ID = "OWNER_ID", e.SPACE_ID = "SPACE_ID", e.AND = "AND", e.OR = "OR", e.NOR = "NOR", e.EQ = "EQ", e.NE = "NE", e.GT = "GT", e.GTE = "GTE", e.LT = "LT", e.LTE = "LTE", e.CONTAINS = "CONTAINS", e.STARTS_WITH = "STARTS_WITH", e.ENDS_WITH = "ENDS_WITH", e.IN = "IN", e.NOT_IN = "NOT_IN", e.BETWEEN = "BETWEEN", e.CONTAINS_ALL = "CONTAINS_ALL", e.IS_EMPTY = "IS_EMPTY", e.IS_EMPTY_STRING = "IS_EMPTY_STRING", e.IS_NOT_EMPTY_STRING = "IS_NOT_EMPTY_STRING", e.IS_NULL = "IS_NULL", e.IS_NOT_NULL = "IS_NOT_NULL", e.EXISTS = "EXISTS", e.NOT_EXISTS = "NOT_EXISTS", e.DELETION = "DELETION", e.ELEMENT_MATCH = "ELEMENT_MATCH", e.SEARCH = "SEARCH", e.TODAY = "TODAY", e.BEFORE_TODAY = "BEFORE_TODAY", e.TOMORROW = "TOMORROW", e.THIS_WEEK = "THIS_WEEK", e.NEXT_WEEK = "NEXT_WEEK", e.LAST_WEEK = "LAST_WEEK", e.THIS_MONTH = "THIS_MONTH", e.LAST_MONTH = "LAST_MONTH", e.YESTERDAY = "YESTERDAY", e.NEXT_MONTH = "NEXT_MONTH", e.LAST_YEAR = "LAST_YEAR", e.THIS_YEAR = "THIS_YEAR", e.NEXT_YEAR = "NEXT_YEAR", e.RECENT_DAYS = "RECENT_DAYS", e.EARLIER_DAYS = "EARLIER_DAYS", e;
|
|
488
|
-
}({}),
|
|
488
|
+
}({}), qe = /* @__PURE__ */ function(e) {
|
|
489
489
|
return e.CASE_SENSITIVE = "CASE_SENSITIVE", e.CASE_INSENSITIVE = "CASE_INSENSITIVE", e;
|
|
490
|
-
}({}),
|
|
490
|
+
}({}), w = /* @__PURE__ */ function(e) {
|
|
491
491
|
return e.TERMS = "TERMS", e.PHRASE = "PHRASE", e;
|
|
492
|
-
}({}),
|
|
492
|
+
}({}), T = /* @__PURE__ */ function(e) {
|
|
493
493
|
return e.NANOSECONDS = "NANOSECONDS", e.MICROSECONDS = "MICROSECONDS", e.MILLISECONDS = "MILLISECONDS", e.SECONDS = "SECONDS", e.MINUTES = "MINUTES", e.HOURS = "HOURS", e.DAYS = "DAYS", e;
|
|
494
|
-
}({}),
|
|
494
|
+
}({}), Je = /^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?$/, Ye = /^@?[A-Za-z_][A-Za-z0-9_-]*(\.(?:@?[A-Za-z_][A-Za-z0-9_-]*|[0-9]+))*$/, Xe = /^(?:UTC|GMT|UT)?[+-](\d{1,2}|\d{4}|\d{6}|\d{2}:\d{2}|\d{2}:\d{2}:\d{2})$/, Ze = /^(?:UTC|GMT|UT)?[+-]/, Qe = {
|
|
495
495
|
G: 5,
|
|
496
496
|
u: 19,
|
|
497
497
|
y: 19,
|
|
@@ -538,30 +538,27 @@ var Je = /* @__PURE__ */ function(e) {
|
|
|
538
538
|
Y: Infinity,
|
|
539
539
|
g: 19
|
|
540
540
|
};
|
|
541
|
-
function
|
|
542
|
-
if (typeof e != "string" || !
|
|
541
|
+
function E(e) {
|
|
542
|
+
if (typeof e != "string" || !Ye.test(e)) throw TypeError(`Query field is invalid: [${String(e)}].`);
|
|
543
543
|
return e;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function D(e, t) {
|
|
546
546
|
if (!(e === null ? t : typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e))) throw TypeError("Filter value must be a JSON scalar.");
|
|
547
547
|
return e;
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
return Array.isArray(e) ? (e.forEach((e) => T(e, !0)), e) : T(e, !0);
|
|
551
|
-
}
|
|
552
|
-
function D(e, t) {
|
|
549
|
+
function O(e, t) {
|
|
553
550
|
if (typeof t != "string") throw TypeError(`${e} must be a string.`);
|
|
554
551
|
return t;
|
|
555
552
|
}
|
|
556
|
-
function
|
|
553
|
+
function k(e) {
|
|
557
554
|
if (e !== "CASE_SENSITIVE" && e !== "CASE_INSENSITIVE") throw TypeError(`String comparison is invalid: [${String(e)}].`);
|
|
558
555
|
}
|
|
559
|
-
function
|
|
556
|
+
function A(e, t) {
|
|
560
557
|
if (t.length === 0) throw TypeError(`${e} cannot be empty.`);
|
|
561
558
|
if (t.some((e) => e == null)) throw TypeError(`${e} cannot contain null.`);
|
|
562
559
|
}
|
|
563
|
-
function
|
|
564
|
-
let t =
|
|
560
|
+
function $e(e) {
|
|
561
|
+
let t = Xe.exec(e);
|
|
565
562
|
if (!t) return !1;
|
|
566
563
|
let n = t[1], [r, i = 0, a = 0] = (n.includes(":") ? n.split(":") : n.length <= 2 ? [n] : [
|
|
567
564
|
n.slice(0, 2),
|
|
@@ -570,26 +567,26 @@ function tt(e) {
|
|
|
570
567
|
]).map(Number);
|
|
571
568
|
return i <= 59 && a <= 59 && (r < 18 || r === 18 && i === 0 && a === 0);
|
|
572
569
|
}
|
|
573
|
-
function
|
|
570
|
+
function j({ zoneId: e, datePattern: t, timeUnit: n = "MILLISECONDS" }) {
|
|
574
571
|
if (e !== void 0) {
|
|
575
572
|
if (typeof e != "string" || !e.trim()) throw TypeError("zoneId cannot be blank.");
|
|
576
|
-
if (
|
|
573
|
+
if (Ze.test(e) && !$e(e)) throw TypeError(`zoneId is invalid: [${e}].`);
|
|
577
574
|
}
|
|
578
|
-
if (t !== void 0 &&
|
|
575
|
+
if (t !== void 0 && tt(t), !Object.values(T).includes(n)) throw TypeError(`timeUnit is invalid: [${String(n)}].`);
|
|
579
576
|
return {
|
|
580
577
|
...e === void 0 ? {} : { zoneId: e },
|
|
581
578
|
...t === void 0 ? {} : { datePattern: t },
|
|
582
579
|
timeUnit: n
|
|
583
580
|
};
|
|
584
581
|
}
|
|
585
|
-
function
|
|
586
|
-
let r =
|
|
582
|
+
function et(e, t, n) {
|
|
583
|
+
let r = Qe[t];
|
|
587
584
|
if (!(typeof r == "number" ? n <= r : r?.includes(n) === !0)) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
588
585
|
}
|
|
589
|
-
function
|
|
586
|
+
function M(e, t) {
|
|
590
587
|
return e !== void 0 && ("uyDFdhHkKmsSgAnNWwY".includes(e) || e === "c" && t === 1 || "eMLQq".includes(e) && t <= 2);
|
|
591
588
|
}
|
|
592
|
-
function
|
|
589
|
+
function tt(e) {
|
|
593
590
|
if (typeof e != "string" || !e.trim()) throw TypeError("datePattern cannot be blank.");
|
|
594
591
|
let t = !1, n = 0;
|
|
595
592
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -609,10 +606,10 @@ function rt(e) {
|
|
|
609
606
|
for (; e[n] === t;) n++;
|
|
610
607
|
a = n - r;
|
|
611
608
|
}
|
|
612
|
-
if (
|
|
609
|
+
if (et(e, t, a), o && M(t, a)) {
|
|
613
610
|
let t = e[n], r = n;
|
|
614
611
|
for (; r < e.length && e[r] === t;) r++;
|
|
615
|
-
if (
|
|
612
|
+
if (M(t, r - n)) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
616
613
|
}
|
|
617
614
|
r = n - 1;
|
|
618
615
|
} else if (i === "[") n++;
|
|
@@ -624,10 +621,10 @@ function rt(e) {
|
|
|
624
621
|
}
|
|
625
622
|
if (t) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
626
623
|
}
|
|
627
|
-
function
|
|
624
|
+
function N(e, t) {
|
|
628
625
|
if (!Number.isInteger(t) || t < 1 || t > 2147483647) throw TypeError(`${e} days must be a positive JVM Int.`);
|
|
629
626
|
}
|
|
630
|
-
function
|
|
627
|
+
function P(e) {
|
|
631
628
|
switch (e.op) {
|
|
632
629
|
case "ID":
|
|
633
630
|
case "IDS":
|
|
@@ -641,30 +638,30 @@ function N(e) {
|
|
|
641
638
|
case "AND":
|
|
642
639
|
case "OR":
|
|
643
640
|
case "NOR":
|
|
644
|
-
|
|
641
|
+
A(`${e.op} operands`, e.operands), e.operands.forEach(P);
|
|
645
642
|
break;
|
|
646
|
-
case "ELEMENT_MATCH":
|
|
643
|
+
case "ELEMENT_MATCH": P(e.predicate);
|
|
647
644
|
}
|
|
648
645
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
646
|
+
function nt(e) {
|
|
647
|
+
return A("AND operands", e), {
|
|
651
648
|
op: "AND",
|
|
652
649
|
operands: [...e]
|
|
653
650
|
};
|
|
654
651
|
}
|
|
655
|
-
function
|
|
656
|
-
return
|
|
652
|
+
function rt(e) {
|
|
653
|
+
return A("OR operands", e), {
|
|
657
654
|
op: "OR",
|
|
658
655
|
operands: [...e]
|
|
659
656
|
};
|
|
660
657
|
}
|
|
661
|
-
function
|
|
662
|
-
return
|
|
658
|
+
function it(e) {
|
|
659
|
+
return A("NOR operands", e), {
|
|
663
660
|
op: "NOR",
|
|
664
661
|
operands: [...e]
|
|
665
662
|
};
|
|
666
663
|
}
|
|
667
|
-
var
|
|
664
|
+
var F = {
|
|
668
665
|
matchAll() {
|
|
669
666
|
return { op: "MATCH_ALL" };
|
|
670
667
|
},
|
|
@@ -674,11 +671,11 @@ var P = {
|
|
|
674
671
|
id(e) {
|
|
675
672
|
return {
|
|
676
673
|
op: "ID",
|
|
677
|
-
value:
|
|
674
|
+
value: O("ID value", e)
|
|
678
675
|
};
|
|
679
676
|
},
|
|
680
677
|
ids(e) {
|
|
681
|
-
return
|
|
678
|
+
return A("IDS values", e), e.forEach((e) => O("IDS value", e)), {
|
|
682
679
|
op: "IDS",
|
|
683
680
|
values: [...e]
|
|
684
681
|
};
|
|
@@ -686,11 +683,11 @@ var P = {
|
|
|
686
683
|
aggregateId(e) {
|
|
687
684
|
return {
|
|
688
685
|
op: "AGGREGATE_ID",
|
|
689
|
-
value:
|
|
686
|
+
value: O("AGGREGATE_ID value", e)
|
|
690
687
|
};
|
|
691
688
|
},
|
|
692
689
|
aggregateIds(e) {
|
|
693
|
-
return
|
|
690
|
+
return A("AGGREGATE_IDS values", e), e.forEach((e) => O("AGGREGATE_IDS value", e)), {
|
|
694
691
|
op: "AGGREGATE_IDS",
|
|
695
692
|
values: [...e]
|
|
696
693
|
};
|
|
@@ -698,172 +695,172 @@ var P = {
|
|
|
698
695
|
tenantId(e) {
|
|
699
696
|
return {
|
|
700
697
|
op: "TENANT_ID",
|
|
701
|
-
value:
|
|
698
|
+
value: O("TENANT_ID value", e)
|
|
702
699
|
};
|
|
703
700
|
},
|
|
704
701
|
ownerId(e) {
|
|
705
702
|
return {
|
|
706
703
|
op: "OWNER_ID",
|
|
707
|
-
value:
|
|
704
|
+
value: O("OWNER_ID value", e)
|
|
708
705
|
};
|
|
709
706
|
},
|
|
710
707
|
spaceId(e) {
|
|
711
708
|
return {
|
|
712
709
|
op: "SPACE_ID",
|
|
713
|
-
value:
|
|
710
|
+
value: O("SPACE_ID value", e)
|
|
714
711
|
};
|
|
715
712
|
},
|
|
716
|
-
and:
|
|
717
|
-
or:
|
|
718
|
-
nor:
|
|
713
|
+
and: nt,
|
|
714
|
+
or: rt,
|
|
715
|
+
nor: it,
|
|
719
716
|
eq(e, t) {
|
|
720
717
|
return {
|
|
721
718
|
op: "EQ",
|
|
722
|
-
field:
|
|
723
|
-
value:
|
|
719
|
+
field: E(e),
|
|
720
|
+
value: D(t, !0)
|
|
724
721
|
};
|
|
725
722
|
},
|
|
726
723
|
ne(e, t) {
|
|
727
724
|
return {
|
|
728
725
|
op: "NE",
|
|
729
|
-
field:
|
|
730
|
-
value:
|
|
726
|
+
field: E(e),
|
|
727
|
+
value: D(t, !0)
|
|
731
728
|
};
|
|
732
729
|
},
|
|
733
730
|
gt(e, t) {
|
|
734
731
|
return {
|
|
735
732
|
op: "GT",
|
|
736
|
-
field:
|
|
737
|
-
value:
|
|
733
|
+
field: E(e),
|
|
734
|
+
value: D(t, !1)
|
|
738
735
|
};
|
|
739
736
|
},
|
|
740
737
|
gte(e, t) {
|
|
741
738
|
return {
|
|
742
739
|
op: "GTE",
|
|
743
|
-
field:
|
|
744
|
-
value:
|
|
740
|
+
field: E(e),
|
|
741
|
+
value: D(t, !1)
|
|
745
742
|
};
|
|
746
743
|
},
|
|
747
744
|
lt(e, t) {
|
|
748
745
|
return {
|
|
749
746
|
op: "LT",
|
|
750
|
-
field:
|
|
751
|
-
value:
|
|
747
|
+
field: E(e),
|
|
748
|
+
value: D(t, !1)
|
|
752
749
|
};
|
|
753
750
|
},
|
|
754
751
|
lte(e, t) {
|
|
755
752
|
return {
|
|
756
753
|
op: "LTE",
|
|
757
|
-
field:
|
|
758
|
-
value:
|
|
754
|
+
field: E(e),
|
|
755
|
+
value: D(t, !1)
|
|
759
756
|
};
|
|
760
757
|
},
|
|
761
758
|
contains(e, t, n = "CASE_SENSITIVE") {
|
|
762
|
-
return
|
|
759
|
+
return k(n), {
|
|
763
760
|
op: "CONTAINS",
|
|
764
|
-
field:
|
|
765
|
-
value:
|
|
761
|
+
field: E(e),
|
|
762
|
+
value: O("CONTAINS value", t),
|
|
766
763
|
stringComparison: n
|
|
767
764
|
};
|
|
768
765
|
},
|
|
769
766
|
startsWith(e, t, n = "CASE_SENSITIVE") {
|
|
770
|
-
return
|
|
767
|
+
return k(n), {
|
|
771
768
|
op: "STARTS_WITH",
|
|
772
|
-
field:
|
|
773
|
-
value:
|
|
769
|
+
field: E(e),
|
|
770
|
+
value: O("STARTS_WITH value", t),
|
|
774
771
|
stringComparison: n
|
|
775
772
|
};
|
|
776
773
|
},
|
|
777
774
|
endsWith(e, t, n = "CASE_SENSITIVE") {
|
|
778
|
-
return
|
|
775
|
+
return k(n), {
|
|
779
776
|
op: "ENDS_WITH",
|
|
780
|
-
field:
|
|
781
|
-
value:
|
|
777
|
+
field: E(e),
|
|
778
|
+
value: O("ENDS_WITH value", t),
|
|
782
779
|
stringComparison: n
|
|
783
780
|
};
|
|
784
781
|
},
|
|
785
782
|
isIn(e, t) {
|
|
786
|
-
return
|
|
783
|
+
return A("IN values", t), t.forEach((e) => D(e, !1)), {
|
|
787
784
|
op: "IN",
|
|
788
|
-
field:
|
|
785
|
+
field: E(e),
|
|
789
786
|
values: [...t]
|
|
790
787
|
};
|
|
791
788
|
},
|
|
792
789
|
notIn(e, t) {
|
|
793
|
-
return
|
|
790
|
+
return A("NOT_IN values", t), t.forEach((e) => D(e, !1)), {
|
|
794
791
|
op: "NOT_IN",
|
|
795
|
-
field:
|
|
792
|
+
field: E(e),
|
|
796
793
|
values: [...t]
|
|
797
794
|
};
|
|
798
795
|
},
|
|
799
796
|
containsAll(e, t) {
|
|
800
|
-
return
|
|
797
|
+
return A("CONTAINS_ALL values", t), t.forEach((e) => D(e, !1)), {
|
|
801
798
|
op: "CONTAINS_ALL",
|
|
802
|
-
field:
|
|
799
|
+
field: E(e),
|
|
803
800
|
values: [...t]
|
|
804
801
|
};
|
|
805
802
|
},
|
|
806
803
|
between(e, t, n) {
|
|
807
804
|
return {
|
|
808
805
|
op: "BETWEEN",
|
|
809
|
-
field:
|
|
810
|
-
lowerBound:
|
|
811
|
-
upperBound:
|
|
806
|
+
field: E(e),
|
|
807
|
+
lowerBound: D(t, !1),
|
|
808
|
+
upperBound: D(n, !1)
|
|
812
809
|
};
|
|
813
810
|
},
|
|
814
811
|
isEmpty(e) {
|
|
815
812
|
return {
|
|
816
813
|
op: "IS_EMPTY",
|
|
817
|
-
field:
|
|
814
|
+
field: E(e)
|
|
818
815
|
};
|
|
819
816
|
},
|
|
820
817
|
isEmptyString(e) {
|
|
821
818
|
return {
|
|
822
819
|
op: "IS_EMPTY_STRING",
|
|
823
|
-
field:
|
|
820
|
+
field: E(e)
|
|
824
821
|
};
|
|
825
822
|
},
|
|
826
823
|
isNotEmptyString(e) {
|
|
827
824
|
return {
|
|
828
825
|
op: "IS_NOT_EMPTY_STRING",
|
|
829
|
-
field:
|
|
826
|
+
field: E(e)
|
|
830
827
|
};
|
|
831
828
|
},
|
|
832
829
|
isNull(e) {
|
|
833
830
|
return {
|
|
834
831
|
op: "IS_NULL",
|
|
835
|
-
field:
|
|
832
|
+
field: E(e)
|
|
836
833
|
};
|
|
837
834
|
},
|
|
838
835
|
isNotNull(e) {
|
|
839
836
|
return {
|
|
840
837
|
op: "IS_NOT_NULL",
|
|
841
|
-
field:
|
|
838
|
+
field: E(e)
|
|
842
839
|
};
|
|
843
840
|
},
|
|
844
841
|
exists(e) {
|
|
845
842
|
return {
|
|
846
843
|
op: "EXISTS",
|
|
847
|
-
field:
|
|
844
|
+
field: E(e)
|
|
848
845
|
};
|
|
849
846
|
},
|
|
850
847
|
notExists(e) {
|
|
851
848
|
return {
|
|
852
849
|
op: "NOT_EXISTS",
|
|
853
|
-
field:
|
|
850
|
+
field: E(e)
|
|
854
851
|
};
|
|
855
852
|
},
|
|
856
853
|
deletion(e) {
|
|
857
|
-
if (e !==
|
|
854
|
+
if (e !== b.ACTIVE && e !== b.DELETED && e !== b.ALL) throw TypeError(`Deletion state is invalid: [${String(e)}].`);
|
|
858
855
|
return {
|
|
859
856
|
op: "DELETION",
|
|
860
857
|
state: e
|
|
861
858
|
};
|
|
862
859
|
},
|
|
863
860
|
elementMatch(e, t) {
|
|
864
|
-
return
|
|
861
|
+
return P(t), {
|
|
865
862
|
op: "ELEMENT_MATCH",
|
|
866
|
-
field:
|
|
863
|
+
field: E(e),
|
|
867
864
|
predicate: t
|
|
868
865
|
};
|
|
869
866
|
},
|
|
@@ -871,145 +868,145 @@ var P = {
|
|
|
871
868
|
if (typeof e != "string" || !e.trim()) throw TypeError("SEARCH query cannot be blank.");
|
|
872
869
|
if (t !== void 0 && (typeof t != "object" || !t || Array.isArray(t))) throw TypeError("SEARCH options must be a non-null object.");
|
|
873
870
|
let { fields: n = [], mode: r = "TERMS" } = t ?? {};
|
|
874
|
-
if (!Object.values(
|
|
871
|
+
if (!Object.values(w).includes(r)) throw TypeError(`SEARCH mode is invalid: [${String(r)}].`);
|
|
875
872
|
return {
|
|
876
873
|
op: "SEARCH",
|
|
877
874
|
query: e,
|
|
878
875
|
mode: r,
|
|
879
|
-
fields: n.map(
|
|
876
|
+
fields: n.map(E)
|
|
880
877
|
};
|
|
881
878
|
},
|
|
882
879
|
today(e, t = {}) {
|
|
883
880
|
return {
|
|
884
|
-
...
|
|
881
|
+
...j(t),
|
|
885
882
|
op: "TODAY",
|
|
886
|
-
field:
|
|
883
|
+
field: E(e)
|
|
887
884
|
};
|
|
888
885
|
},
|
|
889
886
|
beforeToday(e, t, n = {}) {
|
|
890
|
-
if (typeof t != "string" || !
|
|
887
|
+
if (typeof t != "string" || !Je.test(t)) throw TypeError("BEFORE_TODAY time is invalid.");
|
|
891
888
|
return {
|
|
892
|
-
...
|
|
889
|
+
...j(n),
|
|
893
890
|
op: "BEFORE_TODAY",
|
|
894
|
-
field:
|
|
891
|
+
field: E(e),
|
|
895
892
|
time: t
|
|
896
893
|
};
|
|
897
894
|
},
|
|
898
895
|
tomorrow(e, t = {}) {
|
|
899
896
|
return {
|
|
900
|
-
...
|
|
897
|
+
...j(t),
|
|
901
898
|
op: "TOMORROW",
|
|
902
|
-
field:
|
|
899
|
+
field: E(e)
|
|
903
900
|
};
|
|
904
901
|
},
|
|
905
902
|
thisWeek(e, t = {}) {
|
|
906
903
|
return {
|
|
907
|
-
...
|
|
904
|
+
...j(t),
|
|
908
905
|
op: "THIS_WEEK",
|
|
909
|
-
field:
|
|
906
|
+
field: E(e)
|
|
910
907
|
};
|
|
911
908
|
},
|
|
912
909
|
nextWeek(e, t = {}) {
|
|
913
910
|
return {
|
|
914
|
-
...
|
|
911
|
+
...j(t),
|
|
915
912
|
op: "NEXT_WEEK",
|
|
916
|
-
field:
|
|
913
|
+
field: E(e)
|
|
917
914
|
};
|
|
918
915
|
},
|
|
919
916
|
lastWeek(e, t = {}) {
|
|
920
917
|
return {
|
|
921
|
-
...
|
|
918
|
+
...j(t),
|
|
922
919
|
op: "LAST_WEEK",
|
|
923
|
-
field:
|
|
920
|
+
field: E(e)
|
|
924
921
|
};
|
|
925
922
|
},
|
|
926
923
|
thisMonth(e, t = {}) {
|
|
927
924
|
return {
|
|
928
|
-
...
|
|
925
|
+
...j(t),
|
|
929
926
|
op: "THIS_MONTH",
|
|
930
|
-
field:
|
|
927
|
+
field: E(e)
|
|
931
928
|
};
|
|
932
929
|
},
|
|
933
930
|
lastMonth(e, t = {}) {
|
|
934
931
|
return {
|
|
935
|
-
...
|
|
932
|
+
...j(t),
|
|
936
933
|
op: "LAST_MONTH",
|
|
937
|
-
field:
|
|
934
|
+
field: E(e)
|
|
938
935
|
};
|
|
939
936
|
},
|
|
940
937
|
yesterday(e, t = {}) {
|
|
941
938
|
return {
|
|
942
|
-
...
|
|
939
|
+
...j(t),
|
|
943
940
|
op: "YESTERDAY",
|
|
944
|
-
field:
|
|
941
|
+
field: E(e)
|
|
945
942
|
};
|
|
946
943
|
},
|
|
947
944
|
nextMonth(e, t = {}) {
|
|
948
945
|
return {
|
|
949
|
-
...
|
|
946
|
+
...j(t),
|
|
950
947
|
op: "NEXT_MONTH",
|
|
951
|
-
field:
|
|
948
|
+
field: E(e)
|
|
952
949
|
};
|
|
953
950
|
},
|
|
954
951
|
lastYear(e, t = {}) {
|
|
955
952
|
return {
|
|
956
|
-
...
|
|
953
|
+
...j(t),
|
|
957
954
|
op: "LAST_YEAR",
|
|
958
|
-
field:
|
|
955
|
+
field: E(e)
|
|
959
956
|
};
|
|
960
957
|
},
|
|
961
958
|
thisYear(e, t = {}) {
|
|
962
959
|
return {
|
|
963
|
-
...
|
|
960
|
+
...j(t),
|
|
964
961
|
op: "THIS_YEAR",
|
|
965
|
-
field:
|
|
962
|
+
field: E(e)
|
|
966
963
|
};
|
|
967
964
|
},
|
|
968
965
|
nextYear(e, t = {}) {
|
|
969
966
|
return {
|
|
970
|
-
...
|
|
967
|
+
...j(t),
|
|
971
968
|
op: "NEXT_YEAR",
|
|
972
|
-
field:
|
|
969
|
+
field: E(e)
|
|
973
970
|
};
|
|
974
971
|
},
|
|
975
972
|
recentDays(e, t, n = {}) {
|
|
976
|
-
return
|
|
977
|
-
...
|
|
973
|
+
return N("RECENT_DAYS", t), {
|
|
974
|
+
...j(n),
|
|
978
975
|
op: "RECENT_DAYS",
|
|
979
|
-
field:
|
|
976
|
+
field: E(e),
|
|
980
977
|
days: t
|
|
981
978
|
};
|
|
982
979
|
},
|
|
983
980
|
earlierDays(e, t, n = {}) {
|
|
984
|
-
return
|
|
985
|
-
...
|
|
981
|
+
return N("EARLIER_DAYS", t), {
|
|
982
|
+
...j(n),
|
|
986
983
|
op: "EARLIER_DAYS",
|
|
987
|
-
field:
|
|
984
|
+
field: E(e),
|
|
988
985
|
days: t
|
|
989
986
|
};
|
|
990
987
|
}
|
|
991
|
-
},
|
|
988
|
+
}, at = /* @__PURE__ */ function(e) {
|
|
992
989
|
return e.TERMS = "TERMS", e.HISTOGRAM = "HISTOGRAM", e.DATE_HISTOGRAM = "DATE_HISTOGRAM", e;
|
|
993
|
-
}({}),
|
|
990
|
+
}({}), ot = /* @__PURE__ */ function(e) {
|
|
994
991
|
return e.COUNT = "COUNT", e.NUMERIC = "NUMERIC", e.ANY = "ANY", e;
|
|
995
|
-
}({}),
|
|
992
|
+
}({}), st = /* @__PURE__ */ function(e) {
|
|
996
993
|
return e.FIELD = "FIELD", e.CONSTANT = "CONSTANT", e.BINARY = "BINARY", e;
|
|
997
|
-
}({}),
|
|
994
|
+
}({}), ct = /* @__PURE__ */ function(e) {
|
|
998
995
|
return e.ADD = "ADD", e.SUBTRACT = "SUBTRACT", e.MULTIPLY = "MULTIPLY", e.DIVIDE = "DIVIDE", e;
|
|
999
|
-
}({}),
|
|
996
|
+
}({}), I = /* @__PURE__ */ function(e) {
|
|
1000
997
|
return e.YEAR = "YEAR", e.QUARTER = "QUARTER", e.MONTH = "MONTH", e.WEEK = "WEEK", e.DAY = "DAY", e.HOUR = "HOUR", e.MINUTE = "MINUTE", e.SECOND = "SECOND", e;
|
|
1001
|
-
}({}),
|
|
998
|
+
}({}), lt = /* @__PURE__ */ function(e) {
|
|
1002
999
|
return e.SUM = "SUM", e.AVG = "AVG", e.MIN = "MIN", e.MAX = "MAX", e;
|
|
1003
1000
|
}({});
|
|
1004
|
-
function I(e) {
|
|
1005
|
-
return P.exists(e).field;
|
|
1006
|
-
}
|
|
1007
1001
|
function L(e) {
|
|
1008
|
-
|
|
1002
|
+
return F.exists(e).field;
|
|
1003
|
+
}
|
|
1004
|
+
function R(e) {
|
|
1005
|
+
if (L(e), e.includes(".")) throw TypeError("aggregation alias must contain one segment.");
|
|
1009
1006
|
if (e.startsWith("__wow")) throw TypeError("aggregation alias must not use the reserved __wow prefix.");
|
|
1010
1007
|
return e;
|
|
1011
1008
|
}
|
|
1012
|
-
function
|
|
1009
|
+
function z(e, t, n) {
|
|
1013
1010
|
return {
|
|
1014
1011
|
type: "BINARY",
|
|
1015
1012
|
operator: e,
|
|
@@ -1017,18 +1014,18 @@ function R(e, t, n) {
|
|
|
1017
1014
|
right: n
|
|
1018
1015
|
};
|
|
1019
1016
|
}
|
|
1020
|
-
function
|
|
1017
|
+
function B(e, t, n) {
|
|
1021
1018
|
return {
|
|
1022
1019
|
type: "NUMERIC",
|
|
1023
1020
|
function: e,
|
|
1024
1021
|
expression: t,
|
|
1025
|
-
alias:
|
|
1022
|
+
alias: R(n)
|
|
1026
1023
|
};
|
|
1027
1024
|
}
|
|
1028
|
-
var
|
|
1025
|
+
var ut = {
|
|
1029
1026
|
element(e, t) {
|
|
1030
|
-
let n =
|
|
1031
|
-
return t === void 0 ? { path: n } : (
|
|
1027
|
+
let n = L(e);
|
|
1028
|
+
return t === void 0 ? { path: n } : (F.elementMatch(e, t), {
|
|
1032
1029
|
path: n,
|
|
1033
1030
|
filter: t
|
|
1034
1031
|
});
|
|
@@ -1036,7 +1033,7 @@ var ft = {
|
|
|
1036
1033
|
field(e) {
|
|
1037
1034
|
return {
|
|
1038
1035
|
type: "FIELD",
|
|
1039
|
-
field:
|
|
1036
|
+
field: L(e)
|
|
1040
1037
|
};
|
|
1041
1038
|
},
|
|
1042
1039
|
constant(e) {
|
|
@@ -1046,59 +1043,59 @@ var ft = {
|
|
|
1046
1043
|
value: e
|
|
1047
1044
|
};
|
|
1048
1045
|
},
|
|
1049
|
-
add: (e, t) =>
|
|
1050
|
-
subtract: (e, t) =>
|
|
1051
|
-
multiply: (e, t) =>
|
|
1052
|
-
divide: (e, t) =>
|
|
1046
|
+
add: (e, t) => z("ADD", e, t),
|
|
1047
|
+
subtract: (e, t) => z("SUBTRACT", e, t),
|
|
1048
|
+
multiply: (e, t) => z("MULTIPLY", e, t),
|
|
1049
|
+
divide: (e, t) => z("DIVIDE", e, t),
|
|
1053
1050
|
terms(e, t) {
|
|
1054
1051
|
return {
|
|
1055
1052
|
type: "TERMS",
|
|
1056
|
-
field:
|
|
1057
|
-
alias:
|
|
1053
|
+
field: L(e),
|
|
1054
|
+
alias: R(t)
|
|
1058
1055
|
};
|
|
1059
1056
|
},
|
|
1060
1057
|
histogram(e, { interval: t, alias: n }) {
|
|
1061
1058
|
if (!Number.isFinite(t) || t <= 0) throw TypeError("histogram interval must be finite and greater than 0.");
|
|
1062
1059
|
return {
|
|
1063
1060
|
type: "HISTOGRAM",
|
|
1064
|
-
field:
|
|
1061
|
+
field: L(e),
|
|
1065
1062
|
interval: t,
|
|
1066
|
-
alias:
|
|
1063
|
+
alias: R(n)
|
|
1067
1064
|
};
|
|
1068
1065
|
},
|
|
1069
1066
|
dateHistogram(e, { unit: t, alias: n, timeZone: r = "UTC" }) {
|
|
1070
|
-
if (!Object.values(
|
|
1067
|
+
if (!Object.values(I).includes(t)) throw TypeError("date histogram unit is invalid.");
|
|
1071
1068
|
if (typeof r != "string" || !r.trim()) throw TypeError("date histogram timeZone cannot be blank.");
|
|
1072
1069
|
return {
|
|
1073
1070
|
type: "DATE_HISTOGRAM",
|
|
1074
|
-
field:
|
|
1071
|
+
field: L(e),
|
|
1075
1072
|
unit: t,
|
|
1076
|
-
alias:
|
|
1073
|
+
alias: R(n),
|
|
1077
1074
|
timeZone: r
|
|
1078
1075
|
};
|
|
1079
1076
|
},
|
|
1080
1077
|
any(e, t) {
|
|
1081
1078
|
return {
|
|
1082
1079
|
type: "ANY",
|
|
1083
|
-
field:
|
|
1084
|
-
alias:
|
|
1080
|
+
field: L(e),
|
|
1081
|
+
alias: R(t)
|
|
1085
1082
|
};
|
|
1086
1083
|
},
|
|
1087
1084
|
count(e) {
|
|
1088
1085
|
return {
|
|
1089
1086
|
type: "COUNT",
|
|
1090
|
-
alias:
|
|
1087
|
+
alias: R(e)
|
|
1091
1088
|
};
|
|
1092
1089
|
},
|
|
1093
|
-
sum: (e, t) =>
|
|
1094
|
-
avg: (e, t) =>
|
|
1095
|
-
min: (e, t) =>
|
|
1096
|
-
max: (e, t) =>
|
|
1097
|
-
},
|
|
1090
|
+
sum: (e, t) => B("SUM", e, t),
|
|
1091
|
+
avg: (e, t) => B("AVG", e, t),
|
|
1092
|
+
min: (e, t) => B("MIN", e, t),
|
|
1093
|
+
max: (e, t) => B("MAX", e, t)
|
|
1094
|
+
}, V = {
|
|
1098
1095
|
index: 1,
|
|
1099
1096
|
size: 10
|
|
1100
1097
|
};
|
|
1101
|
-
function
|
|
1098
|
+
function dt({ index: e = V.index, size: t = V.size } = V) {
|
|
1102
1099
|
return {
|
|
1103
1100
|
index: e,
|
|
1104
1101
|
size: t
|
|
@@ -1106,11 +1103,11 @@ function pt({ index: e = B.index, size: t = B.size } = B) {
|
|
|
1106
1103
|
}
|
|
1107
1104
|
//#endregion
|
|
1108
1105
|
//#region src/query/projection.ts
|
|
1109
|
-
var
|
|
1110
|
-
function
|
|
1111
|
-
return
|
|
1106
|
+
var ft = {};
|
|
1107
|
+
function pt() {
|
|
1108
|
+
return ft;
|
|
1112
1109
|
}
|
|
1113
|
-
function
|
|
1110
|
+
function mt({ include: e, exclude: t } = pt()) {
|
|
1114
1111
|
return {
|
|
1115
1112
|
include: e,
|
|
1116
1113
|
exclude: t
|
|
@@ -1118,15 +1115,15 @@ function gt({ include: e, exclude: t } = ht()) {
|
|
|
1118
1115
|
}
|
|
1119
1116
|
//#endregion
|
|
1120
1117
|
//#region src/query/queryable.ts
|
|
1121
|
-
function
|
|
1118
|
+
function H({ condition: e, filter: t }) {
|
|
1122
1119
|
if (t === null) throw TypeError("filter cannot be null.");
|
|
1123
1120
|
if (t !== void 0) return { filter: t };
|
|
1124
1121
|
if (e === null) throw TypeError("condition cannot be null.");
|
|
1125
|
-
return { condition: e === void 0 ?
|
|
1122
|
+
return { condition: e === void 0 ? C() : e };
|
|
1126
1123
|
}
|
|
1127
|
-
function
|
|
1124
|
+
function U({ condition: e, filter: t, projection: n, sort: r } = {}) {
|
|
1128
1125
|
return {
|
|
1129
|
-
...
|
|
1126
|
+
...H({
|
|
1130
1127
|
condition: e,
|
|
1131
1128
|
filter: t
|
|
1132
1129
|
}),
|
|
@@ -1134,20 +1131,20 @@ function H({ condition: e, filter: t, projection: n, sort: r } = {}) {
|
|
|
1134
1131
|
sort: r
|
|
1135
1132
|
};
|
|
1136
1133
|
}
|
|
1137
|
-
function
|
|
1134
|
+
function W({ condition: e, filter: t, projection: n, sort: r, limit: i } = {}) {
|
|
1138
1135
|
return {
|
|
1139
|
-
...
|
|
1136
|
+
...H({
|
|
1140
1137
|
condition: e,
|
|
1141
1138
|
filter: t
|
|
1142
1139
|
}),
|
|
1143
1140
|
projection: n,
|
|
1144
1141
|
sort: r,
|
|
1145
|
-
limit: i ?? (t === void 0 ?
|
|
1142
|
+
limit: i ?? (t === void 0 ? V.size : 0)
|
|
1146
1143
|
};
|
|
1147
1144
|
}
|
|
1148
|
-
function
|
|
1145
|
+
function ht({ condition: e, filter: t, projection: n, sort: r, pagination: i = V } = {}) {
|
|
1149
1146
|
return {
|
|
1150
|
-
...
|
|
1147
|
+
...H({
|
|
1151
1148
|
condition: e,
|
|
1152
1149
|
filter: t
|
|
1153
1150
|
}),
|
|
@@ -1156,11 +1153,11 @@ function _t({ condition: e, filter: t, projection: n, sort: r, pagination: i = B
|
|
|
1156
1153
|
pagination: i
|
|
1157
1154
|
};
|
|
1158
1155
|
}
|
|
1159
|
-
var
|
|
1156
|
+
var gt = {
|
|
1160
1157
|
total: 0,
|
|
1161
1158
|
list: []
|
|
1162
1159
|
};
|
|
1163
|
-
function
|
|
1160
|
+
function _t({ total: e, list: t = [] } = gt) {
|
|
1164
1161
|
return e === void 0 && (e = t.length), {
|
|
1165
1162
|
total: e,
|
|
1166
1163
|
list: t
|
|
@@ -1168,16 +1165,16 @@ function yt({ total: e, list: t = [] } = vt) {
|
|
|
1168
1165
|
}
|
|
1169
1166
|
//#endregion
|
|
1170
1167
|
//#region src/query/sort.ts
|
|
1171
|
-
var
|
|
1168
|
+
var vt = /* @__PURE__ */ function(e) {
|
|
1172
1169
|
return e.ASC = "ASC", e.DESC = "DESC", e;
|
|
1173
1170
|
}({});
|
|
1174
|
-
function
|
|
1171
|
+
function yt(e) {
|
|
1175
1172
|
return {
|
|
1176
1173
|
field: e,
|
|
1177
1174
|
direction: "ASC"
|
|
1178
1175
|
};
|
|
1179
1176
|
}
|
|
1180
|
-
function
|
|
1177
|
+
function bt(e) {
|
|
1181
1178
|
return {
|
|
1182
1179
|
field: e,
|
|
1183
1180
|
direction: "DESC"
|
|
@@ -1185,7 +1182,7 @@ function St(e) {
|
|
|
1185
1182
|
}
|
|
1186
1183
|
//#endregion
|
|
1187
1184
|
//#region src/query/event/domainEventStream.ts
|
|
1188
|
-
var
|
|
1185
|
+
var xt = class e {
|
|
1189
1186
|
static {
|
|
1190
1187
|
this.HEADER = "header";
|
|
1191
1188
|
}
|
|
@@ -1234,7 +1231,7 @@ var Ct = class e {
|
|
|
1234
1231
|
static {
|
|
1235
1232
|
this.CREATE_TIME = "createTime";
|
|
1236
1233
|
}
|
|
1237
|
-
},
|
|
1234
|
+
}, G = class e {
|
|
1238
1235
|
static {
|
|
1239
1236
|
this.EVENT_STREAM_RESOURCE_NAME = "event";
|
|
1240
1237
|
}
|
|
@@ -1253,7 +1250,7 @@ var Ct = class e {
|
|
|
1253
1250
|
static {
|
|
1254
1251
|
this.CURSOR = `${e.EVENT_STREAM_RESOURCE_NAME}/cursor`;
|
|
1255
1252
|
}
|
|
1256
|
-
},
|
|
1253
|
+
}, K = class {
|
|
1257
1254
|
constructor(e) {
|
|
1258
1255
|
this.apiMetadata = e;
|
|
1259
1256
|
}
|
|
@@ -1279,93 +1276,93 @@ var Ct = class e {
|
|
|
1279
1276
|
throw a(e, t, n);
|
|
1280
1277
|
}
|
|
1281
1278
|
};
|
|
1282
|
-
|
|
1283
|
-
u(
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1279
|
+
m([
|
|
1280
|
+
u(G.AGGREGATION),
|
|
1281
|
+
p(0, o()),
|
|
1282
|
+
p(1, i()),
|
|
1283
|
+
f("design:type", Function),
|
|
1284
|
+
f("design:paramtypes", [
|
|
1288
1285
|
Object,
|
|
1289
1286
|
typeof Record > "u" ? Object : Record,
|
|
1290
1287
|
typeof AbortController > "u" ? Object : AbortController
|
|
1291
1288
|
]),
|
|
1292
|
-
|
|
1293
|
-
],
|
|
1294
|
-
u(
|
|
1289
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1290
|
+
], K.prototype, "aggregate", null), m([
|
|
1291
|
+
u(G.AGGREGATION, {
|
|
1295
1292
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
1296
1293
|
resultExtractor: n
|
|
1297
1294
|
}),
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1295
|
+
p(0, o()),
|
|
1296
|
+
p(1, i()),
|
|
1297
|
+
f("design:type", Function),
|
|
1298
|
+
f("design:paramtypes", [
|
|
1302
1299
|
Object,
|
|
1303
1300
|
typeof Record > "u" ? Object : Record,
|
|
1304
1301
|
typeof AbortController > "u" ? Object : AbortController
|
|
1305
1302
|
]),
|
|
1306
|
-
|
|
1307
|
-
],
|
|
1308
|
-
u(
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1303
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1304
|
+
], K.prototype, "aggregateStream", null), m([
|
|
1305
|
+
u(G.CURSOR),
|
|
1306
|
+
p(0, o()),
|
|
1307
|
+
p(1, i()),
|
|
1308
|
+
f("design:type", Function),
|
|
1309
|
+
f("design:paramtypes", [
|
|
1313
1310
|
Object,
|
|
1314
1311
|
typeof Record > "u" ? Object : Record,
|
|
1315
1312
|
typeof AbortController > "u" ? Object : AbortController
|
|
1316
1313
|
]),
|
|
1317
|
-
|
|
1318
|
-
],
|
|
1319
|
-
u(
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1314
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1315
|
+
], K.prototype, "cursor", null), m([
|
|
1316
|
+
u(G.COUNT),
|
|
1317
|
+
p(0, o()),
|
|
1318
|
+
p(1, i()),
|
|
1319
|
+
f("design:type", Function),
|
|
1320
|
+
f("design:paramtypes", [
|
|
1324
1321
|
Object,
|
|
1325
1322
|
typeof Record > "u" ? Object : Record,
|
|
1326
1323
|
typeof AbortController > "u" ? Object : AbortController
|
|
1327
1324
|
]),
|
|
1328
|
-
|
|
1329
|
-
],
|
|
1330
|
-
u(
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1325
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1326
|
+
], K.prototype, "count", null), m([
|
|
1327
|
+
u(G.LIST),
|
|
1328
|
+
p(0, o()),
|
|
1329
|
+
p(1, i()),
|
|
1330
|
+
f("design:type", Function),
|
|
1331
|
+
f("design:paramtypes", [
|
|
1335
1332
|
Object,
|
|
1336
1333
|
typeof Record > "u" ? Object : Record,
|
|
1337
1334
|
typeof AbortController > "u" ? Object : AbortController
|
|
1338
1335
|
]),
|
|
1339
|
-
|
|
1340
|
-
],
|
|
1341
|
-
u(
|
|
1336
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1337
|
+
], K.prototype, "list", null), m([
|
|
1338
|
+
u(G.LIST, {
|
|
1342
1339
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
1343
1340
|
resultExtractor: n
|
|
1344
1341
|
}),
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1342
|
+
p(0, o()),
|
|
1343
|
+
p(1, i()),
|
|
1344
|
+
f("design:type", Function),
|
|
1345
|
+
f("design:paramtypes", [
|
|
1349
1346
|
Object,
|
|
1350
1347
|
typeof Record > "u" ? Object : Record,
|
|
1351
1348
|
typeof AbortController > "u" ? Object : AbortController
|
|
1352
1349
|
]),
|
|
1353
|
-
|
|
1354
|
-
],
|
|
1355
|
-
u(
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1350
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1351
|
+
], K.prototype, "listStream", null), m([
|
|
1352
|
+
u(G.PAGED),
|
|
1353
|
+
p(0, o()),
|
|
1354
|
+
p(1, i()),
|
|
1355
|
+
f("design:type", Function),
|
|
1356
|
+
f("design:paramtypes", [
|
|
1360
1357
|
Object,
|
|
1361
1358
|
typeof Record > "u" ? Object : Record,
|
|
1362
1359
|
typeof AbortController > "u" ? Object : AbortController
|
|
1363
1360
|
]),
|
|
1364
|
-
|
|
1365
|
-
],
|
|
1361
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1362
|
+
], K.prototype, "paged", null), K = m([r(), f("design:paramtypes", [Object])], K);
|
|
1366
1363
|
//#endregion
|
|
1367
1364
|
//#region src/query/snapshot/snapshot.ts
|
|
1368
|
-
var
|
|
1365
|
+
var St = class {
|
|
1369
1366
|
static {
|
|
1370
1367
|
this.VERSION = "version";
|
|
1371
1368
|
}
|
|
@@ -1405,7 +1402,7 @@ var wt = class {
|
|
|
1405
1402
|
static {
|
|
1406
1403
|
this.STATE = "state";
|
|
1407
1404
|
}
|
|
1408
|
-
},
|
|
1405
|
+
}, q = class e {
|
|
1409
1406
|
static {
|
|
1410
1407
|
this.SNAPSHOT_RESOURCE_NAME = "snapshot";
|
|
1411
1408
|
}
|
|
@@ -1439,7 +1436,7 @@ var wt = class {
|
|
|
1439
1436
|
static {
|
|
1440
1437
|
this.SINGLE_STATE = `${e.SINGLE}/state`;
|
|
1441
1438
|
}
|
|
1442
|
-
},
|
|
1439
|
+
}, J = class {
|
|
1443
1440
|
constructor(e) {
|
|
1444
1441
|
this.apiMetadata = e;
|
|
1445
1442
|
}
|
|
@@ -1483,222 +1480,222 @@ var wt = class {
|
|
|
1483
1480
|
throw a(e, t, n);
|
|
1484
1481
|
}
|
|
1485
1482
|
getById(e, t, n) {
|
|
1486
|
-
let r =
|
|
1483
|
+
let r = U({ condition: x(e) });
|
|
1487
1484
|
return this.single(r, t, n);
|
|
1488
1485
|
}
|
|
1489
1486
|
getStateById(e, t, n) {
|
|
1490
|
-
let r =
|
|
1487
|
+
let r = U({ condition: x(e) });
|
|
1491
1488
|
return this.singleState(r, t, n);
|
|
1492
1489
|
}
|
|
1493
1490
|
getByIds(e, t, n) {
|
|
1494
1491
|
if (e.length === 0) return Promise.resolve([]);
|
|
1495
|
-
let r =
|
|
1496
|
-
filter:
|
|
1492
|
+
let r = W({
|
|
1493
|
+
filter: F.aggregateIds(e),
|
|
1497
1494
|
limit: e.length
|
|
1498
1495
|
});
|
|
1499
1496
|
return this.list(r, t, n);
|
|
1500
1497
|
}
|
|
1501
1498
|
getStateByIds(e, t, n) {
|
|
1502
1499
|
if (e.length === 0) return Promise.resolve([]);
|
|
1503
|
-
let r =
|
|
1504
|
-
filter:
|
|
1500
|
+
let r = W({
|
|
1501
|
+
filter: F.aggregateIds(e),
|
|
1505
1502
|
limit: e.length
|
|
1506
1503
|
});
|
|
1507
1504
|
return this.listState(r, t, n);
|
|
1508
1505
|
}
|
|
1509
1506
|
};
|
|
1510
|
-
|
|
1511
|
-
u(
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1507
|
+
m([
|
|
1508
|
+
u(q.AGGREGATION),
|
|
1509
|
+
p(0, o()),
|
|
1510
|
+
p(1, i()),
|
|
1511
|
+
f("design:type", Function),
|
|
1512
|
+
f("design:paramtypes", [
|
|
1516
1513
|
Object,
|
|
1517
1514
|
typeof Record > "u" ? Object : Record,
|
|
1518
1515
|
typeof AbortController > "u" ? Object : AbortController
|
|
1519
1516
|
]),
|
|
1520
|
-
|
|
1521
|
-
],
|
|
1522
|
-
u(
|
|
1517
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1518
|
+
], J.prototype, "aggregate", null), m([
|
|
1519
|
+
u(q.AGGREGATION, {
|
|
1523
1520
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
1524
1521
|
resultExtractor: n
|
|
1525
1522
|
}),
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1523
|
+
p(0, o()),
|
|
1524
|
+
p(1, i()),
|
|
1525
|
+
f("design:type", Function),
|
|
1526
|
+
f("design:paramtypes", [
|
|
1530
1527
|
Object,
|
|
1531
1528
|
typeof Record > "u" ? Object : Record,
|
|
1532
1529
|
typeof AbortController > "u" ? Object : AbortController
|
|
1533
1530
|
]),
|
|
1534
|
-
|
|
1535
|
-
],
|
|
1536
|
-
u(
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1531
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1532
|
+
], J.prototype, "aggregateStream", null), m([
|
|
1533
|
+
u(q.CURSOR),
|
|
1534
|
+
p(0, o()),
|
|
1535
|
+
p(1, i()),
|
|
1536
|
+
f("design:type", Function),
|
|
1537
|
+
f("design:paramtypes", [
|
|
1541
1538
|
Object,
|
|
1542
1539
|
typeof Record > "u" ? Object : Record,
|
|
1543
1540
|
typeof AbortController > "u" ? Object : AbortController
|
|
1544
1541
|
]),
|
|
1545
|
-
|
|
1546
|
-
],
|
|
1547
|
-
u(
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1542
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1543
|
+
], J.prototype, "cursor", null), m([
|
|
1544
|
+
u(q.CURSOR_STATE),
|
|
1545
|
+
p(0, o()),
|
|
1546
|
+
p(1, i()),
|
|
1547
|
+
f("design:type", Function),
|
|
1548
|
+
f("design:paramtypes", [
|
|
1552
1549
|
Object,
|
|
1553
1550
|
typeof Record > "u" ? Object : Record,
|
|
1554
1551
|
typeof AbortController > "u" ? Object : AbortController
|
|
1555
1552
|
]),
|
|
1556
|
-
|
|
1557
|
-
],
|
|
1558
|
-
u(
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1553
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1554
|
+
], J.prototype, "cursorState", null), m([
|
|
1555
|
+
u(q.COUNT),
|
|
1556
|
+
p(0, o()),
|
|
1557
|
+
p(1, i()),
|
|
1558
|
+
f("design:type", Function),
|
|
1559
|
+
f("design:paramtypes", [
|
|
1563
1560
|
Object,
|
|
1564
1561
|
typeof Record > "u" ? Object : Record,
|
|
1565
1562
|
typeof AbortController > "u" ? Object : AbortController
|
|
1566
1563
|
]),
|
|
1567
|
-
|
|
1568
|
-
],
|
|
1569
|
-
u(
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1564
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1565
|
+
], J.prototype, "count", null), m([
|
|
1566
|
+
u(q.LIST),
|
|
1567
|
+
p(0, o()),
|
|
1568
|
+
p(1, i()),
|
|
1569
|
+
f("design:type", Function),
|
|
1570
|
+
f("design:paramtypes", [
|
|
1574
1571
|
Object,
|
|
1575
1572
|
typeof Record > "u" ? Object : Record,
|
|
1576
1573
|
typeof AbortController > "u" ? Object : AbortController
|
|
1577
1574
|
]),
|
|
1578
|
-
|
|
1579
|
-
],
|
|
1580
|
-
u(
|
|
1575
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1576
|
+
], J.prototype, "list", null), m([
|
|
1577
|
+
u(q.LIST, {
|
|
1581
1578
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
1582
1579
|
resultExtractor: n
|
|
1583
1580
|
}),
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1581
|
+
p(0, o()),
|
|
1582
|
+
p(1, i()),
|
|
1583
|
+
f("design:type", Function),
|
|
1584
|
+
f("design:paramtypes", [
|
|
1588
1585
|
Object,
|
|
1589
1586
|
typeof Record > "u" ? Object : Record,
|
|
1590
1587
|
typeof AbortController > "u" ? Object : AbortController
|
|
1591
1588
|
]),
|
|
1592
|
-
|
|
1593
|
-
],
|
|
1594
|
-
u(
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1589
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1590
|
+
], J.prototype, "listStream", null), m([
|
|
1591
|
+
u(q.LIST_STATE),
|
|
1592
|
+
p(0, o()),
|
|
1593
|
+
p(1, i()),
|
|
1594
|
+
f("design:type", Function),
|
|
1595
|
+
f("design:paramtypes", [
|
|
1599
1596
|
Object,
|
|
1600
1597
|
typeof Record > "u" ? Object : Record,
|
|
1601
1598
|
typeof AbortController > "u" ? Object : AbortController
|
|
1602
1599
|
]),
|
|
1603
|
-
|
|
1604
|
-
],
|
|
1605
|
-
u(
|
|
1600
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1601
|
+
], J.prototype, "listState", null), m([
|
|
1602
|
+
u(q.LIST_STATE, {
|
|
1606
1603
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
1607
1604
|
resultExtractor: n
|
|
1608
1605
|
}),
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1606
|
+
p(0, o()),
|
|
1607
|
+
p(1, i()),
|
|
1608
|
+
f("design:type", Function),
|
|
1609
|
+
f("design:paramtypes", [
|
|
1613
1610
|
Object,
|
|
1614
1611
|
typeof Record > "u" ? Object : Record,
|
|
1615
1612
|
typeof AbortController > "u" ? Object : AbortController
|
|
1616
1613
|
]),
|
|
1617
|
-
|
|
1618
|
-
],
|
|
1619
|
-
u(
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1614
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1615
|
+
], J.prototype, "listStateStream", null), m([
|
|
1616
|
+
u(q.PAGED),
|
|
1617
|
+
p(0, o()),
|
|
1618
|
+
p(1, i()),
|
|
1619
|
+
f("design:type", Function),
|
|
1620
|
+
f("design:paramtypes", [
|
|
1624
1621
|
Object,
|
|
1625
1622
|
typeof Record > "u" ? Object : Record,
|
|
1626
1623
|
typeof AbortController > "u" ? Object : AbortController
|
|
1627
1624
|
]),
|
|
1628
|
-
|
|
1629
|
-
],
|
|
1630
|
-
u(
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1625
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1626
|
+
], J.prototype, "paged", null), m([
|
|
1627
|
+
u(q.PAGED_STATE),
|
|
1628
|
+
p(0, o()),
|
|
1629
|
+
p(1, i()),
|
|
1630
|
+
f("design:type", Function),
|
|
1631
|
+
f("design:paramtypes", [
|
|
1635
1632
|
Object,
|
|
1636
1633
|
typeof Record > "u" ? Object : Record,
|
|
1637
1634
|
typeof AbortController > "u" ? Object : AbortController
|
|
1638
1635
|
]),
|
|
1639
|
-
|
|
1640
|
-
],
|
|
1641
|
-
u(
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1636
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1637
|
+
], J.prototype, "pagedState", null), m([
|
|
1638
|
+
u(q.SINGLE),
|
|
1639
|
+
p(0, o()),
|
|
1640
|
+
p(1, i()),
|
|
1641
|
+
f("design:type", Function),
|
|
1642
|
+
f("design:paramtypes", [
|
|
1646
1643
|
Object,
|
|
1647
1644
|
typeof Record > "u" ? Object : Record,
|
|
1648
1645
|
typeof AbortController > "u" ? Object : AbortController
|
|
1649
1646
|
]),
|
|
1650
|
-
|
|
1651
|
-
],
|
|
1652
|
-
u(
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1647
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1648
|
+
], J.prototype, "single", null), m([
|
|
1649
|
+
u(q.SINGLE_STATE),
|
|
1650
|
+
p(0, o()),
|
|
1651
|
+
p(1, i()),
|
|
1652
|
+
f("design:type", Function),
|
|
1653
|
+
f("design:paramtypes", [
|
|
1657
1654
|
Object,
|
|
1658
1655
|
typeof Record > "u" ? Object : Record,
|
|
1659
1656
|
typeof AbortController > "u" ? Object : AbortController
|
|
1660
1657
|
]),
|
|
1661
|
-
|
|
1662
|
-
],
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1658
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1659
|
+
], J.prototype, "singleState", null), m([
|
|
1660
|
+
p(1, i()),
|
|
1661
|
+
f("design:type", Function),
|
|
1662
|
+
f("design:paramtypes", [
|
|
1666
1663
|
String,
|
|
1667
1664
|
typeof Record > "u" ? Object : Record,
|
|
1668
1665
|
typeof AbortController > "u" ? Object : AbortController
|
|
1669
1666
|
]),
|
|
1670
|
-
|
|
1671
|
-
],
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1667
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1668
|
+
], J.prototype, "getById", null), m([
|
|
1669
|
+
p(1, i()),
|
|
1670
|
+
f("design:type", Function),
|
|
1671
|
+
f("design:paramtypes", [
|
|
1675
1672
|
String,
|
|
1676
1673
|
typeof Record > "u" ? Object : Record,
|
|
1677
1674
|
typeof AbortController > "u" ? Object : AbortController
|
|
1678
1675
|
]),
|
|
1679
|
-
|
|
1680
|
-
],
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1676
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1677
|
+
], J.prototype, "getStateById", null), m([
|
|
1678
|
+
p(1, i()),
|
|
1679
|
+
f("design:type", Function),
|
|
1680
|
+
f("design:paramtypes", [
|
|
1684
1681
|
Array,
|
|
1685
1682
|
typeof Record > "u" ? Object : Record,
|
|
1686
1683
|
typeof AbortController > "u" ? Object : AbortController
|
|
1687
1684
|
]),
|
|
1688
|
-
|
|
1689
|
-
],
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1685
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1686
|
+
], J.prototype, "getByIds", null), m([
|
|
1687
|
+
p(1, i()),
|
|
1688
|
+
f("design:type", Function),
|
|
1689
|
+
f("design:paramtypes", [
|
|
1693
1690
|
Array,
|
|
1694
1691
|
typeof Record > "u" ? Object : Record,
|
|
1695
1692
|
typeof AbortController > "u" ? Object : AbortController
|
|
1696
1693
|
]),
|
|
1697
|
-
|
|
1698
|
-
],
|
|
1694
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1695
|
+
], J.prototype, "getStateByIds", null), J = m([r(), f("design:paramtypes", [Object])], J);
|
|
1699
1696
|
//#endregion
|
|
1700
1697
|
//#region src/query/state/loadStateAggregateClient.ts
|
|
1701
|
-
var
|
|
1698
|
+
var Y = class e {
|
|
1702
1699
|
static {
|
|
1703
1700
|
this.LOAD = "{id}/state";
|
|
1704
1701
|
}
|
|
@@ -1708,7 +1705,7 @@ var J = class e {
|
|
|
1708
1705
|
static {
|
|
1709
1706
|
this.LOAD_TIME_BASED = `${e.LOAD}/time/{createTime}`;
|
|
1710
1707
|
}
|
|
1711
|
-
},
|
|
1708
|
+
}, X = class {
|
|
1712
1709
|
constructor(e) {
|
|
1713
1710
|
this.apiMetadata = e;
|
|
1714
1711
|
}
|
|
@@ -1722,47 +1719,47 @@ var J = class e {
|
|
|
1722
1719
|
throw a(e, t, n, r);
|
|
1723
1720
|
}
|
|
1724
1721
|
};
|
|
1725
|
-
|
|
1726
|
-
c(
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1722
|
+
m([
|
|
1723
|
+
c(Y.LOAD),
|
|
1724
|
+
p(0, l("id")),
|
|
1725
|
+
p(1, i()),
|
|
1726
|
+
f("design:type", Function),
|
|
1727
|
+
f("design:paramtypes", [
|
|
1731
1728
|
String,
|
|
1732
1729
|
typeof Record > "u" ? Object : Record,
|
|
1733
1730
|
typeof AbortController > "u" ? Object : AbortController
|
|
1734
1731
|
]),
|
|
1735
|
-
|
|
1736
|
-
],
|
|
1737
|
-
c(
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1732
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1733
|
+
], X.prototype, "load", null), m([
|
|
1734
|
+
c(Y.LOAD_VERSIONED),
|
|
1735
|
+
p(0, l("id")),
|
|
1736
|
+
p(1, l("version")),
|
|
1737
|
+
p(2, i()),
|
|
1738
|
+
f("design:type", Function),
|
|
1739
|
+
f("design:paramtypes", [
|
|
1743
1740
|
String,
|
|
1744
1741
|
Number,
|
|
1745
1742
|
typeof Record > "u" ? Object : Record,
|
|
1746
1743
|
typeof AbortController > "u" ? Object : AbortController
|
|
1747
1744
|
]),
|
|
1748
|
-
|
|
1749
|
-
],
|
|
1750
|
-
c(
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1745
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1746
|
+
], X.prototype, "loadVersioned", null), m([
|
|
1747
|
+
c(Y.LOAD_TIME_BASED),
|
|
1748
|
+
p(0, l("id")),
|
|
1749
|
+
p(1, l("createTime")),
|
|
1750
|
+
p(2, i()),
|
|
1751
|
+
f("design:type", Function),
|
|
1752
|
+
f("design:paramtypes", [
|
|
1756
1753
|
String,
|
|
1757
1754
|
Number,
|
|
1758
1755
|
typeof Record > "u" ? Object : Record,
|
|
1759
1756
|
typeof AbortController > "u" ? Object : AbortController
|
|
1760
1757
|
]),
|
|
1761
|
-
|
|
1762
|
-
],
|
|
1758
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1759
|
+
], X.prototype, "loadTimeBased", null), X = m([r(), f("design:paramtypes", [Object])], X);
|
|
1763
1760
|
//#endregion
|
|
1764
1761
|
//#region src/query/state/loadOwnerStateAggregateClient.ts
|
|
1765
|
-
var
|
|
1762
|
+
var Z = class e {
|
|
1766
1763
|
static {
|
|
1767
1764
|
this.LOAD = "state";
|
|
1768
1765
|
}
|
|
@@ -1772,7 +1769,7 @@ var X = class e {
|
|
|
1772
1769
|
static {
|
|
1773
1770
|
this.LOAD_TIME_BASED = `${e.LOAD}/time/{createTime}`;
|
|
1774
1771
|
}
|
|
1775
|
-
},
|
|
1772
|
+
}, Q = class {
|
|
1776
1773
|
constructor(e) {
|
|
1777
1774
|
this.apiMetadata = e;
|
|
1778
1775
|
}
|
|
@@ -1786,40 +1783,40 @@ var X = class e {
|
|
|
1786
1783
|
throw a(e, t, n);
|
|
1787
1784
|
}
|
|
1788
1785
|
};
|
|
1789
|
-
|
|
1790
|
-
c(
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
],
|
|
1796
|
-
c(
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1786
|
+
m([
|
|
1787
|
+
c(Z.LOAD),
|
|
1788
|
+
p(0, i()),
|
|
1789
|
+
f("design:type", Function),
|
|
1790
|
+
f("design:paramtypes", [typeof Record > "u" ? Object : Record, typeof AbortController > "u" ? Object : AbortController]),
|
|
1791
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1792
|
+
], Q.prototype, "load", null), m([
|
|
1793
|
+
c(Z.LOAD_VERSIONED),
|
|
1794
|
+
p(0, l("version")),
|
|
1795
|
+
p(1, i()),
|
|
1796
|
+
f("design:type", Function),
|
|
1797
|
+
f("design:paramtypes", [
|
|
1801
1798
|
Number,
|
|
1802
1799
|
typeof Record > "u" ? Object : Record,
|
|
1803
1800
|
typeof AbortController > "u" ? Object : AbortController
|
|
1804
1801
|
]),
|
|
1805
|
-
|
|
1806
|
-
],
|
|
1807
|
-
c(
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1802
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1803
|
+
], Q.prototype, "loadVersioned", null), m([
|
|
1804
|
+
c(Z.LOAD_TIME_BASED),
|
|
1805
|
+
p(0, l("createTime")),
|
|
1806
|
+
p(1, i()),
|
|
1807
|
+
f("design:type", Function),
|
|
1808
|
+
f("design:paramtypes", [
|
|
1812
1809
|
Number,
|
|
1813
1810
|
typeof Record > "u" ? Object : Record,
|
|
1814
1811
|
typeof AbortController > "u" ? Object : AbortController
|
|
1815
1812
|
]),
|
|
1816
|
-
|
|
1817
|
-
],
|
|
1813
|
+
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1814
|
+
], Q.prototype, "loadTimeBased", null), Q = m([r(), f("design:paramtypes", [Object])], Q);
|
|
1818
1815
|
//#endregion
|
|
1819
1816
|
//#region src/query/cursorQuery.ts
|
|
1820
|
-
var
|
|
1821
|
-
function
|
|
1822
|
-
if (!Number.isInteger(r) || r < 1 || r > 2147483646) throw TypeError(`size must be between 1 and ${
|
|
1817
|
+
var Ct = 10, wt = 2147483646, Tt = 32;
|
|
1818
|
+
function Et({ filter: e, projection: t = {}, sort: n = [], size: r = 10, cursor: i = null }) {
|
|
1819
|
+
if (!Number.isInteger(r) || r < 1 || r > 2147483646) throw TypeError(`size must be between 1 and ${wt}.`);
|
|
1823
1820
|
if (n.length > 32) throw TypeError("sort must contain at most 32 fields.");
|
|
1824
1821
|
return {
|
|
1825
1822
|
filter: e,
|
|
@@ -1835,46 +1832,50 @@ function $(e) {
|
|
|
1835
1832
|
let n = t(e.resourceAttribution ?? "", e.aggregateName ?? "");
|
|
1836
1833
|
return e.contextAlias && (n = t(e.contextAlias, n)), {
|
|
1837
1834
|
...e,
|
|
1838
|
-
basePath: n
|
|
1835
|
+
basePath: e.basePath ?? n
|
|
1839
1836
|
};
|
|
1840
1837
|
}
|
|
1841
|
-
var
|
|
1838
|
+
var Dt = class {
|
|
1842
1839
|
constructor(e) {
|
|
1843
1840
|
this.defaultOptions = e;
|
|
1844
1841
|
}
|
|
1845
1842
|
createSnapshotQueryClient(e) {
|
|
1846
1843
|
let t = $({
|
|
1847
1844
|
...this.defaultOptions,
|
|
1848
|
-
...e
|
|
1845
|
+
...e,
|
|
1846
|
+
basePath: e?.basePath ?? this.defaultOptions.basePath
|
|
1849
1847
|
});
|
|
1850
|
-
return new
|
|
1848
|
+
return new J(t);
|
|
1851
1849
|
}
|
|
1852
1850
|
createLoadStateAggregateClient(e) {
|
|
1853
1851
|
let t = $({
|
|
1854
1852
|
...this.defaultOptions,
|
|
1855
|
-
...e
|
|
1853
|
+
...e,
|
|
1854
|
+
basePath: e?.basePath ?? this.defaultOptions.basePath
|
|
1856
1855
|
});
|
|
1857
|
-
return new
|
|
1856
|
+
return new X(t);
|
|
1858
1857
|
}
|
|
1859
1858
|
createOwnerLoadStateAggregateClient(e) {
|
|
1860
1859
|
let t = $({
|
|
1861
1860
|
...this.defaultOptions,
|
|
1862
|
-
...e
|
|
1861
|
+
...e,
|
|
1862
|
+
basePath: e?.basePath ?? this.defaultOptions.basePath
|
|
1863
1863
|
});
|
|
1864
|
-
return new
|
|
1864
|
+
return new Q(t);
|
|
1865
1865
|
}
|
|
1866
1866
|
createEventStreamQueryClient(e) {
|
|
1867
1867
|
let t = $({
|
|
1868
1868
|
...this.defaultOptions,
|
|
1869
|
-
...e
|
|
1869
|
+
...e,
|
|
1870
|
+
basePath: e?.basePath ?? this.defaultOptions.basePath
|
|
1870
1871
|
});
|
|
1871
|
-
return new
|
|
1872
|
+
return new K(t);
|
|
1872
1873
|
}
|
|
1873
|
-
},
|
|
1874
|
+
}, Ot = {}, kt = ["*"], At = /* @__PURE__ */ function(e) {
|
|
1874
1875
|
return e.NONE = "", e.TENANT = "/tenant/{tenantId}", e.OWNER = "/owner/{ownerId}", e.TENANT_OWNER = "/tenant/{tenantId}/owner/{ownerId}", e;
|
|
1875
|
-
}({}),
|
|
1876
|
+
}({}), jt = /* @__PURE__ */ function(e) {
|
|
1876
1877
|
return e.RECOVERABLE = "RECOVERABLE", e.UNKNOWN = "UNKNOWN", e.UNRECOVERABLE = "UNRECOVERABLE", e;
|
|
1877
|
-
}({}),
|
|
1878
|
+
}({}), Mt = class e {
|
|
1878
1879
|
static {
|
|
1879
1880
|
this.SUCCEEDED = "Ok";
|
|
1880
1881
|
}
|
|
@@ -1941,21 +1942,21 @@ var Ot = class {
|
|
|
1941
1942
|
static isError(t) {
|
|
1942
1943
|
return !e.isSucceeded(t);
|
|
1943
1944
|
}
|
|
1944
|
-
},
|
|
1945
|
+
}, Nt = /* @__PURE__ */ function(e) {
|
|
1945
1946
|
return e.COMMAND = "COMMAND", e.ERROR = "ERROR", e.EVENT = "EVENT", e.SOURCING = "SOURCING", e.STATE_EVENT = "STATE_EVENT", e;
|
|
1946
|
-
}({}),
|
|
1947
|
+
}({}), Pt = "", Ft = /* @__PURE__ */ function(e) {
|
|
1947
1948
|
return e.MAP = "MAP", e.STRING = "STRING", e;
|
|
1948
1949
|
}({});
|
|
1949
1950
|
//#endregion
|
|
1950
1951
|
//#region src/getPropertyValue.ts
|
|
1951
|
-
function
|
|
1952
|
+
function It(e, t, n) {
|
|
1952
1953
|
if (e == null) return n;
|
|
1953
1954
|
let r = Array.isArray(t) ? t : t.split(".").filter(Boolean);
|
|
1954
1955
|
if (r.length === 0) return e;
|
|
1955
1956
|
let i = e;
|
|
1956
1957
|
for (let e of r) {
|
|
1957
1958
|
if (Array.isArray(i)) {
|
|
1958
|
-
let t =
|
|
1959
|
+
let t = /^\d+$/.test(e) ? Number(e) : NaN;
|
|
1959
1960
|
if (isNaN(t) || t < 0 || !Number.isInteger(t)) return n;
|
|
1960
1961
|
i = i[t];
|
|
1961
1962
|
} else if (typeof i == "object") i = i[e];
|
|
@@ -1965,6 +1966,6 @@ function Lt(e, t, n) {
|
|
|
1965
1966
|
return i;
|
|
1966
1967
|
}
|
|
1967
1968
|
//#endregion
|
|
1968
|
-
export {
|
|
1969
|
+
export { I as AggregationDateUnit, ct as AggregationExpressionOperator, st as AggregationExpressionType, lt as AggregationFunction, at as AggregationGroupType, ot as AggregationMetricType, h as CommandClient, ee as CommandHeaders, te as CommandStage, ie as ConditionOptionKey, Ct as DEFAULT_CURSOR_SIZE, Pt as DEFAULT_OWNER_ID, V as DEFAULT_PAGINATION, ft as DEFAULT_PROJECTION, b as DeletionState, xt as DomainEventStreamMetadataFields, Ot as EMPTY_ABAC_TAGS, gt as EMPTY_PAGED_LIST, re as EMPTY_VALUE_OPERATORS, Mt as ErrorCodes, K as EventStreamQueryClient, G as EventStreamQueryEndpointPaths, Ke as FilterOperator, Nt as FunctionKind, ne as LOGICAL_OPERATORS, Q as LoadOwnerStateAggregateClient, Z as LoadOwnerStateAggregateEndpointPaths, X as LoadStateAggregateClient, Y as LoadStateAggregateEndpointPaths, wt as MAX_CURSOR_SIZE, Tt as MAX_CURSOR_SORT_FIELDS, Ft as MessageHeaderSqlType, g as Operator, Dt as QueryClientFactory, jt as RecoverableType, At as ResourceAttributionPathSpec, w as SearchMode, St as SnapshotMetadataFields, J as SnapshotQueryClient, q as SnapshotQueryEndpointPaths, vt as SortDirection, qe as StringComparison, T as TimeUnit, kt as WILDCARD_ABAC_TAG_VALUES, me as active, x as aggregateId, ue as aggregateIds, ut as aggregation, C as all, Te as allIn, ae as and, yt as asc, Ie as beforeToday, we as between, xe as contains, $ as createQueryApiMetadata, Et as cursorQuery, y as dateOptions, pt as defaultProjection, S as deleted, bt as desc, We as earlierDays, ke as elemMatch, Oe as endsWith, he as eq, Pe as exists, F as filter, It as getPropertyValue, _e as gt, ye as gte, ce as id, le as ids, v as ignoreCaseOptions, Ne as isFalse, Se as isIn, Ae as isNull, Me as isTrue, _ as isValidateCondition, He as lastMonth, Be as lastWeek, W as listQuery, ve as lt, be as lte, De as match, ge as ne, ze as nextWeek, se as nor, Ce as notIn, je as notNull, oe as or, fe as ownerId, _t as pagedList, ht as pagedQuery, dt as pagination, mt as projection, Ge as raw, Ue as recentDays, U as singleQuery, pe as spaceId, Ee as startsWith, de as tenantId, Ve as thisMonth, Re as thisWeek, Fe as today, Le as tomorrow };
|
|
1969
1970
|
|
|
1970
1971
|
//# sourceMappingURL=index.es.js.map
|