# DQL Query

@dynatrace-sdk/client-query

## 1.25.0

### Minor Changes
- Add new body parameter pollingPromiseSeconds to indicate the number of seconds the client promises to send the next polling request after a response for a running query was sent. If the client does not poll within this time window, the query will be cancelled.

## 1.24.0

### Minor Changes

- Remove the deprecated enforce-query-consumption-limit header
- Extend Query API spec descriptions for maxResultBytes, maxResultRecords, defaultScanLimitGbytes and fetchTimeoutSeconds body parameters

## 1.23.1

### Patch Changes

- Revert: Fix redundant undefined or optional properties in model types. (APPDEV-7583) (APPDEV-16631)

## 1.23.0

Minor Changes

### Minor changes

- Adds the additional response body parameter "aggregation" to the metadata section.

## 1.22.1

Patch Changes

- Improve description of query-api spec

## 1.22.0

### Minor Changes

- Add new token types to the `TokenType` enum
- Add new body parameter `includeContributions` to indicate whether contribution information should be included in the query response metadata.

## 1.21.3

### Patch Changes

- Replace HTML tags with Markdown
- Improve some descriptions for query-api spec

## 1.21.2

### Patch Changes

- Fix transformations for date format strings. (APPDEV-14400)
- Update dependencies. (APPDEV-14014)
- Update dependencies. (APPDEV-13611)

## 1.21.1

### Patch Changes

- Update dependencies. (APPDEV-11813)

## 1.21.0

### Minor Changes

- Add new token types to the `TokenType` enum
- Add `Retry-After` header that indicates the number of seconds to wait before retrying the request
- Add `retryAfterSeconds` property to ErrorResponse to indicate the number of seconds to wait until the next retry
- Deprecate `enfore-query-consumption-limit` header
- Add `enforceQueryConsumptionLimit` body parameter to `ExecuteRequest` and `AutocompleteRequest`

## 1.20.2

### Patch Changes

- Improve performance of date transformations. (APPDEV-12840)

## 1.20.1

### Patch Changes

- Improve performance of payload transformations. (APPDEV-12840)
- Remove generatedAt property from metadata file. (APPDEV-12696)

## 1.20.0

### Minor changes

- Add request body parameter `includeTypes` to `ExecuteRequest`
- Add header `dt-client-context` to all query endpoints
- Add `enforce-query-consumption-limit` header to `/query:execute` and `/query:autocomplete` endpoints

## 1.19.0

### Minor Changes

- Added support for optional transformations. (APPDEV-11914)

### Patch Changes

- Added fix for 'transformToFormDataField' function. (APPDEV-12478)

## 1.18.1

### Patch Changes

- Fix date-time format serialization. (APPDEV-11661)

## 1.18.0

### Minor Changes

- Add `scalar` parameter to `MetricMetadata`
- Add `SEARCH_OPERATOR`, `SEARCH_PATTERN`, `SAVED_TABLE_NAME` and `PARAMETER_MODIFIER` to the `TokenType` enum

## 1.17.1

### Patch Changes

- Replace model transformations with single transformation function. (APPDEV-10818)
- Redundant error serializers are removed. (APPDEV-10272)
- Missing await added for API Gateway handler and line breaks at the end of the string are ignored. APPDEV-10883
- Imports reformatted and fixed incorrect type rendered for arrays of enum values. APPDEV-10701

## 1.17.0

### Minor Changes

- Enums are replaced with unions of literals. APPDEV-10338
- Inline enums as union of literals. APPDEV-9924

### Patch Changes

- Add return types and improve usage examples inside JSDoc. APPDEV-7536

## 1.16.0

### Features

- Export errors from the package.

## 1.15.0

### Minor Changes

- Add new token type to the `TokenType` enum and new field type to the `FieldType` enum.

## 1.14.0

### Minor Changes

- Introduced @dynatrace-sdk/shared-errors package and improved response errors handling.

## 1.13.0

### Features

- Add `filterSegments` property to `ExecuteRequest`

## 1.12.1

### Patch Changes

- Updated boolean serialization handling. APPDEV-9047

## 1.12.0

### Minor Changes

- Client updated to support latest API changes. NOISSUE
- Updated dependencies
  - @dynatrace-sdk/http-client@1.3.0

### Patch Changes

- Documentation removed from the package. APPDEV-8356

## 1.11.1

