@dynatrace-sdk/client-query 1.4.0 → 1.4.2
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 +20 -0
- package/README.md +1 -1
- package/cjs/index.js +231 -98
- package/docs/DOCS.md +59 -54
- package/dynatrace-metadata.json +2 -2
- package/esm/index.js +231 -98
- package/package.json +4 -3
- package/types/packages/client/query/src/lib/apis/query-assistance-api.d.ts +12 -6
- package/types/packages/client/query/src/lib/apis/query-execution-api.d.ts +4 -5
- package/types/packages/client/query/src/lib/error-envelopes/get-error-message.d.ts +1 -0
- package/types/packages/client/query/src/lib/error-envelopes/index.d.ts +1 -0
package/cjs/index.js
CHANGED
|
@@ -79,6 +79,7 @@ __export(src_exports, {
|
|
|
79
79
|
isApiClientError: () => isApiClientError,
|
|
80
80
|
isClientRequestError: () => isClientRequestError,
|
|
81
81
|
isErrorEnvelopeError: () => isErrorEnvelopeError,
|
|
82
|
+
isInvalidResponseError: () => isInvalidResponseError,
|
|
82
83
|
queryAssistanceClient: () => queryAssistanceClient,
|
|
83
84
|
queryExecutionClient: () => queryExecutionClient
|
|
84
85
|
});
|
|
@@ -177,6 +178,27 @@ function getOptionalErrorRef(body) {
|
|
|
177
178
|
return {};
|
|
178
179
|
}
|
|
179
180
|
|
|
181
|
+
// packages/client/query/src/lib/error-envelopes/get-error-message.ts
|
|
182
|
+
function getMessagesFromErrorDetails(details) {
|
|
183
|
+
const messages = [];
|
|
184
|
+
Object.entries(details).forEach(([name, data]) => {
|
|
185
|
+
switch (name) {
|
|
186
|
+
case "missingScopes":
|
|
187
|
+
messages.push(`Missing scopes: ${data}`);
|
|
188
|
+
break;
|
|
189
|
+
default:
|
|
190
|
+
messages.push(`${name}: ${data}`);
|
|
191
|
+
}
|
|
192
|
+
}, []);
|
|
193
|
+
return messages;
|
|
194
|
+
}
|
|
195
|
+
function getErrorMessage(errorBody, defaultMessage) {
|
|
196
|
+
const error = errorBody;
|
|
197
|
+
const msg = error?.error?.message || defaultMessage;
|
|
198
|
+
const details = error?.error?.details || {};
|
|
199
|
+
return [msg, ...getMessagesFromErrorDetails(details)].join(". ");
|
|
200
|
+
}
|
|
201
|
+
|
|
180
202
|
// packages/client/query/src/lib/error-envelopes/invalid-response-error.ts
|
|
181
203
|
var InvalidResponseError = class extends ApiClientError {
|
|
182
204
|
responseBody;
|
|
@@ -192,6 +214,9 @@ var InvalidResponseError = class extends ApiClientError {
|
|
|
192
214
|
this.expectedType = expectedType;
|
|
193
215
|
}
|
|
194
216
|
};
|
|
217
|
+
function isInvalidResponseError(e) {
|
|
218
|
+
return e instanceof InvalidResponseError;
|
|
219
|
+
}
|
|
195
220
|
|
|
196
221
|
// packages/client/query/src/lib/models/autocomplete-request.transformation.ts
|
|
197
222
|
var autocomplete_request_transformation_exports = {};
|
|
@@ -218,7 +243,8 @@ function isAutocompleteRequest(value) {
|
|
|
218
243
|
const valKeys = new Set(Object.keys(value));
|
|
219
244
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
220
245
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
221
|
-
|
|
246
|
+
const allPropertiesMatchFormat = true;
|
|
247
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
222
248
|
}
|
|
223
249
|
function isJson(value) {
|
|
224
250
|
if (value === null) {
|
|
@@ -237,7 +263,8 @@ function isJson(value) {
|
|
|
237
263
|
const valKeys = new Set(Object.keys(value));
|
|
238
264
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
239
265
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
240
|
-
|
|
266
|
+
const allPropertiesMatchFormat = true;
|
|
267
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
241
268
|
}
|
|
242
269
|
function fromJson($model) {
|
|
243
270
|
const { query, cursorPosition, timezone, locale } = $model;
|
|
@@ -324,7 +351,8 @@ function isAutocompleteSuggestionPart(value) {
|
|
|
324
351
|
const valKeys = new Set(Object.keys(value));
|
|
325
352
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
326
353
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
327
|
-
|
|
354
|
+
const allPropertiesMatchFormat = true;
|
|
355
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
328
356
|
}
|
|
329
357
|
function isJson3(value) {
|
|
330
358
|
if (value === null) {
|
|
@@ -343,7 +371,8 @@ function isJson3(value) {
|
|
|
343
371
|
const valKeys = new Set(Object.keys(value));
|
|
344
372
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
345
373
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
346
|
-
|
|
374
|
+
const allPropertiesMatchFormat = true;
|
|
375
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
347
376
|
}
|
|
348
377
|
function fromJson3($model) {
|
|
349
378
|
const { type, info, synopsis, suggestion } = $model;
|
|
@@ -382,7 +411,8 @@ function isAutocompleteSuggestion(value) {
|
|
|
382
411
|
const valKeys = new Set(Object.keys(value));
|
|
383
412
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
384
413
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
385
|
-
|
|
414
|
+
const allPropertiesMatchFormat = true;
|
|
415
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
386
416
|
}
|
|
387
417
|
function isJson4(value) {
|
|
388
418
|
if (value === null) {
|
|
@@ -401,7 +431,8 @@ function isJson4(value) {
|
|
|
401
431
|
const valKeys = new Set(Object.keys(value));
|
|
402
432
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
403
433
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
404
|
-
|
|
434
|
+
const allPropertiesMatchFormat = true;
|
|
435
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
405
436
|
}
|
|
406
437
|
function fromJson4($model) {
|
|
407
438
|
const { parts, alreadyTypedCharacters, suggestion } = $model;
|
|
@@ -438,7 +469,8 @@ function isAutocompleteResponse(value) {
|
|
|
438
469
|
const valKeys = new Set(Object.keys(value));
|
|
439
470
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
440
471
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
441
|
-
|
|
472
|
+
const allPropertiesMatchFormat = true;
|
|
473
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
442
474
|
}
|
|
443
475
|
function isJson5(value) {
|
|
444
476
|
if (value === null) {
|
|
@@ -457,7 +489,8 @@ function isJson5(value) {
|
|
|
457
489
|
const valKeys = new Set(Object.keys(value));
|
|
458
490
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
459
491
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
460
|
-
|
|
492
|
+
const allPropertiesMatchFormat = true;
|
|
493
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
461
494
|
}
|
|
462
495
|
function fromJson5($model) {
|
|
463
496
|
const { optional, suggestions, suggestedTtlSeconds } = $model;
|
|
@@ -512,7 +545,8 @@ function isDqlAlternativeNode(value) {
|
|
|
512
545
|
const valKeys = new Set(Object.keys(value));
|
|
513
546
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
514
547
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
515
|
-
|
|
548
|
+
const allPropertiesMatchFormat = true;
|
|
549
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
516
550
|
}
|
|
517
551
|
function isJson6(value) {
|
|
518
552
|
if (value === null) {
|
|
@@ -531,7 +565,8 @@ function isJson6(value) {
|
|
|
531
565
|
const valKeys = new Set(Object.keys(value));
|
|
532
566
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
533
567
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
534
|
-
|
|
568
|
+
const allPropertiesMatchFormat = true;
|
|
569
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
535
570
|
}
|
|
536
571
|
function fromJson7($model) {
|
|
537
572
|
const { alternatives } = $model;
|
|
@@ -573,7 +608,8 @@ function isDqlContainerNode(value) {
|
|
|
573
608
|
const valKeys = new Set(Object.keys(value));
|
|
574
609
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
575
610
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
576
|
-
|
|
611
|
+
const allPropertiesMatchFormat = true;
|
|
612
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
577
613
|
}
|
|
578
614
|
function isJson7(value) {
|
|
579
615
|
if (value === null) {
|
|
@@ -592,14 +628,15 @@ function isJson7(value) {
|
|
|
592
628
|
const valKeys = new Set(Object.keys(value));
|
|
593
629
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
594
630
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
595
|
-
|
|
631
|
+
const allPropertiesMatchFormat = true;
|
|
632
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
596
633
|
}
|
|
597
634
|
function fromJson8($model) {
|
|
598
635
|
const { type, children } = $model;
|
|
599
636
|
return {
|
|
600
637
|
...fromJson6($model, false),
|
|
601
638
|
type,
|
|
602
|
-
children: children !== void 0
|
|
639
|
+
children: children !== void 0 ? children?.map((innerValue) => fromJson6(innerValue)) : void 0
|
|
603
640
|
};
|
|
604
641
|
}
|
|
605
642
|
function toJson8($model) {
|
|
@@ -657,7 +694,8 @@ function isDqlTerminalNode(value) {
|
|
|
657
694
|
const valKeys = new Set(Object.keys(value));
|
|
658
695
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
659
696
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
660
|
-
|
|
697
|
+
const allPropertiesMatchFormat = true;
|
|
698
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
661
699
|
}
|
|
662
700
|
function isJson9(value) {
|
|
663
701
|
if (value === null) {
|
|
@@ -676,13 +714,14 @@ function isJson9(value) {
|
|
|
676
714
|
const valKeys = new Set(Object.keys(value));
|
|
677
715
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
678
716
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
679
|
-
|
|
717
|
+
const allPropertiesMatchFormat = true;
|
|
718
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
680
719
|
}
|
|
681
720
|
function fromJson10($model) {
|
|
682
721
|
const { type, isMandatoryOnUserOrder, canonicalString } = $model;
|
|
683
722
|
return {
|
|
684
723
|
...fromJson6($model, false),
|
|
685
|
-
type: type !== void 0
|
|
724
|
+
type: type !== void 0 ? fromJson2(type) : void 0,
|
|
686
725
|
isMandatoryOnUserOrder,
|
|
687
726
|
canonicalString
|
|
688
727
|
};
|
|
@@ -733,7 +772,8 @@ function isPositionInfo(value) {
|
|
|
733
772
|
const valKeys = new Set(Object.keys(value));
|
|
734
773
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
735
774
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
736
|
-
|
|
775
|
+
const allPropertiesMatchFormat = true;
|
|
776
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
737
777
|
}
|
|
738
778
|
function isJson10(value) {
|
|
739
779
|
if (value === null) {
|
|
@@ -752,7 +792,8 @@ function isJson10(value) {
|
|
|
752
792
|
const valKeys = new Set(Object.keys(value));
|
|
753
793
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
754
794
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
755
|
-
|
|
795
|
+
const allPropertiesMatchFormat = true;
|
|
796
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
756
797
|
}
|
|
757
798
|
function fromJson11($model) {
|
|
758
799
|
const { column, index, line } = $model;
|
|
@@ -789,7 +830,8 @@ function isTokenPosition(value) {
|
|
|
789
830
|
const valKeys = new Set(Object.keys(value));
|
|
790
831
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
791
832
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
792
|
-
|
|
833
|
+
const allPropertiesMatchFormat = true;
|
|
834
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
793
835
|
}
|
|
794
836
|
function isJson11(value) {
|
|
795
837
|
if (value === null) {
|
|
@@ -808,7 +850,8 @@ function isJson11(value) {
|
|
|
808
850
|
const valKeys = new Set(Object.keys(value));
|
|
809
851
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
810
852
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
811
|
-
|
|
853
|
+
const allPropertiesMatchFormat = true;
|
|
854
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
812
855
|
}
|
|
813
856
|
function fromJson12($model) {
|
|
814
857
|
const { start, end } = $model;
|
|
@@ -867,7 +910,8 @@ function isJson12(value) {
|
|
|
867
910
|
const valKeys = new Set(Object.keys(value));
|
|
868
911
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
869
912
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
870
|
-
|
|
913
|
+
const allPropertiesMatchFormat = true;
|
|
914
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
871
915
|
}
|
|
872
916
|
function fromJson6($model, includeChildProps = true) {
|
|
873
917
|
if (includeChildProps) {
|
|
@@ -885,7 +929,7 @@ function fromJson6($model, includeChildProps = true) {
|
|
|
885
929
|
const { nodeType, tokenPosition, isOptional } = $model;
|
|
886
930
|
return {
|
|
887
931
|
nodeType: fromJson9(nodeType),
|
|
888
|
-
tokenPosition: tokenPosition !== void 0
|
|
932
|
+
tokenPosition: tokenPosition !== void 0 ? fromJson12(tokenPosition) : void 0,
|
|
889
933
|
isOptional
|
|
890
934
|
};
|
|
891
935
|
}
|
|
@@ -972,7 +1016,8 @@ function isErrorResponseDetails(value) {
|
|
|
972
1016
|
const valKeys = new Set(Object.keys(value));
|
|
973
1017
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
974
1018
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
975
|
-
|
|
1019
|
+
const allPropertiesMatchFormat = true;
|
|
1020
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
976
1021
|
}
|
|
977
1022
|
function isJson13(value) {
|
|
978
1023
|
if (value === null) {
|
|
@@ -1008,7 +1053,8 @@ function isJson13(value) {
|
|
|
1008
1053
|
const valKeys = new Set(Object.keys(value));
|
|
1009
1054
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1010
1055
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1011
|
-
|
|
1056
|
+
const allPropertiesMatchFormat = true;
|
|
1057
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1012
1058
|
}
|
|
1013
1059
|
function fromJson13($model) {
|
|
1014
1060
|
const {
|
|
@@ -1023,7 +1069,7 @@ function fromJson13($model) {
|
|
|
1023
1069
|
} = $model;
|
|
1024
1070
|
return {
|
|
1025
1071
|
exceptionType,
|
|
1026
|
-
syntaxErrorPosition: syntaxErrorPosition !== void 0
|
|
1072
|
+
syntaxErrorPosition: syntaxErrorPosition !== void 0 ? fromJson12(syntaxErrorPosition) : void 0,
|
|
1027
1073
|
errorType,
|
|
1028
1074
|
errorMessage,
|
|
1029
1075
|
arguments: _arguments?.slice(0),
|
|
@@ -1073,7 +1119,8 @@ function isErrorResponse(value) {
|
|
|
1073
1119
|
const valKeys = new Set(Object.keys(value));
|
|
1074
1120
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1075
1121
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1076
|
-
|
|
1122
|
+
const allPropertiesMatchFormat = true;
|
|
1123
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1077
1124
|
}
|
|
1078
1125
|
function isJson14(value) {
|
|
1079
1126
|
if (value === null) {
|
|
@@ -1092,7 +1139,8 @@ function isJson14(value) {
|
|
|
1092
1139
|
const valKeys = new Set(Object.keys(value));
|
|
1093
1140
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1094
1141
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1095
|
-
|
|
1142
|
+
const allPropertiesMatchFormat = true;
|
|
1143
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1096
1144
|
}
|
|
1097
1145
|
function fromJson14($model) {
|
|
1098
1146
|
const { message, details, code } = $model;
|
|
@@ -1129,7 +1177,8 @@ function isErrorEnvelope(value) {
|
|
|
1129
1177
|
const valKeys = new Set(Object.keys(value));
|
|
1130
1178
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1131
1179
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1132
|
-
|
|
1180
|
+
const allPropertiesMatchFormat = true;
|
|
1181
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1133
1182
|
}
|
|
1134
1183
|
function isJson15(value) {
|
|
1135
1184
|
if (value === null) {
|
|
@@ -1148,7 +1197,8 @@ function isJson15(value) {
|
|
|
1148
1197
|
const valKeys = new Set(Object.keys(value));
|
|
1149
1198
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1150
1199
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1151
|
-
|
|
1200
|
+
const allPropertiesMatchFormat = true;
|
|
1201
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1152
1202
|
}
|
|
1153
1203
|
function fromJson15($model) {
|
|
1154
1204
|
const { error } = $model;
|
|
@@ -1199,7 +1249,8 @@ function isParseRequest(value) {
|
|
|
1199
1249
|
const valKeys = new Set(Object.keys(value));
|
|
1200
1250
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1201
1251
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1202
|
-
|
|
1252
|
+
const allPropertiesMatchFormat = true;
|
|
1253
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1203
1254
|
}
|
|
1204
1255
|
function isJson16(value) {
|
|
1205
1256
|
if (value === null) {
|
|
@@ -1218,7 +1269,8 @@ function isJson16(value) {
|
|
|
1218
1269
|
const valKeys = new Set(Object.keys(value));
|
|
1219
1270
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1220
1271
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1221
|
-
|
|
1272
|
+
const allPropertiesMatchFormat = true;
|
|
1273
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1222
1274
|
}
|
|
1223
1275
|
function fromJson16($model) {
|
|
1224
1276
|
const { query, timezone, locale } = $model;
|
|
@@ -1262,7 +1314,8 @@ function isVerifyRequest(value) {
|
|
|
1262
1314
|
const valKeys = new Set(Object.keys(value));
|
|
1263
1315
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1264
1316
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1265
|
-
|
|
1317
|
+
const allPropertiesMatchFormat = true;
|
|
1318
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1266
1319
|
}
|
|
1267
1320
|
function isJson17(value) {
|
|
1268
1321
|
if (value === null) {
|
|
@@ -1281,7 +1334,8 @@ function isJson17(value) {
|
|
|
1281
1334
|
const valKeys = new Set(Object.keys(value));
|
|
1282
1335
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1283
1336
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1284
|
-
|
|
1337
|
+
const allPropertiesMatchFormat = true;
|
|
1338
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1285
1339
|
}
|
|
1286
1340
|
function fromJson17($model) {
|
|
1287
1341
|
const { query, timezone, locale } = $model;
|
|
@@ -1350,7 +1404,8 @@ function isMetadataNotification(value) {
|
|
|
1350
1404
|
const valKeys = new Set(Object.keys(value));
|
|
1351
1405
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1352
1406
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1353
|
-
|
|
1407
|
+
const allPropertiesMatchFormat = true;
|
|
1408
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1354
1409
|
}
|
|
1355
1410
|
function isJson18(value) {
|
|
1356
1411
|
if (value === null) {
|
|
@@ -1385,7 +1440,8 @@ function isJson18(value) {
|
|
|
1385
1440
|
const valKeys = new Set(Object.keys(value));
|
|
1386
1441
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1387
1442
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1388
|
-
|
|
1443
|
+
const allPropertiesMatchFormat = true;
|
|
1444
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1389
1445
|
}
|
|
1390
1446
|
function fromJson18($model) {
|
|
1391
1447
|
const {
|
|
@@ -1400,9 +1456,9 @@ function fromJson18($model) {
|
|
|
1400
1456
|
return {
|
|
1401
1457
|
severity,
|
|
1402
1458
|
messageFormat,
|
|
1403
|
-
syntaxPosition: syntaxPosition !== void 0
|
|
1404
|
-
messageFormatSpecifierTypes: messageFormatSpecifierTypes !== void 0
|
|
1405
|
-
arguments: _arguments !== void 0
|
|
1459
|
+
syntaxPosition: syntaxPosition !== void 0 ? fromJson12(syntaxPosition) : void 0,
|
|
1460
|
+
messageFormatSpecifierTypes: messageFormatSpecifierTypes !== void 0 ? messageFormatSpecifierTypes?.slice(0) : void 0,
|
|
1461
|
+
arguments: _arguments !== void 0 ? _arguments?.slice(0) : void 0,
|
|
1406
1462
|
notificationType,
|
|
1407
1463
|
message
|
|
1408
1464
|
};
|
|
@@ -1446,7 +1502,8 @@ function isVerifyResponse(value) {
|
|
|
1446
1502
|
const valKeys = new Set(Object.keys(value));
|
|
1447
1503
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1448
1504
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1449
|
-
|
|
1505
|
+
const allPropertiesMatchFormat = true;
|
|
1506
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1450
1507
|
}
|
|
1451
1508
|
function isJson19(value) {
|
|
1452
1509
|
if (value === null) {
|
|
@@ -1465,13 +1522,14 @@ function isJson19(value) {
|
|
|
1465
1522
|
const valKeys = new Set(Object.keys(value));
|
|
1466
1523
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1467
1524
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1468
|
-
|
|
1525
|
+
const allPropertiesMatchFormat = true;
|
|
1526
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1469
1527
|
}
|
|
1470
1528
|
function fromJson19($model) {
|
|
1471
1529
|
const { valid, notifications } = $model;
|
|
1472
1530
|
return {
|
|
1473
1531
|
valid,
|
|
1474
|
-
notifications: notifications !== void 0
|
|
1532
|
+
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0
|
|
1475
1533
|
};
|
|
1476
1534
|
}
|
|
1477
1535
|
function toJson19($model) {
|
|
@@ -1520,7 +1578,12 @@ var QueryAssistanceClient = class {
|
|
|
1520
1578
|
const responseValue = await response.body("json");
|
|
1521
1579
|
try {
|
|
1522
1580
|
const errorBody = fromJson15(responseValue);
|
|
1523
|
-
throw new ErrorEnvelopeError(
|
|
1581
|
+
throw new ErrorEnvelopeError(
|
|
1582
|
+
"400",
|
|
1583
|
+
response,
|
|
1584
|
+
errorBody,
|
|
1585
|
+
getErrorMessage(errorBody, "The supplied request is wrong.")
|
|
1586
|
+
);
|
|
1524
1587
|
} catch (err) {
|
|
1525
1588
|
if (err instanceof ErrorEnvelopeError) {
|
|
1526
1589
|
throw err;
|
|
@@ -1538,7 +1601,12 @@ var QueryAssistanceClient = class {
|
|
|
1538
1601
|
const responseValue = await response.body("json");
|
|
1539
1602
|
try {
|
|
1540
1603
|
const errorBody = fromJson15(responseValue);
|
|
1541
|
-
throw new ErrorEnvelopeError(
|
|
1604
|
+
throw new ErrorEnvelopeError(
|
|
1605
|
+
"500",
|
|
1606
|
+
response,
|
|
1607
|
+
errorBody,
|
|
1608
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
1609
|
+
);
|
|
1542
1610
|
} catch (err) {
|
|
1543
1611
|
if (err instanceof ErrorEnvelopeError) {
|
|
1544
1612
|
throw err;
|
|
@@ -1572,7 +1640,7 @@ var QueryAssistanceClient = class {
|
|
|
1572
1640
|
`${response.status}`,
|
|
1573
1641
|
response,
|
|
1574
1642
|
responseValue,
|
|
1575
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
1643
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
1576
1644
|
);
|
|
1577
1645
|
}
|
|
1578
1646
|
}
|
|
@@ -1612,7 +1680,10 @@ var QueryAssistanceClient = class {
|
|
|
1612
1680
|
"400",
|
|
1613
1681
|
response,
|
|
1614
1682
|
errorBody,
|
|
1615
|
-
|
|
1683
|
+
getErrorMessage(
|
|
1684
|
+
errorBody,
|
|
1685
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
1686
|
+
)
|
|
1616
1687
|
);
|
|
1617
1688
|
} catch (err) {
|
|
1618
1689
|
if (err instanceof ErrorEnvelopeError) {
|
|
@@ -1631,7 +1702,12 @@ var QueryAssistanceClient = class {
|
|
|
1631
1702
|
const responseValue = await response.body("json");
|
|
1632
1703
|
try {
|
|
1633
1704
|
const errorBody = fromJson15(responseValue);
|
|
1634
|
-
throw new ErrorEnvelopeError(
|
|
1705
|
+
throw new ErrorEnvelopeError(
|
|
1706
|
+
"500",
|
|
1707
|
+
response,
|
|
1708
|
+
errorBody,
|
|
1709
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
1710
|
+
);
|
|
1635
1711
|
} catch (err) {
|
|
1636
1712
|
if (err instanceof ErrorEnvelopeError) {
|
|
1637
1713
|
throw err;
|
|
@@ -1665,7 +1741,7 @@ var QueryAssistanceClient = class {
|
|
|
1665
1741
|
`${response.status}`,
|
|
1666
1742
|
response,
|
|
1667
1743
|
responseValue,
|
|
1668
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
1744
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
1669
1745
|
);
|
|
1670
1746
|
}
|
|
1671
1747
|
}
|
|
@@ -1705,7 +1781,10 @@ var QueryAssistanceClient = class {
|
|
|
1705
1781
|
"400",
|
|
1706
1782
|
response,
|
|
1707
1783
|
errorBody,
|
|
1708
|
-
|
|
1784
|
+
getErrorMessage(
|
|
1785
|
+
errorBody,
|
|
1786
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
1787
|
+
)
|
|
1709
1788
|
);
|
|
1710
1789
|
} catch (err) {
|
|
1711
1790
|
if (err instanceof ErrorEnvelopeError) {
|
|
@@ -1724,7 +1803,12 @@ var QueryAssistanceClient = class {
|
|
|
1724
1803
|
const responseValue = await response.body("json");
|
|
1725
1804
|
try {
|
|
1726
1805
|
const errorBody = fromJson15(responseValue);
|
|
1727
|
-
throw new ErrorEnvelopeError(
|
|
1806
|
+
throw new ErrorEnvelopeError(
|
|
1807
|
+
"500",
|
|
1808
|
+
response,
|
|
1809
|
+
errorBody,
|
|
1810
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
1811
|
+
);
|
|
1728
1812
|
} catch (err) {
|
|
1729
1813
|
if (err instanceof ErrorEnvelopeError) {
|
|
1730
1814
|
throw err;
|
|
@@ -1758,7 +1842,7 @@ var QueryAssistanceClient = class {
|
|
|
1758
1842
|
`${response.status}`,
|
|
1759
1843
|
response,
|
|
1760
1844
|
responseValue,
|
|
1761
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
1845
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
1762
1846
|
);
|
|
1763
1847
|
}
|
|
1764
1848
|
}
|
|
@@ -1819,7 +1903,8 @@ function isExecuteRequest(value) {
|
|
|
1819
1903
|
const valKeys = new Set(Object.keys(value));
|
|
1820
1904
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1821
1905
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1822
|
-
|
|
1906
|
+
const allPropertiesMatchFormat = true;
|
|
1907
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1823
1908
|
}
|
|
1824
1909
|
function isJson20(value) {
|
|
1825
1910
|
if (value === null) {
|
|
@@ -1863,7 +1948,8 @@ function isJson20(value) {
|
|
|
1863
1948
|
const valKeys = new Set(Object.keys(value));
|
|
1864
1949
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1865
1950
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1866
|
-
|
|
1951
|
+
const allPropertiesMatchFormat = true;
|
|
1952
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1867
1953
|
}
|
|
1868
1954
|
function fromJson20($model) {
|
|
1869
1955
|
const {
|
|
@@ -1987,7 +2073,8 @@ function isTimeframe(value) {
|
|
|
1987
2073
|
const valKeys = new Set(Object.keys(value));
|
|
1988
2074
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1989
2075
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1990
|
-
|
|
2076
|
+
const allPropertiesMatchFormat = value.start instanceof Date && value.end instanceof Date;
|
|
2077
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1991
2078
|
}
|
|
1992
2079
|
function isJson21(value) {
|
|
1993
2080
|
if (value === null) {
|
|
@@ -2006,13 +2093,14 @@ function isJson21(value) {
|
|
|
2006
2093
|
const valKeys = new Set(Object.keys(value));
|
|
2007
2094
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2008
2095
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2009
|
-
|
|
2096
|
+
const allPropertiesMatchFormat = /^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[+-]\d{2}:\d{2})?)$/i.test(value.start) && /^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[+-]\d{2}:\d{2})?)$/i.test(value.end);
|
|
2097
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2010
2098
|
}
|
|
2011
2099
|
function fromJson21($model) {
|
|
2012
2100
|
const { start, end } = $model;
|
|
2013
2101
|
return {
|
|
2014
|
-
start: start !== void 0
|
|
2015
|
-
end: end !== void 0
|
|
2102
|
+
start: start !== void 0 ? new Date(start) : void 0,
|
|
2103
|
+
end: end !== void 0 ? new Date(end) : void 0
|
|
2016
2104
|
};
|
|
2017
2105
|
}
|
|
2018
2106
|
function toJson21($model) {
|
|
@@ -2067,7 +2155,8 @@ function isGrailMetadata(value) {
|
|
|
2067
2155
|
const valKeys = new Set(Object.keys(value));
|
|
2068
2156
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2069
2157
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2070
|
-
|
|
2158
|
+
const allPropertiesMatchFormat = true;
|
|
2159
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2071
2160
|
}
|
|
2072
2161
|
function isJson22(value) {
|
|
2073
2162
|
if (value === null) {
|
|
@@ -2112,7 +2201,8 @@ function isJson22(value) {
|
|
|
2112
2201
|
const valKeys = new Set(Object.keys(value));
|
|
2113
2202
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2114
2203
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2115
|
-
|
|
2204
|
+
const allPropertiesMatchFormat = true;
|
|
2205
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2116
2206
|
}
|
|
2117
2207
|
function fromJson22($model) {
|
|
2118
2208
|
const {
|
|
@@ -2136,10 +2226,10 @@ function fromJson22($model) {
|
|
|
2136
2226
|
scannedRecords,
|
|
2137
2227
|
dqlVersion,
|
|
2138
2228
|
scannedBytes,
|
|
2139
|
-
analysisTimeframe: analysisTimeframe !== void 0
|
|
2229
|
+
analysisTimeframe: analysisTimeframe !== void 0 ? fromJson21(analysisTimeframe) : void 0,
|
|
2140
2230
|
locale,
|
|
2141
2231
|
executionTimeMilliseconds,
|
|
2142
|
-
notifications: notifications !== void 0
|
|
2232
|
+
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0,
|
|
2143
2233
|
queryId,
|
|
2144
2234
|
sampled
|
|
2145
2235
|
};
|
|
@@ -2200,7 +2290,8 @@ function isMetricMetadata(value) {
|
|
|
2200
2290
|
const valKeys = new Set(Object.keys(value));
|
|
2201
2291
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2202
2292
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2203
|
-
|
|
2293
|
+
const allPropertiesMatchFormat = true;
|
|
2294
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2204
2295
|
}
|
|
2205
2296
|
function isJson23(value) {
|
|
2206
2297
|
if (value === null) {
|
|
@@ -2219,7 +2310,8 @@ function isJson23(value) {
|
|
|
2219
2310
|
const valKeys = new Set(Object.keys(value));
|
|
2220
2311
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2221
2312
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2222
|
-
|
|
2313
|
+
const allPropertiesMatchFormat = true;
|
|
2314
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2223
2315
|
}
|
|
2224
2316
|
function fromJson23($model) {
|
|
2225
2317
|
const { "metric.key": metricKey, displayName, description, unit, fieldName } = $model;
|
|
@@ -2260,7 +2352,8 @@ function isMetadata(value) {
|
|
|
2260
2352
|
const valKeys = new Set(Object.keys(value));
|
|
2261
2353
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2262
2354
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2263
|
-
|
|
2355
|
+
const allPropertiesMatchFormat = true;
|
|
2356
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2264
2357
|
}
|
|
2265
2358
|
function isJson24(value) {
|
|
2266
2359
|
if (value === null) {
|
|
@@ -2279,13 +2372,14 @@ function isJson24(value) {
|
|
|
2279
2372
|
const valKeys = new Set(Object.keys(value));
|
|
2280
2373
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2281
2374
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2282
|
-
|
|
2375
|
+
const allPropertiesMatchFormat = true;
|
|
2376
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2283
2377
|
}
|
|
2284
2378
|
function fromJson24($model) {
|
|
2285
2379
|
const { grail, metrics } = $model;
|
|
2286
2380
|
return {
|
|
2287
|
-
grail: grail !== void 0
|
|
2288
|
-
metrics: metrics !== void 0
|
|
2381
|
+
grail: grail !== void 0 ? fromJson22(grail) : void 0,
|
|
2382
|
+
metrics: metrics !== void 0 ? metrics?.map((innerValue) => fromJson23(innerValue)) : void 0
|
|
2289
2383
|
};
|
|
2290
2384
|
}
|
|
2291
2385
|
function toJson24($model) {
|
|
@@ -2362,7 +2456,8 @@ function isFieldType(value) {
|
|
|
2362
2456
|
const valKeys = new Set(Object.keys(value));
|
|
2363
2457
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2364
2458
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2365
|
-
|
|
2459
|
+
const allPropertiesMatchFormat = true;
|
|
2460
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2366
2461
|
}
|
|
2367
2462
|
function isJson26(value) {
|
|
2368
2463
|
if (value === null) {
|
|
@@ -2381,13 +2476,14 @@ function isJson26(value) {
|
|
|
2381
2476
|
const valKeys = new Set(Object.keys(value));
|
|
2382
2477
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2383
2478
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2384
|
-
|
|
2479
|
+
const allPropertiesMatchFormat = true;
|
|
2480
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2385
2481
|
}
|
|
2386
2482
|
function fromJson27($model) {
|
|
2387
2483
|
const { type, types } = $model;
|
|
2388
2484
|
return {
|
|
2389
2485
|
type: fromJson25(type),
|
|
2390
|
-
types: types !== void 0
|
|
2486
|
+
types: types !== void 0 ? types?.map((innerValue) => fromJson26(innerValue)) : void 0
|
|
2391
2487
|
};
|
|
2392
2488
|
}
|
|
2393
2489
|
function toJson27($model) {
|
|
@@ -2416,7 +2512,8 @@ function isRangedFieldTypesMappings(value) {
|
|
|
2416
2512
|
const valKeys = new Set(Object.keys(value));
|
|
2417
2513
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2418
2514
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2419
|
-
|
|
2515
|
+
const allPropertiesMatchFormat = true;
|
|
2516
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2420
2517
|
}
|
|
2421
2518
|
function isJson27(value) {
|
|
2422
2519
|
if (value === null) {
|
|
@@ -2435,7 +2532,8 @@ function isJson27(value) {
|
|
|
2435
2532
|
const valKeys = new Set(Object.keys(value));
|
|
2436
2533
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2437
2534
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2438
|
-
|
|
2535
|
+
const allPropertiesMatchFormat = true;
|
|
2536
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2439
2537
|
}
|
|
2440
2538
|
function fromJson28($model) {
|
|
2441
2539
|
const additionalProps = $model;
|
|
@@ -2443,7 +2541,7 @@ function fromJson28($model) {
|
|
|
2443
2541
|
...Object.fromEntries(
|
|
2444
2542
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2445
2543
|
propName,
|
|
2446
|
-
value !== void 0
|
|
2544
|
+
value !== void 0 ? fromJson27(value) : void 0
|
|
2447
2545
|
])
|
|
2448
2546
|
)
|
|
2449
2547
|
};
|
|
@@ -2478,7 +2576,8 @@ function isRangedFieldTypes(value) {
|
|
|
2478
2576
|
const valKeys = new Set(Object.keys(value));
|
|
2479
2577
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2480
2578
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2481
|
-
|
|
2579
|
+
const allPropertiesMatchFormat = true;
|
|
2580
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2482
2581
|
}
|
|
2483
2582
|
function isJson28(value) {
|
|
2484
2583
|
if (value === null) {
|
|
@@ -2497,13 +2596,14 @@ function isJson28(value) {
|
|
|
2497
2596
|
const valKeys = new Set(Object.keys(value));
|
|
2498
2597
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2499
2598
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2500
|
-
|
|
2599
|
+
const allPropertiesMatchFormat = true;
|
|
2600
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2501
2601
|
}
|
|
2502
2602
|
function fromJson26($model) {
|
|
2503
2603
|
const { mappings, indexRange } = $model;
|
|
2504
2604
|
return {
|
|
2505
2605
|
mappings: fromJson28(mappings),
|
|
2506
|
-
indexRange: indexRange !== void 0
|
|
2606
|
+
indexRange: indexRange !== void 0 ? indexRange?.slice(0) : void 0
|
|
2507
2607
|
};
|
|
2508
2608
|
}
|
|
2509
2609
|
function toJson26($model) {
|
|
@@ -2570,7 +2670,8 @@ function isGeoPoint(value) {
|
|
|
2570
2670
|
const valKeys = new Set(Object.keys(value));
|
|
2571
2671
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2572
2672
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2573
|
-
|
|
2673
|
+
const allPropertiesMatchFormat = true;
|
|
2674
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2574
2675
|
}
|
|
2575
2676
|
function isJson29(value) {
|
|
2576
2677
|
if (value === null) {
|
|
@@ -2589,7 +2690,8 @@ function isJson29(value) {
|
|
|
2589
2690
|
const valKeys = new Set(Object.keys(value));
|
|
2590
2691
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2591
2692
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2592
|
-
|
|
2693
|
+
const allPropertiesMatchFormat = true;
|
|
2694
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2593
2695
|
}
|
|
2594
2696
|
function fromJson29($model) {
|
|
2595
2697
|
const { latitude, longitude } = $model;
|
|
@@ -2733,7 +2835,8 @@ function isResultRecord(value) {
|
|
|
2733
2835
|
const valKeys = new Set(Object.keys(value));
|
|
2734
2836
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2735
2837
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2736
|
-
|
|
2838
|
+
const allPropertiesMatchFormat = true;
|
|
2839
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2737
2840
|
}
|
|
2738
2841
|
function isJson30(value) {
|
|
2739
2842
|
if (value === null) {
|
|
@@ -2752,7 +2855,8 @@ function isJson30(value) {
|
|
|
2752
2855
|
const valKeys = new Set(Object.keys(value));
|
|
2753
2856
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2754
2857
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2755
|
-
|
|
2858
|
+
const allPropertiesMatchFormat = true;
|
|
2859
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2756
2860
|
}
|
|
2757
2861
|
function fromJson30($model) {
|
|
2758
2862
|
if ($model === null) {
|
|
@@ -2763,7 +2867,7 @@ function fromJson30($model) {
|
|
|
2763
2867
|
...Object.fromEntries(
|
|
2764
2868
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2765
2869
|
propName,
|
|
2766
|
-
value !== void 0
|
|
2870
|
+
value !== void 0 ? fromJson31(value) : void 0
|
|
2767
2871
|
])
|
|
2768
2872
|
)
|
|
2769
2873
|
};
|
|
@@ -2801,7 +2905,8 @@ function isQueryResult(value) {
|
|
|
2801
2905
|
const valKeys = new Set(Object.keys(value));
|
|
2802
2906
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2803
2907
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2804
|
-
|
|
2908
|
+
const allPropertiesMatchFormat = true;
|
|
2909
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2805
2910
|
}
|
|
2806
2911
|
function isJson32(value) {
|
|
2807
2912
|
if (value === null) {
|
|
@@ -2820,7 +2925,8 @@ function isJson32(value) {
|
|
|
2820
2925
|
const valKeys = new Set(Object.keys(value));
|
|
2821
2926
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2822
2927
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2823
|
-
|
|
2928
|
+
const allPropertiesMatchFormat = true;
|
|
2929
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2824
2930
|
}
|
|
2825
2931
|
function fromJson32($model) {
|
|
2826
2932
|
const { records, metadata, types } = $model;
|
|
@@ -2878,7 +2984,8 @@ function isQueryPollResponse(value) {
|
|
|
2878
2984
|
const valKeys = new Set(Object.keys(value));
|
|
2879
2985
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2880
2986
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2881
|
-
|
|
2987
|
+
const allPropertiesMatchFormat = true;
|
|
2988
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2882
2989
|
}
|
|
2883
2990
|
function isJson34(value) {
|
|
2884
2991
|
if (value === null) {
|
|
@@ -2897,12 +3004,13 @@ function isJson34(value) {
|
|
|
2897
3004
|
const valKeys = new Set(Object.keys(value));
|
|
2898
3005
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2899
3006
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2900
|
-
|
|
3007
|
+
const allPropertiesMatchFormat = true;
|
|
3008
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2901
3009
|
}
|
|
2902
3010
|
function fromJson34($model) {
|
|
2903
3011
|
const { result, ttlSeconds, progress, state } = $model;
|
|
2904
3012
|
return {
|
|
2905
|
-
result: result !== void 0
|
|
3013
|
+
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
2906
3014
|
ttlSeconds,
|
|
2907
3015
|
progress,
|
|
2908
3016
|
state: fromJson33(state)
|
|
@@ -2943,7 +3051,8 @@ function isQueryStartResponse(value) {
|
|
|
2943
3051
|
const valKeys = new Set(Object.keys(value));
|
|
2944
3052
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2945
3053
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2946
|
-
|
|
3054
|
+
const allPropertiesMatchFormat = true;
|
|
3055
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2947
3056
|
}
|
|
2948
3057
|
function isJson35(value) {
|
|
2949
3058
|
if (value === null) {
|
|
@@ -2962,12 +3071,13 @@ function isJson35(value) {
|
|
|
2962
3071
|
const valKeys = new Set(Object.keys(value));
|
|
2963
3072
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2964
3073
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2965
|
-
|
|
3074
|
+
const allPropertiesMatchFormat = true;
|
|
3075
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2966
3076
|
}
|
|
2967
3077
|
function fromJson35($model) {
|
|
2968
3078
|
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
2969
3079
|
return {
|
|
2970
|
-
result: result !== void 0
|
|
3080
|
+
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
2971
3081
|
ttlSeconds,
|
|
2972
3082
|
progress,
|
|
2973
3083
|
requestToken,
|
|
@@ -3039,14 +3149,19 @@ var QueryExecutionClient = class {
|
|
|
3039
3149
|
`410`,
|
|
3040
3150
|
response,
|
|
3041
3151
|
responseValue,
|
|
3042
|
-
`The query for the given request-token is not available anymore.`
|
|
3152
|
+
getErrorMessage(responseValue, `The query for the given request-token is not available anymore.`)
|
|
3043
3153
|
);
|
|
3044
3154
|
}
|
|
3045
3155
|
case 500: {
|
|
3046
3156
|
const responseValue = await response.body("json");
|
|
3047
3157
|
try {
|
|
3048
3158
|
const errorBody = fromJson15(responseValue);
|
|
3049
|
-
throw new ErrorEnvelopeError(
|
|
3159
|
+
throw new ErrorEnvelopeError(
|
|
3160
|
+
"500",
|
|
3161
|
+
response,
|
|
3162
|
+
errorBody,
|
|
3163
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
3164
|
+
);
|
|
3050
3165
|
} catch (err) {
|
|
3051
3166
|
if (err instanceof ErrorEnvelopeError) {
|
|
3052
3167
|
throw err;
|
|
@@ -3080,7 +3195,7 @@ var QueryExecutionClient = class {
|
|
|
3080
3195
|
`${response.status}`,
|
|
3081
3196
|
response,
|
|
3082
3197
|
responseValue,
|
|
3083
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
3198
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
3084
3199
|
);
|
|
3085
3200
|
}
|
|
3086
3201
|
}
|
|
@@ -3121,7 +3236,10 @@ var QueryExecutionClient = class {
|
|
|
3121
3236
|
"400",
|
|
3122
3237
|
response,
|
|
3123
3238
|
errorBody,
|
|
3124
|
-
|
|
3239
|
+
getErrorMessage(
|
|
3240
|
+
errorBody,
|
|
3241
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
3242
|
+
)
|
|
3125
3243
|
);
|
|
3126
3244
|
} catch (err) {
|
|
3127
3245
|
if (err instanceof ErrorEnvelopeError) {
|
|
@@ -3140,7 +3258,12 @@ var QueryExecutionClient = class {
|
|
|
3140
3258
|
const responseValue = await response.body("json");
|
|
3141
3259
|
try {
|
|
3142
3260
|
const errorBody = fromJson15(responseValue);
|
|
3143
|
-
throw new ErrorEnvelopeError(
|
|
3261
|
+
throw new ErrorEnvelopeError(
|
|
3262
|
+
"500",
|
|
3263
|
+
response,
|
|
3264
|
+
errorBody,
|
|
3265
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
3266
|
+
);
|
|
3144
3267
|
} catch (err) {
|
|
3145
3268
|
if (err instanceof ErrorEnvelopeError) {
|
|
3146
3269
|
throw err;
|
|
@@ -3158,7 +3281,12 @@ var QueryExecutionClient = class {
|
|
|
3158
3281
|
const responseValue = await response.body("json");
|
|
3159
3282
|
try {
|
|
3160
3283
|
const errorBody = fromJson15(responseValue);
|
|
3161
|
-
throw new ErrorEnvelopeError(
|
|
3284
|
+
throw new ErrorEnvelopeError(
|
|
3285
|
+
"503",
|
|
3286
|
+
response,
|
|
3287
|
+
errorBody,
|
|
3288
|
+
getErrorMessage(errorBody, "Service is unavailable.")
|
|
3289
|
+
);
|
|
3162
3290
|
} catch (err) {
|
|
3163
3291
|
if (err instanceof ErrorEnvelopeError) {
|
|
3164
3292
|
throw err;
|
|
@@ -3206,7 +3334,7 @@ var QueryExecutionClient = class {
|
|
|
3206
3334
|
`${response.status}`,
|
|
3207
3335
|
response,
|
|
3208
3336
|
responseValue,
|
|
3209
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
3337
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
3210
3338
|
);
|
|
3211
3339
|
}
|
|
3212
3340
|
}
|
|
@@ -3237,14 +3365,19 @@ var QueryExecutionClient = class {
|
|
|
3237
3365
|
`410`,
|
|
3238
3366
|
response,
|
|
3239
3367
|
responseValue,
|
|
3240
|
-
`The query for the given request-token is not available anymore.`
|
|
3368
|
+
getErrorMessage(responseValue, `The query for the given request-token is not available anymore.`)
|
|
3241
3369
|
);
|
|
3242
3370
|
}
|
|
3243
3371
|
case 500: {
|
|
3244
3372
|
const responseValue = await response.body("json");
|
|
3245
3373
|
try {
|
|
3246
3374
|
const errorBody = fromJson15(responseValue);
|
|
3247
|
-
throw new ErrorEnvelopeError(
|
|
3375
|
+
throw new ErrorEnvelopeError(
|
|
3376
|
+
"500",
|
|
3377
|
+
response,
|
|
3378
|
+
errorBody,
|
|
3379
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
3380
|
+
);
|
|
3248
3381
|
} catch (err) {
|
|
3249
3382
|
if (err instanceof ErrorEnvelopeError) {
|
|
3250
3383
|
throw err;
|
|
@@ -3281,7 +3414,7 @@ var QueryExecutionClient = class {
|
|
|
3281
3414
|
`${response.status}`,
|
|
3282
3415
|
response,
|
|
3283
3416
|
responseValue,
|
|
3284
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
3417
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
3285
3418
|
);
|
|
3286
3419
|
}
|
|
3287
3420
|
}
|