@dynatrace-sdk/client-query 1.1.0 → 1.2.2

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,11 +2,30 @@
2
2
 
3
3
  @dynatrace-sdk/client-query
4
4
 
5
+ ## 1.2.2
6
+
7
+ ### Patch Changes
8
+
9
+ - Update docs.
10
+
11
+ ## 1.2.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Add JSDoc @example for operations.
16
+ - Fix handling of the application/cloudevent+json content type.
17
+
18
+ ## 1.2.0
19
+
20
+ ### Minor Changes
21
+
22
+ - Add `sampled` property to GrailMetadata
23
+
5
24
  ## 1.1.0
6
25
 
7
26
  ### Minor Changes
8
27
 
9
- - 6aca01cb: Export model transformations
28
+ - Export model transformations
10
29
 
11
30
  ## 1.0.6
12
31
 
@@ -19,14 +38,14 @@
19
38
 
20
39
  ### Patch Changes
21
40
 
22
- - dfc1b337: Update `@dynatrace-sdk/http-client` to `^1.0.1`
23
- - dfc1b337: Use parsed response body in error serializer
41
+ - Update `@dynatrace-sdk/http-client` to `^1.0.1`
42
+ - Use parsed response body in error serializer
24
43
 
25
44
  ## 1.0.4
26
45
 
27
46
  ### Patch Changes
28
47
 
29
- - 39f914be: Send response body in error serializer
48
+ - Send response body in error serializer
30
49
  - Updated dependencies
31
50
  - @dynatrace-sdk/http-client@1.0.0
32
51
 
@@ -34,13 +53,13 @@
34
53
 
35
54
  ### Patch Changes
36
55
 
37
- - ccfbe457: Updated descriptions and examples.
56
+ - Updated descriptions and examples.
38
57
 
39
58
  ## 1.0.2
40
59
 
41
60
  ### Patch Changes
42
61
 
43
- - f225ca89: Generate client package with template-typescript-client v0.13.10. Query question mark is now removed from url when there are no search params.
62
+ - Generate client package with template-typescript-client v0.13.10. Query question mark is now removed from url when there are no search params.
44
63
 
45
64
  ## 1.0.1
46
65
 
@@ -56,4 +75,4 @@
56
75
 
57
76
  ### Major Changes
58
77
 
59
- - dbca1de4: Initial release of @dynatrace-sdk/client-query.
78
+ - Initial release of @dynatrace-sdk/client-query.
package/README.md CHANGED
@@ -1,54 +1,25 @@
1
- # Storage – Query Service
2
- API version: `1.0.0`.
1
+ # @dynatrace-sdk/client-query
3
2
 
