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