@dynatrace-sdk/client-query 1.11.0 → 1.12.1

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 (34) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +73 -53
  3. package/cjs/index.js +782 -243
  4. package/dynatrace-metadata.json +2 -2
  5. package/esm/index.js +782 -243
  6. package/package.json +2 -2
  7. package/types/packages/client/query/src/lib/models/dql-node-node-type.transformation.d.ts +1 -1
  8. package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.d.ts +14 -0
  9. package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.transformation.d.ts +10 -0
  10. package/types/packages/client/query/src/lib/models/error-response-details.d.ts +20 -7
  11. package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts +11 -7
  12. package/types/packages/client/query/src/lib/models/error-response.d.ts +1 -1
  13. package/types/packages/client/query/src/lib/models/error-response.transformation.d.ts +1 -1
  14. package/types/packages/client/query/src/lib/models/field-type-type.transformation.d.ts +1 -1
  15. package/types/packages/client/query/src/lib/models/index.d.ts +2 -0
  16. package/types/packages/client/query/src/lib/models/query-state.transformation.d.ts +1 -1
  17. package/types/packages/client/query/src/lib/models/result-record-value.d.ts +1 -1
  18. package/types/packages/client/query/src/lib/models/result-record-value.transformation.d.ts +1 -1
  19. package/types/packages/client/query/src/lib/models/token-type.transformation.d.ts +1 -1
  20. package/types/packages/client/query/src/lib/utils/url-helpers.d.ts +1 -1
  21. package/types/packages/http-client/src/lib/platform/abort-controller.d.ts +1 -1
  22. package/types/packages/http-client/src/lib/platform/abort-signal.d.ts +1 -1
  23. package/types/packages/http-client/src/lib/platform/decode-form-data.d.ts +48 -0
  24. package/types/packages/http-client/src/lib/platform/http-client.d.ts +8 -0
  25. package/types/packages/http-client/src/lib/types/abort-signal.d.ts +4 -1
  26. package/types/packages/http-client/src/lib/types/data-types.d.ts +1 -1
  27. package/types/packages/http-client/src/lib/types/form-data-request-body.d.ts +2 -2
  28. package/types/packages/http-client/src/lib/types/form-data-response-body.d.ts +2 -2
  29. package/types/packages/http-client/src/lib/types/request-body-types.d.ts +1 -1
  30. package/types/packages/http-client/src/lib/types/response-body-types.d.ts +1 -1
  31. package/types/packages/platform/error-handlers/src/lib/types/global-dt-runtime-with-error-handlers.d.ts +1 -1
  32. package/types/packages/platform/error-handlers/src/lib/types/global-error-serializer.d.ts +1 -1
  33. package/types/packages/platform/error-handlers/src/lib/types/serialized-error.d.ts +1 -1
  34. package/docs/DOCS.md +0 -1207