3
+ [![npm](https://img.shields.io/badge/npm-v1.2.2-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.2.2)
4
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4
5
 
5
-
6
-
7
- Exposes an API to fetch records stored in Grail
6
+ Exposes an API to fetch records stored in Grail
8
7
 
9
8
  ## Installation
10
9
 
11
- ```
10
+ ```bash
12
11
  npm install @dynatrace-sdk/client-query
13
12
  ```
14
13
 
15
- > **Important!** The content of this library is autogenerated.
16
-
17
- ## [Experimental] Using client in nodejs/jest environment
18
-
19
- > **Important!** Node.js officially is not supported. This guide shows some workarounds to enable usage of the client in nodejs runtime.
20
-
21
- There is a possibility to use SDK clients in nodejs runtime. This may require additional setup:
22
- First, developer may need to polyfill `fetch` function with some library like [undici](https://github.com/nodejs/undici) or [node-fetch](https://github.com/node-fetch/node-fetch).
23
- Then, developer would need to provide the implementation of [HttpClient](https://bitbucket.lab.dynatrace.org/projects/APPFW/repos/dynatrace-sdk/browse/packages/http-client/src/lib/types/http-client.ts) interface. Sample code to achieve this:
24
- ```typescript
25
- import { PlatformHttpClientResponse } from '@dynatrace-sdk/http-client';
26
- import { fetch } from 'undici';
27
-
28
- const myHttpClient = {
29
- async send(options: any) {
30
- return new PlatformHttpClientResponse(
31
- await (fetch(`http://localhost:3000${options.url}`, { // here we would need to patch the request url to include hostname.
32
- method: options.method,
33
- headers: options.headers,
34
- signal: options.abortSignal,
35
- body: JSON.stringify(options.body), // but this will not work for form-data content-type
36
- }) as any),
37
- );
38
- },
39
- };
40
- ```
14
+ ## API reference
41
15
 
42
- Then, once we have the instance of custom http client, we may instantiate the API Client instance:
16
+ Full API reference for this SDK is available at [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-query/).
43
17
 
44
- ```typescript
45
- import {
46
- SettingsObjectsClient,
47
- } from '@dynatrace-sdk/client-example';
18
+ ## Getting help
48
19
 
49
- // ...
20
+ - Visit [SDK for Typescript](https://developer.dynatrace.com/reference/sdks/) guide in the [Dynatrace Developer](https://developer.dynatrace.com/)
21
+ - Ask a question in the [Dynatrace Community](https://community.dynatrace.com/)
50
22
 
51
- const settingsObjectsClient = new SettingsObjectsClient(myHttpClient);
23
+ ## License
52
24
 
53
- const settings = await settingsObjectsClient.getSettings({});
54
- ```
25
+ This SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE for more information.
package/cjs/index.js CHANGED
@@ -2037,7 +2037,8 @@ function isGrailMetadata(value) {
2037
2037
  "locale",
2038
2038
  "executionTimeMilliseconds",
2039
2039
  "notifications",
2040
- "queryId"
2040
+ "queryId",
2041
+ "sampled"
2041
2042
  ]);
2042
2043
  const hasAdditionalProperties = false;
2043
2044
  const requiredKeys = [];
@@ -2052,7 +2053,8 @@ function isGrailMetadata(value) {
2052
2053
  "locale",
2053
2054
  "executionTimeMilliseconds",
2054
2055
  "notifications",
2055
- "queryId"
2056
+ "queryId",
2057
+ "sampled"
2056
2058
  ];
2057
2059
  const valKeys = new Set(Object.keys(value));
2058
2060
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
@@ -2080,7 +2082,8 @@ function isJson22(value) {
2080
2082
  "locale",
2081
2083
  "executionTimeMilliseconds",
2082
2084
  "notifications",
2083
- "queryId"
2085
+ "queryId",
2086
+ "sampled"
2084
2087
  ]);
2085
2088
  const hasAdditionalProperties = false;
2086
2089
  const requiredKeys = [];
@@ -2095,7 +2098,8 @@ function isJson22(value) {
2095
2098
  "locale",
2096
2099
  "executionTimeMilliseconds",
2097
2100
  "notifications",
2098
- "queryId"
2101
+ "queryId",
2102
+ "sampled"
2099
2103
  ];
2100
2104
  const valKeys = new Set(Object.keys(value));
2101
2105
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
@@ -2114,7 +2118,8 @@ function fromJson22($model) {
2114
2118
  locale,
2115
2119
  executionTimeMilliseconds,
2116
2120
  notifications,
2117
- queryId
2121
+ queryId,
2122
+ sampled
2118
2123
  } = $model;
2119
2124
  return {
2120
2125
  canonicalQuery,
@@ -2127,7 +2132,8 @@ function fromJson22($model) {
2127
2132
  locale,
2128
2133
  executionTimeMilliseconds,
2129
2134
  notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson18(innerValue)) : void 0,
2130
- queryId
2135
+ queryId,
2136
+ sampled
2131
2137
  };
2132
2138
  }
2133
2139
  function toJson22($model) {
@@ -2142,7 +2148,8 @@ function toJson22($model) {
2142
2148
  locale,
2143
2149
  executionTimeMilliseconds,
2144
2150
  notifications,
2145
- queryId
2151
+ queryId,
2152
+ sampled
2146
2153
  } = $model;
2147
2154
  return {
2148
2155
  canonicalQuery,
@@ -2155,7 +2162,8 @@ function toJson22($model) {
2155
2162
  locale,
2156
2163
  executionTimeMilliseconds,
2157
2164
  notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => toJson18(innerValue)) : void 0,
2158
- queryId
2165
+ queryId,
2166
+ sampled
2159
2167
  };
2160
2168
  }
2161
2169