@ahoo-wang/fetcher-wow 3.17.1 → 3.18.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/dist/index.es.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { ContentTypeValues as e, combineURLs as t } from "@ahoo-wang/fetcher";
2
2
  import { JsonEventStreamResultExtractor as n } from "@ahoo-wang/fetcher-eventstream";
3
- import { api as r, attribute as i, autoGeneratedError as a, body as o, endpoint as s, get as c, path as l, post as u, request as d } from "@ahoo-wang/fetcher-decorator";
3
+ import { api as r, attribute as i, autoGeneratedError as a, body as o, endpoint as s, get as c, path as l, post as u, request as ee } from "@ahoo-wang/fetcher-decorator";
4
4
  //#region \0@oxc-project+runtime@0.144.0/helpers/esm/decorateMetadata.js
5
- function f(e, t) {
5
+ function d(e, t) {
6
6
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
7
7
  }
8
8
  //#endregion
9
9
  //#region \0@oxc-project+runtime@0.144.0/helpers/esm/decorateParam.js
10
- function p(e, t) {
10
+ function f(e, t) {
11
11
  return function(n, r) {
12
12
  t(n, r, e);
13
13
  };
14
14
  }
15
15
  //#endregion
16
16
  //#region \0@oxc-project+runtime@0.144.0/helpers/esm/decorate.js
17
- function m(e, t, n, r) {
17
+ function p(e, t, n, r) {
18
18
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
19
19
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
20
20
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -22,7 +22,7 @@ function m(e, t, n, r) {
22
22
  }
23
23
  //#endregion
24
24
  //#region src/command/commandClient.ts
25
- var h = class {
25
+ var m = class {
26
26
  constructor(e) {
27
27
  this.apiMetadata = e;
28
28
  }
@@ -33,27 +33,27 @@ var h = class {
33
33
  throw a(e, t);
34
34
  }
35
35
  };
36
- m([
36
+ p([
37
37
  s(),
38
- p(0, d()),
39
- p(1, i()),
40
- f("design:type", Function),
41
- f("design:paramtypes", [Object, typeof Record > "u" ? Object : Record]),
42
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
43
- ], h.prototype, "send", null), m([
38
+ f(0, ee()),
39
+ f(1, i()),
40
+ d("design:type", Function),
41
+ d("design:paramtypes", [Object, typeof Record > "u" ? Object : Record]),
42
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
43
+ ], m.prototype, "send", null), p([
44
44
  s(void 0, void 0, {
45
45
  headers: { Accept: e.TEXT_EVENT_STREAM },
46
46
  resultExtractor: n
47
47
  }),
48
- p(0, d()),
49
- p(1, i()),
50
- f("design:type", Function),
51
- f("design:paramtypes", [Object, typeof Record > "u" ? Object : Record]),
52
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
53
- ], h.prototype, "sendAndWaitStream", null), h = m([r(), f("design:paramtypes", [Object])], h);
48
+ f(0, ee()),
49
+ f(1, i()),
50
+ d("design:type", Function),
51
+ d("design:paramtypes", [Object, typeof Record > "u" ? Object : Record]),
52
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
53
+ ], m.prototype, "sendAndWaitStream", null), m = p([r(), d("design:paramtypes", [Object])], m);
54
54
  //#endregion
55
55
  //#region src/command/commandHeaders.ts
56
- var ee = class e {
56
+ var te = class e {
57
57
  static {
58
58
  this.COMMAND_HEADERS_PREFIX = "Command-";
59
59
  }
@@ -123,15 +123,15 @@ var ee = class e {
123
123
  static {
124
124
  this.COMMAND_HEADER_X_PREFIX = `${e.COMMAND_HEADERS_PREFIX}Header-`;
125
125
  }
126
- }, te = /* @__PURE__ */ function(e) {
126
+ }, ne = /* @__PURE__ */ function(e) {
127
127
  return e.SENT = "SENT", e.PROCESSED = "PROCESSED", e.SNAPSHOT = "SNAPSHOT", e.PROJECTED = "PROJECTED", e.EVENT_HANDLED = "EVENT_HANDLED", e.SAGA_HANDLED = "SAGA_HANDLED", e;
128
- }({}), g = /* @__PURE__ */ function(e) {
128
+ }({}), h = /* @__PURE__ */ function(e) {
129
129
  return e.AND = "AND", e.OR = "OR", e.NOR = "NOR", e.ID = "ID", e.IDS = "IDS", e.AGGREGATE_ID = "AGGREGATE_ID", e.AGGREGATE_IDS = "AGGREGATE_IDS", e.TENANT_ID = "TENANT_ID", e.OWNER_ID = "OWNER_ID", e.SPACE_ID = "SPACE_ID", e.DELETED = "DELETED", e.ALL = "ALL", e.EQ = "EQ", e.NE = "NE", e.GT = "GT", e.LT = "LT", e.GTE = "GTE", e.LTE = "LTE", e.CONTAINS = "CONTAINS", e.IN = "IN", e.NOT_IN = "NOT_IN", e.BETWEEN = "BETWEEN", e.ALL_IN = "ALL_IN", e.STARTS_WITH = "STARTS_WITH", e.ENDS_WITH = "ENDS_WITH", e.ELEM_MATCH = "ELEM_MATCH", e.NULL = "NULL", e.NOT_NULL = "NOT_NULL", e.TRUE = "TRUE", e.FALSE = "FALSE", e.EXISTS = "EXISTS", e.TODAY = "TODAY", e.BEFORE_TODAY = "BEFORE_TODAY", e.TOMORROW = "TOMORROW", e.THIS_WEEK = "THIS_WEEK", e.NEXT_WEEK = "NEXT_WEEK", e.LAST_WEEK = "LAST_WEEK", e.THIS_MONTH = "THIS_MONTH", e.LAST_MONTH = "LAST_MONTH", e.RECENT_DAYS = "RECENT_DAYS", e.EARLIER_DAYS = "EARLIER_DAYS", e.MATCH = "MATCH", e.RAW = "RAW", e;
130
- }({}), ne = /* @__PURE__ */ new Set([
130
+ }({}), re = /* @__PURE__ */ new Set([
131
131
  "AND",
132
132
  "OR",
133
133
  "NOR"
134
- ]), re = /* @__PURE__ */ new Set([
134
+ ]), ie = /* @__PURE__ */ new Set([
135
135
  "NULL",
136
136
  "NOT_NULL",
137
137
  "TRUE",
@@ -147,10 +147,10 @@ var ee = class e {
147
147
  ]);
148
148
  //#endregion
149
149
  //#region src/query/condition.ts
150
- function _(e) {
150
+ function g(e) {
151
151
  return !!e;
152
152
  }
153
- var ie = class {
153
+ var ae = class {
154
154
  static {
155
155
  this.IGNORE_CASE_OPTION_KEY = "ignoreCase";
156
156
  }
@@ -161,333 +161,337 @@ var ie = class {
161
161
  this.DATE_PATTERN_OPTION_KEY = "datePattern";
162
162
  }
163
163
  };
164
- function v(e) {
164
+ function _(e) {
165
165
  if (e !== void 0) return { ignoreCase: e };
166
166
  }
167
- function y(e, t) {
167
+ function v(e, t) {
168
168
  if (e === void 0 && t === void 0) return;
169
169
  let n = {};
170
170
  return e !== void 0 && (n.datePattern = e), t !== void 0 && (n.zoneId = t), n;
171
171
  }
172
- var b = /* @__PURE__ */ function(e) {
172
+ var y = /* @__PURE__ */ function(e) {
173
173
  return e.ACTIVE = "ACTIVE", e.DELETED = "DELETED", e.ALL = "ALL", e;
174
174
  }({});
175
- function x(...e) {
176
- if (e.length === 0) return w();
177
- if (e.length === 1) return _(e[0]) ? e[0] : w();
175
+ function b(...e) {
176
+ if (e.length === 0) return S();
177
+ if (e.length === 1) return g(e[0]) ? e[0] : S();
178
178
  let t = [];
179
179
  return e.forEach((e) => {
180
- e?.operator === g.ALL || !_(e) || (e.operator === g.AND && e.children ? t.push(...e.children) : t.push(e));
181
- }), t.length === 0 ? w() : {
182
- operator: g.AND,
180
+ e?.operator === h.ALL || !g(e) || (e.operator === h.AND && e.children ? t.push(...e.children) : t.push(e));
181
+ }), t.length === 0 ? S() : {
182
+ operator: h.AND,
183
183
  children: t
184
184
  };
185
185
  }
186
- function ae(...e) {
187
- let t = e?.filter((e) => _(e));
188
- return t.length === 0 ? w() : {
189
- operator: g.OR,
186
+ function oe(...e) {
187
+ let t = e?.filter((e) => g(e));
188
+ return t.length === 0 ? S() : {
189
+ operator: h.OR,
190
190
  children: t
191
191
  };
192
192
  }
193
- function oe(...e) {
194
- return e.length === 0 ? w() : {
195
- operator: g.NOR,
193
+ function se(...e) {
194
+ return e.length === 0 ? S() : {
195
+ operator: h.NOR,
196
196
  children: e
197
197
  };
198
198
  }
199
- function se(e) {
199
+ function ce(e) {
200
200
  return {
201
- operator: g.ID,
201
+ operator: h.ID,
202
202
  value: e
203
203
  };
204
204
  }
205
- function ce(e) {
205
+ function le(e) {
206
206
  return {
207
- operator: g.IDS,
207
+ operator: h.IDS,
208
208
  value: e
209
209
  };
210
210
  }
211
- function S(e) {
211
+ function x(e) {
212
212
  return {
213
- operator: g.AGGREGATE_ID,
213
+ operator: h.AGGREGATE_ID,
214
214
  value: e
215
215
  };
216
216
  }
217
- function C(e) {
217
+ function ue(e) {
218
218
  return {
219
- operator: g.AGGREGATE_IDS,
219
+ operator: h.AGGREGATE_IDS,
220
220
  value: e
221
221
  };
222
222
  }
223
- function le(e) {
223
+ function de(e) {
224
224
  return {
225
- operator: g.TENANT_ID,
225
+ operator: h.TENANT_ID,
226
226
  value: e
227
227
  };
228
228
  }
229
- function ue(e) {
229
+ function fe(e) {
230
230
  return {
231
- operator: g.OWNER_ID,
231
+ operator: h.OWNER_ID,
232
232
  value: e
233
233
  };
234
234
  }
235
- function de(e) {
235
+ function pe(e) {
236
236
  return {
237
- operator: g.SPACE_ID,
237
+ operator: h.SPACE_ID,
238
238
  value: e
239
239
  };
240
240
  }
241
- function fe(e) {
241
+ function me(e) {
242
242
  return {
243
- operator: g.DELETED,
243
+ operator: h.DELETED,
244
244
  value: e
245
245
  };
246
246
  }
247
- function pe() {
248
- return fe("ACTIVE");
247
+ function he() {
248
+ return me("ACTIVE");
249
249
  }
250
- function w() {
251
- return { operator: g.ALL };
250
+ function S() {
251
+ return { operator: h.ALL };
252
252
  }
253
- function me(e, t) {
253
+ function ge(e, t) {
254
254
  return {
255
255
  field: e,
256
- operator: g.EQ,
256
+ operator: h.EQ,
257
257
  value: t
258
258
  };
259
259
  }
260
- function he(e, t) {
260
+ function _e(e, t) {
261
261
  return {
262
262
  field: e,
263
- operator: g.NE,
263
+ operator: h.NE,
264
264
  value: t
265
265
  };
266
266
  }
267
- function ge(e, t) {
267
+ function ve(e, t) {
268
268
  return {
269
269
  field: e,
270
- operator: g.GT,
270
+ operator: h.GT,
271
271
  value: t
272
272
  };
273
273
  }
274
- function _e(e, t) {
274
+ function ye(e, t) {
275
275
  return {
276
276
  field: e,
277
- operator: g.LT,
277
+ operator: h.LT,
278
278
  value: t
279
279
  };
280
280
  }
281
- function ve(e, t) {
281
+ function be(e, t) {
282
282
  return {
283
283
  field: e,
284
- operator: g.GTE,
284
+ operator: h.GTE,
285
285
  value: t
286
286
  };
287
287
  }
288
- function ye(e, t) {
288
+ function xe(e, t) {
289
289
  return {
290
290
  field: e,
291
- operator: g.LTE,
291
+ operator: h.LTE,
292
292
  value: t
293
293
  };
294
294
  }
295
- function be(e, t, n) {
296
- let r = v(n);
295
+ function Se(e, t, n) {
296
+ let r = _(n);
297
297
  return {
298
298
  field: e,
299
- operator: g.CONTAINS,
299
+ operator: h.CONTAINS,
300
300
  value: t,
301
301
  options: r
302
302
  };
303
303
  }
304
- function xe(e, ...t) {
304
+ function Ce(e, ...t) {
305
305
  return {
306
306
  field: e,
307
- operator: g.IN,
307
+ operator: h.IN,
308
308
  value: t
309
309
  };
310
310
  }
311
- function Se(e, ...t) {
311
+ function we(e, ...t) {
312
312
  return {
313
313
  field: e,
314
- operator: g.NOT_IN,
314
+ operator: h.NOT_IN,
315
315
  value: t
316
316
  };
317
317
  }
318
- function Ce(e, t, n) {
318
+ function Te(e, t, n) {
319
319
  return {
320
320
  field: e,
321
- operator: g.BETWEEN,
321
+ operator: h.BETWEEN,
322
322
  value: [t, n]
323
323
  };
324
324
  }
325
- function we(e, ...t) {
325
+ function Ee(e, ...t) {
326
326
  return {
327
327
  field: e,
328
- operator: g.ALL_IN,
328
+ operator: h.ALL_IN,
329
329
  value: t
330
330
  };
331
331
  }
332
- function Te(e, t, n) {
333
- let r = v(n);
332
+ function De(e, t, n) {
333
+ let r = _(n);
334
334
  return {
335
335
  field: e,
336
- operator: g.STARTS_WITH,
336
+ operator: h.STARTS_WITH,
337
337
  value: t,
338
338
  options: r
339
339
  };
340
340
  }
341
- function Ee(e, t) {
341
+ function Oe(e, t) {
342
342
  return {
343
343
  field: e,
344
- operator: g.MATCH,
344
+ operator: h.MATCH,
345
345
  value: t
346
346
  };
347
347
  }
348
- function De(e, t, n) {
349
- let r = v(n);
348
+ function ke(e, t, n) {
349
+ let r = _(n);
350
350
  return {
351
351
  field: e,
352
- operator: g.ENDS_WITH,
352
+ operator: h.ENDS_WITH,
353
353
  value: t,
354
354
  options: r
355
355
  };
356
356
  }
357
- function Oe(e, t) {
357
+ function Ae(e, t) {
358
358
  return {
359
359
  field: e,
360
- operator: g.ELEM_MATCH,
360
+ operator: h.ELEM_MATCH,
361
361
  children: [t]
362
362
  };
363
363
  }
364
- function ke(e) {
364
+ function je(e) {
365
365
  return {
366
366
  field: e,
367
- operator: g.NULL
367
+ operator: h.NULL
368
368
  };
369
369
  }
370
- function Ae(e) {
370
+ function Me(e) {
371
371
  return {
372
372
  field: e,
373
- operator: g.NOT_NULL
373
+ operator: h.NOT_NULL
374
374
  };
375
375
  }
376
- function je(e) {
376
+ function Ne(e) {
377
377
  return {
378
378
  field: e,
379
- operator: g.TRUE
379
+ operator: h.TRUE
380
380
  };
381
381
  }
382
- function Me(e) {
382
+ function Pe(e) {
383
383
  return {
384
384
  field: e,
385
- operator: g.FALSE
385
+ operator: h.FALSE
386
386
  };
387
387
  }
388
- function Ne(e, t = !0) {
388
+ function Fe(e, t = !0) {
389
389
  return {
390
390
  field: e,
391
- operator: g.EXISTS,
391
+ operator: h.EXISTS,
392
392
  value: t
393
393
  };
394
394
  }
395
- function Pe(e, t, n) {
396
- let r = y(t, n);
395
+ function Ie(e, t, n) {
396
+ let r = v(t, n);
397
397
  return {
398
398
  field: e,
399
- operator: g.TODAY,
399
+ operator: h.TODAY,
400
400
  options: r
401
401
  };
402
402
  }
403
- function Fe(e, t, n, r) {
404
- let i = y(n, r);
403
+ function Le(e, t, n, r) {
404
+ let i = v(n, r);
405
405
  return {
406
406
  field: e,
407
- operator: g.BEFORE_TODAY,
407
+ operator: h.BEFORE_TODAY,
408
408
  value: t,
409
409
  options: i
410
410
  };
411
411
  }
412
- function Ie(e, t, n) {
413
- let r = y(t, n);
412
+ function Re(e, t, n) {
413
+ let r = v(t, n);
414
414
  return {
415
415
  field: e,
416
- operator: g.TOMORROW,
416
+ operator: h.TOMORROW,
417
417
  options: r
418
418
  };
419
419
  }
420
- function Le(e, t, n) {
421
- let r = y(t, n);
420
+ function ze(e, t, n) {
421
+ let r = v(t, n);
422
422
  return {
423
423
  field: e,
424
- operator: g.THIS_WEEK,
424
+ operator: h.THIS_WEEK,
425
425
  options: r
426
426
  };
427
427
  }
428
- function Re(e, t, n) {
429
- let r = y(t, n);
428
+ function Be(e, t, n) {
429
+ let r = v(t, n);
430
430
  return {
431
431
  field: e,
432
- operator: g.NEXT_WEEK,
432
+ operator: h.NEXT_WEEK,
433
433
  options: r
434
434
  };
435
435
  }
436
- function ze(e, t, n) {
437
- let r = y(t, n);
436
+ function Ve(e, t, n) {
437
+ let r = v(t, n);
438
438
  return {
439
439
  field: e,
440
- operator: g.LAST_WEEK,
440
+ operator: h.LAST_WEEK,
441
441
  options: r
442
442
  };
443
443
  }
444
- function Be(e, t, n) {
445
- let r = y(t, n);
444
+ function He(e, t, n) {
445
+ let r = v(t, n);
446
446
  return {
447
447
  field: e,
448
- operator: g.THIS_MONTH,
448
+ operator: h.THIS_MONTH,
449
449
  options: r
450
450
  };
451
451
  }
452
- function Ve(e, t, n) {
453
- let r = y(t, n);
452
+ function Ue(e, t, n) {
453
+ let r = v(t, n);
454
454
  return {
455
455
  field: e,
456
- operator: g.LAST_MONTH,
456
+ operator: h.LAST_MONTH,
457
457
  options: r
458
458
  };
459
459
  }
460
- function He(e, t, n, r) {
461
- let i = y(n, r);
460
+ function We(e, t, n, r) {
461
+ let i = v(n, r);
462
462
  return {
463
463
  field: e,
464
- operator: g.RECENT_DAYS,
464
+ operator: h.RECENT_DAYS,
465
465
  value: t,
466
466
  options: i
467
467
  };
468
468
  }
469
- function Ue(e, t, n, r) {
470
- let i = y(n, r);
469
+ function Ge(e, t, n, r) {
470
+ let i = v(n, r);
471
471
  return {
472
472
  field: e,
473
- operator: g.EARLIER_DAYS,
473
+ operator: h.EARLIER_DAYS,
474
474
  value: t,
475
475
  options: i
476
476
  };
477
477
  }
478
- function We(e) {
478
+ function Ke(e) {
479
479
  return {
480
- operator: g.RAW,
480
+ operator: h.RAW,
481
481
  value: e
482
482
  };
483
483
  }
484
484
  //#endregion
485
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) {
486
+ var qe = /* @__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.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
+ }({}), Je = /* @__PURE__ */ function(e) {
489
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 = {
490
+ }({}), C = /* @__PURE__ */ function(e) {
491
+ return e.TERMS = "TERMS", e.PHRASE = "PHRASE", e;
492
+ }({}), w = /* @__PURE__ */ function(e) {
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
+ }({}), 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 = {
491
495
  G: 5,
492
496
  u: 19,
493
497
  y: 19,
@@ -535,7 +539,7 @@ var Ge = /* @__PURE__ */ function(e) {
535
539
  g: 19
536
540
  };
537
541
  function T(e) {
538
- if (typeof e != "string" || !Je.test(e)) throw TypeError(`Logical field is invalid: [${String(e)}].`);
542
+ if (typeof e != "string" || !Xe.test(e)) throw TypeError(`Logical field is invalid: [${String(e)}].`);
539
543
  return e;
540
544
  }
541
545
  function E(e, t) {
@@ -556,8 +560,8 @@ function A(e, t) {
556
560
  if (t.length === 0) throw TypeError(`${e} cannot be empty.`);
557
561
  if (t.some((e) => e == null)) throw TypeError(`${e} cannot contain null.`);
558
562
  }
559
- function Qe(e) {
560
- let t = Ye.exec(e);
563
+ function et(e) {
564
+ let t = Ze.exec(e);
561
565
  if (!t) return !1;
562
566
  let n = t[1], [r, i = 0, a = 0] = (n.includes(":") ? n.split(":") : n.length <= 2 ? [n] : [
563
567
  n.slice(0, 2),
@@ -566,24 +570,26 @@ function Qe(e) {
566
570
  ]).map(Number);
567
571
  return i <= 59 && a <= 59 && (r < 18 || r === 18 && i === 0 && a === 0);
568
572
  }
569
- function j({ zoneId: e, datePattern: t }) {
573
+ function j({ zoneId: e, datePattern: t, timeUnit: n = "MILLISECONDS" }) {
570
574
  if (e !== void 0) {
571
575
  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}].`);
576
+ if (Qe.test(e) && !et(e)) throw TypeError(`zoneId is invalid: [${e}].`);
573
577
  }
574
- return t !== void 0 && et(t), {
578
+ if (t !== void 0 && nt(t), !Object.values(w).includes(n)) throw TypeError(`timeUnit is invalid: [${String(n)}].`);
579
+ return {
575
580
  ...e === void 0 ? {} : { zoneId: e },
576
- ...t === void 0 ? {} : { datePattern: t }
581
+ ...t === void 0 ? {} : { datePattern: t },
582
+ timeUnit: n
577
583
  };
578
584
  }
579
- function $e(e, t, n) {
580
- let r = Ze[t];
585
+ function tt(e, t, n) {
586
+ let r = $e[t];
581
587
  if (!(typeof r == "number" ? n <= r : r?.includes(n) === !0)) throw TypeError(`datePattern is invalid: [${e}].`);
582
588
  }
583
589
  function M(e, t) {
584
590
  return e !== void 0 && ("uyDFdhHkKmsSgAnNWwY".includes(e) || e === "c" && t === 1 || "eMLQq".includes(e) && t <= 2);
585
591
  }
586
- function et(e) {
592
+ function nt(e) {
587
593
  if (typeof e != "string" || !e.trim()) throw TypeError("datePattern cannot be blank.");
588
594
  let t = !1, n = 0;
589
595
  for (let r = 0; r < e.length; r++) {
@@ -603,7 +609,7 @@ function et(e) {
603
609
  for (; e[n] === t;) n++;
604
610
  a = n - r;
605
611
  }
606
- if ($e(e, t, a), o && M(t, a)) {
612
+ if (tt(e, t, a), o && M(t, a)) {
607
613
  let t = e[n], r = n;
608
614
  for (; r < e.length && e[r] === t;) r++;
609
615
  if (M(t, r - n)) throw TypeError(`datePattern is invalid: [${e}].`);
@@ -618,10 +624,10 @@ function et(e) {
618
624
  }
619
625
  if (t) throw TypeError(`datePattern is invalid: [${e}].`);
620
626
  }
621
- function N(e, t) {
627
+ function rt(e, t) {
622
628
  if (!Number.isInteger(t) || t < 1 || t > 2147483647) throw TypeError(`${e} days must be a positive JVM Int.`);
623
629
  }
624
- function P(e) {
630
+ function N(e) {
625
631
  switch (e.op) {
626
632
  case "ID":
627
633
  case "IDS":
@@ -635,30 +641,30 @@ function P(e) {
635
641
  case "AND":
636
642
  case "OR":
637
643
  case "NOR":
638
- A(`${e.op} operands`, e.operands), e.operands.forEach(P);
644
+ A(`${e.op} operands`, e.operands), e.operands.forEach(N);
639
645
  break;
640
- case "ELEMENT_MATCH": P(e.predicate);
646
+ case "ELEMENT_MATCH": N(e.predicate);
641
647
  }
642
648
  }
643
- function tt(...e) {
649
+ function it(e) {
644
650
  return A("AND operands", e), {
645
651
  op: "AND",
646
- operands: e
652
+ operands: [...e]
647
653
  };
648
654
  }
649
- function nt(...e) {
655
+ function at(e) {
650
656
  return A("OR operands", e), {
651
657
  op: "OR",
652
- operands: e
658
+ operands: [...e]
653
659
  };
654
660
  }
655
- function rt(...e) {
661
+ function ot(e) {
656
662
  return A("NOR operands", e), {
657
663
  op: "NOR",
658
- operands: e
664
+ operands: [...e]
659
665
  };
660
666
  }
661
- var F = {
667
+ var P = {
662
668
  matchAll() {
663
669
  return { op: "MATCH_ALL" };
664
670
  },
@@ -671,10 +677,10 @@ var F = {
671
677
  value: O("ID value", e)
672
678
  };
673
679
  },
674
- ids(...e) {
680
+ ids(e) {
675
681
  return A("IDS values", e), e.forEach((e) => O("IDS value", e)), {
676
682
  op: "IDS",
677
- values: e
683
+ values: [...e]
678
684
  };
679
685
  },
680
686
  aggregateId(e) {
@@ -683,10 +689,10 @@ var F = {
683
689
  value: O("AGGREGATE_ID value", e)
684
690
  };
685
691
  },
686
- aggregateIds(...e) {
692
+ aggregateIds(e) {
687
693
  return A("AGGREGATE_IDS values", e), e.forEach((e) => O("AGGREGATE_IDS value", e)), {
688
694
  op: "AGGREGATE_IDS",
689
- values: e
695
+ values: [...e]
690
696
  };
691
697
  },
692
698
  tenantId(e) {
@@ -707,9 +713,9 @@ var F = {
707
713
  value: O("SPACE_ID value", e)
708
714
  };
709
715
  },
710
- and: tt,
711
- or: nt,
712
- nor: rt,
716
+ and: it,
717
+ or: at,
718
+ nor: ot,
713
719
  eq(e, t) {
714
720
  return {
715
721
  op: "EQ",
@@ -776,25 +782,25 @@ var F = {
776
782
  stringComparison: n
777
783
  };
778
784
  },
779
- isIn(e, ...t) {
785
+ isIn(e, t) {
780
786
  return A("IN values", t), t.forEach((e) => E(e, !1)), {
781
787
  op: "IN",
782
788
  field: T(e),
783
- values: t
789
+ values: [...t]
784
790
  };
785
791
  },
786
- notIn(e, ...t) {
792
+ notIn(e, t) {
787
793
  return A("NOT_IN values", t), t.forEach((e) => E(e, !1)), {
788
794
  op: "NOT_IN",
789
795
  field: T(e),
790
- values: t
796
+ values: [...t]
791
797
  };
792
798
  },
793
- containsAll(e, ...t) {
799
+ containsAll(e, t) {
794
800
  return A("CONTAINS_ALL values", t), t.forEach((e) => E(e, !1)), {
795
801
  op: "CONTAINS_ALL",
796
802
  field: T(e),
797
- values: t
803
+ values: [...t]
798
804
  };
799
805
  },
800
806
  between(e, t, n) {
@@ -836,25 +842,29 @@ var F = {
836
842
  };
837
843
  },
838
844
  deletion(e) {
839
- if (e !== b.ACTIVE && e !== b.DELETED && e !== b.ALL) throw TypeError(`Deletion state is invalid: [${String(e)}].`);
845
+ if (e !== y.ACTIVE && e !== y.DELETED && e !== y.ALL) throw TypeError(`Deletion state is invalid: [${String(e)}].`);
840
846
  return {
841
847
  op: "DELETION",
842
848
  state: e
843
849
  };
844
850
  },
845
851
  elementMatch(e, t) {
846
- return P(t), {
852
+ return N(t), {
847
853
  op: "ELEMENT_MATCH",
848
854
  field: T(e),
849
855
  predicate: t
850
856
  };
851
857
  },
852
- search(e, ...t) {
858
+ search(e, t) {
853
859
  if (typeof e != "string" || !e.trim()) throw TypeError("SEARCH query cannot be blank.");
860
+ if (t !== void 0 && (typeof t != "object" || !t || Array.isArray(t))) throw TypeError("SEARCH options must be a non-null object.");
861
+ let { fields: n = [], mode: r = "TERMS" } = t ?? {};
862
+ if (!Object.values(C).includes(r)) throw TypeError(`SEARCH mode is invalid: [${String(r)}].`);
854
863
  return {
855
864
  op: "SEARCH",
856
865
  query: e,
857
- fields: t.map(T)
866
+ mode: r,
867
+ fields: n.map(T)
858
868
  };
859
869
  },
860
870
  today(e, t = {}) {
@@ -865,7 +875,7 @@ var F = {
865
875
  };
866
876
  },
867
877
  beforeToday(e, t, n = {}) {
868
- if (typeof t != "string" || !qe.test(t)) throw TypeError("BEFORE_TODAY time is invalid.");
878
+ if (typeof t != "string" || !Ye.test(t)) throw TypeError("BEFORE_TODAY time is invalid.");
869
879
  return {
870
880
  ...j(n),
871
881
  op: "BEFORE_TODAY",
@@ -915,8 +925,43 @@ var F = {
915
925
  field: T(e)
916
926
  };
917
927
  },
928
+ yesterday(e, t = {}) {
929
+ return {
930
+ ...j(t),
931
+ op: "YESTERDAY",
932
+ field: T(e)
933
+ };
934
+ },
935
+ nextMonth(e, t = {}) {
936
+ return {
937
+ ...j(t),
938
+ op: "NEXT_MONTH",
939
+ field: T(e)
940
+ };
941
+ },
942
+ lastYear(e, t = {}) {
943
+ return {
944
+ ...j(t),
945
+ op: "LAST_YEAR",
946
+ field: T(e)
947
+ };
948
+ },
949
+ thisYear(e, t = {}) {
950
+ return {
951
+ ...j(t),
952
+ op: "THIS_YEAR",
953
+ field: T(e)
954
+ };
955
+ },
956
+ nextYear(e, t = {}) {
957
+ return {
958
+ ...j(t),
959
+ op: "NEXT_YEAR",
960
+ field: T(e)
961
+ };
962
+ },
918
963
  recentDays(e, t, n = {}) {
919
- return N("RECENT_DAYS", t), {
964
+ return rt("RECENT_DAYS", t), {
920
965
  ...j(n),
921
966
  op: "RECENT_DAYS",
922
967
  field: T(e),
@@ -924,18 +969,124 @@ var F = {
924
969
  };
925
970
  },
926
971
  earlierDays(e, t, n = {}) {
927
- return N("EARLIER_DAYS", t), {
972
+ return rt("EARLIER_DAYS", t), {
928
973
  ...j(n),
929
974
  op: "EARLIER_DAYS",
930
975
  field: T(e),
931
976
  days: t
932
977
  };
933
978
  }
934
- }, I = {
979
+ }, st = /* @__PURE__ */ function(e) {
980
+ return e.TERMS = "TERMS", e.HISTOGRAM = "HISTOGRAM", e.DATE_HISTOGRAM = "DATE_HISTOGRAM", e;
981
+ }({}), ct = /* @__PURE__ */ function(e) {
982
+ return e.COUNT = "COUNT", e.NUMERIC = "NUMERIC", e.ANY = "ANY", e;
983
+ }({}), lt = /* @__PURE__ */ function(e) {
984
+ return e.FIELD = "FIELD", e.CONSTANT = "CONSTANT", e.BINARY = "BINARY", e;
985
+ }({}), ut = /* @__PURE__ */ function(e) {
986
+ return e.ADD = "ADD", e.SUBTRACT = "SUBTRACT", e.MULTIPLY = "MULTIPLY", e.DIVIDE = "DIVIDE", e;
987
+ }({}), dt = /* @__PURE__ */ function(e) {
988
+ 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;
989
+ }({}), ft = /* @__PURE__ */ function(e) {
990
+ return e.SUM = "SUM", e.AVG = "AVG", e.MIN = "MIN", e.MAX = "MAX", e;
991
+ }({});
992
+ function F(e) {
993
+ return P.exists(e).field;
994
+ }
995
+ function I(e) {
996
+ if (F(e), e.includes(".")) throw TypeError("aggregation alias must contain one segment.");
997
+ if (e.startsWith("__wow")) throw TypeError("aggregation alias must not use the reserved __wow prefix.");
998
+ return e;
999
+ }
1000
+ function L(e, t, n) {
1001
+ return {
1002
+ type: "BINARY",
1003
+ operator: e,
1004
+ left: t,
1005
+ right: n
1006
+ };
1007
+ }
1008
+ function R(e, t, n) {
1009
+ return {
1010
+ type: "NUMERIC",
1011
+ function: e,
1012
+ expression: t,
1013
+ alias: I(n)
1014
+ };
1015
+ }
1016
+ var pt = {
1017
+ element(e, t) {
1018
+ let n = F(e);
1019
+ return t === void 0 ? { path: n } : (P.elementMatch(e, t), {
1020
+ path: n,
1021
+ filter: t
1022
+ });
1023
+ },
1024
+ field(e) {
1025
+ return {
1026
+ type: "FIELD",
1027
+ field: F(e)
1028
+ };
1029
+ },
1030
+ constant(e) {
1031
+ if (!Number.isFinite(e)) throw TypeError("aggregation constant must be finite.");
1032
+ return {
1033
+ type: "CONSTANT",
1034
+ value: e
1035
+ };
1036
+ },
1037
+ add: (e, t) => L("ADD", e, t),
1038
+ subtract: (e, t) => L("SUBTRACT", e, t),
1039
+ multiply: (e, t) => L("MULTIPLY", e, t),
1040
+ divide: (e, t) => L("DIVIDE", e, t),
1041
+ terms(e, t) {
1042
+ return {
1043
+ type: "TERMS",
1044
+ field: F(e),
1045
+ alias: I(t)
1046
+ };
1047
+ },
1048
+ histogram(e, { interval: t, alias: n }) {
1049
+ if (!Number.isFinite(t) || t <= 0) throw TypeError("histogram interval must be finite and greater than 0.");
1050
+ return {
1051
+ type: "HISTOGRAM",
1052
+ field: F(e),
1053
+ interval: t,
1054
+ alias: I(n)
1055
+ };
1056
+ },
1057
+ dateHistogram(e, { unit: t, alias: n, timeZone: r = "UTC" }) {
1058
+ if (!Object.values(dt).includes(t)) throw TypeError("date histogram unit is invalid.");
1059
+ if (typeof r != "string" || !r.trim()) throw TypeError("date histogram timeZone cannot be blank.");
1060
+ return {
1061
+ type: "DATE_HISTOGRAM",
1062
+ field: F(e),
1063
+ unit: t,
1064
+ alias: I(n),
1065
+ timeZone: r
1066
+ };
1067
+ },
1068
+ any(e, t) {
1069
+ return {
1070
+ type: "ANY",
1071
+ field: F(e),
1072
+ alias: I(t)
1073
+ };
1074
+ },
1075
+ count(e) {
1076
+ return {
1077
+ type: "COUNT",
1078
+ alias: I(e)
1079
+ };
1080
+ },
1081
+ sum: (e, t) => R("SUM", e, t),
1082
+ avg: (e, t) => R("AVG", e, t),
1083
+ min: (e, t) => R("MIN", e, t),
1084
+ max: (e, t) => R("MAX", e, t)
1085
+ }, z = {
935
1086
  index: 1,
936
1087
  size: 10
937
1088
  };
938
- function it({ index: e = I.index, size: t = I.size } = I) {
1089
+ function mt({ index: e = z.index, size: t = z.size } = z) {
939
1090
  return {
940
1091
  index: e,
941
1092
  size: t
@@ -943,11 +1094,11 @@ function it({ index: e = I.index, size: t = I.size } = I) {
943
1094
  }
944
1095
  //#endregion
945
1096
  //#region src/query/projection.ts
946
- var L = {};
947
- function R() {
948
- return L;
1097
+ var ht = {};
1098
+ function gt() {
1099
+ return ht;
949
1100
  }
950
- function at({ include: e, exclude: t } = R()) {
1101
+ function _t({ include: e, exclude: t } = gt()) {
951
1102
  return {
952
1103
  include: e,
953
1104
  exclude: t
@@ -955,15 +1106,15 @@ function at({ include: e, exclude: t } = R()) {
955
1106
  }
956
1107
  //#endregion
957
1108
  //#region src/query/queryable.ts
958
- function z({ condition: e, filter: t }) {
1109
+ function B({ condition: e, filter: t }) {
959
1110
  if (t === null) throw TypeError("filter cannot be null.");
960
1111
  if (t !== void 0) return { filter: t };
961
1112
  if (e === null) throw TypeError("condition cannot be null.");
962
- return { condition: e === void 0 ? w() : e };
1113
+ return { condition: e === void 0 ? S() : e };
963
1114
  }
964
- function B({ condition: e, filter: t, projection: n, sort: r } = {}) {
1115
+ function V({ condition: e, filter: t, projection: n, sort: r } = {}) {
965
1116
  return {
966
- ...z({
1117
+ ...B({
967
1118
  condition: e,
968
1119
  filter: t
969
1120
  }),
@@ -971,20 +1122,20 @@ function B({ condition: e, filter: t, projection: n, sort: r } = {}) {
971
1122
  sort: r
972
1123
  };
973
1124
  }
974
- function V({ condition: e, filter: t, projection: n, sort: r, limit: i } = {}) {
1125
+ function H({ condition: e, filter: t, projection: n, sort: r, limit: i } = {}) {
975
1126
  return {
976
- ...z({
1127
+ ...B({
977
1128
  condition: e,
978
1129
  filter: t
979
1130
  }),
980
1131
  projection: n,
981
1132
  sort: r,
982
- limit: i ?? (t === void 0 ? I.size : 0)
1133
+ limit: i ?? (t === void 0 ? z.size : 0)
983
1134
  };
984
1135
  }
985
- function ot({ condition: e, filter: t, projection: n, sort: r, pagination: i = I } = {}) {
1136
+ function vt({ condition: e, filter: t, projection: n, sort: r, pagination: i = z } = {}) {
986
1137
  return {
987
- ...z({
1138
+ ...B({
988
1139
  condition: e,
989
1140
  filter: t
990
1141
  }),
@@ -993,11 +1144,11 @@ function ot({ condition: e, filter: t, projection: n, sort: r, pagination: i = I
993
1144
  pagination: i
994
1145
  };
995
1146
  }
996
- var st = {
1147
+ var yt = {
997
1148
  total: 0,
998
1149
  list: []
999
1150
  };
1000
- function ct({ total: e, list: t = [] } = st) {
1151
+ function bt({ total: e, list: t = [] } = yt) {
1001
1152
  return e === void 0 && (e = t.length), {
1002
1153
  total: e,
1003
1154
  list: t
@@ -1005,16 +1156,16 @@ function ct({ total: e, list: t = [] } = st) {
1005
1156
  }
1006
1157
  //#endregion
1007
1158
  //#region src/query/sort.ts
1008
- var H = /* @__PURE__ */ function(e) {
1159
+ var U = /* @__PURE__ */ function(e) {
1009
1160
  return e.ASC = "ASC", e.DESC = "DESC", e;
1010
1161
  }({});
1011
- function lt(e) {
1162
+ function xt(e) {
1012
1163
  return {
1013
1164
  field: e,
1014
1165
  direction: "ASC"
1015
1166
  };
1016
1167
  }
1017
- function ut(e) {
1168
+ function St(e) {
1018
1169
  return {
1019
1170
  field: e,
1020
1171
  direction: "DESC"
@@ -1022,7 +1173,7 @@ function ut(e) {
1022
1173
  }
1023
1174
  //#endregion
1024
1175
  //#region src/query/event/domainEventStream.ts
1025
- var dt = class e {
1176
+ var Ct = class e {
1026
1177
  static {
1027
1178
  this.HEADER = "header";
1028
1179
  }
@@ -1071,10 +1222,13 @@ var dt = class e {
1071
1222
  static {
1072
1223
  this.CREATE_TIME = "createTime";
1073
1224
  }
1074
- }, U = class e {
1225
+ }, W = class e {
1075
1226
  static {
1076
1227
  this.EVENT_STREAM_RESOURCE_NAME = "event";
1077
1228
  }
1229
+ static {
1230
+ this.AGGREGATION = `${e.EVENT_STREAM_RESOURCE_NAME}/aggregation`;
1231
+ }
1078
1232
  static {
1079
1233
  this.COUNT = `${e.EVENT_STREAM_RESOURCE_NAME}/count`;
1080
1234
  }
@@ -1084,10 +1238,16 @@ var dt = class e {
1084
1238
  static {
1085
1239
  this.PAGED = `${e.EVENT_STREAM_RESOURCE_NAME}/paged`;
1086
1240
  }
1087
- }, W = class {
1241
+ }, G = class {
1088
1242
  constructor(e) {
1089
1243
  this.apiMetadata = e;
1090
1244
  }
1245
+ aggregate(e, t, n) {
1246
+ throw a(e, t, n);
1247
+ }
1248
+ aggregateStream(e, t, n) {
1249
+ throw a(e, t, n);
1250
+ }
1091
1251
  count(e, t, n) {
1092
1252
  throw a(e, t, n);
1093
1253
  }
@@ -1101,57 +1261,82 @@ var dt = class e {
1101
1261
  throw a(e, t, n);
1102
1262
  }
1103
1263
  };
1104
- m([
1105
- u(U.COUNT),
1106
- p(0, o()),
1107
- p(1, i()),
1108
- f("design:type", Function),
1109
- f("design:paramtypes", [
1264
+ p([
1265
+ u(W.AGGREGATION),
1266
+ f(0, o()),
1267
+ f(1, i()),
1268
+ d("design:type", Function),
1269
+ d("design:paramtypes", [
1270
+ Object,
1271
+ typeof Record > "u" ? Object : Record,
1272
+ typeof AbortController > "u" ? Object : AbortController
1273
+ ]),
1274
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1275
+ ], G.prototype, "aggregate", null), p([
1276
+ u(W.AGGREGATION, {
1277
+ headers: { Accept: e.TEXT_EVENT_STREAM },
1278
+ resultExtractor: n
1279
+ }),
1280
+ f(0, o()),
1281
+ f(1, i()),
1282
+ d("design:type", Function),
1283
+ d("design:paramtypes", [
1284
+ Object,
1285
+ typeof Record > "u" ? Object : Record,
1286
+ typeof AbortController > "u" ? Object : AbortController
1287
+ ]),
1288
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1289
+ ], G.prototype, "aggregateStream", null), p([
1290
+ u(W.COUNT),
1291
+ f(0, o()),
1292
+ f(1, i()),
1293
+ d("design:type", Function),
1294
+ d("design:paramtypes", [
1110
1295
  Object,
1111
1296
  typeof Record > "u" ? Object : Record,
1112
1297
  typeof AbortController > "u" ? Object : AbortController
1113
1298
  ]),
1114
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1115
- ], W.prototype, "count", null), m([
1116
- u(U.LIST),
1117
- p(0, o()),
1118
- p(1, i()),
1119
- f("design:type", Function),
1120
- f("design:paramtypes", [
1299
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1300
+ ], G.prototype, "count", null), p([
1301
+ u(W.LIST),
1302
+ f(0, o()),
1303
+ f(1, i()),
1304
+ d("design:type", Function),
1305
+ d("design:paramtypes", [
1121
1306
  Object,
1122
1307
  typeof Record > "u" ? Object : Record,
1123
1308
  typeof AbortController > "u" ? Object : AbortController
1124
1309
  ]),
1125
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1126
- ], W.prototype, "list", null), m([
1127
- u(U.LIST, {
1310
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1311
+ ], G.prototype, "list", null), p([
1312
+ u(W.LIST, {
1128
1313
  headers: { Accept: e.TEXT_EVENT_STREAM },
1129
1314
  resultExtractor: n
1130
1315
  }),
1131
- p(0, o()),
1132
- p(1, i()),
1133
- f("design:type", Function),
1134
- f("design:paramtypes", [
1316
+ f(0, o()),
1317
+ f(1, i()),
1318
+ d("design:type", Function),
1319
+ d("design:paramtypes", [
1135
1320
  Object,
1136
1321
  typeof Record > "u" ? Object : Record,
1137
1322
  typeof AbortController > "u" ? Object : AbortController
1138
1323
  ]),
1139
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1140
- ], W.prototype, "listStream", null), m([
1141
- u(U.PAGED),
1142
- p(0, o()),
1143
- p(1, i()),
1144
- f("design:type", Function),
1145
- f("design:paramtypes", [
1324
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1325
+ ], G.prototype, "listStream", null), p([
1326
+ u(W.PAGED),
1327
+ f(0, o()),
1328
+ f(1, i()),
1329
+ d("design:type", Function),
1330
+ d("design:paramtypes", [
1146
1331
  Object,
1147
1332
  typeof Record > "u" ? Object : Record,
1148
1333
  typeof AbortController > "u" ? Object : AbortController
1149
1334
  ]),
1150
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1151
- ], W.prototype, "paged", null), W = m([r(), f("design:paramtypes", [Object])], W);
1335
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1336
+ ], G.prototype, "paged", null), G = p([r(), d("design:paramtypes", [Object])], G);
1152
1337
  //#endregion
1153
1338
  //#region src/query/snapshot/snapshot.ts
1154
- var ft = class {
1339
+ var wt = class {
1155
1340
  static {
1156
1341
  this.VERSION = "version";
1157
1342
  }
@@ -1191,10 +1376,13 @@ var ft = class {
1191
1376
  static {
1192
1377
  this.STATE = "state";
1193
1378
  }
1194
- }, G = class e {
1379
+ }, K = class e {
1195
1380
  static {
1196
1381
  this.SNAPSHOT_RESOURCE_NAME = "snapshot";
1197
1382
  }
1383
+ static {
1384
+ this.AGGREGATION = `${e.SNAPSHOT_RESOURCE_NAME}/aggregation`;
1385
+ }
1198
1386
  static {
1199
1387
  this.COUNT = `${e.SNAPSHOT_RESOURCE_NAME}/count`;
1200
1388
  }
@@ -1216,10 +1404,16 @@ var ft = class {
1216
1404
  static {
1217
1405
  this.SINGLE_STATE = `${e.SINGLE}/state`;
1218
1406
  }
1219
- }, K = class {
1407
+ }, q = class {
1220
1408
  constructor(e) {
1221
1409
  this.apiMetadata = e;
1222
1410
  }
1411
+ aggregate(e, t, n) {
1412
+ throw a(e, t, n);
1413
+ }
1414
+ aggregateStream(e, t, n) {
1415
+ throw a(e, t, n);
1416
+ }
1223
1417
  count(e, t, n) {
1224
1418
  throw a(e, t, n);
1225
1419
  }
@@ -1248,173 +1442,200 @@ var ft = class {
1248
1442
  throw a(e, t, n);
1249
1443
  }
1250
1444
  getById(e, t, n) {
1251
- let r = B({ condition: S(e) });
1445
+ let r = V({ condition: x(e) });
1252
1446
  return this.single(r, t, n);
1253
1447
  }
1254
1448
  getStateById(e, t, n) {
1255
- let r = B({ condition: S(e) });
1449
+ let r = V({ condition: x(e) });
1256
1450
  return this.singleState(r, t, n);
1257
1451
  }
1258
1452
  getByIds(e, t, n) {
1259
- let r = V({
1260
- condition: C(e),
1453
+ if (e.length === 0) return Promise.resolve([]);
1454
+ let r = H({
1455
+ filter: P.aggregateIds(e),
1261
1456
  limit: e.length
1262
1457
  });
1263
1458
  return this.list(r, t, n);
1264
1459
  }
1265
1460
  getStateByIds(e, t, n) {
1266
- let r = V({
1267
- condition: C(e),
1461
+ if (e.length === 0) return Promise.resolve([]);
1462
+ let r = H({
1463
+ filter: P.aggregateIds(e),
1268
1464
  limit: e.length
1269
1465
  });
1270
1466
  return this.listState(r, t, n);
1271
1467
  }
1272
1468
  };
1273
- m([
1274
- u(G.COUNT),
1275
- p(0, o()),
1276
- p(1, i()),
1277
- f("design:type", Function),
1278
- f("design:paramtypes", [
1469
+ p([
1470
+ u(K.AGGREGATION),
1471
+ f(0, o()),
1472
+ f(1, i()),
1473
+ d("design:type", Function),
1474
+ d("design:paramtypes", [
1475
+ Object,
1476
+ typeof Record > "u" ? Object : Record,
1477
+ typeof AbortController > "u" ? Object : AbortController
1478
+ ]),
1479
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1480
+ ], q.prototype, "aggregate", null), p([
1481
+ u(K.AGGREGATION, {
1482
+ headers: { Accept: e.TEXT_EVENT_STREAM },
1483
+ resultExtractor: n
1484
+ }),
1485
+ f(0, o()),
1486
+ f(1, i()),
1487
+ d("design:type", Function),
1488
+ d("design:paramtypes", [
1489
+ Object,
1490
+ typeof Record > "u" ? Object : Record,
1491
+ typeof AbortController > "u" ? Object : AbortController
1492
+ ]),
1493
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1494
+ ], q.prototype, "aggregateStream", null), p([
1495
+ u(K.COUNT),
1496
+ f(0, o()),
1497
+ f(1, i()),
1498
+ d("design:type", Function),
1499
+ d("design:paramtypes", [
1279
1500
  Object,
1280
1501
  typeof Record > "u" ? Object : Record,
1281
1502
  typeof AbortController > "u" ? Object : AbortController
1282
1503
  ]),
1283
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1284
- ], K.prototype, "count", null), m([
1285
- u(G.LIST),
1286
- p(0, o()),
1287
- p(1, i()),
1288
- f("design:type", Function),
1289
- f("design:paramtypes", [
1504
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1505
+ ], q.prototype, "count", null), p([
1506
+ u(K.LIST),
1507
+ f(0, o()),
1508
+ f(1, i()),
1509
+ d("design:type", Function),
1510
+ d("design:paramtypes", [
1290
1511
  Object,
1291
1512
  typeof Record > "u" ? Object : Record,
1292
1513
  typeof AbortController > "u" ? Object : AbortController
1293
1514
  ]),
1294
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1295
- ], K.prototype, "list", null), m([
1296
- u(G.LIST, {
1515
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1516
+ ], q.prototype, "list", null), p([
1517
+ u(K.LIST, {
1297
1518
  headers: { Accept: e.TEXT_EVENT_STREAM },
1298
1519
  resultExtractor: n
1299
1520
  }),
1300
- p(0, o()),
1301
- p(1, i()),
1302
- f("design:type", Function),
1303
- f("design:paramtypes", [
1521
+ f(0, o()),
1522
+ f(1, i()),
1523
+ d("design:type", Function),
1524
+ d("design:paramtypes", [
1304
1525
  Object,
1305
1526
  typeof Record > "u" ? Object : Record,
1306
1527
  typeof AbortController > "u" ? Object : AbortController
1307
1528
  ]),
1308
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1309
- ], K.prototype, "listStream", null), m([
1310
- u(G.LIST_STATE),
1311
- p(0, o()),
1312
- p(1, i()),
1313
- f("design:type", Function),
1314
- f("design:paramtypes", [
1529
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1530
+ ], q.prototype, "listStream", null), p([
1531
+ u(K.LIST_STATE),
1532
+ f(0, o()),
1533
+ f(1, i()),
1534
+ d("design:type", Function),
1535
+ d("design:paramtypes", [
1315
1536
  Object,
1316
1537
  typeof Record > "u" ? Object : Record,
1317
1538
  typeof AbortController > "u" ? Object : AbortController
1318
1539
  ]),
1319
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1320
- ], K.prototype, "listState", null), m([
1321
- u(G.LIST_STATE, {
1540
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1541
+ ], q.prototype, "listState", null), p([
1542
+ u(K.LIST_STATE, {
1322
1543
  headers: { Accept: e.TEXT_EVENT_STREAM },
1323
1544
  resultExtractor: n
1324
1545
  }),
1325
- p(0, o()),
1326
- p(1, i()),
1327
- f("design:type", Function),
1328
- f("design:paramtypes", [
1546
+ f(0, o()),
1547
+ f(1, i()),
1548
+ d("design:type", Function),
1549
+ d("design:paramtypes", [
1329
1550
  Object,
1330
1551
  typeof Record > "u" ? Object : Record,
1331
1552
  typeof AbortController > "u" ? Object : AbortController
1332
1553
  ]),
1333
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1334
- ], K.prototype, "listStateStream", null), m([
1335
- u(G.PAGED),
1336
- p(0, o()),
1337
- p(1, i()),
1338
- f("design:type", Function),
1339
- f("design:paramtypes", [
1554
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1555
+ ], q.prototype, "listStateStream", null), p([
1556
+ u(K.PAGED),
1557
+ f(0, o()),
1558
+ f(1, i()),
1559
+ d("design:type", Function),
1560
+ d("design:paramtypes", [
1340
1561
  Object,
1341
1562
  typeof Record > "u" ? Object : Record,
1342
1563
  typeof AbortController > "u" ? Object : AbortController
1343
1564
  ]),
1344
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1345
- ], K.prototype, "paged", null), m([
1346
- u(G.PAGED_STATE),
1347
- p(0, o()),
1348
- p(1, i()),
1349
- f("design:type", Function),
1350
- f("design:paramtypes", [
1565
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1566
+ ], q.prototype, "paged", null), p([
1567
+ u(K.PAGED_STATE),
1568
+ f(0, o()),
1569
+ f(1, i()),
1570
+ d("design:type", Function),
1571
+ d("design:paramtypes", [
1351
1572
  Object,
1352
1573
  typeof Record > "u" ? Object : Record,
1353
1574
  typeof AbortController > "u" ? Object : AbortController
1354
1575
  ]),
1355
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1356
- ], K.prototype, "pagedState", null), m([
1357
- u(G.SINGLE),
1358
- p(0, o()),
1359
- p(1, i()),
1360
- f("design:type", Function),
1361
- f("design:paramtypes", [
1576
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1577
+ ], q.prototype, "pagedState", null), p([
1578
+ u(K.SINGLE),
1579
+ f(0, o()),
1580
+ f(1, i()),
1581
+ d("design:type", Function),
1582
+ d("design:paramtypes", [
1362
1583
  Object,
1363
1584
  typeof Record > "u" ? Object : Record,
1364
1585
  typeof AbortController > "u" ? Object : AbortController
1365
1586
  ]),
1366
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1367
- ], K.prototype, "single", null), m([
1368
- u(G.SINGLE_STATE),
1369
- p(0, o()),
1370
- p(1, i()),
1371
- f("design:type", Function),
1372
- f("design:paramtypes", [
1587
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1588
+ ], q.prototype, "single", null), p([
1589
+ u(K.SINGLE_STATE),
1590
+ f(0, o()),
1591
+ f(1, i()),
1592
+ d("design:type", Function),
1593
+ d("design:paramtypes", [
1373
1594
  Object,
1374
1595
  typeof Record > "u" ? Object : Record,
1375
1596
  typeof AbortController > "u" ? Object : AbortController
1376
1597
  ]),
1377
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1378
- ], K.prototype, "singleState", null), m([
1379
- p(1, i()),
1380
- f("design:type", Function),
1381
- f("design:paramtypes", [
1598
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1599
+ ], q.prototype, "singleState", null), p([
1600
+ f(1, i()),
1601
+ d("design:type", Function),
1602
+ d("design:paramtypes", [
1382
1603
  String,
1383
1604
  typeof Record > "u" ? Object : Record,
1384
1605
  typeof AbortController > "u" ? Object : AbortController
1385
1606
  ]),
1386
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1387
- ], K.prototype, "getById", null), m([
1388
- p(1, i()),
1389
- f("design:type", Function),
1390
- f("design:paramtypes", [
1607
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1608
+ ], q.prototype, "getById", null), p([
1609
+ f(1, i()),
1610
+ d("design:type", Function),
1611
+ d("design:paramtypes", [
1391
1612
  String,
1392
1613
  typeof Record > "u" ? Object : Record,
1393
1614
  typeof AbortController > "u" ? Object : AbortController
1394
1615
  ]),
1395
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1396
- ], K.prototype, "getStateById", null), m([
1397
- p(1, i()),
1398
- f("design:type", Function),
1399
- f("design:paramtypes", [
1616
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1617
+ ], q.prototype, "getStateById", null), p([
1618
+ f(1, i()),
1619
+ d("design:type", Function),
1620
+ d("design:paramtypes", [
1400
1621
  Array,
1401
1622
  typeof Record > "u" ? Object : Record,
1402
1623
  typeof AbortController > "u" ? Object : AbortController
1403
1624
  ]),
1404
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1405
- ], K.prototype, "getByIds", null), m([
1406
- p(1, i()),
1407
- f("design:type", Function),
1408
- f("design:paramtypes", [
1625
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1626
+ ], q.prototype, "getByIds", null), p([
1627
+ f(1, i()),
1628
+ d("design:type", Function),
1629
+ d("design:paramtypes", [
1409
1630
  Array,
1410
1631
  typeof Record > "u" ? Object : Record,
1411
1632
  typeof AbortController > "u" ? Object : AbortController
1412
1633
  ]),
1413
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1414
- ], K.prototype, "getStateByIds", null), K = m([r(), f("design:paramtypes", [Object])], K);
1634
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1635
+ ], q.prototype, "getStateByIds", null), q = p([r(), d("design:paramtypes", [Object])], q);
1415
1636
  //#endregion
1416
1637
  //#region src/query/state/loadStateAggregateClient.ts
1417
- var q = class e {
1638
+ var J = class e {
1418
1639
  static {
1419
1640
  this.LOAD = "{id}/state";
1420
1641
  }
@@ -1424,7 +1645,7 @@ var q = class e {
1424
1645
  static {
1425
1646
  this.LOAD_TIME_BASED = `${e.LOAD}/time/{createTime}`;
1426
1647
  }
1427
- }, J = class {
1648
+ }, Y = class {
1428
1649
  constructor(e) {
1429
1650
  this.apiMetadata = e;
1430
1651
  }
@@ -1438,47 +1659,47 @@ var q = class e {
1438
1659
  throw a(e, t, n, r);
1439
1660
  }
1440
1661
  };
1441
- m([
1442
- c(q.LOAD),
1443
- p(0, l("id")),
1444
- p(1, i()),
1445
- f("design:type", Function),
1446
- f("design:paramtypes", [
1662
+ p([
1663
+ c(J.LOAD),
1664
+ f(0, l("id")),
1665
+ f(1, i()),
1666
+ d("design:type", Function),
1667
+ d("design:paramtypes", [
1447
1668
  String,
1448
1669
  typeof Record > "u" ? Object : Record,
1449
1670
  typeof AbortController > "u" ? Object : AbortController
1450
1671
  ]),
1451
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1452
- ], J.prototype, "load", null), m([
1453
- c(q.LOAD_VERSIONED),
1454
- p(0, l("id")),
1455
- p(1, l("version")),
1456
- p(2, i()),
1457
- f("design:type", Function),
1458
- f("design:paramtypes", [
1672
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1673
+ ], Y.prototype, "load", null), p([
1674
+ c(J.LOAD_VERSIONED),
1675
+ f(0, l("id")),
1676
+ f(1, l("version")),
1677
+ f(2, i()),
1678
+ d("design:type", Function),
1679
+ d("design:paramtypes", [
1459
1680
  String,
1460
1681
  Number,
1461
1682
  typeof Record > "u" ? Object : Record,
1462
1683
  typeof AbortController > "u" ? Object : AbortController
1463
1684
  ]),
1464
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1465
- ], J.prototype, "loadVersioned", null), m([
1466
- c(q.LOAD_TIME_BASED),
1467
- p(0, l("id")),
1468
- p(1, l("createTime")),
1469
- p(2, i()),
1470
- f("design:type", Function),
1471
- f("design:paramtypes", [
1685
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1686
+ ], Y.prototype, "loadVersioned", null), p([
1687
+ c(J.LOAD_TIME_BASED),
1688
+ f(0, l("id")),
1689
+ f(1, l("createTime")),
1690
+ f(2, i()),
1691
+ d("design:type", Function),
1692
+ d("design:paramtypes", [
1472
1693
  String,
1473
1694
  Number,
1474
1695
  typeof Record > "u" ? Object : Record,
1475
1696
  typeof AbortController > "u" ? Object : AbortController
1476
1697
  ]),
1477
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1478
- ], J.prototype, "loadTimeBased", null), J = m([r(), f("design:paramtypes", [Object])], J);
1698
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1699
+ ], Y.prototype, "loadTimeBased", null), Y = p([r(), d("design:paramtypes", [Object])], Y);
1479
1700
  //#endregion
1480
1701
  //#region src/query/state/loadOwnerStateAggregateClient.ts
1481
- var Y = class e {
1702
+ var X = class e {
1482
1703
  static {
1483
1704
  this.LOAD = "state";
1484
1705
  }
@@ -1488,7 +1709,7 @@ var Y = class e {
1488
1709
  static {
1489
1710
  this.LOAD_TIME_BASED = `${e.LOAD}/time/{createTime}`;
1490
1711
  }
1491
- }, X = class {
1712
+ }, Z = class {
1492
1713
  constructor(e) {
1493
1714
  this.apiMetadata = e;
1494
1715
  }
@@ -1502,61 +1723,61 @@ var Y = class e {
1502
1723
  throw a(e, t, n);
1503
1724
  }
1504
1725
  };
1505
- m([
1506
- c(Y.LOAD),
1507
- p(0, i()),
1508
- f("design:type", Function),
1509
- f("design:paramtypes", [typeof Record > "u" ? Object : Record, typeof AbortController > "u" ? Object : AbortController]),
1510
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1511
- ], X.prototype, "load", null), m([
1512
- c(Y.LOAD_VERSIONED),
1513
- p(0, l("version")),
1514
- p(1, i()),
1515
- f("design:type", Function),
1516
- f("design:paramtypes", [
1726
+ p([
1727
+ c(X.LOAD),
1728
+ f(0, i()),
1729
+ d("design:type", Function),
1730
+ d("design:paramtypes", [typeof Record > "u" ? Object : Record, typeof AbortController > "u" ? Object : AbortController]),
1731
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1732
+ ], Z.prototype, "load", null), p([
1733
+ c(X.LOAD_VERSIONED),
1734
+ f(0, l("version")),
1735
+ f(1, i()),
1736
+ d("design:type", Function),
1737
+ d("design:paramtypes", [
1517
1738
  Number,
1518
1739
  typeof Record > "u" ? Object : Record,
1519
1740
  typeof AbortController > "u" ? Object : AbortController
1520
1741
  ]),
1521
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1522
- ], X.prototype, "loadVersioned", null), m([
1523
- c(Y.LOAD_TIME_BASED),
1524
- p(0, l("createTime")),
1525
- p(1, i()),
1526
- f("design:type", Function),
1527
- f("design:paramtypes", [
1742
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1743
+ ], Z.prototype, "loadVersioned", null), p([
1744
+ c(X.LOAD_TIME_BASED),
1745
+ f(0, l("createTime")),
1746
+ f(1, i()),
1747
+ d("design:type", Function),
1748
+ d("design:paramtypes", [
1528
1749
  Number,
1529
1750
  typeof Record > "u" ? Object : Record,
1530
1751
  typeof AbortController > "u" ? Object : AbortController
1531
1752
  ]),
1532
- f("design:returntype", typeof Promise > "u" ? Object : Promise)
1533
- ], X.prototype, "loadTimeBased", null), X = m([r(), f("design:paramtypes", [Object])], X);
1753
+ d("design:returntype", typeof Promise > "u" ? Object : Promise)
1754
+ ], Z.prototype, "loadTimeBased", null), Z = p([r(), d("design:paramtypes", [Object])], Z);
1534
1755
  //#endregion
1535
1756
  //#region src/query/cursorQuery.ts
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);
1757
+ var Tt = "~";
1758
+ function Et({ field: e, cursorId: t = "~", direction: n = U.DESC }) {
1759
+ return n === U.ASC ? ve(e, t) : ye(e, t);
1539
1760
  }
1540
- function Z({ field: e, cursorId: t = "~", direction: n = H.DESC }) {
1541
- return n === H.ASC ? F.gt(e, t) : F.lt(e, t);
1761
+ function Dt({ field: e, cursorId: t = "~", direction: n = U.DESC }) {
1762
+ return n === U.ASC ? P.gt(e, t) : P.lt(e, t);
1542
1763
  }
1543
- function Q({ field: e, direction: t = H.DESC }) {
1764
+ function Q({ field: e, direction: t = U.DESC }) {
1544
1765
  return {
1545
1766
  field: e,
1546
1767
  direction: t
1547
1768
  };
1548
1769
  }
1549
- function ht(e) {
1770
+ function Ot(e) {
1550
1771
  let t = e.query, n = Q(e), r = "filter" in t ? t.filter : void 0;
1551
1772
  if (r !== void 0) return {
1552
1773
  ...t,
1553
- filter: F.and(Z(e), r),
1774
+ filter: P.and([Dt(e), r]),
1554
1775
  sort: [n]
1555
1776
  };
1556
1777
  let i = t;
1557
1778
  return {
1558
1779
  ...t,
1559
- condition: x(mt(e), i.condition),
1780
+ condition: b(Et(e), i.condition),
1560
1781
  sort: [n]
1561
1782
  };
1562
1783
  }
@@ -1569,7 +1790,7 @@ function $(e) {
1569
1790
  basePath: n
1570
1791
  };
1571
1792
  }
1572
- var gt = class {
1793
+ var kt = class {
1573
1794
  constructor(e) {
1574
1795
  this.defaultOptions = e;
1575
1796
  }
@@ -1578,34 +1799,34 @@ var gt = class {
1578
1799
  ...this.defaultOptions,
1579
1800
  ...e
1580
1801
  });
1581
- return new K(t);
1802
+ return new q(t);
1582
1803
  }
1583
1804
  createLoadStateAggregateClient(e) {
1584
1805
  let t = $({
1585
1806
  ...this.defaultOptions,
1586
1807
  ...e
1587
1808
  });
1588
- return new J(t);
1809
+ return new Y(t);
1589
1810
  }
1590
1811
  createOwnerLoadStateAggregateClient(e) {
1591
1812
  let t = $({
1592
1813
  ...this.defaultOptions,
1593
1814
  ...e
1594
1815
  });
1595
- return new X(t);
1816
+ return new Z(t);
1596
1817
  }
1597
1818
  createEventStreamQueryClient(e) {
1598
1819
  let t = $({
1599
1820
  ...this.defaultOptions,
1600
1821
  ...e
1601
1822
  });
1602
- return new W(t);
1823
+ return new G(t);
1603
1824
  }
1604
- }, _t = {}, vt = ["*"], yt = /* @__PURE__ */ function(e) {
1825
+ }, At = {}, jt = ["*"], Mt = /* @__PURE__ */ function(e) {
1605
1826
  return e.NONE = "", e.TENANT = "/tenant/{tenantId}", e.OWNER = "/owner/{ownerId}", e.TENANT_OWNER = "/tenant/{tenantId}/owner/{ownerId}", e;
1606
- }({}), bt = /* @__PURE__ */ function(e) {
1827
+ }({}), Nt = /* @__PURE__ */ function(e) {
1607
1828
  return e.RECOVERABLE = "RECOVERABLE", e.UNKNOWN = "UNKNOWN", e.UNRECOVERABLE = "UNRECOVERABLE", e;
1608
- }({}), xt = class e {
1829
+ }({}), Pt = class e {
1609
1830
  static {
1610
1831
  this.SUCCEEDED = "Ok";
1611
1832
  }
@@ -1672,14 +1893,14 @@ var gt = class {
1672
1893
  static isError(t) {
1673
1894
  return !e.isSucceeded(t);
1674
1895
  }
1675
- }, St = /* @__PURE__ */ function(e) {
1896
+ }, Ft = /* @__PURE__ */ function(e) {
1676
1897
  return e.COMMAND = "COMMAND", e.ERROR = "ERROR", e.EVENT = "EVENT", e.SOURCING = "SOURCING", e.STATE_EVENT = "STATE_EVENT", e;
1677
- }({}), Ct = "", wt = /* @__PURE__ */ function(e) {
1898
+ }({}), It = "", Lt = /* @__PURE__ */ function(e) {
1678
1899
  return e.MAP = "MAP", e.STRING = "STRING", e;
1679
1900
  }({});
1680
1901
  //#endregion
1681
1902
  //#region src/getPropertyValue.ts
1682
- function Tt(e, t, n) {
1903
+ function Rt(e, t, n) {
1683
1904
  if (e == null) return n;
1684
1905
  let r = Array.isArray(t) ? t : t.split(".").filter(Boolean);
1685
1906
  if (r.length === 0) return e;
@@ -1696,6 +1917,6 @@ function Tt(e, t, n) {
1696
1917
  return i;
1697
1918
  }
1698
1919
  //#endregion
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 };
1920
+ export { dt as AggregationDateUnit, ut as AggregationExpressionOperator, lt as AggregationExpressionType, ft as AggregationFunction, st as AggregationGroupType, ct as AggregationMetricType, Tt as CURSOR_ID_START, m as CommandClient, te as CommandHeaders, ne as CommandStage, ae as ConditionOptionKey, It as DEFAULT_OWNER_ID, z as DEFAULT_PAGINATION, ht as DEFAULT_PROJECTION, y as DeletionState, Ct as DomainEventStreamMetadataFields, At as EMPTY_ABAC_TAGS, yt as EMPTY_PAGED_LIST, ie as EMPTY_VALUE_OPERATORS, Pt as ErrorCodes, G as EventStreamQueryClient, W as EventStreamQueryEndpointPaths, qe as FilterOperator, Ft as FunctionKind, re as LOGICAL_OPERATORS, Z as LoadOwnerStateAggregateClient, X as LoadOwnerStateAggregateEndpointPaths, Y as LoadStateAggregateClient, J as LoadStateAggregateEndpointPaths, Lt as MessageHeaderSqlType, h as Operator, kt as QueryClientFactory, Nt as RecoverableType, Mt as ResourceAttributionPathSpec, C as SearchMode, wt as SnapshotMetadataFields, q as SnapshotQueryClient, K as SnapshotQueryEndpointPaths, U as SortDirection, Je as StringComparison, w as TimeUnit, jt as WILDCARD_ABAC_TAG_VALUES, he as active, x as aggregateId, ue as aggregateIds, pt as aggregation, S as all, Ee as allIn, b as and, xt as asc, Le as beforeToday, Te as between, Se as contains, $ as createQueryApiMetadata, Et as cursorCondition, Dt as cursorFilter, Ot as cursorQuery, Q as cursorSort, v as dateOptions, gt as defaultProjection, me as deleted, St as desc, Ge as earlierDays, Ae as elemMatch, ke as endsWith, ge as eq, Fe as exists, P as filter, Rt as getPropertyValue, ve as gt, be as gte, ce as id, le as ids, _ as ignoreCaseOptions, Pe as isFalse, Ce as isIn, je as isNull, Ne as isTrue, g as isValidateCondition, Ue as lastMonth, Ve as lastWeek, H 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, bt as pagedList, vt as pagedQuery, mt as pagination, _t as projection, Ke as raw, We as recentDays, V as singleQuery, pe as spaceId, De as startsWith, de as tenantId, He as thisMonth, ze as thisWeek, Ie as today, Re as tomorrow };
1700
1921
 
1701
1922
  //# sourceMappingURL=index.es.js.map