@dynatrace-sdk/client-query 1.19.0 → 1.20.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 +7 -0
- package/README.md +20 -11
- package/cjs/index.js +36 -6
- package/dynatrace-metadata.json +2 -2
- package/esm/index.js +36 -6
- package/package.json +1 -1
- package/types/packages/client/query/src/lib/apis/query-assistance-api.d.ts +4 -0
- package/types/packages/client/query/src/lib/apis/query-execution-api.d.ts +4 -0
- package/types/packages/client/query/src/lib/models/execute-request.d.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
@dynatrace-sdk/client-query
|
|
4
4
|
|
|
5
|
+
## 1.20.0
|
|
6
|
+
|
|
7
|
+
### Minor changes
|
|
8
|
+
- Add request body parameter `includeTypes` to `ExecuteRequest`
|
|
9
|
+
- Add header `dt-client-context` to all query endpoints
|
|
10
|
+
- Add `enforce-query-consumption-limit` header to `/query:execute` and `/query:autocomplete` endpoints
|
|
11
|
+
|
|
5
12
|
## 1.19.0
|
|
6
13
|
|
|
7
14
|
### Minor 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.20.0)
|
|
4
4
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
5
|
|
|
6
6
|
Exposes an API to fetch records stored in Grail
|
|
@@ -88,9 +88,11 @@ a link to docs, etc.
|
|
|
88
88
|
|
|
89
89
|
#### Parameters
|
|
90
90
|
|
|
91
|
-
| Name | Type |
|
|
92
|
-
| --- | --- |
|
|
93
|
-
|config.body<sup>*required</sup>|<a href="#autocompleterequest" target="_blank" rel="noopener noreferrer">AutocompleteRequest</a>|
|
|
91
|
+
| Name | Type | Description |
|
|
92
|
+
| --- | --- | --- |
|
|
93
|
+
|config.body<sup>*required</sup>|<a href="#autocompleterequest" target="_blank" rel="noopener noreferrer">AutocompleteRequest</a>| |
|
|
94
|
+
|config.dtClientContext|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. |
|
|
95
|
+
|config.enforceQueryConsumptionLimit|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If set, query consumption limit will be enforced. |
|
|
94
96
|
|
|
95
97
|
|
|
96
98
|
|
|
@@ -341,9 +343,10 @@ When displaying the query, pick one option. You may use the other options for ho
|
|
|
341
343
|
|
|
342
344
|
#### Parameters
|
|
343
345
|
|
|
344
|
-
| Name | Type |
|
|
345
|
-
| --- | --- |
|
|
346
|
-
|config.body<sup>*required</sup>|<a href="#parserequest" target="_blank" rel="noopener noreferrer">ParseRequest</a>|
|
|
346
|
+
| Name | Type | Description |
|
|
347
|
+
| --- | --- | --- |
|
|
348
|
+
|config.body<sup>*required</sup>|<a href="#parserequest" target="_blank" rel="noopener noreferrer">ParseRequest</a>| |
|
|
349
|
+
|config.dtClientContext|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. |
|
|
347
350
|
|
|
348
351
|
|
|
349
352
|
|
|
@@ -409,9 +412,10 @@ submitting the query for execution.
|
|
|
409
412
|
|
|
410
413
|
#### Parameters
|
|
411
414
|
|
|
412
|
-
| Name | Type |
|
|
413
|
-
| --- | --- |
|
|
414
|
-
|config.body<sup>*required</sup>|<a href="#verifyrequest" target="_blank" rel="noopener noreferrer">VerifyRequest</a>|
|
|
415
|
+
| Name | Type | Description |
|
|
416
|
+
| --- | --- | --- |
|
|
417
|
+
|config.body<sup>*required</sup>|<a href="#verifyrequest" target="_blank" rel="noopener noreferrer">VerifyRequest</a>| |
|
|
418
|
+
|config.dtClientContext|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. |
|
|
415
419
|
|
|
416
420
|
|
|
417
421
|
|
|
@@ -513,6 +517,7 @@ It is guaranteed that every field of every record will have a corresponding type
|
|
|
513
517
|
|
|
514
518
|
| Name | Type | Description |
|
|
515
519
|
| --- | --- | --- |
|
|
520
|
+
|config.dtClientContext|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. |
|
|
516
521
|
|config.enrich|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|If set additional data will be available in the metadata section. |
|
|
517
522
|
|config.requestToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request-token of the query. |
|
|
518
523
|
|
|
@@ -609,6 +614,8 @@ It is guaranteed that every field of every record will have a corresponding type
|
|
|
609
614
|
| Name | Type | Description |
|
|
610
615
|
| --- | --- | --- |
|
|
611
616
|
|config.body<sup>*required</sup>|<a href="#executerequest">ExecuteRequest</a>| |
|
|
617
|
+
|config.dtClientContext|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. |
|
|
618
|
+
|config.enforceQueryConsumptionLimit|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|If set, query consumption limit will be enforced. |
|
|
612
619
|
|config.enrich|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|If set additional data will be available in the metadata section. |
|
|
613
620
|
|
|
614
621
|
|
|
@@ -704,6 +711,7 @@ It is guaranteed that every field of every record will have a corresponding type
|
|
|
704
711
|
|
|
705
712
|
| Name | Type | Description |
|
|
706
713
|
| --- | --- | --- |
|
|
714
|
+
|config.dtClientContext|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. |
|
|
707
715
|
|config.enrich|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|If set additional data will be available in the metadata section. |
|
|
708
716
|
|config.requestTimeoutMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The time a client is willing to wait for the query result. In case the query finishes within the specified timeout, the query result is returned. Otherwise, the query status is returned. |
|
|
709
717
|
|config.requestToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request-token of the query. |
|
|
@@ -890,12 +898,13 @@ Detailed information about the error.
|
|
|
890
898
|
|enablePreview|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Request preview results. If a preview is available within the requestTimeoutMilliseconds, then it will be returned as part of the response. |
|
|
891
899
|
|fetchTimeoutSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The query will stop reading data after reaching the fetch-timeout. The query execution will continue, providing a partial result based on the read data. |
|
|
892
900
|
|filterSegments|<a href="#filtersegments">FilterSegments</a>|Represents a collection of filter segments. |
|
|
901
|
+
|includeTypes|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Parameter to exclude the type information from the query result. In case not specified, the type information will be included. <i>default:</i> <code>true</code>|
|
|
893
902
|
|locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query locale. If none specified, then a language/country neutral locale is chosen. The input values take the ISO-639 Language code with an optional ISO-3166 country code appended to it with an underscore. For instance, both values are valid 'en' or 'en_US'. |
|
|
894
903
|
|maxResultBytes|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result bytes that this query will return. |
|
|
895
904
|
|maxResultRecords|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result records that this query will return. |
|
|
896
905
|
|query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
|
|
897
906
|
|queryOptions|<a href="#queryoptions" target="_blank" rel="noopener noreferrer">QueryOptions</a>|Query options enhance query functionality for Dynatrace internal services. |
|
|
898
|
-
|requestTimeoutMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The time
|
|
907
|
+
|requestTimeoutMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum time the response will be delayed to wait for a result. (This excludes the sending time and time spent in any services between the query-frontend and the client.) If the query finishes within the specified timeout, the query result is returned. Otherwise, the requestToken is returned, allowing polling for the result. |
|
|
899
908
|
|timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timezone. If none is specified, UTC is used as fallback. The list of valid input values matches that of the IANA Time Zone Database (TZDB). It accepts values in their canonical names like 'Europe/Paris', the abbreviated version like CET or the UTC offset format like '+01:00' |
|
|
900
909
|
|
|
901
910
|
### FieldType
|
package/cjs/index.js
CHANGED
|
@@ -263,6 +263,9 @@ var QueryAssistanceClient = class {
|
|
|
263
263
|
throw new import_shared_errors3.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
264
264
|
}
|
|
265
265
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
266
|
+
const headerParameters = {
|
|
267
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
268
|
+
};
|
|
266
269
|
try {
|
|
267
270
|
const response = await this.httpClient.send({
|
|
268
271
|
url: `/platform/storage/query/v1/query:verify`,
|
|
@@ -271,7 +274,8 @@ var QueryAssistanceClient = class {
|
|
|
271
274
|
body: encodedBody,
|
|
272
275
|
headers: {
|
|
273
276
|
"Content-Type": "application/json",
|
|
274
|
-
Accept: "application/json"
|
|
277
|
+
Accept: "application/json",
|
|
278
|
+
...headerParameters
|
|
275
279
|
},
|
|
276
280
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
277
281
|
statusValidator: (status) => {
|
|
@@ -599,6 +603,9 @@ var QueryAssistanceClient = class {
|
|
|
599
603
|
throw new import_shared_errors3.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
600
604
|
}
|
|
601
605
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
606
|
+
const headerParameters = {
|
|
607
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
608
|
+
};
|
|
602
609
|
try {
|
|
603
610
|
const response = await this.httpClient.send({
|
|
604
611
|
url: `/platform/storage/query/v1/query:parse`,
|
|
@@ -607,7 +614,8 @@ var QueryAssistanceClient = class {
|
|
|
607
614
|
body: encodedBody,
|
|
608
615
|
headers: {
|
|
609
616
|
"Content-Type": "application/json",
|
|
610
|
-
Accept: "application/json"
|
|
617
|
+
Accept: "application/json",
|
|
618
|
+
...headerParameters
|
|
611
619
|
},
|
|
612
620
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
613
621
|
statusValidator: (status) => {
|
|
@@ -782,6 +790,12 @@ var QueryAssistanceClient = class {
|
|
|
782
790
|
throw new import_shared_errors3.ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
783
791
|
}
|
|
784
792
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
793
|
+
const headerParameters = {
|
|
794
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) },
|
|
795
|
+
...config.enforceQueryConsumptionLimit !== void 0 && {
|
|
796
|
+
"enforce-query-consumption-limit": String(config.enforceQueryConsumptionLimit)
|
|
797
|
+
}
|
|
798
|
+
};
|
|
785
799
|
try {
|
|
786
800
|
const response = await this.httpClient.send({
|
|
787
801
|
url: `/platform/storage/query/v1/query:autocomplete`,
|
|
@@ -790,7 +804,8 @@ var QueryAssistanceClient = class {
|
|
|
790
804
|
body: encodedBody,
|
|
791
805
|
headers: {
|
|
792
806
|
"Content-Type": "application/json",
|
|
793
|
-
Accept: "application/json"
|
|
807
|
+
Accept: "application/json",
|
|
808
|
+
...headerParameters
|
|
794
809
|
},
|
|
795
810
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
796
811
|
statusValidator: (status) => {
|
|
@@ -1045,12 +1060,16 @@ var QueryExecutionClient = class {
|
|
|
1045
1060
|
},
|
|
1046
1061
|
{ explode: { "request-token": false, "request-timeout-milliseconds": false } }
|
|
1047
1062
|
);
|
|
1063
|
+
const headerParameters = {
|
|
1064
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
1065
|
+
};
|
|
1048
1066
|
try {
|
|
1049
1067
|
const response = await this.httpClient.send({
|
|
1050
1068
|
url: `/platform/storage/query/v1/query:poll${query}`,
|
|
1051
1069
|
method: "GET",
|
|
1052
1070
|
headers: {
|
|
1053
|
-
Accept: "application/json"
|
|
1071
|
+
Accept: "application/json",
|
|
1072
|
+
...headerParameters
|
|
1054
1073
|
},
|
|
1055
1074
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
1056
1075
|
statusValidator: (status) => {
|
|
@@ -1247,6 +1266,12 @@ var QueryExecutionClient = class {
|
|
|
1247
1266
|
}
|
|
1248
1267
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
1249
1268
|
const query = toQueryString({ enrich: config.enrich });
|
|
1269
|
+
const headerParameters = {
|
|
1270
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) },
|
|
1271
|
+
...config.enforceQueryConsumptionLimit !== void 0 && {
|
|
1272
|
+
"enforce-query-consumption-limit": String(config.enforceQueryConsumptionLimit)
|
|
1273
|
+
}
|
|
1274
|
+
};
|
|
1250
1275
|
try {
|
|
1251
1276
|
const response = await this.httpClient.send({
|
|
1252
1277
|
url: `/platform/storage/query/v1/query:execute${query}`,
|
|
@@ -1255,7 +1280,8 @@ var QueryExecutionClient = class {
|
|
|
1255
1280
|
body: encodedBody,
|
|
1256
1281
|
headers: {
|
|
1257
1282
|
"Content-Type": "application/json",
|
|
1258
|
-
Accept: "application/json"
|
|
1283
|
+
Accept: "application/json",
|
|
1284
|
+
...headerParameters
|
|
1259
1285
|
},
|
|
1260
1286
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
1261
1287
|
statusValidator: (status) => {
|
|
@@ -1617,12 +1643,16 @@ var QueryExecutionClient = class {
|
|
|
1617
1643
|
{ "request-token": config.requestToken, enrich: config.enrich },
|
|
1618
1644
|
{ explode: { "request-token": false } }
|
|
1619
1645
|
);
|
|
1646
|
+
const headerParameters = {
|
|
1647
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
1648
|
+
};
|
|
1620
1649
|
try {
|
|
1621
1650
|
const response = await this.httpClient.send({
|
|
1622
1651
|
url: `/platform/storage/query/v1/query:cancel${query}`,
|
|
1623
1652
|
method: "POST",
|
|
1624
1653
|
headers: {
|
|
1625
|
-
Accept: "application/json"
|
|
1654
|
+
Accept: "application/json",
|
|
1655
|
+
...headerParameters
|
|
1626
1656
|
},
|
|
1627
1657
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
1628
1658
|
statusValidator: (status) => {
|
package/dynatrace-metadata.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dynagen": {
|
|
3
3
|
"version": "0.18.0",
|
|
4
|
-
"generatedAt": "2025-03-
|
|
4
|
+
"generatedAt": "2025-03-31T11:21:40.514Z",
|
|
5
5
|
"template": {
|
|
6
6
|
"name": "@dynatrace-sdk/template-typescript-client",
|
|
7
7
|
"version": "0.33.2"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"spec": {
|
|
14
14
|
"title": "DQL Query",
|
|
15
|
-
"version": "1.
|
|
15
|
+
"version": "1.15.0",
|
|
16
16
|
"baseUrl": "/platform/storage/query/v1"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/esm/index.js
CHANGED
|
@@ -228,6 +228,9 @@ var QueryAssistanceClient = class {
|
|
|
228
228
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
229
229
|
}
|
|
230
230
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
231
|
+
const headerParameters = {
|
|
232
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
233
|
+
};
|
|
231
234
|
try {
|
|
232
235
|
const response = await this.httpClient.send({
|
|
233
236
|
url: `/platform/storage/query/v1/query:verify`,
|
|
@@ -236,7 +239,8 @@ var QueryAssistanceClient = class {
|
|
|
236
239
|
body: encodedBody,
|
|
237
240
|
headers: {
|
|
238
241
|
"Content-Type": "application/json",
|
|
239
|
-
Accept: "application/json"
|
|
242
|
+
Accept: "application/json",
|
|
243
|
+
...headerParameters
|
|
240
244
|
},
|
|
241
245
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
242
246
|
statusValidator: (status) => {
|
|
@@ -564,6 +568,9 @@ var QueryAssistanceClient = class {
|
|
|
564
568
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
565
569
|
}
|
|
566
570
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
571
|
+
const headerParameters = {
|
|
572
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
573
|
+
};
|
|
567
574
|
try {
|
|
568
575
|
const response = await this.httpClient.send({
|
|
569
576
|
url: `/platform/storage/query/v1/query:parse`,
|
|
@@ -572,7 +579,8 @@ var QueryAssistanceClient = class {
|
|
|
572
579
|
body: encodedBody,
|
|
573
580
|
headers: {
|
|
574
581
|
"Content-Type": "application/json",
|
|
575
|
-
Accept: "application/json"
|
|
582
|
+
Accept: "application/json",
|
|
583
|
+
...headerParameters
|
|
576
584
|
},
|
|
577
585
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
578
586
|
statusValidator: (status) => {
|
|
@@ -747,6 +755,12 @@ var QueryAssistanceClient = class {
|
|
|
747
755
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
748
756
|
}
|
|
749
757
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
758
|
+
const headerParameters = {
|
|
759
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) },
|
|
760
|
+
...config.enforceQueryConsumptionLimit !== void 0 && {
|
|
761
|
+
"enforce-query-consumption-limit": String(config.enforceQueryConsumptionLimit)
|
|
762
|
+
}
|
|
763
|
+
};
|
|
750
764
|
try {
|
|
751
765
|
const response = await this.httpClient.send({
|
|
752
766
|
url: `/platform/storage/query/v1/query:autocomplete`,
|
|
@@ -755,7 +769,8 @@ var QueryAssistanceClient = class {
|
|
|
755
769
|
body: encodedBody,
|
|
756
770
|
headers: {
|
|
757
771
|
"Content-Type": "application/json",
|
|
758
|
-
Accept: "application/json"
|
|
772
|
+
Accept: "application/json",
|
|
773
|
+
...headerParameters
|
|
759
774
|
},
|
|
760
775
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
761
776
|
statusValidator: (status) => {
|
|
@@ -1020,12 +1035,16 @@ var QueryExecutionClient = class {
|
|
|
1020
1035
|
},
|
|
1021
1036
|
{ explode: { "request-token": false, "request-timeout-milliseconds": false } }
|
|
1022
1037
|
);
|
|
1038
|
+
const headerParameters = {
|
|
1039
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
1040
|
+
};
|
|
1023
1041
|
try {
|
|
1024
1042
|
const response = await this.httpClient.send({
|
|
1025
1043
|
url: `/platform/storage/query/v1/query:poll${query}`,
|
|
1026
1044
|
method: "GET",
|
|
1027
1045
|
headers: {
|
|
1028
|
-
Accept: "application/json"
|
|
1046
|
+
Accept: "application/json",
|
|
1047
|
+
...headerParameters
|
|
1029
1048
|
},
|
|
1030
1049
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
1031
1050
|
statusValidator: (status) => {
|
|
@@ -1222,6 +1241,12 @@ var QueryExecutionClient = class {
|
|
|
1222
1241
|
}
|
|
1223
1242
|
const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;
|
|
1224
1243
|
const query = toQueryString({ enrich: config.enrich });
|
|
1244
|
+
const headerParameters = {
|
|
1245
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) },
|
|
1246
|
+
...config.enforceQueryConsumptionLimit !== void 0 && {
|
|
1247
|
+
"enforce-query-consumption-limit": String(config.enforceQueryConsumptionLimit)
|
|
1248
|
+
}
|
|
1249
|
+
};
|
|
1225
1250
|
try {
|
|
1226
1251
|
const response = await this.httpClient.send({
|
|
1227
1252
|
url: `/platform/storage/query/v1/query:execute${query}`,
|
|
@@ -1230,7 +1255,8 @@ var QueryExecutionClient = class {
|
|
|
1230
1255
|
body: encodedBody,
|
|
1231
1256
|
headers: {
|
|
1232
1257
|
"Content-Type": "application/json",
|
|
1233
|
-
Accept: "application/json"
|
|
1258
|
+
Accept: "application/json",
|
|
1259
|
+
...headerParameters
|
|
1234
1260
|
},
|
|
1235
1261
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
1236
1262
|
statusValidator: (status) => {
|
|
@@ -1592,12 +1618,16 @@ var QueryExecutionClient = class {
|
|
|
1592
1618
|
{ "request-token": config.requestToken, enrich: config.enrich },
|
|
1593
1619
|
{ explode: { "request-token": false } }
|
|
1594
1620
|
);
|
|
1621
|
+
const headerParameters = {
|
|
1622
|
+
...config.dtClientContext !== void 0 && { "dt-client-context": String(config.dtClientContext) }
|
|
1623
|
+
};
|
|
1595
1624
|
try {
|
|
1596
1625
|
const response = await this.httpClient.send({
|
|
1597
1626
|
url: `/platform/storage/query/v1/query:cancel${query}`,
|
|
1598
1627
|
method: "POST",
|
|
1599
1628
|
headers: {
|
|
1600
|
-
Accept: "application/json"
|
|
1629
|
+
Accept: "application/json",
|
|
1630
|
+
...headerParameters
|
|
1601
1631
|
},
|
|
1602
1632
|
abortSignal: config instanceof EventTarget ? config : config.abortSignal,
|
|
1603
1633
|
statusValidator: (status) => {
|
package/package.json
CHANGED
|
@@ -48,6 +48,7 @@ export declare class QueryAssistanceClient {
|
|
|
48
48
|
*/
|
|
49
49
|
queryVerify(config: {
|
|
50
50
|
body: VerifyRequest;
|
|
51
|
+
/** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
|
|
51
52
|
abortSignal?: AbortSignal;
|
|
52
53
|
}): Promise<VerifyResponse>;
|
|
53
54
|
/**
|
|
@@ -264,6 +265,7 @@ export declare class QueryAssistanceClient {
|
|
|
264
265
|
*/
|
|
265
266
|
queryParse(config: {
|
|
266
267
|
body: ParseRequest;
|
|
268
|
+
/** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
|
|
267
269
|
abortSignal?: AbortSignal;
|
|
268
270
|
}): Promise<DQLNode>;
|
|
269
271
|
/**
|
|
@@ -324,6 +326,8 @@ export declare class QueryAssistanceClient {
|
|
|
324
326
|
*/
|
|
325
327
|
queryAutocomplete(config: {
|
|
326
328
|
body: AutocompleteRequest;
|
|
329
|
+
/** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
|
|
330
|
+
/** If set, query consumption limit will be enforced. */ enforceQueryConsumptionLimit?: boolean;
|
|
327
331
|
abortSignal?: AbortSignal;
|
|
328
332
|
}): Promise<AutocompleteResponse>;
|
|
329
333
|
}
|
|
@@ -70,6 +70,7 @@ export declare class QueryExecutionClient {
|
|
|
70
70
|
/** The request-token of the query. */ requestToken: string;
|
|
71
71
|
/** The time a client is willing to wait for the query result. In case the query finishes within the specified timeout, the query result is returned. Otherwise, the query status is returned. */ requestTimeoutMilliseconds?: number;
|
|
72
72
|
/** If set additional data will be available in the metadata section. */ enrich?: string;
|
|
73
|
+
/** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
|
|
73
74
|
abortSignal?: AbortSignal;
|
|
74
75
|
}): Promise<QueryPollResponse>;
|
|
75
76
|
/**
|
|
@@ -132,6 +133,8 @@ export declare class QueryExecutionClient {
|
|
|
132
133
|
queryExecute(config: {
|
|
133
134
|
body: ExecuteRequest;
|
|
134
135
|
/** If set additional data will be available in the metadata section. */ enrich?: string;
|
|
136
|
+
/** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
|
|
137
|
+
/** If set, query consumption limit will be enforced. */ enforceQueryConsumptionLimit?: boolean;
|
|
135
138
|
abortSignal?: AbortSignal;
|
|
136
139
|
}): Promise<QueryStartResponse>;
|
|
137
140
|
/**
|
|
@@ -189,6 +192,7 @@ export declare class QueryExecutionClient {
|
|
|
189
192
|
queryCancel(config: {
|
|
190
193
|
/** The request-token of the query. */ requestToken: string;
|
|
191
194
|
/** If set additional data will be available in the metadata section. */ enrich?: string;
|
|
195
|
+
/** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
|
|
192
196
|
abortSignal?: AbortSignal;
|
|
193
197
|
}): Promise<QueryPollResponse | void>;
|
|
194
198
|
}
|
|
@@ -34,7 +34,7 @@ export interface ExecuteRequest {
|
|
|
34
34
|
*/
|
|
35
35
|
fetchTimeoutSeconds?: number;
|
|
36
36
|
/**
|
|
37
|
-
* The time
|
|
37
|
+
* The maximum time the response will be delayed to wait for a result. (This excludes the sending time and time spent in any services between the query-frontend and the client.) If the query finishes within the specified timeout, the query result is returned. Otherwise, the requestToken is returned, allowing polling for the result.
|
|
38
38
|
*/
|
|
39
39
|
requestTimeoutMilliseconds?: number;
|
|
40
40
|
/**
|
|
@@ -57,4 +57,8 @@ export interface ExecuteRequest {
|
|
|
57
57
|
* Represents a collection of filter segments.
|
|
58
58
|
*/
|
|
59
59
|
filterSegments?: FilterSegments;
|
|
60
|
+
/**
|
|
61
|
+
* Parameter to exclude the type information from the query result. In case not specified, the type information will be included.
|
|
62
|
+
*/
|
|
63
|
+
includeTypes?: boolean;
|
|
60
64
|
}
|