@dynatrace-sdk/client-query 1.4.3 → 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 +8 -1
- package/README.md +1 -1
- package/cjs/index.js +54 -2
- package/docs/DOCS.md +5 -5
- package/dynatrace-metadata.json +2 -2
- package/esm/index.js +54 -2
- 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,7 +1,14 @@
|
|
|
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
|
+
|
|
5
12
|
## 1.4.3
|
|
6
13
|
|
|
7
14
|
### Patch Changes
|
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
|
@@ -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
package/esm/index.js
CHANGED
|
@@ -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
|
+
};
|