@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.
Files changed (29) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +81 -28
  3. package/cjs/index.js +513 -253
  4. package/dynatrace-metadata.json +3 -3
  5. package/esm/index.js +513 -253
  6. package/package.json +2 -2
  7. package/types/packages/client/query/src/lib/error-envelopes/api-client-error.d.ts +1 -0
  8. package/types/packages/client/query/src/lib/error-envelopes/client-request-error.d.ts +1 -0
  9. package/types/packages/client/query/src/lib/error-envelopes/error-envelope-error.d.ts +1 -0
  10. package/types/packages/client/query/src/lib/error-envelopes/invalid-response-error.d.ts +1 -0
  11. package/types/packages/client/query/src/lib/models/autocomplete-suggestion.d.ts +1 -1
  12. package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.d.ts +14 -0
  13. package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.transformation.d.ts +10 -0
  14. package/types/packages/client/query/src/lib/models/error-response-details.d.ts +20 -7
  15. package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts +11 -7
  16. package/types/packages/client/query/src/lib/models/error-response.d.ts +1 -1
  17. package/types/packages/client/query/src/lib/models/error-response.transformation.d.ts +1 -1
  18. package/types/packages/client/query/src/lib/models/execute-request.d.ts +2 -0
  19. package/types/packages/client/query/src/lib/models/execute-request.transformation.d.ts +2 -0
  20. package/types/packages/client/query/src/lib/models/filter-segment-variable-definition.d.ts +7 -0
  21. package/types/packages/client/query/src/lib/models/filter-segment-variable-definition.transformation.d.ts +9 -0
  22. package/types/packages/client/query/src/lib/models/filter-segment.d.ts +8 -0
  23. package/types/packages/client/query/src/lib/models/filter-segment.transformation.d.ts +10 -0
  24. package/types/packages/client/query/src/lib/models/filter-segments.d.ts +6 -0
  25. package/types/packages/client/query/src/lib/models/filter-segments.transformation.d.ts +6 -0
  26. package/types/packages/client/query/src/lib/models/index.d.ts +8 -0
  27. package/types/packages/client/query/src/lib/models/query-options.d.ts +1 -1
  28. package/types/packages/http-client/src/lib/types/abort-signal.d.ts +4 -1
  29. package/docs/DOCS.md +0 -1207
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  @dynatrace-sdk/client-query
4
4
 
5
+ ## 1.13.0
6
+
7
+ ### Features
8
+
9
+ - Add `filterSegments` property to `ExecuteRequest`
10
+
11
+ ## 1.12.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated boolean serialization handling. APPDEV-9047
16
+
17
+ ## 1.12.0
18
+
19
+ ### Minor Changes
20
+
21
+ - Client updated to support latest API changes. NOISSUE
22
+ - Updated dependencies
23
+ - @dynatrace-sdk/http-client@1.3.0
24
+
25
+ ### Patch Changes
26
+
27
+ - Documentation removed from the package. APPDEV-8356
28
+
5
29
  ## 1.11.1
6
30
 
7
31
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @dynatrace-sdk/client-query
2
2
 