package/esm/index.js CHANGED
@@ -978,30 +978,97 @@ function toJson7($model, includeChildProps = true) {
978
978
  var error_envelope_transformation_exports = {};
979
979
  __export(error_envelope_transformation_exports, {
980
980
  fromFormData: () => fromFormData2,
981
- fromJson: () => fromJson16,
981
+ fromJson: () => fromJson17,
982
982
  isErrorEnvelope: () => isErrorEnvelope,
983
- isJson: () => isJson16,
983
+ isJson: () => isJson17,
984
984
  toFormData: () => toFormData2,
985
- toJson: () => toJson16
985
+ toJson: () => toJson17
986
986
  });
987
987
 
988
988
  // packages/client/query/src/lib/models/error-response.transformation.ts
989
989
  var error_response_transformation_exports = {};
990
990
  __export(error_response_transformation_exports, {
991
- fromJson: () => fromJson15,
991
+ fromJson: () => fromJson16,
992
992
  isErrorResponse: () => isErrorResponse,
993
- isJson: () => isJson15,
994
- toJson: () => toJson15
993
+ isJson: () => isJson16,
994
+ toJson: () => toJson16
995
995
  });
996
996
 
997
997
  // packages/client/query/src/lib/models/error-response-details.transformation.ts
998
998
  var error_response_details_transformation_exports = {};
999
999
  __export(error_response_details_transformation_exports, {
1000
- fromJson: () => fromJson14,
1000
+ fromJson: () => fromJson15,
1001
1001
  isErrorResponseDetails: () => isErrorResponseDetails,
1002
+ isJson: () => isJson15,
1003
+ toJson: () => toJson15
1004
+ });
1005
+
1006
+ // packages/client/query/src/lib/models/error-response-details-constraint-violations-item.transformation.ts
1007
+ var error_response_details_constraint_violations_item_transformation_exports = {};
1008
+ __export(error_response_details_constraint_violations_item_transformation_exports, {
1009
+ fromJson: () => fromJson14,
1010
+ isErrorResponseDetailsConstraintViolationsItem: () => isErrorResponseDetailsConstraintViolationsItem,
1002
1011
  isJson: () => isJson14,
1003
1012
  toJson: () => toJson14
1004
1013
  });
1014
+ function isErrorResponseDetailsConstraintViolationsItem(value) {
1015
+ if (value === null) {
1016
+ return false;
1017
+ }
1018
+ if (value === void 0) {
1019
+ return false;
1020
+ }
1021
+ if (Array.isArray(value)) {
1022
+ return false;
1023
+ }
1024
+ const modelKeys = /* @__PURE__ */ new Set(["message", "parameterLocation", "parameterDescriptor"]);
1025
+ const hasAdditionalProperties = false;
1026
+ const requiredKeys = ["message"];
1027
+ const optionalKeys = ["parameterLocation", "parameterDescriptor"];
1028
+ const valKeys = new Set(Object.keys(value));
1029
+ const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1030
+ const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
1031
+ const allPropertiesMatchFormat = true;
1032
+ return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1033
+ }
1034
+ function isJson14(value) {
1035
+ if (value === null) {
1036
+ return false;
1037
+ }
1038
+ if (value === void 0) {
1039
+ return false;
1040
+ }
1041
+ if (Array.isArray(value)) {
1042
+ return false;
1043
+ }
1044
+ const modelKeys = /* @__PURE__ */ new Set(["message", "parameterLocation", "parameterDescriptor"]);
1045
+ const hasAdditionalProperties = false;
1046
+ const requiredKeys = ["message"];
1047
+ const optionalKeys = ["parameterLocation", "parameterDescriptor"];
1048
+ const valKeys = new Set(Object.keys(value));
1049
+ const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1050
+ const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
1051
+ const allPropertiesMatchFormat = true;
1052
+ return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1053
+ }
1054
+ function fromJson14($model) {
1055
+ const { message, parameterLocation, parameterDescriptor } = $model;
1056
+ return {
1057
+ message,
1058
+ parameterLocation,
1059
+ parameterDescriptor
1060
+ };
1061
+ }
1062
+ function toJson14($model) {
1063
+ const { message, parameterLocation, parameterDescriptor } = $model;
1064
+ return {
1065
+ message,
1066
+ parameterLocation,
1067
+ parameterDescriptor
1068
+ };
1069
+ }
1070
+
1071
+ // packages/client/query/src/lib/models/error-response-details.transformation.ts
1005
1072
  function isErrorResponseDetails(value) {
1006
1073
  if (value === null) {
1007
1074
  return false;
@@ -1021,26 +1088,34 @@ function isErrorResponseDetails(value) {
1021
1088
  "queryString",
1022
1089
  "errorMessageFormatSpecifierTypes",
1023
1090
  "errorMessageFormat",
1024
- "queryId"
1091
+ "queryId",
1092
+ "constraintViolations",
1093
+ "missingScopes",
1094
+ "missingPermissions"
1025
1095
  ]);
1026
1096
  const hasAdditionalProperties = false;
1027
- const requiredKeys = [
1028
- "arguments",
1097
+ const requiredKeys = [];
1098
+ const optionalKeys = [
1099
+ "exceptionType",
1100
+ "syntaxErrorPosition",
1101
+ "errorType",
1029
1102
  "errorMessage",
1030
- "errorMessageFormat",
1103
+ "arguments",
1104
+ "queryString",
1031
1105
  "errorMessageFormatSpecifierTypes",
1032
- "errorType",
1033
- "exceptionType",
1034
- "queryString"
1106
+ "errorMessageFormat",
1107
+ "queryId",
1108
+ "constraintViolations",
1109
+ "missingScopes",
1110
+ "missingPermissions"
1035
1111
  ];
1036
- const optionalKeys = ["syntaxErrorPosition", "queryId"];
1037
1112
  const valKeys = new Set(Object.keys(value));
1038
1113
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1039
1114
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
1040
1115
  const allPropertiesMatchFormat = true;
1041
1116
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1042
1117
  }
1043
- function isJson14(value) {
1118
+ function isJson15(value) {
1044
1119
  if (value === null) {
1045
1120
  return false;
1046
1121
  }
@@ -1059,26 +1134,34 @@ function isJson14(value) {
1059
1134
  "queryString",
1060
1135
  "errorMessageFormatSpecifierTypes",
1061
1136
  "errorMessageFormat",
1062
- "queryId"
1137
+ "queryId",
1138
+ "constraintViolations",
1139
+ "missingScopes",
1140
+ "missingPermissions"
1063
1141
  ]);
1064
1142
  const hasAdditionalProperties = false;
1065
- const requiredKeys = [
1066
- "arguments",
1143
+ const requiredKeys = [];
1144
+ const optionalKeys = [
1145
+ "exceptionType",
1146
+ "syntaxErrorPosition",
1147
+ "errorType",
1067
1148
  "errorMessage",
1068
- "errorMessageFormat",
1149
+ "arguments",
1150
+ "queryString",
1069
1151
  "errorMessageFormatSpecifierTypes",
1070
- "errorType",
1071
- "exceptionType",
1072
- "queryString"
1152
+ "errorMessageFormat",
1153
+ "queryId",
1154
+ "constraintViolations",
1155
+ "missingScopes",
1156
+ "missingPermissions"
1073
1157
  ];
1074
- const optionalKeys = ["syntaxErrorPosition", "queryId"];
1075
1158
  const valKeys = new Set(Object.keys(value));
1076
1159
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1077
1160
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
1078
1161
  const allPropertiesMatchFormat = true;
1079
1162
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1080
1163
  }
1081
- function fromJson14($model) {
1164
+ function fromJson15($model) {
1082
1165
  const {
1083
1166
  exceptionType,
1084
1167
  syntaxErrorPosition,
@@ -1088,21 +1171,29 @@ function fromJson14($model) {
1088
1171
  queryString,
1089
1172
  errorMessageFormatSpecifierTypes,
1090
1173
  errorMessageFormat,
1091
- queryId
1174
+ queryId,
1175
+ constraintViolations,
1176
+ missingScopes,
1177
+ missingPermissions
1092
1178
  } = $model;
1093
1179
  return {
1094
1180
  exceptionType,
1095
1181
  syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? fromJson13(syntaxErrorPosition) : void 0,
1096
1182
  errorType,
1097
1183
  errorMessage,
1098
- arguments: _arguments?.slice(0),
1184
+ arguments: _arguments !== void 0 && _arguments !== null ? _arguments?.slice(0) : void 0,
1099
1185
  queryString,
1100
- errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
1186
+ errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes !== void 0 && errorMessageFormatSpecifierTypes !== null ? errorMessageFormatSpecifierTypes?.slice(0) : void 0,
1101
1187
  errorMessageFormat,
1102
- queryId
1188
+ queryId,
1189
+ constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map(
1190
+ (innerValue) => fromJson14(innerValue)
1191
+ ) : void 0,
1192
+ missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0,
1193
+ missingPermissions: missingPermissions !== void 0 && missingPermissions !== null ? missingPermissions?.slice(0) : void 0
1103
1194
  };
1104
1195
  }
1105
- function toJson14($model) {
1196
+ function toJson15($model) {
1106
1197
  const {
1107
1198
  exceptionType,
1108
1199
  syntaxErrorPosition,
@@ -1112,18 +1203,26 @@ function toJson14($model) {
1112
1203
  queryString,
1113
1204
  errorMessageFormatSpecifierTypes,
1114
1205
  errorMessageFormat,
1115
- queryId
1206
+ queryId,
1207
+ constraintViolations,
1208
+ missingScopes,
1209
+ missingPermissions
1116
1210
  } = $model;
1117
1211
  return {
1118
1212
  exceptionType,
1119
1213
  syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? toJson13(syntaxErrorPosition) : void 0,
1120
1214
  errorType,
1121
1215
  errorMessage,
1122
- arguments: _arguments?.slice(0),
1216
+ arguments: _arguments !== void 0 && _arguments !== null ? _arguments?.slice(0) : void 0,
1123
1217
  queryString,
1124
- errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
1218
+ errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes !== void 0 && errorMessageFormatSpecifierTypes !== null ? errorMessageFormatSpecifierTypes?.slice(0) : void 0,
1125
1219
  errorMessageFormat,
1126
- queryId
1220
+ queryId,
1221
+ constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map(
1222
+ (innerValue) => toJson14(innerValue)
1223
+ ) : void 0,
1224
+ missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0,
1225
+ missingPermissions: missingPermissions !== void 0 && missingPermissions !== null ? missingPermissions?.slice(0) : void 0
1127
1226
  };
1128
1227
  }
1129
1228
 
@@ -1140,15 +1239,15 @@ function isErrorResponse(value) {
1140
1239
  }
1141
1240
  const modelKeys = /* @__PURE__ */ new Set(["message", "details", "code"]);
1142
1241
  const hasAdditionalProperties = false;
1143
- const requiredKeys = ["code", "details", "message"];
1144
- const optionalKeys = [];
1242
+ const requiredKeys = ["code", "message"];
1243
+ const optionalKeys = ["details"];
1145
1244
  const valKeys = new Set(Object.keys(value));
1146
1245
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1147
1246
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
1148
1247
  const allPropertiesMatchFormat = true;
1149
1248
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1150
1249
  }
1151
- function isJson15(value) {
1250
+ function isJson16(value) {
1152
1251
  if (value === null) {
1153
1252
  return false;
1154
1253
  }
@@ -1160,27 +1259,27 @@ function isJson15(value) {
1160
1259
  }
1161
1260
  const modelKeys = /* @__PURE__ */ new Set(["message", "details", "code"]);
1162
1261
  const hasAdditionalProperties = false;
1163
- const requiredKeys = ["code", "details", "message"];
1164
- const optionalKeys = [];
1262
+ const requiredKeys = ["code", "message"];
1263
+ const optionalKeys = ["details"];
1165
1264
  const valKeys = new Set(Object.keys(value));
1166
1265
  const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
1167
1266
  const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
1168
1267
  const allPropertiesMatchFormat = true;
1169
1268
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1170
1269
  }
1171
- function fromJson15($model) {
1270
+ function fromJson16($model) {
1172
1271
  const { message, details, code } = $model;
1173
1272
  return {
1174
1273
  message,
1175
- details: fromJson14(details),
1274
+ details: details !== void 0 && details !== null ? fromJson15(details) : void 0,
1176
1275
  code
1177
1276
  };
1178
1277
  }
1179
- function toJson15($model) {
1278
+ function toJson16($model) {
1180
1279
  const { message, details, code } = $model;
1181
1280
  return {
1182
1281
  message,
1183
- details: toJson14(details),
1282
+ details: details !== void 0 && details !== null ? toJson15(details) : void 0,
1184
1283
  code
1185
1284
  };
1186
1285
  }
@@ -1206,7 +1305,7 @@ function isErrorEnvelope(value) {
1206
1305
  const allPropertiesMatchFormat = true;
1207
1306
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1208
1307
  }
1209
- function isJson16(value) {
1308
+ function isJson17(value) {
1210
1309
  if (value === null) {
1211
1310
  return false;
1212
1311
  }
@@ -1226,26 +1325,26 @@ function isJson16(value) {
1226
1325
  const allPropertiesMatchFormat = true;
1227
1326
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1228
1327
  }
1229
- function fromJson16($model) {
1328
+ function fromJson17($model) {
1230
1329
  const { error } = $model;
1231
1330
  return {
1232
- error: fromJson15(error)
1331
+ error: fromJson16(error)
1233
1332
  };
1234
1333
  }
1235
- function toJson16($model) {
1334
+ function toJson17($model) {
1236
1335
  const { error } = $model;
1237
1336
  return {
1238
- error: toJson15(error)
1337
+ error: toJson16(error)
1239
1338
  };
1240
1339
  }
1241
1340
  function fromFormData2(formData) {
1242
1341
  const formDataEntries = Object.fromEntries(formData.map((data) => [data.name, data.value]));
1243
1342
  return {
1244
- error: fromJson15(JSON.parse(formDataEntries["error"]))
1343
+ error: fromJson16(JSON.parse(formDataEntries["error"]))
1245
1344
  };
1246
1345
  }
1247
1346
  function toFormData2($model) {
1248
- const json = toJson16($model);
1347
+ const json = toJson17($model);
1249
1348
  const body = [{ name: "error", type: "json", value: json["error"] }];
1250
1349
  return body;
1251
1350
  }
@@ -1253,10 +1352,10 @@ function toFormData2($model) {
1253
1352
  // packages/client/query/src/lib/models/parse-request.transformation.ts
1254
1353
  var parse_request_transformation_exports = {};
1255
1354
  __export(parse_request_transformation_exports, {
1256
- fromJson: () => fromJson17,
1257
- isJson: () => isJson17,
1355
+ fromJson: () => fromJson18,
1356
+ isJson: () => isJson18,
1258
1357
  isParseRequest: () => isParseRequest,
1259
- toJson: () => toJson17
1358
+ toJson: () => toJson18
1260
1359
  });
1261
1360
  function isParseRequest(value) {
1262
1361
  if (value === null) {
@@ -1278,7 +1377,7 @@ function isParseRequest(value) {
1278
1377
  const allPropertiesMatchFormat = true;
1279
1378
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1280
1379
  }
1281
- function isJson17(value) {
1380
+ function isJson18(value) {
1282
1381
  if (value === null) {
1283
1382
  return false;
1284
1383
  }
@@ -1298,7 +1397,7 @@ function isJson17(value) {
1298
1397
  const allPropertiesMatchFormat = true;
1299
1398
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1300
1399
  }
1301
- function fromJson17($model) {
1400
+ function fromJson18($model) {
1302
1401
  const { query, timezone, locale, queryOptions } = $model;
1303
1402
  return {
1304
1403
  query,
@@ -1307,7 +1406,7 @@ function fromJson17($model) {
1307
1406
  queryOptions: queryOptions !== void 0 && queryOptions !== null ? fromJson(queryOptions) : void 0
1308
1407
  };
1309
1408
  }
1310
- function toJson17($model) {
1409
+ function toJson18($model) {
1311
1410
  const { query, timezone, locale, queryOptions } = $model;
1312
1411
  return {
1313
1412
  query,
@@ -1320,10 +1419,10 @@ function toJson17($model) {
1320
1419
  // packages/client/query/src/lib/models/verify-request.transformation.ts
1321
1420
  var verify_request_transformation_exports = {};
1322
1421
  __export(verify_request_transformation_exports, {
1323
- fromJson: () => fromJson18,
1324
- isJson: () => isJson18,
1422
+ fromJson: () => fromJson19,
1423
+ isJson: () => isJson19,
1325
1424
  isVerifyRequest: () => isVerifyRequest,
1326
- toJson: () => toJson18
1425
+ toJson: () => toJson19
1327
1426
  });
1328
1427
  function isVerifyRequest(value) {
1329
1428
  if (value === null) {
@@ -1345,7 +1444,7 @@ function isVerifyRequest(value) {
1345
1444
  const allPropertiesMatchFormat = true;
1346
1445
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1347
1446
  }
1348
- function isJson18(value) {
1447
+ function isJson19(value) {
1349
1448
  if (value === null) {
1350
1449
  return false;
1351
1450
  }
@@ -1365,7 +1464,7 @@ function isJson18(value) {
1365
1464
  const allPropertiesMatchFormat = true;
1366
1465
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1367
1466
  }
1368
- function fromJson18($model) {
1467
+ function fromJson19($model) {
1369
1468
  const { query, timezone, locale, queryOptions, generateCanonicalQuery } = $model;
1370
1469
  return {
1371
1470
  query,
@@ -1375,7 +1474,7 @@ function fromJson18($model) {
1375
1474
  generateCanonicalQuery
1376
1475
  };
1377
1476
  }
1378
- function toJson18($model) {
1477
+ function toJson19($model) {
1379
1478
  const { query, timezone, locale, queryOptions, generateCanonicalQuery } = $model;
1380
1479
  return {
1381
1480
  query,
@@ -1389,19 +1488,19 @@ function toJson18($model) {
1389
1488
  // packages/client/query/src/lib/models/verify-response.transformation.ts
1390
1489
  var verify_response_transformation_exports = {};
1391
1490
  __export(verify_response_transformation_exports, {
1392
- fromJson: () => fromJson20,
1393
- isJson: () => isJson20,
1491
+ fromJson: () => fromJson21,
1492
+ isJson: () => isJson21,
1394
1493
  isVerifyResponse: () => isVerifyResponse,
1395
- toJson: () => toJson20
1494
+ toJson: () => toJson21
1396
1495
  });
1397
1496
 
1398
1497
  // packages/client/query/src/lib/models/metadata-notification.transformation.ts
1399
1498
  var metadata_notification_transformation_exports = {};
1400
1499
  __export(metadata_notification_transformation_exports, {
1401
- fromJson: () => fromJson19,
1402
- isJson: () => isJson19,
1500
+ fromJson: () => fromJson20,
1501
+ isJson: () => isJson20,
1403
1502
  isMetadataNotification: () => isMetadataNotification,
1404
- toJson: () => toJson19
1503
+ toJson: () => toJson20
1405
1504
  });
1406
1505
  function isMetadataNotification(value) {
1407
1506
  if (value === null) {
@@ -1439,7 +1538,7 @@ function isMetadataNotification(value) {
1439
1538
  const allPropertiesMatchFormat = true;
1440
1539
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1441
1540
  }
1442
- function isJson19(value) {
1541
+ function isJson20(value) {
1443
1542
  if (value === null) {
1444
1543
  return false;
1445
1544
  }
@@ -1475,7 +1574,7 @@ function isJson19(value) {
1475
1574
  const allPropertiesMatchFormat = true;
1476
1575
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1477
1576
  }
1478
- function fromJson19($model) {
1577
+ function fromJson20($model) {
1479
1578
  const {
1480
1579
  severity,
1481
1580
  messageFormat,
@@ -1495,7 +1594,7 @@ function fromJson19($model) {
1495
1594
  message
1496
1595
  };
1497
1596
  }
1498
- function toJson19($model) {
1597
+ function toJson20($model) {
1499
1598
  const {
1500
1599
  severity,
1501
1600
  messageFormat,
@@ -1537,7 +1636,7 @@ function isVerifyResponse(value) {
1537
1636
  const allPropertiesMatchFormat = true;
1538
1637
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1539
1638
  }
1540
- function isJson20(value) {
1639
+ function isJson21(value) {
1541
1640
  if (value === null) {
1542
1641
  return false;
1543
1642
  }
@@ -1557,35 +1656,62 @@ function isJson20(value) {
1557
1656
  const allPropertiesMatchFormat = true;
1558
1657
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1559
1658
  }
1560
- function fromJson20($model) {
1659
+ function fromJson21($model) {
1561
1660
  const { valid, canonicalQuery, notifications } = $model;
1562
1661
  return {
1563
1662
  valid,
1564
1663
  canonicalQuery,
1565
- notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson19(innerValue)) : void 0
1664
+ notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson20(innerValue)) : void 0
1566
1665
  };
1567
1666
  }
1568
- function toJson20($model) {
1667
+ function toJson21($model) {
1569
1668
  const { valid, canonicalQuery, notifications } = $model;
1570
1669
  return {
1571
1670
  valid,
1572
1671
  canonicalQuery,
1573
- notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => toJson19(innerValue)) : void 0
1672
+ notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => toJson20(innerValue)) : void 0
1574
1673
  };
1575
1674
  }
1576
1675
 
1577
1676
  // packages/client/query/src/lib/apis/query-assistance-api.ts
1578
1677
  var QueryAssistanceClient = class {
1579
1678
  httpClient;
1679
+ /**
1680
+ * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a QueryAssistanceClient. Custom http client should implement {HttpClient} interface.
1681
+ * @example
1682
+ * const queryAssistanceClientNodeJs = new QueryAssistanceClient(yourCustomImplementation);
1683
+ */
1580
1684
  constructor(httpClientImplementation) {
1581
1685
  this.httpClient = httpClientImplementation;
1582
1686
  registerGlobalErrorSerializer(apiClientErrorSerializer);
1583
1687
  }
1688
+ /**
1689
+ * Verifies a query without executing it.
1690
+ *
1691
+ * 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).
1692
+ *
1693
+ * ## Overview
1694
+ *
1695
+ * Verifies the supplied query string and other query parameters for lack of any errors, but without actually
1696
+ * submitting the query for execution.
1697
+ *
1698
+ * @returns Supplied query and parameters were verified.
1699
+ *
1700
+ * @example <caption>Code example</caption>
1701
+ * import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
1702
+ *
1703
+ * const data = await queryAssistanceClient.queryVerify({
1704
+ * body: {
1705
+ * query:
1706
+ * 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
1707
+ * },
1708
+ * });
1709
+ */
1584
1710
  async queryVerify(config) {
1585
1711
  if (!config) {
1586
1712
  throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
1587
1713
  }
1588
- const encodedBody = toJson18(config.body);
1714
+ const encodedBody = toJson19(config.body);
1589
1715
  try {
1590
1716
  const response = await this.httpClient.send({
1591
1717
  url: `/platform/storage/query/v1/query:verify`,
@@ -1603,7 +1729,7 @@ var QueryAssistanceClient = class {
1603
1729
  });
1604
1730
  const responseValue = await response.body("json");
1605
1731
  try {
1606
- return fromJson20(responseValue);
1732
+ return fromJson21(responseValue);
1607
1733
  } catch (err) {
1608
1734
  throw new InvalidResponseError(
1609
1735
  `QueryAssistanceClient.query:verify:200`,
@@ -1625,7 +1751,7 @@ var QueryAssistanceClient = class {
1625
1751
  case 400: {
1626
1752
  const responseValue = await response.body("json");
1627
1753
  try {
1628
- const errorBody = fromJson16(responseValue);
1754
+ const errorBody = fromJson17(responseValue);
1629
1755
  throw new ErrorEnvelopeError(
1630
1756
  `400`,
1631
1757
  response,
@@ -1649,7 +1775,7 @@ var QueryAssistanceClient = class {
1649
1775
  case 500: {
1650
1776
  const responseValue = await response.body("json");
1651
1777
  try {
1652
- const errorBody = fromJson16(responseValue);
1778
+ const errorBody = fromJson17(responseValue);
1653
1779
  throw new ErrorEnvelopeError(
1654
1780
  `500`,
1655
1781
  response,
@@ -1683,11 +1809,218 @@ var QueryAssistanceClient = class {
1683
1809
  }
1684
1810
  }
1685
1811
  }
1812
+ /**
1813
+ * Get a structured tree of the canonical form of the query.
1814
+ *
1815
+ * 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).
1816
+ *
1817
+ * ## Overview
1818
+ *
1819
+ * Returns the parsed query as a tree, containing the structure of the canonical query. Tree-nodes can contain references to
1820
+ * the token position where they originate from. This may help to provide hover effects, show canonical forms, mark
1821
+ * optional items, and more.
1822
+ *
1823
+ * ## Details
1824
+ *
1825
+ * The query tree consists of nodes that contain different additional information (everything optional):
1826
+ *
1827
+ * ### General Fields
1828
+ *
1829
+ * Field | Mandatory | Description
1830
+ * ----------------------- | --- | ----------------------------------------------------------------------------------------
1831
+ * tokenPosition | no | optional. If present, it represents the position within the query string where the node refers to.
1832
+ * isOptional | no | whether this node could be left out and the result would still be the same query (semantically).
1833
+ *
1834
+ * #### tokenPosition
1835
+ *
1836
+ * contains `start` (inclusive) and `end` (inclusive), both contain `index` (0 based; fur substrings), `line`
1837
+ * and `column` (both 1-based; for readability).
1838
+ *
1839
+ * * If `tokenPosition` is present, it always contains start and end with all fields
1840
+ * * If `tokenPosition` is not present, there might still be nested nodes that do contain a position
1841
+ * * If `start == end`, the position refers to a single character
1842
+ * * If `start > end`, we know for sure that something was inserted.
1843
+ *
1844
+ * We can always check whether the canonical representation of a node matches the text in the tokenPosition to see whether
1845
+ * something was inserted, removed, or changed.
1846
+ *
1847
+ * #### isOptional
1848
+ *
1849
+ * only present if it is true.
1850
+ *
1851
+ * Optional nodes can e.g. be optional braces that make a query more readable, but are not necessary. This could be used to
1852
+ * enter *ghost braces* and *implicit functions* in the user's input field; maybe with different formatting
1853
+ * (using the tokenPosition of sibling nodes we can also check whether the user wrote these or not).
1854
+ *
1855
+ * ### Advanced Token Types
1856
+ *
1857
+ * each node is of one of following types and may contain more fields:
1858
+ *
1859
+ * * Terminal Node
1860
+ * * ContainerNode
1861
+ * * Alternative Node
1862
+ *
1863
+ * #### Terminal Node
1864
+ *
1865
+ * can be identified by checking whether `canonicalString` is present
1866
+ *
1867
+ * Field | Mandatory | Description
1868
+ * ------------------------ | --- | ---------------------------------------------------------------------------------------
1869
+ * type | yes | the type of the terminal node - do not confuse with the type of container nodes
1870
+ * canonicalString | yes | the canonical string representation. Concatenating the canonicalString of all nested terminal nodes provides the canonical form of the query.
1871
+ * isMandatoryOnUserOrder | no | may only be present if (`type="BRACE_OPEN"` or `type="BRACE_CLOSE"`) and `isOptional=true`. For usage see section [Special node type: PARAMETERS](#special-node-type-parameters)
1872
+ *
1873
+ * ##### Current types of terminal nodes (list might grow):
1874
+ *
1875
+ * * SPACE
1876
+ * * LINEBREAK
1877
+ * * INDENT
1878
+ * * PIPE
1879
+ * * DOT
1880
+ * * COLON
1881
+ * * COMMA
1882
+ * * BRACE_OPEN
1883
+ * * BRACE_CLOSE
1884
+ * * BRACKET_OPEN
1885
+ * * BRACKET_CLOSE
1886
+ * * PARENTHESIS_OPEN
1887
+ * * PARENTHESIS_CLOSE
1888
+ * * QUOTE
1889
+ * * SLASH
1890
+ * * BOOLEAN_TRUE
1891
+ * * BOOLEAN_FALSE
1892
+ * * NULL
1893
+ * * COMMAND_NAME
1894
+ * * PARAMETER_KEY
1895
+ * * PARAMETER_VALUE_SCOPE
1896
+ * * FUNCTION_NAME
1897
+ * * OPERATOR
1898
+ * * TRAVERSAL_OPERATOR
1899
+ * * TRAVERSAL_RELATION_NAME
1900
+ * * TRAVERSAL_HOP_COUNT
1901
+ * * SIMPLE_IDENTIFIER
1902
+ * * NUMBER
1903
+ * * STRING
1904
+ * * TIME_UNIT
1905
+ * * TIMESTAMP_VALUE
1906
+ * * METRIC_KEY
1907
+ * * VARIABLE
1908
+ *
1909
+ * #### ContainerNode
1910
+ *
1911
+ * can be identified by checking whether `children` is present
1912
+ *
1913
+ * Field | Mandatory | Description
1914
+ * ----------------------- | --- | ----------------------------------------------------------------------------------------
1915
+ * type | yes | the type of the container node - do not confuse with the type of terminal nodes
1916
+ * children | yes | the children for the node. might be of any type
1917
+ *
1918
+ * ##### Current types of container nodes (list might grow):
1919
+ *
1920
+ * * QUERY
1921
+ * * EXECUTION_BLOCK
1922
+ * * COMMAND
1923
+ * * COMMAND_SEPARATOR
1924
+ * * PARAMETER_WITH_KEY
1925
+ * * GROUP
1926
+ * * PARAMETERS - check examples further down
1927
+ * * PARAMETER_NAMING
1928
+ * * PARAMETER_SEPARATOR
1929
+ * * FUNCTION
1930
+ * * FUNCTION_PART - check examples further down
1931
+ * * EXPRESSION
1932
+ * * IDENTIFIER
1933
+ * * SOURCE_ID
1934
+ * * DURATION
1935
+ * * TIMESTAMP
1936
+ * * TIMEFRAME
1937
+ * * TRAVERSAL_PATH
1938
+ * * TRAVERSAL_STEP
1939
+ *
1940
+ * ##### Special node type: PARAMETERS
1941
+ *
1942
+ * can contain children representing the parameters. Every second child is of type PARAMETER_SEPARATOR.
1943
+ *
1944
+ * You may reorder the children based on their tokenPosition to get the user order. However, in this case,
1945
+ * you need to consider `isMandatoryOnUserOrder` to determine whether the grouping braces are mandatory or not.
1946
+ *
1947
+ * ###### Example
1948
+ *
1949
+ * For the query `SORT a, {direction:"descending", b}`, the canonical form is:
1950
+ *
1951
+ * `SORT a, {b, direction:"descending"}`
1952
+ *
1953
+ * This is the order, in which the parameters are returned in the query tree.
1954
+ * Parameters are {a} and {{b} and {direction:"descending"}}. In this case, the braces are optional.
1955
+ *
1956
+ * `SORT a, {b, direction:"descending"}` is equivalent to `SORT a, b, direction:"descending"`
1957
+ *
1958
+ * However, if you reorder the children by tokenPosition, the braces are not optional, because
1959
+ *
1960
+ * `SORT a, direction:"descending", b` is interpreted as `SORT {a, direction:"descending"}, b`
1961
+ *
1962
+ * So, if the children in PARAMETERS are re-ordered by tokenPosition, braces (or in general: TerminalNodes)
1963
+ * are only optional if `isOptional && !isMandatoryOnUserOrder`.
1964
+ *
1965
+ * ##### Special node type: FUNCTION_PART
1966
+ *
1967
+ * A container node of type `FUNCTION` may contain nodes of type `FUNCTION_PART`.
1968
+ *
1969
+ * If those `FUNCTION_PART`s are marked as optional, this means you have to either include *all* or *none* of these
1970
+ * optional function parts.
1971
+ *
1972
+ * *Example*:
1973
+ *
1974
+ * `filter anyMatch(a.b == 1, input:a)`
1975
+ *
1976
+ * The optional function parts are `anyMatch(` and `, input:a)`. If you leave out both, the command will still work:
1977
+ * `filter a.b == 1` and return the same result. Using one of these optional function parts and removing the other will lead
1978
+ * to an invalid query.
1979
+ *
1980
+ * #### Alternative Node
1981
+ *
1982
+ * can be identified by checking whether `alternatives` is present
1983
+ *
1984
+ * Field | Mandatory | Description
1985
+ * ----------------------- | --- | ----------------------------------------------------------------------------------------
1986
+ * alternatives | yes | Type: Map&lt;AlternativeType, DQLNode&gt;
1987
+ *
1988
+ * When displaying the query, pick one option. You may use the other options for hovering, replacing, and more.
1989
+ *
1990
+ * ##### Current values of AlternativeType (list might grow):
1991
+ *
1992
+ * * CANONICAL: This node is the one we will use for our canonical form
1993
+ * * USER: An alternative that is also valid, but not canonical; and this version was picked by the user.
1994
+ * * INFO: only if the canonical version is not present
1995
+ *
1996
+ * *Examples*:
1997
+ *
1998
+ * * `CANONICAL` is not present, `USER` is present: user's nodes are optional, but not canonical (usually optional nodes
1999
+ * are still canonical)
2000
+ * * `CANONICAL` is present, `USER` is not present: same as if the canonical node was optional. If this happens, it is
2001
+ * likely that there is also an `INFO` node
2002
+ * * `CANONICAL` is present, `USER` is present: there are different alternatives
2003
+ * * `INFO` is present: usually if `CANONICAL` is not present (e.g. the parameter key for `FILTER a == 1`), there is an info node
2004
+ * for `FILTER condition:a == 1`. This `condition:` was neither written by the user nor is it canonical; but it might be
2005
+ * used to help the user understand what this parameter means.
2006
+ *
2007
+ * @returns A node containing more nodes, a node offering different (semantically equivalent) versions of the query parts, or a terminal node that shows the canonical form.
2008
+ *
2009
+ * @example <caption>Code example</caption>
2010
+ * import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
2011
+ *
2012
+ * const data = await queryAssistanceClient.queryParse({
2013
+ * body: {
2014
+ * query:
2015
+ * 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
2016
+ * },
2017
+ * });
2018
+ */
1686
2019
  async queryParse(config) {
1687
2020
  if (!config) {
1688
2021
  throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
1689
2022
  }
1690
- const encodedBody = toJson17(config.body);
2023
+ const encodedBody = toJson18(config.body);
1691
2024
  try {
1692
2025
  const response = await this.httpClient.send({
1693
2026
  url: `/platform/storage/query/v1/query:parse`,
@@ -1727,7 +2060,7 @@ var QueryAssistanceClient = class {
1727
2060
  case 400: {
1728
2061
  const responseValue = await response.body("json");
1729
2062
  try {
1730
- const errorBody = fromJson16(responseValue);
2063
+ const errorBody = fromJson17(responseValue);
1731
2064
  throw new ErrorEnvelopeError(
1732
2065
  `400`,
1733
2066
  response,
@@ -1754,7 +2087,7 @@ var QueryAssistanceClient = class {
1754
2087
  case 500: {
1755
2088
  const responseValue = await response.body("json");
1756
2089
  try {
1757
- const errorBody = fromJson16(responseValue);
2090
+ const errorBody = fromJson17(responseValue);
1758
2091
  throw new ErrorEnvelopeError(
1759
2092
  `500`,
1760
2093
  response,
@@ -1788,6 +2121,57 @@ var QueryAssistanceClient = class {
1788
2121
  }
1789
2122
  }
1790
2123
  }
2124
+ /**
2125
+ * Get a structured list of suggestions for the query at the given position.
2126
+ *
2127
+ * 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).
2128
+ *
2129
+ * ## Overview
2130
+ *
2131
+ * We provide a list of suggestions that may be used after the cursor position. The following queries will all provide the
2132
+ * same results:
2133
+ *
2134
+ * * `query: "f"`
2135
+ * * `query: "f", cursorPosition:1`
2136
+ * * `query: "fetch ", cursorPosition:1`
2137
+ *
2138
+ * Available fields:
2139
+ *
2140
+ * | Field | Description |
2141
+ * |-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2142
+ * | suggestions | a list of suggestions. Each item is a separate possible suggestion, despite they might have the same outputs. |
2143
+ * | 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. |
2144
+ *
2145
+ * Fields in the `suggestions`
2146
+ *
2147
+ * | Field | Description |
2148
+ * |------------------------|------------------------------------------------------------------------------------------------------------|
2149
+ * | suggestion | a string representing the whole suggestion. This information could also be derived from the parts. |
2150
+ * | alreadyTypedCharacters | how many characters of this suggestion have already been typed (and will be overridden by the suggestion). |
2151
+ * | parts | a list of semantically enriched information on what are the parts of a suggestion. |
2152
+ *
2153
+ * Fields in `parts`
2154
+ *
2155
+ * | Field | Description |
2156
+ * |------------|-----------------------------------------------------------|
2157
+ * | suggestion | a string representing the current part of the suggestion. |
2158
+ * | type | current types: SPACE, PIPE, COMMAND (may be extended) |
2159
+ *
2160
+ * The `type` helps to treat specific parts of the suggestion different to others; either by a different visualization,
2161
+ * a link to docs, etc.
2162
+ *
2163
+ * @returns A list of structured autocomplete suggestions.
2164
+ *
2165
+ * @example <caption>Code example</caption>
2166
+ * import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
2167
+ *
2168
+ * const data = await queryAssistanceClient.queryAutocomplete({
2169
+ * body: {
2170
+ * query:
2171
+ * 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
2172
+ * },
2173
+ * });
2174
+ */
1791
2175
  async queryAutocomplete(config) {
1792
2176
  if (!config) {
1793
2177
  throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
@@ -1832,7 +2216,7 @@ var QueryAssistanceClient = class {
1832
2216
  case 400: {
1833
2217
  const responseValue = await response.body("json");
1834
2218
  try {
1835
- const errorBody = fromJson16(responseValue);
2219
+ const errorBody = fromJson17(responseValue);
1836
2220
  throw new ErrorEnvelopeError(
1837
2221
  `400`,
1838
2222
  response,
@@ -1859,7 +2243,7 @@ var QueryAssistanceClient = class {
1859
2243
  case 500: {
1860
2244
  const responseValue = await response.body("json");
1861
2245
  try {
1862
- const errorBody = fromJson16(responseValue);
2246
+ const errorBody = fromJson17(responseValue);
1863
2247
  throw new ErrorEnvelopeError(
1864
2248
  `500`,
1865
2249
  response,
@@ -1906,10 +2290,10 @@ import {
1906
2290
  // packages/client/query/src/lib/models/execute-request.transformation.ts
1907
2291
  var execute_request_transformation_exports = {};
1908
2292
  __export(execute_request_transformation_exports, {
1909
- fromJson: () => fromJson21,
2293
+ fromJson: () => fromJson22,
1910
2294
  isExecuteRequest: () => isExecuteRequest,
1911
- isJson: () => isJson21,
1912
- toJson: () => toJson21
2295
+ isJson: () => isJson22,
2296
+ toJson: () => toJson22
1913
2297
  });
1914
2298
  function isExecuteRequest(value) {
1915
2299
  if (value === null) {
@@ -1958,7 +2342,7 @@ function isExecuteRequest(value) {
1958
2342
  const allPropertiesMatchFormat = true;
1959
2343
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
1960
2344
  }
1961
- function isJson21(value) {
2345
+ function isJson22(value) {
1962
2346
  if (value === null) {
1963
2347
  return false;
1964
2348
  }
@@ -2005,7 +2389,7 @@ function isJson21(value) {
2005
2389
  const allPropertiesMatchFormat = true;
2006
2390
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2007
2391
  }
2008
- function fromJson21($model) {
2392
+ function fromJson22($model) {
2009
2393
  const {
2010
2394
  query,
2011
2395
  defaultTimeframeStart,
@@ -2037,7 +2421,7 @@ function fromJson21($model) {
2037
2421
  queryOptions: queryOptions !== void 0 && queryOptions !== null ? fromJson(queryOptions) : void 0
2038
2422
  };
2039
2423
  }
2040
- function toJson21($model) {
2424
+ function toJson22($model) {
2041
2425
  const {
2042
2426
  query,
2043
2427
  defaultTimeframeStart,
@@ -2073,46 +2457,46 @@ function toJson21($model) {
2073
2457
  // packages/client/query/src/lib/models/query-poll-response.transformation.ts
2074
2458
  var query_poll_response_transformation_exports = {};
2075
2459
  __export(query_poll_response_transformation_exports, {
2076
- fromJson: () => fromJson35,
2077
- isJson: () => isJson35,
2460
+ fromJson: () => fromJson36,
2461
+ isJson: () => isJson36,
2078
2462
  isQueryPollResponse: () => isQueryPollResponse,
2079
- toJson: () => toJson35
2463
+ toJson: () => toJson36
2080
2464
  });
2081
2465
 
2082
2466
  // packages/client/query/src/lib/models/query-result.transformation.ts
2083
2467
  var query_result_transformation_exports = {};
2084
2468
  __export(query_result_transformation_exports, {
2085
- fromJson: () => fromJson33,
2086
- isJson: () => isJson33,
2469
+ fromJson: () => fromJson34,
2470
+ isJson: () => isJson34,
2087
2471
  isQueryResult: () => isQueryResult,
2088
- toJson: () => toJson33
2472
+ toJson: () => toJson34
2089
2473
  });
2090
2474
 
2091
2475
  // packages/client/query/src/lib/models/metadata.transformation.ts
2092
2476
  var metadata_transformation_exports = {};
2093
2477
  __export(metadata_transformation_exports, {
2094
- fromJson: () => fromJson25,
2095
- isJson: () => isJson25,
2478
+ fromJson: () => fromJson26,
2479
+ isJson: () => isJson26,
2096
2480
  isMetadata: () => isMetadata,
2097
- toJson: () => toJson25
2481
+ toJson: () => toJson26
2098
2482
  });
2099
2483
 
2100
2484
  // packages/client/query/src/lib/models/grail-metadata.transformation.ts
2101
2485
  var grail_metadata_transformation_exports = {};
2102
2486
  __export(grail_metadata_transformation_exports, {
2103
- fromJson: () => fromJson23,
2487
+ fromJson: () => fromJson24,
2104
2488
  isGrailMetadata: () => isGrailMetadata,
2105
- isJson: () => isJson23,
2106
- toJson: () => toJson23
2489
+ isJson: () => isJson24,
2490
+ toJson: () => toJson24
2107
2491
  });
2108
2492
 
2109
2493
  // packages/client/query/src/lib/models/timeframe.transformation.ts
2110
2494
  var timeframe_transformation_exports = {};
2111
2495
  __export(timeframe_transformation_exports, {
2112
- fromJson: () => fromJson22,
2113
- isJson: () => isJson22,
2496
+ fromJson: () => fromJson23,
2497
+ isJson: () => isJson23,
2114
2498
  isTimeframe: () => isTimeframe,
2115
- toJson: () => toJson22
2499
+ toJson: () => toJson23
2116
2500
  });
2117
2501
  function isTimeframe(value) {
2118
2502
  if (value === null) {
@@ -2134,7 +2518,7 @@ function isTimeframe(value) {
2134
2518
  const allPropertiesMatchFormat = value.start instanceof Date && value.end instanceof Date;
2135
2519
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2136
2520
  }
2137
- function isJson22(value) {
2521
+ function isJson23(value) {
2138
2522
  if (value === null) {
2139
2523
  return false;
2140
2524
  }
@@ -2154,14 +2538,14 @@ function isJson22(value) {
2154
2538
  const allPropertiesMatchFormat = /^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[+-]\d{2}:\d{2})?)$/i.test(value.start) && /^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[+-]\d{2}:\d{2})?)$/i.test(value.end);
2155
2539
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2156
2540
  }
2157
- function fromJson22($model) {
2541
+ function fromJson23($model) {
2158
2542
  const { start, end } = $model;
2159
2543
  return {
2160
2544
  start: start !== void 0 && start !== null ? new Date(start) : void 0,
2161
2545
  end: end !== void 0 && end !== null ? new Date(end) : void 0
2162
2546
  };
2163
2547
  }
2164
- function toJson22($model) {
2548
+ function toJson23($model) {
2165
2549
  const { start, end } = $model;
2166
2550
  return {
2167
2551
  start: start !== void 0 && start !== null ? start.toISOString() : void 0,
@@ -2218,7 +2602,7 @@ function isGrailMetadata(value) {
2218
2602
  const allPropertiesMatchFormat = true;
2219
2603
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2220
2604
  }
2221
- function isJson23(value) {
2605
+ function isJson24(value) {
2222
2606
  if (value === null) {
2223
2607
  return false;
2224
2608
  }
@@ -2266,7 +2650,7 @@ function isJson23(value) {
2266
2650
  const allPropertiesMatchFormat = true;
2267
2651
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2268
2652
  }
2269
- function fromJson23($model) {
2653
+ function fromJson24($model) {
2270
2654
  const {
2271
2655
  canonicalQuery,
2272
2656
  timezone,
@@ -2290,15 +2674,15 @@ function fromJson23($model) {
2290
2674
  dqlVersion,
2291
2675
  scannedBytes,
2292
2676
  scannedDataPoints,
2293
- analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? fromJson22(analysisTimeframe) : void 0,
2677
+ analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? fromJson23(analysisTimeframe) : void 0,
2294
2678
  locale,
2295
2679
  executionTimeMilliseconds,
2296
- notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson19(innerValue)) : void 0,
2680
+ notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson20(innerValue)) : void 0,
2297
2681
  queryId,
2298
2682
  sampled
2299
2683
  };
2300
2684
  }
2301
- function toJson23($model) {
2685
+ function toJson24($model) {
2302
2686
  const {
2303
2687
  canonicalQuery,
2304
2688
  timezone,
@@ -2322,10 +2706,10 @@ function toJson23($model) {
2322
2706
  dqlVersion,
2323
2707
  scannedBytes,
2324
2708
  scannedDataPoints,
2325
- analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? toJson22(analysisTimeframe) : void 0,
2709
+ analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? toJson23(analysisTimeframe) : void 0,
2326
2710
  locale,
2327
2711
  executionTimeMilliseconds,
2328
- notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => toJson19(innerValue)) : void 0,
2712
+ notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => toJson20(innerValue)) : void 0,
2329
2713
  queryId,
2330
2714
  sampled
2331
2715
  };
@@ -2334,10 +2718,10 @@ function toJson23($model) {
2334
2718
  // packages/client/query/src/lib/models/metric-metadata.transformation.ts
2335
2719
  var metric_metadata_transformation_exports = {};
2336
2720
  __export(metric_metadata_transformation_exports, {
2337
- fromJson: () => fromJson24,
2338
- isJson: () => isJson24,
2721
+ fromJson: () => fromJson25,
2722
+ isJson: () => isJson25,
2339
2723
  isMetricMetadata: () => isMetricMetadata,
2340
- toJson: () => toJson24
2724
+ toJson: () => toJson25
2341
2725
  });
2342
2726
  function isMetricMetadata(value) {
2343
2727
  if (value === null) {
@@ -2377,7 +2761,7 @@ function isMetricMetadata(value) {
2377
2761
  const allPropertiesMatchFormat = true;
2378
2762
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2379
2763
  }
2380
- function isJson24(value) {
2764
+ function isJson25(value) {
2381
2765
  if (value === null) {
2382
2766
  return false;
2383
2767
  }
@@ -2415,7 +2799,7 @@ function isJson24(value) {
2415
2799
  const allPropertiesMatchFormat = true;
2416
2800
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2417
2801
  }
2418
- function fromJson24($model) {
2802
+ function fromJson25($model) {
2419
2803
  const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate, shifted } = $model;
2420
2804
  return {
2421
2805
  "metric.key": metricKey,
@@ -2428,7 +2812,7 @@ function fromJson24($model) {
2428
2812
  shifted
2429
2813
  };
2430
2814
  }
2431
- function toJson24($model) {
2815
+ function toJson25($model) {
2432
2816
  const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate, shifted } = $model;
2433
2817
  return {
2434
2818
  "metric.key": metricKey,
@@ -2463,7 +2847,7 @@ function isMetadata(value) {
2463
2847
  const allPropertiesMatchFormat = true;
2464
2848
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2465
2849
  }
2466
- function isJson25(value) {
2850
+ function isJson26(value) {
2467
2851
  if (value === null) {
2468
2852
  return false;
2469
2853
  }
@@ -2483,66 +2867,66 @@ function isJson25(value) {
2483
2867
  const allPropertiesMatchFormat = true;
2484
2868
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2485
2869
  }
2486
- function fromJson25($model) {
2870
+ function fromJson26($model) {
2487
2871
  const { grail, metrics } = $model;
2488
2872
  return {
2489
- grail: grail !== void 0 && grail !== null ? fromJson23(grail) : void 0,
2490
- metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => fromJson24(innerValue)) : void 0
2873
+ grail: grail !== void 0 && grail !== null ? fromJson24(grail) : void 0,
2874
+ metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => fromJson25(innerValue)) : void 0
2491
2875
  };
2492
2876
  }
2493
- function toJson25($model) {
2877
+ function toJson26($model) {
2494
2878
  const { grail, metrics } = $model;
2495
2879
  return {
2496
- grail: grail !== void 0 && grail !== null ? toJson23(grail) : void 0,
2497
- metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => toJson24(innerValue)) : void 0
2880
+ grail: grail !== void 0 && grail !== null ? toJson24(grail) : void 0,
2881
+ metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => toJson25(innerValue)) : void 0
2498
2882
  };
2499
2883
  }
2500
2884
 
2501
2885
  // packages/client/query/src/lib/models/ranged-field-types.transformation.ts
2502
2886
  var ranged_field_types_transformation_exports = {};
2503
2887
  __export(ranged_field_types_transformation_exports, {
2504
- fromJson: () => fromJson27,
2505
- isJson: () => isJson29,
2888
+ fromJson: () => fromJson28,
2889
+ isJson: () => isJson30,
2506
2890
  isRangedFieldTypes: () => isRangedFieldTypes,
2507
- toJson: () => toJson27
2891
+ toJson: () => toJson28
2508
2892
  });
2509
2893
 
2510
2894
  // packages/client/query/src/lib/models/ranged-field-types-mappings.transformation.ts
2511
2895
  var ranged_field_types_mappings_transformation_exports = {};
2512
2896
  __export(ranged_field_types_mappings_transformation_exports, {
2513
- fromJson: () => fromJson29,
2514
- isJson: () => isJson28,
2897
+ fromJson: () => fromJson30,
2898
+ isJson: () => isJson29,
2515
2899
  isRangedFieldTypesMappings: () => isRangedFieldTypesMappings,
2516
- toJson: () => toJson29
2900
+ toJson: () => toJson30
2517
2901
  });
2518
2902
 
2519
2903
  // packages/client/query/src/lib/models/field-type.transformation.ts
2520
2904
  var field_type_transformation_exports = {};
2521
2905
  __export(field_type_transformation_exports, {
2522
- fromJson: () => fromJson28,
2906
+ fromJson: () => fromJson29,
2523
2907
  isFieldType: () => isFieldType,
2524
- isJson: () => isJson27,
2525
- toJson: () => toJson28
2908
+ isJson: () => isJson28,
2909
+ toJson: () => toJson29
2526
2910
  });
2527
2911
 
2528
2912
  // packages/client/query/src/lib/models/field-type-type.transformation.ts
2529
2913
  var field_type_type_transformation_exports = {};
2530
2914
  __export(field_type_type_transformation_exports, {
2531
- fromJson: () => fromJson26,
2915
+ fromJson: () => fromJson27,
2532
2916
  isFieldTypeType: () => isFieldTypeType,
2533
- isJson: () => isJson26,
2534
- toJson: () => toJson26
2917
+ isJson: () => isJson27,
2918
+ toJson: () => toJson27
2535
2919
  });
2536
2920
  function isFieldTypeType(value) {
2537
2921
  return typeof value === "string";
2538
2922
  }
2539
- function isJson26(value) {
2923
+ function isJson27(value) {
2540
2924
  return typeof value === "string";
2541
2925
  }
2542
- function fromJson26($model) {
2926
+ function fromJson27($model) {
2543
2927
  return String($model);
2544
2928
  }
2545
- function toJson26($model) {
2929
+ function toJson27($model) {
2546
2930
  return String($model);
2547
2931
  }
2548
2932
 
@@ -2567,7 +2951,7 @@ function isFieldType(value) {
2567
2951
  const allPropertiesMatchFormat = true;
2568
2952
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2569
2953
  }
2570
- function isJson27(value) {
2954
+ function isJson28(value) {
2571
2955
  if (value === null) {
2572
2956
  return false;
2573
2957
  }
@@ -2587,18 +2971,18 @@ function isJson27(value) {
2587
2971
  const allPropertiesMatchFormat = true;
2588
2972
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2589
2973
  }
2590
- function fromJson28($model) {
2974
+ function fromJson29($model) {
2591
2975
  const { type, types } = $model;
2592
2976
  return {
2593
- type: fromJson26(type),
2594
- types: types !== void 0 && types !== null ? types?.map((innerValue) => fromJson27(innerValue)) : void 0
2977
+ type: fromJson27(type),
2978
+ types: types !== void 0 && types !== null ? types?.map((innerValue) => fromJson28(innerValue)) : void 0
2595
2979
  };
2596
2980
  }
2597
- function toJson28($model) {
2981
+ function toJson29($model) {
2598
2982
  const { type, types } = $model;
2599
2983
  return {
2600
- type: toJson26(type),
2601
- types: types !== void 0 && types !== null ? types?.map((innerValue) => toJson27(innerValue)) : void 0
2984
+ type: toJson27(type),
2985
+ types: types !== void 0 && types !== null ? types?.map((innerValue) => toJson28(innerValue)) : void 0
2602
2986
  };
2603
2987
  }
2604
2988
 
@@ -2623,7 +3007,7 @@ function isRangedFieldTypesMappings(value) {
2623
3007
  const allPropertiesMatchFormat = true;
2624
3008
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2625
3009
  }
2626
- function isJson28(value) {
3010
+ function isJson29(value) {
2627
3011
  if (value === null) {
2628
3012
  return false;
2629
3013
  }
@@ -2643,24 +3027,24 @@ function isJson28(value) {
2643
3027
  const allPropertiesMatchFormat = true;
2644
3028
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2645
3029
  }
2646
- function fromJson29($model) {
3030
+ function fromJson30($model) {
2647
3031
  const additionalProps = $model;
2648
3032
  return {
2649
3033
  ...Object.fromEntries(
2650
3034
  Object.entries(additionalProps).map(([propName, value]) => [
2651
3035
  propName,
2652
- value !== void 0 && value !== null ? fromJson28(value) : void 0
3036
+ value !== void 0 && value !== null ? fromJson29(value) : void 0
2653
3037
  ])
2654
3038
  )
2655
3039
  };
2656
3040
  }
2657
- function toJson29($model) {
3041
+ function toJson30($model) {
2658
3042
  const additionalProps = $model;
2659
3043
  return {
2660
3044
  ...Object.fromEntries(
2661
3045
  Object.entries(additionalProps).map(([propName, value]) => [
2662
3046
  propName,
2663
- value !== void 0 && value !== null ? toJson28(value) : void 0
3047
+ value !== void 0 && value !== null ? toJson29(value) : void 0
2664
3048
  ])
2665
3049
  )
2666
3050
  };
@@ -2687,7 +3071,7 @@ function isRangedFieldTypes(value) {
2687
3071
  const allPropertiesMatchFormat = true;
2688
3072
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2689
3073
  }
2690
- function isJson29(value) {
3074
+ function isJson30(value) {
2691
3075
  if (value === null) {
2692
3076
  return false;
2693
3077
  }
@@ -2707,17 +3091,17 @@ function isJson29(value) {
2707
3091
  const allPropertiesMatchFormat = true;
2708
3092
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2709
3093
  }
2710
- function fromJson27($model) {
3094
+ function fromJson28($model) {
2711
3095
  const { mappings, indexRange } = $model;
2712
3096
  return {
2713
- mappings: fromJson29(mappings),
3097
+ mappings: fromJson30(mappings),
2714
3098
  indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
2715
3099
  };
2716
3100
  }
2717
- function toJson27($model) {
3101
+ function toJson28($model) {
2718
3102
  const { mappings, indexRange } = $model;
2719
3103
  return {
2720
- mappings: toJson29(mappings),
3104
+ mappings: toJson30(mappings),
2721
3105
  indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
2722
3106
  };
2723
3107
  }
@@ -2725,10 +3109,10 @@ function toJson27($model) {
2725
3109
  // packages/client/query/src/lib/models/result-record.transformation.ts
2726
3110
  var result_record_transformation_exports = {};
2727
3111
  __export(result_record_transformation_exports, {
2728
- fromJson: () => fromJson31,
2729
- isJson: () => isJson31,
3112
+ fromJson: () => fromJson32,
3113
+ isJson: () => isJson32,
2730
3114
  isResultRecord: () => isResultRecord,
2731
- toJson: () => toJson31
3115
+ toJson: () => toJson32
2732
3116
  });
2733
3117
 
2734
3118
  // packages/client/query/src/lib/models/result-record-value.transformation.ts
@@ -2747,19 +3131,19 @@ __export(result_record_value_transformation_exports, {
2747
3131
  checkString: () => checkString,
2748
3132
  checkTimeframe: () => checkTimeframe,
2749
3133
  checkTimeframeAsJson: () => checkTimeframeAsJson,
2750
- fromJson: () => fromJson32,
2751
- isJson: () => isJson32,
3134
+ fromJson: () => fromJson33,
3135
+ isJson: () => isJson33,
2752
3136
  isResultRecordValue: () => isResultRecordValue,
2753
- toJson: () => toJson32
3137
+ toJson: () => toJson33
2754
3138
  });
2755
3139
 
2756
3140
  // packages/client/query/src/lib/models/geo-point.transformation.ts
2757
3141
  var geo_point_transformation_exports = {};
2758
3142
  __export(geo_point_transformation_exports, {
2759
- fromJson: () => fromJson30,
3143
+ fromJson: () => fromJson31,
2760
3144
  isGeoPoint: () => isGeoPoint,
2761
- isJson: () => isJson30,
2762
- toJson: () => toJson30
3145
+ isJson: () => isJson31,
3146
+ toJson: () => toJson31
2763
3147
  });
2764
3148
  function isGeoPoint(value) {
2765
3149
  if (value === null) {
@@ -2781,7 +3165,7 @@ function isGeoPoint(value) {
2781
3165
  const allPropertiesMatchFormat = true;
2782
3166
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2783
3167
  }
2784
- function isJson30(value) {
3168
+ function isJson31(value) {
2785
3169
  if (value === null) {
2786
3170
  return false;
2787
3171
  }
@@ -2801,14 +3185,14 @@ function isJson30(value) {
2801
3185
  const allPropertiesMatchFormat = true;
2802
3186
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2803
3187
  }
2804
- function fromJson30($model) {
3188
+ function fromJson31($model) {
2805
3189
  const { latitude, longitude } = $model;
2806
3190
  return {
2807
3191
  latitude,
2808
3192
  longitude
2809
3193
  };
2810
3194
  }
2811
- function toJson30($model) {
3195
+ function toJson31($model) {
2812
3196
  const { latitude, longitude } = $model;
2813
3197
  return {
2814
3198
  latitude,
@@ -2846,13 +3230,13 @@ function isResultRecordValue(value) {
2846
3230
  return checkBoolean(value) || checkNumber(value) || checkString(value) || checkTimeframe(value) || checkGeoPoint(value) || checkResultRecord(value) || checkArrayResultRecordValue(value) || value === null;
2847
3231
  }
2848
3232
  function checkTimeframeAsJson(value) {
2849
- return isJson22(value);
3233
+ return isJson23(value);
2850
3234
  }
2851
3235
  function checkGeoPointAsJson(value) {
2852
- return isJson30(value);
3236
+ return isJson31(value);
2853
3237
  }
2854
3238
  function checkResultRecordAsJson(value) {
2855
- return isJson31(value);
3239
+ return isJson32(value);
2856
3240
  }
2857
3241
  function checkArrayResultRecordValueTransformationAsJsonNullItemDatatype(value) {
2858
3242
  return isResultRecordValue(value);
@@ -2861,11 +3245,11 @@ function checkArrayResultRecordValueAsJson(value) {
2861
3245
  const datatypeMatch = (val) => checkArrayResultRecordValueTransformationAsJsonNullItemDatatype(val);
2862
3246
  return Array.isArray(value) && value.every(datatypeMatch);
2863
3247
  }
2864
- function isJson32(value) {
3248
+ function isJson33(value) {
2865
3249
  return checkBoolean(value) || checkNumber(value) || checkString(value) || checkTimeframeAsJson(value) || checkGeoPointAsJson(value) || checkResultRecordAsJson(value) || checkArrayResultRecordValueAsJson(value) || value === null;
2866
3250
  }
2867
- function fromJson32($model) {
2868
- if (!isJson32($model)) {
3251
+ function fromJson33($model) {
3252
+ if (!isJson33($model)) {
2869
3253
  throw new TypeError("_ResultRecordValueTransformation.fromJson: value's datatype does not match");
2870
3254
  }
2871
3255
  if ($model === null) {
@@ -2881,20 +3265,20 @@ function fromJson32($model) {
2881
3265
  return String($model);
2882
3266
  }
2883
3267
  if (checkTimeframeAsJson($model)) {
2884
- return fromJson22($model);
3268
+ return fromJson23($model);
2885
3269
  }
2886
3270
  if (checkGeoPointAsJson($model)) {
2887
- return fromJson30($model);
3271
+ return fromJson31($model);
2888
3272
  }
2889
3273
  if (checkResultRecordAsJson($model)) {
2890
- return fromJson31($model);
3274
+ return fromJson32($model);
2891
3275
  }
2892
3276
  if (checkArrayResultRecordValue($model)) {
2893
- return $model.map((el) => fromJson32(el));
3277
+ return $model.map((el) => fromJson33(el));
2894
3278
  }
2895
3279
  throw new TypeError("Unable to deserialize value");
2896
3280
  }
2897
- function toJson32($model) {
3281
+ function toJson33($model) {
2898
3282
  if (!isResultRecordValue($model)) {
2899
3283
  throw new TypeError("_ResultRecordValueTransformation.toJson: value's datatype does not match");
2900
3284
  }
@@ -2911,16 +3295,16 @@ function toJson32($model) {
2911
3295
  return String($model);
2912
3296
  }
2913
3297
  if (checkTimeframe($model)) {
2914
- return toJson22($model);
3298
+ return toJson23($model);
2915
3299
  }
2916
3300
  if (checkGeoPoint($model)) {
2917
- return toJson30($model);
3301
+ return toJson31($model);
2918
3302
  }
2919
3303
  if (checkResultRecord($model)) {
2920
- return toJson31($model);
3304
+ return toJson32($model);
2921
3305
  }
2922
3306
  if (checkArrayResultRecordValue($model)) {
2923
- return $model.map((el) => toJson32(el));
3307
+ return $model.map((el) => toJson33(el));
2924
3308
  }
2925
3309
  throw new TypeError("Unable to serialize value");
2926
3310
  }
@@ -2946,7 +3330,7 @@ function isResultRecord(value) {
2946
3330
  const allPropertiesMatchFormat = true;
2947
3331
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2948
3332
  }
2949
- function isJson31(value) {
3333
+ function isJson32(value) {
2950
3334
  if (value === null) {
2951
3335
  return true;
2952
3336
  }
@@ -2966,7 +3350,7 @@ function isJson31(value) {
2966
3350
  const allPropertiesMatchFormat = true;
2967
3351
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
2968
3352
  }
2969
- function fromJson31($model) {
3353
+ function fromJson32($model) {
2970
3354
  if ($model === null) {
2971
3355
  return null;
2972
3356
  }
@@ -2975,12 +3359,12 @@ function fromJson31($model) {
2975
3359
  ...Object.fromEntries(
2976
3360
  Object.entries(additionalProps).map(([propName, value]) => [
2977
3361
  propName,
2978
- value !== void 0 ? fromJson32(value) : void 0
3362
+ value !== void 0 ? fromJson33(value) : void 0
2979
3363
  ])
2980
3364
  )
2981
3365
  };
2982
3366
  }
2983
- function toJson31($model) {
3367
+ function toJson32($model) {
2984
3368
  if ($model === null) {
2985
3369
  return null;
2986
3370
  }
@@ -2989,7 +3373,7 @@ function toJson31($model) {
2989
3373
  ...Object.fromEntries(
2990
3374
  Object.entries(additionalProps).map(([propName, value]) => [
2991
3375
  propName,
2992
- value !== void 0 && value !== null ? toJson32(value) : void 0
3376
+ value !== void 0 && value !== null ? toJson33(value) : void 0
2993
3377
  ])
2994
3378
  )
2995
3379
  };
@@ -3016,7 +3400,7 @@ function isQueryResult(value) {
3016
3400
  const allPropertiesMatchFormat = true;
3017
3401
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
3018
3402
  }
3019
- function isJson33(value) {
3403
+ function isJson34(value) {
3020
3404
  if (value === null) {
3021
3405
  return false;
3022
3406
  }
@@ -3036,41 +3420,41 @@ function isJson33(value) {
3036
3420
  const allPropertiesMatchFormat = true;
3037
3421
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
3038
3422
  }
3039
- function fromJson33($model) {
3423
+ function fromJson34($model) {
3040
3424
  const { records, metadata, types } = $model;
3041
3425
  return {
3042
- records: records?.map((innerValue) => fromJson31(innerValue)),
3043
- metadata: fromJson25(metadata),
3044
- types: types?.map((innerValue) => fromJson27(innerValue))
3426
+ records: records?.map((innerValue) => fromJson32(innerValue)),
3427
+ metadata: fromJson26(metadata),
3428
+ types: types?.map((innerValue) => fromJson28(innerValue))
3045
3429
  };
3046
3430
  }
3047
- function toJson33($model) {
3431
+ function toJson34($model) {
3048
3432
  const { records, metadata, types } = $model;
3049
3433
  return {
3050
- records: records?.map((innerValue) => toJson31(innerValue)),
3051
- metadata: toJson25(metadata),
3052
- types: types?.map((innerValue) => toJson27(innerValue))
3434
+ records: records?.map((innerValue) => toJson32(innerValue)),
3435
+ metadata: toJson26(metadata),
3436
+ types: types?.map((innerValue) => toJson28(innerValue))
3053
3437
  };
3054
3438
  }
3055
3439
 
3056
3440
  // packages/client/query/src/lib/models/query-state.transformation.ts
3057
3441
  var query_state_transformation_exports = {};
3058
3442
  __export(query_state_transformation_exports, {
3059
- fromJson: () => fromJson34,
3060
- isJson: () => isJson34,
3443
+ fromJson: () => fromJson35,
3444
+ isJson: () => isJson35,
3061
3445
  isQueryState: () => isQueryState,
3062
- toJson: () => toJson34
3446
+ toJson: () => toJson35
3063
3447
  });
3064
3448
  function isQueryState(value) {
3065
3449
  return typeof value === "string";
3066
3450
  }
3067
- function isJson34(value) {
3451
+ function isJson35(value) {
3068
3452
  return typeof value === "string";
3069
3453
  }
3070
- function fromJson34($model) {
3454
+ function fromJson35($model) {
3071
3455
  return String($model);
3072
3456
  }
3073
- function toJson34($model) {
3457
+ function toJson35($model) {
3074
3458
  return String($model);
3075
3459
  }
3076
3460
 
@@ -3095,7 +3479,7 @@ function isQueryPollResponse(value) {
3095
3479
  const allPropertiesMatchFormat = true;
3096
3480
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
3097
3481
  }
3098
- function isJson35(value) {
3482
+ function isJson36(value) {
3099
3483
  if (value === null) {
3100
3484
  return false;
3101
3485
  }
@@ -3115,32 +3499,32 @@ function isJson35(value) {
3115
3499
  const allPropertiesMatchFormat = true;
3116
3500
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
3117
3501
  }
3118
- function fromJson35($model) {
3502
+ function fromJson36($model) {
3119
3503
  const { result, ttlSeconds, progress, state } = $model;
3120
3504
  return {
3121
- result: result !== void 0 && result !== null ? fromJson33(result) : void 0,
3505
+ result: result !== void 0 && result !== null ? fromJson34(result) : void 0,
3122
3506
  ttlSeconds,
3123
3507
  progress,
3124
- state: fromJson34(state)
3508
+ state: fromJson35(state)
3125
3509
  };
3126
3510
  }
3127
- function toJson35($model) {
3511
+ function toJson36($model) {
3128
3512
  const { result, ttlSeconds, progress, state } = $model;
3129
3513
  return {
3130
- result: result !== void 0 && result !== null ? toJson33(result) : void 0,
3514
+ result: result !== void 0 && result !== null ? toJson34(result) : void 0,
3131
3515
  ttlSeconds,
3132
3516
  progress,
3133
- state: toJson34(state)
3517
+ state: toJson35(state)
3134
3518
  };
3135
3519
  }
3136
3520
 
3137
3521
  // packages/client/query/src/lib/models/query-start-response.transformation.ts
3138
3522
  var query_start_response_transformation_exports = {};
3139
3523
  __export(query_start_response_transformation_exports, {
3140
- fromJson: () => fromJson36,
3141
- isJson: () => isJson36,
3524
+ fromJson: () => fromJson37,
3525
+ isJson: () => isJson37,
3142
3526
  isQueryStartResponse: () => isQueryStartResponse,
3143
- toJson: () => toJson36
3527
+ toJson: () => toJson37
3144
3528
  });
3145
3529
  function isQueryStartResponse(value) {
3146
3530
  if (value === null) {
@@ -3162,7 +3546,7 @@ function isQueryStartResponse(value) {
3162
3546
  const allPropertiesMatchFormat = true;
3163
3547
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
3164
3548
  }
3165
- function isJson36(value) {
3549
+ function isJson37(value) {
3166
3550
  if (value === null) {
3167
3551
  return false;
3168
3552
  }
@@ -3182,24 +3566,24 @@ function isJson36(value) {
3182
3566
  const allPropertiesMatchFormat = true;
3183
3567
  return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
3184
3568
  }
3185
- function fromJson36($model) {
3569
+ function fromJson37($model) {
3186
3570
  const { result, ttlSeconds, progress, requestToken, state } = $model;
3187
3571
  return {
3188
- result: result !== void 0 && result !== null ? fromJson33(result) : void 0,
3572
+ result: result !== void 0 && result !== null ? fromJson34(result) : void 0,
3189
3573
  ttlSeconds,
3190
3574
  progress,
3191
3575
  requestToken,
3192
- state: fromJson34(state)
3576
+ state: fromJson35(state)
3193
3577
  };
3194
3578
  }
3195
- function toJson36($model) {
3579
+ function toJson37($model) {
3196
3580
  const { result, ttlSeconds, progress, requestToken, state } = $model;
3197
3581
  return {
3198
- result: result !== void 0 && result !== null ? toJson33(result) : void 0,
3582
+ result: result !== void 0 && result !== null ? toJson34(result) : void 0,
3199
3583
  ttlSeconds,
3200
3584
  progress,
3201
3585
  requestToken,
3202
- state: toJson34(state)
3586
+ state: toJson35(state)
3203
3587
  };
3204
3588
  }
3205
3589
 
@@ -3233,10 +3617,60 @@ var toQueryString = (rawQuery, flags = {}) => {
3233
3617
  // packages/client/query/src/lib/apis/query-execution-api.ts
3234
3618
  var QueryExecutionClient = class {
3235
3619
  httpClient;
3620
+ /**
3621
+ * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a QueryExecutionClient. Custom http client should implement {HttpClient} interface.
3622
+ * @example
3623
+ * const queryExecutionClientNodeJs = new QueryExecutionClient(yourCustomImplementation);
3624
+ */
3236
3625
  constructor(httpClientImplementation) {
3237
3626
  this.httpClient = httpClientImplementation;
3238
3627
  registerGlobalErrorSerializer(apiClientErrorSerializer);
3239
3628
  }
3629
+ /**
3630
+ * Retrieves query status and final result from Grail.
3631
+ *
3632
+ * 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).
3633
+ *
3634
+ * ### Overview:
3635
+ *
3636
+ * Polls the status of a Grail query. Returns the status of the query, including the result if the query finished.
3637
+ *
3638
+ * ### The response format:
3639
+ * The json response will contain the state of the query. If the query succeeded, the result will be included.
3640
+ *
3641
+ * The result has two main sections:
3642
+ * * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
3643
+ * * The 'types' section describes the corresponding data types that a record field has.
3644
+ *
3645
+ * Every record has an implicit 'index' according to the position in the 'records' JSON array.
3646
+ * The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
3647
+ * records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
3648
+ *
3649
+ * A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
3650
+ *
3651
+ * ```text
3652
+ * startIndex <= i <= endIndex
3653
+ * ```
3654
+ *
3655
+ * Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
3656
+ *
3657
+ *
3658
+ * Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
3659
+ * field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
3660
+ * When a collision does occur, we will create a new type 'bucket' that will have a different index range where
3661
+ * the new record field types will be placed.
3662
+ * It is guaranteed that every field of every record will have a corresponding type.
3663
+ * **Clients should always take the included types into account when consuming records!**
3664
+ *
3665
+ * @returns The current status and results of the supplied query.
3666
+ *
3667
+ * @example <caption>Code example</caption>
3668
+ * import { queryExecutionClient } from "@dynatrace-sdk/client-query";
3669
+ *
3670
+ * const data = await queryExecutionClient.queryPoll({
3671
+ * requestToken: "...",
3672
+ * });
3673
+ */
3240
3674
  async queryPoll(config) {
3241
3675
  if (!config) {
3242
3676
  throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
@@ -3263,7 +3697,7 @@ var QueryExecutionClient = class {
3263
3697
  });
3264
3698
  const responseValue = await response.body("json");
3265
3699
  try {
3266
- return fromJson35(responseValue);
3700
+ return fromJson36(responseValue);
3267
3701
  } catch (err) {
3268
3702
  throw new InvalidResponseError(`QueryExecutionClient.query:poll:200`, err, responseValue, void 0, void 0);
3269
3703
  }
@@ -3279,7 +3713,7 @@ var QueryExecutionClient = class {
3279
3713
  case 400: {
3280
3714
  const responseValue = await response.body("json");
3281
3715
  try {
3282
- const errorBody = fromJson16(responseValue);
3716
+ const errorBody = fromJson17(responseValue);
3283
3717
  throw new ErrorEnvelopeError(
3284
3718
  `400`,
3285
3719
  response,
@@ -3304,7 +3738,10 @@ var QueryExecutionClient = class {
3304
3738
  }
3305
3739
  }
3306
3740
  case 410: {
3307
- const responseValue = await response.body("text");
3741
+ const responseValue = await response.body(
3742
+ "text"
3743
+ /* type from spec unsupported */
3744
+ );
3308
3745
  throw new ClientRequestError(
3309
3746
  `410`,
3310
3747
  response,
@@ -3315,7 +3752,7 @@ var QueryExecutionClient = class {
3315
3752
  case 500: {
3316
3753
  const responseValue = await response.body("json");
3317
3754
  try {
3318
- const errorBody = fromJson16(responseValue);
3755
+ const errorBody = fromJson17(responseValue);
3319
3756
  throw new ErrorEnvelopeError(
3320
3757
  `500`,
3321
3758
  response,
@@ -3349,11 +3786,62 @@ var QueryExecutionClient = class {
3349
3786
  }
3350
3787
  }
3351
3788
  }
3789
+ /**
3790
+ * Starts a Grail query.
3791
+ *
3792
+ * 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).
3793
+ *
3794
+ * ### Overview:
3795
+ *
3796
+ * Executes a query and returns a list of records.
3797
+ *
3798
+ * For details about the query language see the [Dynatrace Query Language documentation](https://dt-url.net/bv03yk8).
3799
+ *
3800
+ * ### The response format:
3801
+ *
3802
+ * The json response will contain the state of the started query. If the query succeeded, the result will be included. Otherwise the response will contain a request token to reference the query in future polling requests.
3803
+ *
3804
+ * The result has two main sections:
3805
+ * * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
3806
+ * * The 'types' section describes the corresponding data types that a record field has.
3807
+ *
3808
+ * Every record has an implicit 'index' according to the position in the 'records' JSON array.
3809
+ * The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
3810
+ * records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
3811
+ *
3812
+ * A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
3813
+ *
3814
+ * ```text
3815
+ * startIndex <= i <= endIndex
3816
+ * ```
3817
+ *
3818
+ * Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
3819
+ *
3820
+ *
3821
+ * Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
3822
+ * field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
3823
+ * When a collision does occur, we will create a new type 'bucket' that will have a different index range where
3824
+ * the new record field types will be placed.
3825
+ * It is guaranteed that every field of every record will have a corresponding type.
3826
+ * **Clients should always take the included types into account when consuming records!**
3827
+ *
3828
+ * @returns The final status and results of the supplied query if it finished within a supplied requestTimeoutMilliseconds. | The status of the query to start.
3829
+ *
3830
+ * @example <caption>Code example</caption>
3831
+ * import { queryExecutionClient } from "@dynatrace-sdk/client-query";
3832
+ *
3833
+ * const data = await queryExecutionClient.queryExecute({
3834
+ * body: {
3835
+ * query:
3836
+ * 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
3837
+ * },
3838
+ * });
3839
+ */
3352
3840
  async queryExecute(config) {
3353
3841
  if (!config) {
3354
3842
  throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
3355
3843
  }
3356
- const encodedBody = toJson21(config.body);
3844
+ const encodedBody = toJson22(config.body);
3357
3845
  const query = toQueryString({ enrich: config.enrich });
3358
3846
  try {
3359
3847
  const response = await this.httpClient.send({
@@ -3374,7 +3862,7 @@ var QueryExecutionClient = class {
3374
3862
  case 200: {
3375
3863
  const responseValue = await response.body("json");
3376
3864
  try {
3377
- return fromJson36(responseValue);
3865
+ return fromJson37(responseValue);
3378
3866
  } catch (err) {
3379
3867
  throw new InvalidResponseError(
3380
3868
  `QueryExecutionClient.query:execute:${response.status}`,
@@ -3388,7 +3876,7 @@ var QueryExecutionClient = class {
3388
3876
  case 202: {
3389
3877
  const responseValue = await response.body("json");
3390
3878
  try {
3391
- return fromJson36(responseValue);
3879
+ return fromJson37(responseValue);
3392
3880
  } catch (err) {
3393
3881
  throw new InvalidResponseError(
3394
3882
  `QueryExecutionClient.query:execute:${response.status}`,
@@ -3421,7 +3909,7 @@ var QueryExecutionClient = class {
3421
3909
  case 400: {
3422
3910
  const responseValue = await response.body("json");
3423
3911
  try {
3424
- const errorBody = fromJson16(responseValue);
3912
+ const errorBody = fromJson17(responseValue);
3425
3913
  throw new ErrorEnvelopeError(
3426
3914
  `400`,
3427
3915
  response,
@@ -3448,7 +3936,7 @@ var QueryExecutionClient = class {
3448
3936
  case 403: {
3449
3937
  const responseValue = await response.body("json");
3450
3938
  try {
3451
- const errorBody = fromJson16(responseValue);
3939
+ const errorBody = fromJson17(responseValue);
3452
3940
  throw new ErrorEnvelopeError(
3453
3941
  `403`,
3454
3942
  response,
@@ -3472,7 +3960,7 @@ var QueryExecutionClient = class {
3472
3960
  case 429: {
3473
3961
  const responseValue = await response.body("json");
3474
3962
  try {
3475
- const errorBody = fromJson16(responseValue);
3963
+ const errorBody = fromJson17(responseValue);
3476
3964
  throw new ErrorEnvelopeError(
3477
3965
  `429`,
3478
3966
  response,
@@ -3496,7 +3984,7 @@ var QueryExecutionClient = class {
3496
3984
  case 500: {
3497
3985
  const responseValue = await response.body("json");
3498
3986
  try {
3499
- const errorBody = fromJson16(responseValue);
3987
+ const errorBody = fromJson17(responseValue);
3500
3988
  throw new ErrorEnvelopeError(
3501
3989
  `500`,
3502
3990
  response,
@@ -3520,7 +4008,7 @@ var QueryExecutionClient = class {
3520
4008
  case 503: {
3521
4009
  const responseValue = await response.body("json");
3522
4010
  try {
3523
- const errorBody = fromJson16(responseValue);
4011
+ const errorBody = fromJson17(responseValue);
3524
4012
  throw new ErrorEnvelopeError(
3525
4013
  `503`,
3526
4014
  response,
@@ -3545,7 +4033,7 @@ var QueryExecutionClient = class {
3545
4033
  if (response.status >= 400 && response.status <= 499) {
3546
4034
  const responseValue = await response.body("json");
3547
4035
  try {
3548
- const errorBody = fromJson16(responseValue);
4036
+ const errorBody = fromJson17(responseValue);
3549
4037
  throw new ErrorEnvelopeError(
3550
4038
  `${response.status}`,
3551
4039
  response,
@@ -3568,7 +4056,7 @@ var QueryExecutionClient = class {
3568
4056
  } else if (response.status >= 500 && response.status <= 599) {
3569
4057
  const responseValue = await response.body("json");
3570
4058
  try {
3571
- const errorBody = fromJson16(responseValue);
4059
+ const errorBody = fromJson17(responseValue);
3572
4060
  throw new ErrorEnvelopeError(
3573
4061
  `${response.status}`,
3574
4062
  response,
@@ -3604,6 +4092,53 @@ var QueryExecutionClient = class {
3604
4092
  }
3605
4093
  }
3606
4094
  }
4095
+ /**
4096
+ * Cancels the query and returns the result if the query was already finished, otherwise discards it.
4097
+ *
4098
+ * 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).
4099
+ *
4100
+ * ### Overview:
4101
+ *
4102
+ * Cancels a running Grail query and returns a list of records if the query already finished.
4103
+ *
4104
+ * ### The response format:
4105
+ *
4106
+ * If the query was already finished, a response body including the result will be returned. Otherwise the response will contain no body.
4107
+ *
4108
+ * The result has three main sections:
4109
+ * * the 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
4110
+ * * the 'types' section describes the corresponding data types that a record field has.
4111
+ * * the 'metadata' section contains information about the query like 'analysisTimeframe', 'timezone' or 'locale'.
4112
+ *
4113
+ * Every record has an implicit 'index' according to the position in the 'records' JSON array.
4114
+ * The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
4115
+ * records will find their field types in which bucket. The index range has two values start & end and can be thought of as [startIndex, endIndex).
4116
+ *
4117
+ * A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
4118
+ *
4119
+ * ```text
4120
+ * startIndex <= i <= endIndex
4121
+ * ```
4122
+ *
4123
+ * Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
4124
+ *
4125
+ *
4126
+ * Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
4127
+ * field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
4128
+ * When a collision does occur, we will create a new type 'bucket' that will have a different index range where
4129
+ * the new record field types will be placed.
4130
+ * It is guaranteed that every field of every record will have a corresponding type.
4131
+ * **Clients should always take the included types into account when consuming records!**
4132
+ *
4133
+ * @returns The query already finished.
4134
+ *
4135
+ * @example <caption>Code example</caption>
4136
+ * import { queryExecutionClient } from "@dynatrace-sdk/client-query";
4137
+ *
4138
+ * const data = await queryExecutionClient.queryCancel({
4139
+ * requestToken: "...",
4140
+ * });
4141
+ */
3607
4142
  async queryCancel(config) {
3608
4143
  if (!config) {
3609
4144
  throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
@@ -3628,7 +4163,7 @@ var QueryExecutionClient = class {
3628
4163
  case 200: {
3629
4164
  const responseValue = await response.body("json");
3630
4165
  try {
3631
- return fromJson35(responseValue);
4166
+ return fromJson36(responseValue);
3632
4167
  } catch (err) {
3633
4168
  throw new InvalidResponseError(
3634
4169
  `QueryExecutionClient.query:cancel:${response.status}`,
@@ -3664,7 +4199,7 @@ var QueryExecutionClient = class {
3664
4199
  case 400: {
3665
4200
  const responseValue = await response.body("json");
3666
4201
  try {
3667
- const errorBody = fromJson16(responseValue);
4202
+ const errorBody = fromJson17(responseValue);
3668
4203
  throw new ErrorEnvelopeError(
3669
4204
  `400`,
3670
4205
  response,
@@ -3689,7 +4224,10 @@ var QueryExecutionClient = class {
3689
4224
  }
3690
4225
  }
3691
4226
  case 410: {
3692
- const responseValue = await response.body("text");
4227
+ const responseValue = await response.body(
4228
+ "text"
4229
+ /* type from spec unsupported */
4230
+ );
3693
4231
  throw new ClientRequestError(
3694
4232
  `410`,
3695
4233
  response,
@@ -3700,7 +4238,7 @@ var QueryExecutionClient = class {
3700
4238
  case 500: {
3701
4239
  const responseValue = await response.body("json");
3702
4240
  try {
3703
- const errorBody = fromJson16(responseValue);
4241
+ const errorBody = fromJson17(responseValue);
3704
4242
  throw new ErrorEnvelopeError(
3705
4243
  `500`,
3706
4244
  response,
@@ -3842,6 +4380,7 @@ export {
3842
4380
  dql_node_transformation_exports as _DQLNodeTransformation,
3843
4381
  dql_terminal_node_transformation_exports as _DQLTerminalNodeTransformation,
3844
4382
  error_envelope_transformation_exports as _ErrorEnvelopeTransformation,
4383
+ error_response_details_constraint_violations_item_transformation_exports as _ErrorResponseDetailsConstraintViolationsItemTransformation,
3845
4384
  error_response_details_transformation_exports as _ErrorResponseDetailsTransformation,
3846
4385
  error_response_transformation_exports as _ErrorResponseTransformation,
3847
4386
  execute_request_transformation_exports as _ExecuteRequestTransformation,