@aws-sdk/client-simspaceweaver 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 +10 -50
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -215,6 +215,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
215
215
|
var import_types = require("@smithy/types");
|
|
216
216
|
|
|
217
217
|
// src/protocols/Aws_restJson1.ts
|
|
218
|
+
var import_core2 = require("@aws-sdk/core");
|
|
218
219
|
|
|
219
220
|
|
|
220
221
|
var import_uuid = require("uuid");
|
|
@@ -692,7 +693,7 @@ var de_DescribeAppCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
692
693
|
const contents = (0, import_smithy_client.map)({
|
|
693
694
|
$metadata: deserializeMetadata(output)
|
|
694
695
|
});
|
|
695
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
696
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
696
697
|
const doc = (0, import_smithy_client.take)(data, {
|
|
697
698
|
Description: import_smithy_client.expectString,
|
|
698
699
|
Domain: import_smithy_client.expectString,
|
|
@@ -713,7 +714,7 @@ var de_DescribeSimulationCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
713
714
|
const contents = (0, import_smithy_client.map)({
|
|
714
715
|
$metadata: deserializeMetadata(output)
|
|
715
716
|
});
|
|
716
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
717
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
717
718
|
const doc = (0, import_smithy_client.take)(data, {
|
|
718
719
|
Arn: import_smithy_client.expectString,
|
|
719
720
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -741,7 +742,7 @@ var de_ListAppsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
741
742
|
const contents = (0, import_smithy_client.map)({
|
|
742
743
|
$metadata: deserializeMetadata(output)
|
|
743
744
|
});
|
|
744
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
745
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
745
746
|
const doc = (0, import_smithy_client.take)(data, {
|
|
746
747
|
Apps: import_smithy_client._json,
|
|
747
748
|
NextToken: import_smithy_client.expectString
|
|
@@ -756,7 +757,7 @@ var de_ListSimulationsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
756
757
|
const contents = (0, import_smithy_client.map)({
|
|
757
758
|
$metadata: deserializeMetadata(output)
|
|
758
759
|
});
|
|
759
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
760
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
760
761
|
const doc = (0, import_smithy_client.take)(data, {
|
|
761
762
|
NextToken: import_smithy_client.expectString,
|
|
762
763
|
Simulations: (_) => de_SimulationList(_, context)
|
|
@@ -771,7 +772,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
771
772
|
const contents = (0, import_smithy_client.map)({
|
|
772
773
|
$metadata: deserializeMetadata(output)
|
|
773
774
|
});
|
|
774
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
775
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
775
776
|
const doc = (0, import_smithy_client.take)(data, {
|
|
776
777
|
Tags: import_smithy_client._json
|
|
777
778
|
});
|
|
@@ -785,7 +786,7 @@ var de_StartAppCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
785
786
|
const contents = (0, import_smithy_client.map)({
|
|
786
787
|
$metadata: deserializeMetadata(output)
|
|
787
788
|
});
|
|
788
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
789
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
789
790
|
const doc = (0, import_smithy_client.take)(data, {
|
|
790
791
|
Domain: import_smithy_client.expectString,
|
|
791
792
|
Name: import_smithy_client.expectString,
|
|
@@ -811,7 +812,7 @@ var de_StartSimulationCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
811
812
|
const contents = (0, import_smithy_client.map)({
|
|
812
813
|
$metadata: deserializeMetadata(output)
|
|
813
814
|
});
|
|
814
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
815
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
815
816
|
const doc = (0, import_smithy_client.take)(data, {
|
|
816
817
|
Arn: import_smithy_client.expectString,
|
|
817
818
|
CreationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
|
|
@@ -873,9 +874,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
873
874
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
874
875
|
const parsedOutput = {
|
|
875
876
|
...output,
|
|
876
|
-
body: await
|
|
877
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
877
878
|
};
|
|
878
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
879
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
879
880
|
switch (errorCode) {
|
|
880
881
|
case "AccessDeniedException":
|
|
881
882
|
case "com.amazonaws.simspaceweaver#AccessDeniedException":
|
|
@@ -1020,7 +1021,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1020
1021
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1021
1022
|
cfId: output.headers["x-amz-cf-id"]
|
|
1022
1023
|
}), "deserializeMetadata");
|
|
1023
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1024
1024
|
var _A = "App";
|
|
1025
1025
|
var _D = "Domain";
|
|
1026
1026
|
var _MR = "MaxResults";
|
|
@@ -1033,46 +1033,6 @@ var _mR = "maxResults";
|
|
|
1033
1033
|
var _nT = "nextToken";
|
|
1034
1034
|
var _s = "simulation";
|
|
1035
1035
|
var _tK = "tagKeys";
|
|
1036
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1037
|
-
if (encoded.length) {
|
|
1038
|
-
return JSON.parse(encoded);
|
|
1039
|
-
}
|
|
1040
|
-
return {};
|
|
1041
|
-
}), "parseBody");
|
|
1042
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1043
|
-
const value = await parseBody(errorBody, context);
|
|
1044
|
-
value.message = value.message ?? value.Message;
|
|
1045
|
-
return value;
|
|
1046
|
-
}, "parseErrorBody");
|
|
1047
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1048
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1049
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1050
|
-
let cleanValue = rawValue;
|
|
1051
|
-
if (typeof cleanValue === "number") {
|
|
1052
|
-
cleanValue = cleanValue.toString();
|
|
1053
|
-
}
|
|
1054
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1055
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1056
|
-
}
|
|
1057
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1058
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1059
|
-
}
|
|
1060
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1061
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1062
|
-
}
|
|
1063
|
-
return cleanValue;
|
|
1064
|
-
}, "sanitizeErrorCode");
|
|
1065
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1066
|
-
if (headerKey !== void 0) {
|
|
1067
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1068
|
-
}
|
|
1069
|
-
if (data.code !== void 0) {
|
|
1070
|
-
return sanitizeErrorCode(data.code);
|
|
1071
|
-
}
|
|
1072
|
-
if (data["__type"] !== void 0) {
|
|
1073
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1074
|
-
}
|
|
1075
|
-
}, "loadRestJsonErrorCode");
|
|
1076
1036
|
|
|
1077
1037
|
// src/commands/CreateSnapshotCommand.ts
|
|
1078
1038
|
var _CreateSnapshotCommand = class _CreateSnapshotCommand 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 { requestBuilder as rb } from "@smithy/core";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -606,43 +607,3 @@ const _mR = "maxResults";
|
|
|
606
607
|
const _nT = "nextToken";
|
|
607
608
|
const _s = "simulation";
|
|
608
609
|
const _tK = "tagKeys";
|
|
609
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
610
|
-
if (encoded.length) {
|
|
611
|
-
return JSON.parse(encoded);
|
|
612
|
-
}
|
|
613
|
-
return {};
|
|
614
|
-
});
|
|
615
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
616
|
-
const value = await parseBody(errorBody, context);
|
|
617
|
-
value.message = value.message ?? value.Message;
|
|
618
|
-
return value;
|
|
619
|
-
};
|
|
620
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
621
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
622
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
623
|
-
let cleanValue = rawValue;
|
|
624
|
-
if (typeof cleanValue === "number") {
|
|
625
|
-
cleanValue = cleanValue.toString();
|
|
626
|
-
}
|
|
627
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
628
|
-
cleanValue = cleanValue.split(",")[0];
|
|
629
|
-
}
|
|
630
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
631
|
-
cleanValue = cleanValue.split(":")[0];
|
|
632
|
-
}
|
|
633
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
634
|
-
cleanValue = cleanValue.split("#")[1];
|
|
635
|
-
}
|
|
636
|
-
return cleanValue;
|
|
637
|
-
};
|
|
638
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
639
|
-
if (headerKey !== undefined) {
|
|
640
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
641
|
-
}
|
|
642
|
-
if (data.code !== undefined) {
|
|
643
|
-
return sanitizeErrorCode(data.code);
|
|
644
|
-
}
|
|
645
|
-
if (data["__type"] !== undefined) {
|
|
646
|
-
return sanitizeErrorCode(data["__type"]);
|
|
647
|
-
}
|
|
648
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-simspaceweaver",
|
|
3
3
|
"description": "AWS SDK for JavaScript Simspaceweaver 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-simspaceweaver",
|
|
@@ -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",
|