@dynatrace-sdk/client-query 1.11.1 → 1.13.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 +24 -0
- package/README.md +81 -28
- package/cjs/index.js +513 -253
- package/dynatrace-metadata.json +3 -3
- package/esm/index.js +513 -253
- package/package.json +2 -2
- package/types/packages/client/query/src/lib/error-envelopes/api-client-error.d.ts +1 -0
- package/types/packages/client/query/src/lib/error-envelopes/client-request-error.d.ts +1 -0
- package/types/packages/client/query/src/lib/error-envelopes/error-envelope-error.d.ts +1 -0
- package/types/packages/client/query/src/lib/error-envelopes/invalid-response-error.d.ts +1 -0
- package/types/packages/client/query/src/lib/models/autocomplete-suggestion.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.d.ts +14 -0
- package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.transformation.d.ts +10 -0
- package/types/packages/client/query/src/lib/models/error-response-details.d.ts +20 -7
- package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts +11 -7
- package/types/packages/client/query/src/lib/models/error-response.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/error-response.transformation.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/execute-request.d.ts +2 -0
- package/types/packages/client/query/src/lib/models/execute-request.transformation.d.ts +2 -0
- package/types/packages/client/query/src/lib/models/filter-segment-variable-definition.d.ts +7 -0
- package/types/packages/client/query/src/lib/models/filter-segment-variable-definition.transformation.d.ts +9 -0
- package/types/packages/client/query/src/lib/models/filter-segment.d.ts +8 -0
- package/types/packages/client/query/src/lib/models/filter-segment.transformation.d.ts +10 -0
- package/types/packages/client/query/src/lib/models/filter-segments.d.ts +6 -0
- package/types/packages/client/query/src/lib/models/filter-segments.transformation.d.ts +6 -0
- package/types/packages/client/query/src/lib/models/index.d.ts +8 -0
- package/types/packages/client/query/src/lib/models/query-options.d.ts +1 -1
- package/types/packages/http-client/src/lib/types/abort-signal.d.ts +4 -1
- package/docs/DOCS.md +0 -1207
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace-sdk/client-query",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Exposes an API to fetch records stored in Grail.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@dynatrace-sdk/error-handlers": "^1.2.0",
|
|
8
|
-
"@dynatrace-sdk/http-client": "^1.0
|
|
8
|
+
"@dynatrace-sdk/http-client": "^1.3.0"
|
|
9
9
|
},
|
|
10
10
|
"main": "./cjs/index.js",
|
|
11
11
|
"module": "./esm/index.js",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpClientResponse } from '@dynatrace-sdk/http-client';
|
|
2
2
|
import { ApiClientError } from './api-client-error';
|
|
3
3
|
export declare class ClientRequestError<DTO> extends ApiClientError {
|
|
4
|
+
readonly isClientRequestError = true;
|
|
4
5
|
body: DTO;
|
|
5
6
|
response: HttpClientResponse;
|
|
6
7
|
constructor(name: string, response: HttpClientResponse, body: DTO, message?: string, cause?: any);
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
import { ClientRequestError } from './client-request-error';
|
|
5
5
|
import { ErrorEnvelope } from '../models';
|
|
6
6
|
export declare class ErrorEnvelopeError extends ClientRequestError<ErrorEnvelope> {
|
|
7
|
+
readonly isErrorEnvelopeError = true;
|
|
7
8
|
}
|
|
8
9
|
export declare function isErrorEnvelopeError(e: any): e is ErrorEnvelopeError;
|
|
@@ -8,7 +8,7 @@ export interface AutocompleteSuggestion {
|
|
|
8
8
|
*/
|
|
9
9
|
parts: AutocompleteSuggestionPart[];
|
|
10
10
|
/**
|
|
11
|
-
* Number of characters that the user
|
|
11
|
+
* Number of characters that the user already typed for this suggestion.
|
|
12
12
|
*/
|
|
13
13
|
alreadyTypedCharacters: number;
|
|
14
14
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ErrorResponseDetailsConstraintViolationsItem {
|
|
2
|
+
/**
|
|
3
|
+
* Message describing the error.
|
|
4
|
+
*/
|
|
5
|
+
message: string;
|
|
6
|
+
/**
|
|
7
|
+
* Describes the general location of the violating parameter.
|
|
8
|
+
*/
|
|
9
|
+
parameterLocation?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Describes the violating parameter.
|
|
12
|
+
*/
|
|
13
|
+
parameterDescriptor?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ErrorResponseDetailsConstraintViolationsItem } from './error-response-details-constraint-violations-item';
|
|
2
|
+
export interface AsJson {
|
|
3
|
+
message: string;
|
|
4
|
+
parameterLocation?: string;
|
|
5
|
+
parameterDescriptor?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function isErrorResponseDetailsConstraintViolationsItem(value: any): value is ErrorResponseDetailsConstraintViolationsItem;
|
|
8
|
+
export declare function isJson(value: any): value is AsJson;
|
|
9
|
+
export declare function fromJson($model: AsJson): ErrorResponseDetailsConstraintViolationsItem;
|
|
10
|
+
export declare function toJson($model: ErrorResponseDetailsConstraintViolationsItem): AsJson;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorResponseDetailsConstraintViolationsItem } from './error-response-details-constraint-violations-item';
|
|
1
2
|
import { TokenPosition } from './token-position';
|
|
2
3
|
/**
|
|
3
4
|
* Detailed information about the error.
|
|
@@ -6,31 +7,43 @@ export interface ErrorResponseDetails {
|
|
|
6
7
|
/**
|
|
7
8
|
* The exception type.
|
|
8
9
|
*/
|
|
9
|
-
exceptionType
|
|
10
|
+
exceptionType?: string;
|
|
10
11
|
syntaxErrorPosition?: TokenPosition;
|
|
11
12
|
/**
|
|
12
13
|
* The error type, e.g. COMMAND_NAME_MISSING
|
|
13
14
|
*/
|
|
14
|
-
errorType
|
|
15
|
+
errorType?: string;
|
|
15
16
|
/**
|
|
16
17
|
* Complete error message.
|
|
17
18
|
*/
|
|
18
|
-
errorMessage
|
|
19
|
+
errorMessage?: string;
|
|
19
20
|
/**
|
|
20
21
|
* The arguments for the message format.
|
|
21
22
|
*/
|
|
22
|
-
arguments
|
|
23
|
+
arguments?: string[];
|
|
23
24
|
/**
|
|
24
25
|
* Submitted query string.
|
|
25
26
|
*/
|
|
26
|
-
queryString
|
|
27
|
+
queryString?: string;
|
|
27
28
|
/**
|
|
28
29
|
* The corresponding DQL format specifier types for each format specifier used in the error message format.
|
|
29
30
|
*/
|
|
30
|
-
errorMessageFormatSpecifierTypes
|
|
31
|
+
errorMessageFormatSpecifierTypes?: string[];
|
|
31
32
|
/**
|
|
32
33
|
* The message format of the error message, string.format based.
|
|
33
34
|
*/
|
|
34
|
-
errorMessageFormat
|
|
35
|
+
errorMessageFormat?: string;
|
|
35
36
|
queryId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Information about an input parameter that violated some validation rule of the service API.
|
|
39
|
+
*/
|
|
40
|
+
constraintViolations?: ErrorResponseDetailsConstraintViolationsItem[];
|
|
41
|
+
/**
|
|
42
|
+
* List of missing IAM scopes necessary to successfully execute the request.
|
|
43
|
+
*/
|
|
44
|
+
missingScopes?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* List of missing IAM permissions necessary to successfully execute the request.
|
|
47
|
+
*/
|
|
48
|
+
missingPermissions?: string[];
|
|
36
49
|
}
|
package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { ErrorResponseDetails } from './error-response-details';
|
|
2
|
+
import * as _ErrorResponseDetailsConstraintViolationsItemTransformation from './error-response-details-constraint-violations-item.transformation';
|
|
2
3
|
import * as _TokenPositionTransformation from './token-position.transformation';
|
|
3
4
|
export interface AsJson {
|
|
4
|
-
exceptionType
|
|
5
|
+
exceptionType?: string;
|
|
5
6
|
syntaxErrorPosition?: _TokenPositionTransformation.AsJson;
|
|
6
|
-
errorType
|
|
7
|
-
errorMessage
|
|
8
|
-
arguments
|
|
9
|
-
queryString
|
|
10
|
-
errorMessageFormatSpecifierTypes
|
|
11
|
-
errorMessageFormat
|
|
7
|
+
errorType?: string;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
arguments?: string[];
|
|
10
|
+
queryString?: string;
|
|
11
|
+
errorMessageFormatSpecifierTypes?: string[];
|
|
12
|
+
errorMessageFormat?: string;
|
|
12
13
|
queryId?: string;
|
|
14
|
+
constraintViolations?: _ErrorResponseDetailsConstraintViolationsItemTransformation.AsJson[];
|
|
15
|
+
missingScopes?: string[];
|
|
16
|
+
missingPermissions?: string[];
|
|
13
17
|
}
|
|
14
18
|
export declare function isErrorResponseDetails(value: any): value is ErrorResponseDetails;
|
|
15
19
|
export declare function isJson(value: any): value is AsJson;
|
|
@@ -2,7 +2,7 @@ import { ErrorResponse } from './error-response';
|
|
|
2
2
|
import * as _ErrorResponseDetailsTransformation from './error-response-details.transformation';
|
|
3
3
|
export interface AsJson {
|
|
4
4
|
message: string;
|
|
5
|
-
details
|
|
5
|
+
details?: _ErrorResponseDetailsTransformation.AsJson;
|
|
6
6
|
code: number;
|
|
7
7
|
}
|
|
8
8
|
export declare function isErrorResponse(value: any): value is ErrorResponse;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FilterSegments } from './filter-segments';
|
|
1
2
|
import { QueryOptions } from './query-options';
|
|
2
3
|
export interface ExecuteRequest {
|
|
3
4
|
/**
|
|
@@ -49,4 +50,5 @@ export interface ExecuteRequest {
|
|
|
49
50
|
*/
|
|
50
51
|
defaultScanLimitGbytes?: number;
|
|
51
52
|
queryOptions?: QueryOptions;
|
|
53
|
+
filterSegments?: FilterSegments;
|
|
52
54
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExecuteRequest } from './execute-request';
|
|
2
|
+
import * as _FilterSegmentsTransformation from './filter-segments.transformation';
|
|
2
3
|
import * as _QueryOptionsTransformation from './query-options.transformation';
|
|
3
4
|
export interface AsJson {
|
|
4
5
|
query: string;
|
|
@@ -14,6 +15,7 @@ export interface AsJson {
|
|
|
14
15
|
defaultSamplingRatio?: number;
|
|
15
16
|
defaultScanLimitGbytes?: number;
|
|
16
17
|
queryOptions?: _QueryOptionsTransformation.AsJson;
|
|
18
|
+
filterSegments?: _FilterSegmentsTransformation.AsJson;
|
|
17
19
|
}
|
|
18
20
|
export declare function isExecuteRequest(value: any): value is ExecuteRequest;
|
|
19
21
|
export declare function isJson(value: any): value is AsJson;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilterSegmentVariableDefinition } from './filter-segment-variable-definition';
|
|
2
|
+
export interface AsJson {
|
|
3
|
+
name: string;
|
|
4
|
+
values: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function isFilterSegmentVariableDefinition(value: any): value is FilterSegmentVariableDefinition;
|
|
7
|
+
export declare function isJson(value: any): value is AsJson;
|
|
8
|
+
export declare function fromJson($model: AsJson): FilterSegmentVariableDefinition;
|
|
9
|
+
export declare function toJson($model: FilterSegmentVariableDefinition): AsJson;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilterSegmentVariableDefinition } from './filter-segment-variable-definition';
|
|
2
|
+
/**
|
|
3
|
+
* A filter segment is identified by an ID. Each segment includes a list of variable definitions.
|
|
4
|
+
*/
|
|
5
|
+
export interface FilterSegment {
|
|
6
|
+
id: string;
|
|
7
|
+
variables?: FilterSegmentVariableDefinition[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FilterSegment } from './filter-segment';
|
|
2
|
+
import * as _FilterSegmentVariableDefinitionTransformation from './filter-segment-variable-definition.transformation';
|
|
3
|
+
export interface AsJson {
|
|
4
|
+
id: string;
|
|
5
|
+
variables?: _FilterSegmentVariableDefinitionTransformation.AsJson[];
|
|
6
|
+
}
|
|
7
|
+
export declare function isFilterSegment(value: any): value is FilterSegment;
|
|
8
|
+
export declare function isJson(value: any): value is AsJson;
|
|
9
|
+
export declare function fromJson($model: AsJson): FilterSegment;
|
|
10
|
+
export declare function toJson($model: FilterSegment): AsJson;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as _FilterSegmentTransformation from './filter-segment.transformation';
|
|
2
|
+
import { FilterSegments } from './filter-segments';
|
|
3
|
+
export interface AsJson extends Array<_FilterSegmentTransformation.AsJson> {
|
|
4
|
+
}
|
|
5
|
+
export declare function fromJson($model: AsJson): FilterSegments;
|
|
6
|
+
export declare function toJson($model: FilterSegments): AsJson;
|
|
@@ -22,12 +22,20 @@ export * from './error-response';
|
|
|
22
22
|
export * as _ErrorResponseTransformation from './error-response.transformation';
|
|
23
23
|
export * from './error-response-details';
|
|
24
24
|
export * as _ErrorResponseDetailsTransformation from './error-response-details.transformation';
|
|
25
|
+
export * from './error-response-details-constraint-violations-item';
|
|
26
|
+
export * as _ErrorResponseDetailsConstraintViolationsItemTransformation from './error-response-details-constraint-violations-item.transformation';
|
|
25
27
|
export * from './execute-request';
|
|
26
28
|
export * as _ExecuteRequestTransformation from './execute-request.transformation';
|
|
27
29
|
export * from './field-type';
|
|
28
30
|
export * as _FieldTypeTransformation from './field-type.transformation';
|
|
29
31
|
export * from './field-type-type';
|
|
30
32
|
export * as _FieldTypeTypeTransformation from './field-type-type.transformation';
|
|
33
|
+
export * from './filter-segment';
|
|
34
|
+
export * as _FilterSegmentTransformation from './filter-segment.transformation';
|
|
35
|
+
export * from './filter-segment-variable-definition';
|
|
36
|
+
export * as _FilterSegmentVariableDefinitionTransformation from './filter-segment-variable-definition.transformation';
|
|
37
|
+
export * from './filter-segments';
|
|
38
|
+
export * as _FilterSegmentsTransformation from './filter-segments.transformation';
|
|
31
39
|
export * from './geo-point';
|
|
32
40
|
export * as _GeoPointTransformation from './geo-point.transformation';
|
|
33
41
|
export * from './grail-metadata';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents a signal object that allows to communicate with the request and abort it using the `AbortController`.
|
|
3
|
+
* @deprecated Will be removed from HttpClient. We encourage using native interface for AbortSignal.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
+
interface HttpClientAbortSignal extends EventTarget {
|
|
5
6
|
readonly reason: any;
|
|
6
7
|
throwIfAborted(): void;
|
|
7
8
|
/**
|
|
@@ -13,3 +14,5 @@ export interface AbortSignal extends EventTarget {
|
|
|
13
14
|
*/
|
|
14
15
|
onabort: ((this: AbortSignal, event: Event) => void) | null;
|
|
15
16
|
}
|
|
17
|
+
export type AbortSignal = HttpClientAbortSignal | globalThis.AbortSignal;
|
|
18
|
+
export {};
|