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