@dynatrace-sdk/client-query 1.0.0 → 1.0.5
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/CHANGELOG.md +37 -0
- package/cjs/index.js +1639 -181
- package/docs/DOCS.md +31 -225
- package/dynatrace-metadata.json +5 -2
- package/esm/index.js +1639 -181
- package/package.json +2 -2
- package/types/packages/client/query/src/lib/apis/query-execution-api.d.ts +27 -221
- package/types/packages/client/query/src/lib/models/autocomplete-request.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/autocomplete-response.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/autocomplete-suggestion-part.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/autocomplete-suggestion.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/dql-alternative-node.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/dql-container-node.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/dql-node.d.ts +6 -5
- package/types/packages/client/query/src/lib/models/dql-terminal-node.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/error-envelope.d.ts +5 -3
- package/types/packages/client/query/src/lib/models/error-response-details.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/error-response.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/execute-request.d.ts +5 -3
- package/types/packages/client/query/src/lib/models/field-type.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/geo-point.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/grail-metadata.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/metadata-notification.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/metadata.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/metric-metadata.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/parse-request.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/position-info.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/query-poll-response.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/query-result.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/query-start-response.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/ranged-field-types-mappings.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/ranged-field-types.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/result-record-value.d.ts +17 -2
- package/types/packages/client/query/src/lib/models/result-record.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/timeframe.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/token-position.d.ts +5 -3
- package/types/packages/client/query/src/lib/models/verify-request.d.ts +4 -2
- package/types/packages/client/query/src/lib/models/verify-response.d.ts +4 -2
- package/types/packages/http-client/src/lib/platform/http-client-response-error-serializer.d.ts +2 -0
- package/types/packages/platform/error-handlers/src/lib/types/http-serialized-error.d.ts +1 -0
package/cjs/index.js
CHANGED
|
@@ -150,7 +150,8 @@ var apiClientErrorSerializer = async (error) => {
|
|
|
150
150
|
status,
|
|
151
151
|
message,
|
|
152
152
|
stack: error.stack,
|
|
153
|
-
type: "Http Error" /* HTTP
|
|
153
|
+
type: "Http Error" /* HTTP */,
|
|
154
|
+
body: error.body
|
|
154
155
|
};
|
|
155
156
|
} else if (isApiClientError(error)) {
|
|
156
157
|
return {
|
|
@@ -188,8 +189,48 @@ var InvalidResponseError = class extends ApiClientError {
|
|
|
188
189
|
// packages/client/query/src/lib/models/autocomplete-request.ts
|
|
189
190
|
var _AutocompleteRequestTransformation;
|
|
190
191
|
((_AutocompleteRequestTransformation2) => {
|
|
191
|
-
function
|
|
192
|
-
|
|
192
|
+
function isAutocompleteRequest(value) {
|
|
193
|
+
if (value === null) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
if (value === void 0) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
if (Array.isArray(value)) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale"]);
|
|
203
|
+
const hasAdditionalProperties = false;
|
|
204
|
+
const requiredKeys = ["query"];
|
|
205
|
+
const optionalKeys = ["cursorPosition", "timezone", "locale"];
|
|
206
|
+
const valKeys = new Set(Object.keys(value));
|
|
207
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
208
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
209
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
210
|
+
}
|
|
211
|
+
_AutocompleteRequestTransformation2.isAutocompleteRequest = isAutocompleteRequest;
|
|
212
|
+
function isJson(value) {
|
|
213
|
+
if (value === null) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
if (value === void 0) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
if (Array.isArray(value)) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale"]);
|
|
223
|
+
const hasAdditionalProperties = false;
|
|
224
|
+
const requiredKeys = ["query"];
|
|
225
|
+
const optionalKeys = ["cursorPosition", "timezone", "locale"];
|
|
226
|
+
const valKeys = new Set(Object.keys(value));
|
|
227
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
228
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
229
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
230
|
+
}
|
|
231
|
+
_AutocompleteRequestTransformation2.isJson = isJson;
|
|
232
|
+
function fromJson($model) {
|
|
233
|
+
const { query, cursorPosition, timezone, locale } = $model;
|
|
193
234
|
return {
|
|
194
235
|
query,
|
|
195
236
|
cursorPosition,
|
|
@@ -198,8 +239,8 @@ var _AutocompleteRequestTransformation;
|
|
|
198
239
|
};
|
|
199
240
|
}
|
|
200
241
|
_AutocompleteRequestTransformation2.fromJson = fromJson;
|
|
201
|
-
function toJson(model) {
|
|
202
|
-
const { query, cursorPosition, timezone, locale } = model;
|
|
242
|
+
function toJson($model) {
|
|
243
|
+
const { query, cursorPosition, timezone, locale } = $model;
|
|
203
244
|
return {
|
|
204
245
|
query,
|
|
205
246
|
cursorPosition,
|
|
@@ -260,8 +301,48 @@ var _TokenTypeTransformation;
|
|
|
260
301
|
// packages/client/query/src/lib/models/autocomplete-suggestion-part.ts
|
|
261
302
|
var _AutocompleteSuggestionPartTransformation;
|
|
262
303
|
((_AutocompleteSuggestionPartTransformation2) => {
|
|
263
|
-
function
|
|
264
|
-
|
|
304
|
+
function isAutocompleteSuggestionPart(value) {
|
|
305
|
+
if (value === null) {
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
if (value === void 0) {
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
if (Array.isArray(value)) {
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
const modelKeys = /* @__PURE__ */ new Set(["type", "info", "synopsis", "suggestion"]);
|
|
315
|
+
const hasAdditionalProperties = false;
|
|
316
|
+
const requiredKeys = ["suggestion", "type"];
|
|
317
|
+
const optionalKeys = ["info", "synopsis"];
|
|
318
|
+
const valKeys = new Set(Object.keys(value));
|
|
319
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
320
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
321
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
322
|
+
}
|
|
323
|
+
_AutocompleteSuggestionPartTransformation2.isAutocompleteSuggestionPart = isAutocompleteSuggestionPart;
|
|
324
|
+
function isJson(value) {
|
|
325
|
+
if (value === null) {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
if (value === void 0) {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
if (Array.isArray(value)) {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
const modelKeys = /* @__PURE__ */ new Set(["type", "info", "synopsis", "suggestion"]);
|
|
335
|
+
const hasAdditionalProperties = false;
|
|
336
|
+
const requiredKeys = ["suggestion", "type"];
|
|
337
|
+
const optionalKeys = ["info", "synopsis"];
|
|
338
|
+
const valKeys = new Set(Object.keys(value));
|
|
339
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
340
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
341
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
342
|
+
}
|
|
343
|
+
_AutocompleteSuggestionPartTransformation2.isJson = isJson;
|
|
344
|
+
function fromJson($model) {
|
|
345
|
+
const { type, info, synopsis, suggestion } = $model;
|
|
265
346
|
return {
|
|
266
347
|
type: _TokenTypeTransformation.fromJson(type),
|
|
267
348
|
info,
|
|
@@ -270,8 +351,8 @@ var _AutocompleteSuggestionPartTransformation;
|
|
|
270
351
|
};
|
|
271
352
|
}
|
|
272
353
|
_AutocompleteSuggestionPartTransformation2.fromJson = fromJson;
|
|
273
|
-
function toJson(model) {
|
|
274
|
-
const { type, info, synopsis, suggestion } = model;
|
|
354
|
+
function toJson($model) {
|
|
355
|
+
const { type, info, synopsis, suggestion } = $model;
|
|
275
356
|
return {
|
|
276
357
|
type: _TokenTypeTransformation.toJson(type),
|
|
277
358
|
info,
|
|
@@ -285,8 +366,48 @@ var _AutocompleteSuggestionPartTransformation;
|
|
|
285
366
|
// packages/client/query/src/lib/models/autocomplete-suggestion.ts
|
|
286
367
|
var _AutocompleteSuggestionTransformation;
|
|
287
368
|
((_AutocompleteSuggestionTransformation2) => {
|
|
288
|
-
function
|
|
289
|
-
|
|
369
|
+
function isAutocompleteSuggestion(value) {
|
|
370
|
+
if (value === null) {
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
if (value === void 0) {
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
if (Array.isArray(value)) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
const modelKeys = /* @__PURE__ */ new Set(["parts", "alreadyTypedCharacters", "suggestion"]);
|
|
380
|
+
const hasAdditionalProperties = false;
|
|
381
|
+
const requiredKeys = ["alreadyTypedCharacters", "parts", "suggestion"];
|
|
382
|
+
const optionalKeys = [];
|
|
383
|
+
const valKeys = new Set(Object.keys(value));
|
|
384
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
385
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
386
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
387
|
+
}
|
|
388
|
+
_AutocompleteSuggestionTransformation2.isAutocompleteSuggestion = isAutocompleteSuggestion;
|
|
389
|
+
function isJson(value) {
|
|
390
|
+
if (value === null) {
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
393
|
+
if (value === void 0) {
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
if (Array.isArray(value)) {
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
const modelKeys = /* @__PURE__ */ new Set(["parts", "alreadyTypedCharacters", "suggestion"]);
|
|
400
|
+
const hasAdditionalProperties = false;
|
|
401
|
+
const requiredKeys = ["alreadyTypedCharacters", "parts", "suggestion"];
|
|
402
|
+
const optionalKeys = [];
|
|
403
|
+
const valKeys = new Set(Object.keys(value));
|
|
404
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
405
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
406
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
407
|
+
}
|
|
408
|
+
_AutocompleteSuggestionTransformation2.isJson = isJson;
|
|
409
|
+
function fromJson($model) {
|
|
410
|
+
const { parts, alreadyTypedCharacters, suggestion } = $model;
|
|
290
411
|
return {
|
|
291
412
|
parts: parts?.map((innerValue) => _AutocompleteSuggestionPartTransformation.fromJson(innerValue)),
|
|
292
413
|
alreadyTypedCharacters,
|
|
@@ -294,8 +415,8 @@ var _AutocompleteSuggestionTransformation;
|
|
|
294
415
|
};
|
|
295
416
|
}
|
|
296
417
|
_AutocompleteSuggestionTransformation2.fromJson = fromJson;
|
|
297
|
-
function toJson(model) {
|
|
298
|
-
const { parts, alreadyTypedCharacters, suggestion } = model;
|
|
418
|
+
function toJson($model) {
|
|
419
|
+
const { parts, alreadyTypedCharacters, suggestion } = $model;
|
|
299
420
|
return {
|
|
300
421
|
parts: parts?.map((innerValue) => _AutocompleteSuggestionPartTransformation.toJson(innerValue)),
|
|
301
422
|
alreadyTypedCharacters,
|
|
@@ -308,8 +429,48 @@ var _AutocompleteSuggestionTransformation;
|
|
|
308
429
|
// packages/client/query/src/lib/models/autocomplete-response.ts
|
|
309
430
|
var _AutocompleteResponseTransformation;
|
|
310
431
|
((_AutocompleteResponseTransformation2) => {
|
|
311
|
-
function
|
|
312
|
-
|
|
432
|
+
function isAutocompleteResponse(value) {
|
|
433
|
+
if (value === null) {
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
if (value === void 0) {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
if (Array.isArray(value)) {
|
|
440
|
+
return false;
|
|
441
|
+
}
|
|
442
|
+
const modelKeys = /* @__PURE__ */ new Set(["optional", "suggestions", "suggestedTtlSeconds"]);
|
|
443
|
+
const hasAdditionalProperties = false;
|
|
444
|
+
const requiredKeys = ["optional", "suggestions"];
|
|
445
|
+
const optionalKeys = ["suggestedTtlSeconds"];
|
|
446
|
+
const valKeys = new Set(Object.keys(value));
|
|
447
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
448
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
449
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
450
|
+
}
|
|
451
|
+
_AutocompleteResponseTransformation2.isAutocompleteResponse = isAutocompleteResponse;
|
|
452
|
+
function isJson(value) {
|
|
453
|
+
if (value === null) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
if (value === void 0) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
if (Array.isArray(value)) {
|
|
460
|
+
return false;
|
|
461
|
+
}
|
|
462
|
+
const modelKeys = /* @__PURE__ */ new Set(["optional", "suggestions", "suggestedTtlSeconds"]);
|
|
463
|
+
const hasAdditionalProperties = false;
|
|
464
|
+
const requiredKeys = ["optional", "suggestions"];
|
|
465
|
+
const optionalKeys = ["suggestedTtlSeconds"];
|
|
466
|
+
const valKeys = new Set(Object.keys(value));
|
|
467
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
468
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
469
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
470
|
+
}
|
|
471
|
+
_AutocompleteResponseTransformation2.isJson = isJson;
|
|
472
|
+
function fromJson($model) {
|
|
473
|
+
const { optional, suggestions, suggestedTtlSeconds } = $model;
|
|
313
474
|
return {
|
|
314
475
|
optional,
|
|
315
476
|
suggestions: suggestions?.map((innerValue) => _AutocompleteSuggestionTransformation.fromJson(innerValue)),
|
|
@@ -317,8 +478,8 @@ var _AutocompleteResponseTransformation;
|
|
|
317
478
|
};
|
|
318
479
|
}
|
|
319
480
|
_AutocompleteResponseTransformation2.fromJson = fromJson;
|
|
320
|
-
function toJson(model) {
|
|
321
|
-
const { optional, suggestions, suggestedTtlSeconds } = model;
|
|
481
|
+
function toJson($model) {
|
|
482
|
+
const { optional, suggestions, suggestedTtlSeconds } = $model;
|
|
322
483
|
return {
|
|
323
484
|
optional,
|
|
324
485
|
suggestions: suggestions?.map((innerValue) => _AutocompleteSuggestionTransformation.toJson(innerValue)),
|
|
@@ -331,18 +492,58 @@ var _AutocompleteResponseTransformation;
|
|
|
331
492
|
// packages/client/query/src/lib/models/dql-alternative-node.ts
|
|
332
493
|
var _DQLAlternativeNodeTransformation;
|
|
333
494
|
((_DQLAlternativeNodeTransformation2) => {
|
|
334
|
-
function
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
495
|
+
function isDqlAlternativeNode(value) {
|
|
496
|
+
if (value === null) {
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
if (value === void 0) {
|
|
500
|
+
return false;
|
|
501
|
+
}
|
|
502
|
+
if (Array.isArray(value)) {
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
506
|
+
const hasAdditionalProperties = false;
|
|
507
|
+
const requiredKeys = ["alternatives", "isOptional", "nodeType"];
|
|
508
|
+
const optionalKeys = [];
|
|
509
|
+
const valKeys = new Set(Object.keys(value));
|
|
510
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
511
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
512
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
513
|
+
}
|
|
514
|
+
_DQLAlternativeNodeTransformation2.isDqlAlternativeNode = isDqlAlternativeNode;
|
|
515
|
+
function isJson(value) {
|
|
516
|
+
if (value === null) {
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
if (value === void 0) {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
if (Array.isArray(value)) {
|
|
523
|
+
return false;
|
|
524
|
+
}
|
|
525
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
526
|
+
const hasAdditionalProperties = false;
|
|
527
|
+
const requiredKeys = ["alternatives", "isOptional", "nodeType"];
|
|
528
|
+
const optionalKeys = [];
|
|
529
|
+
const valKeys = new Set(Object.keys(value));
|
|
530
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
531
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
532
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
533
|
+
}
|
|
534
|
+
_DQLAlternativeNodeTransformation2.isJson = isJson;
|
|
535
|
+
function fromJson($model) {
|
|
536
|
+
const { alternatives } = $model;
|
|
537
|
+
return {
|
|
538
|
+
..._DQLNodeTransformation.fromJson($model, false),
|
|
338
539
|
alternatives
|
|
339
540
|
};
|
|
340
541
|
}
|
|
341
542
|
_DQLAlternativeNodeTransformation2.fromJson = fromJson;
|
|
342
|
-
function toJson(model) {
|
|
343
|
-
const { alternatives } = model;
|
|
543
|
+
function toJson($model) {
|
|
544
|
+
const { alternatives } = $model;
|
|
344
545
|
return {
|
|
345
|
-
..._DQLNodeTransformation.toJson(model, false),
|
|
546
|
+
..._DQLNodeTransformation.toJson($model, false),
|
|
346
547
|
alternatives
|
|
347
548
|
};
|
|
348
549
|
}
|
|
@@ -352,19 +553,59 @@ var _DQLAlternativeNodeTransformation;
|
|
|
352
553
|
// packages/client/query/src/lib/models/dql-container-node.ts
|
|
353
554
|
var _DQLContainerNodeTransformation;
|
|
354
555
|
((_DQLContainerNodeTransformation2) => {
|
|
355
|
-
function
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
556
|
+
function isDqlContainerNode(value) {
|
|
557
|
+
if (value === null) {
|
|
558
|
+
return false;
|
|
559
|
+
}
|
|
560
|
+
if (value === void 0) {
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
if (Array.isArray(value)) {
|
|
564
|
+
return false;
|
|
565
|
+
}
|
|
566
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
567
|
+
const hasAdditionalProperties = false;
|
|
568
|
+
const requiredKeys = ["children", "isOptional", "nodeType", "type"];
|
|
569
|
+
const optionalKeys = [];
|
|
570
|
+
const valKeys = new Set(Object.keys(value));
|
|
571
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
572
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
573
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
574
|
+
}
|
|
575
|
+
_DQLContainerNodeTransformation2.isDqlContainerNode = isDqlContainerNode;
|
|
576
|
+
function isJson(value) {
|
|
577
|
+
if (value === null) {
|
|
578
|
+
return false;
|
|
579
|
+
}
|
|
580
|
+
if (value === void 0) {
|
|
581
|
+
return false;
|
|
582
|
+
}
|
|
583
|
+
if (Array.isArray(value)) {
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
587
|
+
const hasAdditionalProperties = false;
|
|
588
|
+
const requiredKeys = ["children", "isOptional", "nodeType", "type"];
|
|
589
|
+
const optionalKeys = [];
|
|
590
|
+
const valKeys = new Set(Object.keys(value));
|
|
591
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
592
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
593
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
594
|
+
}
|
|
595
|
+
_DQLContainerNodeTransformation2.isJson = isJson;
|
|
596
|
+
function fromJson($model) {
|
|
597
|
+
const { type, children } = $model;
|
|
598
|
+
return {
|
|
599
|
+
..._DQLNodeTransformation.fromJson($model, false),
|
|
359
600
|
type,
|
|
360
601
|
children: children !== void 0 && children !== null ? children?.map((innerValue) => _DQLNodeTransformation.fromJson(innerValue)) : void 0
|
|
361
602
|
};
|
|
362
603
|
}
|
|
363
604
|
_DQLContainerNodeTransformation2.fromJson = fromJson;
|
|
364
|
-
function toJson(model) {
|
|
365
|
-
const { type, children } = model;
|
|
605
|
+
function toJson($model) {
|
|
606
|
+
const { type, children } = $model;
|
|
366
607
|
return {
|
|
367
|
-
..._DQLNodeTransformation.toJson(model, false),
|
|
608
|
+
..._DQLNodeTransformation.toJson($model, false),
|
|
368
609
|
type,
|
|
369
610
|
children: children !== void 0 && children !== null ? children?.map((innerValue) => _DQLNodeTransformation.toJson(innerValue)) : void 0
|
|
370
611
|
};
|
|
@@ -388,20 +629,60 @@ var _DQLNodeNodeTypeTransformation;
|
|
|
388
629
|
// packages/client/query/src/lib/models/dql-terminal-node.ts
|
|
389
630
|
var _DQLTerminalNodeTransformation;
|
|
390
631
|
((_DQLTerminalNodeTransformation2) => {
|
|
391
|
-
function
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
632
|
+
function isDqlTerminalNode(value) {
|
|
633
|
+
if (value === null) {
|
|
634
|
+
return false;
|
|
635
|
+
}
|
|
636
|
+
if (value === void 0) {
|
|
637
|
+
return false;
|
|
638
|
+
}
|
|
639
|
+
if (Array.isArray(value)) {
|
|
640
|
+
return false;
|
|
641
|
+
}
|
|
642
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
643
|
+
const hasAdditionalProperties = false;
|
|
644
|
+
const requiredKeys = ["canonicalString", "isMandatoryOnUserOrder", "isOptional", "nodeType", "type"];
|
|
645
|
+
const optionalKeys = [];
|
|
646
|
+
const valKeys = new Set(Object.keys(value));
|
|
647
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
648
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
649
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
650
|
+
}
|
|
651
|
+
_DQLTerminalNodeTransformation2.isDqlTerminalNode = isDqlTerminalNode;
|
|
652
|
+
function isJson(value) {
|
|
653
|
+
if (value === null) {
|
|
654
|
+
return false;
|
|
655
|
+
}
|
|
656
|
+
if (value === void 0) {
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
if (Array.isArray(value)) {
|
|
660
|
+
return false;
|
|
661
|
+
}
|
|
662
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
663
|
+
const hasAdditionalProperties = false;
|
|
664
|
+
const requiredKeys = ["canonicalString", "isMandatoryOnUserOrder", "isOptional", "nodeType", "type"];
|
|
665
|
+
const optionalKeys = [];
|
|
666
|
+
const valKeys = new Set(Object.keys(value));
|
|
667
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
668
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
669
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
670
|
+
}
|
|
671
|
+
_DQLTerminalNodeTransformation2.isJson = isJson;
|
|
672
|
+
function fromJson($model) {
|
|
673
|
+
const { type, isMandatoryOnUserOrder, canonicalString } = $model;
|
|
674
|
+
return {
|
|
675
|
+
..._DQLNodeTransformation.fromJson($model, false),
|
|
395
676
|
type: type !== void 0 && type !== null ? _TokenTypeTransformation.fromJson(type) : void 0,
|
|
396
677
|
isMandatoryOnUserOrder,
|
|
397
678
|
canonicalString
|
|
398
679
|
};
|
|
399
680
|
}
|
|
400
681
|
_DQLTerminalNodeTransformation2.fromJson = fromJson;
|
|
401
|
-
function toJson(model) {
|
|
402
|
-
const { type, isMandatoryOnUserOrder, canonicalString } = model;
|
|
682
|
+
function toJson($model) {
|
|
683
|
+
const { type, isMandatoryOnUserOrder, canonicalString } = $model;
|
|
403
684
|
return {
|
|
404
|
-
..._DQLNodeTransformation.toJson(model, false),
|
|
685
|
+
..._DQLNodeTransformation.toJson($model, false),
|
|
405
686
|
type: type !== void 0 && type !== null ? _TokenTypeTransformation.toJson(type) : void 0,
|
|
406
687
|
isMandatoryOnUserOrder,
|
|
407
688
|
canonicalString
|
|
@@ -413,8 +694,48 @@ var _DQLTerminalNodeTransformation;
|
|
|
413
694
|
// packages/client/query/src/lib/models/position-info.ts
|
|
414
695
|
var _PositionInfoTransformation;
|
|
415
696
|
((_PositionInfoTransformation2) => {
|
|
416
|
-
function
|
|
417
|
-
|
|
697
|
+
function isPositionInfo(value) {
|
|
698
|
+
if (value === null) {
|
|
699
|
+
return false;
|
|
700
|
+
}
|
|
701
|
+
if (value === void 0) {
|
|
702
|
+
return false;
|
|
703
|
+
}
|
|
704
|
+
if (Array.isArray(value)) {
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
707
|
+
const modelKeys = /* @__PURE__ */ new Set(["column", "index", "line"]);
|
|
708
|
+
const hasAdditionalProperties = false;
|
|
709
|
+
const requiredKeys = ["column", "index", "line"];
|
|
710
|
+
const optionalKeys = [];
|
|
711
|
+
const valKeys = new Set(Object.keys(value));
|
|
712
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
713
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
714
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
715
|
+
}
|
|
716
|
+
_PositionInfoTransformation2.isPositionInfo = isPositionInfo;
|
|
717
|
+
function isJson(value) {
|
|
718
|
+
if (value === null) {
|
|
719
|
+
return false;
|
|
720
|
+
}
|
|
721
|
+
if (value === void 0) {
|
|
722
|
+
return false;
|
|
723
|
+
}
|
|
724
|
+
if (Array.isArray(value)) {
|
|
725
|
+
return false;
|
|
726
|
+
}
|
|
727
|
+
const modelKeys = /* @__PURE__ */ new Set(["column", "index", "line"]);
|
|
728
|
+
const hasAdditionalProperties = false;
|
|
729
|
+
const requiredKeys = ["column", "index", "line"];
|
|
730
|
+
const optionalKeys = [];
|
|
731
|
+
const valKeys = new Set(Object.keys(value));
|
|
732
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
733
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
734
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
735
|
+
}
|
|
736
|
+
_PositionInfoTransformation2.isJson = isJson;
|
|
737
|
+
function fromJson($model) {
|
|
738
|
+
const { column, index, line } = $model;
|
|
418
739
|
return {
|
|
419
740
|
column,
|
|
420
741
|
index,
|
|
@@ -422,8 +743,8 @@ var _PositionInfoTransformation;
|
|
|
422
743
|
};
|
|
423
744
|
}
|
|
424
745
|
_PositionInfoTransformation2.fromJson = fromJson;
|
|
425
|
-
function toJson(model) {
|
|
426
|
-
const { column, index, line } = model;
|
|
746
|
+
function toJson($model) {
|
|
747
|
+
const { column, index, line } = $model;
|
|
427
748
|
return {
|
|
428
749
|
column,
|
|
429
750
|
index,
|
|
@@ -436,16 +757,56 @@ var _PositionInfoTransformation;
|
|
|
436
757
|
// packages/client/query/src/lib/models/token-position.ts
|
|
437
758
|
var _TokenPositionTransformation;
|
|
438
759
|
((_TokenPositionTransformation2) => {
|
|
439
|
-
function
|
|
440
|
-
|
|
760
|
+
function isTokenPosition(value) {
|
|
761
|
+
if (value === null) {
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
if (value === void 0) {
|
|
765
|
+
return false;
|
|
766
|
+
}
|
|
767
|
+
if (Array.isArray(value)) {
|
|
768
|
+
return false;
|
|
769
|
+
}
|
|
770
|
+
const modelKeys = /* @__PURE__ */ new Set(["start", "end"]);
|
|
771
|
+
const hasAdditionalProperties = false;
|
|
772
|
+
const requiredKeys = ["end", "start"];
|
|
773
|
+
const optionalKeys = [];
|
|
774
|
+
const valKeys = new Set(Object.keys(value));
|
|
775
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
776
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
777
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
778
|
+
}
|
|
779
|
+
_TokenPositionTransformation2.isTokenPosition = isTokenPosition;
|
|
780
|
+
function isJson(value) {
|
|
781
|
+
if (value === null) {
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
if (value === void 0) {
|
|
785
|
+
return false;
|
|
786
|
+
}
|
|
787
|
+
if (Array.isArray(value)) {
|
|
788
|
+
return false;
|
|
789
|
+
}
|
|
790
|
+
const modelKeys = /* @__PURE__ */ new Set(["start", "end"]);
|
|
791
|
+
const hasAdditionalProperties = false;
|
|
792
|
+
const requiredKeys = ["end", "start"];
|
|
793
|
+
const optionalKeys = [];
|
|
794
|
+
const valKeys = new Set(Object.keys(value));
|
|
795
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
796
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
797
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
798
|
+
}
|
|
799
|
+
_TokenPositionTransformation2.isJson = isJson;
|
|
800
|
+
function fromJson($model) {
|
|
801
|
+
const { start, end } = $model;
|
|
441
802
|
return {
|
|
442
803
|
start: _PositionInfoTransformation.fromJson(start),
|
|
443
804
|
end: _PositionInfoTransformation.fromJson(end)
|
|
444
805
|
};
|
|
445
806
|
}
|
|
446
807
|
_TokenPositionTransformation2.fromJson = fromJson;
|
|
447
|
-
function toJson(model) {
|
|
448
|
-
const { start, end } = model;
|
|
808
|
+
function toJson($model) {
|
|
809
|
+
const { start, end } = $model;
|
|
449
810
|
return {
|
|
450
811
|
start: _PositionInfoTransformation.toJson(start),
|
|
451
812
|
end: _PositionInfoTransformation.toJson(end)
|
|
@@ -460,8 +821,8 @@ var _TokenPositionTransformation;
|
|
|
460
821
|
};
|
|
461
822
|
}
|
|
462
823
|
_TokenPositionTransformation2.fromFormData = fromFormData;
|
|
463
|
-
function toFormData(model) {
|
|
464
|
-
const json = toJson(model);
|
|
824
|
+
function toFormData($model) {
|
|
825
|
+
const json = toJson($model);
|
|
465
826
|
const body = [
|
|
466
827
|
{ name: "start", type: "json", value: json["start"] },
|
|
467
828
|
{ name: "end", type: "json", value: json["end"] }
|
|
@@ -474,32 +835,52 @@ var _TokenPositionTransformation;
|
|
|
474
835
|
// packages/client/query/src/lib/models/dql-node.ts
|
|
475
836
|
var _DQLNodeTransformation;
|
|
476
837
|
((_DQLNodeTransformation2) => {
|
|
477
|
-
function isDqlTerminalNode(model) {
|
|
478
|
-
return model["nodeType"] === "TERMINAL";
|
|
838
|
+
function isDqlTerminalNode($model) {
|
|
839
|
+
return $model["nodeType"] === "TERMINAL";
|
|
479
840
|
}
|
|
480
841
|
_DQLNodeTransformation2.isDqlTerminalNode = isDqlTerminalNode;
|
|
481
|
-
function isDqlContainerNode(model) {
|
|
482
|
-
return model["nodeType"] === "CONTAINER";
|
|
842
|
+
function isDqlContainerNode($model) {
|
|
843
|
+
return $model["nodeType"] === "CONTAINER";
|
|
483
844
|
}
|
|
484
845
|
_DQLNodeTransformation2.isDqlContainerNode = isDqlContainerNode;
|
|
485
|
-
function isDqlAlternativeNode(model) {
|
|
486
|
-
return model["nodeType"] === "ALTERNATIVE";
|
|
846
|
+
function isDqlAlternativeNode($model) {
|
|
847
|
+
return $model["nodeType"] === "ALTERNATIVE";
|
|
487
848
|
}
|
|
488
849
|
_DQLNodeTransformation2.isDqlAlternativeNode = isDqlAlternativeNode;
|
|
489
|
-
function
|
|
850
|
+
function isJson(value) {
|
|
851
|
+
if (value === null) {
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
if (value === void 0) {
|
|
855
|
+
return false;
|
|
856
|
+
}
|
|
857
|
+
if (Array.isArray(value)) {
|
|
858
|
+
return false;
|
|
859
|
+
}
|
|
860
|
+
const modelKeys = /* @__PURE__ */ new Set(["nodeType", "tokenPosition", "isOptional"]);
|
|
861
|
+
const hasAdditionalProperties = false;
|
|
862
|
+
const requiredKeys = ["isOptional", "nodeType"];
|
|
863
|
+
const optionalKeys = ["tokenPosition"];
|
|
864
|
+
const valKeys = new Set(Object.keys(value));
|
|
865
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
866
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
867
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
868
|
+
}
|
|
869
|
+
_DQLNodeTransformation2.isJson = isJson;
|
|
870
|
+
function fromJson($model, includeChildProps = true) {
|
|
490
871
|
if (includeChildProps) {
|
|
491
|
-
switch (model.nodeType) {
|
|
872
|
+
switch ($model.nodeType) {
|
|
492
873
|
case "TERMINAL":
|
|
493
|
-
return _DQLTerminalNodeTransformation.fromJson(model);
|
|
874
|
+
return _DQLTerminalNodeTransformation.fromJson($model);
|
|
494
875
|
case "CONTAINER":
|
|
495
|
-
return _DQLContainerNodeTransformation.fromJson(model);
|
|
876
|
+
return _DQLContainerNodeTransformation.fromJson($model);
|
|
496
877
|
case "ALTERNATIVE":
|
|
497
|
-
return _DQLAlternativeNodeTransformation.fromJson(model);
|
|
878
|
+
return _DQLAlternativeNodeTransformation.fromJson($model);
|
|
498
879
|
default:
|
|
499
|
-
return fromJson(model, false);
|
|
880
|
+
return fromJson($model, false);
|
|
500
881
|
}
|
|
501
882
|
}
|
|
502
|
-
const { nodeType, tokenPosition, isOptional } = model;
|
|
883
|
+
const { nodeType, tokenPosition, isOptional } = $model;
|
|
503
884
|
return {
|
|
504
885
|
nodeType: _DQLNodeNodeTypeTransformation.fromJson(nodeType),
|
|
505
886
|
tokenPosition: tokenPosition !== void 0 && tokenPosition !== null ? _TokenPositionTransformation.fromJson(tokenPosition) : void 0,
|
|
@@ -507,20 +888,20 @@ var _DQLNodeTransformation;
|
|
|
507
888
|
};
|
|
508
889
|
}
|
|
509
890
|
_DQLNodeTransformation2.fromJson = fromJson;
|
|
510
|
-
function toJson(model, includeChildProps = true) {
|
|
891
|
+
function toJson($model, includeChildProps = true) {
|
|
511
892
|
if (includeChildProps) {
|
|
512
|
-
switch (model.nodeType) {
|
|
893
|
+
switch ($model.nodeType) {
|
|
513
894
|
case "TERMINAL":
|
|
514
|
-
return _DQLTerminalNodeTransformation.toJson(model);
|
|
895
|
+
return _DQLTerminalNodeTransformation.toJson($model);
|
|
515
896
|
case "CONTAINER":
|
|
516
|
-
return _DQLContainerNodeTransformation.toJson(model);
|
|
897
|
+
return _DQLContainerNodeTransformation.toJson($model);
|
|
517
898
|
case "ALTERNATIVE":
|
|
518
|
-
return _DQLAlternativeNodeTransformation.toJson(model);
|
|
899
|
+
return _DQLAlternativeNodeTransformation.toJson($model);
|
|
519
900
|
default:
|
|
520
|
-
return toJson(model, false);
|
|
901
|
+
return toJson($model, false);
|
|
521
902
|
}
|
|
522
903
|
}
|
|
523
|
-
const { nodeType, tokenPosition, isOptional } = model;
|
|
904
|
+
const { nodeType, tokenPosition, isOptional } = $model;
|
|
524
905
|
return {
|
|
525
906
|
nodeType: _DQLNodeNodeTypeTransformation.toJson(nodeType),
|
|
526
907
|
tokenPosition: tokenPosition !== void 0 && tokenPosition !== null ? _TokenPositionTransformation.toJson(tokenPosition) : void 0,
|
|
@@ -533,7 +914,81 @@ var _DQLNodeTransformation;
|
|
|
533
914
|
// packages/client/query/src/lib/models/error-response-details.ts
|
|
534
915
|
var _ErrorResponseDetailsTransformation;
|
|
535
916
|
((_ErrorResponseDetailsTransformation2) => {
|
|
536
|
-
function
|
|
917
|
+
function isErrorResponseDetails(value) {
|
|
918
|
+
if (value === null) {
|
|
919
|
+
return false;
|
|
920
|
+
}
|
|
921
|
+
if (value === void 0) {
|
|
922
|
+
return false;
|
|
923
|
+
}
|
|
924
|
+
if (Array.isArray(value)) {
|
|
925
|
+
return false;
|
|
926
|
+
}
|
|
927
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
928
|
+
"exceptionType",
|
|
929
|
+
"syntaxErrorPosition",
|
|
930
|
+
"errorType",
|
|
931
|
+
"errorMessage",
|
|
932
|
+
"arguments",
|
|
933
|
+
"queryString",
|
|
934
|
+
"errorMessageFormatSpecifierTypes",
|
|
935
|
+
"errorMessageFormat"
|
|
936
|
+
]);
|
|
937
|
+
const hasAdditionalProperties = false;
|
|
938
|
+
const requiredKeys = [
|
|
939
|
+
"arguments",
|
|
940
|
+
"errorMessage",
|
|
941
|
+
"errorMessageFormat",
|
|
942
|
+
"errorMessageFormatSpecifierTypes",
|
|
943
|
+
"errorType",
|
|
944
|
+
"exceptionType",
|
|
945
|
+
"queryString"
|
|
946
|
+
];
|
|
947
|
+
const optionalKeys = ["syntaxErrorPosition"];
|
|
948
|
+
const valKeys = new Set(Object.keys(value));
|
|
949
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
950
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
951
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
952
|
+
}
|
|
953
|
+
_ErrorResponseDetailsTransformation2.isErrorResponseDetails = isErrorResponseDetails;
|
|
954
|
+
function isJson(value) {
|
|
955
|
+
if (value === null) {
|
|
956
|
+
return false;
|
|
957
|
+
}
|
|
958
|
+
if (value === void 0) {
|
|
959
|
+
return false;
|
|
960
|
+
}
|
|
961
|
+
if (Array.isArray(value)) {
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
965
|
+
"exceptionType",
|
|
966
|
+
"syntaxErrorPosition",
|
|
967
|
+
"errorType",
|
|
968
|
+
"errorMessage",
|
|
969
|
+
"arguments",
|
|
970
|
+
"queryString",
|
|
971
|
+
"errorMessageFormatSpecifierTypes",
|
|
972
|
+
"errorMessageFormat"
|
|
973
|
+
]);
|
|
974
|
+
const hasAdditionalProperties = false;
|
|
975
|
+
const requiredKeys = [
|
|
976
|
+
"arguments",
|
|
977
|
+
"errorMessage",
|
|
978
|
+
"errorMessageFormat",
|
|
979
|
+
"errorMessageFormatSpecifierTypes",
|
|
980
|
+
"errorType",
|
|
981
|
+
"exceptionType",
|
|
982
|
+
"queryString"
|
|
983
|
+
];
|
|
984
|
+
const optionalKeys = ["syntaxErrorPosition"];
|
|
985
|
+
const valKeys = new Set(Object.keys(value));
|
|
986
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
987
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
988
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
989
|
+
}
|
|
990
|
+
_ErrorResponseDetailsTransformation2.isJson = isJson;
|
|
991
|
+
function fromJson($model) {
|
|
537
992
|
const {
|
|
538
993
|
exceptionType,
|
|
539
994
|
syntaxErrorPosition,
|
|
@@ -543,7 +998,7 @@ var _ErrorResponseDetailsTransformation;
|
|
|
543
998
|
queryString,
|
|
544
999
|
errorMessageFormatSpecifierTypes,
|
|
545
1000
|
errorMessageFormat
|
|
546
|
-
} = model;
|
|
1001
|
+
} = $model;
|
|
547
1002
|
return {
|
|
548
1003
|
exceptionType,
|
|
549
1004
|
syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? _TokenPositionTransformation.fromJson(syntaxErrorPosition) : void 0,
|
|
@@ -556,7 +1011,7 @@ var _ErrorResponseDetailsTransformation;
|
|
|
556
1011
|
};
|
|
557
1012
|
}
|
|
558
1013
|
_ErrorResponseDetailsTransformation2.fromJson = fromJson;
|
|
559
|
-
function toJson(model) {
|
|
1014
|
+
function toJson($model) {
|
|
560
1015
|
const {
|
|
561
1016
|
exceptionType,
|
|
562
1017
|
syntaxErrorPosition,
|
|
@@ -566,7 +1021,7 @@ var _ErrorResponseDetailsTransformation;
|
|
|
566
1021
|
queryString,
|
|
567
1022
|
errorMessageFormatSpecifierTypes,
|
|
568
1023
|
errorMessageFormat
|
|
569
|
-
} = model;
|
|
1024
|
+
} = $model;
|
|
570
1025
|
return {
|
|
571
1026
|
exceptionType,
|
|
572
1027
|
syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? _TokenPositionTransformation.toJson(syntaxErrorPosition) : void 0,
|
|
@@ -584,8 +1039,48 @@ var _ErrorResponseDetailsTransformation;
|
|
|
584
1039
|
// packages/client/query/src/lib/models/error-response.ts
|
|
585
1040
|
var _ErrorResponseTransformation;
|
|
586
1041
|
((_ErrorResponseTransformation2) => {
|
|
587
|
-
function
|
|
588
|
-
|
|
1042
|
+
function isErrorResponse(value) {
|
|
1043
|
+
if (value === null) {
|
|
1044
|
+
return false;
|
|
1045
|
+
}
|
|
1046
|
+
if (value === void 0) {
|
|
1047
|
+
return false;
|
|
1048
|
+
}
|
|
1049
|
+
if (Array.isArray(value)) {
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
const modelKeys = /* @__PURE__ */ new Set(["message", "details", "code"]);
|
|
1053
|
+
const hasAdditionalProperties = false;
|
|
1054
|
+
const requiredKeys = ["code", "details", "message"];
|
|
1055
|
+
const optionalKeys = [];
|
|
1056
|
+
const valKeys = new Set(Object.keys(value));
|
|
1057
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1058
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1059
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1060
|
+
}
|
|
1061
|
+
_ErrorResponseTransformation2.isErrorResponse = isErrorResponse;
|
|
1062
|
+
function isJson(value) {
|
|
1063
|
+
if (value === null) {
|
|
1064
|
+
return false;
|
|
1065
|
+
}
|
|
1066
|
+
if (value === void 0) {
|
|
1067
|
+
return false;
|
|
1068
|
+
}
|
|
1069
|
+
if (Array.isArray(value)) {
|
|
1070
|
+
return false;
|
|
1071
|
+
}
|
|
1072
|
+
const modelKeys = /* @__PURE__ */ new Set(["message", "details", "code"]);
|
|
1073
|
+
const hasAdditionalProperties = false;
|
|
1074
|
+
const requiredKeys = ["code", "details", "message"];
|
|
1075
|
+
const optionalKeys = [];
|
|
1076
|
+
const valKeys = new Set(Object.keys(value));
|
|
1077
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1078
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1079
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1080
|
+
}
|
|
1081
|
+
_ErrorResponseTransformation2.isJson = isJson;
|
|
1082
|
+
function fromJson($model) {
|
|
1083
|
+
const { message, details, code } = $model;
|
|
589
1084
|
return {
|
|
590
1085
|
message,
|
|
591
1086
|
details: _ErrorResponseDetailsTransformation.fromJson(details),
|
|
@@ -593,8 +1088,8 @@ var _ErrorResponseTransformation;
|
|
|
593
1088
|
};
|
|
594
1089
|
}
|
|
595
1090
|
_ErrorResponseTransformation2.fromJson = fromJson;
|
|
596
|
-
function toJson(model) {
|
|
597
|
-
const { message, details, code } = model;
|
|
1091
|
+
function toJson($model) {
|
|
1092
|
+
const { message, details, code } = $model;
|
|
598
1093
|
return {
|
|
599
1094
|
message,
|
|
600
1095
|
details: _ErrorResponseDetailsTransformation.toJson(details),
|
|
@@ -607,15 +1102,55 @@ var _ErrorResponseTransformation;
|
|
|
607
1102
|
// packages/client/query/src/lib/models/error-envelope.ts
|
|
608
1103
|
var _ErrorEnvelopeTransformation;
|
|
609
1104
|
((_ErrorEnvelopeTransformation2) => {
|
|
610
|
-
function
|
|
611
|
-
|
|
1105
|
+
function isErrorEnvelope(value) {
|
|
1106
|
+
if (value === null) {
|
|
1107
|
+
return false;
|
|
1108
|
+
}
|
|
1109
|
+
if (value === void 0) {
|
|
1110
|
+
return false;
|
|
1111
|
+
}
|
|
1112
|
+
if (Array.isArray(value)) {
|
|
1113
|
+
return false;
|
|
1114
|
+
}
|
|
1115
|
+
const modelKeys = /* @__PURE__ */ new Set(["error"]);
|
|
1116
|
+
const hasAdditionalProperties = false;
|
|
1117
|
+
const requiredKeys = ["error"];
|
|
1118
|
+
const optionalKeys = [];
|
|
1119
|
+
const valKeys = new Set(Object.keys(value));
|
|
1120
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1121
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1122
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1123
|
+
}
|
|
1124
|
+
_ErrorEnvelopeTransformation2.isErrorEnvelope = isErrorEnvelope;
|
|
1125
|
+
function isJson(value) {
|
|
1126
|
+
if (value === null) {
|
|
1127
|
+
return false;
|
|
1128
|
+
}
|
|
1129
|
+
if (value === void 0) {
|
|
1130
|
+
return false;
|
|
1131
|
+
}
|
|
1132
|
+
if (Array.isArray(value)) {
|
|
1133
|
+
return false;
|
|
1134
|
+
}
|
|
1135
|
+
const modelKeys = /* @__PURE__ */ new Set(["error"]);
|
|
1136
|
+
const hasAdditionalProperties = false;
|
|
1137
|
+
const requiredKeys = ["error"];
|
|
1138
|
+
const optionalKeys = [];
|
|
1139
|
+
const valKeys = new Set(Object.keys(value));
|
|
1140
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1141
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1142
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1143
|
+
}
|
|
1144
|
+
_ErrorEnvelopeTransformation2.isJson = isJson;
|
|
1145
|
+
function fromJson($model) {
|
|
1146
|
+
const { error } = $model;
|
|
612
1147
|
return {
|
|
613
1148
|
error: _ErrorResponseTransformation.fromJson(error)
|
|
614
1149
|
};
|
|
615
1150
|
}
|
|
616
1151
|
_ErrorEnvelopeTransformation2.fromJson = fromJson;
|
|
617
|
-
function toJson(model) {
|
|
618
|
-
const { error } = model;
|
|
1152
|
+
function toJson($model) {
|
|
1153
|
+
const { error } = $model;
|
|
619
1154
|
return {
|
|
620
1155
|
error: _ErrorResponseTransformation.toJson(error)
|
|
621
1156
|
};
|
|
@@ -628,8 +1163,8 @@ var _ErrorEnvelopeTransformation;
|
|
|
628
1163
|
};
|
|
629
1164
|
}
|
|
630
1165
|
_ErrorEnvelopeTransformation2.fromFormData = fromFormData;
|
|
631
|
-
function toFormData(model) {
|
|
632
|
-
const json = toJson(model);
|
|
1166
|
+
function toFormData($model) {
|
|
1167
|
+
const json = toJson($model);
|
|
633
1168
|
const body = [{ name: "error", type: "json", value: json["error"] }];
|
|
634
1169
|
return body;
|
|
635
1170
|
}
|
|
@@ -639,8 +1174,48 @@ var _ErrorEnvelopeTransformation;
|
|
|
639
1174
|
// packages/client/query/src/lib/models/parse-request.ts
|
|
640
1175
|
var _ParseRequestTransformation;
|
|
641
1176
|
((_ParseRequestTransformation2) => {
|
|
642
|
-
function
|
|
643
|
-
|
|
1177
|
+
function isParseRequest(value) {
|
|
1178
|
+
if (value === null) {
|
|
1179
|
+
return false;
|
|
1180
|
+
}
|
|
1181
|
+
if (value === void 0) {
|
|
1182
|
+
return false;
|
|
1183
|
+
}
|
|
1184
|
+
if (Array.isArray(value)) {
|
|
1185
|
+
return false;
|
|
1186
|
+
}
|
|
1187
|
+
const modelKeys = /* @__PURE__ */ new Set(["query", "timezone", "locale"]);
|
|
1188
|
+
const hasAdditionalProperties = false;
|
|
1189
|
+
const requiredKeys = ["query"];
|
|
1190
|
+
const optionalKeys = ["timezone", "locale"];
|
|
1191
|
+
const valKeys = new Set(Object.keys(value));
|
|
1192
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1193
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1194
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1195
|
+
}
|
|
1196
|
+
_ParseRequestTransformation2.isParseRequest = isParseRequest;
|
|
1197
|
+
function isJson(value) {
|
|
1198
|
+
if (value === null) {
|
|
1199
|
+
return false;
|
|
1200
|
+
}
|
|
1201
|
+
if (value === void 0) {
|
|
1202
|
+
return false;
|
|
1203
|
+
}
|
|
1204
|
+
if (Array.isArray(value)) {
|
|
1205
|
+
return false;
|
|
1206
|
+
}
|
|
1207
|
+
const modelKeys = /* @__PURE__ */ new Set(["query", "timezone", "locale"]);
|
|
1208
|
+
const hasAdditionalProperties = false;
|
|
1209
|
+
const requiredKeys = ["query"];
|
|
1210
|
+
const optionalKeys = ["timezone", "locale"];
|
|
1211
|
+
const valKeys = new Set(Object.keys(value));
|
|
1212
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1213
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1214
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1215
|
+
}
|
|
1216
|
+
_ParseRequestTransformation2.isJson = isJson;
|
|
1217
|
+
function fromJson($model) {
|
|
1218
|
+
const { query, timezone, locale } = $model;
|
|
644
1219
|
return {
|
|
645
1220
|
query,
|
|
646
1221
|
timezone,
|
|
@@ -648,8 +1223,8 @@ var _ParseRequestTransformation;
|
|
|
648
1223
|
};
|
|
649
1224
|
}
|
|
650
1225
|
_ParseRequestTransformation2.fromJson = fromJson;
|
|
651
|
-
function toJson(model) {
|
|
652
|
-
const { query, timezone, locale } = model;
|
|
1226
|
+
function toJson($model) {
|
|
1227
|
+
const { query, timezone, locale } = $model;
|
|
653
1228
|
return {
|
|
654
1229
|
query,
|
|
655
1230
|
timezone,
|
|
@@ -662,8 +1237,48 @@ var _ParseRequestTransformation;
|
|
|
662
1237
|
// packages/client/query/src/lib/models/verify-request.ts
|
|
663
1238
|
var _VerifyRequestTransformation;
|
|
664
1239
|
((_VerifyRequestTransformation2) => {
|
|
665
|
-
function
|
|
666
|
-
|
|
1240
|
+
function isVerifyRequest(value) {
|
|
1241
|
+
if (value === null) {
|
|
1242
|
+
return false;
|
|
1243
|
+
}
|
|
1244
|
+
if (value === void 0) {
|
|
1245
|
+
return false;
|
|
1246
|
+
}
|
|
1247
|
+
if (Array.isArray(value)) {
|
|
1248
|
+
return false;
|
|
1249
|
+
}
|
|
1250
|
+
const modelKeys = /* @__PURE__ */ new Set(["query", "timezone", "locale"]);
|
|
1251
|
+
const hasAdditionalProperties = false;
|
|
1252
|
+
const requiredKeys = ["query"];
|
|
1253
|
+
const optionalKeys = ["timezone", "locale"];
|
|
1254
|
+
const valKeys = new Set(Object.keys(value));
|
|
1255
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1256
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1257
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1258
|
+
}
|
|
1259
|
+
_VerifyRequestTransformation2.isVerifyRequest = isVerifyRequest;
|
|
1260
|
+
function isJson(value) {
|
|
1261
|
+
if (value === null) {
|
|
1262
|
+
return false;
|
|
1263
|
+
}
|
|
1264
|
+
if (value === void 0) {
|
|
1265
|
+
return false;
|
|
1266
|
+
}
|
|
1267
|
+
if (Array.isArray(value)) {
|
|
1268
|
+
return false;
|
|
1269
|
+
}
|
|
1270
|
+
const modelKeys = /* @__PURE__ */ new Set(["query", "timezone", "locale"]);
|
|
1271
|
+
const hasAdditionalProperties = false;
|
|
1272
|
+
const requiredKeys = ["query"];
|
|
1273
|
+
const optionalKeys = ["timezone", "locale"];
|
|
1274
|
+
const valKeys = new Set(Object.keys(value));
|
|
1275
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1276
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1277
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1278
|
+
}
|
|
1279
|
+
_VerifyRequestTransformation2.isJson = isJson;
|
|
1280
|
+
function fromJson($model) {
|
|
1281
|
+
const { query, timezone, locale } = $model;
|
|
667
1282
|
return {
|
|
668
1283
|
query,
|
|
669
1284
|
timezone,
|
|
@@ -671,8 +1286,8 @@ var _VerifyRequestTransformation;
|
|
|
671
1286
|
};
|
|
672
1287
|
}
|
|
673
1288
|
_VerifyRequestTransformation2.fromJson = fromJson;
|
|
674
|
-
function toJson(model) {
|
|
675
|
-
const { query, timezone, locale } = model;
|
|
1289
|
+
function toJson($model) {
|
|
1290
|
+
const { query, timezone, locale } = $model;
|
|
676
1291
|
return {
|
|
677
1292
|
query,
|
|
678
1293
|
timezone,
|
|
@@ -685,7 +1300,79 @@ var _VerifyRequestTransformation;
|
|
|
685
1300
|
// packages/client/query/src/lib/models/metadata-notification.ts
|
|
686
1301
|
var _MetadataNotificationTransformation;
|
|
687
1302
|
((_MetadataNotificationTransformation2) => {
|
|
688
|
-
function
|
|
1303
|
+
function isMetadataNotification(value) {
|
|
1304
|
+
if (value === null) {
|
|
1305
|
+
return false;
|
|
1306
|
+
}
|
|
1307
|
+
if (value === void 0) {
|
|
1308
|
+
return false;
|
|
1309
|
+
}
|
|
1310
|
+
if (Array.isArray(value)) {
|
|
1311
|
+
return false;
|
|
1312
|
+
}
|
|
1313
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
1314
|
+
"severity",
|
|
1315
|
+
"messageFormat",
|
|
1316
|
+
"syntaxPosition",
|
|
1317
|
+
"messageFormatSpecifierTypes",
|
|
1318
|
+
"arguments",
|
|
1319
|
+
"notificationType",
|
|
1320
|
+
"message"
|
|
1321
|
+
]);
|
|
1322
|
+
const hasAdditionalProperties = false;
|
|
1323
|
+
const requiredKeys = [];
|
|
1324
|
+
const optionalKeys = [
|
|
1325
|
+
"severity",
|
|
1326
|
+
"messageFormat",
|
|
1327
|
+
"syntaxPosition",
|
|
1328
|
+
"messageFormatSpecifierTypes",
|
|
1329
|
+
"arguments",
|
|
1330
|
+
"notificationType",
|
|
1331
|
+
"message"
|
|
1332
|
+
];
|
|
1333
|
+
const valKeys = new Set(Object.keys(value));
|
|
1334
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1335
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1336
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1337
|
+
}
|
|
1338
|
+
_MetadataNotificationTransformation2.isMetadataNotification = isMetadataNotification;
|
|
1339
|
+
function isJson(value) {
|
|
1340
|
+
if (value === null) {
|
|
1341
|
+
return false;
|
|
1342
|
+
}
|
|
1343
|
+
if (value === void 0) {
|
|
1344
|
+
return false;
|
|
1345
|
+
}
|
|
1346
|
+
if (Array.isArray(value)) {
|
|
1347
|
+
return false;
|
|
1348
|
+
}
|
|
1349
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
1350
|
+
"severity",
|
|
1351
|
+
"messageFormat",
|
|
1352
|
+
"syntaxPosition",
|
|
1353
|
+
"messageFormatSpecifierTypes",
|
|
1354
|
+
"arguments",
|
|
1355
|
+
"notificationType",
|
|
1356
|
+
"message"
|
|
1357
|
+
]);
|
|
1358
|
+
const hasAdditionalProperties = false;
|
|
1359
|
+
const requiredKeys = [];
|
|
1360
|
+
const optionalKeys = [
|
|
1361
|
+
"severity",
|
|
1362
|
+
"messageFormat",
|
|
1363
|
+
"syntaxPosition",
|
|
1364
|
+
"messageFormatSpecifierTypes",
|
|
1365
|
+
"arguments",
|
|
1366
|
+
"notificationType",
|
|
1367
|
+
"message"
|
|
1368
|
+
];
|
|
1369
|
+
const valKeys = new Set(Object.keys(value));
|
|
1370
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1371
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1372
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1373
|
+
}
|
|
1374
|
+
_MetadataNotificationTransformation2.isJson = isJson;
|
|
1375
|
+
function fromJson($model) {
|
|
689
1376
|
const {
|
|
690
1377
|
severity,
|
|
691
1378
|
messageFormat,
|
|
@@ -694,7 +1381,7 @@ var _MetadataNotificationTransformation;
|
|
|
694
1381
|
arguments: _arguments,
|
|
695
1382
|
notificationType,
|
|
696
1383
|
message
|
|
697
|
-
} = model;
|
|
1384
|
+
} = $model;
|
|
698
1385
|
return {
|
|
699
1386
|
severity,
|
|
700
1387
|
messageFormat,
|
|
@@ -706,7 +1393,7 @@ var _MetadataNotificationTransformation;
|
|
|
706
1393
|
};
|
|
707
1394
|
}
|
|
708
1395
|
_MetadataNotificationTransformation2.fromJson = fromJson;
|
|
709
|
-
function toJson(model) {
|
|
1396
|
+
function toJson($model) {
|
|
710
1397
|
const {
|
|
711
1398
|
severity,
|
|
712
1399
|
messageFormat,
|
|
@@ -715,7 +1402,7 @@ var _MetadataNotificationTransformation;
|
|
|
715
1402
|
arguments: _arguments,
|
|
716
1403
|
notificationType,
|
|
717
1404
|
message
|
|
718
|
-
} = model;
|
|
1405
|
+
} = $model;
|
|
719
1406
|
return {
|
|
720
1407
|
severity,
|
|
721
1408
|
messageFormat,
|
|
@@ -732,16 +1419,56 @@ var _MetadataNotificationTransformation;
|
|
|
732
1419
|
// packages/client/query/src/lib/models/verify-response.ts
|
|
733
1420
|
var _VerifyResponseTransformation;
|
|
734
1421
|
((_VerifyResponseTransformation2) => {
|
|
735
|
-
function
|
|
736
|
-
|
|
1422
|
+
function isVerifyResponse(value) {
|
|
1423
|
+
if (value === null) {
|
|
1424
|
+
return false;
|
|
1425
|
+
}
|
|
1426
|
+
if (value === void 0) {
|
|
1427
|
+
return false;
|
|
1428
|
+
}
|
|
1429
|
+
if (Array.isArray(value)) {
|
|
1430
|
+
return false;
|
|
1431
|
+
}
|
|
1432
|
+
const modelKeys = /* @__PURE__ */ new Set(["valid", "notifications"]);
|
|
1433
|
+
const hasAdditionalProperties = false;
|
|
1434
|
+
const requiredKeys = ["valid"];
|
|
1435
|
+
const optionalKeys = ["notifications"];
|
|
1436
|
+
const valKeys = new Set(Object.keys(value));
|
|
1437
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1438
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1439
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1440
|
+
}
|
|
1441
|
+
_VerifyResponseTransformation2.isVerifyResponse = isVerifyResponse;
|
|
1442
|
+
function isJson(value) {
|
|
1443
|
+
if (value === null) {
|
|
1444
|
+
return false;
|
|
1445
|
+
}
|
|
1446
|
+
if (value === void 0) {
|
|
1447
|
+
return false;
|
|
1448
|
+
}
|
|
1449
|
+
if (Array.isArray(value)) {
|
|
1450
|
+
return false;
|
|
1451
|
+
}
|
|
1452
|
+
const modelKeys = /* @__PURE__ */ new Set(["valid", "notifications"]);
|
|
1453
|
+
const hasAdditionalProperties = false;
|
|
1454
|
+
const requiredKeys = ["valid"];
|
|
1455
|
+
const optionalKeys = ["notifications"];
|
|
1456
|
+
const valKeys = new Set(Object.keys(value));
|
|
1457
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1458
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1459
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1460
|
+
}
|
|
1461
|
+
_VerifyResponseTransformation2.isJson = isJson;
|
|
1462
|
+
function fromJson($model) {
|
|
1463
|
+
const { valid, notifications } = $model;
|
|
737
1464
|
return {
|
|
738
1465
|
valid,
|
|
739
1466
|
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => _MetadataNotificationTransformation.fromJson(innerValue)) : void 0
|
|
740
1467
|
};
|
|
741
1468
|
}
|
|
742
1469
|
_VerifyResponseTransformation2.fromJson = fromJson;
|
|
743
|
-
function toJson(model) {
|
|
744
|
-
const { valid, notifications } = model;
|
|
1470
|
+
function toJson($model) {
|
|
1471
|
+
const { valid, notifications } = $model;
|
|
745
1472
|
return {
|
|
746
1473
|
valid,
|
|
747
1474
|
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => _MetadataNotificationTransformation.toJson(innerValue)) : void 0
|
|
@@ -835,7 +1562,7 @@ var QueryAssistanceClient = class {
|
|
|
835
1562
|
}
|
|
836
1563
|
}
|
|
837
1564
|
default: {
|
|
838
|
-
const responseValue = await response.body("text").catch();
|
|
1565
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
839
1566
|
throw new ClientRequestError(
|
|
840
1567
|
`${response.status}`,
|
|
841
1568
|
response,
|
|
@@ -928,7 +1655,7 @@ var QueryAssistanceClient = class {
|
|
|
928
1655
|
}
|
|
929
1656
|
}
|
|
930
1657
|
default: {
|
|
931
|
-
const responseValue = await response.body("text").catch();
|
|
1658
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
932
1659
|
throw new ClientRequestError(
|
|
933
1660
|
`${response.status}`,
|
|
934
1661
|
response,
|
|
@@ -1021,7 +1748,7 @@ var QueryAssistanceClient = class {
|
|
|
1021
1748
|
}
|
|
1022
1749
|
}
|
|
1023
1750
|
default: {
|
|
1024
|
-
const responseValue = await response.body("text").catch();
|
|
1751
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
1025
1752
|
throw new ClientRequestError(
|
|
1026
1753
|
`${response.status}`,
|
|
1027
1754
|
response,
|
|
@@ -1040,7 +1767,93 @@ var import_http_client2 = require("@dynatrace-sdk/http-client");
|
|
|
1040
1767
|
// packages/client/query/src/lib/models/execute-request.ts
|
|
1041
1768
|
var _ExecuteRequestTransformation;
|
|
1042
1769
|
((_ExecuteRequestTransformation2) => {
|
|
1043
|
-
function
|
|
1770
|
+
function isExecuteRequest(value) {
|
|
1771
|
+
if (value === null) {
|
|
1772
|
+
return false;
|
|
1773
|
+
}
|
|
1774
|
+
if (value === void 0) {
|
|
1775
|
+
return false;
|
|
1776
|
+
}
|
|
1777
|
+
if (Array.isArray(value)) {
|
|
1778
|
+
return false;
|
|
1779
|
+
}
|
|
1780
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
1781
|
+
"query",
|
|
1782
|
+
"defaultTimeframeStart",
|
|
1783
|
+
"defaultTimeframeEnd",
|
|
1784
|
+
"timezone",
|
|
1785
|
+
"locale",
|
|
1786
|
+
"maxResultRecords",
|
|
1787
|
+
"fetchTimeoutSeconds",
|
|
1788
|
+
"requestTimeoutMilliseconds",
|
|
1789
|
+
"enablePreview",
|
|
1790
|
+
"defaultSamplingRatio",
|
|
1791
|
+
"defaultScanLimitGbytes"
|
|
1792
|
+
]);
|
|
1793
|
+
const hasAdditionalProperties = false;
|
|
1794
|
+
const requiredKeys = ["query"];
|
|
1795
|
+
const optionalKeys = [
|
|
1796
|
+
"defaultTimeframeStart",
|
|
1797
|
+
"defaultTimeframeEnd",
|
|
1798
|
+
"timezone",
|
|
1799
|
+
"locale",
|
|
1800
|
+
"maxResultRecords",
|
|
1801
|
+
"fetchTimeoutSeconds",
|
|
1802
|
+
"requestTimeoutMilliseconds",
|
|
1803
|
+
"enablePreview",
|
|
1804
|
+
"defaultSamplingRatio",
|
|
1805
|
+
"defaultScanLimitGbytes"
|
|
1806
|
+
];
|
|
1807
|
+
const valKeys = new Set(Object.keys(value));
|
|
1808
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1809
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1810
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1811
|
+
}
|
|
1812
|
+
_ExecuteRequestTransformation2.isExecuteRequest = isExecuteRequest;
|
|
1813
|
+
function isJson(value) {
|
|
1814
|
+
if (value === null) {
|
|
1815
|
+
return false;
|
|
1816
|
+
}
|
|
1817
|
+
if (value === void 0) {
|
|
1818
|
+
return false;
|
|
1819
|
+
}
|
|
1820
|
+
if (Array.isArray(value)) {
|
|
1821
|
+
return false;
|
|
1822
|
+
}
|
|
1823
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
1824
|
+
"query",
|
|
1825
|
+
"defaultTimeframeStart",
|
|
1826
|
+
"defaultTimeframeEnd",
|
|
1827
|
+
"timezone",
|
|
1828
|
+
"locale",
|
|
1829
|
+
"maxResultRecords",
|
|
1830
|
+
"fetchTimeoutSeconds",
|
|
1831
|
+
"requestTimeoutMilliseconds",
|
|
1832
|
+
"enablePreview",
|
|
1833
|
+
"defaultSamplingRatio",
|
|
1834
|
+
"defaultScanLimitGbytes"
|
|
1835
|
+
]);
|
|
1836
|
+
const hasAdditionalProperties = false;
|
|
1837
|
+
const requiredKeys = ["query"];
|
|
1838
|
+
const optionalKeys = [
|
|
1839
|
+
"defaultTimeframeStart",
|
|
1840
|
+
"defaultTimeframeEnd",
|
|
1841
|
+
"timezone",
|
|
1842
|
+
"locale",
|
|
1843
|
+
"maxResultRecords",
|
|
1844
|
+
"fetchTimeoutSeconds",
|
|
1845
|
+
"requestTimeoutMilliseconds",
|
|
1846
|
+
"enablePreview",
|
|
1847
|
+
"defaultSamplingRatio",
|
|
1848
|
+
"defaultScanLimitGbytes"
|
|
1849
|
+
];
|
|
1850
|
+
const valKeys = new Set(Object.keys(value));
|
|
1851
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1852
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1853
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1854
|
+
}
|
|
1855
|
+
_ExecuteRequestTransformation2.isJson = isJson;
|
|
1856
|
+
function fromJson($model) {
|
|
1044
1857
|
const {
|
|
1045
1858
|
query,
|
|
1046
1859
|
defaultTimeframeStart,
|
|
@@ -1053,7 +1866,7 @@ var _ExecuteRequestTransformation;
|
|
|
1053
1866
|
enablePreview,
|
|
1054
1867
|
defaultSamplingRatio,
|
|
1055
1868
|
defaultScanLimitGbytes
|
|
1056
|
-
} = model;
|
|
1869
|
+
} = $model;
|
|
1057
1870
|
return {
|
|
1058
1871
|
query,
|
|
1059
1872
|
defaultTimeframeStart,
|
|
@@ -1069,7 +1882,7 @@ var _ExecuteRequestTransformation;
|
|
|
1069
1882
|
};
|
|
1070
1883
|
}
|
|
1071
1884
|
_ExecuteRequestTransformation2.fromJson = fromJson;
|
|
1072
|
-
function toJson(model) {
|
|
1885
|
+
function toJson($model) {
|
|
1073
1886
|
const {
|
|
1074
1887
|
query,
|
|
1075
1888
|
defaultTimeframeStart,
|
|
@@ -1082,7 +1895,7 @@ var _ExecuteRequestTransformation;
|
|
|
1082
1895
|
enablePreview,
|
|
1083
1896
|
defaultSamplingRatio,
|
|
1084
1897
|
defaultScanLimitGbytes
|
|
1085
|
-
} = model;
|
|
1898
|
+
} = $model;
|
|
1086
1899
|
return {
|
|
1087
1900
|
query,
|
|
1088
1901
|
defaultTimeframeStart,
|
|
@@ -1103,16 +1916,56 @@ var _ExecuteRequestTransformation;
|
|
|
1103
1916
|
// packages/client/query/src/lib/models/timeframe.ts
|
|
1104
1917
|
var _TimeframeTransformation;
|
|
1105
1918
|
((_TimeframeTransformation2) => {
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1919
|
+
function isTimeframe(value) {
|
|
1920
|
+
if (value === null) {
|
|
1921
|
+
return false;
|
|
1922
|
+
}
|
|
1923
|
+
if (value === void 0) {
|
|
1924
|
+
return false;
|
|
1925
|
+
}
|
|
1926
|
+
if (Array.isArray(value)) {
|
|
1927
|
+
return false;
|
|
1928
|
+
}
|
|
1929
|
+
const modelKeys = /* @__PURE__ */ new Set(["start", "end"]);
|
|
1930
|
+
const hasAdditionalProperties = false;
|
|
1931
|
+
const requiredKeys = [];
|
|
1932
|
+
const optionalKeys = ["start", "end"];
|
|
1933
|
+
const valKeys = new Set(Object.keys(value));
|
|
1934
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1935
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1936
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1937
|
+
}
|
|
1938
|
+
_TimeframeTransformation2.isTimeframe = isTimeframe;
|
|
1939
|
+
function isJson(value) {
|
|
1940
|
+
if (value === null) {
|
|
1941
|
+
return false;
|
|
1942
|
+
}
|
|
1943
|
+
if (value === void 0) {
|
|
1944
|
+
return false;
|
|
1945
|
+
}
|
|
1946
|
+
if (Array.isArray(value)) {
|
|
1947
|
+
return false;
|
|
1948
|
+
}
|
|
1949
|
+
const modelKeys = /* @__PURE__ */ new Set(["start", "end"]);
|
|
1950
|
+
const hasAdditionalProperties = false;
|
|
1951
|
+
const requiredKeys = [];
|
|
1952
|
+
const optionalKeys = ["start", "end"];
|
|
1953
|
+
const valKeys = new Set(Object.keys(value));
|
|
1954
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1955
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1956
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
1957
|
+
}
|
|
1958
|
+
_TimeframeTransformation2.isJson = isJson;
|
|
1959
|
+
function fromJson($model) {
|
|
1960
|
+
const { start, end } = $model;
|
|
1108
1961
|
return {
|
|
1109
1962
|
start: start !== void 0 && start !== null ? new Date(start) : void 0,
|
|
1110
1963
|
end: end !== void 0 && end !== null ? new Date(end) : void 0
|
|
1111
1964
|
};
|
|
1112
1965
|
}
|
|
1113
1966
|
_TimeframeTransformation2.fromJson = fromJson;
|
|
1114
|
-
function toJson(model) {
|
|
1115
|
-
const { start, end } = model;
|
|
1967
|
+
function toJson($model) {
|
|
1968
|
+
const { start, end } = $model;
|
|
1116
1969
|
return {
|
|
1117
1970
|
start: start !== void 0 && start !== null ? start.toISOString() : void 0,
|
|
1118
1971
|
end: end !== void 0 && end !== null ? end.toISOString() : void 0
|
|
@@ -1124,7 +1977,95 @@ var _TimeframeTransformation;
|
|
|
1124
1977
|
// packages/client/query/src/lib/models/grail-metadata.ts
|
|
1125
1978
|
var _GrailMetadataTransformation;
|
|
1126
1979
|
((_GrailMetadataTransformation2) => {
|
|
1127
|
-
function
|
|
1980
|
+
function isGrailMetadata(value) {
|
|
1981
|
+
if (value === null) {
|
|
1982
|
+
return false;
|
|
1983
|
+
}
|
|
1984
|
+
if (value === void 0) {
|
|
1985
|
+
return false;
|
|
1986
|
+
}
|
|
1987
|
+
if (Array.isArray(value)) {
|
|
1988
|
+
return false;
|
|
1989
|
+
}
|
|
1990
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
1991
|
+
"canonicalQuery",
|
|
1992
|
+
"timezone",
|
|
1993
|
+
"query",
|
|
1994
|
+
"scannedRecords",
|
|
1995
|
+
"dqlVersion",
|
|
1996
|
+
"scannedBytes",
|
|
1997
|
+
"analysisTimeframe",
|
|
1998
|
+
"locale",
|
|
1999
|
+
"executionTimeMilliseconds",
|
|
2000
|
+
"notifications",
|
|
2001
|
+
"queryId"
|
|
2002
|
+
]);
|
|
2003
|
+
const hasAdditionalProperties = false;
|
|
2004
|
+
const requiredKeys = [];
|
|
2005
|
+
const optionalKeys = [
|
|
2006
|
+
"canonicalQuery",
|
|
2007
|
+
"timezone",
|
|
2008
|
+
"query",
|
|
2009
|
+
"scannedRecords",
|
|
2010
|
+
"dqlVersion",
|
|
2011
|
+
"scannedBytes",
|
|
2012
|
+
"analysisTimeframe",
|
|
2013
|
+
"locale",
|
|
2014
|
+
"executionTimeMilliseconds",
|
|
2015
|
+
"notifications",
|
|
2016
|
+
"queryId"
|
|
2017
|
+
];
|
|
2018
|
+
const valKeys = new Set(Object.keys(value));
|
|
2019
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2020
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2021
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2022
|
+
}
|
|
2023
|
+
_GrailMetadataTransformation2.isGrailMetadata = isGrailMetadata;
|
|
2024
|
+
function isJson(value) {
|
|
2025
|
+
if (value === null) {
|
|
2026
|
+
return false;
|
|
2027
|
+
}
|
|
2028
|
+
if (value === void 0) {
|
|
2029
|
+
return false;
|
|
2030
|
+
}
|
|
2031
|
+
if (Array.isArray(value)) {
|
|
2032
|
+
return false;
|
|
2033
|
+
}
|
|
2034
|
+
const modelKeys = /* @__PURE__ */ new Set([
|
|
2035
|
+
"canonicalQuery",
|
|
2036
|
+
"timezone",
|
|
2037
|
+
"query",
|
|
2038
|
+
"scannedRecords",
|
|
2039
|
+
"dqlVersion",
|
|
2040
|
+
"scannedBytes",
|
|
2041
|
+
"analysisTimeframe",
|
|
2042
|
+
"locale",
|
|
2043
|
+
"executionTimeMilliseconds",
|
|
2044
|
+
"notifications",
|
|
2045
|
+
"queryId"
|
|
2046
|
+
]);
|
|
2047
|
+
const hasAdditionalProperties = false;
|
|
2048
|
+
const requiredKeys = [];
|
|
2049
|
+
const optionalKeys = [
|
|
2050
|
+
"canonicalQuery",
|
|
2051
|
+
"timezone",
|
|
2052
|
+
"query",
|
|
2053
|
+
"scannedRecords",
|
|
2054
|
+
"dqlVersion",
|
|
2055
|
+
"scannedBytes",
|
|
2056
|
+
"analysisTimeframe",
|
|
2057
|
+
"locale",
|
|
2058
|
+
"executionTimeMilliseconds",
|
|
2059
|
+
"notifications",
|
|
2060
|
+
"queryId"
|
|
2061
|
+
];
|
|
2062
|
+
const valKeys = new Set(Object.keys(value));
|
|
2063
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2064
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2065
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2066
|
+
}
|
|
2067
|
+
_GrailMetadataTransformation2.isJson = isJson;
|
|
2068
|
+
function fromJson($model) {
|
|
1128
2069
|
const {
|
|
1129
2070
|
canonicalQuery,
|
|
1130
2071
|
timezone,
|
|
@@ -1137,7 +2078,7 @@ var _GrailMetadataTransformation;
|
|
|
1137
2078
|
executionTimeMilliseconds,
|
|
1138
2079
|
notifications,
|
|
1139
2080
|
queryId
|
|
1140
|
-
} = model;
|
|
2081
|
+
} = $model;
|
|
1141
2082
|
return {
|
|
1142
2083
|
canonicalQuery,
|
|
1143
2084
|
timezone,
|
|
@@ -1153,7 +2094,7 @@ var _GrailMetadataTransformation;
|
|
|
1153
2094
|
};
|
|
1154
2095
|
}
|
|
1155
2096
|
_GrailMetadataTransformation2.fromJson = fromJson;
|
|
1156
|
-
function toJson(model) {
|
|
2097
|
+
function toJson($model) {
|
|
1157
2098
|
const {
|
|
1158
2099
|
canonicalQuery,
|
|
1159
2100
|
timezone,
|
|
@@ -1166,7 +2107,7 @@ var _GrailMetadataTransformation;
|
|
|
1166
2107
|
executionTimeMilliseconds,
|
|
1167
2108
|
notifications,
|
|
1168
2109
|
queryId
|
|
1169
|
-
} = model;
|
|
2110
|
+
} = $model;
|
|
1170
2111
|
return {
|
|
1171
2112
|
canonicalQuery,
|
|
1172
2113
|
timezone,
|
|
@@ -1187,8 +2128,48 @@ var _GrailMetadataTransformation;
|
|
|
1187
2128
|
// packages/client/query/src/lib/models/metric-metadata.ts
|
|
1188
2129
|
var _MetricMetadataTransformation;
|
|
1189
2130
|
((_MetricMetadataTransformation2) => {
|
|
1190
|
-
function
|
|
1191
|
-
|
|
2131
|
+
function isMetricMetadata(value) {
|
|
2132
|
+
if (value === null) {
|
|
2133
|
+
return false;
|
|
2134
|
+
}
|
|
2135
|
+
if (value === void 0) {
|
|
2136
|
+
return false;
|
|
2137
|
+
}
|
|
2138
|
+
if (Array.isArray(value)) {
|
|
2139
|
+
return false;
|
|
2140
|
+
}
|
|
2141
|
+
const modelKeys = /* @__PURE__ */ new Set(["metric.key", "displayName", "description", "unit"]);
|
|
2142
|
+
const hasAdditionalProperties = false;
|
|
2143
|
+
const requiredKeys = [];
|
|
2144
|
+
const optionalKeys = ["metric.key", "displayName", "description", "unit"];
|
|
2145
|
+
const valKeys = new Set(Object.keys(value));
|
|
2146
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2147
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2148
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2149
|
+
}
|
|
2150
|
+
_MetricMetadataTransformation2.isMetricMetadata = isMetricMetadata;
|
|
2151
|
+
function isJson(value) {
|
|
2152
|
+
if (value === null) {
|
|
2153
|
+
return false;
|
|
2154
|
+
}
|
|
2155
|
+
if (value === void 0) {
|
|
2156
|
+
return false;
|
|
2157
|
+
}
|
|
2158
|
+
if (Array.isArray(value)) {
|
|
2159
|
+
return false;
|
|
2160
|
+
}
|
|
2161
|
+
const modelKeys = /* @__PURE__ */ new Set(["metric.key", "displayName", "description", "unit"]);
|
|
2162
|
+
const hasAdditionalProperties = false;
|
|
2163
|
+
const requiredKeys = [];
|
|
2164
|
+
const optionalKeys = ["metric.key", "displayName", "description", "unit"];
|
|
2165
|
+
const valKeys = new Set(Object.keys(value));
|
|
2166
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2167
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2168
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2169
|
+
}
|
|
2170
|
+
_MetricMetadataTransformation2.isJson = isJson;
|
|
2171
|
+
function fromJson($model) {
|
|
2172
|
+
const { "metric.key": metricKey, displayName, description, unit } = $model;
|
|
1192
2173
|
return {
|
|
1193
2174
|
"metric.key": metricKey,
|
|
1194
2175
|
displayName,
|
|
@@ -1197,8 +2178,8 @@ var _MetricMetadataTransformation;
|
|
|
1197
2178
|
};
|
|
1198
2179
|
}
|
|
1199
2180
|
_MetricMetadataTransformation2.fromJson = fromJson;
|
|
1200
|
-
function toJson(model) {
|
|
1201
|
-
const { "metric.key": metricKey, displayName, description, unit } = model;
|
|
2181
|
+
function toJson($model) {
|
|
2182
|
+
const { "metric.key": metricKey, displayName, description, unit } = $model;
|
|
1202
2183
|
return {
|
|
1203
2184
|
"metric.key": metricKey,
|
|
1204
2185
|
displayName,
|
|
@@ -1212,16 +2193,56 @@ var _MetricMetadataTransformation;
|
|
|
1212
2193
|
// packages/client/query/src/lib/models/metadata.ts
|
|
1213
2194
|
var _MetadataTransformation;
|
|
1214
2195
|
((_MetadataTransformation2) => {
|
|
1215
|
-
function
|
|
1216
|
-
|
|
2196
|
+
function isMetadata(value) {
|
|
2197
|
+
if (value === null) {
|
|
2198
|
+
return false;
|
|
2199
|
+
}
|
|
2200
|
+
if (value === void 0) {
|
|
2201
|
+
return false;
|
|
2202
|
+
}
|
|
2203
|
+
if (Array.isArray(value)) {
|
|
2204
|
+
return false;
|
|
2205
|
+
}
|
|
2206
|
+
const modelKeys = /* @__PURE__ */ new Set(["grail", "metrics"]);
|
|
2207
|
+
const hasAdditionalProperties = false;
|
|
2208
|
+
const requiredKeys = [];
|
|
2209
|
+
const optionalKeys = ["grail", "metrics"];
|
|
2210
|
+
const valKeys = new Set(Object.keys(value));
|
|
2211
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2212
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2213
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2214
|
+
}
|
|
2215
|
+
_MetadataTransformation2.isMetadata = isMetadata;
|
|
2216
|
+
function isJson(value) {
|
|
2217
|
+
if (value === null) {
|
|
2218
|
+
return false;
|
|
2219
|
+
}
|
|
2220
|
+
if (value === void 0) {
|
|
2221
|
+
return false;
|
|
2222
|
+
}
|
|
2223
|
+
if (Array.isArray(value)) {
|
|
2224
|
+
return false;
|
|
2225
|
+
}
|
|
2226
|
+
const modelKeys = /* @__PURE__ */ new Set(["grail", "metrics"]);
|
|
2227
|
+
const hasAdditionalProperties = false;
|
|
2228
|
+
const requiredKeys = [];
|
|
2229
|
+
const optionalKeys = ["grail", "metrics"];
|
|
2230
|
+
const valKeys = new Set(Object.keys(value));
|
|
2231
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2232
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2233
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2234
|
+
}
|
|
2235
|
+
_MetadataTransformation2.isJson = isJson;
|
|
2236
|
+
function fromJson($model) {
|
|
2237
|
+
const { grail, metrics } = $model;
|
|
1217
2238
|
return {
|
|
1218
2239
|
grail: grail !== void 0 && grail !== null ? _GrailMetadataTransformation.fromJson(grail) : void 0,
|
|
1219
2240
|
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => _MetricMetadataTransformation.fromJson(innerValue)) : void 0
|
|
1220
2241
|
};
|
|
1221
2242
|
}
|
|
1222
2243
|
_MetadataTransformation2.fromJson = fromJson;
|
|
1223
|
-
function toJson(model) {
|
|
1224
|
-
const { grail, metrics } = model;
|
|
2244
|
+
function toJson($model) {
|
|
2245
|
+
const { grail, metrics } = $model;
|
|
1225
2246
|
return {
|
|
1226
2247
|
grail: grail !== void 0 && grail !== null ? _GrailMetadataTransformation.toJson(grail) : void 0,
|
|
1227
2248
|
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => _MetricMetadataTransformation.toJson(innerValue)) : void 0
|
|
@@ -1256,16 +2277,56 @@ var _FieldTypeTypeTransformation;
|
|
|
1256
2277
|
// packages/client/query/src/lib/models/field-type.ts
|
|
1257
2278
|
var _FieldTypeTransformation;
|
|
1258
2279
|
((_FieldTypeTransformation2) => {
|
|
1259
|
-
function
|
|
1260
|
-
|
|
2280
|
+
function isFieldType(value) {
|
|
2281
|
+
if (value === null) {
|
|
2282
|
+
return false;
|
|
2283
|
+
}
|
|
2284
|
+
if (value === void 0) {
|
|
2285
|
+
return false;
|
|
2286
|
+
}
|
|
2287
|
+
if (Array.isArray(value)) {
|
|
2288
|
+
return false;
|
|
2289
|
+
}
|
|
2290
|
+
const modelKeys = /* @__PURE__ */ new Set(["type", "types"]);
|
|
2291
|
+
const hasAdditionalProperties = false;
|
|
2292
|
+
const requiredKeys = ["type"];
|
|
2293
|
+
const optionalKeys = ["types"];
|
|
2294
|
+
const valKeys = new Set(Object.keys(value));
|
|
2295
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2296
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2297
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2298
|
+
}
|
|
2299
|
+
_FieldTypeTransformation2.isFieldType = isFieldType;
|
|
2300
|
+
function isJson(value) {
|
|
2301
|
+
if (value === null) {
|
|
2302
|
+
return false;
|
|
2303
|
+
}
|
|
2304
|
+
if (value === void 0) {
|
|
2305
|
+
return false;
|
|
2306
|
+
}
|
|
2307
|
+
if (Array.isArray(value)) {
|
|
2308
|
+
return false;
|
|
2309
|
+
}
|
|
2310
|
+
const modelKeys = /* @__PURE__ */ new Set(["type", "types"]);
|
|
2311
|
+
const hasAdditionalProperties = false;
|
|
2312
|
+
const requiredKeys = ["type"];
|
|
2313
|
+
const optionalKeys = ["types"];
|
|
2314
|
+
const valKeys = new Set(Object.keys(value));
|
|
2315
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2316
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2317
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2318
|
+
}
|
|
2319
|
+
_FieldTypeTransformation2.isJson = isJson;
|
|
2320
|
+
function fromJson($model) {
|
|
2321
|
+
const { type, types } = $model;
|
|
1261
2322
|
return {
|
|
1262
2323
|
type: _FieldTypeTypeTransformation.fromJson(type),
|
|
1263
2324
|
types: types !== void 0 && types !== null ? types?.map((innerValue) => _RangedFieldTypesTransformation.fromJson(innerValue)) : void 0
|
|
1264
2325
|
};
|
|
1265
2326
|
}
|
|
1266
2327
|
_FieldTypeTransformation2.fromJson = fromJson;
|
|
1267
|
-
function toJson(model) {
|
|
1268
|
-
const { type, types } = model;
|
|
2328
|
+
function toJson($model) {
|
|
2329
|
+
const { type, types } = $model;
|
|
1269
2330
|
return {
|
|
1270
2331
|
type: _FieldTypeTypeTransformation.toJson(type),
|
|
1271
2332
|
types: types !== void 0 && types !== null ? types?.map((innerValue) => _RangedFieldTypesTransformation.toJson(innerValue)) : void 0
|
|
@@ -1277,8 +2338,48 @@ var _FieldTypeTransformation;
|
|
|
1277
2338
|
// packages/client/query/src/lib/models/ranged-field-types-mappings.ts
|
|
1278
2339
|
var _RangedFieldTypesMappingsTransformation;
|
|
1279
2340
|
((_RangedFieldTypesMappingsTransformation2) => {
|
|
1280
|
-
function
|
|
1281
|
-
|
|
2341
|
+
function isRangedFieldTypesMappings(value) {
|
|
2342
|
+
if (value === null) {
|
|
2343
|
+
return false;
|
|
2344
|
+
}
|
|
2345
|
+
if (value === void 0) {
|
|
2346
|
+
return false;
|
|
2347
|
+
}
|
|
2348
|
+
if (Array.isArray(value)) {
|
|
2349
|
+
return false;
|
|
2350
|
+
}
|
|
2351
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
2352
|
+
const hasAdditionalProperties = true;
|
|
2353
|
+
const requiredKeys = [];
|
|
2354
|
+
const optionalKeys = [];
|
|
2355
|
+
const valKeys = new Set(Object.keys(value));
|
|
2356
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2357
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2358
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2359
|
+
}
|
|
2360
|
+
_RangedFieldTypesMappingsTransformation2.isRangedFieldTypesMappings = isRangedFieldTypesMappings;
|
|
2361
|
+
function isJson(value) {
|
|
2362
|
+
if (value === null) {
|
|
2363
|
+
return false;
|
|
2364
|
+
}
|
|
2365
|
+
if (value === void 0) {
|
|
2366
|
+
return false;
|
|
2367
|
+
}
|
|
2368
|
+
if (Array.isArray(value)) {
|
|
2369
|
+
return false;
|
|
2370
|
+
}
|
|
2371
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
2372
|
+
const hasAdditionalProperties = true;
|
|
2373
|
+
const requiredKeys = [];
|
|
2374
|
+
const optionalKeys = [];
|
|
2375
|
+
const valKeys = new Set(Object.keys(value));
|
|
2376
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2377
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2378
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2379
|
+
}
|
|
2380
|
+
_RangedFieldTypesMappingsTransformation2.isJson = isJson;
|
|
2381
|
+
function fromJson($model) {
|
|
2382
|
+
const additionalProps = $model;
|
|
1282
2383
|
return {
|
|
1283
2384
|
...Object.fromEntries(
|
|
1284
2385
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
@@ -1289,8 +2390,8 @@ var _RangedFieldTypesMappingsTransformation;
|
|
|
1289
2390
|
};
|
|
1290
2391
|
}
|
|
1291
2392
|
_RangedFieldTypesMappingsTransformation2.fromJson = fromJson;
|
|
1292
|
-
function toJson(model) {
|
|
1293
|
-
const additionalProps = model;
|
|
2393
|
+
function toJson($model) {
|
|
2394
|
+
const additionalProps = $model;
|
|
1294
2395
|
return {
|
|
1295
2396
|
...Object.fromEntries(
|
|
1296
2397
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
@@ -1306,16 +2407,56 @@ var _RangedFieldTypesMappingsTransformation;
|
|
|
1306
2407
|
// packages/client/query/src/lib/models/ranged-field-types.ts
|
|
1307
2408
|
var _RangedFieldTypesTransformation;
|
|
1308
2409
|
((_RangedFieldTypesTransformation2) => {
|
|
1309
|
-
function
|
|
1310
|
-
|
|
2410
|
+
function isRangedFieldTypes(value) {
|
|
2411
|
+
if (value === null) {
|
|
2412
|
+
return false;
|
|
2413
|
+
}
|
|
2414
|
+
if (value === void 0) {
|
|
2415
|
+
return false;
|
|
2416
|
+
}
|
|
2417
|
+
if (Array.isArray(value)) {
|
|
2418
|
+
return false;
|
|
2419
|
+
}
|
|
2420
|
+
const modelKeys = /* @__PURE__ */ new Set(["mappings", "indexRange"]);
|
|
2421
|
+
const hasAdditionalProperties = false;
|
|
2422
|
+
const requiredKeys = ["mappings"];
|
|
2423
|
+
const optionalKeys = ["indexRange"];
|
|
2424
|
+
const valKeys = new Set(Object.keys(value));
|
|
2425
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2426
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2427
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2428
|
+
}
|
|
2429
|
+
_RangedFieldTypesTransformation2.isRangedFieldTypes = isRangedFieldTypes;
|
|
2430
|
+
function isJson(value) {
|
|
2431
|
+
if (value === null) {
|
|
2432
|
+
return false;
|
|
2433
|
+
}
|
|
2434
|
+
if (value === void 0) {
|
|
2435
|
+
return false;
|
|
2436
|
+
}
|
|
2437
|
+
if (Array.isArray(value)) {
|
|
2438
|
+
return false;
|
|
2439
|
+
}
|
|
2440
|
+
const modelKeys = /* @__PURE__ */ new Set(["mappings", "indexRange"]);
|
|
2441
|
+
const hasAdditionalProperties = false;
|
|
2442
|
+
const requiredKeys = ["mappings"];
|
|
2443
|
+
const optionalKeys = ["indexRange"];
|
|
2444
|
+
const valKeys = new Set(Object.keys(value));
|
|
2445
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2446
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2447
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2448
|
+
}
|
|
2449
|
+
_RangedFieldTypesTransformation2.isJson = isJson;
|
|
2450
|
+
function fromJson($model) {
|
|
2451
|
+
const { mappings, indexRange } = $model;
|
|
1311
2452
|
return {
|
|
1312
2453
|
mappings: _RangedFieldTypesMappingsTransformation.fromJson(mappings),
|
|
1313
2454
|
indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
|
|
1314
2455
|
};
|
|
1315
2456
|
}
|
|
1316
2457
|
_RangedFieldTypesTransformation2.fromJson = fromJson;
|
|
1317
|
-
function toJson(model) {
|
|
1318
|
-
const { mappings, indexRange } = model;
|
|
2458
|
+
function toJson($model) {
|
|
2459
|
+
const { mappings, indexRange } = $model;
|
|
1319
2460
|
return {
|
|
1320
2461
|
mappings: _RangedFieldTypesMappingsTransformation.toJson(mappings),
|
|
1321
2462
|
indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
|
|
@@ -1324,15 +2465,192 @@ var _RangedFieldTypesTransformation;
|
|
|
1324
2465
|
_RangedFieldTypesTransformation2.toJson = toJson;
|
|
1325
2466
|
})(_RangedFieldTypesTransformation || (_RangedFieldTypesTransformation = {}));
|
|
1326
2467
|
|
|
2468
|
+
// packages/client/query/src/lib/models/geo-point.ts
|
|
2469
|
+
var _GeoPointTransformation;
|
|
2470
|
+
((_GeoPointTransformation2) => {
|
|
2471
|
+
function isGeoPoint(value) {
|
|
2472
|
+
if (value === null) {
|
|
2473
|
+
return false;
|
|
2474
|
+
}
|
|
2475
|
+
if (value === void 0) {
|
|
2476
|
+
return false;
|
|
2477
|
+
}
|
|
2478
|
+
if (Array.isArray(value)) {
|
|
2479
|
+
return false;
|
|
2480
|
+
}
|
|
2481
|
+
const modelKeys = /* @__PURE__ */ new Set(["latitude", "longitude"]);
|
|
2482
|
+
const hasAdditionalProperties = false;
|
|
2483
|
+
const requiredKeys = ["latitude", "longitude"];
|
|
2484
|
+
const optionalKeys = [];
|
|
2485
|
+
const valKeys = new Set(Object.keys(value));
|
|
2486
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2487
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2488
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2489
|
+
}
|
|
2490
|
+
_GeoPointTransformation2.isGeoPoint = isGeoPoint;
|
|
2491
|
+
function isJson(value) {
|
|
2492
|
+
if (value === null) {
|
|
2493
|
+
return false;
|
|
2494
|
+
}
|
|
2495
|
+
if (value === void 0) {
|
|
2496
|
+
return false;
|
|
2497
|
+
}
|
|
2498
|
+
if (Array.isArray(value)) {
|
|
2499
|
+
return false;
|
|
2500
|
+
}
|
|
2501
|
+
const modelKeys = /* @__PURE__ */ new Set(["latitude", "longitude"]);
|
|
2502
|
+
const hasAdditionalProperties = false;
|
|
2503
|
+
const requiredKeys = ["latitude", "longitude"];
|
|
2504
|
+
const optionalKeys = [];
|
|
2505
|
+
const valKeys = new Set(Object.keys(value));
|
|
2506
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2507
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2508
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2509
|
+
}
|
|
2510
|
+
_GeoPointTransformation2.isJson = isJson;
|
|
2511
|
+
function fromJson($model) {
|
|
2512
|
+
const { latitude, longitude } = $model;
|
|
2513
|
+
return {
|
|
2514
|
+
latitude,
|
|
2515
|
+
longitude
|
|
2516
|
+
};
|
|
2517
|
+
}
|
|
2518
|
+
_GeoPointTransformation2.fromJson = fromJson;
|
|
2519
|
+
function toJson($model) {
|
|
2520
|
+
const { latitude, longitude } = $model;
|
|
2521
|
+
return {
|
|
2522
|
+
latitude,
|
|
2523
|
+
longitude
|
|
2524
|
+
};
|
|
2525
|
+
}
|
|
2526
|
+
_GeoPointTransformation2.toJson = toJson;
|
|
2527
|
+
})(_GeoPointTransformation || (_GeoPointTransformation = {}));
|
|
2528
|
+
|
|
1327
2529
|
// packages/client/query/src/lib/models/result-record-value.ts
|
|
1328
2530
|
var _ResultRecordValueTransformation;
|
|
1329
2531
|
((_ResultRecordValueTransformation2) => {
|
|
2532
|
+
function checkBoolean(value) {
|
|
2533
|
+
return typeof value === "boolean";
|
|
2534
|
+
}
|
|
2535
|
+
_ResultRecordValueTransformation2.checkBoolean = checkBoolean;
|
|
2536
|
+
function checkNumber(value) {
|
|
2537
|
+
return typeof value === "number";
|
|
2538
|
+
}
|
|
2539
|
+
_ResultRecordValueTransformation2.checkNumber = checkNumber;
|
|
2540
|
+
function checkString(value) {
|
|
2541
|
+
return typeof value === "string";
|
|
2542
|
+
}
|
|
2543
|
+
_ResultRecordValueTransformation2.checkString = checkString;
|
|
2544
|
+
function checkTimeframe(value) {
|
|
2545
|
+
return _TimeframeTransformation.isTimeframe(value);
|
|
2546
|
+
}
|
|
2547
|
+
_ResultRecordValueTransformation2.checkTimeframe = checkTimeframe;
|
|
2548
|
+
function checkGeoPoint(value) {
|
|
2549
|
+
return _GeoPointTransformation.isGeoPoint(value);
|
|
2550
|
+
}
|
|
2551
|
+
_ResultRecordValueTransformation2.checkGeoPoint = checkGeoPoint;
|
|
2552
|
+
function checkResultRecord(value) {
|
|
2553
|
+
return _ResultRecordTransformation.isResultRecord(value);
|
|
2554
|
+
}
|
|
2555
|
+
_ResultRecordValueTransformation2.checkResultRecord = checkResultRecord;
|
|
2556
|
+
function checkArrayResultRecordValueNullItemDatatype(value) {
|
|
2557
|
+
return _ResultRecordValueTransformation2.isResultRecordValue(value);
|
|
2558
|
+
}
|
|
2559
|
+
_ResultRecordValueTransformation2.checkArrayResultRecordValueNullItemDatatype = checkArrayResultRecordValueNullItemDatatype;
|
|
2560
|
+
function checkArrayResultRecordValue(value) {
|
|
2561
|
+
const datatypeMatch = (val) => checkArrayResultRecordValueNullItemDatatype(val);
|
|
2562
|
+
return Array.isArray(value) && value.every(datatypeMatch);
|
|
2563
|
+
}
|
|
2564
|
+
_ResultRecordValueTransformation2.checkArrayResultRecordValue = checkArrayResultRecordValue;
|
|
2565
|
+
function isResultRecordValue(value) {
|
|
2566
|
+
return checkBoolean(value) || checkNumber(value) || checkString(value) || checkTimeframe(value) || checkGeoPoint(value) || checkResultRecord(value) || checkArrayResultRecordValue(value) || value === null;
|
|
2567
|
+
}
|
|
2568
|
+
_ResultRecordValueTransformation2.isResultRecordValue = isResultRecordValue;
|
|
2569
|
+
function checkTimeframeAsJson(value) {
|
|
2570
|
+
return _TimeframeTransformation.isJson(value);
|
|
2571
|
+
}
|
|
2572
|
+
_ResultRecordValueTransformation2.checkTimeframeAsJson = checkTimeframeAsJson;
|
|
2573
|
+
function checkGeoPointAsJson(value) {
|
|
2574
|
+
return _GeoPointTransformation.isJson(value);
|
|
2575
|
+
}
|
|
2576
|
+
_ResultRecordValueTransformation2.checkGeoPointAsJson = checkGeoPointAsJson;
|
|
2577
|
+
function checkResultRecordAsJson(value) {
|
|
2578
|
+
return _ResultRecordTransformation.isJson(value);
|
|
2579
|
+
}
|
|
2580
|
+
_ResultRecordValueTransformation2.checkResultRecordAsJson = checkResultRecordAsJson;
|
|
2581
|
+
function checkArrayResultRecordValueTransformationAsJsonNullItemDatatype(value) {
|
|
2582
|
+
return _ResultRecordValueTransformation2.isResultRecordValue(value);
|
|
2583
|
+
}
|
|
2584
|
+
_ResultRecordValueTransformation2.checkArrayResultRecordValueTransformationAsJsonNullItemDatatype = checkArrayResultRecordValueTransformationAsJsonNullItemDatatype;
|
|
2585
|
+
function checkArrayResultRecordValueAsJson(value) {
|
|
2586
|
+
const datatypeMatch = (val) => checkArrayResultRecordValueTransformationAsJsonNullItemDatatype(val);
|
|
2587
|
+
return Array.isArray(value) && value.every(datatypeMatch);
|
|
2588
|
+
}
|
|
2589
|
+
_ResultRecordValueTransformation2.checkArrayResultRecordValueAsJson = checkArrayResultRecordValueAsJson;
|
|
2590
|
+
function isJson(value) {
|
|
2591
|
+
return checkBoolean(value) || checkNumber(value) || checkString(value) || checkTimeframeAsJson(value) || checkGeoPointAsJson(value) || checkResultRecordAsJson(value) || checkArrayResultRecordValueAsJson(value) || value === null;
|
|
2592
|
+
}
|
|
2593
|
+
_ResultRecordValueTransformation2.isJson = isJson;
|
|
1330
2594
|
function fromJson(model) {
|
|
1331
|
-
|
|
2595
|
+
if (!isJson(model)) {
|
|
2596
|
+
throw new TypeError("_ResultRecordValueTransformation.fromJson: value's datatype does not match");
|
|
2597
|
+
}
|
|
2598
|
+
if (model === null) {
|
|
2599
|
+
return null;
|
|
2600
|
+
}
|
|
2601
|
+
if (checkBoolean(model)) {
|
|
2602
|
+
return Boolean(model);
|
|
2603
|
+
}
|
|
2604
|
+
if (checkNumber(model)) {
|
|
2605
|
+
return Number(model);
|
|
2606
|
+
}
|
|
2607
|
+
if (checkString(model)) {
|
|
2608
|
+
return String(model);
|
|
2609
|
+
}
|
|
2610
|
+
if (checkTimeframeAsJson(model)) {
|
|
2611
|
+
return _TimeframeTransformation.fromJson(model);
|
|
2612
|
+
}
|
|
2613
|
+
if (checkGeoPointAsJson(model)) {
|
|
2614
|
+
return _GeoPointTransformation.fromJson(model);
|
|
2615
|
+
}
|
|
2616
|
+
if (checkResultRecordAsJson(model)) {
|
|
2617
|
+
return _ResultRecordTransformation.fromJson(model);
|
|
2618
|
+
}
|
|
2619
|
+
if (checkArrayResultRecordValue(model)) {
|
|
2620
|
+
return model.map((el) => _ResultRecordValueTransformation2.fromJson(el));
|
|
2621
|
+
}
|
|
2622
|
+
throw new TypeError("Unable to deserialize value");
|
|
1332
2623
|
}
|
|
1333
2624
|
_ResultRecordValueTransformation2.fromJson = fromJson;
|
|
1334
2625
|
function toJson(model) {
|
|
1335
|
-
|
|
2626
|
+
if (!isResultRecordValue(model)) {
|
|
2627
|
+
throw new TypeError("_ResultRecordValueTransformation.toJson: value's datatype does not match");
|
|
2628
|
+
}
|
|
2629
|
+
if (model === null) {
|
|
2630
|
+
return null;
|
|
2631
|
+
}
|
|
2632
|
+
if (checkBoolean(model)) {
|
|
2633
|
+
return Boolean(model);
|
|
2634
|
+
}
|
|
2635
|
+
if (checkNumber(model)) {
|
|
2636
|
+
return Number(model);
|
|
2637
|
+
}
|
|
2638
|
+
if (checkString(model)) {
|
|
2639
|
+
return String(model);
|
|
2640
|
+
}
|
|
2641
|
+
if (checkTimeframe(model)) {
|
|
2642
|
+
return _TimeframeTransformation.toJson(model);
|
|
2643
|
+
}
|
|
2644
|
+
if (checkGeoPoint(model)) {
|
|
2645
|
+
return _GeoPointTransformation.toJson(model);
|
|
2646
|
+
}
|
|
2647
|
+
if (checkResultRecord(model)) {
|
|
2648
|
+
return _ResultRecordTransformation.toJson(model);
|
|
2649
|
+
}
|
|
2650
|
+
if (checkArrayResultRecordValue(model)) {
|
|
2651
|
+
return model.map((el) => _ResultRecordValueTransformation2.toJson(el));
|
|
2652
|
+
}
|
|
2653
|
+
throw new TypeError("Unable to serialize value");
|
|
1336
2654
|
}
|
|
1337
2655
|
_ResultRecordValueTransformation2.toJson = toJson;
|
|
1338
2656
|
})(_ResultRecordValueTransformation || (_ResultRecordValueTransformation = {}));
|
|
@@ -1340,11 +2658,51 @@ var _ResultRecordValueTransformation;
|
|
|
1340
2658
|
// packages/client/query/src/lib/models/result-record.ts
|
|
1341
2659
|
var _ResultRecordTransformation;
|
|
1342
2660
|
((_ResultRecordTransformation2) => {
|
|
1343
|
-
function
|
|
1344
|
-
if (
|
|
2661
|
+
function isResultRecord(value) {
|
|
2662
|
+
if (value === null) {
|
|
2663
|
+
return true;
|
|
2664
|
+
}
|
|
2665
|
+
if (value === void 0) {
|
|
2666
|
+
return false;
|
|
2667
|
+
}
|
|
2668
|
+
if (Array.isArray(value)) {
|
|
2669
|
+
return false;
|
|
2670
|
+
}
|
|
2671
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
2672
|
+
const hasAdditionalProperties = true;
|
|
2673
|
+
const requiredKeys = [];
|
|
2674
|
+
const optionalKeys = [];
|
|
2675
|
+
const valKeys = new Set(Object.keys(value));
|
|
2676
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2677
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2678
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2679
|
+
}
|
|
2680
|
+
_ResultRecordTransformation2.isResultRecord = isResultRecord;
|
|
2681
|
+
function isJson(value) {
|
|
2682
|
+
if (value === null) {
|
|
2683
|
+
return true;
|
|
2684
|
+
}
|
|
2685
|
+
if (value === void 0) {
|
|
2686
|
+
return false;
|
|
2687
|
+
}
|
|
2688
|
+
if (Array.isArray(value)) {
|
|
2689
|
+
return false;
|
|
2690
|
+
}
|
|
2691
|
+
const modelKeys = /* @__PURE__ */ new Set([]);
|
|
2692
|
+
const hasAdditionalProperties = true;
|
|
2693
|
+
const requiredKeys = [];
|
|
2694
|
+
const optionalKeys = [];
|
|
2695
|
+
const valKeys = new Set(Object.keys(value));
|
|
2696
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2697
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2698
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2699
|
+
}
|
|
2700
|
+
_ResultRecordTransformation2.isJson = isJson;
|
|
2701
|
+
function fromJson($model) {
|
|
2702
|
+
if ($model === null) {
|
|
1345
2703
|
return null;
|
|
1346
2704
|
}
|
|
1347
|
-
const additionalProps = model;
|
|
2705
|
+
const additionalProps = $model;
|
|
1348
2706
|
return {
|
|
1349
2707
|
...Object.fromEntries(
|
|
1350
2708
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
@@ -1355,11 +2713,11 @@ var _ResultRecordTransformation;
|
|
|
1355
2713
|
};
|
|
1356
2714
|
}
|
|
1357
2715
|
_ResultRecordTransformation2.fromJson = fromJson;
|
|
1358
|
-
function toJson(model) {
|
|
1359
|
-
if (model === null) {
|
|
2716
|
+
function toJson($model) {
|
|
2717
|
+
if ($model === null) {
|
|
1360
2718
|
return null;
|
|
1361
2719
|
}
|
|
1362
|
-
const additionalProps = model;
|
|
2720
|
+
const additionalProps = $model;
|
|
1363
2721
|
return {
|
|
1364
2722
|
...Object.fromEntries(
|
|
1365
2723
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
@@ -1375,8 +2733,48 @@ var _ResultRecordTransformation;
|
|
|
1375
2733
|
// packages/client/query/src/lib/models/query-result.ts
|
|
1376
2734
|
var _QueryResultTransformation;
|
|
1377
2735
|
((_QueryResultTransformation2) => {
|
|
1378
|
-
function
|
|
1379
|
-
|
|
2736
|
+
function isQueryResult(value) {
|
|
2737
|
+
if (value === null) {
|
|
2738
|
+
return false;
|
|
2739
|
+
}
|
|
2740
|
+
if (value === void 0) {
|
|
2741
|
+
return false;
|
|
2742
|
+
}
|
|
2743
|
+
if (Array.isArray(value)) {
|
|
2744
|
+
return false;
|
|
2745
|
+
}
|
|
2746
|
+
const modelKeys = /* @__PURE__ */ new Set(["records", "metadata", "types"]);
|
|
2747
|
+
const hasAdditionalProperties = false;
|
|
2748
|
+
const requiredKeys = ["metadata", "records", "types"];
|
|
2749
|
+
const optionalKeys = [];
|
|
2750
|
+
const valKeys = new Set(Object.keys(value));
|
|
2751
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2752
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2753
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2754
|
+
}
|
|
2755
|
+
_QueryResultTransformation2.isQueryResult = isQueryResult;
|
|
2756
|
+
function isJson(value) {
|
|
2757
|
+
if (value === null) {
|
|
2758
|
+
return false;
|
|
2759
|
+
}
|
|
2760
|
+
if (value === void 0) {
|
|
2761
|
+
return false;
|
|
2762
|
+
}
|
|
2763
|
+
if (Array.isArray(value)) {
|
|
2764
|
+
return false;
|
|
2765
|
+
}
|
|
2766
|
+
const modelKeys = /* @__PURE__ */ new Set(["records", "metadata", "types"]);
|
|
2767
|
+
const hasAdditionalProperties = false;
|
|
2768
|
+
const requiredKeys = ["metadata", "records", "types"];
|
|
2769
|
+
const optionalKeys = [];
|
|
2770
|
+
const valKeys = new Set(Object.keys(value));
|
|
2771
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2772
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2773
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2774
|
+
}
|
|
2775
|
+
_QueryResultTransformation2.isJson = isJson;
|
|
2776
|
+
function fromJson($model) {
|
|
2777
|
+
const { records, metadata, types } = $model;
|
|
1380
2778
|
return {
|
|
1381
2779
|
records: records?.map((innerValue) => _ResultRecordTransformation.fromJson(innerValue)),
|
|
1382
2780
|
metadata: _MetadataTransformation.fromJson(metadata),
|
|
@@ -1384,8 +2782,8 @@ var _QueryResultTransformation;
|
|
|
1384
2782
|
};
|
|
1385
2783
|
}
|
|
1386
2784
|
_QueryResultTransformation2.fromJson = fromJson;
|
|
1387
|
-
function toJson(model) {
|
|
1388
|
-
const { records, metadata, types } = model;
|
|
2785
|
+
function toJson($model) {
|
|
2786
|
+
const { records, metadata, types } = $model;
|
|
1389
2787
|
return {
|
|
1390
2788
|
records: records?.map((innerValue) => _ResultRecordTransformation.toJson(innerValue)),
|
|
1391
2789
|
metadata: _MetadataTransformation.toJson(metadata),
|
|
@@ -1414,8 +2812,48 @@ var _QueryStateTransformation;
|
|
|
1414
2812
|
// packages/client/query/src/lib/models/query-poll-response.ts
|
|
1415
2813
|
var _QueryPollResponseTransformation;
|
|
1416
2814
|
((_QueryPollResponseTransformation2) => {
|
|
1417
|
-
function
|
|
1418
|
-
|
|
2815
|
+
function isQueryPollResponse(value) {
|
|
2816
|
+
if (value === null) {
|
|
2817
|
+
return false;
|
|
2818
|
+
}
|
|
2819
|
+
if (value === void 0) {
|
|
2820
|
+
return false;
|
|
2821
|
+
}
|
|
2822
|
+
if (Array.isArray(value)) {
|
|
2823
|
+
return false;
|
|
2824
|
+
}
|
|
2825
|
+
const modelKeys = /* @__PURE__ */ new Set(["result", "ttlSeconds", "progress", "state"]);
|
|
2826
|
+
const hasAdditionalProperties = false;
|
|
2827
|
+
const requiredKeys = ["state"];
|
|
2828
|
+
const optionalKeys = ["result", "ttlSeconds", "progress"];
|
|
2829
|
+
const valKeys = new Set(Object.keys(value));
|
|
2830
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2831
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2832
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2833
|
+
}
|
|
2834
|
+
_QueryPollResponseTransformation2.isQueryPollResponse = isQueryPollResponse;
|
|
2835
|
+
function isJson(value) {
|
|
2836
|
+
if (value === null) {
|
|
2837
|
+
return false;
|
|
2838
|
+
}
|
|
2839
|
+
if (value === void 0) {
|
|
2840
|
+
return false;
|
|
2841
|
+
}
|
|
2842
|
+
if (Array.isArray(value)) {
|
|
2843
|
+
return false;
|
|
2844
|
+
}
|
|
2845
|
+
const modelKeys = /* @__PURE__ */ new Set(["result", "ttlSeconds", "progress", "state"]);
|
|
2846
|
+
const hasAdditionalProperties = false;
|
|
2847
|
+
const requiredKeys = ["state"];
|
|
2848
|
+
const optionalKeys = ["result", "ttlSeconds", "progress"];
|
|
2849
|
+
const valKeys = new Set(Object.keys(value));
|
|
2850
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2851
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2852
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2853
|
+
}
|
|
2854
|
+
_QueryPollResponseTransformation2.isJson = isJson;
|
|
2855
|
+
function fromJson($model) {
|
|
2856
|
+
const { result, ttlSeconds, progress, state } = $model;
|
|
1419
2857
|
return {
|
|
1420
2858
|
result: result !== void 0 && result !== null ? _QueryResultTransformation.fromJson(result) : void 0,
|
|
1421
2859
|
ttlSeconds,
|
|
@@ -1424,8 +2862,8 @@ var _QueryPollResponseTransformation;
|
|
|
1424
2862
|
};
|
|
1425
2863
|
}
|
|
1426
2864
|
_QueryPollResponseTransformation2.fromJson = fromJson;
|
|
1427
|
-
function toJson(model) {
|
|
1428
|
-
const { result, ttlSeconds, progress, state } = model;
|
|
2865
|
+
function toJson($model) {
|
|
2866
|
+
const { result, ttlSeconds, progress, state } = $model;
|
|
1429
2867
|
return {
|
|
1430
2868
|
result: result !== void 0 && result !== null ? _QueryResultTransformation.toJson(result) : void 0,
|
|
1431
2869
|
ttlSeconds,
|
|
@@ -1439,8 +2877,48 @@ var _QueryPollResponseTransformation;
|
|
|
1439
2877
|
// packages/client/query/src/lib/models/query-start-response.ts
|
|
1440
2878
|
var _QueryStartResponseTransformation;
|
|
1441
2879
|
((_QueryStartResponseTransformation2) => {
|
|
1442
|
-
function
|
|
1443
|
-
|
|
2880
|
+
function isQueryStartResponse(value) {
|
|
2881
|
+
if (value === null) {
|
|
2882
|
+
return false;
|
|
2883
|
+
}
|
|
2884
|
+
if (value === void 0) {
|
|
2885
|
+
return false;
|
|
2886
|
+
}
|
|
2887
|
+
if (Array.isArray(value)) {
|
|
2888
|
+
return false;
|
|
2889
|
+
}
|
|
2890
|
+
const modelKeys = /* @__PURE__ */ new Set(["result", "ttlSeconds", "progress", "requestToken", "state"]);
|
|
2891
|
+
const hasAdditionalProperties = false;
|
|
2892
|
+
const requiredKeys = ["state"];
|
|
2893
|
+
const optionalKeys = ["result", "ttlSeconds", "progress", "requestToken"];
|
|
2894
|
+
const valKeys = new Set(Object.keys(value));
|
|
2895
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2896
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2897
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2898
|
+
}
|
|
2899
|
+
_QueryStartResponseTransformation2.isQueryStartResponse = isQueryStartResponse;
|
|
2900
|
+
function isJson(value) {
|
|
2901
|
+
if (value === null) {
|
|
2902
|
+
return false;
|
|
2903
|
+
}
|
|
2904
|
+
if (value === void 0) {
|
|
2905
|
+
return false;
|
|
2906
|
+
}
|
|
2907
|
+
if (Array.isArray(value)) {
|
|
2908
|
+
return false;
|
|
2909
|
+
}
|
|
2910
|
+
const modelKeys = /* @__PURE__ */ new Set(["result", "ttlSeconds", "progress", "requestToken", "state"]);
|
|
2911
|
+
const hasAdditionalProperties = false;
|
|
2912
|
+
const requiredKeys = ["state"];
|
|
2913
|
+
const optionalKeys = ["result", "ttlSeconds", "progress", "requestToken"];
|
|
2914
|
+
const valKeys = new Set(Object.keys(value));
|
|
2915
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2916
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2917
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys;
|
|
2918
|
+
}
|
|
2919
|
+
_QueryStartResponseTransformation2.isJson = isJson;
|
|
2920
|
+
function fromJson($model) {
|
|
2921
|
+
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
1444
2922
|
return {
|
|
1445
2923
|
result: result !== void 0 && result !== null ? _QueryResultTransformation.fromJson(result) : void 0,
|
|
1446
2924
|
ttlSeconds,
|
|
@@ -1450,8 +2928,8 @@ var _QueryStartResponseTransformation;
|
|
|
1450
2928
|
};
|
|
1451
2929
|
}
|
|
1452
2930
|
_QueryStartResponseTransformation2.fromJson = fromJson;
|
|
1453
|
-
function toJson(model) {
|
|
1454
|
-
const { result, ttlSeconds, progress, requestToken, state } = model;
|
|
2931
|
+
function toJson($model) {
|
|
2932
|
+
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
1455
2933
|
return {
|
|
1456
2934
|
result: result !== void 0 && result !== null ? _QueryResultTransformation.toJson(result) : void 0,
|
|
1457
2935
|
ttlSeconds,
|
|
@@ -1476,7 +2954,8 @@ var addQueryParam = (query, key) => encodeQueryParam(key, query[key]);
|
|
|
1476
2954
|
var toQueryString = (rawQuery) => {
|
|
1477
2955
|
const query = rawQuery || {};
|
|
1478
2956
|
const keys = Object.keys(query).filter((key) => typeof query[key] !== "undefined");
|
|
1479
|
-
|
|
2957
|
+
const queryString = keys.map((key) => Array.isArray(query[key]) ? addArrayQueryParam(query, key) : addQueryParam(query, key)).join("&");
|
|
2958
|
+
return queryString ? `?${queryString}` : "";
|
|
1480
2959
|
};
|
|
1481
2960
|
|
|
1482
2961
|
// packages/client/query/src/lib/apis/query-execution-api.ts
|
|
@@ -1496,7 +2975,7 @@ var QueryExecutionClient = class {
|
|
|
1496
2975
|
enrich: config.enrich
|
|
1497
2976
|
});
|
|
1498
2977
|
const response = await this.httpClient.send({
|
|
1499
|
-
url: `/platform/storage/query/v1/query:poll
|
|
2978
|
+
url: `/platform/storage/query/v1/query:poll${query}`,
|
|
1500
2979
|
method: "GET",
|
|
1501
2980
|
headers: {
|
|
1502
2981
|
Accept: "application/json"
|
|
@@ -1552,7 +3031,7 @@ var QueryExecutionClient = class {
|
|
|
1552
3031
|
}
|
|
1553
3032
|
}
|
|
1554
3033
|
default: {
|
|
1555
|
-
const responseValue = await response.body("text").catch();
|
|
3034
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
1556
3035
|
throw new ClientRequestError(
|
|
1557
3036
|
`${response.status}`,
|
|
1558
3037
|
response,
|
|
@@ -1572,7 +3051,7 @@ var QueryExecutionClient = class {
|
|
|
1572
3051
|
...config.authorization !== void 0 && { Authorization: String(config.authorization) }
|
|
1573
3052
|
};
|
|
1574
3053
|
const response = await this.httpClient.send({
|
|
1575
|
-
url: `/platform/storage/query/v1/query:execute
|
|
3054
|
+
url: `/platform/storage/query/v1/query:execute${query}`,
|
|
1576
3055
|
method: "POST",
|
|
1577
3056
|
requestBodyType: "json",
|
|
1578
3057
|
body: encodedBody,
|
|
@@ -1678,7 +3157,7 @@ var QueryExecutionClient = class {
|
|
|
1678
3157
|
}
|
|
1679
3158
|
}
|
|
1680
3159
|
default: {
|
|
1681
|
-
const responseValue = await response.body("text").catch();
|
|
3160
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
1682
3161
|
throw new ClientRequestError(
|
|
1683
3162
|
`${response.status}`,
|
|
1684
3163
|
response,
|
|
@@ -1694,7 +3173,7 @@ var QueryExecutionClient = class {
|
|
|
1694
3173
|
}
|
|
1695
3174
|
const query = toQueryString({ "request-token": config.requestToken });
|
|
1696
3175
|
const response = await this.httpClient.send({
|
|
1697
|
-
url: `/platform/storage/query/v1/query:cancel
|
|
3176
|
+
url: `/platform/storage/query/v1/query:cancel${query}`,
|
|
1698
3177
|
method: "POST",
|
|
1699
3178
|
headers: {
|
|
1700
3179
|
Accept: "application/json"
|
|
@@ -1753,7 +3232,7 @@ var QueryExecutionClient = class {
|
|
|
1753
3232
|
return;
|
|
1754
3233
|
}
|
|
1755
3234
|
default: {
|
|
1756
|
-
const responseValue = await response.body("text").catch();
|
|
3235
|
+
const responseValue = await response.body("text").catch(() => "");
|
|
1757
3236
|
throw new ClientRequestError(
|
|
1758
3237
|
`${response.status}`,
|
|
1759
3238
|
response,
|
|
@@ -1765,24 +3244,3 @@ var QueryExecutionClient = class {
|
|
|
1765
3244
|
}
|
|
1766
3245
|
};
|
|
1767
3246
|
var queryExecutionClient = /* @__PURE__ */ new QueryExecutionClient(import_http_client2.httpClient);
|
|
1768
|
-
|
|
1769
|
-
// packages/client/query/src/lib/models/geo-point.ts
|
|
1770
|
-
var _GeoPointTransformation;
|
|
1771
|
-
((_GeoPointTransformation2) => {
|
|
1772
|
-
function fromJson(model) {
|
|
1773
|
-
const { latitude, longitude } = model;
|
|
1774
|
-
return {
|
|
1775
|
-
latitude,
|
|
1776
|
-
longitude
|
|
1777
|
-
};
|
|
1778
|
-
}
|
|
1779
|
-
_GeoPointTransformation2.fromJson = fromJson;
|
|
1780
|
-
function toJson(model) {
|
|
1781
|
-
const { latitude, longitude } = model;
|
|
1782
|
-
return {
|
|
1783
|
-
latitude,
|
|
1784
|
-
longitude
|
|
1785
|
-
};
|
|
1786
|
-
}
|
|
1787
|
-
_GeoPointTransformation2.toJson = toJson;
|
|
1788
|
-
})(_GeoPointTransformation || (_GeoPointTransformation = {}));
|