@dynatrace-sdk/client-query 1.8.1 → 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 +14 -0
- package/README.md +1 -1
- package/cjs/index.js +32 -16
- package/docs/DOCS.md +40 -37
- package/dynatrace-metadata.json +2 -2
- package/esm/index.js +32 -16
- package/package.json +1 -1
- package/types/packages/client/query/src/lib/models/autocomplete-request.d.ts +1 -0
- package/types/packages/client/query/src/lib/models/autocomplete-request.transformation.d.ts +1 -0
- package/types/packages/client/query/src/lib/models/error-response-details.d.ts +1 -0
- package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts +1 -0
- package/types/packages/client/query/src/lib/models/grail-metadata.d.ts +1 -0
- package/types/packages/client/query/src/lib/models/grail-metadata.transformation.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
|
|
5
19
|
## 1.8.1
|
|
6
20
|
|
|
7
21
|
### 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.9.1)
|
|
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
|
@@ -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
|
@@ -17,8 +17,8 @@ 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.
|
|
21
|
-
v1.
|
|
20
|
+
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.9.1">
|
|
21
|
+
v1.9.1
|
|
22
22
|
</a>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
@@ -158,7 +158,7 @@ something was inserted, removed, or changed.
|
|
|
158
158
|
only present if it is true.
|
|
159
159
|
|
|
160
160
|
Optional nodes can e.g. be optional braces that make a query more readable, but are not necessary. This could be used to
|
|
161
|
-
enter _ghost braces_ and _implicit functions_ in the user
|
|
161
|
+
enter _ghost braces_ and _implicit functions_ in the user's input field; maybe with different formatting
|
|
162
162
|
(using the tokenPosition of sibling nodes we can also check whether the user wrote these or not).
|
|
163
163
|
|
|
164
164
|
<h3> Advanced Token Types</h3>
|
|
@@ -260,7 +260,7 @@ For the query `SORT a, {direction:"descending", b}`, the canonical form is:
|
|
|
260
260
|
`SORT a, {b, direction:"descending"}`
|
|
261
261
|
|
|
262
262
|
This is the order, in which the parameters are returned in the query tree.
|
|
263
|
-
Parameters are {a} and {{b} and {direction
|
|
263
|
+
Parameters are \{a} and \{\{b} and \{direction:"descending"}}. In this case, the braces are optional.
|
|
264
264
|
|
|
265
265
|
`SORT a, {b, direction:"descending"}` is equivalent to `SORT a, b, direction:"descending"`
|
|
266
266
|
|
|
@@ -290,9 +290,9 @@ to an invalid query.
|
|
|
290
290
|
|
|
291
291
|
can be identified by checking whether `alternatives` is present
|
|
292
292
|
|
|
293
|
-
| Field | Mandatory | Description
|
|
294
|
-
| ------------ | --------- |
|
|
295
|
-
| alternatives | yes | Type: Map<AlternativeType, DQLNode> |
|
|
293
|
+
| Field | Mandatory | Description |
|
|
294
|
+
| ------------ | --------- | ------------------------------------------------- |
|
|
295
|
+
| alternatives | yes | Type: Map&lt;AlternativeType, DQLNode&gt; |
|
|
296
296
|
|
|
297
297
|
When displaying the query, pick one option. You may use the other options for hovering, replacing, and more.
|
|
298
298
|
|
|
@@ -304,7 +304,7 @@ When displaying the query, pick one option. You may use the other options for ho
|
|
|
304
304
|
|
|
305
305
|
_Examples_:
|
|
306
306
|
|
|
307
|
-
- `CANONICAL` is not present, `USER` is present: user
|
|
307
|
+
- `CANONICAL` is not present, `USER` is present: user's nodes are optional, but not canonical (usually optional nodes
|
|
308
308
|
are still canonical)
|
|
309
309
|
- `CANONICAL` is present, `USER` is not present: same as if the canonical node was optional. If this happens, it is
|
|
310
310
|
likely that there is also an `INFO` node
|
|
@@ -424,25 +424,25 @@ If the query was already finished, a response body including the result will be
|
|
|
424
424
|
|
|
425
425
|
The result has three main sections:
|
|
426
426
|
|
|
427
|
-
- the
|
|
428
|
-
- the
|
|
429
|
-
- the
|
|
427
|
+
- the 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
|
|
428
|
+
- the 'types' section describes the corresponding data types that a record field has.
|
|
429
|
+
- the 'metadata' section contains information about the query like 'analysisTimeframe', 'timezone' or 'locale'.
|
|
430
430
|
|
|
431
|
-
Every record has an implicit
|
|
432
|
-
The types section has a list of 1..N possible type
|
|
433
|
-
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 'index' according to the position in the 'records' JSON array.
|
|
432
|
+
The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
|
|
433
|
+
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).
|
|
434
434
|
|
|
435
|
-
A field part of a record with index
|
|
435
|
+
A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
|
|
436
436
|
|
|
437
437
|
```text
|
|
438
438
|
startIndex <= i <= endIndex
|
|
439
439
|
```
|
|
440
440
|
|
|
441
|
-
Once the bucket is found the
|
|
441
|
+
Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
|
|
442
442
|
|
|
443
443
|
Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
|
|
444
|
-
field name but their values are of a different type. This phenomenon will hence forth be named as a
|
|
445
|
-
When a collision does occur, we will create a new type
|
|
444
|
+
field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
|
|
445
|
+
When a collision does occur, we will create a new type 'bucket' that will have a different index range where
|
|
446
446
|
the new record field types will be placed.
|
|
447
447
|
It is guaranteed that every field of every record will have a corresponding type.
|
|
448
448
|
**Clients should always take the included types into account when consuming records!**
|
|
@@ -501,24 +501,24 @@ The json response will contain the state of the started query. If the query succ
|
|
|
501
501
|
|
|
502
502
|
The result has two main sections:
|
|
503
503
|
|
|
504
|
-
- The
|
|
505
|
-
- The
|
|
504
|
+
- The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
|
|
505
|
+
- The 'types' section describes the corresponding data types that a record field has.
|
|
506
506
|
|
|
507
|
-
Every record has an implicit
|
|
508
|
-
The types section has a list of 1..N possible type
|
|
509
|
-
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 'index' according to the position in the 'records' JSON array.
|
|
508
|
+
The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
|
|
509
|
+
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).
|
|
510
510
|
|
|
511
|
-
A field part of a record with index
|
|
511
|
+
A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
|
|
512
512
|
|
|
513
513
|
```text
|
|
514
514
|
startIndex <= i <= endIndex
|
|
515
515
|
```
|
|
516
516
|
|
|
517
|
-
Once the bucket is found the
|
|
517
|
+
Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
|
|
518
518
|
|
|
519
519
|
Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
|
|
520
|
-
field name but their values are of a different type. This phenomenon will hence forth be named as a
|
|
521
|
-
When a collision does occur, we will create a new type
|
|
520
|
+
field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
|
|
521
|
+
When a collision does occur, we will create a new type 'bucket' that will have a different index range where
|
|
522
522
|
the new record field types will be placed.
|
|
523
523
|
It is guaranteed that every field of every record will have a corresponding type.
|
|
524
524
|
**Clients should always take the included types into account when consuming records!**
|
|
@@ -579,24 +579,24 @@ The json response will contain the state of the query. If the query succeeded, t
|
|
|
579
579
|
|
|
580
580
|
The result has two main sections:
|
|
581
581
|
|
|
582
|
-
- The
|
|
583
|
-
- The
|
|
582
|
+
- The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
|
|
583
|
+
- The 'types' section describes the corresponding data types that a record field has.
|
|
584
584
|
|
|
585
|
-
Every record has an implicit
|
|
586
|
-
The types section has a list of 1..N possible type
|
|
587
|
-
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 'index' according to the position in the 'records' JSON array.
|
|
586
|
+
The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
|
|
587
|
+
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).
|
|
588
588
|
|
|
589
|
-
A field part of a record with index
|
|
589
|
+
A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
|
|
590
590
|
|
|
591
591
|
```text
|
|
592
592
|
startIndex <= i <= endIndex
|
|
593
593
|
```
|
|
594
594
|
|
|
595
|
-
Once the bucket is found the
|
|
595
|
+
Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
|
|
596
596
|
|
|
597
597
|
Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
|
|
598
|
-
field name but their values are of a different type. This phenomenon will hence forth be named as a
|
|
599
|
-
When a collision does occur, we will create a new type
|
|
598
|
+
field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
|
|
599
|
+
When a collision does occur, we will create a new type 'bucket' that will have a different index range where
|
|
600
600
|
the new record field types will be placed.
|
|
601
601
|
It is guaranteed that every field of every record will have a corresponding type.
|
|
602
602
|
**Clients should always take the included types into account when consuming records!**
|
|
@@ -641,6 +641,7 @@ const data = await queryExecutionClient.queryPoll({
|
|
|
641
641
|
| -------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
642
642
|
| cursorPosition | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
|
|
643
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> | |
|
|
644
645
|
| query<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The full query string. |
|
|
645
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' |
|
|
646
647
|
|
|
@@ -723,7 +724,7 @@ Node that represents single token.
|
|
|
723
724
|
|
|
724
725
|
### ErrorEnvelope
|
|
725
726
|
|
|
726
|
-
An
|
|
727
|
+
An 'envelope' error object that has the mandatory error object.
|
|
727
728
|
|
|
728
729
|
| Name | Type |
|
|
729
730
|
| -------------------------- | ------------------------------------------ |
|
|
@@ -751,6 +752,7 @@ Detailed information about the error.
|
|
|
751
752
|
| errorMessageFormatSpecifierTypes<sup>\*required</sup> | Array<<a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>> | The corresponding DQL format specifier types for each format specifier used in the error message format. |
|
|
752
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 |
|
|
753
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> | |
|
|
754
756
|
| queryString<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Submitted query string. |
|
|
755
757
|
| syntaxErrorPosition | <a href="#tokenposition">TokenPosition</a> | |
|
|
756
758
|
|
|
@@ -805,6 +807,7 @@ Collects various bits of metadata information.
|
|
|
805
807
|
| queryId | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The id of the query |
|
|
806
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. |
|
|
807
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> | |
|
|
808
811
|
| scannedRecords | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | Number of scanned records during the query execution. |
|
|
809
812
|
| timezone | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Effective timezone for the query. |
|
|
810
813
|
|
package/dynatrace-metadata.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"generatedAt": "",
|
|
5
5
|
"template": {
|
|
6
6
|
"name": "@dynatrace-sdk/template-typescript-client",
|
|
7
|
-
"version": "0.18.
|
|
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.
|
|
15
|
+
"version": "1.8.0",
|
|
16
16
|
"baseUrl": "/platform/storage/query/v1"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/esm/index.js
CHANGED
|
@@ -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
|
@@ -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;
|
package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts
CHANGED
|
@@ -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;
|