@dynatrace-sdk/client-query 1.5.0 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-query",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "Exposes an API to fetch records stored in Grail.",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -13,7 +13,7 @@ export declare class QueryAssistanceClient {
13
13
  /**
14
14
  * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a QueryAssistanceClient. Custom http client should implement {HttpClient} interface.
15
15
  * @example
16
- * const queryClientNodeJs = new QueryClient(yourCustomImplementation);
16
+ * const queryAssistanceClientNodeJs = new QueryAssistanceClient(yourCustomImplementation);
17
17
  */
18
18
  constructor(httpClientImplementation: HttpClient);
19
19
  /**
@@ -10,7 +10,7 @@ export declare class QueryExecutionClient {
10
10
  /**
11
11
  * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a QueryExecutionClient. Custom http client should implement {HttpClient} interface.
12
12
  * @example
13
- * const queryClientNodeJs = new QueryClient(yourCustomImplementation);
13
+ * const queryExecutionClientNodeJs = new QueryExecutionClient(yourCustomImplementation);
14
14
  */
15
15
  constructor(httpClientImplementation: HttpClient);
16
16
  /**
@@ -170,6 +170,7 @@ export declare class QueryExecutionClient {
170
170
  */
171
171
  queryCancel(config: {
172
172
  /** The request-token of the query. */ requestToken: string;
173
+ /** If set additional data will be available in the metadata section. */ enrich?: string;
173
174
  abortSignal?: AbortSignal;
174
175
  }): Promise<QueryPollResponse | void>;
175
176
  }
@@ -3,7 +3,8 @@ import { ErrorType } from '@dynatrace-sdk/error-handlers';
3
3
  * Error base. All client errors should extend this class.
4
4
  */
5
5
  export declare class ApiClientError extends Error {
6
+ readonly cause?: any;
6
7
  errorType: ErrorType;
7
- constructor(name: string, message?: string);
8
+ constructor(name: string, message?: string, cause?: any);
8
9
  }
9
10
  export declare function isApiClientError(e: any): e is ApiClientError;
@@ -3,6 +3,6 @@ import { ApiClientError } from './api-client-error';
3
3
  export declare class ClientRequestError<DTO> extends ApiClientError {
4
4
  body: DTO;
5
5
  response: HttpClientResponse;
6
- constructor(name: string, response: HttpClientResponse, body: DTO, message?: string);
6
+ constructor(name: string, response: HttpClientResponse, body: DTO, message?: string, cause?: any);
7
7
  }
8
8
  export declare function isClientRequestError<DTO>(e: any): e is ClientRequestError<DTO>;
@@ -11,5 +11,6 @@ export declare enum FieldTypeType {
11
11
  GeoPoint = "geo_point",
12
12
  Array = "array",
13
13
  Record = "record",
14
+ Uid = "uid",
14
15
  Undefined = "undefined"
15
16
  }
@@ -38,5 +38,6 @@ export declare enum TokenType {
38
38
  TimestampValue = "TIMESTAMP_VALUE",
39
39
  MetricKey = "METRIC_KEY",
40
40
  Variable = "VARIABLE",
41
- EndComment = "END_COMMENT"
41
+ EndComment = "END_COMMENT",
42
+ UidValue = "UID_VALUE"
42
43
  }
@@ -1,2 +1,2 @@
1
- export { AbortController, AbortSignal, BaseError, Binary, BinaryFormDataRequestField, BinaryFormDataResponseField, DataTypeError, DataTypes, FormDataRequestBody, FormDataRequestField, FormDataResponseBody, FormDataResponseField, Headers, HttpClient, HttpClientAbortError, HttpClientNetworkError, HttpClientRequestError, HttpClientRequestOptions, HttpClientResponse, HttpClientResponseError, JsonFormDataRequestField, RequestBodyTypes, ResponseBodyTypes, StatusValidator, TextFormDataRequestField, TextFormDataResponseField, UnsupportedOperationError, } from './lib/types';
1
+ export { AbortController, AbortSignal, BaseError, Binary, BinaryFormDataRequestField, BinaryFormDataResponseField, DataTypeError, DataTypes, FormDataRequestBody, FormDataRequestField, FormDataResponseBody, FormDataResponseField, Headers, HttpClient, HttpClientAbortError, HttpClientNetworkError, HttpClientRequestError, HttpClientRequestOptions, HttpClientResponse, HttpClientResponseError, JsonFormDataRequestField, RequestBodyTypes, ResponseBodyTypes, StatusValidator, TextFormDataRequestField, TextFormDataResponseField, UnsupportedOperationError, isHttpClientResponseError, isHttpClientAbortError, isHttpClientNetworkError, isHttpClientRequestError, } from './lib/types';
2
2
  export { AbortController as PlatformAbortController, AbortSignal as PlatformAbortSignal, BaseError as PlatformBaseError, Binary as PlatformBinary, DataTypeError as PlatformDataTypeError, HttpClient as PlatformHttpClient, HttpClientAbortError as PlatformHttpClientAbortError, HttpClientRequestError as PlatformHttpClientRequestError, HttpClientResponse as PlatformHttpClientResponse, HttpClientResponseError as PlatformHttpClientResponseError, UnsupportedOperationError as PlatformUnsupportedOperationError, httpClient, } from './lib/platform';
@@ -4,5 +4,8 @@ import { BaseError } from './base-error';
4
4
  export declare class HttpClientResponseError extends BaseError implements types.HttpClientResponseError {
5
5
  readonly name = "ResponseError";
6
6
  readonly response: HttpClientResponse;
7
- constructor(response: Response);
7
+ readonly requestMethod?: string;
8
+ constructor(response: Response, data?: {
9
+ requestMethod?: string;
10
+ });
8
11
  }
@@ -12,3 +12,4 @@ export interface HttpClientAbortError extends BaseError {
12
12
  */
13
13
  readonly cause?: any;
14
14
  }
15
+ export declare function isHttpClientAbortError(e: any): e is HttpClientAbortError;
@@ -12,3 +12,4 @@ export interface HttpClientNetworkError extends BaseError {
12
12
  */
13
13
  readonly cause?: any;
14
14
  }
15
+ export declare function isHttpClientNetworkError(e: any): e is HttpClientNetworkError;
@@ -12,3 +12,4 @@ export interface HttpClientRequestError extends BaseError {
12
12
  */
13
13
  readonly cause?: any;
14
14
  }
15
+ export declare function isHttpClientRequestError(e: any): e is HttpClientRequestError;
@@ -17,3 +17,4 @@ export interface HttpClientResponseError extends BaseError {
17
17
  */
18
18
  readonly response: HttpClientResponse;
19
19
  }
20
+ export declare function isHttpClientResponseError(e: any): e is HttpClientResponseError;
@@ -8,4 +8,6 @@ export interface CommonSerializedError {
8
8
  stack?: string;
9
9
  type: ErrorType.COMMON;
10
10
  errorRef?: string;
11
+ cause?: any;
12
+ details?: any;
11
13
  }
@@ -8,6 +8,9 @@ export interface HttpSerializedError {
8
8
  stack?: string;
9
9
  type: ErrorType.HTTP;
10
10
  status: number;
11
+ /** @deprecated */
11
12
  body?: unknown;
12
13
  errorRef?: string;
14
+ cause?: any;
15
+ details?: any;
13
16
  }