@dynatrace-sdk/client-query 1.7.2 → 1.8.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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  @dynatrace-sdk/client-query
4
4
 
5
+ ## 1.8.0
6
+
7
+ ### Minor Changes
8
+
9
+ - `rollup` and `rate` properties were added to the `MetricMetadata` object
10
+
5
11
  ## 1.7.2
6
12
 
7
13
  ### Patch 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.7.2-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.7.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)
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
@@ -2302,10 +2302,18 @@ function isMetricMetadata(value) {
2302
2302
  if (Array.isArray(value)) {
2303
2303
  return false;
2304
2304
  }
2305
- const modelKeys = /* @__PURE__ */ new Set(["metric.key", "displayName", "description", "unit", "fieldName"]);
2305
+ const modelKeys = /* @__PURE__ */ new Set([
2306
+ "metric.key",
2307
+ "displayName",
2308
+ "description",
2309
+ "unit",
2310
+ "fieldName",
2311
+ "rollup",
2312
+ "rate"
2313
+ ]);
2306
2314
  const hasAdditionalProperties = false;
2307
2315
  const requiredKeys = [];
2308
- const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName"];
2316
+ const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName", "rollup", "rate"];
2309
2317
  const valKeys = new Set(Object.keys(value));
2310
2318
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
2311
2319
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -2322,10 +2330,18 @@ function isJson23(value) {
2322
2330
  if (Array.isArray(value)) {
2323
2331
  return false;
2324
2332
  }
2325
- const modelKeys = /* @__PURE__ */ new Set(["metric.key", "displayName", "description", "unit", "fieldName"]);
2333
+ const modelKeys = /* @__PURE__ */ new Set([
2334
+ "metric.key",
2335
+ "displayName",
2336
+ "description",
2337
+ "unit",
2338
+ "fieldName",
2339
+ "rollup",
2340
+ "rate"
2341
+ ]);
2326
2342
  const hasAdditionalProperties = false;
2327
2343
  const requiredKeys = [];
2328
- const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName"];
2344
+ const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName", "rollup", "rate"];
2329
2345
  const valKeys = new Set(Object.keys(value));
2330
2346
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
2331
2347
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -2333,23 +2349,27 @@ function isJson23(value) {
2333
2349
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2334
2350
  }
2335
2351
  function fromJson23($model) {
2336
- const { "metric.key": metricKey, displayName, description, unit, fieldName } = $model;
2352
+ const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate } = $model;
2337
2353
  return {
2338
2354
  "metric.key": metricKey,
2339
2355
  displayName,
2340
2356
  description,
2341
2357
  unit,
2342
- fieldName
2358
+ fieldName,
2359
+ rollup,
2360
+ rate
2343
2361
  };
2344
2362
  }
2345
2363
  function toJson23($model) {
2346
- const { "metric.key": metricKey, displayName, description, unit, fieldName } = $model;
2364
+ const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate } = $model;
2347
2365
  return {
2348
2366
  "metric.key": metricKey,
2349
2367
  displayName,
2350
2368
  description,
2351
2369
  unit,
2352
- fieldName
2370
+ fieldName,
2371
+ rollup,
2372
+ rate
2353
2373
  };
2354
2374
  }
2355
2375
 
package/docs/DOCS.md CHANGED
@@ -17,7 +17,7 @@ import NpmLogo from '@site/static/img/npm-logo.png';
17
17
  </a>
18
18
  </div>
19
19
  <div class="col" style={{textAlign: 'right'}}>
20
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.7.2">v1.7.2</a>
20
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.8.0">v1.8.0</a>
21
21
  </div>
22
22
  </div>
23
23
 
@@ -40,7 +40,7 @@ import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
40
40
 
41
41
  Get a structured list of suggestions for the query at the given position.
42
42
 
43
- For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
43
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
44
44
 
45
45
  <h2> Overview</h2>
46
46
 
