@aws-sdk/client-simspaceweaver 3.523.0 → 3.529.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist-cjs/index.js +10 -50
  2. package/dist-es/protocols/Aws_restJson1.js +1 -40
  3. package/package.json +17 -17
  4. package/dist-cjs/SimSpaceWeaver.js +0 -1
  5. package/dist-cjs/SimSpaceWeaverClient.js +0 -1
  6. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -1
  7. package/dist-cjs/commands/CreateSnapshotCommand.js +0 -1
  8. package/dist-cjs/commands/DeleteAppCommand.js +0 -1
  9. package/dist-cjs/commands/DeleteSimulationCommand.js +0 -1
  10. package/dist-cjs/commands/DescribeAppCommand.js +0 -1
  11. package/dist-cjs/commands/DescribeSimulationCommand.js +0 -1
  12. package/dist-cjs/commands/ListAppsCommand.js +0 -1
  13. package/dist-cjs/commands/ListSimulationsCommand.js +0 -1
  14. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
  15. package/dist-cjs/commands/StartAppCommand.js +0 -1
  16. package/dist-cjs/commands/StartClockCommand.js +0 -1
  17. package/dist-cjs/commands/StartSimulationCommand.js +0 -1
  18. package/dist-cjs/commands/StopAppCommand.js +0 -1
  19. package/dist-cjs/commands/StopClockCommand.js +0 -1
  20. package/dist-cjs/commands/StopSimulationCommand.js +0 -1
  21. package/dist-cjs/commands/TagResourceCommand.js +0 -1
  22. package/dist-cjs/commands/UntagResourceCommand.js +0 -1
  23. package/dist-cjs/commands/index.js +0 -1
  24. package/dist-cjs/endpoint/EndpointParameters.js +0 -1
  25. package/dist-cjs/extensionConfiguration.js +0 -1
  26. package/dist-cjs/models/SimSpaceWeaverServiceException.js +0 -1
  27. package/dist-cjs/models/index.js +0 -1
  28. package/dist-cjs/models/models_0.js +0 -1
  29. package/dist-cjs/pagination/Interfaces.js +0 -1
  30. package/dist-cjs/pagination/ListAppsPaginator.js +0 -1
  31. package/dist-cjs/pagination/ListSimulationsPaginator.js +0 -1
  32. package/dist-cjs/pagination/index.js +0 -1
  33. package/dist-cjs/protocols/Aws_restJson1.js +0 -1
  34. package/dist-cjs/runtimeExtensions.js +0 -1
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 parseBody(output.body, context)), "body");
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 parseBody(output.body, context)), "body");
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 parseBody(output.body, context)), "body");
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 parseBody(output.body, context)), "body");
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 parseBody(output.body, context)), "body");
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 parseBody(output.body, context)), "body");
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 parseBody(output.body, context)), "body");
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 parseErrorBody(output.body, context)
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.523.0",
4
+ "version": "3.529.0",
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,40 +20,40 @@
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.523.0",
24
- "@aws-sdk/core": "3.523.0",
25
- "@aws-sdk/credential-provider-node": "3.523.0",
23
+ "@aws-sdk/client-sts": "3.529.0",
24
+ "@aws-sdk/core": "3.529.0",
25
+ "@aws-sdk/credential-provider-node": "3.529.0",
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",
29
- "@aws-sdk/middleware-user-agent": "3.523.0",
30
- "@aws-sdk/region-config-resolver": "3.523.0",
29
+ "@aws-sdk/middleware-user-agent": "3.525.0",
30
+ "@aws-sdk/region-config-resolver": "3.525.0",
31
31
  "@aws-sdk/types": "3.523.0",
32
- "@aws-sdk/util-endpoints": "3.523.0",
32
+ "@aws-sdk/util-endpoints": "3.525.0",
33
33
  "@aws-sdk/util-user-agent-browser": "3.523.0",
34
- "@aws-sdk/util-user-agent-node": "3.523.0",
35
- "@smithy/config-resolver": "^2.1.3",
36
- "@smithy/core": "^1.3.4",
34
+ "@aws-sdk/util-user-agent-node": "3.525.0",
35
+ "@smithy/config-resolver": "^2.1.4",
36
+ "@smithy/core": "^1.3.5",
37
37
  "@smithy/fetch-http-handler": "^2.4.3",
38
38
  "@smithy/hash-node": "^2.1.3",
39
39
  "@smithy/invalid-dependency": "^2.1.3",
40
40
  "@smithy/middleware-content-length": "^2.1.3",
41
- "@smithy/middleware-endpoint": "^2.4.3",
42
- "@smithy/middleware-retry": "^2.1.3",
41
+ "@smithy/middleware-endpoint": "^2.4.4",
42
+ "@smithy/middleware-retry": "^2.1.4",
43
43
  "@smithy/middleware-serde": "^2.1.3",
44
44
  "@smithy/middleware-stack": "^2.1.3",
45
- "@smithy/node-config-provider": "^2.2.3",
45
+ "@smithy/node-config-provider": "^2.2.4",
46
46
  "@smithy/node-http-handler": "^2.4.1",
47
47
  "@smithy/protocol-http": "^3.2.1",
48
- "@smithy/smithy-client": "^2.4.1",
48
+ "@smithy/smithy-client": "^2.4.2",
49
49
  "@smithy/types": "^2.10.1",
50
50
  "@smithy/url-parser": "^2.1.3",
51
51
  "@smithy/util-base64": "^2.1.1",
52
52
  "@smithy/util-body-length-browser": "^2.1.1",
53
53
  "@smithy/util-body-length-node": "^2.2.1",
54
- "@smithy/util-defaults-mode-browser": "^2.1.3",
55
- "@smithy/util-defaults-mode-node": "^2.2.2",
56
- "@smithy/util-endpoints": "^1.1.3",
54
+ "@smithy/util-defaults-mode-browser": "^2.1.4",
55
+ "@smithy/util-defaults-mode-node": "^2.2.3",
56
+ "@smithy/util-endpoints": "^1.1.4",
57
57
  "@smithy/util-middleware": "^2.1.3",
58
58
  "@smithy/util-retry": "^2.1.3",
59
59
  "@smithy/util-utf8": "^2.1.1",
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");