@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/esm/index.js
CHANGED
|
@@ -112,6 +112,27 @@ function getOptionalErrorRef(body) {
|
|
|
112
112
|
return {};
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
// packages/client/query/src/lib/error-envelopes/get-error-message.ts
|
|
116
|
+
function getMessagesFromErrorDetails(details) {
|
|
117
|
+
const messages = [];
|
|
118
|
+
Object.entries(details).forEach(([name, data]) => {
|
|
119
|
+
switch (name) {
|
|
120
|
+
case "missingScopes":
|
|
121
|
+
messages.push(`Missing scopes: ${data}`);
|
|
122
|
+
break;
|
|
123
|
+
default:
|
|
124
|
+
messages.push(`${name}: ${data}`);
|
|
125
|
+
}
|
|
126
|
+
}, []);
|
|
127
|
+
return messages;
|
|
128
|
+
}
|
|
129
|
+
function getErrorMessage(errorBody, defaultMessage) {
|
|
130
|
+
const error = errorBody;
|
|
131
|
+
const msg = error?.error?.message || defaultMessage;
|
|
132
|
+
const details = error?.error?.details || {};
|
|
133
|
+
return [msg, ...getMessagesFromErrorDetails(details)].join(". ");
|
|
134
|
+
}
|
|
135
|
+
|
|
115
136
|
// packages/client/query/src/lib/error-envelopes/invalid-response-error.ts
|
|
116
137
|
var InvalidResponseError = class extends ApiClientError {
|
|
117
138
|
responseBody;
|
|
@@ -127,6 +148,9 @@ var InvalidResponseError = class extends ApiClientError {
|
|
|
127
148
|
this.expectedType = expectedType;
|
|
128
149
|
}
|
|
129
150
|
};
|
|
151
|
+
function isInvalidResponseError(e) {
|
|
152
|
+
return e instanceof InvalidResponseError;
|
|
153
|
+
}
|
|
130
154
|
|
|
131
155
|
// packages/client/query/src/lib/models/autocomplete-request.transformation.ts
|
|
132
156
|
var autocomplete_request_transformation_exports = {};
|
|
@@ -153,7 +177,8 @@ function isAutocompleteRequest(value) {
|
|
|
153
177
|
const valKeys = new Set(Object.keys(value));
|
|
154
178
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
155
179
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
156
|
-
|
|
180
|
+
const allPropertiesMatchFormat = true;
|
|
181
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
157
182
|
}
|
|
158
183
|
function isJson(value) {
|
|
159
184
|
if (value === null) {
|
|
@@ -172,7 +197,8 @@ function isJson(value) {
|
|
|
172
197
|
const valKeys = new Set(Object.keys(value));
|
|
173
198
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
174
199
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
175
|
-
|
|
200
|
+
const allPropertiesMatchFormat = true;
|
|
201
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
176
202
|
}
|
|
177
203
|
function fromJson($model) {
|
|
178
204
|
const { query, cursorPosition, timezone, locale } = $model;
|
|
@@ -259,7 +285,8 @@ function isAutocompleteSuggestionPart(value) {
|
|
|
259
285
|
const valKeys = new Set(Object.keys(value));
|
|
260
286
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
261
287
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
262
|
-
|
|
288
|
+
const allPropertiesMatchFormat = true;
|
|
289
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
263
290
|
}
|
|
264
291
|
function isJson3(value) {
|
|
265
292
|
if (value === null) {
|
|
@@ -278,7 +305,8 @@ function isJson3(value) {
|
|
|
278
305
|
const valKeys = new Set(Object.keys(value));
|
|
279
306
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
280
307
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
281
|
-
|
|
308
|
+
const allPropertiesMatchFormat = true;
|
|
309
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
282
310
|
}
|
|
283
311
|
function fromJson3($model) {
|
|
284
312
|
const { type, info, synopsis, suggestion } = $model;
|
|
@@ -317,7 +345,8 @@ function isAutocompleteSuggestion(value) {
|
|
|
317
345
|
const valKeys = new Set(Object.keys(value));
|
|
318
346
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
319
347
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
320
|
-
|
|
348
|
+
const allPropertiesMatchFormat = true;
|
|
349
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
321
350
|
}
|
|
322
351
|
function isJson4(value) {
|
|
323
352
|
if (value === null) {
|
|
@@ -336,7 +365,8 @@ function isJson4(value) {
|
|
|
336
365
|
const valKeys = new Set(Object.keys(value));
|
|
337
366
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
338
367
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
339
|
-
|
|
368
|
+
const allPropertiesMatchFormat = true;
|
|
369
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
340
370
|
}
|
|
341
371
|
function fromJson4($model) {
|
|
342
372
|
const { parts, alreadyTypedCharacters, suggestion } = $model;
|
|
@@ -373,7 +403,8 @@ function isAutocompleteResponse(value) {
|
|
|
373
403
|
const valKeys = new Set(Object.keys(value));
|
|
374
404
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
375
405
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
376
|
-
|
|
406
|
+
const allPropertiesMatchFormat = true;
|
|
407
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
377
408
|
}
|
|
378
409
|
function isJson5(value) {
|
|
379
410
|
if (value === null) {
|
|
@@ -392,7 +423,8 @@ function isJson5(value) {
|
|
|
392
423
|
const valKeys = new Set(Object.keys(value));
|
|
393
424
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
394
425
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
395
|
-
|
|
426
|
+
const allPropertiesMatchFormat = true;
|
|
427
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
396
428
|
}
|
|
397
429
|
function fromJson5($model) {
|
|
398
430
|
const { optional, suggestions, suggestedTtlSeconds } = $model;
|
|
@@ -447,7 +479,8 @@ function isDqlAlternativeNode(value) {
|
|
|
447
479
|
const valKeys = new Set(Object.keys(value));
|
|
448
480
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
449
481
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
450
|
-
|
|
482
|
+
const allPropertiesMatchFormat = true;
|
|
483
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
451
484
|
}
|
|
452
485
|
function isJson6(value) {
|
|
453
486
|
if (value === null) {
|
|
@@ -466,7 +499,8 @@ function isJson6(value) {
|
|
|
466
499
|
const valKeys = new Set(Object.keys(value));
|
|
467
500
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
468
501
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
469
|
-
|
|
502
|
+
const allPropertiesMatchFormat = true;
|
|
503
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
470
504
|
}
|
|
471
505
|
function fromJson7($model) {
|
|
472
506
|
const { alternatives } = $model;
|
|
@@ -508,7 +542,8 @@ function isDqlContainerNode(value) {
|
|
|
508
542
|
const valKeys = new Set(Object.keys(value));
|
|
509
543
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
510
544
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
511
|
-
|
|
545
|
+
const allPropertiesMatchFormat = true;
|
|
546
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
512
547
|
}
|
|
513
548
|
function isJson7(value) {
|
|
514
549
|
if (value === null) {
|
|
@@ -527,14 +562,15 @@ function isJson7(value) {
|
|
|
527
562
|
const valKeys = new Set(Object.keys(value));
|
|
528
563
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
529
564
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
530
|
-
|
|
565
|
+
const allPropertiesMatchFormat = true;
|
|
566
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
531
567
|
}
|
|
532
568
|
function fromJson8($model) {
|
|
533
569
|
const { type, children } = $model;
|
|
534
570
|
return {
|
|
535
571
|
...fromJson6($model, false),
|
|
536
572
|
type,
|
|
537
|
-
children: children !== void 0
|
|
573
|
+
children: children !== void 0 ? children?.map((innerValue) => fromJson6(innerValue)) : void 0
|
|
538
574
|
};
|
|
539
575
|
}
|
|
540
576
|
function toJson8($model) {
|
|
@@ -592,7 +628,8 @@ function isDqlTerminalNode(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 isJson9(value) {
|
|
598
635
|
if (value === null) {
|
|
@@ -611,13 +648,14 @@ function isJson9(value) {
|
|
|
611
648
|
const valKeys = new Set(Object.keys(value));
|
|
612
649
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
613
650
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
614
|
-
|
|
651
|
+
const allPropertiesMatchFormat = true;
|
|
652
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
615
653
|
}
|
|
616
654
|
function fromJson10($model) {
|
|
617
655
|
const { type, isMandatoryOnUserOrder, canonicalString } = $model;
|
|
618
656
|
return {
|
|
619
657
|
...fromJson6($model, false),
|
|
620
|
-
type: type !== void 0
|
|
658
|
+
type: type !== void 0 ? fromJson2(type) : void 0,
|
|
621
659
|
isMandatoryOnUserOrder,
|
|
622
660
|
canonicalString
|
|
623
661
|
};
|
|
@@ -668,7 +706,8 @@ function isPositionInfo(value) {
|
|
|
668
706
|
const valKeys = new Set(Object.keys(value));
|
|
669
707
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
670
708
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
671
|
-
|
|
709
|
+
const allPropertiesMatchFormat = true;
|
|
710
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
672
711
|
}
|
|
673
712
|
function isJson10(value) {
|
|
674
713
|
if (value === null) {
|
|
@@ -687,7 +726,8 @@ function isJson10(value) {
|
|
|
687
726
|
const valKeys = new Set(Object.keys(value));
|
|
688
727
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
689
728
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
690
|
-
|
|
729
|
+
const allPropertiesMatchFormat = true;
|
|
730
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
691
731
|
}
|
|
692
732
|
function fromJson11($model) {
|
|
693
733
|
const { column, index, line } = $model;
|
|
@@ -724,7 +764,8 @@ function isTokenPosition(value) {
|
|
|
724
764
|
const valKeys = new Set(Object.keys(value));
|
|
725
765
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
726
766
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
727
|
-
|
|
767
|
+
const allPropertiesMatchFormat = true;
|
|
768
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
728
769
|
}
|
|
729
770
|
function isJson11(value) {
|
|
730
771
|
if (value === null) {
|
|
@@ -743,7 +784,8 @@ function isJson11(value) {
|
|
|
743
784
|
const valKeys = new Set(Object.keys(value));
|
|
744
785
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
745
786
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
746
|
-
|
|
787
|
+
const allPropertiesMatchFormat = true;
|
|
788
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
747
789
|
}
|
|
748
790
|
function fromJson12($model) {
|
|
749
791
|
const { start, end } = $model;
|
|
@@ -802,7 +844,8 @@ function isJson12(value) {
|
|
|
802
844
|
const valKeys = new Set(Object.keys(value));
|
|
803
845
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
804
846
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
805
|
-
|
|
847
|
+
const allPropertiesMatchFormat = true;
|
|
848
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
806
849
|
}
|
|
807
850
|
function fromJson6($model, includeChildProps = true) {
|
|
808
851
|
if (includeChildProps) {
|
|
@@ -820,7 +863,7 @@ function fromJson6($model, includeChildProps = true) {
|
|
|
820
863
|
const { nodeType, tokenPosition, isOptional } = $model;
|
|
821
864
|
return {
|
|
822
865
|
nodeType: fromJson9(nodeType),
|
|
823
|
-
tokenPosition: tokenPosition !== void 0
|
|
866
|
+
tokenPosition: tokenPosition !== void 0 ? fromJson12(tokenPosition) : void 0,
|
|
824
867
|
isOptional
|
|
825
868
|
};
|
|
826
869
|
}
|
|
@@ -907,7 +950,8 @@ function isErrorResponseDetails(value) {
|
|
|
907
950
|
const valKeys = new Set(Object.keys(value));
|
|
908
951
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
909
952
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
910
|
-
|
|
953
|
+
const allPropertiesMatchFormat = true;
|
|
954
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
911
955
|
}
|
|
912
956
|
function isJson13(value) {
|
|
913
957
|
if (value === null) {
|
|
@@ -943,7 +987,8 @@ function isJson13(value) {
|
|
|
943
987
|
const valKeys = new Set(Object.keys(value));
|
|
944
988
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
945
989
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
946
|
-
|
|
990
|
+
const allPropertiesMatchFormat = true;
|
|
991
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
947
992
|
}
|
|
948
993
|
function fromJson13($model) {
|
|
949
994
|
const {
|
|
@@ -958,7 +1003,7 @@ function fromJson13($model) {
|
|
|
958
1003
|
} = $model;
|
|
959
1004
|
return {
|
|
960
1005
|
exceptionType,
|
|
961
|
-
syntaxErrorPosition: syntaxErrorPosition !== void 0
|
|
1006
|
+
syntaxErrorPosition: syntaxErrorPosition !== void 0 ? fromJson12(syntaxErrorPosition) : void 0,
|
|
962
1007
|
errorType,
|
|
963
1008
|
errorMessage,
|
|
964
1009
|
arguments: _arguments?.slice(0),
|
|
@@ -1008,7 +1053,8 @@ function isErrorResponse(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 isJson14(value) {
|
|
1014
1060
|
if (value === null) {
|
|
@@ -1027,7 +1073,8 @@ function isJson14(value) {
|
|
|
1027
1073
|
const valKeys = new Set(Object.keys(value));
|
|
1028
1074
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1029
1075
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1030
|
-
|
|
1076
|
+
const allPropertiesMatchFormat = true;
|
|
1077
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1031
1078
|
}
|
|
1032
1079
|
function fromJson14($model) {
|
|
1033
1080
|
const { message, details, code } = $model;
|
|
@@ -1064,7 +1111,8 @@ function isErrorEnvelope(value) {
|
|
|
1064
1111
|
const valKeys = new Set(Object.keys(value));
|
|
1065
1112
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1066
1113
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1067
|
-
|
|
1114
|
+
const allPropertiesMatchFormat = true;
|
|
1115
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1068
1116
|
}
|
|
1069
1117
|
function isJson15(value) {
|
|
1070
1118
|
if (value === null) {
|
|
@@ -1083,7 +1131,8 @@ function isJson15(value) {
|
|
|
1083
1131
|
const valKeys = new Set(Object.keys(value));
|
|
1084
1132
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1085
1133
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1086
|
-
|
|
1134
|
+
const allPropertiesMatchFormat = true;
|
|
1135
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1087
1136
|
}
|
|
1088
1137
|
function fromJson15($model) {
|
|
1089
1138
|
const { error } = $model;
|
|
@@ -1134,7 +1183,8 @@ function isParseRequest(value) {
|
|
|
1134
1183
|
const valKeys = new Set(Object.keys(value));
|
|
1135
1184
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1136
1185
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1137
|
-
|
|
1186
|
+
const allPropertiesMatchFormat = true;
|
|
1187
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1138
1188
|
}
|
|
1139
1189
|
function isJson16(value) {
|
|
1140
1190
|
if (value === null) {
|
|
@@ -1153,7 +1203,8 @@ function isJson16(value) {
|
|
|
1153
1203
|
const valKeys = new Set(Object.keys(value));
|
|
1154
1204
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1155
1205
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1156
|
-
|
|
1206
|
+
const allPropertiesMatchFormat = true;
|
|
1207
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1157
1208
|
}
|
|
1158
1209
|
function fromJson16($model) {
|
|
1159
1210
|
const { query, timezone, locale } = $model;
|
|
@@ -1197,7 +1248,8 @@ function isVerifyRequest(value) {
|
|
|
1197
1248
|
const valKeys = new Set(Object.keys(value));
|
|
1198
1249
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1199
1250
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1200
|
-
|
|
1251
|
+
const allPropertiesMatchFormat = true;
|
|
1252
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1201
1253
|
}
|
|
1202
1254
|
function isJson17(value) {
|
|
1203
1255
|
if (value === null) {
|
|
@@ -1216,7 +1268,8 @@ function isJson17(value) {
|
|
|
1216
1268
|
const valKeys = new Set(Object.keys(value));
|
|
1217
1269
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1218
1270
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1219
|
-
|
|
1271
|
+
const allPropertiesMatchFormat = true;
|
|
1272
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1220
1273
|
}
|
|
1221
1274
|
function fromJson17($model) {
|
|
1222
1275
|
const { query, timezone, locale } = $model;
|
|
@@ -1285,7 +1338,8 @@ function isMetadataNotification(value) {
|
|
|
1285
1338
|
const valKeys = new Set(Object.keys(value));
|
|
1286
1339
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1287
1340
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1288
|
-
|
|
1341
|
+
const allPropertiesMatchFormat = true;
|
|
1342
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1289
1343
|
}
|
|
1290
1344
|
function isJson18(value) {
|
|
1291
1345
|
if (value === null) {
|
|
@@ -1320,7 +1374,8 @@ function isJson18(value) {
|
|
|
1320
1374
|
const valKeys = new Set(Object.keys(value));
|
|
1321
1375
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1322
1376
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1323
|
-
|
|
1377
|
+
const allPropertiesMatchFormat = true;
|
|
1378
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1324
1379
|
}
|
|
1325
1380
|
function fromJson18($model) {
|
|
1326
1381
|
const {
|
|
@@ -1335,9 +1390,9 @@ function fromJson18($model) {
|
|
|
1335
1390
|
return {
|
|
1336
1391
|
severity,
|
|
1337
1392
|
messageFormat,
|
|
1338
|
-
syntaxPosition: syntaxPosition !== void 0
|
|
1339
|
-
messageFormatSpecifierTypes: messageFormatSpecifierTypes !== void 0
|
|
1340
|
-
arguments: _arguments !== void 0
|
|
1393
|
+
syntaxPosition: syntaxPosition !== void 0 ? fromJson12(syntaxPosition) : void 0,
|
|
1394
|
+
messageFormatSpecifierTypes: messageFormatSpecifierTypes !== void 0 ? messageFormatSpecifierTypes?.slice(0) : void 0,
|
|
1395
|
+
arguments: _arguments !== void 0 ? _arguments?.slice(0) : void 0,
|
|
1341
1396
|
notificationType,
|
|
1342
1397
|
message
|
|
1343
1398
|
};
|
|
@@ -1381,7 +1436,8 @@ function isVerifyResponse(value) {
|
|
|
1381
1436
|
const valKeys = new Set(Object.keys(value));
|
|
1382
1437
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1383
1438
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1384
|
-
|
|
1439
|
+
const allPropertiesMatchFormat = true;
|
|
1440
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1385
1441
|
}
|
|
1386
1442
|
function isJson19(value) {
|
|
1387
1443
|
if (value === null) {
|
|
@@ -1400,13 +1456,14 @@ function isJson19(value) {
|
|
|
1400
1456
|
const valKeys = new Set(Object.keys(value));
|
|
1401
1457
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1402
1458
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1403
|
-
|
|
1459
|
+
const allPropertiesMatchFormat = true;
|
|
1460
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1404
1461
|
}
|
|
1405
1462
|
function fromJson19($model) {
|
|
1406
1463
|
const { valid, notifications } = $model;
|
|
1407
1464
|
return {
|
|
1408
1465
|
valid,
|
|
1409
|
-
notifications: notifications !== void 0
|
|
1466
|
+
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0
|
|
1410
1467
|
};
|
|
1411
1468
|
}
|
|
1412
1469
|
function toJson19($model) {
|
|
@@ -1455,7 +1512,12 @@ var QueryAssistanceClient = class {
|
|
|
1455
1512
|
const responseValue = await response.body("json");
|
|
1456
1513
|
try {
|
|
1457
1514
|
const errorBody = fromJson15(responseValue);
|
|
1458
|
-
throw new ErrorEnvelopeError(
|
|
1515
|
+
throw new ErrorEnvelopeError(
|
|
1516
|
+
"400",
|
|
1517
|
+
response,
|
|
1518
|
+
errorBody,
|
|
1519
|
+
getErrorMessage(errorBody, "The supplied request is wrong.")
|
|
1520
|
+
);
|
|
1459
1521
|
} catch (err) {
|
|
1460
1522
|
if (err instanceof ErrorEnvelopeError) {
|
|
1461
1523
|
throw err;
|
|
@@ -1473,7 +1535,12 @@ var QueryAssistanceClient = class {
|
|
|
1473
1535
|
const responseValue = await response.body("json");
|
|
1474
1536
|
try {
|
|
1475
1537
|
const errorBody = fromJson15(responseValue);
|
|
1476
|
-
throw new ErrorEnvelopeError(
|
|
1538
|
+
throw new ErrorEnvelopeError(
|
|
1539
|
+
"500",
|
|
1540
|
+
response,
|
|
1541
|
+
errorBody,
|
|
1542
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
1543
|
+
);
|
|
1477
1544
|
} catch (err) {
|
|
1478
1545
|
if (err instanceof ErrorEnvelopeError) {
|
|
1479
1546
|
throw err;
|
|
@@ -1507,7 +1574,7 @@ var QueryAssistanceClient = class {
|
|
|
1507
1574
|
`${response.status}`,
|
|
1508
1575
|
response,
|
|
1509
1576
|
responseValue,
|
|
1510
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
1577
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
1511
1578
|
);
|
|
1512
1579
|
}
|
|
1513
1580
|
}
|
|
@@ -1547,7 +1614,10 @@ var QueryAssistanceClient = class {
|
|
|
1547
1614
|
"400",
|
|
1548
1615
|
response,
|
|
1549
1616
|
errorBody,
|
|
1550
|
-
|
|
1617
|
+
getErrorMessage(
|
|
1618
|
+
errorBody,
|
|
1619
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
1620
|
+
)
|
|
1551
1621
|
);
|
|
1552
1622
|
} catch (err) {
|
|
1553
1623
|
if (err instanceof ErrorEnvelopeError) {
|
|
@@ -1566,7 +1636,12 @@ var QueryAssistanceClient = class {
|
|
|
1566
1636
|
const responseValue = await response.body("json");
|
|
1567
1637
|
try {
|
|
1568
1638
|
const errorBody = fromJson15(responseValue);
|
|
1569
|
-
throw new ErrorEnvelopeError(
|
|
1639
|
+
throw new ErrorEnvelopeError(
|
|
1640
|
+
"500",
|
|
1641
|
+
response,
|
|
1642
|
+
errorBody,
|
|
1643
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
1644
|
+
);
|
|
1570
1645
|
} catch (err) {
|
|
1571
1646
|
if (err instanceof ErrorEnvelopeError) {
|
|
1572
1647
|
throw err;
|
|
@@ -1600,7 +1675,7 @@ var QueryAssistanceClient = class {
|
|
|
1600
1675
|
`${response.status}`,
|
|
1601
1676
|
response,
|
|
1602
1677
|
responseValue,
|
|
1603
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
1678
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
1604
1679
|
);
|
|
1605
1680
|
}
|
|
1606
1681
|
}
|
|
@@ -1640,7 +1715,10 @@ var QueryAssistanceClient = class {
|
|
|
1640
1715
|
"400",
|
|
1641
1716
|
response,
|
|
1642
1717
|
errorBody,
|
|
1643
|
-
|
|
1718
|
+
getErrorMessage(
|
|
1719
|
+
errorBody,
|
|
1720
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
1721
|
+
)
|
|
1644
1722
|
);
|
|
1645
1723
|
} catch (err) {
|
|
1646
1724
|
if (err instanceof ErrorEnvelopeError) {
|
|
@@ -1659,7 +1737,12 @@ var QueryAssistanceClient = class {
|
|
|
1659
1737
|
const responseValue = await response.body("json");
|
|
1660
1738
|
try {
|
|
1661
1739
|
const errorBody = fromJson15(responseValue);
|
|
1662
|
-
throw new ErrorEnvelopeError(
|
|
1740
|
+
throw new ErrorEnvelopeError(
|
|
1741
|
+
"500",
|
|
1742
|
+
response,
|
|
1743
|
+
errorBody,
|
|
1744
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
1745
|
+
);
|
|
1663
1746
|
} catch (err) {
|
|
1664
1747
|
if (err instanceof ErrorEnvelopeError) {
|
|
1665
1748
|
throw err;
|
|
@@ -1693,7 +1776,7 @@ var QueryAssistanceClient = class {
|
|
|
1693
1776
|
`${response.status}`,
|
|
1694
1777
|
response,
|
|
1695
1778
|
responseValue,
|
|
1696
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
1779
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
1697
1780
|
);
|
|
1698
1781
|
}
|
|
1699
1782
|
}
|
|
@@ -1754,7 +1837,8 @@ function isExecuteRequest(value) {
|
|
|
1754
1837
|
const valKeys = new Set(Object.keys(value));
|
|
1755
1838
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1756
1839
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1757
|
-
|
|
1840
|
+
const allPropertiesMatchFormat = true;
|
|
1841
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1758
1842
|
}
|
|
1759
1843
|
function isJson20(value) {
|
|
1760
1844
|
if (value === null) {
|
|
@@ -1798,7 +1882,8 @@ function isJson20(value) {
|
|
|
1798
1882
|
const valKeys = new Set(Object.keys(value));
|
|
1799
1883
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1800
1884
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1801
|
-
|
|
1885
|
+
const allPropertiesMatchFormat = true;
|
|
1886
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1802
1887
|
}
|
|
1803
1888
|
function fromJson20($model) {
|
|
1804
1889
|
const {
|
|
@@ -1922,7 +2007,8 @@ function isTimeframe(value) {
|
|
|
1922
2007
|
const valKeys = new Set(Object.keys(value));
|
|
1923
2008
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1924
2009
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1925
|
-
|
|
2010
|
+
const allPropertiesMatchFormat = value.start instanceof Date && value.end instanceof Date;
|
|
2011
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1926
2012
|
}
|
|
1927
2013
|
function isJson21(value) {
|
|
1928
2014
|
if (value === null) {
|
|
@@ -1941,13 +2027,14 @@ function isJson21(value) {
|
|
|
1941
2027
|
const valKeys = new Set(Object.keys(value));
|
|
1942
2028
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1943
2029
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1944
|
-
|
|
2030
|
+
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);
|
|
2031
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1945
2032
|
}
|
|
1946
2033
|
function fromJson21($model) {
|
|
1947
2034
|
const { start, end } = $model;
|
|
1948
2035
|
return {
|
|
1949
|
-
start: start !== void 0
|
|
1950
|
-
end: end !== void 0
|
|
2036
|
+
start: start !== void 0 ? new Date(start) : void 0,
|
|
2037
|
+
end: end !== void 0 ? new Date(end) : void 0
|
|
1951
2038
|
};
|
|
1952
2039
|
}
|
|
1953
2040
|
function toJson21($model) {
|
|
@@ -2002,7 +2089,8 @@ function isGrailMetadata(value) {
|
|
|
2002
2089
|
const valKeys = new Set(Object.keys(value));
|
|
2003
2090
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2004
2091
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2005
|
-
|
|
2092
|
+
const allPropertiesMatchFormat = true;
|
|
2093
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2006
2094
|
}
|
|
2007
2095
|
function isJson22(value) {
|
|
2008
2096
|
if (value === null) {
|
|
@@ -2047,7 +2135,8 @@ function isJson22(value) {
|
|
|
2047
2135
|
const valKeys = new Set(Object.keys(value));
|
|
2048
2136
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2049
2137
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2050
|
-
|
|
2138
|
+
const allPropertiesMatchFormat = true;
|
|
2139
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2051
2140
|
}
|
|
2052
2141
|
function fromJson22($model) {
|
|
2053
2142
|
const {
|
|
@@ -2071,10 +2160,10 @@ function fromJson22($model) {
|
|
|
2071
2160
|
scannedRecords,
|
|
2072
2161
|
dqlVersion,
|
|
2073
2162
|
scannedBytes,
|
|
2074
|
-
analysisTimeframe: analysisTimeframe !== void 0
|
|
2163
|
+
analysisTimeframe: analysisTimeframe !== void 0 ? fromJson21(analysisTimeframe) : void 0,
|
|
2075
2164
|
locale,
|
|
2076
2165
|
executionTimeMilliseconds,
|
|
2077
|
-
notifications: notifications !== void 0
|
|
2166
|
+
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0,
|
|
2078
2167
|
queryId,
|
|
2079
2168
|
sampled
|
|
2080
2169
|
};
|
|
@@ -2135,7 +2224,8 @@ function isMetricMetadata(value) {
|
|
|
2135
2224
|
const valKeys = new Set(Object.keys(value));
|
|
2136
2225
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2137
2226
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2138
|
-
|
|
2227
|
+
const allPropertiesMatchFormat = true;
|
|
2228
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2139
2229
|
}
|
|
2140
2230
|
function isJson23(value) {
|
|
2141
2231
|
if (value === null) {
|
|
@@ -2154,7 +2244,8 @@ function isJson23(value) {
|
|
|
2154
2244
|
const valKeys = new Set(Object.keys(value));
|
|
2155
2245
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2156
2246
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2157
|
-
|
|
2247
|
+
const allPropertiesMatchFormat = true;
|
|
2248
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2158
2249
|
}
|
|
2159
2250
|
function fromJson23($model) {
|
|
2160
2251
|
const { "metric.key": metricKey, displayName, description, unit, fieldName } = $model;
|
|
@@ -2195,7 +2286,8 @@ function isMetadata(value) {
|
|
|
2195
2286
|
const valKeys = new Set(Object.keys(value));
|
|
2196
2287
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2197
2288
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2198
|
-
|
|
2289
|
+
const allPropertiesMatchFormat = true;
|
|
2290
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2199
2291
|
}
|
|
2200
2292
|
function isJson24(value) {
|
|
2201
2293
|
if (value === null) {
|
|
@@ -2214,13 +2306,14 @@ function isJson24(value) {
|
|
|
2214
2306
|
const valKeys = new Set(Object.keys(value));
|
|
2215
2307
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2216
2308
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2217
|
-
|
|
2309
|
+
const allPropertiesMatchFormat = true;
|
|
2310
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2218
2311
|
}
|
|
2219
2312
|
function fromJson24($model) {
|
|
2220
2313
|
const { grail, metrics } = $model;
|
|
2221
2314
|
return {
|
|
2222
|
-
grail: grail !== void 0
|
|
2223
|
-
metrics: metrics !== void 0
|
|
2315
|
+
grail: grail !== void 0 ? fromJson22(grail) : void 0,
|
|
2316
|
+
metrics: metrics !== void 0 ? metrics?.map((innerValue) => fromJson23(innerValue)) : void 0
|
|
2224
2317
|
};
|
|
2225
2318
|
}
|
|
2226
2319
|
function toJson24($model) {
|
|
@@ -2297,7 +2390,8 @@ function isFieldType(value) {
|
|
|
2297
2390
|
const valKeys = new Set(Object.keys(value));
|
|
2298
2391
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2299
2392
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2300
|
-
|
|
2393
|
+
const allPropertiesMatchFormat = true;
|
|
2394
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2301
2395
|
}
|
|
2302
2396
|
function isJson26(value) {
|
|
2303
2397
|
if (value === null) {
|
|
@@ -2316,13 +2410,14 @@ function isJson26(value) {
|
|
|
2316
2410
|
const valKeys = new Set(Object.keys(value));
|
|
2317
2411
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2318
2412
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2319
|
-
|
|
2413
|
+
const allPropertiesMatchFormat = true;
|
|
2414
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2320
2415
|
}
|
|
2321
2416
|
function fromJson27($model) {
|
|
2322
2417
|
const { type, types } = $model;
|
|
2323
2418
|
return {
|
|
2324
2419
|
type: fromJson25(type),
|
|
2325
|
-
types: types !== void 0
|
|
2420
|
+
types: types !== void 0 ? types?.map((innerValue) => fromJson26(innerValue)) : void 0
|
|
2326
2421
|
};
|
|
2327
2422
|
}
|
|
2328
2423
|
function toJson27($model) {
|
|
@@ -2351,7 +2446,8 @@ function isRangedFieldTypesMappings(value) {
|
|
|
2351
2446
|
const valKeys = new Set(Object.keys(value));
|
|
2352
2447
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2353
2448
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2354
|
-
|
|
2449
|
+
const allPropertiesMatchFormat = true;
|
|
2450
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2355
2451
|
}
|
|
2356
2452
|
function isJson27(value) {
|
|
2357
2453
|
if (value === null) {
|
|
@@ -2370,7 +2466,8 @@ function isJson27(value) {
|
|
|
2370
2466
|
const valKeys = new Set(Object.keys(value));
|
|
2371
2467
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2372
2468
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2373
|
-
|
|
2469
|
+
const allPropertiesMatchFormat = true;
|
|
2470
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2374
2471
|
}
|
|
2375
2472
|
function fromJson28($model) {
|
|
2376
2473
|
const additionalProps = $model;
|
|
@@ -2378,7 +2475,7 @@ function fromJson28($model) {
|
|
|
2378
2475
|
...Object.fromEntries(
|
|
2379
2476
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2380
2477
|
propName,
|
|
2381
|
-
value !== void 0
|
|
2478
|
+
value !== void 0 ? fromJson27(value) : void 0
|
|
2382
2479
|
])
|
|
2383
2480
|
)
|
|
2384
2481
|
};
|
|
@@ -2413,7 +2510,8 @@ function isRangedFieldTypes(value) {
|
|
|
2413
2510
|
const valKeys = new Set(Object.keys(value));
|
|
2414
2511
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2415
2512
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2416
|
-
|
|
2513
|
+
const allPropertiesMatchFormat = true;
|
|
2514
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2417
2515
|
}
|
|
2418
2516
|
function isJson28(value) {
|
|
2419
2517
|
if (value === null) {
|
|
@@ -2432,13 +2530,14 @@ function isJson28(value) {
|
|
|
2432
2530
|
const valKeys = new Set(Object.keys(value));
|
|
2433
2531
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2434
2532
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2435
|
-
|
|
2533
|
+
const allPropertiesMatchFormat = true;
|
|
2534
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2436
2535
|
}
|
|
2437
2536
|
function fromJson26($model) {
|
|
2438
2537
|
const { mappings, indexRange } = $model;
|
|
2439
2538
|
return {
|
|
2440
2539
|
mappings: fromJson28(mappings),
|
|
2441
|
-
indexRange: indexRange !== void 0
|
|
2540
|
+
indexRange: indexRange !== void 0 ? indexRange?.slice(0) : void 0
|
|
2442
2541
|
};
|
|
2443
2542
|
}
|
|
2444
2543
|
function toJson26($model) {
|
|
@@ -2505,7 +2604,8 @@ function isGeoPoint(value) {
|
|
|
2505
2604
|
const valKeys = new Set(Object.keys(value));
|
|
2506
2605
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2507
2606
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2508
|
-
|
|
2607
|
+
const allPropertiesMatchFormat = true;
|
|
2608
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2509
2609
|
}
|
|
2510
2610
|
function isJson29(value) {
|
|
2511
2611
|
if (value === null) {
|
|
@@ -2524,7 +2624,8 @@ function isJson29(value) {
|
|
|
2524
2624
|
const valKeys = new Set(Object.keys(value));
|
|
2525
2625
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2526
2626
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2527
|
-
|
|
2627
|
+
const allPropertiesMatchFormat = true;
|
|
2628
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2528
2629
|
}
|
|
2529
2630
|
function fromJson29($model) {
|
|
2530
2631
|
const { latitude, longitude } = $model;
|
|
@@ -2668,7 +2769,8 @@ function isResultRecord(value) {
|
|
|
2668
2769
|
const valKeys = new Set(Object.keys(value));
|
|
2669
2770
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2670
2771
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2671
|
-
|
|
2772
|
+
const allPropertiesMatchFormat = true;
|
|
2773
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2672
2774
|
}
|
|
2673
2775
|
function isJson30(value) {
|
|
2674
2776
|
if (value === null) {
|
|
@@ -2687,7 +2789,8 @@ function isJson30(value) {
|
|
|
2687
2789
|
const valKeys = new Set(Object.keys(value));
|
|
2688
2790
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2689
2791
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2690
|
-
|
|
2792
|
+
const allPropertiesMatchFormat = true;
|
|
2793
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2691
2794
|
}
|
|
2692
2795
|
function fromJson30($model) {
|
|
2693
2796
|
if ($model === null) {
|
|
@@ -2698,7 +2801,7 @@ function fromJson30($model) {
|
|
|
2698
2801
|
...Object.fromEntries(
|
|
2699
2802
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2700
2803
|
propName,
|
|
2701
|
-
value !== void 0
|
|
2804
|
+
value !== void 0 ? fromJson31(value) : void 0
|
|
2702
2805
|
])
|
|
2703
2806
|
)
|
|
2704
2807
|
};
|
|
@@ -2736,7 +2839,8 @@ function isQueryResult(value) {
|
|
|
2736
2839
|
const valKeys = new Set(Object.keys(value));
|
|
2737
2840
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2738
2841
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2739
|
-
|
|
2842
|
+
const allPropertiesMatchFormat = true;
|
|
2843
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2740
2844
|
}
|
|
2741
2845
|
function isJson32(value) {
|
|
2742
2846
|
if (value === null) {
|
|
@@ -2755,7 +2859,8 @@ function isJson32(value) {
|
|
|
2755
2859
|
const valKeys = new Set(Object.keys(value));
|
|
2756
2860
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2757
2861
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2758
|
-
|
|
2862
|
+
const allPropertiesMatchFormat = true;
|
|
2863
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2759
2864
|
}
|
|
2760
2865
|
function fromJson32($model) {
|
|
2761
2866
|
const { records, metadata, types } = $model;
|
|
@@ -2813,7 +2918,8 @@ function isQueryPollResponse(value) {
|
|
|
2813
2918
|
const valKeys = new Set(Object.keys(value));
|
|
2814
2919
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2815
2920
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2816
|
-
|
|
2921
|
+
const allPropertiesMatchFormat = true;
|
|
2922
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2817
2923
|
}
|
|
2818
2924
|
function isJson34(value) {
|
|
2819
2925
|
if (value === null) {
|
|
@@ -2832,12 +2938,13 @@ function isJson34(value) {
|
|
|
2832
2938
|
const valKeys = new Set(Object.keys(value));
|
|
2833
2939
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2834
2940
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2835
|
-
|
|
2941
|
+
const allPropertiesMatchFormat = true;
|
|
2942
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2836
2943
|
}
|
|
2837
2944
|
function fromJson34($model) {
|
|
2838
2945
|
const { result, ttlSeconds, progress, state } = $model;
|
|
2839
2946
|
return {
|
|
2840
|
-
result: result !== void 0
|
|
2947
|
+
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
2841
2948
|
ttlSeconds,
|
|
2842
2949
|
progress,
|
|
2843
2950
|
state: fromJson33(state)
|
|
@@ -2878,7 +2985,8 @@ function isQueryStartResponse(value) {
|
|
|
2878
2985
|
const valKeys = new Set(Object.keys(value));
|
|
2879
2986
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2880
2987
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2881
|
-
|
|
2988
|
+
const allPropertiesMatchFormat = true;
|
|
2989
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2882
2990
|
}
|
|
2883
2991
|
function isJson35(value) {
|
|
2884
2992
|
if (value === null) {
|
|
@@ -2897,12 +3005,13 @@ function isJson35(value) {
|
|
|
2897
3005
|
const valKeys = new Set(Object.keys(value));
|
|
2898
3006
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
2899
3007
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
2900
|
-
|
|
3008
|
+
const allPropertiesMatchFormat = true;
|
|
3009
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2901
3010
|
}
|
|
2902
3011
|
function fromJson35($model) {
|
|
2903
3012
|
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
2904
3013
|
return {
|
|
2905
|
-
result: result !== void 0
|
|
3014
|
+
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
2906
3015
|
ttlSeconds,
|
|
2907
3016
|
progress,
|
|
2908
3017
|
requestToken,
|
|
@@ -2974,14 +3083,19 @@ var QueryExecutionClient = class {
|
|
|
2974
3083
|
`410`,
|
|
2975
3084
|
response,
|
|
2976
3085
|
responseValue,
|
|
2977
|
-
`The query for the given request-token is not available anymore.`
|
|
3086
|
+
getErrorMessage(responseValue, `The query for the given request-token is not available anymore.`)
|
|
2978
3087
|
);
|
|
2979
3088
|
}
|
|
2980
3089
|
case 500: {
|
|
2981
3090
|
const responseValue = await response.body("json");
|
|
2982
3091
|
try {
|
|
2983
3092
|
const errorBody = fromJson15(responseValue);
|
|
2984
|
-
throw new ErrorEnvelopeError(
|
|
3093
|
+
throw new ErrorEnvelopeError(
|
|
3094
|
+
"500",
|
|
3095
|
+
response,
|
|
3096
|
+
errorBody,
|
|
3097
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
3098
|
+
);
|
|
2985
3099
|
} catch (err) {
|
|
2986
3100
|
if (err instanceof ErrorEnvelopeError) {
|
|
2987
3101
|
throw err;
|
|
@@ -3015,7 +3129,7 @@ var QueryExecutionClient = class {
|
|
|
3015
3129
|
`${response.status}`,
|
|
3016
3130
|
response,
|
|
3017
3131
|
responseValue,
|
|
3018
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
3132
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
3019
3133
|
);
|
|
3020
3134
|
}
|
|
3021
3135
|
}
|
|
@@ -3056,7 +3170,10 @@ var QueryExecutionClient = class {
|
|
|
3056
3170
|
"400",
|
|
3057
3171
|
response,
|
|
3058
3172
|
errorBody,
|
|
3059
|
-
|
|
3173
|
+
getErrorMessage(
|
|
3174
|
+
errorBody,
|
|
3175
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
3176
|
+
)
|
|
3060
3177
|
);
|
|
3061
3178
|
} catch (err) {
|
|
3062
3179
|
if (err instanceof ErrorEnvelopeError) {
|
|
@@ -3075,7 +3192,12 @@ var QueryExecutionClient = class {
|
|
|
3075
3192
|
const responseValue = await response.body("json");
|
|
3076
3193
|
try {
|
|
3077
3194
|
const errorBody = fromJson15(responseValue);
|
|
3078
|
-
throw new ErrorEnvelopeError(
|
|
3195
|
+
throw new ErrorEnvelopeError(
|
|
3196
|
+
"500",
|
|
3197
|
+
response,
|
|
3198
|
+
errorBody,
|
|
3199
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
3200
|
+
);
|
|
3079
3201
|
} catch (err) {
|
|
3080
3202
|
if (err instanceof ErrorEnvelopeError) {
|
|
3081
3203
|
throw err;
|
|
@@ -3093,7 +3215,12 @@ var QueryExecutionClient = class {
|
|
|
3093
3215
|
const responseValue = await response.body("json");
|
|
3094
3216
|
try {
|
|
3095
3217
|
const errorBody = fromJson15(responseValue);
|
|
3096
|
-
throw new ErrorEnvelopeError(
|
|
3218
|
+
throw new ErrorEnvelopeError(
|
|
3219
|
+
"503",
|
|
3220
|
+
response,
|
|
3221
|
+
errorBody,
|
|
3222
|
+
getErrorMessage(errorBody, "Service is unavailable.")
|
|
3223
|
+
);
|
|
3097
3224
|
} catch (err) {
|
|
3098
3225
|
if (err instanceof ErrorEnvelopeError) {
|
|
3099
3226
|
throw err;
|
|
@@ -3141,7 +3268,7 @@ var QueryExecutionClient = class {
|
|
|
3141
3268
|
`${response.status}`,
|
|
3142
3269
|
response,
|
|
3143
3270
|
responseValue,
|
|
3144
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
3271
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
3145
3272
|
);
|
|
3146
3273
|
}
|
|
3147
3274
|
}
|
|
@@ -3172,14 +3299,19 @@ var QueryExecutionClient = class {
|
|
|
3172
3299
|
`410`,
|
|
3173
3300
|
response,
|
|
3174
3301
|
responseValue,
|
|
3175
|
-
`The query for the given request-token is not available anymore.`
|
|
3302
|
+
getErrorMessage(responseValue, `The query for the given request-token is not available anymore.`)
|
|
3176
3303
|
);
|
|
3177
3304
|
}
|
|
3178
3305
|
case 500: {
|
|
3179
3306
|
const responseValue = await response.body("json");
|
|
3180
3307
|
try {
|
|
3181
3308
|
const errorBody = fromJson15(responseValue);
|
|
3182
|
-
throw new ErrorEnvelopeError(
|
|
3309
|
+
throw new ErrorEnvelopeError(
|
|
3310
|
+
"500",
|
|
3311
|
+
response,
|
|
3312
|
+
errorBody,
|
|
3313
|
+
getErrorMessage(errorBody, "An internal server error has occurred.")
|
|
3314
|
+
);
|
|
3183
3315
|
} catch (err) {
|
|
3184
3316
|
if (err instanceof ErrorEnvelopeError) {
|
|
3185
3317
|
throw err;
|
|
@@ -3216,7 +3348,7 @@ var QueryExecutionClient = class {
|
|
|
3216
3348
|
`${response.status}`,
|
|
3217
3349
|
response,
|
|
3218
3350
|
responseValue,
|
|
3219
|
-
`Unexpected api response: code=${response.status} body="${responseValue}"`
|
|
3351
|
+
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`)
|
|
3220
3352
|
);
|
|
3221
3353
|
}
|
|
3222
3354
|
}
|
|
@@ -3347,6 +3479,7 @@ export {
|
|
|
3347
3479
|
isApiClientError,
|
|
3348
3480
|
isClientRequestError,
|
|
3349
3481
|
isErrorEnvelopeError,
|
|
3482
|
+
isInvalidResponseError,
|
|
3350
3483
|
queryAssistanceClient,
|
|
3351
3484
|
queryExecutionClient
|
|
3352
3485
|
};
|