@dynatrace-sdk/client-query 1.21.2 → 1.22.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +59 -36
  3. package/cjs/index.js +191 -188
  4. package/dynatrace-metadata.json +3 -3
  5. package/esm/index.js +191 -188
  6. package/package.json +1 -1
  7. package/types/packages/client/query/src/lib/apis/query-assistance-api.d.ts +48 -48
  8. package/types/packages/client/query/src/lib/apis/query-execution-api.d.ts +23 -23
  9. package/types/packages/client/query/src/lib/models/autocomplete-request.d.ts +12 -6
  10. package/types/packages/client/query/src/lib/models/autocomplete-response.d.ts +4 -4
  11. package/types/packages/client/query/src/lib/models/autocomplete-suggestion-part.d.ts +6 -6
  12. package/types/packages/client/query/src/lib/models/autocomplete-suggestion.d.ts +4 -4
  13. package/types/packages/client/query/src/lib/models/bucket-contribution.d.ts +6 -0
  14. package/types/packages/client/query/src/lib/models/contributions.d.ts +4 -0
  15. package/types/packages/client/query/src/lib/models/dql-alternative-node.d.ts +1 -1
  16. package/types/packages/client/query/src/lib/models/dql-container-node.d.ts +4 -4
  17. package/types/packages/client/query/src/lib/models/dql-node.d.ts +4 -4
  18. package/types/packages/client/query/src/lib/models/dql-terminal-node.d.ts +5 -5
  19. package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.d.ts +4 -4
  20. package/types/packages/client/query/src/lib/models/error-response-details.d.ts +21 -21
  21. package/types/packages/client/query/src/lib/models/error-response.d.ts +4 -4
  22. package/types/packages/client/query/src/lib/models/execute-request.d.ts +35 -31
  23. package/types/packages/client/query/src/lib/models/grail-metadata.d.ts +25 -23
  24. package/types/packages/client/query/src/lib/models/index.d.ts +2 -0
  25. package/types/packages/client/query/src/lib/models/metadata-notification.d.ts +12 -12
  26. package/types/packages/client/query/src/lib/models/metric-metadata.d.ts +12 -12
  27. package/types/packages/client/query/src/lib/models/parse-request.d.ts +8 -8
  28. package/types/packages/client/query/src/lib/models/query-options.d.ts +1 -1
  29. package/types/packages/client/query/src/lib/models/query-poll-response.d.ts +8 -8
  30. package/types/packages/client/query/src/lib/models/query-result.d.ts +4 -4
  31. package/types/packages/client/query/src/lib/models/query-start-response.d.ts +8 -8
  32. package/types/packages/client/query/src/lib/models/ranged-field-types-mappings.d.ts +1 -1
  33. package/types/packages/client/query/src/lib/models/ranged-field-types.d.ts +4 -4
  34. package/types/packages/client/query/src/lib/models/result-record.d.ts +1 -1
  35. package/types/packages/client/query/src/lib/models/timeframe.d.ts +4 -4
  36. package/types/packages/client/query/src/lib/models/token-position.d.ts +2 -2
  37. package/types/packages/client/query/src/lib/models/token-type.d.ts +3 -1
  38. package/types/packages/client/query/src/lib/models/verify-request.d.ts +9 -9
  39. package/types/packages/client/query/src/lib/models/verify-response.d.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/client-query",
3
- "version": "1.21.2",
3
+ "version": "1.22.0",
4
4
  "description": "Exposes an API to fetch records stored in Grail.",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -20,37 +20,67 @@ export declare class QueryAssistanceClient {
20
20
  */
21
21
  constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions);
