@dynatrace-sdk/client-query 1.4.2 → 1.5.0
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 +15 -2
- package/README.md +1 -1
- package/cjs/index.js +73 -21
- package/docs/DOCS.md +5 -5
- package/dynatrace-metadata.json +4 -4
- package/esm/index.js +73 -21
- package/package.json +1 -1
- package/types/packages/client/query/src/lib/models/geo-point.d.ts +2 -2
- package/types/packages/platform/error-handlers/src/lib/types/serialized-error.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DQL Query
|
|
2
2
|
|
|
3
3
|
@dynatrace-sdk/client-query
|
|
4
4
|
|
|
5
|
+
## 1.5.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- Change title from **Storage – Query Service** to **DQL Query**
|
|
10
|
+
- Support 400 error code for poll and cancel operations.
|
|
11
|
+
|
|
12
|
+
## 1.4.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Fix transformation of null values for nullable properties
|
|
17
|
+
|
|
5
18
|
## 1.4.2
|
|
6
19
|
|
|
7
20
|
### Patch Changes
|
|
8
21
|
|
|
9
22
|
- Update documentation
|
|
10
|
-
- Fix transformation of null and Date values
|
|
23
|
+
- Fix transformation of null and Date values
|
|
11
24
|
- Update package description
|
|
12
25
|
- Updated dependencies
|
|
13
26
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @dynatrace-sdk/client-query
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.5.0)
|
|
4
4
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
5
|
|
|
6
6
|
Exposes an API to fetch records stored in Grail
|
package/cjs/index.js
CHANGED
|
@@ -636,7 +636,7 @@ function fromJson8($model) {
|
|
|
636
636
|
return {
|
|
637
637
|
...fromJson6($model, false),
|
|
638
638
|
type,
|
|
639
|
-
children: children !== void 0 ? children?.map((innerValue) => fromJson6(innerValue)) : void 0
|
|
639
|
+
children: children !== void 0 && children !== null ? children?.map((innerValue) => fromJson6(innerValue)) : void 0
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
642
|
function toJson8($model) {
|
|
@@ -721,7 +721,7 @@ function fromJson10($model) {
|
|
|
721
721
|
const { type, isMandatoryOnUserOrder, canonicalString } = $model;
|
|
722
722
|
return {
|
|
723
723
|
...fromJson6($model, false),
|
|
724
|
-
type: type !== void 0 ? fromJson2(type) : void 0,
|
|
724
|
+
type: type !== void 0 && type !== null ? fromJson2(type) : void 0,
|
|
725
725
|
isMandatoryOnUserOrder,
|
|
726
726
|
canonicalString
|
|
727
727
|
};
|
|
@@ -929,7 +929,7 @@ function fromJson6($model, includeChildProps = true) {
|
|
|
929
929
|
const { nodeType, tokenPosition, isOptional } = $model;
|
|
930
930
|
return {
|
|
931
931
|
nodeType: fromJson9(nodeType),
|
|
932
|
-
tokenPosition: tokenPosition !== void 0 ? fromJson12(tokenPosition) : void 0,
|
|
932
|
+
tokenPosition: tokenPosition !== void 0 && tokenPosition !== null ? fromJson12(tokenPosition) : void 0,
|
|
933
933
|
isOptional
|
|
934
934
|
};
|
|
935
935
|
}
|
|
@@ -1069,7 +1069,7 @@ function fromJson13($model) {
|
|
|
1069
1069
|
} = $model;
|
|
1070
1070
|
return {
|
|
1071
1071
|
exceptionType,
|
|
1072
|
-
syntaxErrorPosition: syntaxErrorPosition !== void 0 ? fromJson12(syntaxErrorPosition) : void 0,
|
|
1072
|
+
syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? fromJson12(syntaxErrorPosition) : void 0,
|
|
1073
1073
|
errorType,
|
|
1074
1074
|
errorMessage,
|
|
1075
1075
|
arguments: _arguments?.slice(0),
|
|
@@ -1456,9 +1456,9 @@ function fromJson18($model) {
|
|
|
1456
1456
|
return {
|
|
1457
1457
|
severity,
|
|
1458
1458
|
messageFormat,
|
|
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,
|
|
1459
|
+
syntaxPosition: syntaxPosition !== void 0 && syntaxPosition !== null ? fromJson12(syntaxPosition) : void 0,
|
|
1460
|
+
messageFormatSpecifierTypes: messageFormatSpecifierTypes !== void 0 && messageFormatSpecifierTypes !== null ? messageFormatSpecifierTypes?.slice(0) : void 0,
|
|
1461
|
+
arguments: _arguments !== void 0 && _arguments !== null ? _arguments?.slice(0) : void 0,
|
|
1462
1462
|
notificationType,
|
|
1463
1463
|
message
|
|
1464
1464
|
};
|
|
@@ -1529,7 +1529,7 @@ function fromJson19($model) {
|
|
|
1529
1529
|
const { valid, notifications } = $model;
|
|
1530
1530
|
return {
|
|
1531
1531
|
valid,
|
|
1532
|
-
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0
|
|
1532
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0
|
|
1533
1533
|
};
|
|
1534
1534
|
}
|
|
1535
1535
|
function toJson19($model) {
|
|
@@ -2099,8 +2099,8 @@ function isJson21(value) {
|
|
|
2099
2099
|
function fromJson21($model) {
|
|
2100
2100
|
const { start, end } = $model;
|
|
2101
2101
|
return {
|
|
2102
|
-
start: start !== void 0 ? new Date(start) : void 0,
|
|
2103
|
-
end: end !== void 0 ? new Date(end) : void 0
|
|
2102
|
+
start: start !== void 0 && start !== null ? new Date(start) : void 0,
|
|
2103
|
+
end: end !== void 0 && end !== null ? new Date(end) : void 0
|
|
2104
2104
|
};
|
|
2105
2105
|
}
|
|
2106
2106
|
function toJson21($model) {
|
|
@@ -2226,10 +2226,10 @@ function fromJson22($model) {
|
|
|
2226
2226
|
scannedRecords,
|
|
2227
2227
|
dqlVersion,
|
|
2228
2228
|
scannedBytes,
|
|
2229
|
-
analysisTimeframe: analysisTimeframe !== void 0 ? fromJson21(analysisTimeframe) : void 0,
|
|
2229
|
+
analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? fromJson21(analysisTimeframe) : void 0,
|
|
2230
2230
|
locale,
|
|
2231
2231
|
executionTimeMilliseconds,
|
|
2232
|
-
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0,
|
|
2232
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0,
|
|
2233
2233
|
queryId,
|
|
2234
2234
|
sampled
|
|
2235
2235
|
};
|
|
@@ -2378,8 +2378,8 @@ function isJson24(value) {
|
|
|
2378
2378
|
function fromJson24($model) {
|
|
2379
2379
|
const { grail, metrics } = $model;
|
|
2380
2380
|
return {
|
|
2381
|
-
grail: grail !== void 0 ? fromJson22(grail) : void 0,
|
|
2382
|
-
metrics: metrics !== void 0 ? metrics?.map((innerValue) => fromJson23(innerValue)) : void 0
|
|
2381
|
+
grail: grail !== void 0 && grail !== null ? fromJson22(grail) : void 0,
|
|
2382
|
+
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => fromJson23(innerValue)) : void 0
|
|
2383
2383
|
};
|
|
2384
2384
|
}
|
|
2385
2385
|
function toJson24($model) {
|
|
@@ -2483,7 +2483,7 @@ function fromJson27($model) {
|
|
|
2483
2483
|
const { type, types } = $model;
|
|
2484
2484
|
return {
|
|
2485
2485
|
type: fromJson25(type),
|
|
2486
|
-
types: types !== void 0 ? types?.map((innerValue) => fromJson26(innerValue)) : void 0
|
|
2486
|
+
types: types !== void 0 && types !== null ? types?.map((innerValue) => fromJson26(innerValue)) : void 0
|
|
2487
2487
|
};
|
|
2488
2488
|
}
|
|
2489
2489
|
function toJson27($model) {
|
|
@@ -2541,7 +2541,7 @@ function fromJson28($model) {
|
|
|
2541
2541
|
...Object.fromEntries(
|
|
2542
2542
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2543
2543
|
propName,
|
|
2544
|
-
value !== void 0 ? fromJson27(value) : void 0
|
|
2544
|
+
value !== void 0 && value !== null ? fromJson27(value) : void 0
|
|
2545
2545
|
])
|
|
2546
2546
|
)
|
|
2547
2547
|
};
|
|
@@ -2603,7 +2603,7 @@ function fromJson26($model) {
|
|
|
2603
2603
|
const { mappings, indexRange } = $model;
|
|
2604
2604
|
return {
|
|
2605
2605
|
mappings: fromJson28(mappings),
|
|
2606
|
-
indexRange: indexRange !== void 0 ? indexRange?.slice(0) : void 0
|
|
2606
|
+
indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
|
|
2607
2607
|
};
|
|
2608
2608
|
}
|
|
2609
2609
|
function toJson26($model) {
|
|
@@ -3010,7 +3010,7 @@ function isJson34(value) {
|
|
|
3010
3010
|
function fromJson34($model) {
|
|
3011
3011
|
const { result, ttlSeconds, progress, state } = $model;
|
|
3012
3012
|
return {
|
|
3013
|
-
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
3013
|
+
result: result !== void 0 && result !== null ? fromJson32(result) : void 0,
|
|
3014
3014
|
ttlSeconds,
|
|
3015
3015
|
progress,
|
|
3016
3016
|
state: fromJson33(state)
|
|
@@ -3077,7 +3077,7 @@ function isJson35(value) {
|
|
|
3077
3077
|
function fromJson35($model) {
|
|
3078
3078
|
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
3079
3079
|
return {
|
|
3080
|
-
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
3080
|
+
result: result !== void 0 && result !== null ? fromJson32(result) : void 0,
|
|
3081
3081
|
ttlSeconds,
|
|
3082
3082
|
progress,
|
|
3083
3083
|
requestToken,
|
|
@@ -3139,10 +3139,36 @@ var QueryExecutionClient = class {
|
|
|
3139
3139
|
if (200 <= status && status < 300) {
|
|
3140
3140
|
return true;
|
|
3141
3141
|
}
|
|
3142
|
-
return [410, 500].includes(status);
|
|
3142
|
+
return [400, 410, 500].includes(status);
|
|
3143
3143
|
}
|
|
3144
3144
|
});
|
|
3145
3145
|
switch (response.status) {
|
|
3146
|
+
case 400: {
|
|
3147
|
+
const responseValue = await response.body("json");
|
|
3148
|
+
try {
|
|
3149
|
+
const errorBody = fromJson15(responseValue);
|
|
3150
|
+
throw new ErrorEnvelopeError(
|
|
3151
|
+
"400",
|
|
3152
|
+
response,
|
|
3153
|
+
errorBody,
|
|
3154
|
+
getErrorMessage(
|
|
3155
|
+
errorBody,
|
|
3156
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
3157
|
+
)
|
|
3158
|
+
);
|
|
3159
|
+
} catch (err) {
|
|
3160
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
3161
|
+
throw err;
|
|
3162
|
+
}
|
|
3163
|
+
throw new InvalidResponseError(
|
|
3164
|
+
`QueryExecutionClient.query:poll:400`,
|
|
3165
|
+
err,
|
|
3166
|
+
responseValue,
|
|
3167
|
+
"ErrorEnvelope",
|
|
3168
|
+
void 0
|
|
3169
|
+
);
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3146
3172
|
case 410: {
|
|
3147
3173
|
const responseValue = await response.body("text");
|
|
3148
3174
|
throw new ClientRequestError(
|
|
@@ -3355,10 +3381,36 @@ var QueryExecutionClient = class {
|
|
|
3355
3381
|
if (200 <= status && status < 300) {
|
|
3356
3382
|
return true;
|
|
3357
3383
|
}
|
|
3358
|
-
return [410, 500].includes(status);
|
|
3384
|
+
return [400, 410, 500].includes(status);
|
|
3359
3385
|
}
|
|
3360
3386
|
});
|
|
3361
3387
|
switch (response.status) {
|
|
3388
|
+
case 400: {
|
|
3389
|
+
const responseValue = await response.body("json");
|
|
3390
|
+
try {
|
|
3391
|
+
const errorBody = fromJson15(responseValue);
|
|
3392
|
+
throw new ErrorEnvelopeError(
|
|
3393
|
+
"400",
|
|
3394
|
+
response,
|
|
3395
|
+
errorBody,
|
|
3396
|
+
getErrorMessage(
|
|
3397
|
+
errorBody,
|
|
3398
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
3399
|
+
)
|
|
3400
|
+
);
|
|
3401
|
+
} catch (err) {
|
|
3402
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
3403
|
+
throw err;
|
|
3404
|
+
}
|
|
3405
|
+
throw new InvalidResponseError(
|
|
3406
|
+
`QueryExecutionClient.query:cancel:400`,
|
|
3407
|
+
err,
|
|
3408
|
+
responseValue,
|
|
3409
|
+
"ErrorEnvelope",
|
|
3410
|
+
void 0
|
|
3411
|
+
);
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3362
3414
|
case 410: {
|
|
3363
3415
|
const responseValue = await response.body("text");
|
|
3364
3416
|
throw new ClientRequestError(
|
package/docs/DOCS.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: "DQL Query"
|
|
3
3
|
description: Exposes an API to fetch records stored in Grail.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# DQL Query
|
|
7
7
|
|
|
8
8
|
Exposes an API to fetch records stored in Grail
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ import NpmLogo from '@site/static/img/npm-logo.png';
|
|
|
17
17
|
</a>
|
|
18
18
|
</div>
|
|
19
19
|
<div class="col" style={{textAlign: 'right'}}>
|
|
20
|
-
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.
|
|
20
|
+
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.5.0">v1.5.0</a>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
@@ -783,8 +783,8 @@ DQL data type representing a geolocation point.
|
|
|
783
783
|
|
|
784
784
|
| Name | Type | Description |
|
|
785
785
|
| ------------------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
786
|
-
| latitude<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The coordinate that specifies the north
|
|
787
|
-
| longitude<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The coordinate that specifies the east
|
|
786
|
+
| latitude<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The coordinate that specifies the north-south position of a point on the surface of the earth. |
|
|
787
|
+
| longitude<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The coordinate that specifies the east-west position of a point on the surface of the earth. |
|
|
788
788
|
|
|
789
789
|
### GrailMetadata
|
|
790
790
|
|
package/dynatrace-metadata.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dynagen": {
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"generatedAt": "",
|
|
5
5
|
"template": {
|
|
6
6
|
"name": "@dynatrace-sdk/template-typescript-client",
|
|
7
|
-
"version": "0.17.
|
|
7
|
+
"version": "0.17.10"
|
|
8
8
|
},
|
|
9
9
|
"featureFlags": {
|
|
10
10
|
"typeguards": true
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"spec": {
|
|
14
|
-
"title": "
|
|
15
|
-
"version": "1.
|
|
14
|
+
"title": "DQL Query",
|
|
15
|
+
"version": "1.4.0",
|
|
16
16
|
"baseUrl": "/platform/storage/query/v1"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/esm/index.js
CHANGED
|
@@ -570,7 +570,7 @@ function fromJson8($model) {
|
|
|
570
570
|
return {
|
|
571
571
|
...fromJson6($model, false),
|
|
572
572
|
type,
|
|
573
|
-
children: children !== void 0 ? children?.map((innerValue) => fromJson6(innerValue)) : void 0
|
|
573
|
+
children: children !== void 0 && children !== null ? children?.map((innerValue) => fromJson6(innerValue)) : void 0
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
function toJson8($model) {
|
|
@@ -655,7 +655,7 @@ function fromJson10($model) {
|
|
|
655
655
|
const { type, isMandatoryOnUserOrder, canonicalString } = $model;
|
|
656
656
|
return {
|
|
657
657
|
...fromJson6($model, false),
|
|
658
|
-
type: type !== void 0 ? fromJson2(type) : void 0,
|
|
658
|
+
type: type !== void 0 && type !== null ? fromJson2(type) : void 0,
|
|
659
659
|
isMandatoryOnUserOrder,
|
|
660
660
|
canonicalString
|
|
661
661
|
};
|
|
@@ -863,7 +863,7 @@ function fromJson6($model, includeChildProps = true) {
|
|
|
863
863
|
const { nodeType, tokenPosition, isOptional } = $model;
|
|
864
864
|
return {
|
|
865
865
|
nodeType: fromJson9(nodeType),
|
|
866
|
-
tokenPosition: tokenPosition !== void 0 ? fromJson12(tokenPosition) : void 0,
|
|
866
|
+
tokenPosition: tokenPosition !== void 0 && tokenPosition !== null ? fromJson12(tokenPosition) : void 0,
|
|
867
867
|
isOptional
|
|
868
868
|
};
|
|
869
869
|
}
|
|
@@ -1003,7 +1003,7 @@ function fromJson13($model) {
|
|
|
1003
1003
|
} = $model;
|
|
1004
1004
|
return {
|
|
1005
1005
|
exceptionType,
|
|
1006
|
-
syntaxErrorPosition: syntaxErrorPosition !== void 0 ? fromJson12(syntaxErrorPosition) : void 0,
|
|
1006
|
+
syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? fromJson12(syntaxErrorPosition) : void 0,
|
|
1007
1007
|
errorType,
|
|
1008
1008
|
errorMessage,
|
|
1009
1009
|
arguments: _arguments?.slice(0),
|
|
@@ -1390,9 +1390,9 @@ function fromJson18($model) {
|
|
|
1390
1390
|
return {
|
|
1391
1391
|
severity,
|
|
1392
1392
|
messageFormat,
|
|
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,
|
|
1393
|
+
syntaxPosition: syntaxPosition !== void 0 && syntaxPosition !== null ? fromJson12(syntaxPosition) : void 0,
|
|
1394
|
+
messageFormatSpecifierTypes: messageFormatSpecifierTypes !== void 0 && messageFormatSpecifierTypes !== null ? messageFormatSpecifierTypes?.slice(0) : void 0,
|
|
1395
|
+
arguments: _arguments !== void 0 && _arguments !== null ? _arguments?.slice(0) : void 0,
|
|
1396
1396
|
notificationType,
|
|
1397
1397
|
message
|
|
1398
1398
|
};
|
|
@@ -1463,7 +1463,7 @@ function fromJson19($model) {
|
|
|
1463
1463
|
const { valid, notifications } = $model;
|
|
1464
1464
|
return {
|
|
1465
1465
|
valid,
|
|
1466
|
-
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0
|
|
1466
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0
|
|
1467
1467
|
};
|
|
1468
1468
|
}
|
|
1469
1469
|
function toJson19($model) {
|
|
@@ -2033,8 +2033,8 @@ function isJson21(value) {
|
|
|
2033
2033
|
function fromJson21($model) {
|
|
2034
2034
|
const { start, end } = $model;
|
|
2035
2035
|
return {
|
|
2036
|
-
start: start !== void 0 ? new Date(start) : void 0,
|
|
2037
|
-
end: end !== void 0 ? new Date(end) : void 0
|
|
2036
|
+
start: start !== void 0 && start !== null ? new Date(start) : void 0,
|
|
2037
|
+
end: end !== void 0 && end !== null ? new Date(end) : void 0
|
|
2038
2038
|
};
|
|
2039
2039
|
}
|
|
2040
2040
|
function toJson21($model) {
|
|
@@ -2160,10 +2160,10 @@ function fromJson22($model) {
|
|
|
2160
2160
|
scannedRecords,
|
|
2161
2161
|
dqlVersion,
|
|
2162
2162
|
scannedBytes,
|
|
2163
|
-
analysisTimeframe: analysisTimeframe !== void 0 ? fromJson21(analysisTimeframe) : void 0,
|
|
2163
|
+
analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? fromJson21(analysisTimeframe) : void 0,
|
|
2164
2164
|
locale,
|
|
2165
2165
|
executionTimeMilliseconds,
|
|
2166
|
-
notifications: notifications !== void 0 ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0,
|
|
2166
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0,
|
|
2167
2167
|
queryId,
|
|
2168
2168
|
sampled
|
|
2169
2169
|
};
|
|
@@ -2312,8 +2312,8 @@ function isJson24(value) {
|
|
|
2312
2312
|
function fromJson24($model) {
|
|
2313
2313
|
const { grail, metrics } = $model;
|
|
2314
2314
|
return {
|
|
2315
|
-
grail: grail !== void 0 ? fromJson22(grail) : void 0,
|
|
2316
|
-
metrics: metrics !== void 0 ? metrics?.map((innerValue) => fromJson23(innerValue)) : void 0
|
|
2315
|
+
grail: grail !== void 0 && grail !== null ? fromJson22(grail) : void 0,
|
|
2316
|
+
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => fromJson23(innerValue)) : void 0
|
|
2317
2317
|
};
|
|
2318
2318
|
}
|
|
2319
2319
|
function toJson24($model) {
|
|
@@ -2417,7 +2417,7 @@ function fromJson27($model) {
|
|
|
2417
2417
|
const { type, types } = $model;
|
|
2418
2418
|
return {
|
|
2419
2419
|
type: fromJson25(type),
|
|
2420
|
-
types: types !== void 0 ? types?.map((innerValue) => fromJson26(innerValue)) : void 0
|
|
2420
|
+
types: types !== void 0 && types !== null ? types?.map((innerValue) => fromJson26(innerValue)) : void 0
|
|
2421
2421
|
};
|
|
2422
2422
|
}
|
|
2423
2423
|
function toJson27($model) {
|
|
@@ -2475,7 +2475,7 @@ function fromJson28($model) {
|
|
|
2475
2475
|
...Object.fromEntries(
|
|
2476
2476
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2477
2477
|
propName,
|
|
2478
|
-
value !== void 0 ? fromJson27(value) : void 0
|
|
2478
|
+
value !== void 0 && value !== null ? fromJson27(value) : void 0
|
|
2479
2479
|
])
|
|
2480
2480
|
)
|
|
2481
2481
|
};
|
|
@@ -2537,7 +2537,7 @@ function fromJson26($model) {
|
|
|
2537
2537
|
const { mappings, indexRange } = $model;
|
|
2538
2538
|
return {
|
|
2539
2539
|
mappings: fromJson28(mappings),
|
|
2540
|
-
indexRange: indexRange !== void 0 ? indexRange?.slice(0) : void 0
|
|
2540
|
+
indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
|
|
2541
2541
|
};
|
|
2542
2542
|
}
|
|
2543
2543
|
function toJson26($model) {
|
|
@@ -2944,7 +2944,7 @@ function isJson34(value) {
|
|
|
2944
2944
|
function fromJson34($model) {
|
|
2945
2945
|
const { result, ttlSeconds, progress, state } = $model;
|
|
2946
2946
|
return {
|
|
2947
|
-
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
2947
|
+
result: result !== void 0 && result !== null ? fromJson32(result) : void 0,
|
|
2948
2948
|
ttlSeconds,
|
|
2949
2949
|
progress,
|
|
2950
2950
|
state: fromJson33(state)
|
|
@@ -3011,7 +3011,7 @@ function isJson35(value) {
|
|
|
3011
3011
|
function fromJson35($model) {
|
|
3012
3012
|
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
3013
3013
|
return {
|
|
3014
|
-
result: result !== void 0 ? fromJson32(result) : void 0,
|
|
3014
|
+
result: result !== void 0 && result !== null ? fromJson32(result) : void 0,
|
|
3015
3015
|
ttlSeconds,
|
|
3016
3016
|
progress,
|
|
3017
3017
|
requestToken,
|
|
@@ -3073,10 +3073,36 @@ var QueryExecutionClient = class {
|
|
|
3073
3073
|
if (200 <= status && status < 300) {
|
|
3074
3074
|
return true;
|
|
3075
3075
|
}
|
|
3076
|
-
return [410, 500].includes(status);
|
|
3076
|
+
return [400, 410, 500].includes(status);
|
|
3077
3077
|
}
|
|
3078
3078
|
});
|
|
3079
3079
|
switch (response.status) {
|
|
3080
|
+
case 400: {
|
|
3081
|
+
const responseValue = await response.body("json");
|
|
3082
|
+
try {
|
|
3083
|
+
const errorBody = fromJson15(responseValue);
|
|
3084
|
+
throw new ErrorEnvelopeError(
|
|
3085
|
+
"400",
|
|
3086
|
+
response,
|
|
3087
|
+
errorBody,
|
|
3088
|
+
getErrorMessage(
|
|
3089
|
+
errorBody,
|
|
3090
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
3091
|
+
)
|
|
3092
|
+
);
|
|
3093
|
+
} catch (err) {
|
|
3094
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
3095
|
+
throw err;
|
|
3096
|
+
}
|
|
3097
|
+
throw new InvalidResponseError(
|
|
3098
|
+
`QueryExecutionClient.query:poll:400`,
|
|
3099
|
+
err,
|
|
3100
|
+
responseValue,
|
|
3101
|
+
"ErrorEnvelope",
|
|
3102
|
+
void 0
|
|
3103
|
+
);
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3080
3106
|
case 410: {
|
|
3081
3107
|
const responseValue = await response.body("text");
|
|
3082
3108
|
throw new ClientRequestError(
|
|
@@ -3289,10 +3315,36 @@ var QueryExecutionClient = class {
|
|
|
3289
3315
|
if (200 <= status && status < 300) {
|
|
3290
3316
|
return true;
|
|
3291
3317
|
}
|
|
3292
|
-
return [410, 500].includes(status);
|
|
3318
|
+
return [400, 410, 500].includes(status);
|
|
3293
3319
|
}
|
|
3294
3320
|
});
|
|
3295
3321
|
switch (response.status) {
|
|
3322
|
+
case 400: {
|
|
3323
|
+
const responseValue = await response.body("json");
|
|
3324
|
+
try {
|
|
3325
|
+
const errorBody = fromJson15(responseValue);
|
|
3326
|
+
throw new ErrorEnvelopeError(
|
|
3327
|
+
"400",
|
|
3328
|
+
response,
|
|
3329
|
+
errorBody,
|
|
3330
|
+
getErrorMessage(
|
|
3331
|
+
errorBody,
|
|
3332
|
+
"The supplied request is wrong. Either the query itself or other parameters are wrong."
|
|
3333
|
+
)
|
|
3334
|
+
);
|
|
3335
|
+
} catch (err) {
|
|
3336
|
+
if (err instanceof ErrorEnvelopeError) {
|
|
3337
|
+
throw err;
|
|
3338
|
+
}
|
|
3339
|
+
throw new InvalidResponseError(
|
|
3340
|
+
`QueryExecutionClient.query:cancel:400`,
|
|
3341
|
+
err,
|
|
3342
|
+
responseValue,
|
|
3343
|
+
"ErrorEnvelope",
|
|
3344
|
+
void 0
|
|
3345
|
+
);
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3296
3348
|
case 410: {
|
|
3297
3349
|
const responseValue = await response.body("text");
|
|
3298
3350
|
throw new ClientRequestError(
|
package/package.json
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface GeoPoint {
|
|
5
5
|
/**
|
|
6
|
-
* The coordinate that specifies the north
|
|
6
|
+
* The coordinate that specifies the north-south position of a point on the surface of the earth.
|
|
7
7
|
*/
|
|
8
8
|
latitude: number;
|
|
9
9
|
/**
|
|
10
|
-
* The coordinate that specifies the east
|
|
10
|
+
* The coordinate that specifies the east-west position of a point on the surface of the earth.
|
|
11
11
|
*/
|
|
12
12
|
longitude: number;
|
|
13
13
|
}
|
|
@@ -5,4 +5,6 @@ import { HttpSerializedError } from './http-serialized-error';
|
|
|
5
5
|
*
|
|
6
6
|
* @property {ErrorType} type error type
|
|
7
7
|
*/
|
|
8
|
-
export declare type SerializedError = HttpSerializedError | CommonSerializedError
|
|
8
|
+
export declare type SerializedError = (HttpSerializedError | CommonSerializedError) & {
|
|
9
|
+
traceId?: string;
|
|
10
|
+
};
|