### Patch Changes

- Fix broken links in the readme file.

## 1.11.0

### Minor Changes

- Add `canonicalQuery` property to VerifyRequest
- Provide actual error code in the error message instead of wildcard. APPDEV-7744
- Add option to generate canonical query to `VerifyRequest`

### Patch Changes

- Do not print empty fields in the default message of an error. APPDEV-7630
- Fix typo in the description of `defaultTimeframeStart`
- Remove `Authorization` header
- Update documentation. APPDEV-8154

## 1.10.1

### Patch Changes

- Fixed explode method of query parameters serialization.
- Sanitize links in the documentation
- Add API reference to the readme file

## 1.10.0

### Minor Changes

- Add `QueryOptions` to `AutocompleteRequest`, `ExecuteRequest` and `ParseRequest`
- Add `shifted` parameter to `MetricMetadata`
- Add new token types to the `TokenType` enum

### Patch Changes

- Update http-client

## 1.9.1

### Patch Changes

- Update documentation

## 1.9.0

### Minor Changes

- `queryId` was added to ErrorResponseDetails
- `scannedDataPoints` was added to GrailMetadata (datapoints that have been scanned during a timeseries query)
- `maxDataSuggestions` was added to AutocompleteRequest (max number of dynamic entries that should be returned e.g. metric keys, metric dimensions and custom fields)

## 1.8.1

### Patch Changes

- Update documentation.

## 1.8.0

### Minor Changes

- `rollup` and `rate` properties were added to the `MetricMetadata` object

## 1.7.2

### Patch Changes

- Fixed a bug that caused abort errors from http-client to be wrapped in ApiClientError('UnexpectedError').

## 1.7.1

### Patch Changes

- Update dependencies.

## 1.7.0

### Minor Changes

- Handle 429 error code in query execution.
- Add `UID_VALUE` Autocomplete Token Type.
- Handle generic 4XX and 5XX error codes in query execution.

### Patch Changes

- Fixed a bug that caused internal http-client errors to be thrown for error responses.

## 1.6.0

### Minor Changes

- New response FieldType enum value: `uid`
- Add `enrich` query param to the query cancel method

## 1.5.1

### Patch Changes

- Update JSDoc examples.

## 1.5.0

### Minor Changes

- Change title from **Storage – Query Service** to **DQL Query**
- Support 400 error code for poll and cancel operations.

## 1.4.3

### Patch Changes

- Fix transformation of null values for nullable properties

## 1.4.2

### Patch Changes

- Update documentation
- Fix transformation of null and Date values
- Update package description
- Updated dependencies 

  - @dynatrace-sdk/http-client@1.0.6

## 1.4.1

### Patch Changes

- Update error messages
- Updated dependencies 

  - @dynatrace-sdk/http-client@1.0.5

## 1.4.0

### Minor Changes

- Add `max-result-bytes` query parameter to DPS Query API

## 1.3.1

### Patch Changes

- Update documentation

## 1.3.0

### Minor Changes

- Expose the metric metadata `fieldName`.

## 1.2.2

### Patch Changes

- Update docs.

## 1.2.1

### Patch Changes

- Add JSDoc @example for operations.
- Fix handling of the application/cloudevent+json content type.

## 1.2.0

### Minor Changes

- Add `sampled` property to GrailMetadata

## 1.1.0

### Minor Changes

- Export model transformations

## 1.0.6

### Patch Changes

- Move model transformations to a separate module
- Update `@dynatrace-sdk/http-client` to `^1.0.3`

## 1.0.5

### Patch Changes

- Update `@dynatrace-sdk/http-client` to `^1.0.1`
- Use parsed response body in error serializer

## 1.0.4

### Patch Changes

- Send response body in error serializer
- Updated dependencies
  - @dynatrace-sdk/http-client@1.0.0

## 1.0.3

### Patch Changes

- Updated descriptions and examples.

## 1.0.2

### Patch Changes

- Generate client package with template-typescript-client v0.13.10. Query question mark is now removed from url when there are no search params.

## 1.0.1

### Patch Changes

- Generate client package with template-typescript-client v0.13.9.
  Config param is now optional for valid operations.
  Improve error handling of unsupported data types.
- Process HTML tags in the documentation.
- Add missing typeguards and improve data transformations.

## 1.0.0

### Major Changes

- Initial release of @dynatrace-sdk/client-query.