@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.
- package/CHANGELOG.md +24 -0
- package/README.md +73 -53
- package/cjs/index.js +782 -243
- package/dynatrace-metadata.json +2 -2
- package/esm/index.js +782 -243
- package/package.json +2 -2
- package/types/packages/client/query/src/lib/models/dql-node-node-type.transformation.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.d.ts +14 -0
- package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.transformation.d.ts +10 -0
- package/types/packages/client/query/src/lib/models/error-response-details.d.ts +20 -7
- package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts +11 -7
- package/types/packages/client/query/src/lib/models/error-response.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/error-response.transformation.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/field-type-type.transformation.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/index.d.ts +2 -0
- package/types/packages/client/query/src/lib/models/query-state.transformation.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/result-record-value.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/result-record-value.transformation.d.ts +1 -1
- package/types/packages/client/query/src/lib/models/token-type.transformation.d.ts +1 -1
- package/types/packages/client/query/src/lib/utils/url-helpers.d.ts +1 -1
- package/types/packages/http-client/src/lib/platform/abort-controller.d.ts +1 -1
- package/types/packages/http-client/src/lib/platform/abort-signal.d.ts +1 -1
- package/types/packages/http-client/src/lib/platform/decode-form-data.d.ts +48 -0
- package/types/packages/http-client/src/lib/platform/http-client.d.ts +8 -0
- package/types/packages/http-client/src/lib/types/abort-signal.d.ts +4 -1
- package/types/packages/http-client/src/lib/types/data-types.d.ts +1 -1
- package/types/packages/http-client/src/lib/types/form-data-request-body.d.ts +2 -2
- package/types/packages/http-client/src/lib/types/form-data-response-body.d.ts +2 -2
- package/types/packages/http-client/src/lib/types/request-body-types.d.ts +1 -1
- package/types/packages/http-client/src/lib/types/response-body-types.d.ts +1 -1
- package/types/packages/platform/error-handlers/src/lib/types/global-dt-runtime-with-error-handlers.d.ts +1 -1
- package/types/packages/platform/error-handlers/src/lib/types/global-error-serializer.d.ts +1 -1
- package/types/packages/platform/error-handlers/src/lib/types/serialized-error.d.ts +1 -1
- package/docs/DOCS.md +0 -1207
package/cjs/index.js
CHANGED
|
@@ -51,6 +51,7 @@ __export(src_exports, {
|
|
|
51
51
|
_DQLNodeTransformation: () => dql_node_transformation_exports,
|
|
52
52
|
_DQLTerminalNodeTransformation: () => dql_terminal_node_transformation_exports,
|
|
53
53
|
_ErrorEnvelopeTransformation: () => error_envelope_transformation_exports,
|
|
54
|
+
_ErrorResponseDetailsConstraintViolationsItemTransformation: () => error_response_details_constraint_violations_item_transformation_exports,
|
|
54
55
|
_ErrorResponseDetailsTransformation: () => error_response_details_transformation_exports,
|
|
55
56
|
_ErrorResponseTransformation: () => error_response_transformation_exports,
|
|
56
57
|
_ExecuteRequestTransformation: () => execute_request_transformation_exports,
|
|
@@ -1037,30 +1038,97 @@ function toJson7($model, includeChildProps = true) {
|
|
|
1037
1038
|
var error_envelope_transformation_exports = {};
|
|
1038
1039
|
__export(error_envelope_transformation_exports, {
|
|
1039
1040
|
fromFormData: () => fromFormData2,
|
|
1040
|
-
fromJson: () =>
|
|
1041
|
+
fromJson: () => fromJson17,
|
|
1041
1042
|
isErrorEnvelope: () => isErrorEnvelope,
|
|
1042
|
-
isJson: () =>
|
|
1043
|
+
isJson: () => isJson17,
|
|
1043
1044
|
toFormData: () => toFormData2,
|
|
1044
|
-
toJson: () =>
|
|
1045
|
+
toJson: () => toJson17
|
|
1045
1046
|
});
|
|
1046
1047
|
|
|
1047
1048
|
// packages/client/query/src/lib/models/error-response.transformation.ts
|
|
1048
1049
|
var error_response_transformation_exports = {};
|
|
1049
1050
|
__export(error_response_transformation_exports, {
|
|
1050
|
-
fromJson: () =>
|
|
1051
|
+
fromJson: () => fromJson16,
|
|
1051
1052
|
isErrorResponse: () => isErrorResponse,
|
|
1052
|
-
isJson: () =>
|
|
1053
|
-
toJson: () =>
|
|
1053
|
+
isJson: () => isJson16,
|
|
1054
|
+
toJson: () => toJson16
|
|
1054
1055
|
});
|
|
1055
1056
|
|
|
1056
1057
|
// packages/client/query/src/lib/models/error-response-details.transformation.ts
|
|
1057
1058
|
var error_response_details_transformation_exports = {};
|
|
1058
1059
|
__export(error_response_details_transformation_exports, {
|
|
1059
|
-
fromJson: () =>
|
|
1060
|
+
fromJson: () => fromJson15,
|
|
1060
1061
|
isErrorResponseDetails: () => isErrorResponseDetails,
|
|
1062
|
+
isJson: () => isJson15,
|
|
1063
|
+
toJson: () => toJson15
|
|
1064
|
+
});
|
|
1065
|
+
|
|
1066
|
+
// packages/client/query/src/lib/models/error-response-details-constraint-violations-item.transformation.ts
|
|
1067
|
+
var error_response_details_constraint_violations_item_transformation_exports = {};
|
|
1068
|
+
__export(error_response_details_constraint_violations_item_transformation_exports, {
|
|
1069
|
+
fromJson: () => fromJson14,
|
|
1070
|
+
isErrorResponseDetailsConstraintViolationsItem: () => isErrorResponseDetailsConstraintViolationsItem,
|
|
1061
1071
|
isJson: () => isJson14,
|
|
1062
1072
|
toJson: () => toJson14
|
|
1063
1073
|
});
|
|
1074
|
+
function isErrorResponseDetailsConstraintViolationsItem(value) {
|
|
1075
|
+
if (value === null) {
|
|
1076
|
+
return false;
|
|
1077
|
+
}
|
|
1078
|
+
if (value === void 0) {
|
|
1079
|
+
return false;
|
|
1080
|
+
}
|
|
1081
|
+
if (Array.isArray(value)) {
|
|
1082
|
+
return false;
|
|
1083
|
+
}
|
|
1084
|
+
const modelKeys = /* @__PURE__ */ new Set(["message", "parameterLocation", "parameterDescriptor"]);
|
|
1085
|
+
const hasAdditionalProperties = false;
|
|
1086
|
+
const requiredKeys = ["message"];
|
|
1087
|
+
const optionalKeys = ["parameterLocation", "parameterDescriptor"];
|
|
1088
|
+
const valKeys = new Set(Object.keys(value));
|
|
1089
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1090
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1091
|
+
const allPropertiesMatchFormat = true;
|
|
1092
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1093
|
+
}
|
|
1094
|
+
function isJson14(value) {
|
|
1095
|
+
if (value === null) {
|
|
1096
|
+
return false;
|
|
1097
|
+
}
|
|
1098
|
+
if (value === void 0) {
|
|
1099
|
+
return false;
|
|
1100
|
+
}
|
|
1101
|
+
if (Array.isArray(value)) {
|
|
1102
|
+
return false;
|
|
1103
|
+
}
|
|
1104
|
+
const modelKeys = /* @__PURE__ */ new Set(["message", "parameterLocation", "parameterDescriptor"]);
|
|
1105
|
+
const hasAdditionalProperties = false;
|
|
1106
|
+
const requiredKeys = ["message"];
|
|
1107
|
+
const optionalKeys = ["parameterLocation", "parameterDescriptor"];
|
|
1108
|
+
const valKeys = new Set(Object.keys(value));
|
|
1109
|
+
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1110
|
+
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1111
|
+
const allPropertiesMatchFormat = true;
|
|
1112
|
+
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1113
|
+
}
|
|
1114
|
+
function fromJson14($model) {
|
|
1115
|
+
const { message, parameterLocation, parameterDescriptor } = $model;
|
|
1116
|
+
return {
|
|
1117
|
+
message,
|
|
1118
|
+
parameterLocation,
|
|
1119
|
+
parameterDescriptor
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
function toJson14($model) {
|
|
1123
|
+
const { message, parameterLocation, parameterDescriptor } = $model;
|
|
1124
|
+
return {
|
|
1125
|
+
message,
|
|
1126
|
+
parameterLocation,
|
|
1127
|
+
parameterDescriptor
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
// packages/client/query/src/lib/models/error-response-details.transformation.ts
|
|
1064
1132
|
function isErrorResponseDetails(value) {
|
|
1065
1133
|
if (value === null) {
|
|
1066
1134
|
return false;
|
|
@@ -1080,26 +1148,34 @@ function isErrorResponseDetails(value) {
|
|
|
1080
1148
|
"queryString",
|
|
1081
1149
|
"errorMessageFormatSpecifierTypes",
|
|
1082
1150
|
"errorMessageFormat",
|
|
1083
|
-
"queryId"
|
|
1151
|
+
"queryId",
|
|
1152
|
+
"constraintViolations",
|
|
1153
|
+
"missingScopes",
|
|
1154
|
+
"missingPermissions"
|
|
1084
1155
|
]);
|
|
1085
1156
|
const hasAdditionalProperties = false;
|
|
1086
|
-
const requiredKeys = [
|
|
1087
|
-
|
|
1157
|
+
const requiredKeys = [];
|
|
1158
|
+
const optionalKeys = [
|
|
1159
|
+
"exceptionType",
|
|
1160
|
+
"syntaxErrorPosition",
|
|
1161
|
+
"errorType",
|
|
1088
1162
|
"errorMessage",
|
|
1089
|
-
"
|
|
1163
|
+
"arguments",
|
|
1164
|
+
"queryString",
|
|
1090
1165
|
"errorMessageFormatSpecifierTypes",
|
|
1091
|
-
"
|
|
1092
|
-
"
|
|
1093
|
-
"
|
|
1166
|
+
"errorMessageFormat",
|
|
1167
|
+
"queryId",
|
|
1168
|
+
"constraintViolations",
|
|
1169
|
+
"missingScopes",
|
|
1170
|
+
"missingPermissions"
|
|
1094
1171
|
];
|
|
1095
|
-
const optionalKeys = ["syntaxErrorPosition", "queryId"];
|
|
1096
1172
|
const valKeys = new Set(Object.keys(value));
|
|
1097
1173
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1098
1174
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1099
1175
|
const allPropertiesMatchFormat = true;
|
|
1100
1176
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1101
1177
|
}
|
|
1102
|
-
function
|
|
1178
|
+
function isJson15(value) {
|
|
1103
1179
|
if (value === null) {
|
|
1104
1180
|
return false;
|
|
1105
1181
|
}
|
|
@@ -1118,26 +1194,34 @@ function isJson14(value) {
|
|
|
1118
1194
|
"queryString",
|
|
1119
1195
|
"errorMessageFormatSpecifierTypes",
|
|
1120
1196
|
"errorMessageFormat",
|
|
1121
|
-
"queryId"
|
|
1197
|
+
"queryId",
|
|
1198
|
+
"constraintViolations",
|
|
1199
|
+
"missingScopes",
|
|
1200
|
+
"missingPermissions"
|
|
1122
1201
|
]);
|
|
1123
1202
|
const hasAdditionalProperties = false;
|
|
1124
|
-
const requiredKeys = [
|
|
1125
|
-
|
|
1203
|
+
const requiredKeys = [];
|
|
1204
|
+
const optionalKeys = [
|
|
1205
|
+
"exceptionType",
|
|
1206
|
+
"syntaxErrorPosition",
|
|
1207
|
+
"errorType",
|
|
1126
1208
|
"errorMessage",
|
|
1127
|
-
"
|
|
1209
|
+
"arguments",
|
|
1210
|
+
"queryString",
|
|
1128
1211
|
"errorMessageFormatSpecifierTypes",
|
|
1129
|
-
"
|
|
1130
|
-
"
|
|
1131
|
-
"
|
|
1212
|
+
"errorMessageFormat",
|
|
1213
|
+
"queryId",
|
|
1214
|
+
"constraintViolations",
|
|
1215
|
+
"missingScopes",
|
|
1216
|
+
"missingPermissions"
|
|
1132
1217
|
];
|
|
1133
|
-
const optionalKeys = ["syntaxErrorPosition", "queryId"];
|
|
1134
1218
|
const valKeys = new Set(Object.keys(value));
|
|
1135
1219
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1136
1220
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1137
1221
|
const allPropertiesMatchFormat = true;
|
|
1138
1222
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1139
1223
|
}
|
|
1140
|
-
function
|
|
1224
|
+
function fromJson15($model) {
|
|
1141
1225
|
const {
|
|
1142
1226
|
exceptionType,
|
|
1143
1227
|
syntaxErrorPosition,
|
|
@@ -1147,21 +1231,29 @@ function fromJson14($model) {
|
|
|
1147
1231
|
queryString,
|
|
1148
1232
|
errorMessageFormatSpecifierTypes,
|
|
1149
1233
|
errorMessageFormat,
|
|
1150
|
-
queryId
|
|
1234
|
+
queryId,
|
|
1235
|
+
constraintViolations,
|
|
1236
|
+
missingScopes,
|
|
1237
|
+
missingPermissions
|
|
1151
1238
|
} = $model;
|
|
1152
1239
|
return {
|
|
1153
1240
|
exceptionType,
|
|
1154
1241
|
syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? fromJson13(syntaxErrorPosition) : void 0,
|
|
1155
1242
|
errorType,
|
|
1156
1243
|
errorMessage,
|
|
1157
|
-
arguments: _arguments?.slice(0),
|
|
1244
|
+
arguments: _arguments !== void 0 && _arguments !== null ? _arguments?.slice(0) : void 0,
|
|
1158
1245
|
queryString,
|
|
1159
|
-
errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
|
|
1246
|
+
errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes !== void 0 && errorMessageFormatSpecifierTypes !== null ? errorMessageFormatSpecifierTypes?.slice(0) : void 0,
|
|
1160
1247
|
errorMessageFormat,
|
|
1161
|
-
queryId
|
|
1248
|
+
queryId,
|
|
1249
|
+
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map(
|
|
1250
|
+
(innerValue) => fromJson14(innerValue)
|
|
1251
|
+
) : void 0,
|
|
1252
|
+
missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0,
|
|
1253
|
+
missingPermissions: missingPermissions !== void 0 && missingPermissions !== null ? missingPermissions?.slice(0) : void 0
|
|
1162
1254
|
};
|
|
1163
1255
|
}
|
|
1164
|
-
function
|
|
1256
|
+
function toJson15($model) {
|
|
1165
1257
|
const {
|
|
1166
1258
|
exceptionType,
|
|
1167
1259
|
syntaxErrorPosition,
|
|
@@ -1171,18 +1263,26 @@ function toJson14($model) {
|
|
|
1171
1263
|
queryString,
|
|
1172
1264
|
errorMessageFormatSpecifierTypes,
|
|
1173
1265
|
errorMessageFormat,
|
|
1174
|
-
queryId
|
|
1266
|
+
queryId,
|
|
1267
|
+
constraintViolations,
|
|
1268
|
+
missingScopes,
|
|
1269
|
+
missingPermissions
|
|
1175
1270
|
} = $model;
|
|
1176
1271
|
return {
|
|
1177
1272
|
exceptionType,
|
|
1178
1273
|
syntaxErrorPosition: syntaxErrorPosition !== void 0 && syntaxErrorPosition !== null ? toJson13(syntaxErrorPosition) : void 0,
|
|
1179
1274
|
errorType,
|
|
1180
1275
|
errorMessage,
|
|
1181
|
-
arguments: _arguments?.slice(0),
|
|
1276
|
+
arguments: _arguments !== void 0 && _arguments !== null ? _arguments?.slice(0) : void 0,
|
|
1182
1277
|
queryString,
|
|
1183
|
-
errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes?.slice(0),
|
|
1278
|
+
errorMessageFormatSpecifierTypes: errorMessageFormatSpecifierTypes !== void 0 && errorMessageFormatSpecifierTypes !== null ? errorMessageFormatSpecifierTypes?.slice(0) : void 0,
|
|
1184
1279
|
errorMessageFormat,
|
|
1185
|
-
queryId
|
|
1280
|
+
queryId,
|
|
1281
|
+
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map(
|
|
1282
|
+
(innerValue) => toJson14(innerValue)
|
|
1283
|
+
) : void 0,
|
|
1284
|
+
missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0,
|
|
1285
|
+
missingPermissions: missingPermissions !== void 0 && missingPermissions !== null ? missingPermissions?.slice(0) : void 0
|
|
1186
1286
|
};
|
|
1187
1287
|
}
|
|
1188
1288
|
|
|
@@ -1199,15 +1299,15 @@ function isErrorResponse(value) {
|
|
|
1199
1299
|
}
|
|
1200
1300
|
const modelKeys = /* @__PURE__ */ new Set(["message", "details", "code"]);
|
|
1201
1301
|
const hasAdditionalProperties = false;
|
|
1202
|
-
const requiredKeys = ["code", "
|
|
1203
|
-
const optionalKeys = [];
|
|
1302
|
+
const requiredKeys = ["code", "message"];
|
|
1303
|
+
const optionalKeys = ["details"];
|
|
1204
1304
|
const valKeys = new Set(Object.keys(value));
|
|
1205
1305
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1206
1306
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1207
1307
|
const allPropertiesMatchFormat = true;
|
|
1208
1308
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1209
1309
|
}
|
|
1210
|
-
function
|
|
1310
|
+
function isJson16(value) {
|
|
1211
1311
|
if (value === null) {
|
|
1212
1312
|
return false;
|
|
1213
1313
|
}
|
|
@@ -1219,27 +1319,27 @@ function isJson15(value) {
|
|
|
1219
1319
|
}
|
|
1220
1320
|
const modelKeys = /* @__PURE__ */ new Set(["message", "details", "code"]);
|
|
1221
1321
|
const hasAdditionalProperties = false;
|
|
1222
|
-
const requiredKeys = ["code", "
|
|
1223
|
-
const optionalKeys = [];
|
|
1322
|
+
const requiredKeys = ["code", "message"];
|
|
1323
|
+
const optionalKeys = ["details"];
|
|
1224
1324
|
const valKeys = new Set(Object.keys(value));
|
|
1225
1325
|
const containsRequiredOrOptionalKeys = requiredKeys.length > 0 ? requiredKeys.every((reqKey) => valKeys.has(reqKey)) : optionalKeys.some((key) => valKeys.has(key)) || hasAdditionalProperties;
|
|
1226
1326
|
const doesNotContainExtraKeys = [...valKeys].every((key) => modelKeys.has(key)) || hasAdditionalProperties;
|
|
1227
1327
|
const allPropertiesMatchFormat = true;
|
|
1228
1328
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1229
1329
|
}
|
|
1230
|
-
function
|
|
1330
|
+
function fromJson16($model) {
|
|
1231
1331
|
const { message, details, code } = $model;
|
|
1232
1332
|
return {
|
|
1233
1333
|
message,
|
|
1234
|
-
details:
|
|
1334
|
+
details: details !== void 0 && details !== null ? fromJson15(details) : void 0,
|
|
1235
1335
|
code
|
|
1236
1336
|
};
|
|
1237
1337
|
}
|
|
1238
|
-
function
|
|
1338
|
+
function toJson16($model) {
|
|
1239
1339
|
const { message, details, code } = $model;
|
|
1240
1340
|
return {
|
|
1241
1341
|
message,
|
|
1242
|
-
details:
|
|
1342
|
+
details: details !== void 0 && details !== null ? toJson15(details) : void 0,
|
|
1243
1343
|
code
|
|
1244
1344
|
};
|
|
1245
1345
|
}
|
|
@@ -1265,7 +1365,7 @@ function isErrorEnvelope(value) {
|
|
|
1265
1365
|
const allPropertiesMatchFormat = true;
|
|
1266
1366
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1267
1367
|
}
|
|
1268
|
-
function
|
|
1368
|
+
function isJson17(value) {
|
|
1269
1369
|
if (value === null) {
|
|
1270
1370
|
return false;
|
|
1271
1371
|
}
|
|
@@ -1285,26 +1385,26 @@ function isJson16(value) {
|
|
|
1285
1385
|
const allPropertiesMatchFormat = true;
|
|
1286
1386
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1287
1387
|
}
|
|
1288
|
-
function
|
|
1388
|
+
function fromJson17($model) {
|
|
1289
1389
|
const { error } = $model;
|
|
1290
1390
|
return {
|
|
1291
|
-
error:
|
|
1391
|
+
error: fromJson16(error)
|
|
1292
1392
|
};
|
|
1293
1393
|
}
|
|
1294
|
-
function
|
|
1394
|
+
function toJson17($model) {
|
|
1295
1395
|
const { error } = $model;
|
|
1296
1396
|
return {
|
|
1297
|
-
error:
|
|
1397
|
+
error: toJson16(error)
|
|
1298
1398
|
};
|
|
1299
1399
|
}
|
|
1300
1400
|
function fromFormData2(formData) {
|
|
1301
1401
|
const formDataEntries = Object.fromEntries(formData.map((data) => [data.name, data.value]));
|
|
1302
1402
|
return {
|
|
1303
|
-
error:
|
|
1403
|
+
error: fromJson16(JSON.parse(formDataEntries["error"]))
|
|
1304
1404
|
};
|
|
1305
1405
|
}
|
|
1306
1406
|
function toFormData2($model) {
|
|
1307
|
-
const json =
|
|
1407
|
+
const json = toJson17($model);
|
|
1308
1408
|
const body = [{ name: "error", type: "json", value: json["error"] }];
|
|
1309
1409
|
return body;
|
|
1310
1410
|
}
|
|
@@ -1312,10 +1412,10 @@ function toFormData2($model) {
|
|
|
1312
1412
|
// packages/client/query/src/lib/models/parse-request.transformation.ts
|
|
1313
1413
|
var parse_request_transformation_exports = {};
|
|
1314
1414
|
__export(parse_request_transformation_exports, {
|
|
1315
|
-
fromJson: () =>
|
|
1316
|
-
isJson: () =>
|
|
1415
|
+
fromJson: () => fromJson18,
|
|
1416
|
+
isJson: () => isJson18,
|
|
1317
1417
|
isParseRequest: () => isParseRequest,
|
|
1318
|
-
toJson: () =>
|
|
1418
|
+
toJson: () => toJson18
|
|
1319
1419
|
});
|
|
1320
1420
|
function isParseRequest(value) {
|
|
1321
1421
|
if (value === null) {
|
|
@@ -1337,7 +1437,7 @@ function isParseRequest(value) {
|
|
|
1337
1437
|
const allPropertiesMatchFormat = true;
|
|
1338
1438
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1339
1439
|
}
|
|
1340
|
-
function
|
|
1440
|
+
function isJson18(value) {
|
|
1341
1441
|
if (value === null) {
|
|
1342
1442
|
return false;
|
|
1343
1443
|
}
|
|
@@ -1357,7 +1457,7 @@ function isJson17(value) {
|
|
|
1357
1457
|
const allPropertiesMatchFormat = true;
|
|
1358
1458
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1359
1459
|
}
|
|
1360
|
-
function
|
|
1460
|
+
function fromJson18($model) {
|
|
1361
1461
|
const { query, timezone, locale, queryOptions } = $model;
|
|
1362
1462
|
return {
|
|
1363
1463
|
query,
|
|
@@ -1366,7 +1466,7 @@ function fromJson17($model) {
|
|
|
1366
1466
|
queryOptions: queryOptions !== void 0 && queryOptions !== null ? fromJson(queryOptions) : void 0
|
|
1367
1467
|
};
|
|
1368
1468
|
}
|
|
1369
|
-
function
|
|
1469
|
+
function toJson18($model) {
|
|
1370
1470
|
const { query, timezone, locale, queryOptions } = $model;
|
|
1371
1471
|
return {
|
|
1372
1472
|
query,
|
|
@@ -1379,10 +1479,10 @@ function toJson17($model) {
|
|
|
1379
1479
|
// packages/client/query/src/lib/models/verify-request.transformation.ts
|
|
1380
1480
|
var verify_request_transformation_exports = {};
|
|
1381
1481
|
__export(verify_request_transformation_exports, {
|
|
1382
|
-
fromJson: () =>
|
|
1383
|
-
isJson: () =>
|
|
1482
|
+
fromJson: () => fromJson19,
|
|
1483
|
+
isJson: () => isJson19,
|
|
1384
1484
|
isVerifyRequest: () => isVerifyRequest,
|
|
1385
|
-
toJson: () =>
|
|
1485
|
+
toJson: () => toJson19
|
|
1386
1486
|
});
|
|
1387
1487
|
function isVerifyRequest(value) {
|
|
1388
1488
|
if (value === null) {
|
|
@@ -1404,7 +1504,7 @@ function isVerifyRequest(value) {
|
|
|
1404
1504
|
const allPropertiesMatchFormat = true;
|
|
1405
1505
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1406
1506
|
}
|
|
1407
|
-
function
|
|
1507
|
+
function isJson19(value) {
|
|
1408
1508
|
if (value === null) {
|
|
1409
1509
|
return false;
|
|
1410
1510
|
}
|
|
@@ -1424,7 +1524,7 @@ function isJson18(value) {
|
|
|
1424
1524
|
const allPropertiesMatchFormat = true;
|
|
1425
1525
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1426
1526
|
}
|
|
1427
|
-
function
|
|
1527
|
+
function fromJson19($model) {
|
|
1428
1528
|
const { query, timezone, locale, queryOptions, generateCanonicalQuery } = $model;
|
|
1429
1529
|
return {
|
|
1430
1530
|
query,
|
|
@@ -1434,7 +1534,7 @@ function fromJson18($model) {
|
|
|
1434
1534
|
generateCanonicalQuery
|
|
1435
1535
|
};
|
|
1436
1536
|
}
|
|
1437
|
-
function
|
|
1537
|
+
function toJson19($model) {
|
|
1438
1538
|
const { query, timezone, locale, queryOptions, generateCanonicalQuery } = $model;
|
|
1439
1539
|
return {
|
|
1440
1540
|
query,
|
|
@@ -1448,19 +1548,19 @@ function toJson18($model) {
|
|
|
1448
1548
|
// packages/client/query/src/lib/models/verify-response.transformation.ts
|
|
1449
1549
|
var verify_response_transformation_exports = {};
|
|
1450
1550
|
__export(verify_response_transformation_exports, {
|
|
1451
|
-
fromJson: () =>
|
|
1452
|
-
isJson: () =>
|
|
1551
|
+
fromJson: () => fromJson21,
|
|
1552
|
+
isJson: () => isJson21,
|
|
1453
1553
|
isVerifyResponse: () => isVerifyResponse,
|
|
1454
|
-
toJson: () =>
|
|
1554
|
+
toJson: () => toJson21
|
|
1455
1555
|
});
|
|
1456
1556
|
|
|
1457
1557
|
// packages/client/query/src/lib/models/metadata-notification.transformation.ts
|
|
1458
1558
|
var metadata_notification_transformation_exports = {};
|
|
1459
1559
|
__export(metadata_notification_transformation_exports, {
|
|
1460
|
-
fromJson: () =>
|
|
1461
|
-
isJson: () =>
|
|
1560
|
+
fromJson: () => fromJson20,
|
|
1561
|
+
isJson: () => isJson20,
|
|
1462
1562
|
isMetadataNotification: () => isMetadataNotification,
|
|
1463
|
-
toJson: () =>
|
|
1563
|
+
toJson: () => toJson20
|
|
1464
1564
|
});
|
|
1465
1565
|
function isMetadataNotification(value) {
|
|
1466
1566
|
if (value === null) {
|
|
@@ -1498,7 +1598,7 @@ function isMetadataNotification(value) {
|
|
|
1498
1598
|
const allPropertiesMatchFormat = true;
|
|
1499
1599
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1500
1600
|
}
|
|
1501
|
-
function
|
|
1601
|
+
function isJson20(value) {
|
|
1502
1602
|
if (value === null) {
|
|
1503
1603
|
return false;
|
|
1504
1604
|
}
|
|
@@ -1534,7 +1634,7 @@ function isJson19(value) {
|
|
|
1534
1634
|
const allPropertiesMatchFormat = true;
|
|
1535
1635
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1536
1636
|
}
|
|
1537
|
-
function
|
|
1637
|
+
function fromJson20($model) {
|
|
1538
1638
|
const {
|
|
1539
1639
|
severity,
|
|
1540
1640
|
messageFormat,
|
|
@@ -1554,7 +1654,7 @@ function fromJson19($model) {
|
|
|
1554
1654
|
message
|
|
1555
1655
|
};
|
|
1556
1656
|
}
|
|
1557
|
-
function
|
|
1657
|
+
function toJson20($model) {
|
|
1558
1658
|
const {
|
|
1559
1659
|
severity,
|
|
1560
1660
|
messageFormat,
|
|
@@ -1596,7 +1696,7 @@ function isVerifyResponse(value) {
|
|
|
1596
1696
|
const allPropertiesMatchFormat = true;
|
|
1597
1697
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1598
1698
|
}
|
|
1599
|
-
function
|
|
1699
|
+
function isJson21(value) {
|
|
1600
1700
|
if (value === null) {
|
|
1601
1701
|
return false;
|
|
1602
1702
|
}
|
|
@@ -1616,35 +1716,62 @@ function isJson20(value) {
|
|
|
1616
1716
|
const allPropertiesMatchFormat = true;
|
|
1617
1717
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
1618
1718
|
}
|
|
1619
|
-
function
|
|
1719
|
+
function fromJson21($model) {
|
|
1620
1720
|
const { valid, canonicalQuery, notifications } = $model;
|
|
1621
1721
|
return {
|
|
1622
1722
|
valid,
|
|
1623
1723
|
canonicalQuery,
|
|
1624
|
-
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) =>
|
|
1724
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson20(innerValue)) : void 0
|
|
1625
1725
|
};
|
|
1626
1726
|
}
|
|
1627
|
-
function
|
|
1727
|
+
function toJson21($model) {
|
|
1628
1728
|
const { valid, canonicalQuery, notifications } = $model;
|
|
1629
1729
|
return {
|
|
1630
1730
|
valid,
|
|
1631
1731
|
canonicalQuery,
|
|
1632
|
-
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) =>
|
|
1732
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => toJson20(innerValue)) : void 0
|
|
1633
1733
|
};
|
|
1634
1734
|
}
|
|
1635
1735
|
|
|
1636
1736
|
// packages/client/query/src/lib/apis/query-assistance-api.ts
|
|
1637
1737
|
var QueryAssistanceClient = class {
|
|
1638
1738
|
httpClient;
|
|
1739
|
+
/**
|
|
1740
|
+
* @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a QueryAssistanceClient. Custom http client should implement {HttpClient} interface.
|
|
1741
|
+
* @example
|
|
1742
|
+
* const queryAssistanceClientNodeJs = new QueryAssistanceClient(yourCustomImplementation);
|
|
1743
|
+
*/
|
|
1639
1744
|
constructor(httpClientImplementation) {
|
|
1640
1745
|
this.httpClient = httpClientImplementation;
|
|
1641
1746
|
registerGlobalErrorSerializer(apiClientErrorSerializer);
|
|
1642
1747
|
}
|
|
1748
|
+
/**
|
|
1749
|
+
* Verifies a query without executing it.
|
|
1750
|
+
*
|
|
1751
|
+
* 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).
|
|
1752
|
+
*
|
|
1753
|
+
* ## Overview
|
|
1754
|
+
*
|
|
1755
|
+
* Verifies the supplied query string and other query parameters for lack of any errors, but without actually
|
|
1756
|
+
* submitting the query for execution.
|
|
1757
|
+
*
|
|
1758
|
+
* @returns Supplied query and parameters were verified.
|
|
1759
|
+
*
|
|
1760
|
+
* @example <caption>Code example</caption>
|
|
1761
|
+
* import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
|
|
1762
|
+
*
|
|
1763
|
+
* const data = await queryAssistanceClient.queryVerify({
|
|
1764
|
+
* body: {
|
|
1765
|
+
* query:
|
|
1766
|
+
* 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
|
|
1767
|
+
* },
|
|
1768
|
+
* });
|
|
1769
|
+
*/
|
|
1643
1770
|
async queryVerify(config) {
|
|
1644
1771
|
if (!config) {
|
|
1645
1772
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
1646
1773
|
}
|
|
1647
|
-
const encodedBody =
|
|
1774
|
+
const encodedBody = toJson19(config.body);
|
|
1648
1775
|
try {
|
|
1649
1776
|
const response = await this.httpClient.send({
|
|
1650
1777
|
url: `/platform/storage/query/v1/query:verify`,
|
|
@@ -1662,7 +1789,7 @@ var QueryAssistanceClient = class {
|
|
|
1662
1789
|
});
|
|
1663
1790
|
const responseValue = await response.body("json");
|
|
1664
1791
|
try {
|
|
1665
|
-
return
|
|
1792
|
+
return fromJson21(responseValue);
|
|
1666
1793
|
} catch (err) {
|
|
1667
1794
|
throw new InvalidResponseError(
|
|
1668
1795
|
`QueryAssistanceClient.query:verify:200`,
|
|
@@ -1684,7 +1811,7 @@ var QueryAssistanceClient = class {
|
|
|
1684
1811
|
case 400: {
|
|
1685
1812
|
const responseValue = await response.body("json");
|
|
1686
1813
|
try {
|
|
1687
|
-
const errorBody =
|
|
1814
|
+
const errorBody = fromJson17(responseValue);
|
|
1688
1815
|
throw new ErrorEnvelopeError(
|
|
1689
1816
|
`400`,
|
|
1690
1817
|
response,
|
|
@@ -1708,7 +1835,7 @@ var QueryAssistanceClient = class {
|
|
|
1708
1835
|
case 500: {
|
|
1709
1836
|
const responseValue = await response.body("json");
|
|
1710
1837
|
try {
|
|
1711
|
-
const errorBody =
|
|
1838
|
+
const errorBody = fromJson17(responseValue);
|
|
1712
1839
|
throw new ErrorEnvelopeError(
|
|
1713
1840
|
`500`,
|
|
1714
1841
|
response,
|
|
@@ -1742,11 +1869,218 @@ var QueryAssistanceClient = class {
|
|
|
1742
1869
|
}
|
|
1743
1870
|
}
|
|
1744
1871
|
}
|
|
1872
|
+
/**
|
|
1873
|
+
* Get a structured tree of the canonical form of the query.
|
|
1874
|
+
*
|
|
1875
|
+
* 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).
|
|
1876
|
+
*
|
|
1877
|
+
* ## Overview
|
|
1878
|
+
*
|
|
1879
|
+
* Returns the parsed query as a tree, containing the structure of the canonical query. Tree-nodes can contain references to
|
|
1880
|
+
* the token position where they originate from. This may help to provide hover effects, show canonical forms, mark
|
|
1881
|
+
* optional items, and more.
|
|
1882
|
+
*
|
|
1883
|
+
* ## Details
|
|
1884
|
+
*
|
|
1885
|
+
* The query tree consists of nodes that contain different additional information (everything optional):
|
|
1886
|
+
*
|
|
1887
|
+
* ### General Fields
|
|
1888
|
+
*
|
|
1889
|
+
* Field | Mandatory | Description
|
|
1890
|
+
* ----------------------- | --- | ----------------------------------------------------------------------------------------
|
|
1891
|
+
* tokenPosition | no | optional. If present, it represents the position within the query string where the node refers to.
|
|
1892
|
+
* isOptional | no | whether this node could be left out and the result would still be the same query (semantically).
|
|
1893
|
+
*
|
|
1894
|
+
* #### tokenPosition
|
|
1895
|
+
*
|
|
1896
|
+
* contains `start` (inclusive) and `end` (inclusive), both contain `index` (0 based; fur substrings), `line`
|
|
1897
|
+
* and `column` (both 1-based; for readability).
|
|
1898
|
+
*
|
|
1899
|
+
* * If `tokenPosition` is present, it always contains start and end with all fields
|
|
1900
|
+
* * If `tokenPosition` is not present, there might still be nested nodes that do contain a position
|
|
1901
|
+
* * If `start == end`, the position refers to a single character
|
|
1902
|
+
* * If `start > end`, we know for sure that something was inserted.
|
|
1903
|
+
*
|
|
1904
|
+
* We can always check whether the canonical representation of a node matches the text in the tokenPosition to see whether
|
|
1905
|
+
* something was inserted, removed, or changed.
|
|
1906
|
+
*
|
|
1907
|
+
* #### isOptional
|
|
1908
|
+
*
|
|
1909
|
+
* only present if it is true.
|
|
1910
|
+
*
|
|
1911
|
+
* Optional nodes can e.g. be optional braces that make a query more readable, but are not necessary. This could be used to
|
|
1912
|
+
* enter *ghost braces* and *implicit functions* in the user's input field; maybe with different formatting
|
|
1913
|
+
* (using the tokenPosition of sibling nodes we can also check whether the user wrote these or not).
|
|
1914
|
+
*
|
|
1915
|
+
* ### Advanced Token Types
|
|
1916
|
+
*
|
|
1917
|
+
* each node is of one of following types and may contain more fields:
|
|
1918
|
+
*
|
|
1919
|
+
* * Terminal Node
|
|
1920
|
+
* * ContainerNode
|
|
1921
|
+
* * Alternative Node
|
|
1922
|
+
*
|
|
1923
|
+
* #### Terminal Node
|
|
1924
|
+
*
|
|
1925
|
+
* can be identified by checking whether `canonicalString` is present
|
|
1926
|
+
*
|
|
1927
|
+
* Field | Mandatory | Description
|
|
1928
|
+
* ------------------------ | --- | ---------------------------------------------------------------------------------------
|
|
1929
|
+
* type | yes | the type of the terminal node - do not confuse with the type of container nodes
|
|
1930
|
+
* canonicalString | yes | the canonical string representation. Concatenating the canonicalString of all nested terminal nodes provides the canonical form of the query.
|
|
1931
|
+
* 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)
|
|
1932
|
+
*
|
|
1933
|
+
* ##### Current types of terminal nodes (list might grow):
|
|
1934
|
+
*
|
|
1935
|
+
* * SPACE
|
|
1936
|
+
* * LINEBREAK
|
|
1937
|
+
* * INDENT
|
|
1938
|
+
* * PIPE
|
|
1939
|
+
* * DOT
|
|
1940
|
+
* * COLON
|
|
1941
|
+
* * COMMA
|
|
1942
|
+
* * BRACE_OPEN
|
|
1943
|
+
* * BRACE_CLOSE
|
|
1944
|
+
* * BRACKET_OPEN
|
|
1945
|
+
* * BRACKET_CLOSE
|
|
1946
|
+
* * PARENTHESIS_OPEN
|
|
1947
|
+
* * PARENTHESIS_CLOSE
|
|
1948
|
+
* * QUOTE
|
|
1949
|
+
* * SLASH
|
|
1950
|
+
* * BOOLEAN_TRUE
|
|
1951
|
+
* * BOOLEAN_FALSE
|
|
1952
|
+
* * NULL
|
|
1953
|
+
* * COMMAND_NAME
|
|
1954
|
+
* * PARAMETER_KEY
|
|
1955
|
+
* * PARAMETER_VALUE_SCOPE
|
|
1956
|
+
* * FUNCTION_NAME
|
|
1957
|
+
* * OPERATOR
|
|
1958
|
+
* * TRAVERSAL_OPERATOR
|
|
1959
|
+
* * TRAVERSAL_RELATION_NAME
|
|
1960
|
+
* * TRAVERSAL_HOP_COUNT
|
|
1961
|
+
* * SIMPLE_IDENTIFIER
|
|
1962
|
+
* * NUMBER
|
|
1963
|
+
* * STRING
|
|
1964
|
+
* * TIME_UNIT
|
|
1965
|
+
* * TIMESTAMP_VALUE
|
|
1966
|
+
* * METRIC_KEY
|
|
1967
|
+
* * VARIABLE
|
|
1968
|
+
*
|
|
1969
|
+
* #### ContainerNode
|
|
1970
|
+
*
|
|
1971
|
+
* can be identified by checking whether `children` is present
|
|
1972
|
+
*
|
|
1973
|
+
* Field | Mandatory | Description
|
|
1974
|
+
* ----------------------- | --- | ----------------------------------------------------------------------------------------
|
|
1975
|
+
* type | yes | the type of the container node - do not confuse with the type of terminal nodes
|
|
1976
|
+
* children | yes | the children for the node. might be of any type
|
|
1977
|
+
*
|
|
1978
|
+
* ##### Current types of container nodes (list might grow):
|
|
1979
|
+
*
|
|
1980
|
+
* * QUERY
|
|
1981
|
+
* * EXECUTION_BLOCK
|
|
1982
|
+
* * COMMAND
|
|
1983
|
+
* * COMMAND_SEPARATOR
|
|
1984
|
+
* * PARAMETER_WITH_KEY
|
|
1985
|
+
* * GROUP
|
|
1986
|
+
* * PARAMETERS - check examples further down
|
|
1987
|
+
* * PARAMETER_NAMING
|
|
1988
|
+
* * PARAMETER_SEPARATOR
|
|
1989
|
+
* * FUNCTION
|
|
1990
|
+
* * FUNCTION_PART - check examples further down
|
|
1991
|
+
* * EXPRESSION
|
|
1992
|
+
* * IDENTIFIER
|
|
1993
|
+
* * SOURCE_ID
|
|
1994
|
+
* * DURATION
|
|
1995
|
+
* * TIMESTAMP
|
|
1996
|
+
* * TIMEFRAME
|
|
1997
|
+
* * TRAVERSAL_PATH
|
|
1998
|
+
* * TRAVERSAL_STEP
|
|
1999
|
+
*
|
|
2000
|
+
* ##### Special node type: PARAMETERS
|
|
2001
|
+
*
|
|
2002
|
+
* can contain children representing the parameters. Every second child is of type PARAMETER_SEPARATOR.
|
|
2003
|
+
*
|
|
2004
|
+
* You may reorder the children based on their tokenPosition to get the user order. However, in this case,
|
|
2005
|
+
* you need to consider `isMandatoryOnUserOrder` to determine whether the grouping braces are mandatory or not.
|
|
2006
|
+
*
|
|
2007
|
+
* ###### Example
|
|
2008
|
+
*
|
|
2009
|
+
* For the query `SORT a, {direction:"descending", b}`, the canonical form is:
|
|
2010
|
+
*
|
|
2011
|
+
* `SORT a, {b, direction:"descending"}`
|
|
2012
|
+
*
|
|
2013
|
+
* This is the order, in which the parameters are returned in the query tree.
|
|
2014
|
+
* Parameters are {a} and {{b} and {direction:"descending"}}. In this case, the braces are optional.
|
|
2015
|
+
*
|
|
2016
|
+
* `SORT a, {b, direction:"descending"}` is equivalent to `SORT a, b, direction:"descending"`
|
|
2017
|
+
*
|
|
2018
|
+
* However, if you reorder the children by tokenPosition, the braces are not optional, because
|
|
2019
|
+
*
|
|
2020
|
+
* `SORT a, direction:"descending", b` is interpreted as `SORT {a, direction:"descending"}, b`
|
|
2021
|
+
*
|
|
2022
|
+
* So, if the children in PARAMETERS are re-ordered by tokenPosition, braces (or in general: TerminalNodes)
|
|
2023
|
+
* are only optional if `isOptional && !isMandatoryOnUserOrder`.
|
|
2024
|
+
*
|
|
2025
|
+
* ##### Special node type: FUNCTION_PART
|
|
2026
|
+
*
|
|
2027
|
+
* A container node of type `FUNCTION` may contain nodes of type `FUNCTION_PART`.
|
|
2028
|
+
*
|
|
2029
|
+
* If those `FUNCTION_PART`s are marked as optional, this means you have to either include *all* or *none* of these
|
|
2030
|
+
* optional function parts.
|
|
2031
|
+
*
|
|
2032
|
+
* *Example*:
|
|
2033
|
+
*
|
|
2034
|
+
* `filter anyMatch(a.b == 1, input:a)`
|
|
2035
|
+
*
|
|
2036
|
+
* The optional function parts are `anyMatch(` and `, input:a)`. If you leave out both, the command will still work:
|
|
2037
|
+
* `filter a.b == 1` and return the same result. Using one of these optional function parts and removing the other will lead
|
|
2038
|
+
* to an invalid query.
|
|
2039
|
+
*
|
|
2040
|
+
* #### Alternative Node
|
|
2041
|
+
*
|
|
2042
|
+
* can be identified by checking whether `alternatives` is present
|
|
2043
|
+
*
|
|
2044
|
+
* Field | Mandatory | Description
|
|
2045
|
+
* ----------------------- | --- | ----------------------------------------------------------------------------------------
|
|
2046
|
+
* alternatives | yes | Type: Map<AlternativeType, DQLNode>
|
|
2047
|
+
*
|
|
2048
|
+
* When displaying the query, pick one option. You may use the other options for hovering, replacing, and more.
|
|
2049
|
+
*
|
|
2050
|
+
* ##### Current values of AlternativeType (list might grow):
|
|
2051
|
+
*
|
|
2052
|
+
* * CANONICAL: This node is the one we will use for our canonical form
|
|
2053
|
+
* * USER: An alternative that is also valid, but not canonical; and this version was picked by the user.
|
|
2054
|
+
* * INFO: only if the canonical version is not present
|
|
2055
|
+
*
|
|
2056
|
+
* *Examples*:
|
|
2057
|
+
*
|
|
2058
|
+
* * `CANONICAL` is not present, `USER` is present: user's nodes are optional, but not canonical (usually optional nodes
|
|
2059
|
+
* are still canonical)
|
|
2060
|
+
* * `CANONICAL` is present, `USER` is not present: same as if the canonical node was optional. If this happens, it is
|
|
2061
|
+
* likely that there is also an `INFO` node
|
|
2062
|
+
* * `CANONICAL` is present, `USER` is present: there are different alternatives
|
|
2063
|
+
* * `INFO` is present: usually if `CANONICAL` is not present (e.g. the parameter key for `FILTER a == 1`), there is an info node
|
|
2064
|
+
* for `FILTER condition:a == 1`. This `condition:` was neither written by the user nor is it canonical; but it might be
|
|
2065
|
+
* used to help the user understand what this parameter means.
|
|
2066
|
+
*
|
|
2067
|
+
* @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.
|
|
2068
|
+
*
|
|
2069
|
+
* @example <caption>Code example</caption>
|
|
2070
|
+
* import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
|
|
2071
|
+
*
|
|
2072
|
+
* const data = await queryAssistanceClient.queryParse({
|
|
2073
|
+
* body: {
|
|
2074
|
+
* query:
|
|
2075
|
+
* 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
|
|
2076
|
+
* },
|
|
2077
|
+
* });
|
|
2078
|
+
*/
|
|
1745
2079
|
async queryParse(config) {
|
|
1746
2080
|
if (!config) {
|
|
1747
2081
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
1748
2082
|
}
|
|
1749
|
-
const encodedBody =
|
|
2083
|
+
const encodedBody = toJson18(config.body);
|
|
1750
2084
|
try {
|
|
1751
2085
|
const response = await this.httpClient.send({
|
|
1752
2086
|
url: `/platform/storage/query/v1/query:parse`,
|
|
@@ -1786,7 +2120,7 @@ var QueryAssistanceClient = class {
|
|
|
1786
2120
|
case 400: {
|
|
1787
2121
|
const responseValue = await response.body("json");
|
|
1788
2122
|
try {
|
|
1789
|
-
const errorBody =
|
|
2123
|
+
const errorBody = fromJson17(responseValue);
|
|
1790
2124
|
throw new ErrorEnvelopeError(
|
|
1791
2125
|
`400`,
|
|
1792
2126
|
response,
|
|
@@ -1813,7 +2147,7 @@ var QueryAssistanceClient = class {
|
|
|
1813
2147
|
case 500: {
|
|
1814
2148
|
const responseValue = await response.body("json");
|
|
1815
2149
|
try {
|
|
1816
|
-
const errorBody =
|
|
2150
|
+
const errorBody = fromJson17(responseValue);
|
|
1817
2151
|
throw new ErrorEnvelopeError(
|
|
1818
2152
|
`500`,
|
|
1819
2153
|
response,
|
|
@@ -1847,6 +2181,57 @@ var QueryAssistanceClient = class {
|
|
|
1847
2181
|
}
|
|
1848
2182
|
}
|
|
1849
2183
|
}
|
|
2184
|
+
/**
|
|
2185
|
+
* Get a structured list of suggestions for the query at the given position.
|
|
2186
|
+
*
|
|
2187
|
+
* 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).
|
|
2188
|
+
*
|
|
2189
|
+
* ## Overview
|
|
2190
|
+
*
|
|
2191
|
+
* We provide a list of suggestions that may be used after the cursor position. The following queries will all provide the
|
|
2192
|
+
* same results:
|
|
2193
|
+
*
|
|
2194
|
+
* * `query: "f"`
|
|
2195
|
+
* * `query: "f", cursorPosition:1`
|
|
2196
|
+
* * `query: "fetch ", cursorPosition:1`
|
|
2197
|
+
*
|
|
2198
|
+
* Available fields:
|
|
2199
|
+
*
|
|
2200
|
+
* | Field | Description |
|
|
2201
|
+
* |-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
2202
|
+
* | suggestions | a list of suggestions. Each item is a separate possible suggestion, despite they might have the same outputs. |
|
|
2203
|
+
* | 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. |
|
|
2204
|
+
*
|
|
2205
|
+
* Fields in the `suggestions`
|
|
2206
|
+
*
|
|
2207
|
+
* | Field | Description |
|
|
2208
|
+
* |------------------------|------------------------------------------------------------------------------------------------------------|
|
|
2209
|
+
* | suggestion | a string representing the whole suggestion. This information could also be derived from the parts. |
|
|
2210
|
+
* | alreadyTypedCharacters | how many characters of this suggestion have already been typed (and will be overridden by the suggestion). |
|
|
2211
|
+
* | parts | a list of semantically enriched information on what are the parts of a suggestion. |
|
|
2212
|
+
*
|
|
2213
|
+
* Fields in `parts`
|
|
2214
|
+
*
|
|
2215
|
+
* | Field | Description |
|
|
2216
|
+
* |------------|-----------------------------------------------------------|
|
|
2217
|
+
* | suggestion | a string representing the current part of the suggestion. |
|
|
2218
|
+
* | type | current types: SPACE, PIPE, COMMAND (may be extended) |
|
|
2219
|
+
*
|
|
2220
|
+
* The `type` helps to treat specific parts of the suggestion different to others; either by a different visualization,
|
|
2221
|
+
* a link to docs, etc.
|
|
2222
|
+
*
|
|
2223
|
+
* @returns A list of structured autocomplete suggestions.
|
|
2224
|
+
*
|
|
2225
|
+
* @example <caption>Code example</caption>
|
|
2226
|
+
* import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
|
|
2227
|
+
*
|
|
2228
|
+
* const data = await queryAssistanceClient.queryAutocomplete({
|
|
2229
|
+
* body: {
|
|
2230
|
+
* query:
|
|
2231
|
+
* 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
|
|
2232
|
+
* },
|
|
2233
|
+
* });
|
|
2234
|
+
*/
|
|
1850
2235
|
async queryAutocomplete(config) {
|
|
1851
2236
|
if (!config) {
|
|
1852
2237
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
@@ -1891,7 +2276,7 @@ var QueryAssistanceClient = class {
|
|
|
1891
2276
|
case 400: {
|
|
1892
2277
|
const responseValue = await response.body("json");
|
|
1893
2278
|
try {
|
|
1894
|
-
const errorBody =
|
|
2279
|
+
const errorBody = fromJson17(responseValue);
|
|
1895
2280
|
throw new ErrorEnvelopeError(
|
|
1896
2281
|
`400`,
|
|
1897
2282
|
response,
|
|
@@ -1918,7 +2303,7 @@ var QueryAssistanceClient = class {
|
|
|
1918
2303
|
case 500: {
|
|
1919
2304
|
const responseValue = await response.body("json");
|
|
1920
2305
|
try {
|
|
1921
|
-
const errorBody =
|
|
2306
|
+
const errorBody = fromJson17(responseValue);
|
|
1922
2307
|
throw new ErrorEnvelopeError(
|
|
1923
2308
|
`500`,
|
|
1924
2309
|
response,
|
|
@@ -1961,10 +2346,10 @@ var import_http_client2 = require("@dynatrace-sdk/http-client");
|
|
|
1961
2346
|
// packages/client/query/src/lib/models/execute-request.transformation.ts
|
|
1962
2347
|
var execute_request_transformation_exports = {};
|
|
1963
2348
|
__export(execute_request_transformation_exports, {
|
|
1964
|
-
fromJson: () =>
|
|
2349
|
+
fromJson: () => fromJson22,
|
|
1965
2350
|
isExecuteRequest: () => isExecuteRequest,
|
|
1966
|
-
isJson: () =>
|
|
1967
|
-
toJson: () =>
|
|
2351
|
+
isJson: () => isJson22,
|
|
2352
|
+
toJson: () => toJson22
|
|
1968
2353
|
});
|
|
1969
2354
|
function isExecuteRequest(value) {
|
|
1970
2355
|
if (value === null) {
|
|
@@ -2013,7 +2398,7 @@ function isExecuteRequest(value) {
|
|
|
2013
2398
|
const allPropertiesMatchFormat = true;
|
|
2014
2399
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2015
2400
|
}
|
|
2016
|
-
function
|
|
2401
|
+
function isJson22(value) {
|
|
2017
2402
|
if (value === null) {
|
|
2018
2403
|
return false;
|
|
2019
2404
|
}
|
|
@@ -2060,7 +2445,7 @@ function isJson21(value) {
|
|
|
2060
2445
|
const allPropertiesMatchFormat = true;
|
|
2061
2446
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2062
2447
|
}
|
|
2063
|
-
function
|
|
2448
|
+
function fromJson22($model) {
|
|
2064
2449
|
const {
|
|
2065
2450
|
query,
|
|
2066
2451
|
defaultTimeframeStart,
|
|
@@ -2092,7 +2477,7 @@ function fromJson21($model) {
|
|
|
2092
2477
|
queryOptions: queryOptions !== void 0 && queryOptions !== null ? fromJson(queryOptions) : void 0
|
|
2093
2478
|
};
|
|
2094
2479
|
}
|
|
2095
|
-
function
|
|
2480
|
+
function toJson22($model) {
|
|
2096
2481
|
const {
|
|
2097
2482
|
query,
|
|
2098
2483
|
defaultTimeframeStart,
|
|
@@ -2128,46 +2513,46 @@ function toJson21($model) {
|
|
|
2128
2513
|
// packages/client/query/src/lib/models/query-poll-response.transformation.ts
|
|
2129
2514
|
var query_poll_response_transformation_exports = {};
|
|
2130
2515
|
__export(query_poll_response_transformation_exports, {
|
|
2131
|
-
fromJson: () =>
|
|
2132
|
-
isJson: () =>
|
|
2516
|
+
fromJson: () => fromJson36,
|
|
2517
|
+
isJson: () => isJson36,
|
|
2133
2518
|
isQueryPollResponse: () => isQueryPollResponse,
|
|
2134
|
-
toJson: () =>
|
|
2519
|
+
toJson: () => toJson36
|
|
2135
2520
|
});
|
|
2136
2521
|
|
|
2137
2522
|
// packages/client/query/src/lib/models/query-result.transformation.ts
|
|
2138
2523
|
var query_result_transformation_exports = {};
|
|
2139
2524
|
__export(query_result_transformation_exports, {
|
|
2140
|
-
fromJson: () =>
|
|
2141
|
-
isJson: () =>
|
|
2525
|
+
fromJson: () => fromJson34,
|
|
2526
|
+
isJson: () => isJson34,
|
|
2142
2527
|
isQueryResult: () => isQueryResult,
|
|
2143
|
-
toJson: () =>
|
|
2528
|
+
toJson: () => toJson34
|
|
2144
2529
|
});
|
|
2145
2530
|
|
|
2146
2531
|
// packages/client/query/src/lib/models/metadata.transformation.ts
|
|
2147
2532
|
var metadata_transformation_exports = {};
|
|
2148
2533
|
__export(metadata_transformation_exports, {
|
|
2149
|
-
fromJson: () =>
|
|
2150
|
-
isJson: () =>
|
|
2534
|
+
fromJson: () => fromJson26,
|
|
2535
|
+
isJson: () => isJson26,
|
|
2151
2536
|
isMetadata: () => isMetadata,
|
|
2152
|
-
toJson: () =>
|
|
2537
|
+
toJson: () => toJson26
|
|
2153
2538
|
});
|
|
2154
2539
|
|
|
2155
2540
|
// packages/client/query/src/lib/models/grail-metadata.transformation.ts
|
|
2156
2541
|
var grail_metadata_transformation_exports = {};
|
|
2157
2542
|
__export(grail_metadata_transformation_exports, {
|
|
2158
|
-
fromJson: () =>
|
|
2543
|
+
fromJson: () => fromJson24,
|
|
2159
2544
|
isGrailMetadata: () => isGrailMetadata,
|
|
2160
|
-
isJson: () =>
|
|
2161
|
-
toJson: () =>
|
|
2545
|
+
isJson: () => isJson24,
|
|
2546
|
+
toJson: () => toJson24
|
|
2162
2547
|
});
|
|
2163
2548
|
|
|
2164
2549
|
// packages/client/query/src/lib/models/timeframe.transformation.ts
|
|
2165
2550
|
var timeframe_transformation_exports = {};
|
|
2166
2551
|
__export(timeframe_transformation_exports, {
|
|
2167
|
-
fromJson: () =>
|
|
2168
|
-
isJson: () =>
|
|
2552
|
+
fromJson: () => fromJson23,
|
|
2553
|
+
isJson: () => isJson23,
|
|
2169
2554
|
isTimeframe: () => isTimeframe,
|
|
2170
|
-
toJson: () =>
|
|
2555
|
+
toJson: () => toJson23
|
|
2171
2556
|
});
|
|
2172
2557
|
function isTimeframe(value) {
|
|
2173
2558
|
if (value === null) {
|
|
@@ -2189,7 +2574,7 @@ function isTimeframe(value) {
|
|
|
2189
2574
|
const allPropertiesMatchFormat = value.start instanceof Date && value.end instanceof Date;
|
|
2190
2575
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2191
2576
|
}
|
|
2192
|
-
function
|
|
2577
|
+
function isJson23(value) {
|
|
2193
2578
|
if (value === null) {
|
|
2194
2579
|
return false;
|
|
2195
2580
|
}
|
|
@@ -2209,14 +2594,14 @@ function isJson22(value) {
|
|
|
2209
2594
|
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);
|
|
2210
2595
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2211
2596
|
}
|
|
2212
|
-
function
|
|
2597
|
+
function fromJson23($model) {
|
|
2213
2598
|
const { start, end } = $model;
|
|
2214
2599
|
return {
|
|
2215
2600
|
start: start !== void 0 && start !== null ? new Date(start) : void 0,
|
|
2216
2601
|
end: end !== void 0 && end !== null ? new Date(end) : void 0
|
|
2217
2602
|
};
|
|
2218
2603
|
}
|
|
2219
|
-
function
|
|
2604
|
+
function toJson23($model) {
|
|
2220
2605
|
const { start, end } = $model;
|
|
2221
2606
|
return {
|
|
2222
2607
|
start: start !== void 0 && start !== null ? start.toISOString() : void 0,
|
|
@@ -2273,7 +2658,7 @@ function isGrailMetadata(value) {
|
|
|
2273
2658
|
const allPropertiesMatchFormat = true;
|
|
2274
2659
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2275
2660
|
}
|
|
2276
|
-
function
|
|
2661
|
+
function isJson24(value) {
|
|
2277
2662
|
if (value === null) {
|
|
2278
2663
|
return false;
|
|
2279
2664
|
}
|
|
@@ -2321,7 +2706,7 @@ function isJson23(value) {
|
|
|
2321
2706
|
const allPropertiesMatchFormat = true;
|
|
2322
2707
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2323
2708
|
}
|
|
2324
|
-
function
|
|
2709
|
+
function fromJson24($model) {
|
|
2325
2710
|
const {
|
|
2326
2711
|
canonicalQuery,
|
|
2327
2712
|
timezone,
|
|
@@ -2345,15 +2730,15 @@ function fromJson23($model) {
|
|
|
2345
2730
|
dqlVersion,
|
|
2346
2731
|
scannedBytes,
|
|
2347
2732
|
scannedDataPoints,
|
|
2348
|
-
analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ?
|
|
2733
|
+
analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? fromJson23(analysisTimeframe) : void 0,
|
|
2349
2734
|
locale,
|
|
2350
2735
|
executionTimeMilliseconds,
|
|
2351
|
-
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) =>
|
|
2736
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => fromJson20(innerValue)) : void 0,
|
|
2352
2737
|
queryId,
|
|
2353
2738
|
sampled
|
|
2354
2739
|
};
|
|
2355
2740
|
}
|
|
2356
|
-
function
|
|
2741
|
+
function toJson24($model) {
|
|
2357
2742
|
const {
|
|
2358
2743
|
canonicalQuery,
|
|
2359
2744
|
timezone,
|
|
@@ -2377,10 +2762,10 @@ function toJson23($model) {
|
|
|
2377
2762
|
dqlVersion,
|
|
2378
2763
|
scannedBytes,
|
|
2379
2764
|
scannedDataPoints,
|
|
2380
|
-
analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ?
|
|
2765
|
+
analysisTimeframe: analysisTimeframe !== void 0 && analysisTimeframe !== null ? toJson23(analysisTimeframe) : void 0,
|
|
2381
2766
|
locale,
|
|
2382
2767
|
executionTimeMilliseconds,
|
|
2383
|
-
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) =>
|
|
2768
|
+
notifications: notifications !== void 0 && notifications !== null ? notifications?.map((innerValue) => toJson20(innerValue)) : void 0,
|
|
2384
2769
|
queryId,
|
|
2385
2770
|
sampled
|
|
2386
2771
|
};
|
|
@@ -2389,10 +2774,10 @@ function toJson23($model) {
|
|
|
2389
2774
|
// packages/client/query/src/lib/models/metric-metadata.transformation.ts
|
|
2390
2775
|
var metric_metadata_transformation_exports = {};
|
|
2391
2776
|
__export(metric_metadata_transformation_exports, {
|
|
2392
|
-
fromJson: () =>
|
|
2393
|
-
isJson: () =>
|
|
2777
|
+
fromJson: () => fromJson25,
|
|
2778
|
+
isJson: () => isJson25,
|
|
2394
2779
|
isMetricMetadata: () => isMetricMetadata,
|
|
2395
|
-
toJson: () =>
|
|
2780
|
+
toJson: () => toJson25
|
|
2396
2781
|
});
|
|
2397
2782
|
function isMetricMetadata(value) {
|
|
2398
2783
|
if (value === null) {
|
|
@@ -2432,7 +2817,7 @@ function isMetricMetadata(value) {
|
|
|
2432
2817
|
const allPropertiesMatchFormat = true;
|
|
2433
2818
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2434
2819
|
}
|
|
2435
|
-
function
|
|
2820
|
+
function isJson25(value) {
|
|
2436
2821
|
if (value === null) {
|
|
2437
2822
|
return false;
|
|
2438
2823
|
}
|
|
@@ -2470,7 +2855,7 @@ function isJson24(value) {
|
|
|
2470
2855
|
const allPropertiesMatchFormat = true;
|
|
2471
2856
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2472
2857
|
}
|
|
2473
|
-
function
|
|
2858
|
+
function fromJson25($model) {
|
|
2474
2859
|
const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate, shifted } = $model;
|
|
2475
2860
|
return {
|
|
2476
2861
|
"metric.key": metricKey,
|
|
@@ -2483,7 +2868,7 @@ function fromJson24($model) {
|
|
|
2483
2868
|
shifted
|
|
2484
2869
|
};
|
|
2485
2870
|
}
|
|
2486
|
-
function
|
|
2871
|
+
function toJson25($model) {
|
|
2487
2872
|
const { "metric.key": metricKey, displayName, description, unit, fieldName, rollup, rate, shifted } = $model;
|
|
2488
2873
|
return {
|
|
2489
2874
|
"metric.key": metricKey,
|
|
@@ -2518,7 +2903,7 @@ function isMetadata(value) {
|
|
|
2518
2903
|
const allPropertiesMatchFormat = true;
|
|
2519
2904
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2520
2905
|
}
|
|
2521
|
-
function
|
|
2906
|
+
function isJson26(value) {
|
|
2522
2907
|
if (value === null) {
|
|
2523
2908
|
return false;
|
|
2524
2909
|
}
|
|
@@ -2538,66 +2923,66 @@ function isJson25(value) {
|
|
|
2538
2923
|
const allPropertiesMatchFormat = true;
|
|
2539
2924
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2540
2925
|
}
|
|
2541
|
-
function
|
|
2926
|
+
function fromJson26($model) {
|
|
2542
2927
|
const { grail, metrics } = $model;
|
|
2543
2928
|
return {
|
|
2544
|
-
grail: grail !== void 0 && grail !== null ?
|
|
2545
|
-
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) =>
|
|
2929
|
+
grail: grail !== void 0 && grail !== null ? fromJson24(grail) : void 0,
|
|
2930
|
+
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => fromJson25(innerValue)) : void 0
|
|
2546
2931
|
};
|
|
2547
2932
|
}
|
|
2548
|
-
function
|
|
2933
|
+
function toJson26($model) {
|
|
2549
2934
|
const { grail, metrics } = $model;
|
|
2550
2935
|
return {
|
|
2551
|
-
grail: grail !== void 0 && grail !== null ?
|
|
2552
|
-
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) =>
|
|
2936
|
+
grail: grail !== void 0 && grail !== null ? toJson24(grail) : void 0,
|
|
2937
|
+
metrics: metrics !== void 0 && metrics !== null ? metrics?.map((innerValue) => toJson25(innerValue)) : void 0
|
|
2553
2938
|
};
|
|
2554
2939
|
}
|
|
2555
2940
|
|
|
2556
2941
|
// packages/client/query/src/lib/models/ranged-field-types.transformation.ts
|
|
2557
2942
|
var ranged_field_types_transformation_exports = {};
|
|
2558
2943
|
__export(ranged_field_types_transformation_exports, {
|
|
2559
|
-
fromJson: () =>
|
|
2560
|
-
isJson: () =>
|
|
2944
|
+
fromJson: () => fromJson28,
|
|
2945
|
+
isJson: () => isJson30,
|
|
2561
2946
|
isRangedFieldTypes: () => isRangedFieldTypes,
|
|
2562
|
-
toJson: () =>
|
|
2947
|
+
toJson: () => toJson28
|
|
2563
2948
|
});
|
|
2564
2949
|
|
|
2565
2950
|
// packages/client/query/src/lib/models/ranged-field-types-mappings.transformation.ts
|
|
2566
2951
|
var ranged_field_types_mappings_transformation_exports = {};
|
|
2567
2952
|
__export(ranged_field_types_mappings_transformation_exports, {
|
|
2568
|
-
fromJson: () =>
|
|
2569
|
-
isJson: () =>
|
|
2953
|
+
fromJson: () => fromJson30,
|
|
2954
|
+
isJson: () => isJson29,
|
|
2570
2955
|
isRangedFieldTypesMappings: () => isRangedFieldTypesMappings,
|
|
2571
|
-
toJson: () =>
|
|
2956
|
+
toJson: () => toJson30
|
|
2572
2957
|
});
|
|
2573
2958
|
|
|
2574
2959
|
// packages/client/query/src/lib/models/field-type.transformation.ts
|
|
2575
2960
|
var field_type_transformation_exports = {};
|
|
2576
2961
|
__export(field_type_transformation_exports, {
|
|
2577
|
-
fromJson: () =>
|
|
2962
|
+
fromJson: () => fromJson29,
|
|
2578
2963
|
isFieldType: () => isFieldType,
|
|
2579
|
-
isJson: () =>
|
|
2580
|
-
toJson: () =>
|
|
2964
|
+
isJson: () => isJson28,
|
|
2965
|
+
toJson: () => toJson29
|
|
2581
2966
|
});
|
|
2582
2967
|
|
|
2583
2968
|
// packages/client/query/src/lib/models/field-type-type.transformation.ts
|
|
2584
2969
|
var field_type_type_transformation_exports = {};
|
|
2585
2970
|
__export(field_type_type_transformation_exports, {
|
|
2586
|
-
fromJson: () =>
|
|
2971
|
+
fromJson: () => fromJson27,
|
|
2587
2972
|
isFieldTypeType: () => isFieldTypeType,
|
|
2588
|
-
isJson: () =>
|
|
2589
|
-
toJson: () =>
|
|
2973
|
+
isJson: () => isJson27,
|
|
2974
|
+
toJson: () => toJson27
|
|
2590
2975
|
});
|
|
2591
2976
|
function isFieldTypeType(value) {
|
|
2592
2977
|
return typeof value === "string";
|
|
2593
2978
|
}
|
|
2594
|
-
function
|
|
2979
|
+
function isJson27(value) {
|
|
2595
2980
|
return typeof value === "string";
|
|
2596
2981
|
}
|
|
2597
|
-
function
|
|
2982
|
+
function fromJson27($model) {
|
|
2598
2983
|
return String($model);
|
|
2599
2984
|
}
|
|
2600
|
-
function
|
|
2985
|
+
function toJson27($model) {
|
|
2601
2986
|
return String($model);
|
|
2602
2987
|
}
|
|
2603
2988
|
|
|
@@ -2622,7 +3007,7 @@ function isFieldType(value) {
|
|
|
2622
3007
|
const allPropertiesMatchFormat = true;
|
|
2623
3008
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2624
3009
|
}
|
|
2625
|
-
function
|
|
3010
|
+
function isJson28(value) {
|
|
2626
3011
|
if (value === null) {
|
|
2627
3012
|
return false;
|
|
2628
3013
|
}
|
|
@@ -2642,18 +3027,18 @@ function isJson27(value) {
|
|
|
2642
3027
|
const allPropertiesMatchFormat = true;
|
|
2643
3028
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2644
3029
|
}
|
|
2645
|
-
function
|
|
3030
|
+
function fromJson29($model) {
|
|
2646
3031
|
const { type, types } = $model;
|
|
2647
3032
|
return {
|
|
2648
|
-
type:
|
|
2649
|
-
types: types !== void 0 && types !== null ? types?.map((innerValue) =>
|
|
3033
|
+
type: fromJson27(type),
|
|
3034
|
+
types: types !== void 0 && types !== null ? types?.map((innerValue) => fromJson28(innerValue)) : void 0
|
|
2650
3035
|
};
|
|
2651
3036
|
}
|
|
2652
|
-
function
|
|
3037
|
+
function toJson29($model) {
|
|
2653
3038
|
const { type, types } = $model;
|
|
2654
3039
|
return {
|
|
2655
|
-
type:
|
|
2656
|
-
types: types !== void 0 && types !== null ? types?.map((innerValue) =>
|
|
3040
|
+
type: toJson27(type),
|
|
3041
|
+
types: types !== void 0 && types !== null ? types?.map((innerValue) => toJson28(innerValue)) : void 0
|
|
2657
3042
|
};
|
|
2658
3043
|
}
|
|
2659
3044
|
|
|
@@ -2678,7 +3063,7 @@ function isRangedFieldTypesMappings(value) {
|
|
|
2678
3063
|
const allPropertiesMatchFormat = true;
|
|
2679
3064
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2680
3065
|
}
|
|
2681
|
-
function
|
|
3066
|
+
function isJson29(value) {
|
|
2682
3067
|
if (value === null) {
|
|
2683
3068
|
return false;
|
|
2684
3069
|
}
|
|
@@ -2698,24 +3083,24 @@ function isJson28(value) {
|
|
|
2698
3083
|
const allPropertiesMatchFormat = true;
|
|
2699
3084
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2700
3085
|
}
|
|
2701
|
-
function
|
|
3086
|
+
function fromJson30($model) {
|
|
2702
3087
|
const additionalProps = $model;
|
|
2703
3088
|
return {
|
|
2704
3089
|
...Object.fromEntries(
|
|
2705
3090
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2706
3091
|
propName,
|
|
2707
|
-
value !== void 0 && value !== null ?
|
|
3092
|
+
value !== void 0 && value !== null ? fromJson29(value) : void 0
|
|
2708
3093
|
])
|
|
2709
3094
|
)
|
|
2710
3095
|
};
|
|
2711
3096
|
}
|
|
2712
|
-
function
|
|
3097
|
+
function toJson30($model) {
|
|
2713
3098
|
const additionalProps = $model;
|
|
2714
3099
|
return {
|
|
2715
3100
|
...Object.fromEntries(
|
|
2716
3101
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
2717
3102
|
propName,
|
|
2718
|
-
value !== void 0 && value !== null ?
|
|
3103
|
+
value !== void 0 && value !== null ? toJson29(value) : void 0
|
|
2719
3104
|
])
|
|
2720
3105
|
)
|
|
2721
3106
|
};
|
|
@@ -2742,7 +3127,7 @@ function isRangedFieldTypes(value) {
|
|
|
2742
3127
|
const allPropertiesMatchFormat = true;
|
|
2743
3128
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2744
3129
|
}
|
|
2745
|
-
function
|
|
3130
|
+
function isJson30(value) {
|
|
2746
3131
|
if (value === null) {
|
|
2747
3132
|
return false;
|
|
2748
3133
|
}
|
|
@@ -2762,17 +3147,17 @@ function isJson29(value) {
|
|
|
2762
3147
|
const allPropertiesMatchFormat = true;
|
|
2763
3148
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2764
3149
|
}
|
|
2765
|
-
function
|
|
3150
|
+
function fromJson28($model) {
|
|
2766
3151
|
const { mappings, indexRange } = $model;
|
|
2767
3152
|
return {
|
|
2768
|
-
mappings:
|
|
3153
|
+
mappings: fromJson30(mappings),
|
|
2769
3154
|
indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
|
|
2770
3155
|
};
|
|
2771
3156
|
}
|
|
2772
|
-
function
|
|
3157
|
+
function toJson28($model) {
|
|
2773
3158
|
const { mappings, indexRange } = $model;
|
|
2774
3159
|
return {
|
|
2775
|
-
mappings:
|
|
3160
|
+
mappings: toJson30(mappings),
|
|
2776
3161
|
indexRange: indexRange !== void 0 && indexRange !== null ? indexRange?.slice(0) : void 0
|
|
2777
3162
|
};
|
|
2778
3163
|
}
|
|
@@ -2780,10 +3165,10 @@ function toJson27($model) {
|
|
|
2780
3165
|
// packages/client/query/src/lib/models/result-record.transformation.ts
|
|
2781
3166
|
var result_record_transformation_exports = {};
|
|
2782
3167
|
__export(result_record_transformation_exports, {
|
|
2783
|
-
fromJson: () =>
|
|
2784
|
-
isJson: () =>
|
|
3168
|
+
fromJson: () => fromJson32,
|
|
3169
|
+
isJson: () => isJson32,
|
|
2785
3170
|
isResultRecord: () => isResultRecord,
|
|
2786
|
-
toJson: () =>
|
|
3171
|
+
toJson: () => toJson32
|
|
2787
3172
|
});
|
|
2788
3173
|
|
|
2789
3174
|
// packages/client/query/src/lib/models/result-record-value.transformation.ts
|
|
@@ -2802,19 +3187,19 @@ __export(result_record_value_transformation_exports, {
|
|
|
2802
3187
|
checkString: () => checkString,
|
|
2803
3188
|
checkTimeframe: () => checkTimeframe,
|
|
2804
3189
|
checkTimeframeAsJson: () => checkTimeframeAsJson,
|
|
2805
|
-
fromJson: () =>
|
|
2806
|
-
isJson: () =>
|
|
3190
|
+
fromJson: () => fromJson33,
|
|
3191
|
+
isJson: () => isJson33,
|
|
2807
3192
|
isResultRecordValue: () => isResultRecordValue,
|
|
2808
|
-
toJson: () =>
|
|
3193
|
+
toJson: () => toJson33
|
|
2809
3194
|
});
|
|
2810
3195
|
|
|
2811
3196
|
// packages/client/query/src/lib/models/geo-point.transformation.ts
|
|
2812
3197
|
var geo_point_transformation_exports = {};
|
|
2813
3198
|
__export(geo_point_transformation_exports, {
|
|
2814
|
-
fromJson: () =>
|
|
3199
|
+
fromJson: () => fromJson31,
|
|
2815
3200
|
isGeoPoint: () => isGeoPoint,
|
|
2816
|
-
isJson: () =>
|
|
2817
|
-
toJson: () =>
|
|
3201
|
+
isJson: () => isJson31,
|
|
3202
|
+
toJson: () => toJson31
|
|
2818
3203
|
});
|
|
2819
3204
|
function isGeoPoint(value) {
|
|
2820
3205
|
if (value === null) {
|
|
@@ -2836,7 +3221,7 @@ function isGeoPoint(value) {
|
|
|
2836
3221
|
const allPropertiesMatchFormat = true;
|
|
2837
3222
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2838
3223
|
}
|
|
2839
|
-
function
|
|
3224
|
+
function isJson31(value) {
|
|
2840
3225
|
if (value === null) {
|
|
2841
3226
|
return false;
|
|
2842
3227
|
}
|
|
@@ -2856,14 +3241,14 @@ function isJson30(value) {
|
|
|
2856
3241
|
const allPropertiesMatchFormat = true;
|
|
2857
3242
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
2858
3243
|
}
|
|
2859
|
-
function
|
|
3244
|
+
function fromJson31($model) {
|
|
2860
3245
|
const { latitude, longitude } = $model;
|
|
2861
3246
|
return {
|
|
2862
3247
|
latitude,
|
|
2863
3248
|
longitude
|
|
2864
3249
|
};
|
|
2865
3250
|
}
|
|
2866
|
-
function
|
|
3251
|
+
function toJson31($model) {
|
|
2867
3252
|
const { latitude, longitude } = $model;
|
|
2868
3253
|
return {
|
|
2869
3254
|
latitude,
|
|
@@ -2901,13 +3286,13 @@ function isResultRecordValue(value) {
|
|
|
2901
3286
|
return checkBoolean(value) || checkNumber(value) || checkString(value) || checkTimeframe(value) || checkGeoPoint(value) || checkResultRecord(value) || checkArrayResultRecordValue(value) || value === null;
|
|
2902
3287
|
}
|
|
2903
3288
|
function checkTimeframeAsJson(value) {
|
|
2904
|
-
return
|
|
3289
|
+
return isJson23(value);
|
|
2905
3290
|
}
|
|
2906
3291
|
function checkGeoPointAsJson(value) {
|
|
2907
|
-
return
|
|
3292
|
+
return isJson31(value);
|
|
2908
3293
|
}
|
|
2909
3294
|
function checkResultRecordAsJson(value) {
|
|
2910
|
-
return
|
|
3295
|
+
return isJson32(value);
|
|
2911
3296
|
}
|
|
2912
3297
|
function checkArrayResultRecordValueTransformationAsJsonNullItemDatatype(value) {
|
|
2913
3298
|
return isResultRecordValue(value);
|
|
@@ -2916,11 +3301,11 @@ function checkArrayResultRecordValueAsJson(value) {
|
|
|
2916
3301
|
const datatypeMatch = (val) => checkArrayResultRecordValueTransformationAsJsonNullItemDatatype(val);
|
|
2917
3302
|
return Array.isArray(value) && value.every(datatypeMatch);
|
|
2918
3303
|
}
|
|
2919
|
-
function
|
|
3304
|
+
function isJson33(value) {
|
|
2920
3305
|
return checkBoolean(value) || checkNumber(value) || checkString(value) || checkTimeframeAsJson(value) || checkGeoPointAsJson(value) || checkResultRecordAsJson(value) || checkArrayResultRecordValueAsJson(value) || value === null;
|
|
2921
3306
|
}
|
|
2922
|
-
function
|
|
2923
|
-
if (!
|
|
3307
|
+
function fromJson33($model) {
|
|
3308
|
+
if (!isJson33($model)) {
|
|
2924
3309
|
throw new TypeError("_ResultRecordValueTransformation.fromJson: value's datatype does not match");
|
|
2925
3310
|
}
|
|
2926
3311
|
if ($model === null) {
|
|
@@ -2936,20 +3321,20 @@ function fromJson32($model) {
|
|
|
2936
3321
|
return String($model);
|
|
2937
3322
|
}
|
|
2938
3323
|
if (checkTimeframeAsJson($model)) {
|
|
2939
|
-
return
|
|
3324
|
+
return fromJson23($model);
|
|
2940
3325
|
}
|
|
2941
3326
|
if (checkGeoPointAsJson($model)) {
|
|
2942
|
-
return
|
|
3327
|
+
return fromJson31($model);
|
|
2943
3328
|
}
|
|
2944
3329
|
if (checkResultRecordAsJson($model)) {
|
|
2945
|
-
return
|
|
3330
|
+
return fromJson32($model);
|
|
2946
3331
|
}
|
|
2947
3332
|
if (checkArrayResultRecordValue($model)) {
|
|
2948
|
-
return $model.map((el) =>
|
|
3333
|
+
return $model.map((el) => fromJson33(el));
|
|
2949
3334
|
}
|
|
2950
3335
|
throw new TypeError("Unable to deserialize value");
|
|
2951
3336
|
}
|
|
2952
|
-
function
|
|
3337
|
+
function toJson33($model) {
|
|
2953
3338
|
if (!isResultRecordValue($model)) {
|
|
2954
3339
|
throw new TypeError("_ResultRecordValueTransformation.toJson: value's datatype does not match");
|
|
2955
3340
|
}
|
|
@@ -2966,16 +3351,16 @@ function toJson32($model) {
|
|
|
2966
3351
|
return String($model);
|
|
2967
3352
|
}
|
|
2968
3353
|
if (checkTimeframe($model)) {
|
|
2969
|
-
return
|
|
3354
|
+
return toJson23($model);
|
|
2970
3355
|
}
|
|
2971
3356
|
if (checkGeoPoint($model)) {
|
|
2972
|
-
return
|
|
3357
|
+
return toJson31($model);
|
|
2973
3358
|
}
|
|
2974
3359
|
if (checkResultRecord($model)) {
|
|
2975
|
-
return
|
|
3360
|
+
return toJson32($model);
|
|
2976
3361
|
}
|
|
2977
3362
|
if (checkArrayResultRecordValue($model)) {
|
|
2978
|
-
return $model.map((el) =>
|
|
3363
|
+
return $model.map((el) => toJson33(el));
|
|
2979
3364
|
}
|
|
2980
3365
|
throw new TypeError("Unable to serialize value");
|
|
2981
3366
|
}
|
|
@@ -3001,7 +3386,7 @@ function isResultRecord(value) {
|
|
|
3001
3386
|
const allPropertiesMatchFormat = true;
|
|
3002
3387
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3003
3388
|
}
|
|
3004
|
-
function
|
|
3389
|
+
function isJson32(value) {
|
|
3005
3390
|
if (value === null) {
|
|
3006
3391
|
return true;
|
|
3007
3392
|
}
|
|
@@ -3021,7 +3406,7 @@ function isJson31(value) {
|
|
|
3021
3406
|
const allPropertiesMatchFormat = true;
|
|
3022
3407
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3023
3408
|
}
|
|
3024
|
-
function
|
|
3409
|
+
function fromJson32($model) {
|
|
3025
3410
|
if ($model === null) {
|
|
3026
3411
|
return null;
|
|
3027
3412
|
}
|
|
@@ -3030,12 +3415,12 @@ function fromJson31($model) {
|
|
|
3030
3415
|
...Object.fromEntries(
|
|
3031
3416
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
3032
3417
|
propName,
|
|
3033
|
-
value !== void 0 ?
|
|
3418
|
+
value !== void 0 ? fromJson33(value) : void 0
|
|
3034
3419
|
])
|
|
3035
3420
|
)
|
|
3036
3421
|
};
|
|
3037
3422
|
}
|
|
3038
|
-
function
|
|
3423
|
+
function toJson32($model) {
|
|
3039
3424
|
if ($model === null) {
|
|
3040
3425
|
return null;
|
|
3041
3426
|
}
|
|
@@ -3044,7 +3429,7 @@ function toJson31($model) {
|
|
|
3044
3429
|
...Object.fromEntries(
|
|
3045
3430
|
Object.entries(additionalProps).map(([propName, value]) => [
|
|
3046
3431
|
propName,
|
|
3047
|
-
value !== void 0 && value !== null ?
|
|
3432
|
+
value !== void 0 && value !== null ? toJson33(value) : void 0
|
|
3048
3433
|
])
|
|
3049
3434
|
)
|
|
3050
3435
|
};
|
|
@@ -3071,7 +3456,7 @@ function isQueryResult(value) {
|
|
|
3071
3456
|
const allPropertiesMatchFormat = true;
|
|
3072
3457
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3073
3458
|
}
|
|
3074
|
-
function
|
|
3459
|
+
function isJson34(value) {
|
|
3075
3460
|
if (value === null) {
|
|
3076
3461
|
return false;
|
|
3077
3462
|
}
|
|
@@ -3091,41 +3476,41 @@ function isJson33(value) {
|
|
|
3091
3476
|
const allPropertiesMatchFormat = true;
|
|
3092
3477
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3093
3478
|
}
|
|
3094
|
-
function
|
|
3479
|
+
function fromJson34($model) {
|
|
3095
3480
|
const { records, metadata, types } = $model;
|
|
3096
3481
|
return {
|
|
3097
|
-
records: records?.map((innerValue) =>
|
|
3098
|
-
metadata:
|
|
3099
|
-
types: types?.map((innerValue) =>
|
|
3482
|
+
records: records?.map((innerValue) => fromJson32(innerValue)),
|
|
3483
|
+
metadata: fromJson26(metadata),
|
|
3484
|
+
types: types?.map((innerValue) => fromJson28(innerValue))
|
|
3100
3485
|
};
|
|
3101
3486
|
}
|
|
3102
|
-
function
|
|
3487
|
+
function toJson34($model) {
|
|
3103
3488
|
const { records, metadata, types } = $model;
|
|
3104
3489
|
return {
|
|
3105
|
-
records: records?.map((innerValue) =>
|
|
3106
|
-
metadata:
|
|
3107
|
-
types: types?.map((innerValue) =>
|
|
3490
|
+
records: records?.map((innerValue) => toJson32(innerValue)),
|
|
3491
|
+
metadata: toJson26(metadata),
|
|
3492
|
+
types: types?.map((innerValue) => toJson28(innerValue))
|
|
3108
3493
|
};
|
|
3109
3494
|
}
|
|
3110
3495
|
|
|
3111
3496
|
// packages/client/query/src/lib/models/query-state.transformation.ts
|
|
3112
3497
|
var query_state_transformation_exports = {};
|
|
3113
3498
|
__export(query_state_transformation_exports, {
|
|
3114
|
-
fromJson: () =>
|
|
3115
|
-
isJson: () =>
|
|
3499
|
+
fromJson: () => fromJson35,
|
|
3500
|
+
isJson: () => isJson35,
|
|
3116
3501
|
isQueryState: () => isQueryState,
|
|
3117
|
-
toJson: () =>
|
|
3502
|
+
toJson: () => toJson35
|
|
3118
3503
|
});
|
|
3119
3504
|
function isQueryState(value) {
|
|
3120
3505
|
return typeof value === "string";
|
|
3121
3506
|
}
|
|
3122
|
-
function
|
|
3507
|
+
function isJson35(value) {
|
|
3123
3508
|
return typeof value === "string";
|
|
3124
3509
|
}
|
|
3125
|
-
function
|
|
3510
|
+
function fromJson35($model) {
|
|
3126
3511
|
return String($model);
|
|
3127
3512
|
}
|
|
3128
|
-
function
|
|
3513
|
+
function toJson35($model) {
|
|
3129
3514
|
return String($model);
|
|
3130
3515
|
}
|
|
3131
3516
|
|
|
@@ -3150,7 +3535,7 @@ function isQueryPollResponse(value) {
|
|
|
3150
3535
|
const allPropertiesMatchFormat = true;
|
|
3151
3536
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3152
3537
|
}
|
|
3153
|
-
function
|
|
3538
|
+
function isJson36(value) {
|
|
3154
3539
|
if (value === null) {
|
|
3155
3540
|
return false;
|
|
3156
3541
|
}
|
|
@@ -3170,32 +3555,32 @@ function isJson35(value) {
|
|
|
3170
3555
|
const allPropertiesMatchFormat = true;
|
|
3171
3556
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3172
3557
|
}
|
|
3173
|
-
function
|
|
3558
|
+
function fromJson36($model) {
|
|
3174
3559
|
const { result, ttlSeconds, progress, state } = $model;
|
|
3175
3560
|
return {
|
|
3176
|
-
result: result !== void 0 && result !== null ?
|
|
3561
|
+
result: result !== void 0 && result !== null ? fromJson34(result) : void 0,
|
|
3177
3562
|
ttlSeconds,
|
|
3178
3563
|
progress,
|
|
3179
|
-
state:
|
|
3564
|
+
state: fromJson35(state)
|
|
3180
3565
|
};
|
|
3181
3566
|
}
|
|
3182
|
-
function
|
|
3567
|
+
function toJson36($model) {
|
|
3183
3568
|
const { result, ttlSeconds, progress, state } = $model;
|
|
3184
3569
|
return {
|
|
3185
|
-
result: result !== void 0 && result !== null ?
|
|
3570
|
+
result: result !== void 0 && result !== null ? toJson34(result) : void 0,
|
|
3186
3571
|
ttlSeconds,
|
|
3187
3572
|
progress,
|
|
3188
|
-
state:
|
|
3573
|
+
state: toJson35(state)
|
|
3189
3574
|
};
|
|
3190
3575
|
}
|
|
3191
3576
|
|
|
3192
3577
|
// packages/client/query/src/lib/models/query-start-response.transformation.ts
|
|
3193
3578
|
var query_start_response_transformation_exports = {};
|
|
3194
3579
|
__export(query_start_response_transformation_exports, {
|
|
3195
|
-
fromJson: () =>
|
|
3196
|
-
isJson: () =>
|
|
3580
|
+
fromJson: () => fromJson37,
|
|
3581
|
+
isJson: () => isJson37,
|
|
3197
3582
|
isQueryStartResponse: () => isQueryStartResponse,
|
|
3198
|
-
toJson: () =>
|
|
3583
|
+
toJson: () => toJson37
|
|
3199
3584
|
});
|
|
3200
3585
|
function isQueryStartResponse(value) {
|
|
3201
3586
|
if (value === null) {
|
|
@@ -3217,7 +3602,7 @@ function isQueryStartResponse(value) {
|
|
|
3217
3602
|
const allPropertiesMatchFormat = true;
|
|
3218
3603
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3219
3604
|
}
|
|
3220
|
-
function
|
|
3605
|
+
function isJson37(value) {
|
|
3221
3606
|
if (value === null) {
|
|
3222
3607
|
return false;
|
|
3223
3608
|
}
|
|
@@ -3237,24 +3622,24 @@ function isJson36(value) {
|
|
|
3237
3622
|
const allPropertiesMatchFormat = true;
|
|
3238
3623
|
return containsRequiredOrOptionalKeys && doesNotContainExtraKeys && allPropertiesMatchFormat;
|
|
3239
3624
|
}
|
|
3240
|
-
function
|
|
3625
|
+
function fromJson37($model) {
|
|
3241
3626
|
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
3242
3627
|
return {
|
|
3243
|
-
result: result !== void 0 && result !== null ?
|
|
3628
|
+
result: result !== void 0 && result !== null ? fromJson34(result) : void 0,
|
|
3244
3629
|
ttlSeconds,
|
|
3245
3630
|
progress,
|
|
3246
3631
|
requestToken,
|
|
3247
|
-
state:
|
|
3632
|
+
state: fromJson35(state)
|
|
3248
3633
|
};
|
|
3249
3634
|
}
|
|
3250
|
-
function
|
|
3635
|
+
function toJson37($model) {
|
|
3251
3636
|
const { result, ttlSeconds, progress, requestToken, state } = $model;
|
|
3252
3637
|
return {
|
|
3253
|
-
result: result !== void 0 && result !== null ?
|
|
3638
|
+
result: result !== void 0 && result !== null ? toJson34(result) : void 0,
|
|
3254
3639
|
ttlSeconds,
|
|
3255
3640
|
progress,
|
|
3256
3641
|
requestToken,
|
|
3257
|
-
state:
|
|
3642
|
+
state: toJson35(state)
|
|
3258
3643
|
};
|
|
3259
3644
|
}
|
|
3260
3645
|
|
|
@@ -3288,10 +3673,60 @@ var toQueryString = (rawQuery, flags = {}) => {
|
|
|
3288
3673
|
// packages/client/query/src/lib/apis/query-execution-api.ts
|
|
3289
3674
|
var QueryExecutionClient = class {
|
|
3290
3675
|
httpClient;
|
|
3676
|
+
/**
|
|
3677
|
+
* @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a QueryExecutionClient. Custom http client should implement {HttpClient} interface.
|
|
3678
|
+
* @example
|
|
3679
|
+
* const queryExecutionClientNodeJs = new QueryExecutionClient(yourCustomImplementation);
|
|
3680
|
+
*/
|
|
3291
3681
|
constructor(httpClientImplementation) {
|
|
3292
3682
|
this.httpClient = httpClientImplementation;
|
|
3293
3683
|
registerGlobalErrorSerializer(apiClientErrorSerializer);
|
|
3294
3684
|
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Retrieves query status and final result from Grail.
|
|
3687
|
+
*
|
|
3688
|
+
* 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).
|
|
3689
|
+
*
|
|
3690
|
+
* ### Overview:
|
|
3691
|
+
*
|
|
3692
|
+
* Polls the status of a Grail query. Returns the status of the query, including the result if the query finished.
|
|
3693
|
+
*
|
|
3694
|
+
* ### The response format:
|
|
3695
|
+
* The json response will contain the state of the query. If the query succeeded, the result will be included.
|
|
3696
|
+
*
|
|
3697
|
+
* The result has two main sections:
|
|
3698
|
+
* * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
|
|
3699
|
+
* * The 'types' section describes the corresponding data types that a record field has.
|
|
3700
|
+
*
|
|
3701
|
+
* Every record has an implicit 'index' according to the position in the 'records' JSON array.
|
|
3702
|
+
* The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
|
|
3703
|
+
* 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).
|
|
3704
|
+
*
|
|
3705
|
+
* A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
|
|
3706
|
+
*
|
|
3707
|
+
* ```text
|
|
3708
|
+
* startIndex <= i <= endIndex
|
|
3709
|
+
* ```
|
|
3710
|
+
*
|
|
3711
|
+
* Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
|
|
3712
|
+
*
|
|
3713
|
+
*
|
|
3714
|
+
* Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
|
|
3715
|
+
* field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
|
|
3716
|
+
* When a collision does occur, we will create a new type 'bucket' that will have a different index range where
|
|
3717
|
+
* the new record field types will be placed.
|
|
3718
|
+
* It is guaranteed that every field of every record will have a corresponding type.
|
|
3719
|
+
* **Clients should always take the included types into account when consuming records!**
|
|
3720
|
+
*
|
|
3721
|
+
* @returns The current status and results of the supplied query.
|
|
3722
|
+
*
|
|
3723
|
+
* @example <caption>Code example</caption>
|
|
3724
|
+
* import { queryExecutionClient } from "@dynatrace-sdk/client-query";
|
|
3725
|
+
*
|
|
3726
|
+
* const data = await queryExecutionClient.queryPoll({
|
|
3727
|
+
* requestToken: "...",
|
|
3728
|
+
* });
|
|
3729
|
+
*/
|
|
3295
3730
|
async queryPoll(config) {
|
|
3296
3731
|
if (!config) {
|
|
3297
3732
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
@@ -3318,7 +3753,7 @@ var QueryExecutionClient = class {
|
|
|
3318
3753
|
});
|
|
3319
3754
|
const responseValue = await response.body("json");
|
|
3320
3755
|
try {
|
|
3321
|
-
return
|
|
3756
|
+
return fromJson36(responseValue);
|
|
3322
3757
|
} catch (err) {
|
|
3323
3758
|
throw new InvalidResponseError(`QueryExecutionClient.query:poll:200`, err, responseValue, void 0, void 0);
|
|
3324
3759
|
}
|
|
@@ -3334,7 +3769,7 @@ var QueryExecutionClient = class {
|
|
|
3334
3769
|
case 400: {
|
|
3335
3770
|
const responseValue = await response.body("json");
|
|
3336
3771
|
try {
|
|
3337
|
-
const errorBody =
|
|
3772
|
+
const errorBody = fromJson17(responseValue);
|
|
3338
3773
|
throw new ErrorEnvelopeError(
|
|
3339
3774
|
`400`,
|
|
3340
3775
|
response,
|
|
@@ -3359,7 +3794,10 @@ var QueryExecutionClient = class {
|
|
|
3359
3794
|
}
|
|
3360
3795
|
}
|
|
3361
3796
|
case 410: {
|
|
3362
|
-
const responseValue = await response.body(
|
|
3797
|
+
const responseValue = await response.body(
|
|
3798
|
+
"text"
|
|
3799
|
+
/* type from spec unsupported */
|
|
3800
|
+
);
|
|
3363
3801
|
throw new ClientRequestError(
|
|
3364
3802
|
`410`,
|
|
3365
3803
|
response,
|
|
@@ -3370,7 +3808,7 @@ var QueryExecutionClient = class {
|
|
|
3370
3808
|
case 500: {
|
|
3371
3809
|
const responseValue = await response.body("json");
|
|
3372
3810
|
try {
|
|
3373
|
-
const errorBody =
|
|
3811
|
+
const errorBody = fromJson17(responseValue);
|
|
3374
3812
|
throw new ErrorEnvelopeError(
|
|
3375
3813
|
`500`,
|
|
3376
3814
|
response,
|
|
@@ -3404,11 +3842,62 @@ var QueryExecutionClient = class {
|
|
|
3404
3842
|
}
|
|
3405
3843
|
}
|
|
3406
3844
|
}
|
|
3845
|
+
/**
|
|
3846
|
+
* Starts a Grail query.
|
|
3847
|
+
*
|
|
3848
|
+
* 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).
|
|
3849
|
+
*
|
|
3850
|
+
* ### Overview:
|
|
3851
|
+
*
|
|
3852
|
+
* Executes a query and returns a list of records.
|
|
3853
|
+
*
|
|
3854
|
+
* For details about the query language see the [Dynatrace Query Language documentation](https://dt-url.net/bv03yk8).
|
|
3855
|
+
*
|
|
3856
|
+
* ### The response format:
|
|
3857
|
+
*
|
|
3858
|
+
* 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.
|
|
3859
|
+
*
|
|
3860
|
+
* The result has two main sections:
|
|
3861
|
+
* * The 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
|
|
3862
|
+
* * The 'types' section describes the corresponding data types that a record field has.
|
|
3863
|
+
*
|
|
3864
|
+
* Every record has an implicit 'index' according to the position in the 'records' JSON array.
|
|
3865
|
+
* The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
|
|
3866
|
+
* 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).
|
|
3867
|
+
*
|
|
3868
|
+
* A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
|
|
3869
|
+
*
|
|
3870
|
+
* ```text
|
|
3871
|
+
* startIndex <= i <= endIndex
|
|
3872
|
+
* ```
|
|
3873
|
+
*
|
|
3874
|
+
* Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
|
|
3875
|
+
*
|
|
3876
|
+
*
|
|
3877
|
+
* Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
|
|
3878
|
+
* field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
|
|
3879
|
+
* When a collision does occur, we will create a new type 'bucket' that will have a different index range where
|
|
3880
|
+
* the new record field types will be placed.
|
|
3881
|
+
* It is guaranteed that every field of every record will have a corresponding type.
|
|
3882
|
+
* **Clients should always take the included types into account when consuming records!**
|
|
3883
|
+
*
|
|
3884
|
+
* @returns The final status and results of the supplied query if it finished within a supplied requestTimeoutMilliseconds. | The status of the query to start.
|
|
3885
|
+
*
|
|
3886
|
+
* @example <caption>Code example</caption>
|
|
3887
|
+
* import { queryExecutionClient } from "@dynatrace-sdk/client-query";
|
|
3888
|
+
*
|
|
3889
|
+
* const data = await queryExecutionClient.queryExecute({
|
|
3890
|
+
* body: {
|
|
3891
|
+
* query:
|
|
3892
|
+
* 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
|
|
3893
|
+
* },
|
|
3894
|
+
* });
|
|
3895
|
+
*/
|
|
3407
3896
|
async queryExecute(config) {
|
|
3408
3897
|
if (!config) {
|
|
3409
3898
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
3410
3899
|
}
|
|
3411
|
-
const encodedBody =
|
|
3900
|
+
const encodedBody = toJson22(config.body);
|
|
3412
3901
|
const query = toQueryString({ enrich: config.enrich });
|
|
3413
3902
|
try {
|
|
3414
3903
|
const response = await this.httpClient.send({
|
|
@@ -3429,7 +3918,7 @@ var QueryExecutionClient = class {
|
|
|
3429
3918
|
case 200: {
|
|
3430
3919
|
const responseValue = await response.body("json");
|
|
3431
3920
|
try {
|
|
3432
|
-
return
|
|
3921
|
+
return fromJson37(responseValue);
|
|
3433
3922
|
} catch (err) {
|
|
3434
3923
|
throw new InvalidResponseError(
|
|
3435
3924
|
`QueryExecutionClient.query:execute:${response.status}`,
|
|
@@ -3443,7 +3932,7 @@ var QueryExecutionClient = class {
|
|
|
3443
3932
|
case 202: {
|
|
3444
3933
|
const responseValue = await response.body("json");
|
|
3445
3934
|
try {
|
|
3446
|
-
return
|
|
3935
|
+
return fromJson37(responseValue);
|
|
3447
3936
|
} catch (err) {
|
|
3448
3937
|
throw new InvalidResponseError(
|
|
3449
3938
|
`QueryExecutionClient.query:execute:${response.status}`,
|
|
@@ -3476,7 +3965,7 @@ var QueryExecutionClient = class {
|
|
|
3476
3965
|
case 400: {
|
|
3477
3966
|
const responseValue = await response.body("json");
|
|
3478
3967
|
try {
|
|
3479
|
-
const errorBody =
|
|
3968
|
+
const errorBody = fromJson17(responseValue);
|
|
3480
3969
|
throw new ErrorEnvelopeError(
|
|
3481
3970
|
`400`,
|
|
3482
3971
|
response,
|
|
@@ -3503,7 +3992,7 @@ var QueryExecutionClient = class {
|
|
|
3503
3992
|
case 403: {
|
|
3504
3993
|
const responseValue = await response.body("json");
|
|
3505
3994
|
try {
|
|
3506
|
-
const errorBody =
|
|
3995
|
+
const errorBody = fromJson17(responseValue);
|
|
3507
3996
|
throw new ErrorEnvelopeError(
|
|
3508
3997
|
`403`,
|
|
3509
3998
|
response,
|
|
@@ -3527,7 +4016,7 @@ var QueryExecutionClient = class {
|
|
|
3527
4016
|
case 429: {
|
|
3528
4017
|
const responseValue = await response.body("json");
|
|
3529
4018
|
try {
|
|
3530
|
-
const errorBody =
|
|
4019
|
+
const errorBody = fromJson17(responseValue);
|
|
3531
4020
|
throw new ErrorEnvelopeError(
|
|
3532
4021
|
`429`,
|
|
3533
4022
|
response,
|
|
@@ -3551,7 +4040,7 @@ var QueryExecutionClient = class {
|
|
|
3551
4040
|
case 500: {
|
|
3552
4041
|
const responseValue = await response.body("json");
|
|
3553
4042
|
try {
|
|
3554
|
-
const errorBody =
|
|
4043
|
+
const errorBody = fromJson17(responseValue);
|
|
3555
4044
|
throw new ErrorEnvelopeError(
|
|
3556
4045
|
`500`,
|
|
3557
4046
|
response,
|
|
@@ -3575,7 +4064,7 @@ var QueryExecutionClient = class {
|
|
|
3575
4064
|
case 503: {
|
|
3576
4065
|
const responseValue = await response.body("json");
|
|
3577
4066
|
try {
|
|
3578
|
-
const errorBody =
|
|
4067
|
+
const errorBody = fromJson17(responseValue);
|
|
3579
4068
|
throw new ErrorEnvelopeError(
|
|
3580
4069
|
`503`,
|
|
3581
4070
|
response,
|
|
@@ -3600,7 +4089,7 @@ var QueryExecutionClient = class {
|
|
|
3600
4089
|
if (response.status >= 400 && response.status <= 499) {
|
|
3601
4090
|
const responseValue = await response.body("json");
|
|
3602
4091
|
try {
|
|
3603
|
-
const errorBody =
|
|
4092
|
+
const errorBody = fromJson17(responseValue);
|
|
3604
4093
|
throw new ErrorEnvelopeError(
|
|
3605
4094
|
`${response.status}`,
|
|
3606
4095
|
response,
|
|
@@ -3623,7 +4112,7 @@ var QueryExecutionClient = class {
|
|
|
3623
4112
|
} else if (response.status >= 500 && response.status <= 599) {
|
|
3624
4113
|
const responseValue = await response.body("json");
|
|
3625
4114
|
try {
|
|
3626
|
-
const errorBody =
|
|
4115
|
+
const errorBody = fromJson17(responseValue);
|
|
3627
4116
|
throw new ErrorEnvelopeError(
|
|
3628
4117
|
`${response.status}`,
|
|
3629
4118
|
response,
|
|
@@ -3659,6 +4148,53 @@ var QueryExecutionClient = class {
|
|
|
3659
4148
|
}
|
|
3660
4149
|
}
|
|
3661
4150
|
}
|
|
4151
|
+
/**
|
|
4152
|
+
* Cancels the query and returns the result if the query was already finished, otherwise discards it.
|
|
4153
|
+
*
|
|
4154
|
+
* 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).
|
|
4155
|
+
*
|
|
4156
|
+
* ### Overview:
|
|
4157
|
+
*
|
|
4158
|
+
* Cancels a running Grail query and returns a list of records if the query already finished.
|
|
4159
|
+
*
|
|
4160
|
+
* ### The response format:
|
|
4161
|
+
*
|
|
4162
|
+
* If the query was already finished, a response body including the result will be returned. Otherwise the response will contain no body.
|
|
4163
|
+
*
|
|
4164
|
+
* The result has three main sections:
|
|
4165
|
+
* * the 'records' section contains the individual records, where each record consists of a set of fields and their corresponding values.
|
|
4166
|
+
* * the 'types' section describes the corresponding data types that a record field has.
|
|
4167
|
+
* * the 'metadata' section contains information about the query like 'analysisTimeframe', 'timezone' or 'locale'.
|
|
4168
|
+
*
|
|
4169
|
+
* Every record has an implicit 'index' according to the position in the 'records' JSON array.
|
|
4170
|
+
* The types section has a list of 1..N possible type 'buckets'. Each such bucket has an 'indexRange' which indicates which
|
|
4171
|
+
* 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).
|
|
4172
|
+
*
|
|
4173
|
+
* A field part of a record with index 'i' will find its corresponding field type by first locating the bucket that satisfies:
|
|
4174
|
+
*
|
|
4175
|
+
* ```text
|
|
4176
|
+
* startIndex <= i <= endIndex
|
|
4177
|
+
* ```
|
|
4178
|
+
*
|
|
4179
|
+
* Once the bucket is found the 'mappings' object has an entry for all the fields that are part of that record with index 'i'.
|
|
4180
|
+
*
|
|
4181
|
+
*
|
|
4182
|
+
* Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
|
|
4183
|
+
* field name but their values are of a different type. This phenomenon will hence forth be named as a **"collision"**.
|
|
4184
|
+
* When a collision does occur, we will create a new type 'bucket' that will have a different index range where
|
|
4185
|
+
* the new record field types will be placed.
|
|
4186
|
+
* It is guaranteed that every field of every record will have a corresponding type.
|
|
4187
|
+
* **Clients should always take the included types into account when consuming records!**
|
|
4188
|
+
*
|
|
4189
|
+
* @returns The query already finished.
|
|
4190
|
+
*
|
|
4191
|
+
* @example <caption>Code example</caption>
|
|
4192
|
+
* import { queryExecutionClient } from "@dynatrace-sdk/client-query";
|
|
4193
|
+
*
|
|
4194
|
+
* const data = await queryExecutionClient.queryCancel({
|
|
4195
|
+
* requestToken: "...",
|
|
4196
|
+
* });
|
|
4197
|
+
*/
|
|
3662
4198
|
async queryCancel(config) {
|
|
3663
4199
|
if (!config) {
|
|
3664
4200
|
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter");
|
|
@@ -3683,7 +4219,7 @@ var QueryExecutionClient = class {
|
|
|
3683
4219
|
case 200: {
|
|
3684
4220
|
const responseValue = await response.body("json");
|
|
3685
4221
|
try {
|
|
3686
|
-
return
|
|
4222
|
+
return fromJson36(responseValue);
|
|
3687
4223
|
} catch (err) {
|
|
3688
4224
|
throw new InvalidResponseError(
|
|
3689
4225
|
`QueryExecutionClient.query:cancel:${response.status}`,
|
|
@@ -3719,7 +4255,7 @@ var QueryExecutionClient = class {
|
|
|
3719
4255
|
case 400: {
|
|
3720
4256
|
const responseValue = await response.body("json");
|
|
3721
4257
|
try {
|
|
3722
|
-
const errorBody =
|
|
4258
|
+
const errorBody = fromJson17(responseValue);
|
|
3723
4259
|
throw new ErrorEnvelopeError(
|
|
3724
4260
|
`400`,
|
|
3725
4261
|
response,
|
|
@@ -3744,7 +4280,10 @@ var QueryExecutionClient = class {
|
|
|
3744
4280
|
}
|
|
3745
4281
|
}
|
|
3746
4282
|
case 410: {
|
|
3747
|
-
const responseValue = await response.body(
|
|
4283
|
+
const responseValue = await response.body(
|
|
4284
|
+
"text"
|
|
4285
|
+
/* type from spec unsupported */
|
|
4286
|
+
);
|
|
3748
4287
|
throw new ClientRequestError(
|
|
3749
4288
|
`410`,
|
|
3750
4289
|
response,
|
|
@@ -3755,7 +4294,7 @@ var QueryExecutionClient = class {
|
|
|
3755
4294
|
case 500: {
|
|
3756
4295
|
const responseValue = await response.body("json");
|
|
3757
4296
|
try {
|
|
3758
|
-
const errorBody =
|
|
4297
|
+
const errorBody = fromJson17(responseValue);
|
|
3759
4298
|
throw new ErrorEnvelopeError(
|
|
3760
4299
|
`500`,
|
|
3761
4300
|
response,
|