@dynatrace-sdk/client-query 1.8.0 → 1.9.1

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 CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  @dynatrace-sdk/client-query
4
4
 
5
+ ## 1.9.1
6
+
7
+ ### Patch Changes
8
+
9
+ - Update documentation
10
+
11
+ ## 1.9.0
12
+
13
+ ### Minor Changes
14
+
15
+ - `queryId` was added to ErrorResponseDetails
16
+ - `scannedDataPoints` was added to GrailMetadata (datapoints that have been scanned during a timeseries query)
17
+ - `maxDataSuggestions` was added to AutocompleteRequest (max number of dynamic entries that should be returned e.g. metric keys, metric dimensions and custom fields)
18
+
19
+ ## 1.8.1
20
+
21
+ ### Patch Changes
22
+
23
+ - Update documentation.
24
+
5
25
  ## 1.8.0
6
26
 
7
27
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @dynatrace-sdk/client-query
2
2
 
3
- [![npm](https://img.shields.io/badge/npm-v1.8.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.8.0)
3
+ [![npm](https://img.shields.io/badge/npm-v1.9.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.9.1)
4
4
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](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
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright 2023 Dynatrace LLC
3
+ * Copyright 2023-2024 Dynatrace LLC
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
6
6
  * You may obtain a copy of the License at
@@ -231,10 +231,10 @@ function isAutocompleteRequest(value) {
231
231
  if (Array.isArray(value)) {
232
232
  return false;
233
233
  }
234
- const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale"]);
234
+ const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale", "maxDataSuggestions"]);
235
235
  const hasAdditionalProperties = false;
236
236
  const requiredKeys = ["query"];
237
- const optionalKeys = ["cursorPosition", "timezone", "locale"];
237
+ const optionalKeys = ["cursorPosition", "timezone", "locale", "maxDataSuggestions"];
238
238
  const valKeys = new Set(Object.keys(value));
239
239
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
240
240
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -251,10 +251,10 @@ function isJson(value) {
251
251
  if (Array.isArray(value)) {
252
252
  return false;
253
253
  }
254
- const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale"]);
254
+ const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale", "maxDataSuggestions"]);
255
255
  const hasAdditionalProperties = false;
256
256
  const requiredKeys = ["query"];
257
- const optionalKeys = ["cursorPosition", "timezone", "locale"];
257
+ const optionalKeys = ["cursorPosition", "timezone", "locale", "maxDataSuggestions"];
258
258
  const valKeys = new Set(Object.keys(value));
259
259
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
260
260
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -262,21 +262,23 @@ function isJson(value) {
262
262
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
263
263
  }
264
264
  function fromJson($model) {
265
- const { query, cursorPosition, timezone, locale } = $model;
265
+ const { query, cursorPosition, timezone, locale, maxDataSuggestions } = $model;
266
266
  return {
267
267
  query,
268
268
  cursorPosition,
269
269
  timezone,
270
- locale
270
+ locale,
271
+ maxDataSuggestions
271
272
  };
272
273
  }
273
274
  function toJson($model) {
274
- const { query, cursorPosition, timezone, locale } = $model;
275
+ const { query, cursorPosition, timezone, locale, maxDataSuggestions } = $model;
275
276
  return {
276
277
  query,
277
278
  cursorPosition,
278
279
  timezone,
279
- locale
280
+ locale,
281
+ maxDataSuggestions
280
282
  };
281
283
  }
282
284
 
@@ -995,7 +997,8 @@ function isErrorResponseDetails(value) {
995
997
  "arguments",
996
998
  "queryString",
997
999
  "errorMessageFormatSpecifierTypes",
998
- "errorMessageFormat"
1000
+ "errorMessageFormat",
1001
+ "queryId"
999
1002
  ]);
1000
1003
  const hasAdditionalProperties = false;
1001
1004
  const requiredKeys = [
@@ -1007,7 +1010,7 @@ function isErrorResponseDetails(value) {
1007
1010
  "exceptionType",
1008
1011
  "queryString"
1009
1012
  ];
1010
- const optionalKeys = ["syntaxErrorPosition"];
1013
+ const optionalKeys = ["syntaxErrorPosition", "queryId"];
1011
1014
  const valKeys = new Set(Object.keys(value));
1012
1015
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1013
1016
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -1032,7 +1035,8 @@ function isJson13(value) {
1032
1035
  "arguments",
1033
1036
  "queryString",
1034
1037
  "errorMessageFormatSpecifierTypes",
1035
- "errorMessageFormat"
1038
+ "errorMessageFormat",
1039
+ "queryId"
1036
1040
  ]);
1037
1041
  const hasAdditionalProperties = false;
1038
1042
  const requiredKeys = [
@@ -1044,7 +1048,7 @@ function isJson13(value) {
1044
1048
  "exceptionType",
1045
1049
  "queryString"
1046
1050
  ];
1047
- const optionalKeys = ["syntaxErrorPosition"];
1051
+ const optionalKeys = ["syntaxErrorPosition", "queryId"];
1048
1052
  const valKeys = new Set(Object.keys(value));
1049
1053
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1050
1054
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -1060,7 +1064,8 @@ function fromJson13($model) {
1060
1064
  arguments: _arguments,
1061
1065
  queryString,
1062
1066
  errorMessageFormatSpecifierTypes,
1063
- errorMessageFormat
1067
+ errorMessageFormat,
1068
+ queryId
1064
1069
  } = $model;
1065
1070
  return {
1066
1071
  exceptionType,
@@ -1070,7 +1075,8 @@ function fromJson13($model) {
1070
1075
  arguments: _arguments?.slice(0),
1071
1076
  queryString,
1072
1077
  errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
1073
- errorMessageFormat
1078
+ errorMessageFormat,
1079
+ queryId
1074
1080
  };
1075
1081
  }
1076
1082
  function toJson13($model) {
@@ -1082,7 +1088,8 @@ function toJson13($model) {
1082
1088
  arguments: _arguments,
1083
1089
  queryString,
1084
1090
  errorMessageFormatSpecifierTypes,
1085
- errorMessageFormat
1091
+ errorMessageFormat,
1092
+ queryId
1086
1093
  } = $model;
1087
1094
  return {
1088
1095
  exceptionType,
@@ -1092,7 +1099,8 @@ function toJson13($model) {
1092
1099
  arguments: _arguments?.slice(0),
1093
1100
  queryString,
1094
1101
  errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
1095
- errorMessageFormat
1102
+ errorMessageFormat,
1103
+ queryId
1096
1104
  };
1097
1105
  }
1098
1106
 
@@ -2148,6 +2156,7 @@ function isGrailMetadata(value) {
2148
2156
  "scannedRecords",
2149
2157
  "dqlVersion",
2150
2158
  "scannedBytes",
2159
+ "scannedDataPoints",
2151
2160
  "analysisTimeframe",
2152
2161
  "locale",
2153
2162
  "executionTimeMilliseconds",
@@ -2164,6 +2173,7 @@ function isGrailMetadata(value) {
2164
2173
  "scannedRecords",
2165
2174
  "dqlVersion",
2166
2175
  "scannedBytes",
2176
+ "scannedDataPoints",
2167
2177
  "analysisTimeframe",
2168
2178
  "locale",
2169
2179
  "executionTimeMilliseconds",
@@ -2194,6 +2204,7 @@ function isJson22(value) {
2194
2204
  "scannedRecords",
2195
2205
  "dqlVersion",
2196
2206
  "scannedBytes",
2207
+ "scannedDataPoints",
2197
2208
  "analysisTimeframe",
2198
2209
  "locale",
2199
2210
  "executionTimeMilliseconds",
@@ -2210,6 +2221,7 @@ function isJson22(value) {
2210
2221
  "scannedRecords",
2211
2222
  "dqlVersion",
2212
2223
  "scannedBytes",
2224
+ "scannedDataPoints",
2213
2225
  "analysisTimeframe",
2214
2226
  "locale",
2215
2227
  "executionTimeMilliseconds",
@@ -2231,6 +2243,7 @@ function fromJson22($model) {
2231
2243
  scannedRecords,
2232
2244
  dqlVersion,
2233
2245
  scannedBytes,
2246
+ scannedDataPoints,
2234
2247
  analysisTimeframe,
2235
2248
  locale,
2236
2249
  executionTimeMilliseconds,
@@ -2245,6 +2258,7 @@ function fromJson22($model) {
2245
2258
  scannedRecords,
2246
2259
  dqlVersion,
2247
2260
  scannedBytes,
2261
+ scannedDataPoints,
2248
2262
  analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? fromJson21(analysisTimeframe) : void 0,
2249
2263
  locale,
2250
2264
  executionTimeMilliseconds,
@@ -2261,6 +2275,7 @@ function toJson22($model) {
2261
2275
  scannedRecords,
2262
2276
  dqlVersion,
2263
2277
  scannedBytes,
2278
+ scannedDataPoints,
2264
2279
  analysisTimeframe,
2265
2280
  locale,
2266
2281
  executionTimeMilliseconds,
@@ -2275,6 +2290,7 @@ function toJson22($model) {
2275
2290
  scannedRecords,
2276
2291
  dqlVersion,
2277
2292
  scannedBytes,
2293
+ scannedDataPoints,
2278
2294
  analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? toJson21(analysisTimeframe) : void 0,
2279
2295
  locale,
2280
2296
  executionTimeMilliseconds,
package/docs/DOCS.md CHANGED
@@ -7,7 +7,7 @@ description: Exposes an API to fetch records stored in Grail.
7
7
 
8
8
  Exposes an API to fetch records stored in Grail
9
9
 
10
- import NpmLogo from '@site/static/img/npm-logo.png';
10
+ import NpmLogo from "@site/static/img/npm-logo.png";
11
11
 
12
12
  <div class="row margin-bottom--md">
13
13
  <div class="col">
@@ -16,8 +16,10 @@ import NpmLogo from '@site/static/img/npm-logo.png';
16
16
  <img className="no-zoom" width="20px" src={NpmLogo} />
17
17
  </a>
18
18
  </div>
19
- <div class="col" style={{textAlign: 'right'}}>
20
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.8.0">v1.8.0</a>
19
+ <div class="col" style={{ textAlign: "right" }}>
20
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.9.1">
21
+ v1.9.1
22
+ </a>
21
23
  </div>
22
24
  </div>
23
25
 
@@ -156,7 +158,7 @@ something was inserted, removed, or changed.
156
158
  only present if it is true.
157
159
 
158
160
  Optional nodes can e.g. be optional braces that make a query more readable, but are not necessary. This could be used to
159
- enter _ghost braces_ and _implicit functions_ in the user's input field; maybe with different formatting
161
+ enter _ghost braces_ and _implicit functions_ in the user&apos;s input field; maybe with different formatting
160
162
  (using the tokenPosition of sibling nodes we can also check whether the user wrote these or not).
161
163
 
162
164
  <h3> Advanced Token Types</h3>
@@ -258,7 +260,7 @@ For the query `SORT a, {direction:"descending", b}`, the canonical form is:
258
260
  `SORT a, {b, direction:"descending"}`
259
261
 
260
262
  This is the order, in which the parameters are returned in the query tree.
261
- Parameters are {a} and {{b} and {direction:"descending"}}. In this case, the braces are optional.
263
+ Parameters are \{a} and \{\{b} and \{direction:&quot;descending&quot;}}. In this case, the braces are optional.
262
264
 
263
265
  `SORT a, {b, direction:"descending"}` is equivalent to `SORT a, b, direction:"descending"`
264
266
 
@@ -288,9 +290,9 @@ to an invalid query.
288
290
 
289
291
  can be identified by checking whether `alternatives` is present
290
292
 
291
- | Field | Mandatory | Description |
292
- | ------------ | --------- | ----------------------------------------- |
293
- | alternatives | yes | Type: Map&lt;AlternativeType, DQLNode&gt; |
293
+ | Field | Mandatory | Description |
294
+ | ------------ | --------- | ------------------------------------------------- |
295
+ | alternatives | yes | Type: Map&amp;lt;AlternativeType, DQLNode&amp;gt; |
294
296
 
295
297
  When displaying the query, pick one option. You may use the other options for hovering, replacing, and more.
296
298
 
@@ -302,7 +304,7 @@ When displaying the query, pick one option. You may use the other options for ho
302
304
 
303
305
  _Examples_:
304
306
 
305
- - `CANONICAL` is not present, `USER` is present: user's nodes are optional, but not canonical (usually optional nodes
307
+ - `CANONICAL` is not present, `USER` is present: user&apos;s nodes are optional, but not canonical (usually optional nodes
306
308
  are still canonical)
307
309
  - `CANONICAL` is present, `USER` is not present: same as if the canonical node was optional. If this happens, it is
308
310
  likely that there is also an `INFO` node
@@ -422,25 +424,25 @@ If the query was already finished, a response body including the result will be
422
424
 
423
425
  The result has three main sections:
424
426
 
425
- - the 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
426
- - the 'types' section describes the corresponding data types that a record field has.
427
- - the 'metadata' section contains information about the query like 'analysisTimeframe', 'timezone' or 'locale'.
427
+ - the &apos;records&apos; section contains the individual records, where each record consists of a set of fields and their corresponding values.
428
+ - the &apos;types&apos; section describes the corresponding data types that a record field has.
429
+ - the &apos;metadata&apos; section contains information about the query like &apos;analysisTimeframe&apos;, &apos;timezone&apos; or &apos;locale&apos;.
428
430
 
429
- Every record has an implicit 'index' according to the position in the 'records' JSON array.
430
- The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
431
- records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
431
+ Every record has an implicit &apos;index&apos; according to the position in the &apos;records&apos; JSON array.
432
+ The types section has a list of 1..N possible type &apos;buckets&apos;. Each such bucket has an &apos;indexRange&apos; which indicates which
433
+ records will find their field types in which bucket. The index range has two values start &amp; end and can be thought of as [startIndex, endIndex).
432
434
 
433
- A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
435
+ A field part of a record with index &apos;i&apos; will find its corresponding field type by first locating the bucket that satisfies:
434
436
 
435
437
  ```text
436
438
  startIndex <= i <= endIndex
437
439
  ```
438
440
 
439
- Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
441
+ Once the bucket is found the &apos;mappings&apos; object has an entry for all the fields that are part of that record with index &apos;i&apos;.
440
442
 
441
443
  Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
442
- field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
443
- When a collision does occur, we will create a new type 'bucket' that will have a different index range where
444
+ field name but their values are of a different type. This phenomenon will hence forth be named as a **&quot;collision&quot;**.
445
+ When a collision does occur, we will create a new type &apos;bucket&apos; that will have a different index range where
444
446
  the new record field types will be placed.
445
447
  It is guaranteed that every field of every record will have a corresponding type.
446
448
  **Clients should always take the included types into account when consuming records!**
@@ -499,24 +501,24 @@ The json response will contain the state of the started query. If the query succ
499
501
 
500
502
  The result has two main sections:
501
503
 
502
- - The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
503
- - The 'types' section describes the corresponding data types that a record field has.
504
+ - The &apos;records&apos; section contains the individual records, where each record consists of a set of fields and their corresponding values.
505
+ - The &apos;types&apos; section describes the corresponding data types that a record field has.
504
506
 
505
- Every record has an implicit 'index' according to the position in the 'records' JSON array.
506
- The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
507
- records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
507
+ Every record has an implicit &apos;index&apos; according to the position in the &apos;records&apos; JSON array.
508
+ The types section has a list of 1..N possible type &apos;buckets&apos;. Each such bucket has an &apos;indexRange&apos; which indicates which
509
+ records will find their field types in which bucket. The index range has two values start &amp; end and can be thought of as [startIndex, endIndex).
508
510
 
509
- A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
511
+ A field part of a record with index &apos;i&apos; will find its corresponding field type by first locating the bucket that satisfies:
510
512
 
511
513
  ```text
512
514
  startIndex <= i <= endIndex
513
515
  ```
514
516
 
515
- Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
517
+ Once the bucket is found the &apos;mappings&apos; object has an entry for all the fields that are part of that record with index &apos;i&apos;.
516
518
 
517
519
  Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
518
- field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
519
- When a collision does occur, we will create a new type 'bucket' that will have a different index range where
520
+ field name but their values are of a different type. This phenomenon will hence forth be named as a **&quot;collision&quot;**.
521
+ When a collision does occur, we will create a new type &apos;bucket&apos; that will have a different index range where
520
522
  the new record field types will be placed.
521
523
  It is guaranteed that every field of every record will have a corresponding type.
522
524
  **Clients should always take the included types into account when consuming records!**
@@ -577,24 +579,24 @@ The json response will contain the state of the query. If the query succeeded, t
577
579
 
578
580
  The result has two main sections:
579
581
 
580
- - The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
581
- - The 'types' section describes the corresponding data types that a record field has.
582
+ - The &apos;records&apos; section contains the individual records, where each record consists of a set of fields and their corresponding values.
583
+ - The &apos;types&apos; section describes the corresponding data types that a record field has.
582
584
 
583
- Every record has an implicit 'index' according to the position in the 'records' JSON array.
584
- The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
585
- records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
585
+ Every record has an implicit &apos;index&apos; according to the position in the &apos;records&apos; JSON array.
586
+ The types section has a list of 1..N possible type &apos;buckets&apos;. Each such bucket has an &apos;indexRange&apos; which indicates which
587
+ records will find their field types in which bucket. The index range has two values start &amp; end and can be thought of as [startIndex, endIndex).
586
588
 
587
- A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
589
+ A field part of a record with index &apos;i&apos; will find its corresponding field type by first locating the bucket that satisfies:
588
590
 
589
591
  ```text
590
592
  startIndex <= i <= endIndex
591
593
  ```
592
594
 
593
- Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
595
+ Once the bucket is found the &apos;mappings&apos; object has an entry for all the fields that are part of that record with index &apos;i&apos;.
594
596
 
595
597
  Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
596
- field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
597
- When a collision does occur, we will create a new type 'bucket' that will have a different index range where
598
+ field name but their values are of a different type. This phenomenon will hence forth be named as a **&quot;collision&quot;**.
599
+ When a collision does occur, we will create a new type &apos;bucket&apos; that will have a different index range where
598
600
  the new record field types will be placed.
599
601
  It is guaranteed that every field of every record will have a corresponding type.
600
602
  **Clients should always take the included types into account when consuming records!**
@@ -639,6 +641,7 @@ const data = await queryExecutionClient.queryPoll({
639
641
  | -------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
640
642
  | cursorPosition | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
641
643
  | locale | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | 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'. |
644
+ | maxDataSuggestions | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
642
645
  | query<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The full query string. |
643
646
  | timezone | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | 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' |
644
647
 
@@ -721,7 +724,7 @@ Node that represents single token.
721
724
 
722
725
  ### ErrorEnvelope
723
726
 
724
- An 'envelope' error object that has the mandatory error object.
727
+ An &apos;envelope&apos; error object that has the mandatory error object.
725
728
 
726
729
  | Name | Type |
727
730
  | -------------------------- | ------------------------------------------ |
@@ -749,6 +752,7 @@ Detailed information about the error.
749
752
  | errorMessageFormatSpecifierTypes<sup>\*required</sup> | Array&lt;<a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>&gt; | The corresponding DQL format specifier types for each format specifier used in the error message format. |
750
753
  | errorType<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The error type, e.g. COMMAND_NAME_MISSING |
751
754
  | exceptionType<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The exception type. |
755
+ | queryId | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
752
756
  | queryString<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Submitted query string. |
753
757
  | syntaxErrorPosition | <a href="#tokenposition">TokenPosition</a> | |
754
758
 
@@ -803,6 +807,7 @@ Collects various bits of metadata information.
803
807
  | queryId | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The id of the query |
804
808
  | sampled | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Boolean">boolean</a> | True if sampling was used for at least one segment. |
805
809
  | scannedBytes | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | Number of scanned bytes during the query execution. |
810
+ | scannedDataPoints | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
806
811
  | scannedRecords | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | Number of scanned records during the query execution. |
807
812
  | timezone | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Effective timezone for the query. |
808
813
 
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "dynagen": {
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "generatedAt": "",
5
5
  "template": {
6
6
  "name": "@dynatrace-sdk/template-typescript-client",
7
- "version": "0.18.6"
7
+ "version": "0.18.11"
8
8
  },
9
9
  "featureFlags": {
10
10
  "typeguards": true
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "spec": {
14
14
  "title": "DQL Query",
15
- "version": "1.7.0",
15
+ "version": "1.8.0",
16
16
  "baseUrl": "/platform/storage/query/v1"
17
17
  }
18
18
  }
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright 2023 Dynatrace LLC
3
+ * Copyright 2023-2024 Dynatrace LLC
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
6
6
  * You may obtain a copy of the License at
@@ -173,10 +173,10 @@ function isAutocompleteRequest(value) {
173
173
  if (Array.isArray(value)) {
174
174
  return false;
175
175
  }
176
- const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale"]);
176
+ const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale", "maxDataSuggestions"]);
177
177
  const hasAdditionalProperties = false;
178
178
  const requiredKeys = ["query"];
179
- const optionalKeys = ["cursorPosition", "timezone", "locale"];
179
+ const optionalKeys = ["cursorPosition", "timezone", "locale", "maxDataSuggestions"];
180
180
  const valKeys = new Set(Object.keys(value));
181
181
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
182
182
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -193,10 +193,10 @@ function isJson(value) {
193
193
  if (Array.isArray(value)) {
194
194
  return false;
195
195
  }
196
- const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale"]);
196
+ const modelKeys = /* @__PURE__ */ new Set(["query", "cursorPosition", "timezone", "locale", "maxDataSuggestions"]);
197
197
  const hasAdditionalProperties = false;
198
198
  const requiredKeys = ["query"];
199
- const optionalKeys = ["cursorPosition", "timezone", "locale"];
199
+ const optionalKeys = ["cursorPosition", "timezone", "locale", "maxDataSuggestions"];
200
200
  const valKeys = new Set(Object.keys(value));
201
201
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
202
202
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -204,21 +204,23 @@ function isJson(value) {
204
204
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
205
205
  }
206
206
  function fromJson($model) {
207
- const { query, cursorPosition, timezone, locale } = $model;
207
+ const { query, cursorPosition, timezone, locale, maxDataSuggestions } = $model;
208
208
  return {
209
209
  query,
210
210
  cursorPosition,
211
211
  timezone,
212
- locale
212
+ locale,
213
+ maxDataSuggestions
213
214
  };
214
215
  }
215
216
  function toJson($model) {
216
- const { query, cursorPosition, timezone, locale } = $model;
217
+ const { query, cursorPosition, timezone, locale, maxDataSuggestions } = $model;
217
218
  return {
218
219
  query,
219
220
  cursorPosition,
220
221
  timezone,
221
- locale
222
+ locale,
223
+ maxDataSuggestions
222
224
  };
223
225
  }
224
226
 
@@ -937,7 +939,8 @@ function isErrorResponseDetails(value) {
937
939
  "arguments",
938
940
  "queryString",
939
941
  "errorMessageFormatSpecifierTypes",
940
- "errorMessageFormat"
942
+ "errorMessageFormat",
943
+ "queryId"
941
944
  ]);
942
945
  const hasAdditionalProperties = false;
943
946
  const requiredKeys = [
@@ -949,7 +952,7 @@ function isErrorResponseDetails(value) {
949
952
  "exceptionType",
950
953
  "queryString"
951
954
  ];
952
- const optionalKeys = ["syntaxErrorPosition"];
955
+ const optionalKeys = ["syntaxErrorPosition", "queryId"];
953
956
  const valKeys = new Set(Object.keys(value));
954
957
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
955
958
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -974,7 +977,8 @@ function isJson13(value) {
974
977
  "arguments",
975
978
  "queryString",
976
979
  "errorMessageFormatSpecifierTypes",
977
- "errorMessageFormat"
980
+ "errorMessageFormat",
981
+ "queryId"
978
982
  ]);
979
983
  const hasAdditionalProperties = false;
980
984
  const requiredKeys = [
@@ -986,7 +990,7 @@ function isJson13(value) {
986
990
  "exceptionType",
987
991
  "queryString"
988
992
  ];
989
- const optionalKeys = ["syntaxErrorPosition"];
993
+ const optionalKeys = ["syntaxErrorPosition", "queryId"];
990
994
  const valKeys = new Set(Object.keys(value));
991
995
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
992
996
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -1002,7 +1006,8 @@ function fromJson13($model) {
1002
1006
  arguments: _arguments,
1003
1007
  queryString,
1004
1008
  errorMessageFormatSpecifierTypes,
1005
- errorMessageFormat
1009
+ errorMessageFormat,
1010
+ queryId
1006
1011
  } = $model;
1007
1012
  return {
1008
1013
  exceptionType,
@@ -1012,7 +1017,8 @@ function fromJson13($model) {
1012
1017
  arguments: _arguments?.slice(0),
1013
1018
  queryString,
1014
1019
  errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
1015
- errorMessageFormat
1020
+ errorMessageFormat,
1021
+ queryId
1016
1022
  };
1017
1023
  }
1018
1024
  function toJson13($model) {
@@ -1024,7 +1030,8 @@ function toJson13($model) {
1024
1030
  arguments: _arguments,
1025
1031
  queryString,
1026
1032
  errorMessageFormatSpecifierTypes,
1027
- errorMessageFormat
1033
+ errorMessageFormat,
1034
+ queryId
1028
1035
  } = $model;
1029
1036
  return {
1030
1037
  exceptionType,
@@ -1034,7 +1041,8 @@ function toJson13($model) {
1034
1041
  arguments: _arguments?.slice(0),
1035
1042
  queryString,
1036
1043
  errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
1037
- errorMessageFormat
1044
+ errorMessageFormat,
1045
+ queryId
1038
1046
  };
1039
1047
  }
1040
1048
 
@@ -2094,6 +2102,7 @@ function isGrailMetadata(value) {
2094
2102
  "scannedRecords",
2095
2103
  "dqlVersion",
2096
2104
  "scannedBytes",
2105
+ "scannedDataPoints",
2097
2106
  "analysisTimeframe",
2098
2107
  "locale",
2099
2108
  "executionTimeMilliseconds",
@@ -2110,6 +2119,7 @@ function isGrailMetadata(value) {
2110
2119
  "scannedRecords",
2111
2120
  "dqlVersion",
2112
2121
  "scannedBytes",
2122
+ "scannedDataPoints",
2113
2123
  "analysisTimeframe",
2114
2124
  "locale",
2115
2125
  "executionTimeMilliseconds",
@@ -2140,6 +2150,7 @@ function isJson22(value) {
2140
2150
  "scannedRecords",
2141
2151
  "dqlVersion",
2142
2152
  "scannedBytes",
2153
+ "scannedDataPoints",
2143
2154
  "analysisTimeframe",
2144
2155
  "locale",
2145
2156
  "executionTimeMilliseconds",
@@ -2156,6 +2167,7 @@ function isJson22(value) {
2156
2167
  "scannedRecords",
2157
2168
  "dqlVersion",
2158
2169
  "scannedBytes",
2170
+ "scannedDataPoints",
2159
2171
  "analysisTimeframe",
2160
2172
  "locale",
2161
2173
  "executionTimeMilliseconds",
@@ -2177,6 +2189,7 @@ function fromJson22($model) {
2177
2189
  scannedRecords,
2178
2190
  dqlVersion,
2179
2191
  scannedBytes,
2192
+ scannedDataPoints,
2180
2193
  analysisTimeframe,
2181
2194
  locale,
2182
2195
  executionTimeMilliseconds,
@@ -2191,6 +2204,7 @@ function fromJson22($model) {
2191
2204
  scannedRecords,
2192
2205
  dqlVersion,
2193
2206
  scannedBytes,
2207
+ scannedDataPoints,
2194
2208
  analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? fromJson21(analysisTimeframe) : void 0,
2195
2209
  locale,
2196
2210
  executionTimeMilliseconds,
@@ -2207,6 +2221,7 @@ function toJson22($model) {
2207
2221
  scannedRecords,
2208
2222
  dqlVersion,
2209
2223
  scannedBytes,
2224
+ scannedDataPoints,
2210
2225
  analysisTimeframe,
2211
2226
  locale,
2212
2227
  executionTimeMilliseconds,
@@ -2221,6 +2236,7 @@ function toJson22($model) {
2221
2236
  scannedRecords,
2222
2237
  dqlVersion,
2223
2238
  scannedBytes,
2239
+ scannedDataPoints,
2224
2240
  analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? toJson21(analysisTimeframe) : void 0,
2225
2241
  locale,
2226
2242
  executionTimeMilliseconds,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-query",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "description": "Exposes an API to fetch records stored in Grail.",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -12,4 +12,5 @@ export interface AutocompleteRequest {
12
12
  * 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'.
13
13
  */
14
14
  locale?: string;
15
+ maxDataSuggestions?: number;
15
16
  }
@@ -4,6 +4,7 @@ export interface AsJson {
4
4
  cursorPosition?: number;
5
5
  timezone?: string;
6
6
  locale?: string;
7
+ maxDataSuggestions?: number;
7
8
  }
8
9
  export declare function isAutocompleteRequest(value: any): value is AutocompleteRequest;
9
10
  export declare function isJson(value: any): value is AsJson;
@@ -32,4 +32,5 @@ export interface ErrorResponseDetails {
32
32
  * The message format of the error message, string.format based.
33
33
  */
34
34
  errorMessageFormat: string;
35
+ queryId?: string;
35
36
  }
@@ -9,6 +9,7 @@ export interface AsJson {
9
9
  queryString: string;
10
10
  errorMessageFormatSpecifierTypes: string[];
11
11
  errorMessageFormat: string;
12
+ queryId?: string;
12
13
  }
13
14
  export declare function isErrorResponseDetails(value: any): value is ErrorResponseDetails;
14
15
  export declare function isJson(value: any): value is AsJson;
@@ -28,6 +28,7 @@ export interface GrailMetadata {
28
28
  * Number of scanned bytes during the query execution.
29
29
  */
30
30
  scannedBytes?: number;
31
+ scannedDataPoints?: number;
31
32
  analysisTimeframe?: Timeframe;
32
33
  /**
33
34
  * Effective locale for the query.
@@ -8,6 +8,7 @@ export interface AsJson {
8
8
  scannedRecords?: number;
9
9
  dqlVersion?: string;
10
10
  scannedBytes?: number;
11
+ scannedDataPoints?: number;
11
12
  analysisTimeframe?: _TimeframeTransformation.AsJson;
12
13
  locale?: string;
13
14
  executionTimeMilliseconds?: number;