@@ -119,7 +119,7 @@ const data = await queryAssistanceClient.queryAutocomplete({
119
119
 
120
120
  Get a structured tree of the canonical form of the query.
121
121
 
122
- For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
122
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
123
123
 
124
124
  <h2> Overview</h2>
125
125
 
@@ -354,7 +354,7 @@ const data = await queryAssistanceClient.queryParse({
354
354
 
355
355
  Verifies a query without executing it.
356
356
 
357
- For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
357
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
358
358
 
359
359
  <h2> Overview</h2>
360
360
 
@@ -410,7 +410,7 @@ import { queryExecutionClient } from "@dynatrace-sdk/client-query";
410
410
 
411
411
  Cancels the query and returns the result if the query was already finished, otherwise discards it.
412
412
 
413
- For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
413
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
414
414
 
415
415
  <h3> Overview:</h3>
416
416
 
@@ -485,7 +485,7 @@ const data = await queryExecutionClient.queryCancel({
485
485
 
486
486
  Starts a Grail query.
487
487
 
488
- For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
488
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
489
489
 
490
490
  <h3> Overview:</h3>
491
491
 
@@ -565,7 +565,7 @@ const data = await queryExecutionClient.queryExecute({
565
565
 
566
566
  Retrieves query status and final result from Grail.
567
567
 
568
- For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
568
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
569
569
 
570
570
  <h3> Overview:</h3>
571
571
 
@@ -761,7 +761,7 @@ Detailed information about the error.
761
761
  | defaultTimeframeEnd | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The query timeframe 'end' timestamp in ISO-8601 or RFC399 format. If the timeframe 'start' parameter is missing, the whole timeframe is ignored. <em>Note that if a timeframe is specified within the query string (query) then it has precedence over this query request parameter.</em> |
762
762
  | defaultTimeframeStart | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The query timeframe 'start' timestamp in ISO-8601 or RFC399 format. If the timeframe 'end' parameter is missing, the whole timeframe is ignored. <em>Note that if a timeframe is specified within the query string (query) then it has precedence over this query request parameter.</em> |
763
763
  | enablePreview | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Boolean">boolean</a> | Request preview results. If a preview is available within the requestTimeoutMilliseconds, then it will be returned as part of the response. |
764
- | fetchTimeoutSeconds | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The query will stop after reaching the fetch-timeout. |
764
+ | fetchTimeoutSeconds | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | 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. |
765
765
  | 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'. |
766
766
  | maxResultBytes | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The maximum number of result bytes that this query will return. |
767
767
  | maxResultRecords | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The maximum number of result records that this query will return. |
@@ -839,6 +839,8 @@ An object that defines additional metric metadata.
839
839
  | displayName | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The display name of the metadata. |
840
840
  | fieldName | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the associated field used in the query. |
841
841
  | metric.key | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The metric key. |
842
+ | rate | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The specified rate normalization parameter. |
843
+ | rollup | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Metadata about the rollup type. |
842
844
  | unit | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The unit used. |
843
845
 
844
846
  ### ParseRequest
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "dynagen": {
3
- "version": "0.12.9",
3
+ "version": "0.13.0",
4
4
  "generatedAt": "",
5
5
  "template": {
6
6
  "name": "@dynatrace-sdk/template-typescript-client",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "spec": {
14
14
  "title": "DQL Query",
15
- "version": "1.6.0",
15
+ "version": "1.7.0",
16
16
  "baseUrl": "/platform/storage/query/v1"
17
17
  }
18
18
  }
package/esm/index.js CHANGED
@@ -2248,10 +2248,18 @@ function isMetricMetadata(value) {
2248
2248
  if (Array.isArray(value)) {
2249
2249
  return false;
2250
2250
  }
2251
- const modelKeys = /* @__PURE__ */ new Set(["metric.key", "displayName", "description", "unit", "fieldName"]);
2251
+ const modelKeys = /* @__PURE__ */ new Set([
2252
+ "metric.key",
2253
+ "displayName",
2254
+ "description",
2255
+ "unit",
2256
+ "fieldName",
2257
+ "rollup",
2258
+ "rate"
2259
+ ]);
2252
2260
  const hasAdditionalProperties = false;
2253
2261
  const requiredKeys = [];
2254
- const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName"];
2262
+ const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName", "rollup", "rate"];
2255
2263
  const valKeys = new Set(Object.keys(value));
2256
2264
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
2257
2265
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -2268,10 +2276,18 @@ function isJson23(value) {
2268
2276
  if (Array.isArray(value)) {
2269
2277
  return false;
2270
2278
  }
2271
- const modelKeys = /* @__PURE__ */ new Set(["metric.key", "displayName", "description", "unit", "fieldName"]);
2279
+ const modelKeys = /* @__PURE__ */ new Set([
2280
+ "metric.key",
2281
+ "displayName",
2282
+ "description",
2283
+ "unit",
2284
+ "fieldName",
2285
+ "rollup",
2286
+ "rate"
2287
+ ]);
2272
2288
  const hasAdditionalProperties = false;
2273
2289
  const requiredKeys = [];
2274
- const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName"];
2290
+ const optionalKeys = ["metric.key", "displayName", "description", "unit", "fieldName", "rollup", "rate"];
2275
2291
  const valKeys = new Set(Object.keys(value));
2276
2292
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
2277
2293
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
@@ -2279,23 +2295,27 @@ function isJson23(value) {
2279
2295
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2280
2296
  }
2281
2297
  function fromJson23($model) {
2282
- const { "metric.key": metricKey, displayName, description, unit, fieldName } = $model;
2298
+ const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate } = $model;
2283
2299
  return {
2284
2300
  "metric.key": metricKey,
2285
2301
  displayName,
2286
2302
  description,
2287
2303
  unit,
2288
- fieldName
2304
+ fieldName,
2305
+ rollup,
2306
+ rate
2289
2307
  };
2290
2308
  }
2291
2309
  function toJson23($model) {
2292
- const { "metric.key": metricKey, displayName, description, unit, fieldName } = $model;
2310
+ const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate } = $model;
2293
2311
  return {
2294
2312
  "metric.key": metricKey,
2295
2313
  displayName,
2296
2314
  description,
2297
2315
  unit,
2298
- fieldName
2316
+ fieldName,
2317
+ rollup,
2318
+ rate
2299
2319
  };
2300
2320
  }
2301
2321
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-query",
3
- "version": "1.7.2",
3
+ "version": "1.8.0",
4
4
  "description": "Exposes an API to fetch records stored in Grail.",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -19,7 +19,7 @@ export declare class QueryAssistanceClient {
19
19
  /**
20
20
  * Verifies a query without executing it.
21
21
  *
22
- * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
22
+ * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
23
23
  *
24
24
  * ## Overview
25
25
  *
@@ -46,7 +46,7 @@ export declare class QueryAssistanceClient {
46
46
  /**
47
47
  * Get a structured tree of the canonical form of the query.
48
48
  *
49
- * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
49
+ * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
50
50
  *
51
51
  * ## Overview
52
52
  *
@@ -258,7 +258,7 @@ export declare class QueryAssistanceClient {
258
258
  /**
259
259
  * Get a structured list of suggestions for the query at the given position.
260
260
  *
261
- * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
261
+ * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
262
262
  *
263
263
  * ## Overview
264
264
  *
@@ -16,7 +16,7 @@ export declare class QueryExecutionClient {
16
16
  /**
17
17
  * Retrieves query status and final result from Grail.
18
18
  *
19
- * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
19
+ * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
20
20
  *
21
21
  * ### Overview:
22
22
  *
@@ -67,7 +67,7 @@ export declare class QueryExecutionClient {
67
67
  /**
68
68
  * Starts a Grail query.
69
69
  *
70
- * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
70
+ * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
71
71
  *
72
72
  * ### Overview:
73
73
  *
@@ -124,7 +124,7 @@ export declare class QueryExecutionClient {
124
124
  /**
125
125
  * Cancels the query and returns the result if the query was already finished, otherwise discards it.
126
126
  *
127
- * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://www.dynatrace.com/support/help/platform/grail/assign-permissions-in-grail).
127
+ * For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
128
128
  *
129
129
  * ### Overview:
130
130
  *
@@ -28,7 +28,7 @@ export interface ExecuteRequest {
28
28
  */
29
29
  maxResultBytes?: number;
30
30
  /**
31
- * The query will stop after reaching the fetch-timeout.
31
+ * 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.
32
32
  */
33
33
  fetchTimeoutSeconds?: number;
34
34
  /**
@@ -22,4 +22,12 @@ export interface MetricMetadata {
22
22
  * The name of the associated field used in the query.
23
23
  */
24
24
  fieldName?: string;
25
+ /**
26
+ * Metadata about the rollup type.
27
+ */
28
+ rollup?: string;
29
+ /**
30
+ * The specified rate normalization parameter.
31
+ */
32
+ rate?: string;
25
33
  }
@@ -5,6 +5,8 @@ export interface AsJson {
5
5
  description?: string;
6
6
  unit?: string;
7
7
  fieldName?: string;
8
+ rollup?: string;
9
+ rate?: string;
8
10
  }
9
11
  export declare function isMetricMetadata(value: any): value is MetricMetadata;
10
12
  export declare function isJson(value: any): value is AsJson;