@aws-sdk/client-keyspaces 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 +17 -57
- package/dist-es/protocols/Aws_json1_0.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -212,6 +212,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
212
212
|
var import_types = require("@smithy/types");
|
|
213
213
|
|
|
214
214
|
// src/protocols/Aws_json1_0.ts
|
|
215
|
+
var import_core2 = require("@aws-sdk/core");
|
|
215
216
|
|
|
216
217
|
|
|
217
218
|
|
|
@@ -458,7 +459,7 @@ var de_CreateKeyspaceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
458
459
|
if (output.statusCode >= 300) {
|
|
459
460
|
return de_CommandError(output, context);
|
|
460
461
|
}
|
|
461
|
-
const data = await
|
|
462
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
462
463
|
let contents = {};
|
|
463
464
|
contents = (0, import_smithy_client._json)(data);
|
|
464
465
|
const response = {
|
|
@@ -471,7 +472,7 @@ var de_CreateTableCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
471
472
|
if (output.statusCode >= 300) {
|
|
472
473
|
return de_CommandError(output, context);
|
|
473
474
|
}
|
|
474
|
-
const data = await
|
|
475
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
475
476
|
let contents = {};
|
|
476
477
|
contents = (0, import_smithy_client._json)(data);
|
|
477
478
|
const response = {
|
|
@@ -484,7 +485,7 @@ var de_DeleteKeyspaceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
484
485
|
if (output.statusCode >= 300) {
|
|
485
486
|
return de_CommandError(output, context);
|
|
486
487
|
}
|
|
487
|
-
const data = await
|
|
488
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
488
489
|
let contents = {};
|
|
489
490
|
contents = (0, import_smithy_client._json)(data);
|
|
490
491
|
const response = {
|
|
@@ -497,7 +498,7 @@ var de_DeleteTableCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
497
498
|
if (output.statusCode >= 300) {
|
|
498
499
|
return de_CommandError(output, context);
|
|
499
500
|
}
|
|
500
|
-
const data = await
|
|
501
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
501
502
|
let contents = {};
|
|
502
503
|
contents = (0, import_smithy_client._json)(data);
|
|
503
504
|
const response = {
|
|
@@ -510,7 +511,7 @@ var de_GetKeyspaceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
510
511
|
if (output.statusCode >= 300) {
|
|
511
512
|
return de_CommandError(output, context);
|
|
512
513
|
}
|
|
513
|
-
const data = await
|
|
514
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
514
515
|
let contents = {};
|
|
515
516
|
contents = (0, import_smithy_client._json)(data);
|
|
516
517
|
const response = {
|
|
@@ -523,7 +524,7 @@ var de_GetTableCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
523
524
|
if (output.statusCode >= 300) {
|
|
524
525
|
return de_CommandError(output, context);
|
|
525
526
|
}
|
|
526
|
-
const data = await
|
|
527
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
527
528
|
let contents = {};
|
|
528
529
|
contents = de_GetTableResponse(data, context);
|
|
529
530
|
const response = {
|
|
@@ -536,7 +537,7 @@ var de_GetTableAutoScalingSettingsCommand = /* @__PURE__ */ __name(async (output
|
|
|
536
537
|
if (output.statusCode >= 300) {
|
|
537
538
|
return de_CommandError(output, context);
|
|
538
539
|
}
|
|
539
|
-
const data = await
|
|
540
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
540
541
|
let contents = {};
|
|
541
542
|
contents = de_GetTableAutoScalingSettingsResponse(data, context);
|
|
542
543
|
const response = {
|
|
@@ -549,7 +550,7 @@ var de_ListKeyspacesCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
549
550
|
if (output.statusCode >= 300) {
|
|
550
551
|
return de_CommandError(output, context);
|
|
551
552
|
}
|
|
552
|
-
const data = await
|
|
553
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
553
554
|
let contents = {};
|
|
554
555
|
contents = (0, import_smithy_client._json)(data);
|
|
555
556
|
const response = {
|
|
@@ -562,7 +563,7 @@ var de_ListTablesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
562
563
|
if (output.statusCode >= 300) {
|
|
563
564
|
return de_CommandError(output, context);
|
|
564
565
|
}
|
|
565
|
-
const data = await
|
|
566
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
566
567
|
let contents = {};
|
|
567
568
|
contents = (0, import_smithy_client._json)(data);
|
|
568
569
|
const response = {
|
|
@@ -575,7 +576,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
575
576
|
if (output.statusCode >= 300) {
|
|
576
577
|
return de_CommandError(output, context);
|
|
577
578
|
}
|
|
578
|
-
const data = await
|
|
579
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
579
580
|
let contents = {};
|
|
580
581
|
contents = (0, import_smithy_client._json)(data);
|
|
581
582
|
const response = {
|
|
@@ -588,7 +589,7 @@ var de_RestoreTableCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
588
589
|
if (output.statusCode >= 300) {
|
|
589
590
|
return de_CommandError(output, context);
|
|
590
591
|
}
|
|
591
|
-
const data = await
|
|
592
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
592
593
|
let contents = {};
|
|
593
594
|
contents = (0, import_smithy_client._json)(data);
|
|
594
595
|
const response = {
|
|
@@ -601,7 +602,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
601
602
|
if (output.statusCode >= 300) {
|
|
602
603
|
return de_CommandError(output, context);
|
|
603
604
|
}
|
|
604
|
-
const data = await
|
|
605
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
605
606
|
let contents = {};
|
|
606
607
|
contents = (0, import_smithy_client._json)(data);
|
|
607
608
|
const response = {
|
|
@@ -614,7 +615,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
614
615
|
if (output.statusCode >= 300) {
|
|
615
616
|
return de_CommandError(output, context);
|
|
616
617
|
}
|
|
617
|
-
const data = await
|
|
618
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
618
619
|
let contents = {};
|
|
619
620
|
contents = (0, import_smithy_client._json)(data);
|
|
620
621
|
const response = {
|
|
@@ -627,7 +628,7 @@ var de_UpdateTableCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
627
628
|
if (output.statusCode >= 300) {
|
|
628
629
|
return de_CommandError(output, context);
|
|
629
630
|
}
|
|
630
|
-
const data = await
|
|
631
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
631
632
|
let contents = {};
|
|
632
633
|
contents = (0, import_smithy_client._json)(data);
|
|
633
634
|
const response = {
|
|
@@ -639,9 +640,9 @@ var de_UpdateTableCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
639
640
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
640
641
|
const parsedOutput = {
|
|
641
642
|
...output,
|
|
642
|
-
body: await
|
|
643
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
643
644
|
};
|
|
644
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
645
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
645
646
|
switch (errorCode) {
|
|
646
647
|
case "AccessDeniedException":
|
|
647
648
|
case "com.amazonaws.keyspaces#AccessDeniedException":
|
|
@@ -909,7 +910,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
909
910
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
910
911
|
cfId: output.headers["x-amz-cf-id"]
|
|
911
912
|
}), "deserializeMetadata");
|
|
912
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
913
913
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(KeyspacesServiceException);
|
|
914
914
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
915
915
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -936,46 +936,6 @@ function sharedHeaders(operation) {
|
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
938
|
__name(sharedHeaders, "sharedHeaders");
|
|
939
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
940
|
-
if (encoded.length) {
|
|
941
|
-
return JSON.parse(encoded);
|
|
942
|
-
}
|
|
943
|
-
return {};
|
|
944
|
-
}), "parseBody");
|
|
945
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
946
|
-
const value = await parseBody(errorBody, context);
|
|
947
|
-
value.message = value.message ?? value.Message;
|
|
948
|
-
return value;
|
|
949
|
-
}, "parseErrorBody");
|
|
950
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
951
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
952
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
953
|
-
let cleanValue = rawValue;
|
|
954
|
-
if (typeof cleanValue === "number") {
|
|
955
|
-
cleanValue = cleanValue.toString();
|
|
956
|
-
}
|
|
957
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
958
|
-
cleanValue = cleanValue.split(",")[0];
|
|
959
|
-
}
|
|
960
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
961
|
-
cleanValue = cleanValue.split(":")[0];
|
|
962
|
-
}
|
|
963
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
964
|
-
cleanValue = cleanValue.split("#")[1];
|
|
965
|
-
}
|
|
966
|
-
return cleanValue;
|
|
967
|
-
}, "sanitizeErrorCode");
|
|
968
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
969
|
-
if (headerKey !== void 0) {
|
|
970
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
971
|
-
}
|
|
972
|
-
if (data.code !== void 0) {
|
|
973
|
-
return sanitizeErrorCode(data.code);
|
|
974
|
-
}
|
|
975
|
-
if (data["__type"] !== void 0) {
|
|
976
|
-
return sanitizeErrorCode(data["__type"]);
|
|
977
|
-
}
|
|
978
|
-
}, "loadRestJsonErrorCode");
|
|
979
939
|
|
|
980
940
|
// src/commands/CreateKeyspaceCommand.ts
|
|
981
941
|
var _CreateKeyspaceCommand = class _CreateKeyspaceCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -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, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { KeyspacesServiceException as __BaseException } from "../models/KeyspacesServiceException";
|
|
@@ -573,43 +574,3 @@ function sharedHeaders(operation) {
|
|
|
573
574
|
"x-amz-target": `KeyspacesService.${operation}`,
|
|
574
575
|
};
|
|
575
576
|
}
|
|
576
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
577
|
-
if (encoded.length) {
|
|
578
|
-
return JSON.parse(encoded);
|
|
579
|
-
}
|
|
580
|
-
return {};
|
|
581
|
-
});
|
|
582
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
583
|
-
const value = await parseBody(errorBody, context);
|
|
584
|
-
value.message = value.message ?? value.Message;
|
|
585
|
-
return value;
|
|
586
|
-
};
|
|
587
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
588
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
589
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
590
|
-
let cleanValue = rawValue;
|
|
591
|
-
if (typeof cleanValue === "number") {
|
|
592
|
-
cleanValue = cleanValue.toString();
|
|
593
|
-
}
|
|
594
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
595
|
-
cleanValue = cleanValue.split(",")[0];
|
|
596
|
-
}
|
|
597
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
598
|
-
cleanValue = cleanValue.split(":")[0];
|
|
599
|
-
}
|
|
600
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
601
|
-
cleanValue = cleanValue.split("#")[1];
|
|
602
|
-
}
|
|
603
|
-
return cleanValue;
|
|
604
|
-
};
|
|
605
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
606
|
-
if (headerKey !== undefined) {
|
|
607
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
608
|
-
}
|
|
609
|
-
if (data.code !== undefined) {
|
|
610
|
-
return sanitizeErrorCode(data.code);
|
|
611
|
-
}
|
|
612
|
-
if (data["__type"] !== undefined) {
|
|
613
|
-
return sanitizeErrorCode(data["__type"]);
|
|
614
|
-
}
|
|
615
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-keyspaces",
|
|
3
3
|
"description": "AWS SDK for JavaScript Keyspaces 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-keyspaces",
|
|
@@ -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-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|