22
22
  /**
23
- * Verifies a query without executing it.
23
+ * Get a structured list of suggestions for the query at the given position.
24
24
  *
25
25
  * 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).
26
26
  *
27
27
  * ## Overview
28
28
  *
29
- * Verifies the supplied query string and other query parameters for lack of any errors, but without actually
30
- * submitting the query for execution.
29
+ * We provide a list of suggestions that may be used after the cursor position. The following queries will all provide the
30
+ * same results:
31
31
  *
32
- * @returns {Promise<VerifyResponse>} Supplied query and parameters were verified.
32
+ * * `query: "f"`
33
+ * * `query: "f", cursorPosition:1`
34
+ * * `query: "fetch ", cursorPosition:1`
35
+ *
36
+ * Available fields:
37
+ *
38
+ * | Field | Description |
39
+ * |-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
40
+ * | suggestions | a list of suggestions. Each item is a separate possible suggestion, despite they might have the same outputs. |
41
+ * | optional | whether the suggestion is optional. If `true`, the query until the cursor position might work. If `false`, the query is definitely incomplete or invalid if cut at the cursor position. |
42
+ *
43
+ * Fields in the `suggestions`
44
+ *
45
+ * | Field | Description |
46
+ * |------------------------|------------------------------------------------------------------------------------------------------------|
47
+ * | suggestion | a string representing the whole suggestion. This information could also be derived from the parts. |
48
+ * | alreadyTypedCharacters | how many characters of this suggestion have already been typed (and will be overridden by the suggestion). |
49
+ * | parts | a list of semantically enriched information on what are the parts of a suggestion. |
50
+ *
51
+ * Fields in `parts`
52
+ *
53
+ * | Field | Description |
54
+ * |------------|-----------------------------------------------------------|
55
+ * | suggestion | a string representing the current part of the suggestion. |
56
+ * | type | current types: SPACE, PIPE, COMMAND (may be extended) |
57
+ *
58
+ * The `type` helps to treat specific parts of the suggestion different to others; either by a different visualization,
59
+ * a link to docs, etc.
60
+ *
61
+ * @returns {Promise<AutocompleteResponse>} A list of structured autocomplete suggestions.
33
62
  *
34
63
  * @example <caption>Code example</caption>
35
64
  * import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
36
65
  *
37
- * const data = await queryAssistanceClient.queryVerify({
66
+ * const data = await queryAssistanceClient.queryAutocomplete({
38
67
  * body: {
39
68
  * query:
40
69
  * 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
41
70
  * },
42
71
  * });
43
72
  *
44
- * @throws {ErrorEnvelopeError} The supplied request is wrong. | An internal server error has occurred.
73
+ * @throws {ErrorEnvelopeError} The supplied request is wrong. Either the query itself or other parameters are wrong. | An internal server error has occurred.
45
74
  * @throws {InvalidResponseError}
46
75
  * @throws {ApiClientError}
47
76
  * @throws {ClientRequestError}
48
77
  */
49
- queryVerify(config: {
50
- body: VerifyRequest;
78
+ queryAutocomplete(config: {
79
+ body: AutocompleteRequest;
51
80
  /** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
81
+ /** (DEPRECATED use body parameter 'enforceQueryConsumptionLimit' instead) If set, query consumption limit will be enforced. */ enforceQueryConsumptionLimit?: boolean;
52
82
  abortSignal?: AbortSignal;
53
- }): Promise<VerifyResponse>;
83
+ }): Promise<AutocompleteResponse>;
54
84
  /**
55
85
  * Get a structured tree of the canonical form of the query.
56
86
  *
@@ -269,66 +299,36 @@ export declare class QueryAssistanceClient {
269
299
  abortSignal?: AbortSignal;
270
300
  }): Promise<DQLNode>;
271
301
  /**
272
- * Get a structured list of suggestions for the query at the given position.
302
+ * Verifies a query without executing it.
273
303
  *
274
304
  * 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).
275
305
  *
276
306
  * ## Overview
277
307
  *
278
- * We provide a list of suggestions that may be used after the cursor position. The following queries will all provide the
279
- * same results:
280
- *
281
- * * `query: "f"`
282
- * * `query: "f", cursorPosition:1`
283
- * * `query: "fetch ", cursorPosition:1`
284
- *
285
- * Available fields:
286
- *
287
- * | Field | Description |
288
- * |-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
289
- * | suggestions | a list of suggestions. Each item is a separate possible suggestion, despite they might have the same outputs. |
290
- * | optional | whether the suggestion is optional. If `true`, the query until the cursor position might work. If `false`, the query is definitely incomplete or invalid if cut at the cursor position. |
291
- *
292
- * Fields in the `suggestions`
293
- *
294
- * | Field | Description |
295
- * |------------------------|------------------------------------------------------------------------------------------------------------|
296
- * | suggestion | a string representing the whole suggestion. This information could also be derived from the parts. |
297
- * | alreadyTypedCharacters | how many characters of this suggestion have already been typed (and will be overridden by the suggestion). |
298
- * | parts | a list of semantically enriched information on what are the parts of a suggestion. |
299
- *
300
- * Fields in `parts`
301
- *
302
- * | Field | Description |
303
- * |------------|-----------------------------------------------------------|
304
- * | suggestion | a string representing the current part of the suggestion. |
305
- * | type | current types: SPACE, PIPE, COMMAND (may be extended) |
306
- *
307
- * The `type` helps to treat specific parts of the suggestion different to others; either by a different visualization,
308
- * a link to docs, etc.
308
+ * Verifies the supplied query string and other query parameters for lack of any errors, but without actually
309
+ * submitting the query for execution.
309
310
  *
310
- * @returns {Promise<AutocompleteResponse>} A list of structured autocomplete suggestions.
311
+ * @returns {Promise<VerifyResponse>} Supplied query and parameters were verified.
311
312
  *
312
313
  * @example <caption>Code example</caption>
313
314
  * import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
314
315
  *
315
- * const data = await queryAssistanceClient.queryAutocomplete({
316
+ * const data = await queryAssistanceClient.queryVerify({
316
317
  * body: {
317
318
  * query:
318
319
  * 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
319
320
  * },
320
321
  * });
321
322
  *
322
- * @throws {ErrorEnvelopeError} The supplied request is wrong. Either the query itself or other parameters are wrong. | An internal server error has occurred.
323
+ * @throws {ErrorEnvelopeError} The supplied request is wrong. | An internal server error has occurred.
323
324
  * @throws {InvalidResponseError}
324
325
  * @throws {ApiClientError}
325
326
  * @throws {ClientRequestError}
326
327
  */
