@dynatrace-sdk/client-query 1.0.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 +9 -0
- package/LICENSE +174 -0
- package/README.md +54 -0
- package/cjs/index.js +1788 -0
- package/docs/DOCS.md +2833 -0
- package/dynatrace-metadata.json +18 -0
- package/esm/index.js +1766 -0
- package/package.json +11 -0
- package/types/index.d.ts +1 -0
- package/types/packages/client/query/src/index.d.ts +1 -0
- package/types/packages/client/query/src/lib/apis/index.d.ts +2 -0
- package/types/packages/client/query/src/lib/apis/query-assistance-api.d.ts +276 -0
- package/types/packages/client/query/src/lib/apis/query-execution-api.d.ts +337 -0
- package/types/packages/client/query/src/lib/error-envelopes/api-client-error.d.ts +9 -0
- package/types/packages/client/query/src/lib/error-envelopes/client-request-error.d.ts +8 -0
- package/types/packages/client/query/src/lib/error-envelopes/error-envelope-error.d.ts +8 -0
- package/types/packages/client/query/src/lib/error-envelopes/error-serializer.d.ts +3 -0
- package/types/packages/client/query/src/lib/error-envelopes/index.d.ts +3 -0
- package/types/packages/client/query/src/lib/error-envelopes/invalid-response-error.d.ts +8 -0
- package/types/packages/client/query/src/lib/index.d.ts +3 -0
- package/types/packages/client/query/src/lib/models/autocomplete-request.d.ts +26 -0
- package/types/packages/client/query/src/lib/models/autocomplete-response.d.ts +28 -0
- package/types/packages/client/query/src/lib/models/autocomplete-suggestion-part.d.ts +30 -0
- package/types/packages/client/query/src/lib/models/autocomplete-suggestion.d.ts +28 -0
- package/types/packages/client/query/src/lib/models/dql-alternative-node.d.ts +18 -0
- package/types/packages/client/query/src/lib/models/dql-container-node.d.ts +23 -0
- package/types/packages/client/query/src/lib/models/dql-node-node-type.d.ts +14 -0
- package/types/packages/client/query/src/lib/models/dql-node.d.ts +29 -0
- package/types/packages/client/query/src/lib/models/dql-terminal-node.d.ts +26 -0
- package/types/packages/client/query/src/lib/models/error-envelope.d.ts +18 -0
- package/types/packages/client/query/src/lib/models/error-response-details.d.ts +50 -0
- package/types/packages/client/query/src/lib/models/error-response.d.ts +25 -0
- package/types/packages/client/query/src/lib/models/execute-request.d.ts +64 -0
- package/types/packages/client/query/src/lib/models/field-type-type.d.ts +21 -0
- package/types/packages/client/query/src/lib/models/field-type.d.ts +18 -0
- package/types/packages/client/query/src/lib/models/geo-point.d.ts +22 -0
- package/types/packages/client/query/src/lib/models/grail-metadata.d.ts +66 -0
- package/types/packages/client/query/src/lib/models/index.d.ts +35 -0
- package/types/packages/client/query/src/lib/models/metadata-notification.d.ts +45 -0
- package/types/packages/client/query/src/lib/models/metadata.d.ts +18 -0
- package/types/packages/client/query/src/lib/models/metric-metadata.d.ts +32 -0
- package/types/packages/client/query/src/lib/models/parse-request.d.ts +24 -0
- package/types/packages/client/query/src/lib/models/position-info.d.ts +27 -0
- package/types/packages/client/query/src/lib/models/query-poll-response.d.ts +28 -0
- package/types/packages/client/query/src/lib/models/query-result.d.ts +27 -0
- package/types/packages/client/query/src/lib/models/query-start-response.d.ts +33 -0
- package/types/packages/client/query/src/lib/models/query-state.d.ts +17 -0
- package/types/packages/client/query/src/lib/models/ranged-field-types-mappings.d.ts +15 -0
- package/types/packages/client/query/src/lib/models/ranged-field-types.d.ts +20 -0
- package/types/packages/client/query/src/lib/models/result-record-value.d.ts +13 -0
- package/types/packages/client/query/src/lib/models/result-record.d.ts +15 -0
- package/types/packages/client/query/src/lib/models/timeframe.d.ts +22 -0
- package/types/packages/client/query/src/lib/models/token-position.d.ts +20 -0
- package/types/packages/client/query/src/lib/models/token-type.d.ts +48 -0
- package/types/packages/client/query/src/lib/models/verify-request.d.ts +24 -0
- package/types/packages/client/query/src/lib/models/verify-response.d.ts +23 -0
- package/types/packages/client/query/src/lib/utils/url-helpers.d.ts +3 -0
- package/types/packages/http-client/src/index.d.ts +2 -0
- package/types/packages/http-client/src/lib/platform/abort-controller.d.ts +6 -0
- package/types/packages/http-client/src/lib/platform/abort-signal.d.ts +6 -0
- package/types/packages/http-client/src/lib/platform/apply-content-type-header.d.ts +2 -0
- package/types/packages/http-client/src/lib/platform/base-error.d.ts +5 -0
- package/types/packages/http-client/src/lib/platform/binary.d.ts +13 -0
- package/types/packages/http-client/src/lib/platform/data-type-error.d.ts +6 -0
- package/types/packages/http-client/src/lib/platform/decode-response-body.d.ts +3 -0
- package/types/packages/http-client/src/lib/platform/default-status-validator.d.ts +2 -0
- package/types/packages/http-client/src/lib/platform/encode-request-body.d.ts +2 -0
- package/types/packages/http-client/src/lib/platform/http-client-abort-error.d.ts +7 -0
- package/types/packages/http-client/src/lib/platform/http-client-request-error.d.ts +7 -0
- package/types/packages/http-client/src/lib/platform/http-client-response-error-serializer.d.ts +1 -0
- package/types/packages/http-client/src/lib/platform/http-client-response-error.d.ts +8 -0
- package/types/packages/http-client/src/lib/platform/http-client-response.d.ts +10 -0
- package/types/packages/http-client/src/lib/platform/http-client.d.ts +5 -0
- package/types/packages/http-client/src/lib/platform/index.d.ts +11 -0
- package/types/packages/http-client/src/lib/platform/unsupported-operation-error.d.ts +6 -0
- package/types/packages/http-client/src/lib/types/abort-controller.d.ts +14 -0
- package/types/packages/http-client/src/lib/types/abort-signal.d.ts +15 -0
- package/types/packages/http-client/src/lib/types/base-error.d.ts +4 -0
- package/types/packages/http-client/src/lib/types/binary.d.ts +15 -0
- package/types/packages/http-client/src/lib/types/data-type-error.d.ts +14 -0
- package/types/packages/http-client/src/lib/types/data-types.d.ts +36 -0
- package/types/packages/http-client/src/lib/types/form-data-request-body.d.ts +83 -0
- package/types/packages/http-client/src/lib/types/form-data-response-body.d.ts +15 -0
- package/types/packages/http-client/src/lib/types/headers.d.ts +6 -0
- package/types/packages/http-client/src/lib/types/http-client-abort-error.d.ts +14 -0
- package/types/packages/http-client/src/lib/types/http-client-network-error.d.ts +14 -0
- package/types/packages/http-client/src/lib/types/http-client-request-error.d.ts +14 -0
- package/types/packages/http-client/src/lib/types/http-client-request-options.d.ts +42 -0
- package/types/packages/http-client/src/lib/types/http-client-response-error.d.ts +19 -0
- package/types/packages/http-client/src/lib/types/http-client-response.d.ts +33 -0
- package/types/packages/http-client/src/lib/types/http-client.d.ts +24 -0
- package/types/packages/http-client/src/lib/types/index.d.ts +20 -0
- package/types/packages/http-client/src/lib/types/request-body-types.d.ts +26 -0
- package/types/packages/http-client/src/lib/types/response-body-types.d.ts +46 -0
- package/types/packages/http-client/src/lib/types/status-validator.d.ts +7 -0
- package/types/packages/http-client/src/lib/types/unsupported-operation-error.d.ts +14 -0
- package/types/packages/platform/error-handlers/src/index.d.ts +2 -0
- package/types/packages/platform/error-handlers/src/lib/add-global-error-serializer.d.ts +13 -0
- package/types/packages/platform/error-handlers/src/lib/types/common-serialized-error.d.ts +10 -0
- package/types/packages/platform/error-handlers/src/lib/types/dt-runtime-error-handlers.d.ts +5 -0
- package/types/packages/platform/error-handlers/src/lib/types/error-type.d.ts +9 -0
- package/types/packages/platform/error-handlers/src/lib/types/global-dt-runtime-with-error-handlers.d.ts +7 -0
- package/types/packages/platform/error-handlers/src/lib/types/global-error-serializer.d.ts +10 -0
- package/types/packages/platform/error-handlers/src/lib/types/http-serialized-error.d.ts +11 -0
- package/types/packages/platform/error-handlers/src/lib/types/index.d.ts +6 -0
- package/types/packages/platform/error-handlers/src/lib/types/serialized-error.d.ts +8 -0
- package/types/packages/platform/shared/index.d.ts +1 -0
- package/types/packages/platform/shared/utils/get-global-with-dt-runtime.d.ts +1 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApiClientError } from './api-client-error';
|
|
2
|
+
export declare class InvalidResponseError extends ApiClientError {
|
|
3
|
+
responseBody: any;
|
|
4
|
+
expectedType?: string;
|
|
5
|
+
nestedError?: Error;
|
|
6
|
+
constructor(name: string, nestedError: Error | any | undefined, body: any, expectedType?: string, message?: string);
|
|
7
|
+
}
|
|
8
|
+
export declare function isInvalidResponseError(e: any): e is InvalidResponseError;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface AutocompleteRequest {
|
|
2
|
+
/**
|
|
3
|
+
* The full query string.
|
|
4
|
+
*/
|
|
5
|
+
query: string;
|
|
6
|
+
cursorPosition?: number;
|
|
7
|
+
/**
|
|
8
|
+
* 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'
|
|
9
|
+
*/
|
|
10
|
+
timezone?: string;
|
|
11
|
+
/**
|
|
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
|
+
*/
|
|
14
|
+
locale?: string;
|
|
15
|
+
}
|
|
16
|
+
/** @ignore */
|
|
17
|
+
export declare namespace _AutocompleteRequestTransformation {
|
|
18
|
+
interface AsJson {
|
|
19
|
+
query: string;
|
|
20
|
+
cursorPosition?: number;
|
|
21
|
+
timezone?: string;
|
|
22
|
+
locale?: string;
|
|
23
|
+
}
|
|
24
|
+
function fromJson(model: AsJson): AutocompleteRequest;
|
|
25
|
+
function toJson(model: AutocompleteRequest): AsJson;
|
|
26
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AutocompleteSuggestion, _AutocompleteSuggestionTransformation } from './autocomplete-suggestion';
|
|
2
|
+
/**
|
|
3
|
+
* The response of the autocomplete call.
|
|
4
|
+
*/
|
|
5
|
+
export interface AutocompleteResponse {
|
|
6
|
+
/**
|
|
7
|
+
* True if the suggestions are optional.
|
|
8
|
+
*/
|
|
9
|
+
optional: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The list of suggestions.
|
|
12
|
+
*/
|
|
13
|
+
suggestions: AutocompleteSuggestion[];
|
|
14
|
+
/**
|
|
15
|
+
* Suggested duration in seconds, for how long the response may be cached and reused by the client. It is derived from the volatility of the suggestions on the server (if the suggestions are static, how long the server will cache the volatile suggestions, ...). If not provided, then the result may be cached for long time. Value below 1 means that the result should not be cached.
|
|
16
|
+
*/
|
|
17
|
+
suggestedTtlSeconds?: number;
|
|
18
|
+
}
|
|
19
|
+
/** @ignore */
|
|
20
|
+
export declare namespace _AutocompleteResponseTransformation {
|
|
21
|
+
interface AsJson {
|
|
22
|
+
optional: boolean;
|
|
23
|
+
suggestions: _AutocompleteSuggestionTransformation.AsJson[];
|
|
24
|
+
suggestedTtlSeconds?: number;
|
|
25
|
+
}
|
|
26
|
+
function fromJson(model: AsJson): AutocompleteResponse;
|
|
27
|
+
function toJson(model: AutocompleteResponse): AsJson;
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TokenType, _TokenTypeTransformation } from './token-type';
|
|
2
|
+
/**
|
|
3
|
+
* Part of the suggestion.
|
|
4
|
+
*/
|
|
5
|
+
export interface AutocompleteSuggestionPart {
|
|
6
|
+
type: TokenType;
|
|
7
|
+
/**
|
|
8
|
+
* The type of the suggestion.
|
|
9
|
+
*/
|
|
10
|
+
info?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The synopsis of the suggestion.
|
|
13
|
+
*/
|
|
14
|
+
synopsis?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The suggested continuation of the query.
|
|
17
|
+
*/
|
|
18
|
+
suggestion: string;
|
|
19
|
+
}
|
|
20
|
+
/** @ignore */
|
|
21
|
+
export declare namespace _AutocompleteSuggestionPartTransformation {
|
|
22
|
+
interface AsJson {
|
|
23
|
+
type: _TokenTypeTransformation.AsJson;
|
|
24
|
+
info?: string;
|
|
25
|
+
synopsis?: string;
|
|
26
|
+
suggestion: string;
|
|
27
|
+
}
|
|
28
|
+
function fromJson(model: AsJson): AutocompleteSuggestionPart;
|
|
29
|
+
function toJson(model: AutocompleteSuggestionPart): AsJson;
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AutocompleteSuggestionPart, _AutocompleteSuggestionPartTransformation } from './autocomplete-suggestion-part';
|
|
2
|
+
/**
|
|
3
|
+
* Single suggestion for completion of the query.
|
|
4
|
+
*/
|
|
5
|
+
export interface AutocompleteSuggestion {
|
|
6
|
+
/**
|
|
7
|
+
* List of suggestion parts.
|
|
8
|
+
*/
|
|
9
|
+
parts: AutocompleteSuggestionPart[];
|
|
10
|
+
/**
|
|
11
|
+
* Number of characters that the user user already typed for this suggestion.
|
|
12
|
+
*/
|
|
13
|
+
alreadyTypedCharacters: number;
|
|
14
|
+
/**
|
|
15
|
+
* The suggested continuation of the query.
|
|
16
|
+
*/
|
|
17
|
+
suggestion: string;
|
|
18
|
+
}
|
|
19
|
+
/** @ignore */
|
|
20
|
+
export declare namespace _AutocompleteSuggestionTransformation {
|
|
21
|
+
interface AsJson {
|
|
22
|
+
parts: _AutocompleteSuggestionPartTransformation.AsJson[];
|
|
23
|
+
alreadyTypedCharacters: number;
|
|
24
|
+
suggestion: string;
|
|
25
|
+
}
|
|
26
|
+
function fromJson(model: AsJson): AutocompleteSuggestion;
|
|
27
|
+
function toJson(model: AutocompleteSuggestion): AsJson;
|
|
28
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DQLNode, _DQLNodeTransformation } from './dql-node';
|
|
2
|
+
/**
|
|
3
|
+
* The DQL node that has alternatives.
|
|
4
|
+
*/
|
|
5
|
+
export interface DQLAlternativeNode extends DQLNode {
|
|
6
|
+
/**
|
|
7
|
+
* The different alternatives.
|
|
8
|
+
*/
|
|
9
|
+
alternatives?: object;
|
|
10
|
+
}
|
|
11
|
+
/** @ignore */
|
|
12
|
+
export declare namespace _DQLAlternativeNodeTransformation {
|
|
13
|
+
interface AsJson extends _DQLNodeTransformation.AsJson {
|
|
14
|
+
alternatives?: object;
|
|
15
|
+
}
|
|
16
|
+
function fromJson(model: AsJson): DQLAlternativeNode;
|
|
17
|
+
function toJson(model: DQLAlternativeNode): AsJson;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DQLNode, _DQLNodeTransformation } from './dql-node';
|
|
2
|
+
/**
|
|
3
|
+
* The DQL node that contains other nodes.
|
|
4
|
+
*/
|
|
5
|
+
export interface DQLContainerNode extends DQLNode {
|
|
6
|
+
/**
|
|
7
|
+
* The type of the node.
|
|
8
|
+
*/
|
|
9
|
+
type?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The list of children nodes.
|
|
12
|
+
*/
|
|
13
|
+
children?: DQLNode[];
|
|
14
|
+
}
|
|
15
|
+
/** @ignore */
|
|
16
|
+
export declare namespace _DQLContainerNodeTransformation {
|
|
17
|
+
interface AsJson extends _DQLNodeTransformation.AsJson {
|
|
18
|
+
type?: string;
|
|
19
|
+
children?: _DQLNodeTransformation.AsJson[];
|
|
20
|
+
}
|
|
21
|
+
function fromJson(model: AsJson): DQLContainerNode;
|
|
22
|
+
function toJson(model: DQLContainerNode): AsJson;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The type of the node.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum DQLNodeNodeType {
|
|
5
|
+
Terminal = "TERMINAL",
|
|
6
|
+
Container = "CONTAINER",
|
|
7
|
+
Alternative = "ALTERNATIVE"
|
|
8
|
+
}
|
|
9
|
+
/** @ignore */
|
|
10
|
+
export declare namespace _DQLNodeNodeTypeTransformation {
|
|
11
|
+
type AsJson = DQLNodeNodeType;
|
|
12
|
+
const toJson: (value: DQLNodeNodeType) => AsJson;
|
|
13
|
+
const fromJson: (value: AsJson) => DQLNodeNodeType;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DQLAlternativeNode } from './dql-alternative-node';
|
|
2
|
+
import { DQLContainerNode } from './dql-container-node';
|
|
3
|
+
import { DQLNodeNodeType, _DQLNodeNodeTypeTransformation } from './dql-node-node-type';
|
|
4
|
+
import { DQLTerminalNode } from './dql-terminal-node';
|
|
5
|
+
import { TokenPosition, _TokenPositionTransformation } from './token-position';
|
|
6
|
+
/**
|
|
7
|
+
* General Node in the DQL query.
|
|
8
|
+
*/
|
|
9
|
+
export interface DQLNode {
|
|
10
|
+
nodeType: DQLNodeNodeType;
|
|
11
|
+
tokenPosition?: TokenPosition;
|
|
12
|
+
/**
|
|
13
|
+
* True if the node is optional.
|
|
14
|
+
*/
|
|
15
|
+
isOptional: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** @ignore */
|
|
18
|
+
export declare namespace _DQLNodeTransformation {
|
|
19
|
+
function isDqlTerminalNode(model: DQLNode): model is DQLTerminalNode;
|
|
20
|
+
function isDqlContainerNode(model: DQLNode): model is DQLContainerNode;
|
|
21
|
+
function isDqlAlternativeNode(model: DQLNode): model is DQLAlternativeNode;
|
|
22
|
+
interface AsJson {
|
|
23
|
+
nodeType: _DQLNodeNodeTypeTransformation.AsJson;
|
|
24
|
+
tokenPosition?: _TokenPositionTransformation.AsJson;
|
|
25
|
+
isOptional: boolean;
|
|
26
|
+
}
|
|
27
|
+
function fromJson(model: AsJson, includeChildProps?: boolean): DQLNode;
|
|
28
|
+
function toJson(model: DQLNode, includeChildProps?: boolean): AsJson;
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DQLNode, _DQLNodeTransformation } from './dql-node';
|
|
2
|
+
import { TokenType, _TokenTypeTransformation } from './token-type';
|
|
3
|
+
/**
|
|
4
|
+
* Node that represents single token.
|
|
5
|
+
*/
|
|
6
|
+
export interface DQLTerminalNode extends DQLNode {
|
|
7
|
+
type?: TokenType;
|
|
8
|
+
/**
|
|
9
|
+
* For optional items only: whether this node becomes mandatory when user order is used. True only for some optional 'ghost braces'
|
|
10
|
+
*/
|
|
11
|
+
isMandatoryOnUserOrder?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Canonical form.
|
|
14
|
+
*/
|
|
15
|
+
canonicalString?: string;
|
|
16
|
+
}
|
|
17
|
+
/** @ignore */
|
|
18
|
+
export declare namespace _DQLTerminalNodeTransformation {
|
|
19
|
+
interface AsJson extends _DQLNodeTransformation.AsJson {
|
|
20
|
+
type?: _TokenTypeTransformation.AsJson;
|
|
21
|
+
isMandatoryOnUserOrder?: boolean;
|
|
22
|
+
canonicalString?: string;
|
|
23
|
+
}
|
|
24
|
+
function fromJson(model: AsJson): DQLTerminalNode;
|
|
25
|
+
function toJson(model: DQLTerminalNode): AsJson;
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormDataRequestBody, FormDataResponseBody } from '@dynatrace-sdk/http-client';
|
|
2
|
+
import { ErrorResponse, _ErrorResponseTransformation } from './error-response';
|
|
3
|
+
/**
|
|
4
|
+
* An 'envelope' error object that has the mandatory error object.
|
|
5
|
+
*/
|
|
6
|
+
export interface ErrorEnvelope {
|
|
7
|
+
error: ErrorResponse;
|
|
8
|
+
}
|
|
9
|
+
/** @ignore */
|
|
10
|
+
export declare namespace _ErrorEnvelopeTransformation {
|
|
11
|
+
interface AsJson {
|
|
12
|
+
error: _ErrorResponseTransformation.AsJson;
|
|
13
|
+
}
|
|
14
|
+
function fromJson(model: AsJson): ErrorEnvelope;
|
|
15
|
+
function toJson(model: ErrorEnvelope): AsJson;
|
|
16
|
+
function fromFormData(formData: FormDataResponseBody): ErrorEnvelope;
|
|
17
|
+
function toFormData(model: ErrorEnvelope): FormDataRequestBody;
|
|
18
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { TokenPosition, _TokenPositionTransformation } from './token-position';
|
|
2
|
+
/**
|
|
3
|
+
* Detailed information about the error.
|
|
4
|
+
*/
|
|
5
|
+
export interface ErrorResponseDetails {
|
|
6
|
+
/**
|
|
7
|
+
* The exception type.
|
|
8
|
+
*/
|
|
9
|
+
exceptionType: string;
|
|
10
|
+
syntaxErrorPosition?: TokenPosition;
|
|
11
|
+
/**
|
|
12
|
+
* The error type, e.g. COMMAND_NAME_MISSING
|
|
13
|
+
*/
|
|
14
|
+
errorType: string;
|
|
15
|
+
/**
|
|
16
|
+
* Complete error message.
|
|
17
|
+
*/
|
|
18
|
+
errorMessage: string;
|
|
19
|
+
/**
|
|
20
|
+
* The arguments for the message format.
|
|
21
|
+
*/
|
|
22
|
+
arguments: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Submitted query string.
|
|
25
|
+
*/
|
|
26
|
+
queryString: string;
|
|
27
|
+
/**
|
|
28
|
+
* The corresponding DQL format specifier types for each format specifier used in the error message format.
|
|
29
|
+
*/
|
|
30
|
+
errorMessageFormatSpecifierTypes: string[];
|
|
31
|
+
/**
|
|
32
|
+
* The message format of the error message, string.format based.
|
|
33
|
+
*/
|
|
34
|
+
errorMessageFormat: string;
|
|
35
|
+
}
|
|
36
|
+
/** @ignore */
|
|
37
|
+
export declare namespace _ErrorResponseDetailsTransformation {
|
|
38
|
+
interface AsJson {
|
|
39
|
+
exceptionType: string;
|
|
40
|
+
syntaxErrorPosition?: _TokenPositionTransformation.AsJson;
|
|
41
|
+
errorType: string;
|
|
42
|
+
errorMessage: string;
|
|
43
|
+
arguments: string[];
|
|
44
|
+
queryString: string;
|
|
45
|
+
errorMessageFormatSpecifierTypes: string[];
|
|
46
|
+
errorMessageFormat: string;
|
|
47
|
+
}
|
|
48
|
+
function fromJson(model: AsJson): ErrorResponseDetails;
|
|
49
|
+
function toJson(model: ErrorResponseDetails): AsJson;
|
|
50
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ErrorResponseDetails, _ErrorResponseDetailsTransformation } from './error-response-details';
|
|
2
|
+
/**
|
|
3
|
+
* The response for error state
|
|
4
|
+
*/
|
|
5
|
+
export interface ErrorResponse {
|
|
6
|
+
/**
|
|
7
|
+
* A short, clear error message without details
|
|
8
|
+
*/
|
|
9
|
+
message: string;
|
|
10
|
+
details: ErrorResponseDetails;
|
|
11
|
+
/**
|
|
12
|
+
* Error code, which normally matches the HTTP error code.
|
|
13
|
+
*/
|
|
14
|
+
code: number;
|
|
15
|
+
}
|
|
16
|
+
/** @ignore */
|
|
17
|
+
export declare namespace _ErrorResponseTransformation {
|
|
18
|
+
interface AsJson {
|
|
19
|
+
message: string;
|
|
20
|
+
details: _ErrorResponseDetailsTransformation.AsJson;
|
|
21
|
+
code: number;
|
|
22
|
+
}
|
|
23
|
+
function fromJson(model: AsJson): ErrorResponse;
|
|
24
|
+
function toJson(model: ErrorResponse): AsJson;
|
|
25
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export interface ExecuteRequest {
|
|
2
|
+
/**
|
|
3
|
+
* The full query string.
|
|
4
|
+
*/
|
|
5
|
+
query: string;
|
|
6
|
+
/**
|
|
7
|
+
* 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>
|
|
8
|
+
*/
|
|
9
|
+
defaultTimeframeStart?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 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>
|
|
12
|
+
*/
|
|
13
|
+
defaultTimeframeEnd?: string;
|
|
14
|
+
/**
|
|
15
|
+
* 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'
|
|
16
|
+
*/
|
|
17
|
+
timezone?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 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'.
|
|
20
|
+
*/
|
|
21
|
+
locale?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The maximum number of result records that this query will return.
|
|
24
|
+
*/
|
|
25
|
+
maxResultRecords?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The query will stop after reaching the fetch-timeout.
|
|
28
|
+
*/
|
|
29
|
+
fetchTimeoutSeconds?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The time a client is willing to wait for the query result. In case the query finishes within the specified timeout, the query result is returned. Otherwise, the requestToken is returned, allowing polling for the result.
|
|
32
|
+
*/
|
|
33
|
+
requestTimeoutMilliseconds?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Request preview results. If a preview is available within the request-timeout-milliseconds, then it will be returned as part of the response.
|
|
36
|
+
*/
|
|
37
|
+
enablePreview?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* In case not specified in the DQL string, the sampling ratio defined here is applied. Note that this is only applicable to log queries.
|
|
40
|
+
*/
|
|
41
|
+
defaultSamplingRatio?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Limit in gigabytes for the amount data that will be scanned during read.
|
|
44
|
+
*/
|
|
45
|
+
defaultScanLimitGbytes?: number;
|
|
46
|
+
}
|
|
47
|
+
/** @ignore */
|
|
48
|
+
export declare namespace _ExecuteRequestTransformation {
|
|
49
|
+
interface AsJson {
|
|
50
|
+
query: string;
|
|
51
|
+
defaultTimeframeStart?: string;
|
|
52
|
+
defaultTimeframeEnd?: string;
|
|
53
|
+
timezone?: string;
|
|
54
|
+
locale?: string;
|
|
55
|
+
maxResultRecords?: number;
|
|
56
|
+
fetchTimeoutSeconds?: number;
|
|
57
|
+
requestTimeoutMilliseconds?: number;
|
|
58
|
+
enablePreview?: boolean;
|
|
59
|
+
defaultSamplingRatio?: number;
|
|
60
|
+
defaultScanLimitGbytes?: number;
|
|
61
|
+
}
|
|
62
|
+
function fromJson(model: AsJson): ExecuteRequest;
|
|
63
|
+
function toJson(model: ExecuteRequest): AsJson;
|
|
64
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum FieldTypeType {
|
|
2
|
+
Boolean = "boolean",
|
|
3
|
+
String = "string",
|
|
4
|
+
Double = "double",
|
|
5
|
+
Long = "long",
|
|
6
|
+
Timestamp = "timestamp",
|
|
7
|
+
Timeframe = "timeframe",
|
|
8
|
+
Duration = "duration",
|
|
9
|
+
Binary = "binary",
|
|
10
|
+
IpAddress = "ip_address",
|
|
11
|
+
GeoPoint = "geo_point",
|
|
12
|
+
Array = "array",
|
|
13
|
+
Record = "record",
|
|
14
|
+
Undefined = "undefined"
|
|
15
|
+
}
|
|
16
|
+
/** @ignore */
|
|
17
|
+
export declare namespace _FieldTypeTypeTransformation {
|
|
18
|
+
type AsJson = FieldTypeType;
|
|
19
|
+
const toJson: (value: FieldTypeType) => AsJson;
|
|
20
|
+
const fromJson: (value: AsJson) => FieldTypeType;
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FieldTypeType, _FieldTypeTypeTransformation } from './field-type-type';
|
|
2
|
+
import { RangedFieldTypes, _RangedFieldTypesTransformation } from './ranged-field-types';
|
|
3
|
+
/**
|
|
4
|
+
* The possible type of a field in DQL.
|
|
5
|
+
*/
|
|
6
|
+
export interface FieldType {
|
|
7
|
+
type: FieldTypeType;
|
|
8
|
+
types?: RangedFieldTypes[];
|
|
9
|
+
}
|
|
10
|
+
/** @ignore */
|
|
11
|
+
export declare namespace _FieldTypeTransformation {
|
|
12
|
+
interface AsJson {
|
|
13
|
+
type: _FieldTypeTypeTransformation.AsJson;
|
|
14
|
+
types?: _RangedFieldTypesTransformation.AsJson[];
|
|
15
|
+
}
|
|
16
|
+
function fromJson(model: AsJson): FieldType;
|
|
17
|
+
function toJson(model: FieldType): AsJson;
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DQL data type representing a geolocation point.
|
|
3
|
+
*/
|
|
4
|
+
export interface GeoPoint {
|
|
5
|
+
/**
|
|
6
|
+
* The coordinate that specifies the north–south position of a point on the surface of the earth.
|
|
7
|
+
*/
|
|
8
|
+
latitude: number;
|
|
9
|
+
/**
|
|
10
|
+
* The coordinate that specifies the east–west position of a point on the surface of the earth.
|
|
11
|
+
*/
|
|
12
|
+
longitude: number;
|
|
13
|
+
}
|
|
14
|
+
/** @ignore */
|
|
15
|
+
export declare namespace _GeoPointTransformation {
|
|
16
|
+
interface AsJson {
|
|
17
|
+
latitude: number;
|
|
18
|
+
longitude: number;
|
|
19
|
+
}
|
|
20
|
+
function fromJson(model: AsJson): GeoPoint;
|
|
21
|
+
function toJson(model: GeoPoint): AsJson;
|
|
22
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { MetadataNotification, _MetadataNotificationTransformation } from './metadata-notification';
|
|
2
|
+
import { Timeframe, _TimeframeTransformation } from './timeframe';
|
|
3
|
+
/**
|
|
4
|
+
* Collects various bits of metadata information.
|
|
5
|
+
*/
|
|
6
|
+
export interface GrailMetadata {
|
|
7
|
+
/**
|
|
8
|
+
* The canonical form of the query. It has normalized spaces and canonical constructs.
|
|
9
|
+
*/
|
|
10
|
+
canonicalQuery?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Effective timezone for the query.
|
|
13
|
+
*/
|
|
14
|
+
timezone?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The submitted query.
|
|
17
|
+
*/
|
|
18
|
+
query?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Number of scanned records during the query execution.
|
|
21
|
+
*/
|
|
22
|
+
scannedRecords?: number;
|
|
23
|
+
/**
|
|
24
|
+
* The version of DQL that was used to process the query request.
|
|
25
|
+
*/
|
|
26
|
+
dqlVersion?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Number of scanned bytes during the query execution.
|
|
29
|
+
*/
|
|
30
|
+
scannedBytes?: number;
|
|
31
|
+
analysisTimeframe?: Timeframe;
|
|
32
|
+
/**
|
|
33
|
+
* Effective locale for the query.
|
|
34
|
+
*/
|
|
35
|
+
locale?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The time it took to execute the query.
|
|
38
|
+
*/
|
|
39
|
+
executionTimeMilliseconds?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Collected messages during the execution of the query.
|
|
42
|
+
*/
|
|
43
|
+
notifications?: MetadataNotification[];
|
|
44
|
+
/**
|
|
45
|
+
* The id of the query
|
|
46
|
+
*/
|
|
47
|
+
queryId?: string;
|
|
48
|
+
}
|
|
49
|
+
/** @ignore */
|
|
50
|
+
export declare namespace _GrailMetadataTransformation {
|
|
51
|
+
interface AsJson {
|
|
52
|
+
canonicalQuery?: string;
|
|
53
|
+
timezone?: string;
|
|
54
|
+
query?: string;
|
|
55
|
+
scannedRecords?: number;
|
|
56
|
+
dqlVersion?: string;
|
|
57
|
+
scannedBytes?: number;
|
|
58
|
+
analysisTimeframe?: _TimeframeTransformation.AsJson;
|
|
59
|
+
locale?: string;
|
|
60
|
+
executionTimeMilliseconds?: number;
|
|
61
|
+
notifications?: _MetadataNotificationTransformation.AsJson[];
|
|
62
|
+
queryId?: string;
|
|
63
|
+
}
|
|
64
|
+
function fromJson(model: AsJson): GrailMetadata;
|
|
65
|
+
function toJson(model: GrailMetadata): AsJson;
|
|
66
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from './autocomplete-request';
|
|
2
|
+
export * from './autocomplete-response';
|
|
3
|
+
export * from './autocomplete-suggestion';
|
|
4
|
+
export * from './autocomplete-suggestion-part';
|
|
5
|
+
export * from './dql-alternative-node';
|
|
6
|
+
export * from './dql-container-node';
|
|
7
|
+
export * from './dql-node';
|
|
8
|
+
export * from './dql-node-node-type';
|
|
9
|
+
export * from './dql-terminal-node';
|
|
10
|
+
export * from './error-envelope';
|
|
11
|
+
export * from './error-response';
|
|
12
|
+
export * from './error-response-details';
|
|
13
|
+
export * from './execute-request';
|
|
14
|
+
export * from './field-type';
|
|
15
|
+
export * from './field-type-type';
|
|
16
|
+
export * from './geo-point';
|
|
17
|
+
export * from './grail-metadata';
|
|
18
|
+
export * from './metadata';
|
|
19
|
+
export * from './metadata-notification';
|
|
20
|
+
export * from './metric-metadata';
|
|
21
|
+
export * from './parse-request';
|
|
22
|
+
export * from './position-info';
|
|
23
|
+
export * from './query-poll-response';
|
|
24
|
+
export * from './query-result';
|
|
25
|
+
export * from './query-start-response';
|
|
26
|
+
export * from './query-state';
|
|
27
|
+
export * from './ranged-field-types';
|
|
28
|
+
export * from './ranged-field-types-mappings';
|
|
29
|
+
export * from './result-record';
|
|
30
|
+
export * from './result-record-value';
|
|
31
|
+
export * from './timeframe';
|
|
32
|
+
export * from './token-position';
|
|
33
|
+
export * from './token-type';
|
|
34
|
+
export * from './verify-request';
|
|
35
|
+
export * from './verify-response';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TokenPosition, _TokenPositionTransformation } from './token-position';
|
|
2
|
+
/**
|
|
3
|
+
* The message that provides additional information about the execution of the query.
|
|
4
|
+
*/
|
|
5
|
+
export interface MetadataNotification {
|
|
6
|
+
/**
|
|
7
|
+
* The severity of the notification, currently: INFO, WARN, ERROR.
|
|
8
|
+
*/
|
|
9
|
+
severity?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The message format of the notification, string.format based
|
|
12
|
+
*/
|
|
13
|
+
messageFormat?: string;
|
|
14
|
+
syntaxPosition?: TokenPosition;
|
|
15
|
+
/**
|
|
16
|
+
* The corresponding DQL format specifier types for each format specifier used in the error message format.
|
|
17
|
+
*/
|
|
18
|
+
messageFormatSpecifierTypes?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* The arguments for the message format.
|
|
21
|
+
*/
|
|
22
|
+
arguments?: string[];
|
|
23
|
+
/**
|
|
24
|
+
* The notification type, e.g. LIMIT_ADDED.
|
|
25
|
+
*/
|
|
26
|
+
notificationType?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The complete message of the notification.
|
|
29
|
+
*/
|
|
30
|
+
message?: string;
|
|
31
|
+
}
|
|
32
|
+
/** @ignore */
|
|
33
|
+
export declare namespace _MetadataNotificationTransformation {
|
|
34
|
+
interface AsJson {
|
|
35
|
+
severity?: string;
|
|
36
|
+
messageFormat?: string;
|
|
37
|
+
syntaxPosition?: _TokenPositionTransformation.AsJson;
|
|
38
|
+
messageFormatSpecifierTypes?: string[];
|
|
39
|
+
arguments?: string[];
|
|
40
|
+
notificationType?: string;
|
|
41
|
+
message?: string;
|
|
42
|
+
}
|
|
43
|
+
function fromJson(model: AsJson): MetadataNotification;
|
|
44
|
+
function toJson(model: MetadataNotification): AsJson;
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GrailMetadata, _GrailMetadataTransformation } from './grail-metadata';
|
|
2
|
+
import { MetricMetadata, _MetricMetadataTransformation } from './metric-metadata';
|
|
3
|
+
/**
|
|
4
|
+
* Collects various bits of metadata information.
|
|
5
|
+
*/
|
|
6
|
+
export interface Metadata {
|
|
7
|
+
grail?: GrailMetadata;
|
|
8
|
+
metrics?: MetricMetadata[];
|
|
9
|
+
}
|
|
10
|
+
/** @ignore */
|
|
11
|
+
export declare namespace _MetadataTransformation {
|
|
12
|
+
interface AsJson {
|
|
13
|
+
grail?: _GrailMetadataTransformation.AsJson;
|
|
14
|
+
metrics?: _MetricMetadataTransformation.AsJson[];
|
|
15
|
+
}
|
|
16
|
+
function fromJson(model: AsJson): Metadata;
|
|
17
|
+
function toJson(model: Metadata): AsJson;
|
|
18
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An object that defines additional metric metadata.
|
|
3
|
+
*/
|
|
4
|
+
export interface MetricMetadata {
|
|
5
|
+
/**
|
|
6
|
+
* The metric key.
|
|
7
|
+
*/
|
|
8
|
+
'metric.key'?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The display name of the metadata.
|
|
11
|
+
*/
|
|
12
|
+
displayName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The description of the metadata.
|
|
15
|
+
*/
|
|
16
|
+
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The unit used.
|
|
19
|
+
*/
|
|
20
|
+
unit?: string;
|
|
21
|
+
}
|
|
22
|
+
/** @ignore */
|
|
23
|
+
export declare namespace _MetricMetadataTransformation {
|
|
24
|
+
interface AsJson {
|
|
25
|
+
'metric.key'?: string;
|
|
26
|
+
displayName?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
unit?: string;
|
|
29
|
+
}
|
|
30
|
+
function fromJson(model: AsJson): MetricMetadata;
|
|
31
|
+
function toJson(model: MetricMetadata): AsJson;
|
|
32
|
+
}
|