@aws-sdk/client-timestream-query 3.525.0 → 3.529.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/dist-cjs/index.js +23 -63
- package/dist-es/protocols/Aws_json1_0.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -74,7 +74,7 @@ var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
|
74
74
|
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
75
75
|
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
76
76
|
var import_config_resolver = require("@smithy/config-resolver");
|
|
77
|
-
var
|
|
77
|
+
var import_core2 = require("@smithy/core");
|
|
78
78
|
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
79
79
|
|
|
80
80
|
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
@@ -104,6 +104,7 @@ var commonParams = {
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
// src/protocols/Aws_json1_0.ts
|
|
107
|
+
var import_core = require("@aws-sdk/core");
|
|
107
108
|
var import_protocol_http = require("@smithy/protocol-http");
|
|
108
109
|
|
|
109
110
|
var import_uuid = require("uuid");
|
|
@@ -447,7 +448,7 @@ var de_CancelQueryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
447
448
|
if (output.statusCode >= 300) {
|
|
448
449
|
return de_CommandError(output, context);
|
|
449
450
|
}
|
|
450
|
-
const data = await
|
|
451
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
451
452
|
let contents = {};
|
|
452
453
|
contents = (0, import_smithy_client._json)(data);
|
|
453
454
|
const response = {
|
|
@@ -460,7 +461,7 @@ var de_CreateScheduledQueryCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
460
461
|
if (output.statusCode >= 300) {
|
|
461
462
|
return de_CommandError(output, context);
|
|
462
463
|
}
|
|
463
|
-
const data = await
|
|
464
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
464
465
|
let contents = {};
|
|
465
466
|
contents = (0, import_smithy_client._json)(data);
|
|
466
467
|
const response = {
|
|
@@ -483,7 +484,7 @@ var de_DescribeEndpointsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
483
484
|
if (output.statusCode >= 300) {
|
|
484
485
|
return de_CommandError(output, context);
|
|
485
486
|
}
|
|
486
|
-
const data = await
|
|
487
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
487
488
|
let contents = {};
|
|
488
489
|
contents = (0, import_smithy_client._json)(data);
|
|
489
490
|
const response = {
|
|
@@ -496,7 +497,7 @@ var de_DescribeScheduledQueryCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
496
497
|
if (output.statusCode >= 300) {
|
|
497
498
|
return de_CommandError(output, context);
|
|
498
499
|
}
|
|
499
|
-
const data = await
|
|
500
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
500
501
|
let contents = {};
|
|
501
502
|
contents = de_DescribeScheduledQueryResponse(data, context);
|
|
502
503
|
const response = {
|
|
@@ -519,7 +520,7 @@ var de_ListScheduledQueriesCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
519
520
|
if (output.statusCode >= 300) {
|
|
520
521
|
return de_CommandError(output, context);
|
|
521
522
|
}
|
|
522
|
-
const data = await
|
|
523
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
523
524
|
let contents = {};
|
|
524
525
|
contents = de_ListScheduledQueriesResponse(data, context);
|
|
525
526
|
const response = {
|
|
@@ -532,7 +533,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
532
533
|
if (output.statusCode >= 300) {
|
|
533
534
|
return de_CommandError(output, context);
|
|
534
535
|
}
|
|
535
|
-
const data = await
|
|
536
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
536
537
|
let contents = {};
|
|
537
538
|
contents = (0, import_smithy_client._json)(data);
|
|
538
539
|
const response = {
|
|
@@ -545,7 +546,7 @@ var de_PrepareQueryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
545
546
|
if (output.statusCode >= 300) {
|
|
546
547
|
return de_CommandError(output, context);
|
|
547
548
|
}
|
|
548
|
-
const data = await
|
|
549
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
549
550
|
let contents = {};
|
|
550
551
|
contents = de_PrepareQueryResponse(data, context);
|
|
551
552
|
const response = {
|
|
@@ -558,7 +559,7 @@ var de_QueryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
558
559
|
if (output.statusCode >= 300) {
|
|
559
560
|
return de_CommandError(output, context);
|
|
560
561
|
}
|
|
561
|
-
const data = await
|
|
562
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
562
563
|
let contents = {};
|
|
563
564
|
contents = de_QueryResponse(data, context);
|
|
564
565
|
const response = {
|
|
@@ -571,7 +572,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
571
572
|
if (output.statusCode >= 300) {
|
|
572
573
|
return de_CommandError(output, context);
|
|
573
574
|
}
|
|
574
|
-
const data = await
|
|
575
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
575
576
|
let contents = {};
|
|
576
577
|
contents = (0, import_smithy_client._json)(data);
|
|
577
578
|
const response = {
|
|
@@ -584,7 +585,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
584
585
|
if (output.statusCode >= 300) {
|
|
585
586
|
return de_CommandError(output, context);
|
|
586
587
|
}
|
|
587
|
-
const data = await
|
|
588
|
+
const data = await (0, import_core.parseJsonBody)(output.body, context);
|
|
588
589
|
let contents = {};
|
|
589
590
|
contents = (0, import_smithy_client._json)(data);
|
|
590
591
|
const response = {
|
|
@@ -606,9 +607,9 @@ var de_UpdateScheduledQueryCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
606
607
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
607
608
|
const parsedOutput = {
|
|
608
609
|
...output,
|
|
609
|
-
body: await
|
|
610
|
+
body: await (0, import_core.parseJsonErrorBody)(output.body, context)
|
|
610
611
|
};
|
|
611
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
612
|
+
const errorCode = (0, import_core.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
612
613
|
switch (errorCode) {
|
|
613
614
|
case "AccessDeniedException":
|
|
614
615
|
case "com.amazonaws.timestreamquery#AccessDeniedException":
|
|
@@ -935,7 +936,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
935
936
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
936
937
|
cfId: output.headers["x-amz-cf-id"]
|
|
937
938
|
}), "deserializeMetadata");
|
|
938
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
939
939
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(TimestreamQueryServiceException);
|
|
940
940
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
941
941
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -962,46 +962,6 @@ function sharedHeaders(operation) {
|
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
964
|
__name(sharedHeaders, "sharedHeaders");
|
|
965
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
966
|
-
if (encoded.length) {
|
|
967
|
-
return JSON.parse(encoded);
|
|
968
|
-
}
|
|
969
|
-
return {};
|
|
970
|
-
}), "parseBody");
|
|
971
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
972
|
-
const value = await parseBody(errorBody, context);
|
|
973
|
-
value.message = value.message ?? value.Message;
|
|
974
|
-
return value;
|
|
975
|
-
}, "parseErrorBody");
|
|
976
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
977
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
978
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
979
|
-
let cleanValue = rawValue;
|
|
980
|
-
if (typeof cleanValue === "number") {
|
|
981
|
-
cleanValue = cleanValue.toString();
|
|
982
|
-
}
|
|
983
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
984
|
-
cleanValue = cleanValue.split(",")[0];
|
|
985
|
-
}
|
|
986
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
987
|
-
cleanValue = cleanValue.split(":")[0];
|
|
988
|
-
}
|
|
989
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
990
|
-
cleanValue = cleanValue.split("#")[1];
|
|
991
|
-
}
|
|
992
|
-
return cleanValue;
|
|
993
|
-
}, "sanitizeErrorCode");
|
|
994
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
995
|
-
if (headerKey !== void 0) {
|
|
996
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
997
|
-
}
|
|
998
|
-
if (data.code !== void 0) {
|
|
999
|
-
return sanitizeErrorCode(data.code);
|
|
1000
|
-
}
|
|
1001
|
-
if (data["__type"] !== void 0) {
|
|
1002
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1003
|
-
}
|
|
1004
|
-
}, "loadRestJsonErrorCode");
|
|
1005
965
|
|
|
1006
966
|
// src/commands/DescribeEndpointsCommand.ts
|
|
1007
967
|
var _DescribeEndpointsCommand = class _DescribeEndpointsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1106,12 +1066,12 @@ var _TimestreamQueryClient = class _TimestreamQueryClient extends import_smithy_
|
|
|
1106
1066
|
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
1107
1067
|
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
1108
1068
|
this.middlewareStack.use(
|
|
1109
|
-
(0,
|
|
1069
|
+
(0, import_core2.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
1110
1070
|
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
1111
1071
|
identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
|
|
1112
1072
|
})
|
|
1113
1073
|
);
|
|
1114
|
-
this.middlewareStack.use((0,
|
|
1074
|
+
this.middlewareStack.use((0, import_core2.getHttpSigningPlugin)(this.config));
|
|
1115
1075
|
}
|
|
1116
1076
|
/**
|
|
1117
1077
|
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
@@ -1125,7 +1085,7 @@ var _TimestreamQueryClient = class _TimestreamQueryClient extends import_smithy_
|
|
|
1125
1085
|
return import_httpAuthSchemeProvider.defaultTimestreamQueryHttpAuthSchemeParametersProvider;
|
|
1126
1086
|
}
|
|
1127
1087
|
getIdentityProviderConfigProvider() {
|
|
1128
|
-
return async (config) => new
|
|
1088
|
+
return async (config) => new import_core2.DefaultIdentityProviderConfig({
|
|
1129
1089
|
"aws.auth#sigv4": config.credentials
|
|
1130
1090
|
});
|
|
1131
1091
|
}
|
|
@@ -1387,16 +1347,16 @@ var TimestreamQuery = _TimestreamQuery;
|
|
|
1387
1347
|
(0, import_smithy_client.createAggregatedClient)(commands, TimestreamQuery);
|
|
1388
1348
|
|
|
1389
1349
|
// src/pagination/ListScheduledQueriesPaginator.ts
|
|
1390
|
-
|
|
1391
|
-
var paginateListScheduledQueries = (0,
|
|
1350
|
+
var import_core3 = require("@smithy/core");
|
|
1351
|
+
var paginateListScheduledQueries = (0, import_core3.createPaginator)(TimestreamQueryClient, ListScheduledQueriesCommand, "NextToken", "NextToken", "MaxResults");
|
|
1392
1352
|
|
|
1393
1353
|
// src/pagination/ListTagsForResourcePaginator.ts
|
|
1394
|
-
|
|
1395
|
-
var paginateListTagsForResource = (0,
|
|
1354
|
+
var import_core4 = require("@smithy/core");
|
|
1355
|
+
var paginateListTagsForResource = (0, import_core4.createPaginator)(TimestreamQueryClient, ListTagsForResourceCommand, "NextToken", "NextToken", "MaxResults");
|
|
1396
1356
|
|
|
1397
1357
|
// src/pagination/QueryPaginator.ts
|
|
1398
|
-
|
|
1399
|
-
var paginateQuery = (0,
|
|
1358
|
+
var import_core5 = require("@smithy/core");
|
|
1359
|
+
var paginateQuery = (0, import_core5.createPaginator)(TimestreamQueryClient, QueryCommand, "NextToken", "NextToken", "MaxRows");
|
|
1400
1360
|
|
|
1401
1361
|
// src/index.ts
|
|
1402
1362
|
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -615,43 +616,3 @@ function sharedHeaders(operation) {
|
|
|
615
616
|
"x-amz-target": `Timestream_20181101.${operation}`,
|
|
616
617
|
};
|
|
617
618
|
}
|
|
618
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
619
|
-
if (encoded.length) {
|
|
620
|
-
return JSON.parse(encoded);
|
|
621
|
-
}
|
|
622
|
-
return {};
|
|
623
|
-
});
|
|
624
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
625
|
-
const value = await parseBody(errorBody, context);
|
|
626
|
-
value.message = value.message ?? value.Message;
|
|
627
|
-
return value;
|
|
628
|
-
};
|
|
629
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
630
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
631
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
632
|
-
let cleanValue = rawValue;
|
|
633
|
-
if (typeof cleanValue === "number") {
|
|
634
|
-
cleanValue = cleanValue.toString();
|
|
635
|
-
}
|
|
636
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
637
|
-
cleanValue = cleanValue.split(",")[0];
|
|
638
|
-
}
|
|
639
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
640
|
-
cleanValue = cleanValue.split(":")[0];
|
|
641
|
-
}
|
|
642
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
643
|
-
cleanValue = cleanValue.split("#")[1];
|
|
644
|
-
}
|
|
645
|
-
return cleanValue;
|
|
646
|
-
};
|
|
647
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
648
|
-
if (headerKey !== undefined) {
|
|
649
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
650
|
-
}
|
|
651
|
-
if (data.code !== undefined) {
|
|
652
|
-
return sanitizeErrorCode(data.code);
|
|
653
|
-
}
|
|
654
|
-
if (data["__type"] !== undefined) {
|
|
655
|
-
return sanitizeErrorCode(data["__type"]);
|
|
656
|
-
}
|
|
657
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-timestream-query",
|
|
3
3
|
"description": "AWS SDK for JavaScript Timestream Query Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-timestream-query",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
26
26
|
"@aws-sdk/middleware-endpoint-discovery": "3.525.0",
|
|
27
27
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-logger": "3.523.0",
|