327
- queryAutocomplete(config: {
328
- body: AutocompleteRequest;
328
+ queryVerify(config: {
329
+ body: VerifyRequest;
329
330
  /** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
330
- /** (DEPRECATED use body parameter 'enforceQueryConsumptionLimit' instead) If set, query consumption limit will be enforced. */ enforceQueryConsumptionLimit?: boolean;
331
331
  abortSignal?: AbortSignal;
332
- }): Promise<AutocompleteResponse>;
332
+ }): Promise<VerifyResponse>;
333
333
  }
334
334
  export declare const queryAssistanceClient: QueryAssistanceClient;
@@ -17,20 +17,22 @@ export declare class QueryExecutionClient {
17
17
  */
18
18
  constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions);
19
19
  /**
20
- * Retrieves query status and final result from Grail.
20
+ * Cancels the query and returns the result if the query was already finished, otherwise discards it.
21
21
  *
22
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
  *
26
- * Polls the status of a Grail query. Returns the status of the query, including the result if the query finished.
26
+ * Cancels a running Grail query and returns a list of records if the query already finished.
27
27
  *
28
28
  * ### The response format:
29
- * The json response will contain the state of the query. If the query succeeded, the result will be included.
30
29
  *
31
- * The result has two main sections:
32
- * * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
33
- * * The 'types' section describes the corresponding data types that a record field has.
30
+ * If the query was already finished, a response body including the result will be returned. Otherwise the response will contain no body.
31
+ *
32
+ * The result has three main sections:
33
+ * * the 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
34
+ * * the 'types' section describes the corresponding data types that a record field has.
35
+ * * the 'metadata' section contains information about the query like 'analysisTimeframe', 'timezone' or 'locale'.
34
36
  *
35
37
  * Every record has an implicit 'index' according to the position in the 'records' JSON array.
36
38
  * The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
@@ -52,12 +54,12 @@ export declare class QueryExecutionClient {
52
54
  * It is guaranteed that every field of every record will have a corresponding type.
53
55
  * **Clients should always take the included types into account when consuming records!**
54
56
  *
55
- * @returns {Promise<QueryPollResponse>} The current status and results of the supplied query.
57
+ * @returns {Promise<QueryPollResponse | void>} The query already finished.
56
58
  *
57
59
  * @example <caption>Code example</caption>
58
60
  * import { queryExecutionClient } from "@dynatrace-sdk/client-query";
59
61
  *
60
- * const data = await queryExecutionClient.queryPoll({
62
+ * const data = await queryExecutionClient.queryCancel({
61
63
  * requestToken: "...",
62
64
  * });
63
65
  *
@@ -66,13 +68,12 @@ export declare class QueryExecutionClient {
66
68
  * @throws {ApiClientError}
67
69
  * @throws {ClientRequestError}
68
70
  */
