@ahoo-wang/fetcher-wow 3.17.0 → 3.17.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 +83 -62
- package/README.zh-CN.md +70 -51
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +622 -150
- package/dist/index.es.js.map +1 -1
- package/dist/query/condition.d.ts +52 -0
- package/dist/query/condition.d.ts.map +1 -1
- package/dist/query/cursorQuery.d.ts +10 -1
- package/dist/query/cursorQuery.d.ts.map +1 -1
- package/dist/query/event/eventStreamQueryClient.d.ts +21 -21
- package/dist/query/event/eventStreamQueryClient.d.ts.map +1 -1
- package/dist/query/filter.d.ts +204 -0
- package/dist/query/filter.d.ts.map +1 -0
- package/dist/query/index.d.ts +1 -0
- package/dist/query/index.d.ts.map +1 -1
- package/dist/query/locale/en_US.cjs.js.map +1 -1
- package/dist/query/locale/en_US.d.ts +1 -0
- 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 -0
- package/dist/query/locale/operatorLocale.d.ts.map +1 -1
- package/dist/query/locale/zh_CN.cjs.js.map +1 -1
- package/dist/query/locale/zh_CN.d.ts +1 -0
- 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/operator.d.ts +3 -0
- package/dist/query/operator.d.ts.map +1 -1
- package/dist/query/queryApi.d.ts +9 -8
- package/dist/query/queryApi.d.ts.map +1 -1
- package/dist/query/queryable.d.ts +34 -4
- package/dist/query/queryable.d.ts.map +1 -1
- package/dist/query/snapshot/snapshotQueryApi.d.ts +5 -5
- package/dist/query/snapshot/snapshotQueryApi.d.ts.map +1 -1
- package/dist/query/snapshot/snapshotQueryClient.d.ts +40 -42
- package/dist/query/snapshot/snapshotQueryClient.d.ts.map +1 -1
- package/package.json +8 -7
package/dist/index.es.js
CHANGED
|
@@ -169,10 +169,10 @@ function y(e, t) {
|
|
|
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
|
|
175
|
+
function x(...e) {
|
|
176
176
|
if (e.length === 0) return w();
|
|
177
177
|
if (e.length === 1) return _(e[0]) ? e[0] : w();
|
|
178
178
|
let t = [];
|
|
@@ -183,69 +183,69 @@ function b(...e) {
|
|
|
183
183
|
children: t
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function ae(...e) {
|
|
187
187
|
let t = e?.filter((e) => _(e));
|
|
188
188
|
return t.length === 0 ? w() : {
|
|
189
189
|
operator: g.OR,
|
|
190
190
|
children: t
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function oe(...e) {
|
|
194
194
|
return e.length === 0 ? w() : {
|
|
195
195
|
operator: g.NOR,
|
|
196
196
|
children: e
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function se(e) {
|
|
200
200
|
return {
|
|
201
201
|
operator: g.ID,
|
|
202
202
|
value: e
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ce(e) {
|
|
206
206
|
return {
|
|
207
207
|
operator: g.IDS,
|
|
208
208
|
value: e
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function S(e) {
|
|
212
212
|
return {
|
|
213
213
|
operator: g.AGGREGATE_ID,
|
|
214
214
|
value: e
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function C(e) {
|
|
218
218
|
return {
|
|
219
219
|
operator: g.AGGREGATE_IDS,
|
|
220
220
|
value: e
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function le(e) {
|
|
224
224
|
return {
|
|
225
225
|
operator: g.TENANT_ID,
|
|
226
226
|
value: e
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function ue(e) {
|
|
230
230
|
return {
|
|
231
231
|
operator: g.OWNER_ID,
|
|
232
232
|
value: e
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function de(e) {
|
|
236
236
|
return {
|
|
237
237
|
operator: g.SPACE_ID,
|
|
238
238
|
value: e
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function fe(e) {
|
|
242
242
|
return {
|
|
243
243
|
operator: g.DELETED,
|
|
244
244
|
value: e
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
247
|
function pe() {
|
|
248
|
-
return
|
|
248
|
+
return fe("ACTIVE");
|
|
249
249
|
}
|
|
250
250
|
function w() {
|
|
251
251
|
return { operator: g.ALL };
|
|
@@ -264,35 +264,35 @@ function he(e, t) {
|
|
|
264
264
|
value: t
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function ge(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 _e(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 ve(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 ye(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 be(e, t, n) {
|
|
296
296
|
let r = v(n);
|
|
297
297
|
return {
|
|
298
298
|
field: e,
|
|
@@ -301,35 +301,35 @@ function ve(e, t, n) {
|
|
|
301
301
|
options: r
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function xe(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 Se(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 Ce(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 we(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 Te(e, t, n) {
|
|
333
333
|
let r = v(n);
|
|
334
334
|
return {
|
|
335
335
|
field: e,
|
|
@@ -338,14 +338,14 @@ function A(e, t, n) {
|
|
|
338
338
|
options: r
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Ee(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 De(e, t, n) {
|
|
349
349
|
let r = v(n);
|
|
350
350
|
return {
|
|
351
351
|
field: e,
|
|
@@ -354,45 +354,45 @@ function M(e, t, n) {
|
|
|
354
354
|
options: r
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Oe(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 ke(e) {
|
|
365
365
|
return {
|
|
366
366
|
field: e,
|
|
367
367
|
operator: g.NULL
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Ae(e) {
|
|
371
371
|
return {
|
|
372
372
|
field: e,
|
|
373
373
|
operator: g.NOT_NULL
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function je(e) {
|
|
377
377
|
return {
|
|
378
378
|
field: e,
|
|
379
379
|
operator: g.TRUE
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Me(e) {
|
|
383
383
|
return {
|
|
384
384
|
field: e,
|
|
385
385
|
operator: g.FALSE
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Ne(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 Pe(e, t, n) {
|
|
396
396
|
let r = y(t, n);
|
|
397
397
|
return {
|
|
398
398
|
field: e,
|
|
@@ -400,7 +400,7 @@ function we(e, t, n) {
|
|
|
400
400
|
options: r
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Fe(e, t, n, r) {
|
|
404
404
|
let i = y(n, r);
|
|
405
405
|
return {
|
|
406
406
|
field: e,
|
|
@@ -409,7 +409,7 @@ function Te(e, t, n, r) {
|
|
|
409
409
|
options: i
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function Ie(e, t, n) {
|
|
413
413
|
let r = y(t, n);
|
|
414
414
|
return {
|
|
415
415
|
field: e,
|
|
@@ -417,7 +417,7 @@ function Ee(e, t, n) {
|
|
|
417
417
|
options: r
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function Le(e, t, n) {
|
|
421
421
|
let r = y(t, n);
|
|
422
422
|
return {
|
|
423
423
|
field: e,
|
|
@@ -425,7 +425,7 @@ function De(e, t, n) {
|
|
|
425
425
|
options: r
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function Re(e, t, n) {
|
|
429
429
|
let r = y(t, n);
|
|
430
430
|
return {
|
|
431
431
|
field: e,
|
|
@@ -433,7 +433,7 @@ function Oe(e, t, n) {
|
|
|
433
433
|
options: r
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function ze(e, t, n) {
|
|
437
437
|
let r = y(t, n);
|
|
438
438
|
return {
|
|
439
439
|
field: e,
|
|
@@ -441,7 +441,7 @@ function ke(e, t, n) {
|
|
|
441
441
|
options: r
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Be(e, t, n) {
|
|
445
445
|
let r = y(t, n);
|
|
446
446
|
return {
|
|
447
447
|
field: e,
|
|
@@ -449,7 +449,7 @@ function Ae(e, t, n) {
|
|
|
449
449
|
options: r
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Ve(e, t, n) {
|
|
453
453
|
let r = y(t, n);
|
|
454
454
|
return {
|
|
455
455
|
field: e,
|
|
@@ -457,7 +457,7 @@ function je(e, t, n) {
|
|
|
457
457
|
options: r
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function He(e, t, n, r) {
|
|
461
461
|
let i = y(n, r);
|
|
462
462
|
return {
|
|
463
463
|
field: e,
|
|
@@ -466,7 +466,7 @@ function Me(e, t, n, r) {
|
|
|
466
466
|
options: i
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Ue(e, t, n, r) {
|
|
470
470
|
let i = y(n, r);
|
|
471
471
|
return {
|
|
472
472
|
field: e,
|
|
@@ -475,19 +475,467 @@ function Ne(e, t, n, r) {
|
|
|
475
475
|
options: i
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function We(e) {
|
|
479
479
|
return {
|
|
480
480
|
operator: g.RAW,
|
|
481
481
|
value: e
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
//#endregion
|
|
485
|
-
//#region src/query/
|
|
485
|
+
//#region src/query/filter.ts
|
|
486
|
+
var Ge = /* @__PURE__ */ function(e) {
|
|
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_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.RECENT_DAYS = "RECENT_DAYS", e.EARLIER_DAYS = "EARLIER_DAYS", e;
|
|
488
|
+
}({}), Ke = /* @__PURE__ */ function(e) {
|
|
489
|
+
return e.CASE_SENSITIVE = "CASE_SENSITIVE", e.CASE_INSENSITIVE = "CASE_INSENSITIVE", e;
|
|
490
|
+
}({}), qe = /^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9](?:\.[0-9]{1,9})?)?$/, Je = /^@?[A-Za-z_][A-Za-z0-9_-]*(\.(?:@?[A-Za-z_][A-Za-z0-9_-]*|[0-9]+))*$/, Ye = /^(?:UTC|GMT|UT)?[+-](\d{1,2}|\d{4}|\d{6}|\d{2}:\d{2}|\d{2}:\d{2}:\d{2})$/, Xe = /^(?:UTC|GMT|UT)?[+-]/, Ze = {
|
|
491
|
+
G: 5,
|
|
492
|
+
u: 19,
|
|
493
|
+
y: 19,
|
|
494
|
+
Q: 5,
|
|
495
|
+
q: 5,
|
|
496
|
+
M: 5,
|
|
497
|
+
L: 5,
|
|
498
|
+
D: 3,
|
|
499
|
+
d: 2,
|
|
500
|
+
F: 1,
|
|
501
|
+
E: 5,
|
|
502
|
+
e: 5,
|
|
503
|
+
c: [
|
|
504
|
+
1,
|
|
505
|
+
3,
|
|
506
|
+
4,
|
|
507
|
+
5
|
|
508
|
+
],
|
|
509
|
+
a: 1,
|
|
510
|
+
B: [
|
|
511
|
+
1,
|
|
512
|
+
4,
|
|
513
|
+
5
|
|
514
|
+
],
|
|
515
|
+
h: 2,
|
|
516
|
+
H: 2,
|
|
517
|
+
k: 2,
|
|
518
|
+
K: 2,
|
|
519
|
+
m: 2,
|
|
520
|
+
s: 2,
|
|
521
|
+
S: 9,
|
|
522
|
+
A: 19,
|
|
523
|
+
n: 19,
|
|
524
|
+
N: 19,
|
|
525
|
+
V: [2],
|
|
526
|
+
v: [1, 4],
|
|
527
|
+
z: 4,
|
|
528
|
+
O: [1, 4],
|
|
529
|
+
X: 5,
|
|
530
|
+
x: 5,
|
|
531
|
+
Z: 5,
|
|
532
|
+
W: 1,
|
|
533
|
+
w: 2,
|
|
534
|
+
Y: Infinity,
|
|
535
|
+
g: 19
|
|
536
|
+
};
|
|
537
|
+
function T(e) {
|
|
538
|
+
if (typeof e != "string" || !Je.test(e)) throw TypeError(`Logical field is invalid: [${String(e)}].`);
|
|
539
|
+
return e;
|
|
540
|
+
}
|
|
541
|
+
function E(e, t) {
|
|
542
|
+
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.");
|
|
543
|
+
return e;
|
|
544
|
+
}
|
|
545
|
+
function D(e) {
|
|
546
|
+
return Array.isArray(e) ? (e.forEach((e) => E(e, !0)), e) : E(e, !0);
|
|
547
|
+
}
|
|
548
|
+
function O(e, t) {
|
|
549
|
+
if (typeof t != "string") throw TypeError(`${e} must be a string.`);
|
|
550
|
+
return t;
|
|
551
|
+
}
|
|
552
|
+
function k(e) {
|
|
553
|
+
if (e !== "CASE_SENSITIVE" && e !== "CASE_INSENSITIVE") throw TypeError(`String comparison is invalid: [${String(e)}].`);
|
|
554
|
+
}
|
|
555
|
+
function A(e, t) {
|
|
556
|
+
if (t.length === 0) throw TypeError(`${e} cannot be empty.`);
|
|
557
|
+
if (t.some((e) => e == null)) throw TypeError(`${e} cannot contain null.`);
|
|
558
|
+
}
|
|
559
|
+
function Qe(e) {
|
|
560
|
+
let t = Ye.exec(e);
|
|
561
|
+
if (!t) return !1;
|
|
562
|
+
let n = t[1], [r, i = 0, a = 0] = (n.includes(":") ? n.split(":") : n.length <= 2 ? [n] : [
|
|
563
|
+
n.slice(0, 2),
|
|
564
|
+
n.slice(2, 4),
|
|
565
|
+
n.slice(4, 6)
|
|
566
|
+
]).map(Number);
|
|
567
|
+
return i <= 59 && a <= 59 && (r < 18 || r === 18 && i === 0 && a === 0);
|
|
568
|
+
}
|
|
569
|
+
function j({ zoneId: e, datePattern: t }) {
|
|
570
|
+
if (e !== void 0) {
|
|
571
|
+
if (typeof e != "string" || !e.trim()) throw TypeError("zoneId cannot be blank.");
|
|
572
|
+
if (Xe.test(e) && !Qe(e)) throw TypeError(`zoneId is invalid: [${e}].`);
|
|
573
|
+
}
|
|
574
|
+
return t !== void 0 && et(t), {
|
|
575
|
+
...e === void 0 ? {} : { zoneId: e },
|
|
576
|
+
...t === void 0 ? {} : { datePattern: t }
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
function $e(e, t, n) {
|
|
580
|
+
let r = Ze[t];
|
|
581
|
+
if (!(typeof r == "number" ? n <= r : r?.includes(n) === !0)) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
582
|
+
}
|
|
583
|
+
function M(e, t) {
|
|
584
|
+
return e !== void 0 && ("uyDFdhHkKmsSgAnNWwY".includes(e) || e === "c" && t === 1 || "eMLQq".includes(e) && t <= 2);
|
|
585
|
+
}
|
|
586
|
+
function et(e) {
|
|
587
|
+
if (typeof e != "string" || !e.trim()) throw TypeError("datePattern cannot be blank.");
|
|
588
|
+
let t = !1, n = 0;
|
|
589
|
+
for (let r = 0; r < e.length; r++) {
|
|
590
|
+
let i = e[r];
|
|
591
|
+
if (i === "'") {
|
|
592
|
+
e[r + 1] === "'" ? r++ : t = !t;
|
|
593
|
+
continue;
|
|
594
|
+
}
|
|
595
|
+
if (!t) {
|
|
596
|
+
if (/[A-Za-z]/.test(i)) {
|
|
597
|
+
let t = i, n = r + 1;
|
|
598
|
+
for (; e[n] === t;) n++;
|
|
599
|
+
let a = n - r, o = !1;
|
|
600
|
+
if (t === "p") {
|
|
601
|
+
if (o = !0, t = e[n], !t || !/[A-Za-z]/.test(t) || t === "p") throw TypeError(`datePattern is invalid: [${e}].`);
|
|
602
|
+
let r = n++;
|
|
603
|
+
for (; e[n] === t;) n++;
|
|
604
|
+
a = n - r;
|
|
605
|
+
}
|
|
606
|
+
if ($e(e, t, a), o && M(t, a)) {
|
|
607
|
+
let t = e[n], r = n;
|
|
608
|
+
for (; r < e.length && e[r] === t;) r++;
|
|
609
|
+
if (M(t, r - n)) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
610
|
+
}
|
|
611
|
+
r = n - 1;
|
|
612
|
+
} else if (i === "[") n++;
|
|
613
|
+
else if (i === "]") {
|
|
614
|
+
if (n === 0) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
615
|
+
n--;
|
|
616
|
+
} else if ("{}#".includes(i)) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
if (t) throw TypeError(`datePattern is invalid: [${e}].`);
|
|
620
|
+
}
|
|
621
|
+
function N(e, t) {
|
|
622
|
+
if (!Number.isInteger(t) || t < 1 || t > 2147483647) throw TypeError(`${e} days must be a positive JVM Int.`);
|
|
623
|
+
}
|
|
624
|
+
function P(e) {
|
|
625
|
+
switch (e.op) {
|
|
626
|
+
case "ID":
|
|
627
|
+
case "IDS":
|
|
628
|
+
case "AGGREGATE_ID":
|
|
629
|
+
case "AGGREGATE_IDS":
|
|
630
|
+
case "TENANT_ID":
|
|
631
|
+
case "OWNER_ID":
|
|
632
|
+
case "SPACE_ID":
|
|
633
|
+
case "DELETION":
|
|
634
|
+
case "SEARCH": throw TypeError("ELEMENT_MATCH predicate cannot contain root filters.");
|
|
635
|
+
case "AND":
|
|
636
|
+
case "OR":
|
|
637
|
+
case "NOR":
|
|
638
|
+
A(`${e.op} operands`, e.operands), e.operands.forEach(P);
|
|
639
|
+
break;
|
|
640
|
+
case "ELEMENT_MATCH": P(e.predicate);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
function tt(...e) {
|
|
644
|
+
return A("AND operands", e), {
|
|
645
|
+
op: "AND",
|
|
646
|
+
operands: e
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
function nt(...e) {
|
|
650
|
+
return A("OR operands", e), {
|
|
651
|
+
op: "OR",
|
|
652
|
+
operands: e
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function rt(...e) {
|
|
656
|
+
return A("NOR operands", e), {
|
|
657
|
+
op: "NOR",
|
|
658
|
+
operands: e
|
|
659
|
+
};
|
|
660
|
+
}
|
|
486
661
|
var F = {
|
|
662
|
+
matchAll() {
|
|
663
|
+
return { op: "MATCH_ALL" };
|
|
664
|
+
},
|
|
665
|
+
matchNone() {
|
|
666
|
+
return { op: "MATCH_NONE" };
|
|
667
|
+
},
|
|
668
|
+
id(e) {
|
|
669
|
+
return {
|
|
670
|
+
op: "ID",
|
|
671
|
+
value: O("ID value", e)
|
|
672
|
+
};
|
|
673
|
+
},
|
|
674
|
+
ids(...e) {
|
|
675
|
+
return A("IDS values", e), e.forEach((e) => O("IDS value", e)), {
|
|
676
|
+
op: "IDS",
|
|
677
|
+
values: e
|
|
678
|
+
};
|
|
679
|
+
},
|
|
680
|
+
aggregateId(e) {
|
|
681
|
+
return {
|
|
682
|
+
op: "AGGREGATE_ID",
|
|
683
|
+
value: O("AGGREGATE_ID value", e)
|
|
684
|
+
};
|
|
685
|
+
},
|
|
686
|
+
aggregateIds(...e) {
|
|
687
|
+
return A("AGGREGATE_IDS values", e), e.forEach((e) => O("AGGREGATE_IDS value", e)), {
|
|
688
|
+
op: "AGGREGATE_IDS",
|
|
689
|
+
values: e
|
|
690
|
+
};
|
|
691
|
+
},
|
|
692
|
+
tenantId(e) {
|
|
693
|
+
return {
|
|
694
|
+
op: "TENANT_ID",
|
|
695
|
+
value: O("TENANT_ID value", e)
|
|
696
|
+
};
|
|
697
|
+
},
|
|
698
|
+
ownerId(e) {
|
|
699
|
+
return {
|
|
700
|
+
op: "OWNER_ID",
|
|
701
|
+
value: O("OWNER_ID value", e)
|
|
702
|
+
};
|
|
703
|
+
},
|
|
704
|
+
spaceId(e) {
|
|
705
|
+
return {
|
|
706
|
+
op: "SPACE_ID",
|
|
707
|
+
value: O("SPACE_ID value", e)
|
|
708
|
+
};
|
|
709
|
+
},
|
|
710
|
+
and: tt,
|
|
711
|
+
or: nt,
|
|
712
|
+
nor: rt,
|
|
713
|
+
eq(e, t) {
|
|
714
|
+
return {
|
|
715
|
+
op: "EQ",
|
|
716
|
+
field: T(e),
|
|
717
|
+
value: D(t)
|
|
718
|
+
};
|
|
719
|
+
},
|
|
720
|
+
ne(e, t) {
|
|
721
|
+
return {
|
|
722
|
+
op: "NE",
|
|
723
|
+
field: T(e),
|
|
724
|
+
value: D(t)
|
|
725
|
+
};
|
|
726
|
+
},
|
|
727
|
+
gt(e, t) {
|
|
728
|
+
return {
|
|
729
|
+
op: "GT",
|
|
730
|
+
field: T(e),
|
|
731
|
+
value: E(t, !1)
|
|
732
|
+
};
|
|
733
|
+
},
|
|
734
|
+
gte(e, t) {
|
|
735
|
+
return {
|
|
736
|
+
op: "GTE",
|
|
737
|
+
field: T(e),
|
|
738
|
+
value: E(t, !1)
|
|
739
|
+
};
|
|
740
|
+
},
|
|
741
|
+
lt(e, t) {
|
|
742
|
+
return {
|
|
743
|
+
op: "LT",
|
|
744
|
+
field: T(e),
|
|
745
|
+
value: E(t, !1)
|
|
746
|
+
};
|
|
747
|
+
},
|
|
748
|
+
lte(e, t) {
|
|
749
|
+
return {
|
|
750
|
+
op: "LTE",
|
|
751
|
+
field: T(e),
|
|
752
|
+
value: E(t, !1)
|
|
753
|
+
};
|
|
754
|
+
},
|
|
755
|
+
contains(e, t, n = "CASE_SENSITIVE") {
|
|
756
|
+
return k(n), {
|
|
757
|
+
op: "CONTAINS",
|
|
758
|
+
field: T(e),
|
|
759
|
+
value: O("CONTAINS value", t),
|
|
760
|
+
stringComparison: n
|
|
761
|
+
};
|
|
762
|
+
},
|
|
763
|
+
startsWith(e, t, n = "CASE_SENSITIVE") {
|
|
764
|
+
return k(n), {
|
|
765
|
+
op: "STARTS_WITH",
|
|
766
|
+
field: T(e),
|
|
767
|
+
value: O("STARTS_WITH value", t),
|
|
768
|
+
stringComparison: n
|
|
769
|
+
};
|
|
770
|
+
},
|
|
771
|
+
endsWith(e, t, n = "CASE_SENSITIVE") {
|
|
772
|
+
return k(n), {
|
|
773
|
+
op: "ENDS_WITH",
|
|
774
|
+
field: T(e),
|
|
775
|
+
value: O("ENDS_WITH value", t),
|
|
776
|
+
stringComparison: n
|
|
777
|
+
};
|
|
778
|
+
},
|
|
779
|
+
isIn(e, ...t) {
|
|
780
|
+
return A("IN values", t), t.forEach((e) => E(e, !1)), {
|
|
781
|
+
op: "IN",
|
|
782
|
+
field: T(e),
|
|
783
|
+
values: t
|
|
784
|
+
};
|
|
785
|
+
},
|
|
786
|
+
notIn(e, ...t) {
|
|
787
|
+
return A("NOT_IN values", t), t.forEach((e) => E(e, !1)), {
|
|
788
|
+
op: "NOT_IN",
|
|
789
|
+
field: T(e),
|
|
790
|
+
values: t
|
|
791
|
+
};
|
|
792
|
+
},
|
|
793
|
+
containsAll(e, ...t) {
|
|
794
|
+
return A("CONTAINS_ALL values", t), t.forEach((e) => E(e, !1)), {
|
|
795
|
+
op: "CONTAINS_ALL",
|
|
796
|
+
field: T(e),
|
|
797
|
+
values: t
|
|
798
|
+
};
|
|
799
|
+
},
|
|
800
|
+
between(e, t, n) {
|
|
801
|
+
return {
|
|
802
|
+
op: "BETWEEN",
|
|
803
|
+
field: T(e),
|
|
804
|
+
lowerBound: E(t, !1),
|
|
805
|
+
upperBound: E(n, !1)
|
|
806
|
+
};
|
|
807
|
+
},
|
|
808
|
+
isEmpty(e) {
|
|
809
|
+
return {
|
|
810
|
+
op: "IS_EMPTY",
|
|
811
|
+
field: T(e)
|
|
812
|
+
};
|
|
813
|
+
},
|
|
814
|
+
isNull(e) {
|
|
815
|
+
return {
|
|
816
|
+
op: "IS_NULL",
|
|
817
|
+
field: T(e)
|
|
818
|
+
};
|
|
819
|
+
},
|
|
820
|
+
isNotNull(e) {
|
|
821
|
+
return {
|
|
822
|
+
op: "IS_NOT_NULL",
|
|
823
|
+
field: T(e)
|
|
824
|
+
};
|
|
825
|
+
},
|
|
826
|
+
exists(e) {
|
|
827
|
+
return {
|
|
828
|
+
op: "EXISTS",
|
|
829
|
+
field: T(e)
|
|
830
|
+
};
|
|
831
|
+
},
|
|
832
|
+
notExists(e) {
|
|
833
|
+
return {
|
|
834
|
+
op: "NOT_EXISTS",
|
|
835
|
+
field: T(e)
|
|
836
|
+
};
|
|
837
|
+
},
|
|
838
|
+
deletion(e) {
|
|
839
|
+
if (e !== b.ACTIVE && e !== b.DELETED && e !== b.ALL) throw TypeError(`Deletion state is invalid: [${String(e)}].`);
|
|
840
|
+
return {
|
|
841
|
+
op: "DELETION",
|
|
842
|
+
state: e
|
|
843
|
+
};
|
|
844
|
+
},
|
|
845
|
+
elementMatch(e, t) {
|
|
846
|
+
return P(t), {
|
|
847
|
+
op: "ELEMENT_MATCH",
|
|
848
|
+
field: T(e),
|
|
849
|
+
predicate: t
|
|
850
|
+
};
|
|
851
|
+
},
|
|
852
|
+
search(e, ...t) {
|
|
853
|
+
if (typeof e != "string" || !e.trim()) throw TypeError("SEARCH query cannot be blank.");
|
|
854
|
+
return {
|
|
855
|
+
op: "SEARCH",
|
|
856
|
+
query: e,
|
|
857
|
+
fields: t.map(T)
|
|
858
|
+
};
|
|
859
|
+
},
|
|
860
|
+
today(e, t = {}) {
|
|
861
|
+
return {
|
|
862
|
+
...j(t),
|
|
863
|
+
op: "TODAY",
|
|
864
|
+
field: T(e)
|
|
865
|
+
};
|
|
866
|
+
},
|
|
867
|
+
beforeToday(e, t, n = {}) {
|
|
868
|
+
if (typeof t != "string" || !qe.test(t)) throw TypeError("BEFORE_TODAY time is invalid.");
|
|
869
|
+
return {
|
|
870
|
+
...j(n),
|
|
871
|
+
op: "BEFORE_TODAY",
|
|
872
|
+
field: T(e),
|
|
873
|
+
time: t
|
|
874
|
+
};
|
|
875
|
+
},
|
|
876
|
+
tomorrow(e, t = {}) {
|
|
877
|
+
return {
|
|
878
|
+
...j(t),
|
|
879
|
+
op: "TOMORROW",
|
|
880
|
+
field: T(e)
|
|
881
|
+
};
|
|
882
|
+
},
|
|
883
|
+
thisWeek(e, t = {}) {
|
|
884
|
+
return {
|
|
885
|
+
...j(t),
|
|
886
|
+
op: "THIS_WEEK",
|
|
887
|
+
field: T(e)
|
|
888
|
+
};
|
|
889
|
+
},
|
|
890
|
+
nextWeek(e, t = {}) {
|
|
891
|
+
return {
|
|
892
|
+
...j(t),
|
|
893
|
+
op: "NEXT_WEEK",
|
|
894
|
+
field: T(e)
|
|
895
|
+
};
|
|
896
|
+
},
|
|
897
|
+
lastWeek(e, t = {}) {
|
|
898
|
+
return {
|
|
899
|
+
...j(t),
|
|
900
|
+
op: "LAST_WEEK",
|
|
901
|
+
field: T(e)
|
|
902
|
+
};
|
|
903
|
+
},
|
|
904
|
+
thisMonth(e, t = {}) {
|
|
905
|
+
return {
|
|
906
|
+
...j(t),
|
|
907
|
+
op: "THIS_MONTH",
|
|
908
|
+
field: T(e)
|
|
909
|
+
};
|
|
910
|
+
},
|
|
911
|
+
lastMonth(e, t = {}) {
|
|
912
|
+
return {
|
|
913
|
+
...j(t),
|
|
914
|
+
op: "LAST_MONTH",
|
|
915
|
+
field: T(e)
|
|
916
|
+
};
|
|
917
|
+
},
|
|
918
|
+
recentDays(e, t, n = {}) {
|
|
919
|
+
return N("RECENT_DAYS", t), {
|
|
920
|
+
...j(n),
|
|
921
|
+
op: "RECENT_DAYS",
|
|
922
|
+
field: T(e),
|
|
923
|
+
days: t
|
|
924
|
+
};
|
|
925
|
+
},
|
|
926
|
+
earlierDays(e, t, n = {}) {
|
|
927
|
+
return N("EARLIER_DAYS", t), {
|
|
928
|
+
...j(n),
|
|
929
|
+
op: "EARLIER_DAYS",
|
|
930
|
+
field: T(e),
|
|
931
|
+
days: t
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
}, I = {
|
|
487
935
|
index: 1,
|
|
488
936
|
size: 10
|
|
489
937
|
};
|
|
490
|
-
function
|
|
938
|
+
function it({ index: e = I.index, size: t = I.size } = I) {
|
|
491
939
|
return {
|
|
492
940
|
index: e,
|
|
493
941
|
size: t
|
|
@@ -495,11 +943,11 @@ function Fe({ index: e = F.index, size: t = F.size } = F) {
|
|
|
495
943
|
}
|
|
496
944
|
//#endregion
|
|
497
945
|
//#region src/query/projection.ts
|
|
498
|
-
var
|
|
499
|
-
function
|
|
500
|
-
return
|
|
946
|
+
var L = {};
|
|
947
|
+
function R() {
|
|
948
|
+
return L;
|
|
501
949
|
}
|
|
502
|
-
function
|
|
950
|
+
function at({ include: e, exclude: t } = R()) {
|
|
503
951
|
return {
|
|
504
952
|
include: e,
|
|
505
953
|
exclude: t
|
|
@@ -507,34 +955,49 @@ function Ie({ include: e, exclude: t } = L()) {
|
|
|
507
955
|
}
|
|
508
956
|
//#endregion
|
|
509
957
|
//#region src/query/queryable.ts
|
|
510
|
-
function
|
|
958
|
+
function z({ condition: e, filter: t }) {
|
|
959
|
+
if (t === null) throw TypeError("filter cannot be null.");
|
|
960
|
+
if (t !== void 0) return { filter: t };
|
|
961
|
+
if (e === null) throw TypeError("condition cannot be null.");
|
|
962
|
+
return { condition: e === void 0 ? w() : e };
|
|
963
|
+
}
|
|
964
|
+
function B({ condition: e, filter: t, projection: n, sort: r } = {}) {
|
|
511
965
|
return {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
966
|
+
...z({
|
|
967
|
+
condition: e,
|
|
968
|
+
filter: t
|
|
969
|
+
}),
|
|
970
|
+
projection: n,
|
|
971
|
+
sort: r
|
|
515
972
|
};
|
|
516
973
|
}
|
|
517
|
-
function
|
|
974
|
+
function V({ condition: e, filter: t, projection: n, sort: r, limit: i } = {}) {
|
|
518
975
|
return {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
976
|
+
...z({
|
|
977
|
+
condition: e,
|
|
978
|
+
filter: t
|
|
979
|
+
}),
|
|
980
|
+
projection: n,
|
|
981
|
+
sort: r,
|
|
982
|
+
limit: i ?? (t === void 0 ? I.size : 0)
|
|
523
983
|
};
|
|
524
984
|
}
|
|
525
|
-
function
|
|
985
|
+
function ot({ condition: e, filter: t, projection: n, sort: r, pagination: i = I } = {}) {
|
|
526
986
|
return {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
987
|
+
...z({
|
|
988
|
+
condition: e,
|
|
989
|
+
filter: t
|
|
990
|
+
}),
|
|
991
|
+
projection: n,
|
|
992
|
+
sort: r,
|
|
993
|
+
pagination: i
|
|
531
994
|
};
|
|
532
995
|
}
|
|
533
|
-
var
|
|
996
|
+
var st = {
|
|
534
997
|
total: 0,
|
|
535
998
|
list: []
|
|
536
999
|
};
|
|
537
|
-
function
|
|
1000
|
+
function ct({ total: e, list: t = [] } = st) {
|
|
538
1001
|
return e === void 0 && (e = t.length), {
|
|
539
1002
|
total: e,
|
|
540
1003
|
list: t
|
|
@@ -542,16 +1005,16 @@ function Re({ total: e, list: t = [] } = B) {
|
|
|
542
1005
|
}
|
|
543
1006
|
//#endregion
|
|
544
1007
|
//#region src/query/sort.ts
|
|
545
|
-
var
|
|
1008
|
+
var H = /* @__PURE__ */ function(e) {
|
|
546
1009
|
return e.ASC = "ASC", e.DESC = "DESC", e;
|
|
547
1010
|
}({});
|
|
548
|
-
function
|
|
1011
|
+
function lt(e) {
|
|
549
1012
|
return {
|
|
550
1013
|
field: e,
|
|
551
1014
|
direction: "ASC"
|
|
552
1015
|
};
|
|
553
1016
|
}
|
|
554
|
-
function
|
|
1017
|
+
function ut(e) {
|
|
555
1018
|
return {
|
|
556
1019
|
field: e,
|
|
557
1020
|
direction: "DESC"
|
|
@@ -559,7 +1022,7 @@ function Be(e) {
|
|
|
559
1022
|
}
|
|
560
1023
|
//#endregion
|
|
561
1024
|
//#region src/query/event/domainEventStream.ts
|
|
562
|
-
var
|
|
1025
|
+
var dt = class e {
|
|
563
1026
|
static {
|
|
564
1027
|
this.HEADER = "header";
|
|
565
1028
|
}
|
|
@@ -608,7 +1071,7 @@ var Ve = class e {
|
|
|
608
1071
|
static {
|
|
609
1072
|
this.CREATE_TIME = "createTime";
|
|
610
1073
|
}
|
|
611
|
-
},
|
|
1074
|
+
}, U = class e {
|
|
612
1075
|
static {
|
|
613
1076
|
this.EVENT_STREAM_RESOURCE_NAME = "event";
|
|
614
1077
|
}
|
|
@@ -621,7 +1084,7 @@ var Ve = class e {
|
|
|
621
1084
|
static {
|
|
622
1085
|
this.PAGED = `${e.EVENT_STREAM_RESOURCE_NAME}/paged`;
|
|
623
1086
|
}
|
|
624
|
-
},
|
|
1087
|
+
}, W = class {
|
|
625
1088
|
constructor(e) {
|
|
626
1089
|
this.apiMetadata = e;
|
|
627
1090
|
}
|
|
@@ -639,7 +1102,7 @@ var Ve = class e {
|
|
|
639
1102
|
}
|
|
640
1103
|
};
|
|
641
1104
|
m([
|
|
642
|
-
u(
|
|
1105
|
+
u(U.COUNT),
|
|
643
1106
|
p(0, o()),
|
|
644
1107
|
p(1, i()),
|
|
645
1108
|
f("design:type", Function),
|
|
@@ -649,8 +1112,8 @@ m([
|
|
|
649
1112
|
typeof AbortController > "u" ? Object : AbortController
|
|
650
1113
|
]),
|
|
651
1114
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
652
|
-
],
|
|
653
|
-
u(
|
|
1115
|
+
], W.prototype, "count", null), m([
|
|
1116
|
+
u(U.LIST),
|
|
654
1117
|
p(0, o()),
|
|
655
1118
|
p(1, i()),
|
|
656
1119
|
f("design:type", Function),
|
|
@@ -660,8 +1123,8 @@ m([
|
|
|
660
1123
|
typeof AbortController > "u" ? Object : AbortController
|
|
661
1124
|
]),
|
|
662
1125
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
663
|
-
],
|
|
664
|
-
u(
|
|
1126
|
+
], W.prototype, "list", null), m([
|
|
1127
|
+
u(U.LIST, {
|
|
665
1128
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
666
1129
|
resultExtractor: n
|
|
667
1130
|
}),
|
|
@@ -674,8 +1137,8 @@ m([
|
|
|
674
1137
|
typeof AbortController > "u" ? Object : AbortController
|
|
675
1138
|
]),
|
|
676
1139
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
677
|
-
],
|
|
678
|
-
u(
|
|
1140
|
+
], W.prototype, "listStream", null), m([
|
|
1141
|
+
u(U.PAGED),
|
|
679
1142
|
p(0, o()),
|
|
680
1143
|
p(1, i()),
|
|
681
1144
|
f("design:type", Function),
|
|
@@ -685,10 +1148,10 @@ m([
|
|
|
685
1148
|
typeof AbortController > "u" ? Object : AbortController
|
|
686
1149
|
]),
|
|
687
1150
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
688
|
-
],
|
|
1151
|
+
], W.prototype, "paged", null), W = m([r(), f("design:paramtypes", [Object])], W);
|
|
689
1152
|
//#endregion
|
|
690
1153
|
//#region src/query/snapshot/snapshot.ts
|
|
691
|
-
var
|
|
1154
|
+
var ft = class {
|
|
692
1155
|
static {
|
|
693
1156
|
this.VERSION = "version";
|
|
694
1157
|
}
|
|
@@ -728,7 +1191,7 @@ var He = class {
|
|
|
728
1191
|
static {
|
|
729
1192
|
this.STATE = "state";
|
|
730
1193
|
}
|
|
731
|
-
},
|
|
1194
|
+
}, G = class e {
|
|
732
1195
|
static {
|
|
733
1196
|
this.SNAPSHOT_RESOURCE_NAME = "snapshot";
|
|
734
1197
|
}
|
|
@@ -753,7 +1216,7 @@ var He = class {
|
|
|
753
1216
|
static {
|
|
754
1217
|
this.SINGLE_STATE = `${e.SINGLE}/state`;
|
|
755
1218
|
}
|
|
756
|
-
},
|
|
1219
|
+
}, K = class {
|
|
757
1220
|
constructor(e) {
|
|
758
1221
|
this.apiMetadata = e;
|
|
759
1222
|
}
|
|
@@ -785,30 +1248,30 @@ var He = class {
|
|
|
785
1248
|
throw a(e, t, n);
|
|
786
1249
|
}
|
|
787
1250
|
getById(e, t, n) {
|
|
788
|
-
let r =
|
|
1251
|
+
let r = B({ condition: S(e) });
|
|
789
1252
|
return this.single(r, t, n);
|
|
790
1253
|
}
|
|
791
1254
|
getStateById(e, t, n) {
|
|
792
|
-
let r =
|
|
1255
|
+
let r = B({ condition: S(e) });
|
|
793
1256
|
return this.singleState(r, t, n);
|
|
794
1257
|
}
|
|
795
1258
|
getByIds(e, t, n) {
|
|
796
|
-
let r =
|
|
797
|
-
condition:
|
|
1259
|
+
let r = V({
|
|
1260
|
+
condition: C(e),
|
|
798
1261
|
limit: e.length
|
|
799
1262
|
});
|
|
800
1263
|
return this.list(r, t, n);
|
|
801
1264
|
}
|
|
802
1265
|
getStateByIds(e, t, n) {
|
|
803
|
-
let r =
|
|
804
|
-
condition:
|
|
1266
|
+
let r = V({
|
|
1267
|
+
condition: C(e),
|
|
805
1268
|
limit: e.length
|
|
806
1269
|
});
|
|
807
1270
|
return this.listState(r, t, n);
|
|
808
1271
|
}
|
|
809
1272
|
};
|
|
810
1273
|
m([
|
|
811
|
-
u(
|
|
1274
|
+
u(G.COUNT),
|
|
812
1275
|
p(0, o()),
|
|
813
1276
|
p(1, i()),
|
|
814
1277
|
f("design:type", Function),
|
|
@@ -818,8 +1281,8 @@ m([
|
|
|
818
1281
|
typeof AbortController > "u" ? Object : AbortController
|
|
819
1282
|
]),
|
|
820
1283
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
821
|
-
],
|
|
822
|
-
u(
|
|
1284
|
+
], K.prototype, "count", null), m([
|
|
1285
|
+
u(G.LIST),
|
|
823
1286
|
p(0, o()),
|
|
824
1287
|
p(1, i()),
|
|
825
1288
|
f("design:type", Function),
|
|
@@ -829,8 +1292,8 @@ m([
|
|
|
829
1292
|
typeof AbortController > "u" ? Object : AbortController
|
|
830
1293
|
]),
|
|
831
1294
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
832
|
-
],
|
|
833
|
-
u(
|
|
1295
|
+
], K.prototype, "list", null), m([
|
|
1296
|
+
u(G.LIST, {
|
|
834
1297
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
835
1298
|
resultExtractor: n
|
|
836
1299
|
}),
|
|
@@ -843,8 +1306,8 @@ m([
|
|
|
843
1306
|
typeof AbortController > "u" ? Object : AbortController
|
|
844
1307
|
]),
|
|
845
1308
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
846
|
-
],
|
|
847
|
-
u(
|
|
1309
|
+
], K.prototype, "listStream", null), m([
|
|
1310
|
+
u(G.LIST_STATE),
|
|
848
1311
|
p(0, o()),
|
|
849
1312
|
p(1, i()),
|
|
850
1313
|
f("design:type", Function),
|
|
@@ -854,8 +1317,8 @@ m([
|
|
|
854
1317
|
typeof AbortController > "u" ? Object : AbortController
|
|
855
1318
|
]),
|
|
856
1319
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
857
|
-
],
|
|
858
|
-
u(
|
|
1320
|
+
], K.prototype, "listState", null), m([
|
|
1321
|
+
u(G.LIST_STATE, {
|
|
859
1322
|
headers: { Accept: e.TEXT_EVENT_STREAM },
|
|
860
1323
|
resultExtractor: n
|
|
861
1324
|
}),
|
|
@@ -868,8 +1331,8 @@ m([
|
|
|
868
1331
|
typeof AbortController > "u" ? Object : AbortController
|
|
869
1332
|
]),
|
|
870
1333
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
871
|
-
],
|
|
872
|
-
u(
|
|
1334
|
+
], K.prototype, "listStateStream", null), m([
|
|
1335
|
+
u(G.PAGED),
|
|
873
1336
|
p(0, o()),
|
|
874
1337
|
p(1, i()),
|
|
875
1338
|
f("design:type", Function),
|
|
@@ -879,8 +1342,8 @@ m([
|
|
|
879
1342
|
typeof AbortController > "u" ? Object : AbortController
|
|
880
1343
|
]),
|
|
881
1344
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
882
|
-
],
|
|
883
|
-
u(
|
|
1345
|
+
], K.prototype, "paged", null), m([
|
|
1346
|
+
u(G.PAGED_STATE),
|
|
884
1347
|
p(0, o()),
|
|
885
1348
|
p(1, i()),
|
|
886
1349
|
f("design:type", Function),
|
|
@@ -890,8 +1353,8 @@ m([
|
|
|
890
1353
|
typeof AbortController > "u" ? Object : AbortController
|
|
891
1354
|
]),
|
|
892
1355
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
893
|
-
],
|
|
894
|
-
u(
|
|
1356
|
+
], K.prototype, "pagedState", null), m([
|
|
1357
|
+
u(G.SINGLE),
|
|
895
1358
|
p(0, o()),
|
|
896
1359
|
p(1, i()),
|
|
897
1360
|
f("design:type", Function),
|
|
@@ -901,8 +1364,8 @@ m([
|
|
|
901
1364
|
typeof AbortController > "u" ? Object : AbortController
|
|
902
1365
|
]),
|
|
903
1366
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
904
|
-
],
|
|
905
|
-
u(
|
|
1367
|
+
], K.prototype, "single", null), m([
|
|
1368
|
+
u(G.SINGLE_STATE),
|
|
906
1369
|
p(0, o()),
|
|
907
1370
|
p(1, i()),
|
|
908
1371
|
f("design:type", Function),
|
|
@@ -912,7 +1375,7 @@ m([
|
|
|
912
1375
|
typeof AbortController > "u" ? Object : AbortController
|
|
913
1376
|
]),
|
|
914
1377
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
915
|
-
],
|
|
1378
|
+
], K.prototype, "singleState", null), m([
|
|
916
1379
|
p(1, i()),
|
|
917
1380
|
f("design:type", Function),
|
|
918
1381
|
f("design:paramtypes", [
|
|
@@ -921,7 +1384,7 @@ m([
|
|
|
921
1384
|
typeof AbortController > "u" ? Object : AbortController
|
|
922
1385
|
]),
|
|
923
1386
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
924
|
-
],
|
|
1387
|
+
], K.prototype, "getById", null), m([
|
|
925
1388
|
p(1, i()),
|
|
926
1389
|
f("design:type", Function),
|
|
927
1390
|
f("design:paramtypes", [
|
|
@@ -930,7 +1393,7 @@ m([
|
|
|
930
1393
|
typeof AbortController > "u" ? Object : AbortController
|
|
931
1394
|
]),
|
|
932
1395
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
933
|
-
],
|
|
1396
|
+
], K.prototype, "getStateById", null), m([
|
|
934
1397
|
p(1, i()),
|
|
935
1398
|
f("design:type", Function),
|
|
936
1399
|
f("design:paramtypes", [
|
|
@@ -939,7 +1402,7 @@ m([
|
|
|
939
1402
|
typeof AbortController > "u" ? Object : AbortController
|
|
940
1403
|
]),
|
|
941
1404
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
942
|
-
],
|
|
1405
|
+
], K.prototype, "getByIds", null), m([
|
|
943
1406
|
p(1, i()),
|
|
944
1407
|
f("design:type", Function),
|
|
945
1408
|
f("design:paramtypes", [
|
|
@@ -948,10 +1411,10 @@ m([
|
|
|
948
1411
|
typeof AbortController > "u" ? Object : AbortController
|
|
949
1412
|
]),
|
|
950
1413
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
951
|
-
],
|
|
1414
|
+
], K.prototype, "getStateByIds", null), K = m([r(), f("design:paramtypes", [Object])], K);
|
|
952
1415
|
//#endregion
|
|
953
1416
|
//#region src/query/state/loadStateAggregateClient.ts
|
|
954
|
-
var
|
|
1417
|
+
var q = class e {
|
|
955
1418
|
static {
|
|
956
1419
|
this.LOAD = "{id}/state";
|
|
957
1420
|
}
|
|
@@ -961,7 +1424,7 @@ var K = class e {
|
|
|
961
1424
|
static {
|
|
962
1425
|
this.LOAD_TIME_BASED = `${e.LOAD}/time/{createTime}`;
|
|
963
1426
|
}
|
|
964
|
-
},
|
|
1427
|
+
}, J = class {
|
|
965
1428
|
constructor(e) {
|
|
966
1429
|
this.apiMetadata = e;
|
|
967
1430
|
}
|
|
@@ -976,7 +1439,7 @@ var K = class e {
|
|
|
976
1439
|
}
|
|
977
1440
|
};
|
|
978
1441
|
m([
|
|
979
|
-
c(
|
|
1442
|
+
c(q.LOAD),
|
|
980
1443
|
p(0, l("id")),
|
|
981
1444
|
p(1, i()),
|
|
982
1445
|
f("design:type", Function),
|
|
@@ -986,8 +1449,8 @@ m([
|
|
|
986
1449
|
typeof AbortController > "u" ? Object : AbortController
|
|
987
1450
|
]),
|
|
988
1451
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
989
|
-
],
|
|
990
|
-
c(
|
|
1452
|
+
], J.prototype, "load", null), m([
|
|
1453
|
+
c(q.LOAD_VERSIONED),
|
|
991
1454
|
p(0, l("id")),
|
|
992
1455
|
p(1, l("version")),
|
|
993
1456
|
p(2, i()),
|
|
@@ -999,8 +1462,8 @@ m([
|
|
|
999
1462
|
typeof AbortController > "u" ? Object : AbortController
|
|
1000
1463
|
]),
|
|
1001
1464
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1002
|
-
],
|
|
1003
|
-
c(
|
|
1465
|
+
], J.prototype, "loadVersioned", null), m([
|
|
1466
|
+
c(q.LOAD_TIME_BASED),
|
|
1004
1467
|
p(0, l("id")),
|
|
1005
1468
|
p(1, l("createTime")),
|
|
1006
1469
|
p(2, i()),
|
|
@@ -1012,10 +1475,10 @@ m([
|
|
|
1012
1475
|
typeof AbortController > "u" ? Object : AbortController
|
|
1013
1476
|
]),
|
|
1014
1477
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1015
|
-
],
|
|
1478
|
+
], J.prototype, "loadTimeBased", null), J = m([r(), f("design:paramtypes", [Object])], J);
|
|
1016
1479
|
//#endregion
|
|
1017
1480
|
//#region src/query/state/loadOwnerStateAggregateClient.ts
|
|
1018
|
-
var
|
|
1481
|
+
var Y = class e {
|
|
1019
1482
|
static {
|
|
1020
1483
|
this.LOAD = "state";
|
|
1021
1484
|
}
|
|
@@ -1025,7 +1488,7 @@ var J = class e {
|
|
|
1025
1488
|
static {
|
|
1026
1489
|
this.LOAD_TIME_BASED = `${e.LOAD}/time/{createTime}`;
|
|
1027
1490
|
}
|
|
1028
|
-
},
|
|
1491
|
+
}, X = class {
|
|
1029
1492
|
constructor(e) {
|
|
1030
1493
|
this.apiMetadata = e;
|
|
1031
1494
|
}
|
|
@@ -1040,13 +1503,13 @@ var J = class e {
|
|
|
1040
1503
|
}
|
|
1041
1504
|
};
|
|
1042
1505
|
m([
|
|
1043
|
-
c(
|
|
1506
|
+
c(Y.LOAD),
|
|
1044
1507
|
p(0, i()),
|
|
1045
1508
|
f("design:type", Function),
|
|
1046
1509
|
f("design:paramtypes", [typeof Record > "u" ? Object : Record, typeof AbortController > "u" ? Object : AbortController]),
|
|
1047
1510
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1048
|
-
],
|
|
1049
|
-
c(
|
|
1511
|
+
], X.prototype, "load", null), m([
|
|
1512
|
+
c(Y.LOAD_VERSIONED),
|
|
1050
1513
|
p(0, l("version")),
|
|
1051
1514
|
p(1, i()),
|
|
1052
1515
|
f("design:type", Function),
|
|
@@ -1056,8 +1519,8 @@ m([
|
|
|
1056
1519
|
typeof AbortController > "u" ? Object : AbortController
|
|
1057
1520
|
]),
|
|
1058
1521
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1059
|
-
],
|
|
1060
|
-
c(
|
|
1522
|
+
], X.prototype, "loadVersioned", null), m([
|
|
1523
|
+
c(Y.LOAD_TIME_BASED),
|
|
1061
1524
|
p(0, l("createTime")),
|
|
1062
1525
|
p(1, i()),
|
|
1063
1526
|
f("design:type", Function),
|
|
@@ -1067,73 +1530,82 @@ m([
|
|
|
1067
1530
|
typeof AbortController > "u" ? Object : AbortController
|
|
1068
1531
|
]),
|
|
1069
1532
|
f("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
1070
|
-
],
|
|
1533
|
+
], X.prototype, "loadTimeBased", null), X = m([r(), f("design:paramtypes", [Object])], X);
|
|
1071
1534
|
//#endregion
|
|
1072
1535
|
//#region src/query/cursorQuery.ts
|
|
1073
|
-
var
|
|
1074
|
-
function
|
|
1075
|
-
return n ===
|
|
1536
|
+
var pt = "~";
|
|
1537
|
+
function mt({ field: e, cursorId: t = "~", direction: n = H.DESC }) {
|
|
1538
|
+
return n === H.ASC ? ge(e, t) : _e(e, t);
|
|
1539
|
+
}
|
|
1540
|
+
function Z({ field: e, cursorId: t = "~", direction: n = H.DESC }) {
|
|
1541
|
+
return n === H.ASC ? F.gt(e, t) : F.lt(e, t);
|
|
1076
1542
|
}
|
|
1077
|
-
function
|
|
1543
|
+
function Q({ field: e, direction: t = H.DESC }) {
|
|
1078
1544
|
return {
|
|
1079
1545
|
field: e,
|
|
1080
1546
|
direction: t
|
|
1081
1547
|
};
|
|
1082
1548
|
}
|
|
1083
|
-
function
|
|
1084
|
-
let t = e.query, n =
|
|
1549
|
+
function ht(e) {
|
|
1550
|
+
let t = e.query, n = Q(e), r = "filter" in t ? t.filter : void 0;
|
|
1551
|
+
if (r !== void 0) return {
|
|
1552
|
+
...t,
|
|
1553
|
+
filter: F.and(Z(e), r),
|
|
1554
|
+
sort: [n]
|
|
1555
|
+
};
|
|
1556
|
+
let i = t;
|
|
1085
1557
|
return {
|
|
1086
1558
|
...t,
|
|
1087
|
-
condition:
|
|
1088
|
-
sort: [
|
|
1559
|
+
condition: x(mt(e), i.condition),
|
|
1560
|
+
sort: [n]
|
|
1089
1561
|
};
|
|
1090
1562
|
}
|
|
1091
1563
|
//#endregion
|
|
1092
1564
|
//#region src/query/queryClients.ts
|
|
1093
|
-
function
|
|
1565
|
+
function $(e) {
|
|
1094
1566
|
let n = t(e.resourceAttribution ?? "", e.aggregateName ?? "");
|
|
1095
1567
|
return e.contextAlias && (n = t(e.contextAlias, n)), {
|
|
1096
1568
|
...e,
|
|
1097
1569
|
basePath: n
|
|
1098
1570
|
};
|
|
1099
1571
|
}
|
|
1100
|
-
var
|
|
1572
|
+
var gt = class {
|
|
1101
1573
|
constructor(e) {
|
|
1102
1574
|
this.defaultOptions = e;
|
|
1103
1575
|
}
|
|
1104
1576
|
createSnapshotQueryClient(e) {
|
|
1105
|
-
let t =
|
|
1577
|
+
let t = $({
|
|
1106
1578
|
...this.defaultOptions,
|
|
1107
1579
|
...e
|
|
1108
1580
|
});
|
|
1109
|
-
return new
|
|
1581
|
+
return new K(t);
|
|
1110
1582
|
}
|
|
1111
1583
|
createLoadStateAggregateClient(e) {
|
|
1112
|
-
let t =
|
|
1584
|
+
let t = $({
|
|
1113
1585
|
...this.defaultOptions,
|
|
1114
1586
|
...e
|
|
1115
1587
|
});
|
|
1116
|
-
return new
|
|
1588
|
+
return new J(t);
|
|
1117
1589
|
}
|
|
1118
1590
|
createOwnerLoadStateAggregateClient(e) {
|
|
1119
|
-
let t =
|
|
1591
|
+
let t = $({
|
|
1120
1592
|
...this.defaultOptions,
|
|
1121
1593
|
...e
|
|
1122
1594
|
});
|
|
1123
|
-
return new
|
|
1595
|
+
return new X(t);
|
|
1124
1596
|
}
|
|
1125
1597
|
createEventStreamQueryClient(e) {
|
|
1126
|
-
let t =
|
|
1598
|
+
let t = $({
|
|
1127
1599
|
...this.defaultOptions,
|
|
1128
1600
|
...e
|
|
1129
1601
|
});
|
|
1130
|
-
return new
|
|
1602
|
+
return new W(t);
|
|
1131
1603
|
}
|
|
1132
|
-
},
|
|
1604
|
+
}, _t = {}, vt = ["*"], yt = /* @__PURE__ */ function(e) {
|
|
1133
1605
|
return e.NONE = "", e.TENANT = "/tenant/{tenantId}", e.OWNER = "/owner/{ownerId}", e.TENANT_OWNER = "/tenant/{tenantId}/owner/{ownerId}", e;
|
|
1134
|
-
}({}),
|
|
1606
|
+
}({}), bt = /* @__PURE__ */ function(e) {
|
|
1135
1607
|
return e.RECOVERABLE = "RECOVERABLE", e.UNKNOWN = "UNKNOWN", e.UNRECOVERABLE = "UNRECOVERABLE", e;
|
|
1136
|
-
}({}),
|
|
1608
|
+
}({}), xt = class e {
|
|
1137
1609
|
static {
|
|
1138
1610
|
this.SUCCEEDED = "Ok";
|
|
1139
1611
|
}
|
|
@@ -1200,14 +1672,14 @@ var Ge = class {
|
|
|
1200
1672
|
static isError(t) {
|
|
1201
1673
|
return !e.isSucceeded(t);
|
|
1202
1674
|
}
|
|
1203
|
-
},
|
|
1675
|
+
}, St = /* @__PURE__ */ function(e) {
|
|
1204
1676
|
return e.COMMAND = "COMMAND", e.ERROR = "ERROR", e.EVENT = "EVENT", e.SOURCING = "SOURCING", e.STATE_EVENT = "STATE_EVENT", e;
|
|
1205
|
-
}({}),
|
|
1677
|
+
}({}), Ct = "", wt = /* @__PURE__ */ function(e) {
|
|
1206
1678
|
return e.MAP = "MAP", e.STRING = "STRING", e;
|
|
1207
1679
|
}({});
|
|
1208
1680
|
//#endregion
|
|
1209
1681
|
//#region src/getPropertyValue.ts
|
|
1210
|
-
function
|
|
1682
|
+
function Tt(e, t, n) {
|
|
1211
1683
|
if (e == null) return n;
|
|
1212
1684
|
let r = Array.isArray(t) ? t : t.split(".").filter(Boolean);
|
|
1213
1685
|
if (r.length === 0) return e;
|
|
@@ -1224,6 +1696,6 @@ function $e(e, t, n) {
|
|
|
1224
1696
|
return i;
|
|
1225
1697
|
}
|
|
1226
1698
|
//#endregion
|
|
1227
|
-
export {
|
|
1699
|
+
export { pt as CURSOR_ID_START, h as CommandClient, ee as CommandHeaders, te as CommandStage, ie as ConditionOptionKey, Ct as DEFAULT_OWNER_ID, I as DEFAULT_PAGINATION, L as DEFAULT_PROJECTION, b as DeletionState, dt as DomainEventStreamMetadataFields, _t as EMPTY_ABAC_TAGS, st as EMPTY_PAGED_LIST, re as EMPTY_VALUE_OPERATORS, xt as ErrorCodes, W as EventStreamQueryClient, U as EventStreamQueryEndpointPaths, Ge as FilterOperator, St as FunctionKind, ne as LOGICAL_OPERATORS, X as LoadOwnerStateAggregateClient, Y as LoadOwnerStateAggregateEndpointPaths, J as LoadStateAggregateClient, q as LoadStateAggregateEndpointPaths, wt as MessageHeaderSqlType, g as Operator, gt as QueryClientFactory, bt as RecoverableType, yt as ResourceAttributionPathSpec, ft as SnapshotMetadataFields, K as SnapshotQueryClient, G as SnapshotQueryEndpointPaths, H as SortDirection, Ke as StringComparison, vt as WILDCARD_ABAC_TAG_VALUES, pe as active, S as aggregateId, C as aggregateIds, w as all, we as allIn, x as and, lt as asc, Fe as beforeToday, Ce as between, be as contains, $ as createQueryApiMetadata, mt as cursorCondition, Z as cursorFilter, ht as cursorQuery, Q as cursorSort, y as dateOptions, R as defaultProjection, fe as deleted, ut as desc, Ue as earlierDays, Oe as elemMatch, De as endsWith, me as eq, Ne as exists, F as filter, Tt as getPropertyValue, ge as gt, ve as gte, se as id, ce as ids, v as ignoreCaseOptions, Me as isFalse, xe as isIn, ke as isNull, je as isTrue, _ as isValidateCondition, Ve as lastMonth, ze as lastWeek, V as listQuery, _e as lt, ye as lte, Ee as match, he as ne, Re as nextWeek, oe as nor, Se as notIn, Ae as notNull, ae as or, ue as ownerId, ct as pagedList, ot as pagedQuery, it as pagination, at as projection, We as raw, He as recentDays, B as singleQuery, de as spaceId, Te as startsWith, le as tenantId, Be as thisMonth, Le as thisWeek, Pe as today, Ie as tomorrow };
|
|
1228
1700
|
|
|
1229
1701
|
//# sourceMappingURL=index.es.js.map
|