3
- [![npm](https://img.shields.io/badge/npm-v1.11.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.11.1)
3
+ [![npm](https://img.shields.io/badge/npm-v1.13.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.13.0)
4
4
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5
5
 
6
6
  Exposes an API to fetch records stored in Grail
@@ -729,7 +729,7 @@ Single suggestion for completion of the query.
729
729
 
730
730
  | Name | Type | Description |
731
731
  | --- | --- | --- |
732
- |alreadyTypedCharacters<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Number of characters that the user user already typed for this suggestion. |
732
+ |alreadyTypedCharacters<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Number of characters that the user already typed for this suggestion. |
733
733
  |parts<sup>*required</sup>|Array&lt;<a href="#autocompletesuggestionpart">AutocompleteSuggestionPart</a>&gt;|List of suggestion parts. |
734
734
  |suggestion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The suggested continuation of the query. |
735
735
 
@@ -826,7 +826,7 @@ The response for error state
826
826
  | Name | Type | Description |
827
827
  | --- | --- | --- |
828
828
  |code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Error code, which normally matches the HTTP error code. |
829
- |details<sup>*required</sup>|<a href="#errorresponsedetails" target="_blank" rel="noopener noreferrer">ErrorResponseDetails</a>| |
829
+ |details|<a href="#errorresponsedetails" target="_blank" rel="noopener noreferrer">ErrorResponseDetails</a>| |
830
830
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A short, clear error message without details |
831
831
 
832
832
  ### ErrorResponseDetails
@@ -838,15 +838,31 @@ Detailed information about the error.
838
838
 
839
839
  | Name | Type | Description |
840
840
  | --- | --- | --- |
841
- |arguments<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The arguments for the message format. |
842
- |errorMessage<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Complete error message. |
843
- |errorMessageFormat<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The message format of the error message, string.format based. |
844
- |errorMessageFormatSpecifierTypes<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The corresponding DQL format specifier types for each format specifier used in the error message format. |
845
- |errorType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The error type, e.g. COMMAND_NAME_MISSING |
846
- |exceptionType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The exception type. |
841
+ |arguments|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The arguments for the message format. |
842
+ |constraintViolations|Array&lt;<a href="#errorresponsedetailsconstraintviolationsitem">ErrorResponseDetailsConstraintViolationsItem</a>&gt;|Information about an input parameter that violated some validation rule of the service API. |
843
+ |errorMessage|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Complete error message. |
844
+ |errorMessageFormat|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The message format of the error message, string.format based. |
845
+ |errorMessageFormatSpecifierTypes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The corresponding DQL format specifier types for each format specifier used in the error message format. |
846
+ |errorType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The error type, e.g. COMMAND_NAME_MISSING |
847
+ |exceptionType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The exception type. |
848
+ |missingPermissions|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|List of missing IAM permissions necessary to successfully execute the request. |
849
+ |missingScopes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|List of missing IAM scopes necessary to successfully execute the request. |
847
850
  |queryId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
848
- |queryString<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Submitted query string. |
849
- |syntaxErrorPosition|<a href="#tokenposition">TokenPosition</a>| |
851
+ |queryString|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Submitted query string. |
852
+ |syntaxErrorPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>| |
853
+
854
+ ### ErrorResponseDetailsConstraintViolationsItem
855
+
856
+
857
+
858
+
859
+
860
+
861
+ | Name | Type | Description |
862
+ | --- | --- | --- |
863
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Message describing the error. |
864
+ |parameterDescriptor|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Describes the violating parameter. |
865
+ |parameterLocation|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Describes the general location of the violating parameter. |
850
866
 
851
867
  ### ExecuteRequest
852
868
 
@@ -863,6 +879,7 @@ Detailed information about the error.
863
879
  |defaultTimeframeStart|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timeframe 'start' timestamp in ISO-8601 or RFC3339 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> |
864
880
  |enablePreview|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Request preview results. If a preview is available within the requestTimeoutMilliseconds, then it will be returned as part of the response. |
865
881
  |fetchTimeoutSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The query will stop reading data after reaching the fetch-timeout. The query execution will continue, providing a partial result based on the read data. |
882
+ |filterSegments|<a href="#filtersegments">FilterSegments</a>| |
866
883
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|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'. |
867
884
  |maxResultBytes|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result bytes that this query will return. |
868
885
  |maxResultRecords|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result records that this query will return. |
@@ -883,6 +900,42 @@ The possible type of a field in DQL.
883
900
  |type<sup>*required</sup>|FieldTypeType|
884
901
  |types|Array&lt;<a href="#rangedfieldtypes">RangedFieldTypes</a>&gt;|
885
902
 
903
+ ### FilterSegment
904
+
905
+
906
+
907
+
908
+ A filter segment is identified by an ID. Each segment includes a list of variable definitions.
909
+
910
+ | Name | Type |
911
+ | --- | --- |
912
+ |id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
913
+ |variables|Array&lt;<a href="#filtersegmentvariabledefinition" target="_blank" rel="noopener noreferrer">FilterSegmentVariableDefinition</a>&gt;|
914
+
915
+ ### FilterSegmentVariableDefinition
916
+
917
+
918
+
919
+
920
+ Defines a variable with a name and a list of values.
921
+
922
+ | Name | Type |
923
+ | --- | --- |
924
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
925
+ |values<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|
926
+
927
+ ### FilterSegments
928
+
929
+
930
+ extends `Array<FilterSegment>`
931
+
932
+ Represents a collection of filter segments.
933
+
934
+ | Name | Type | Description |
935
+ | --- | --- | --- |
936
+ |[unscopables]<sup>*required</sup>|Object|<p>Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.</p> |
937
+ |length<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Gets or sets the length of the array. This is a number one higher than the highest index in the array. |
938
+
886
939
  ### GeoPoint
887
940
 
888
941
 
@@ -904,12 +957,12 @@ Collects various bits of metadata information.
904
957
 
905
958
  | Name | Type | Description |
906
959
  | --- | --- | --- |
907
- |analysisTimeframe|<a href="#timeframe" target="_blank" rel="noopener noreferrer">Timeframe</a>| |
960
+ |analysisTimeframe|<a href="#timeframe">Timeframe</a>| |
908
961
  |canonicalQuery|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The canonical form of the query. It has normalized spaces and canonical constructs. |
909
962
  |dqlVersion|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of DQL that was used to process the query request. |
910
963
  |executionTimeMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The time it took to execute the query. |
911
964
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Effective locale for the query. |
912
- |notifications|Array&lt;<a href="#metadatanotification">MetadataNotification</a>&gt;|Collected messages during the execution of the query. |
965
+ |notifications|Array&lt;<a href="#metadatanotification" target="_blank" rel="noopener noreferrer">MetadataNotification</a>&gt;|Collected messages during the execution of the query. |
913
966
  |query|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The submitted query. |
914
967
  |queryId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The id of the query |
915
968
  |sampled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if sampling was used for at least one segment. |
@@ -927,8 +980,8 @@ Collects various bits of metadata information.
927
980
 
928
981
  | Name | Type |
929
982
  | --- | --- |
930
- |grail|<a href="#grailmetadata" target="_blank" rel="noopener noreferrer">GrailMetadata</a>|
931
- |metrics|Array&lt;<a href="#metricmetadata">MetricMetadata</a>&gt;|
983
+ |grail|<a href="#grailmetadata">GrailMetadata</a>|
984
+ |metrics|Array&lt;<a href="#metricmetadata" target="_blank" rel="noopener noreferrer">MetricMetadata</a>&gt;|
932
985
 
933
986
  ### MetadataNotification
934
987
 
@@ -945,7 +998,7 @@ The message that provides additional information about the execution of the quer
945
998
  |messageFormatSpecifierTypes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The corresponding DQL format specifier types for each format specifier used in the error message format. |
946
999
  |notificationType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The notification type, e.g. LIMIT_ADDED. |
947
1000
  |severity|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The severity of the notification, currently: INFO, WARN, ERROR. |
948
- |syntaxPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>| |
1001
+ |syntaxPosition|<a href="#tokenposition">TokenPosition</a>| |
949
1002
 
950
1003
  ### MetricMetadata
951
1004
 
@@ -976,7 +1029,7 @@ An object that defines additional metric metadata.
976
1029
  | --- | --- | --- |
977
1030
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|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'. |
978
1031
  |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
979
- |queryOptions|<a href="#queryoptions">QueryOptions</a>| |
1032
+ |queryOptions|<a href="#queryoptions" target="_blank" rel="noopener noreferrer">QueryOptions</a>| |
980
1033
  |timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|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' |
981
1034
 
982
1035
  ### PositionInfo
@@ -997,7 +1050,7 @@ The exact position in the query string.
997
1050
 
998
1051
 
999
1052
 
1000
- Query options.
1053
+ Query options enhance query functionality for Dynatrace internal services.
1001
1054
 
1002
1055
  ### QueryPollResponse
1003
1056
 
@@ -1009,7 +1062,7 @@ The response of GET query:execute call.
1009
1062
  | Name | Type | Description |
1010
1063
  | --- | --- | --- |
1011
1064
  |progress|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The progress of the query from 0 to 100. |
1012
- |result|<a href="#queryresult" target="_blank" rel="noopener noreferrer">QueryResult</a>| |
1065
+ |result|<a href="#queryresult">QueryResult</a>| |
1013
1066
  |state<sup>*required</sup>|QueryState| |
1014
1067
  |ttlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Time to live in seconds. |
1015
1068
 
@@ -1022,9 +1075,9 @@ The result of the DQL query.
1022
1075
 
1023
1076
  | Name | Type | Description |
1024
1077
  | --- | --- | --- |
1025
- |metadata<sup>*required</sup>|<a href="#metadata">Metadata</a>| |
1026
- |records<sup>*required</sup>|Array&lt;null &#124; <a href="#resultrecord" target="_blank" rel="noopener noreferrer">ResultRecord</a>&gt;|List of records containing the result fields data. |
1027
- |types<sup>*required</sup>|Array&lt;<a href="#rangedfieldtypes">RangedFieldTypes</a>&gt;|The data types for the result records. |
1078
+ |metadata<sup>*required</sup>|<a href="#metadata" target="_blank" rel="noopener noreferrer">Metadata</a>| |
1079
+ |records<sup>*required</sup>|Array&lt;null &#124; <a href="#resultrecord">ResultRecord</a>&gt;|List of records containing the result fields data. |
1080
+ |types<sup>*required</sup>|Array&lt;<a href="#rangedfieldtypes" target="_blank" rel="noopener noreferrer">RangedFieldTypes</a>&gt;|The data types for the result records. |
1028
1081
 
1029
1082
  ### QueryStartResponse
1030
1083
 
@@ -1037,7 +1090,7 @@ The response when starting a query.
1037
1090
  | --- | --- | --- |
1038
1091
  |progress|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The progress of the query from 0 to 100. |
1039
1092
  |requestToken|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The token returned by the POST query:execute call. |
1040
- |result|<a href="#queryresult" target="_blank" rel="noopener noreferrer">QueryResult</a>| |
1093
+ |result|<a href="#queryresult">QueryResult</a>| |
1041
1094
  |state<sup>*required</sup>|QueryState| |
1042
1095
  |ttlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Time to live in seconds. |
1043
1096
 
@@ -1051,7 +1104,7 @@ The field type in range.
1051
1104
  | Name | Type | Description |
1052
1105
  | --- | --- | --- |
1053
1106
  |indexRange|Array&lt;[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)&gt;|The range of elements at use this type in arrays (null for records). |
1054
- |mappings<sup>*required</sup>|<a href="#rangedfieldtypesmappings">RangedFieldTypesMappings</a>| |
1107
+ |mappings<sup>*required</sup>|<a href="#rangedfieldtypesmappings" target="_blank" rel="noopener noreferrer">RangedFieldTypesMappings</a>| |
1055
1108
 
1056
1109
  ### RangedFieldTypesMappings
1057
1110
  **type**: Record&lt;string, FieldType | undefined&gt;
@@ -1088,8 +1141,8 @@ The position of a token in a query string used for errors and notification to ma
1088
1141
 
1089
1142
  | Name | Type |
1090
1143
  | --- | --- |
1091
- |end<sup>*required</sup>|<a href="#positioninfo" target="_blank" rel="noopener noreferrer">PositionInfo</a>|
1092
- |start<sup>*required</sup>|<a href="#positioninfo">PositionInfo</a>|
1144
+ |end<sup>*required</sup>|<a href="#positioninfo">PositionInfo</a>|
1145
+ |start<sup>*required</sup>|<a href="#positioninfo" target="_blank" rel="noopener noreferrer">PositionInfo</a>|
1093
1146
 
1094
1147
  ### VerifyRequest
1095
1148
 
@@ -1103,7 +1156,7 @@ The position of a token in a query string used for errors and notification to ma
1103
1156
  |generateCanonicalQuery|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <i>default:</i> <code>false</code>|
1104
1157
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|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'. |
1105
1158
  |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
1106
- |queryOptions|<a href="#queryoptions" target="_blank" rel="noopener noreferrer">QueryOptions</a>| |
1159
+ |queryOptions|<a href="#queryoptions">QueryOptions</a>| |
1107
1160
  |timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|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' |
1108
1161
 
1109
1162
  ### VerifyResponse
@@ -1116,7 +1169,7 @@ Verify response.
1116
1169
  | Name | Type | Description |
1117
1170
  | --- | --- | --- |
1118
1171
  |canonicalQuery|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
1119
- |notifications|Array&lt;<a href="#metadatanotification">MetadataNotification</a>&gt;|The notifications related to the supplied DQL query string. |
1172
+ |notifications|Array&lt;<a href="#metadatanotification" target="_blank" rel="noopener noreferrer">MetadataNotification</a>&gt;|The notifications related to the supplied DQL query string. |
1120
1173
  |valid<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the supplied DQL query string is valid. |
1121
1174
 
1122
1175
  ## Enums