69
- queryPoll(config: {
71
+ queryCancel(config: {
70
72
  /** The request-token of the query. */ requestToken: string;
71
- /** 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 query status is returned. */ requestTimeoutMilliseconds?: number;
72
73
  /** If set additional data will be available in the metadata section. */ enrich?: string;
73
74
  /** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
74
75
  abortSignal?: AbortSignal;
75
- }): Promise<QueryPollResponse>;
76
+ }): Promise<QueryPollResponse | void>;
76
77
  /**
77
78
  * Starts a Grail query.
78
79
  *
@@ -138,22 +139,20 @@ export declare class QueryExecutionClient {
138
139
  abortSignal?: AbortSignal;
139
140
  }): Promise<QueryStartResponse>;
140
141
  /**
141
- * Cancels the query and returns the result if the query was already finished, otherwise discards it.
142
+ * Retrieves query status and final result from Grail.
142
143
  *
143
144
  * 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).
144
145
  *
145
146
  * ### Overview:
146
147
  *
147
- * Cancels a running Grail query and returns a list of records if the query already finished.
148
+ * Polls the status of a Grail query. Returns the status of the query, including the result if the query finished.
148
149
  *
149
150
  * ### The response format:
151
+ * The json response will contain the state of the query. If the query succeeded, the result will be included.
150
152
  *
151
- * If the query was already finished, a response body including the result will be returned. Otherwise the response will contain no body.
152
- *
153
- * The result has three main sections:
154
- * * the 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
155
- * * the 'types' section describes the corresponding data types that a record field has.
156
- * * the 'metadata' section contains information about the query like 'analysisTimeframe', 'timezone' or 'locale'.
153
+ * The result has two main sections:
154
+ * * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
155
+ * * The 'types' section describes the corresponding data types that a record field has.
157
156
  *
158
157
  * Every record has an implicit 'index' according to the position in the 'records' JSON array.
159
158
  * The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
@@ -175,12 +174,12 @@ export declare class QueryExecutionClient {
175
174
  * It is guaranteed that every field of every record will have a corresponding type.
176
175
  * **Clients should always take the included types into account when consuming records!**
177
176
  *
178
- * @returns {Promise<QueryPollResponse | void>} The query already finished.
177
+ * @returns {Promise<QueryPollResponse>} The current status and results of the supplied query.
179
178
  *
180
179
  * @example <caption>Code example</caption>
181
180
  * import { queryExecutionClient } from "@dynatrace-sdk/client-query";
182
181
  *
183
- * const data = await queryExecutionClient.queryCancel({
182
+ * const data = await queryExecutionClient.queryPoll({
184
183
  * requestToken: "...",
185
184
  * });
186
185
  *
@@ -189,11 +188,12 @@ export declare class QueryExecutionClient {
189
188
  * @throws {ApiClientError}
190
189
  * @throws {ClientRequestError}
191
190
  */
192
- queryCancel(config: {
191
+ queryPoll(config: {
193
192
  /** The request-token of the query. */ requestToken: string;
193
+ /** Time the response is allowed to be delayed for either a preview or the final result to become available. No default value (immediate response). */ requestTimeoutMilliseconds?: number;
194
194
  /** If set additional data will be available in the metadata section. */ enrich?: string;
195
195
  /** The dt-client-context header is an optional string parameter used for monitoring purposes. When included in a request, it helps retrieve information about the execution of the query. It shouldn't hold sensitive information. */ dtClientContext?: string;
196
196
  abortSignal?: AbortSignal;
197
- }): Promise<QueryPollResponse | void>;
197
+ }): Promise<QueryPollResponse>;
198
198
  }
199
199
  export declare const queryExecutionClient: QueryExecutionClient;
@@ -1,25 +1,31 @@
1
1
  import { QueryOptions } from './query-options';
2
2
  export interface AutocompleteRequest {
3
3
  /**
4
- * The full query string.
4
+ * No upper limit but must be lower than length of query. No default value.
5
5
  */
6
- query: string;
7
6
  cursorPosition?: number;
8
7
  /**
9
- * 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'
8
+ * Boolean to indicate if the query consumption limit should be enforced
10
9
  */
11
- timezone?: string;
10
+ enforceQueryConsumptionLimit?: boolean;
12
11
  /**
13
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'.
14
13
  */
15
14
  locale?: string;
15
+ /**
16
+ * Limit the number of data suggestions, such as field names. No upper limit. No default value.
17
+ */
16
18
  maxDataSuggestions?: number;
19
+ /**
20
+ * The full query string.
21
+ */
22
+ query: string;
17
23
  /**
18
24
  * Query options enhance query functionality for Dynatrace internal services.
19
25
  */
20
26
  queryOptions?: QueryOptions;
21
27
  /**
22
- * Boolean to indicate if the query consumption limit should be enforced
28
+ * 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'
23
29
  */
24
- enforceQueryConsumptionLimit?: boolean;
30
+ timezone?: string;
25
31
  }
@@ -7,12 +7,12 @@ export interface AutocompleteResponse {
7
7
  * True if the suggestions are optional.
8
8
  */
9
9
  optional: boolean;
10
- /**
11
- * The list of suggestions.
12
- */
13
- suggestions: AutocompleteSuggestion[];
14
10
  /**
15
11
  * 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
12
  */
17
13
  suggestedTtlSeconds?: number;
14
+ /**
15
+ * The list of suggestions.
16
+ */
17
+ suggestions: AutocompleteSuggestion[];
18
18
  }
@@ -2,20 +2,20 @@
2
2
  * Part of the suggestion.
3
3
  */
4
4
  export interface AutocompleteSuggestionPart {
5
- /**
6
- * The type of the autocomplete token.
7
- */
8
- type: 'SPACE' | 'LINEBREAK' | 'INDENT' | 'PIPE' | 'DOT' | 'COLON' | 'COMMA' | 'ASSIGNMENT' | 'BRACE_OPEN' | 'BRACE_CLOSE' | 'BRACKET_OPEN' | 'BRACKET_CLOSE' | 'PARENTHESIS_OPEN' | 'PARENTHESIS_CLOSE' | 'QUOTE' | 'SINGLE_QUOTE' | 'SLASH' | 'BOOLEAN_TRUE' | 'BOOLEAN_FALSE' | 'NULL' | 'COMMAND_NAME' | 'PARAMETER_KEY' | 'PARAMETER_VALUE_SCOPE' | 'FUNCTION_NAME' | 'TIMESERIES_AGGREGATION' | 'TIMESERIES_AGGREGATION_EXPRESSION' | 'OPERATOR' | 'SEARCH_OPERATOR' | 'TRAVERSAL_OPERATOR' | 'TRAVERSAL_RELATION_NAME' | 'TRAVERSAL_HOP_COUNT' | 'SIMPLE_IDENTIFIER' | 'DATA_OBJECT' | 'NUMBER' | 'STRING' | 'TIME_UNIT' | 'TIMESTAMP_VALUE' | 'METRIC_KEY' | 'VARIABLE' | 'END_COMMENT' | 'UID_VALUE' | 'PARSE_PATTERN' | 'FIELD_PATTERN' | 'SEARCH_PATTERN' | 'ENTITY_SELECTOR_PART' | 'SAVED_TABLE_NAME' | 'TABULAR_FILE_NAME' | 'PARAMETER_MODIFIER' | 'FIELD_MODIFIER' | 'ENTITY_TYPE' | 'ENTITY_ATTRIBUTE' | 'SMARTSCAPE_ID_VALUE' | 'ENUM_STRING' | 'FIELD_PREFIX' | 'BUCKET' | 'SMARTSCAPE_NODE_PATTERN' | 'SMARTSCAPE_EDGE_PATTERN' | 'SMARTSCAPE_NODE_TYPE' | 'SMARTSCAPE_EDGE_TYPE';
9
5
  /**
10
6
  * The type of the suggestion.
11
7
  */
12
8
  info?: string;
9
+ /**
10
+ * The suggested continuation of the query.
11
+ */
12
+ suggestion: string;
13
13
  /**
14
14
  * The synopsis of the suggestion.
15
15
  */
16
16
  synopsis?: string;
17
17
  /**
18
- * The suggested continuation of the query.
18
+ * The type of the autocomplete token.
19
19
  */
20
- suggestion: string;
20
+ type: 'SPACE' | 'LINEBREAK' | 'INDENT' | 'PIPE' | 'DOT' | 'COLON' | 'COMMA' | 'ASSIGNMENT' | 'BRACE_OPEN' | 'BRACE_CLOSE' | 'BRACKET_OPEN' | 'BRACKET_CLOSE' | 'PARENTHESIS_OPEN' | 'PARENTHESIS_CLOSE' | 'QUOTE' | 'SINGLE_QUOTE' | 'SLASH' | 'BOOLEAN_TRUE' | 'BOOLEAN_FALSE' | 'NULL' | 'COMMAND_NAME' | 'PARAMETER_KEY' | 'PARAMETER_VALUE_SCOPE' | 'FUNCTION_NAME' | 'TIMESERIES_AGGREGATION' | 'TIMESERIES_AGGREGATION_EXPRESSION' | 'OPERATOR' | 'SEARCH_OPERATOR' | 'TRAVERSAL_OPERATOR' | 'TRAVERSAL_RELATION_NAME' | 'TRAVERSAL_HOP_COUNT' | 'SIMPLE_IDENTIFIER' | 'DATA_OBJECT' | 'NUMBER' | 'STRING' | 'TIME_UNIT' | 'TIMESTAMP_VALUE' | 'METRIC_KEY' | 'VARIABLE' | 'END_COMMENT' | 'UID_VALUE' | 'PARSE_PATTERN' | 'FIELD_PATTERN' | 'SEARCH_PATTERN' | 'ENTITY_SELECTOR_PART' | 'SAVED_TABLE_NAME' | 'TABULAR_FILE_NAME' | 'PARAMETER_MODIFIER' | 'FIELD_MODIFIER' | 'ENTITY_TYPE' | 'ENTITY_ATTRIBUTE' | 'SMARTSCAPE_ID_VALUE' | 'ENUM_STRING' | 'FIELD_PREFIX' | 'BUCKET' | 'SMARTSCAPE_NODE_PATTERN' | 'SMARTSCAPE_EDGE_PATTERN' | 'SMARTSCAPE_NODE_TYPE' | 'SMARTSCAPE_EDGE_TYPE' | 'JSON_PATH' | 'URL';
21
21
  }
@@ -3,14 +3,14 @@ import { AutocompleteSuggestionPart } from './autocomplete-suggestion-part';
3
3
  * Single suggestion for completion of the query.
4
4
  */
5
5
  export interface AutocompleteSuggestion {
6
- /**
7
- * List of suggestion parts.
8
- */
9
- parts: AutocompleteSuggestionPart[];
10
6
  /**
11
7
  * Number of characters that the user already typed for this suggestion.
12
8
  */
13
9
  alreadyTypedCharacters: number;
10
+ /**
11
+ * List of suggestion parts.
12
+ */
13
+ parts: AutocompleteSuggestionPart[];
14
14
  /**
15
15
  * The suggested continuation of the query.
16
16
  */
@@ -0,0 +1,6 @@
1
+ export interface BucketContribution {
2
+ matchedRecordsRatio?: number;
3
+ name?: string;
4
+ scannedBytes?: number;
5
+ table?: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ import { BucketContribution } from './bucket-contribution';
2
+ export interface Contributions {
3
+ buckets?: BucketContribution[];
4
+ }
@@ -6,5 +6,5 @@ export interface DQLAlternativeNode extends DQLNode {
6
6
  /**
7
7
  * The different alternatives.
8
8
  */
9
- alternatives?: object;
9
+ alternatives: object;
10
10
  }
@@ -4,11 +4,11 @@ import { DQLNode } from './dql-node';
4
4
  */
5
5
  export interface DQLContainerNode extends DQLNode {
6
6
  /**
7
- * The type of the node.
7
+ * The list of children nodes.
8
8
  */
9
- type?: 'QUERY' | 'EXECUTION_BLOCK' | 'COMMAND' | 'COMMAND_SEPARATOR' | 'PARAMETER_WITH_KEY' | 'GROUP' | 'PARAMETERS' | 'PARAMETER_NAMING' | 'PARAMETER_ASSIGNMENT' | 'PARAMETER_SEPARATOR' | 'FUNCTION' | 'FUNCTION_PART' | 'EXPRESSION' | 'IDENTIFIER' | 'SOURCE_ID' | 'DURATION' | 'TIMESTAMP' | 'TIMEFRAME' | 'TRAVERSAL_PATH' | 'TRAVERSAL_STEP';
9
+ children: DQLNode[];
10
10
  /**
11
- * The list of children nodes.
11
+ * The type of the node.
12
12
  */
13
- children?: DQLNode[];
13
+ type: 'QUERY' | 'EXECUTION_BLOCK' | 'COMMAND' | 'COMMAND_SEPARATOR' | 'PARAMETER_WITH_KEY' | 'GROUP' | 'PARAMETERS' | 'PARAMETER_NAMING' | 'PARAMETER_ASSIGNMENT' | 'PARAMETER_SEPARATOR' | 'FUNCTION' | 'FUNCTION_PART' | 'EXPRESSION' | 'IDENTIFIER' | 'SOURCE_ID' | 'DURATION' | 'TIMESTAMP' | 'TIMEFRAME' | 'TRAVERSAL_PATH' | 'TRAVERSAL_STEP';
14
14
  }
@@ -3,6 +3,10 @@ import { TokenPosition } from './token-position';
3
3
  * General Node in the DQL query.
4
4
  */
5
5
  export interface DQLNode {
6
+ /**
7
+ * True if the node is optional.
8
+ */
9
+ isOptional: boolean;
6
10
  /**
7
11
  * The type of the node.
8
12
  */
@@ -11,8 +15,4 @@ export interface DQLNode {
11
15
  * The position of a token in a query string used for errors and notification to map the message to a specific part of the query.
12
16
  */
13
17
  tokenPosition?: TokenPosition;
14
- /**
15
- * True if the node is optional.
16
- */
17
- isOptional: boolean;
18
18
  }
@@ -4,15 +4,15 @@ import { DQLNode } from './dql-node';
4
4
  */
5
5
  export interface DQLTerminalNode extends DQLNode {
6
6
  /**
7
- * The type of the autocomplete token.
7
+ * Canonical form.
8
8
  */
9
- type?: 'SPACE' | 'LINEBREAK' | 'INDENT' | 'PIPE' | 'DOT' | 'COLON' | 'COMMA' | 'ASSIGNMENT' | 'BRACE_OPEN' | 'BRACE_CLOSE' | 'BRACKET_OPEN' | 'BRACKET_CLOSE' | 'PARENTHESIS_OPEN' | 'PARENTHESIS_CLOSE' | 'QUOTE' | 'SINGLE_QUOTE' | 'SLASH' | 'BOOLEAN_TRUE' | 'BOOLEAN_FALSE' | 'NULL' | 'COMMAND_NAME' | 'PARAMETER_KEY' | 'PARAMETER_VALUE_SCOPE' | 'FUNCTION_NAME' | 'TIMESERIES_AGGREGATION' | 'TIMESERIES_AGGREGATION_EXPRESSION' | 'OPERATOR' | 'SEARCH_OPERATOR' | 'TRAVERSAL_OPERATOR' | 'TRAVERSAL_RELATION_NAME' | 'TRAVERSAL_HOP_COUNT' | 'SIMPLE_IDENTIFIER' | 'DATA_OBJECT' | 'NUMBER' | 'STRING' | 'TIME_UNIT' | 'TIMESTAMP_VALUE' | 'METRIC_KEY' | 'VARIABLE' | 'END_COMMENT' | 'UID_VALUE' | 'PARSE_PATTERN' | 'FIELD_PATTERN' | 'SEARCH_PATTERN' | 'ENTITY_SELECTOR_PART' | 'SAVED_TABLE_NAME' | 'TABULAR_FILE_NAME' | 'PARAMETER_MODIFIER' | 'FIELD_MODIFIER' | 'ENTITY_TYPE' | 'ENTITY_ATTRIBUTE' | 'SMARTSCAPE_ID_VALUE' | 'ENUM_STRING' | 'FIELD_PREFIX' | 'BUCKET' | 'SMARTSCAPE_NODE_PATTERN' | 'SMARTSCAPE_EDGE_PATTERN' | 'SMARTSCAPE_NODE_TYPE' | 'SMARTSCAPE_EDGE_TYPE';
9
+ canonicalString: string;
10
10
  /**
11
11
  * For optional items only: whether this node becomes mandatory when user order is used. True only for some optional 'ghost braces'
12
12
  */
13
- isMandatoryOnUserOrder?: boolean;
13
+ isMandatoryOnUserOrder: boolean;
14
14
  /**
15
- * Canonical form.
15
+ * The type of the autocomplete token.
16
16
  */
17
- canonicalString?: string;
17
+ type: 'SPACE' | 'LINEBREAK' | 'INDENT' | 'PIPE' | 'DOT' | 'COLON' | 'COMMA' | 'ASSIGNMENT' | 'BRACE_OPEN' | 'BRACE_CLOSE' | 'BRACKET_OPEN' | 'BRACKET_CLOSE' | 'PARENTHESIS_OPEN' | 'PARENTHESIS_CLOSE' | 'QUOTE' | 'SINGLE_QUOTE' | 'SLASH' | 'BOOLEAN_TRUE' | 'BOOLEAN_FALSE' | 'NULL' | 'COMMAND_NAME' | 'PARAMETER_KEY' | 'PARAMETER_VALUE_SCOPE' | 'FUNCTION_NAME' | 'TIMESERIES_AGGREGATION' | 'TIMESERIES_AGGREGATION_EXPRESSION' | 'OPERATOR' | 'SEARCH_OPERATOR' | 'TRAVERSAL_OPERATOR' | 'TRAVERSAL_RELATION_NAME' | 'TRAVERSAL_HOP_COUNT' | 'SIMPLE_IDENTIFIER' | 'DATA_OBJECT' | 'NUMBER' | 'STRING' | 'TIME_UNIT' | 'TIMESTAMP_VALUE' | 'METRIC_KEY' | 'VARIABLE' | 'END_COMMENT' | 'UID_VALUE' | 'PARSE_PATTERN' | 'FIELD_PATTERN' | 'SEARCH_PATTERN' | 'ENTITY_SELECTOR_PART' | 'SAVED_TABLE_NAME' | 'TABULAR_FILE_NAME' | 'PARAMETER_MODIFIER' | 'FIELD_MODIFIER' | 'ENTITY_TYPE' | 'ENTITY_ATTRIBUTE' | 'SMARTSCAPE_ID_VALUE' | 'ENUM_STRING' | 'FIELD_PREFIX' | 'BUCKET' | 'SMARTSCAPE_NODE_PATTERN' | 'SMARTSCAPE_EDGE_PATTERN' | 'SMARTSCAPE_NODE_TYPE' | 'SMARTSCAPE_EDGE_TYPE' | 'JSON_PATH' | 'URL';
18
18
  }
@@ -3,12 +3,12 @@ export interface ErrorResponseDetailsConstraintViolationsItem {
3
3
  * Message describing the error.
4
4
  */
5
5
  message: string;
6
- /**
7
- * Describes the general location of the violating parameter.
8
- */
9
- parameterLocation?: string;
10
6
  /**
11
7
  * Describes the violating parameter.
12
8
  */
13
9
  parameterDescriptor?: string;
10
+ /**
11
+ * Describes the general location of the violating parameter.
12
+ */
13
+ parameterLocation?: string;
14
14
  }
@@ -5,48 +5,48 @@ import { TokenPosition } from './token-position';
5
5
  */
6
6
  export interface ErrorResponseDetails {
7
7
  /**
8
- * The exception type.
9
- */
10
- exceptionType?: string;
11
- /**
12
- * The position of a token in a query string used for errors and notification to map the message to a specific part of the query.
8
+ * The arguments for the message format.
13
9
  */
14
- syntaxErrorPosition?: TokenPosition;
10
+ arguments?: string[];
15
11
  /**
16
- * The error type, e.g. COMMAND_NAME_MISSING
12
+ * Information about an input parameter that violated some validation rule of the service API.
17
13
  */
18
- errorType?: string;
14
+ constraintViolations?: ErrorResponseDetailsConstraintViolationsItem[];
19
15
  /**
20
16
  * Complete error message.
21
17
  */
22
18
  errorMessage?: string;
23
19
  /**
24
- * The arguments for the message format.
25
- */
26
- arguments?: string[];
27
- /**
28
- * Submitted query string.
20
+ * The message format of the error message, string.format based.
29
21
  */
30
- queryString?: string;
22
+ errorMessageFormat?: string;
31
23
  /**
32
24
  * The corresponding DQL format specifier types for each format specifier used in the error message format.
33
25
  */
34
26
  errorMessageFormatSpecifierTypes?: string[];
35
27
  /**
36
- * The message format of the error message, string.format based.
28
+ * The error type, e.g. COMMAND_NAME_MISSING
37
29
  */
38
- errorMessageFormat?: string;
39
- queryId?: string;
30
+ errorType?: string;
40
31
  /**
41
- * Information about an input parameter that violated some validation rule of the service API.
32
+ * The exception type.
42
33
  */
43
- constraintViolations?: ErrorResponseDetailsConstraintViolationsItem[];
34
+ exceptionType?: string;
35
+ /**
36
+ * List of missing IAM permissions necessary to successfully execute the request.
37
+ */
38
+ missingPermissions?: string[];
44
39
  /**
45
40
  * List of missing IAM scopes necessary to successfully execute the request.
46
41
  */
47
42
  missingScopes?: string[];
43
+ queryId?: string;
48
44
  /**
49
- * List of missing IAM permissions necessary to successfully execute the request.
45
+ * Submitted query string.
50
46
  */
51
- missingPermissions?: string[];
47
+ queryString?: string;
48
+ /**
49
+ * The position of a token in a query string used for errors and notification to map the message to a specific part of the query.
50
+ */
51
+ syntaxErrorPosition?: TokenPosition;
52
52
  }
@@ -4,17 +4,17 @@ import { ErrorResponseDetails } from './error-response-details';
4
4
  */
5
5
  export interface ErrorResponse {
6
6
  /**
7
- * A short, clear error message without details
7
+ * Error code, which normally matches the HTTP error code.
8
8
  */
9
- message: string;
9
+ code: number;
10
10
  /**
11
11
  * Detailed information about the error.
12
12
  */
13
13
  details?: ErrorResponseDetails;
14
14
  /**
15
- * Error code, which normally matches the HTTP error code.
15
+ * A short, clear error message without details
16
16
  */
17
- code: number;
17
+ message: string;
18
18
  /**
19
19
  * The number of seconds to wait until the next retry.
20
20
  */