@aws-sdk/client-support-app 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 (28) hide show
  1. package/dist-cjs/index.js +8 -48
  2. package/dist-es/protocols/Aws_restJson1.js +1 -40
  3. package/package.json +17 -17
  4. package/dist-cjs/SupportApp.js +0 -1
  5. package/dist-cjs/SupportAppClient.js +0 -1
  6. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -1
  7. package/dist-cjs/commands/CreateSlackChannelConfigurationCommand.js +0 -1
  8. package/dist-cjs/commands/DeleteAccountAliasCommand.js +0 -1
  9. package/dist-cjs/commands/DeleteSlackChannelConfigurationCommand.js +0 -1
  10. package/dist-cjs/commands/DeleteSlackWorkspaceConfigurationCommand.js +0 -1
  11. package/dist-cjs/commands/GetAccountAliasCommand.js +0 -1
  12. package/dist-cjs/commands/ListSlackChannelConfigurationsCommand.js +0 -1
  13. package/dist-cjs/commands/ListSlackWorkspaceConfigurationsCommand.js +0 -1
  14. package/dist-cjs/commands/PutAccountAliasCommand.js +0 -1
  15. package/dist-cjs/commands/RegisterSlackWorkspaceForOrganizationCommand.js +0 -1
  16. package/dist-cjs/commands/UpdateSlackChannelConfigurationCommand.js +0 -1
  17. package/dist-cjs/commands/index.js +0 -1
  18. package/dist-cjs/endpoint/EndpointParameters.js +0 -1
  19. package/dist-cjs/extensionConfiguration.js +0 -1
  20. package/dist-cjs/models/SupportAppServiceException.js +0 -1
  21. package/dist-cjs/models/index.js +0 -1
  22. package/dist-cjs/models/models_0.js +0 -1
  23. package/dist-cjs/pagination/Interfaces.js +0 -1
  24. package/dist-cjs/pagination/ListSlackChannelConfigurationsPaginator.js +0 -1
  25. package/dist-cjs/pagination/ListSlackWorkspaceConfigurationsPaginator.js +0 -1
  26. package/dist-cjs/pagination/index.js +0 -1
  27. package/dist-cjs/protocols/Aws_restJson1.js +0 -1
  28. package/dist-cjs/runtimeExtensions.js +0 -1
package/dist-cjs/index.js CHANGED
@@ -201,6 +201,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
201
201
  var import_types = require("@smithy/types");
202
202
 
203
203
  // src/protocols/Aws_restJson1.ts
204
+ var import_core2 = require("@aws-sdk/core");
204
205
 
205
206
 
206
207
 
@@ -536,7 +537,7 @@ var de_GetAccountAliasCommand = /* @__PURE__ */ __name(async (output, context) =
536
537
  const contents = (0, import_smithy_client.map)({
537
538
  $metadata: deserializeMetadata(output)
538
539
  });
539
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
540
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
540
541
  const doc = (0, import_smithy_client.take)(data, {
541
542
  accountAlias: import_smithy_client.expectString
542
543
  });
@@ -550,7 +551,7 @@ var de_ListSlackChannelConfigurationsCommand = /* @__PURE__ */ __name(async (out
550
551
  const contents = (0, import_smithy_client.map)({
551
552
  $metadata: deserializeMetadata(output)
552
553
  });
553
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
554
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
554
555
  const doc = (0, import_smithy_client.take)(data, {
555
556
  nextToken: import_smithy_client.expectString,
556
557
  slackChannelConfigurations: import_smithy_client._json
@@ -565,7 +566,7 @@ var de_ListSlackWorkspaceConfigurationsCommand = /* @__PURE__ */ __name(async (o
565
566
  const contents = (0, import_smithy_client.map)({
566
567
  $metadata: deserializeMetadata(output)
567
568
  });
568
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
569
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
569
570
  const doc = (0, import_smithy_client.take)(data, {
570
571
  nextToken: import_smithy_client.expectString,
571
572
  slackWorkspaceConfigurations: import_smithy_client._json
@@ -590,7 +591,7 @@ var de_RegisterSlackWorkspaceForOrganizationCommand = /* @__PURE__ */ __name(asy
590
591
  const contents = (0, import_smithy_client.map)({
591
592
  $metadata: deserializeMetadata(output)
592
593
  });
593
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
594
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
594
595
  const doc = (0, import_smithy_client.take)(data, {
595
596
  accountType: import_smithy_client.expectString,
596
597
  teamId: import_smithy_client.expectString,
@@ -606,7 +607,7 @@ var de_UpdateSlackChannelConfigurationCommand = /* @__PURE__ */ __name(async (ou
606
607
  const contents = (0, import_smithy_client.map)({
607
608
  $metadata: deserializeMetadata(output)
608
609
  });
609
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
610
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
610
611
  const doc = (0, import_smithy_client.take)(data, {
611
612
  channelId: import_smithy_client.expectString,
612
613
  channelName: import_smithy_client.expectString,
@@ -623,9 +624,9 @@ var de_UpdateSlackChannelConfigurationCommand = /* @__PURE__ */ __name(async (ou
623
624
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
624
625
  const parsedOutput = {
625
626
  ...output,
626
- body: await parseErrorBody(output.body, context)
627
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
627
628
  };
628
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
629
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
629
630
  switch (errorCode) {
630
631
  case "AccessDeniedException":
631
632
  case "com.amazonaws.supportapp#AccessDeniedException":
@@ -739,47 +740,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
739
740
  extendedRequestId: output.headers["x-amz-id-2"],
740
741
  cfId: output.headers["x-amz-cf-id"]
741
742
  }), "deserializeMetadata");
742
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
743
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
744
- if (encoded.length) {
745
- return JSON.parse(encoded);
746
- }
747
- return {};
748
- }), "parseBody");
749
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
750
- const value = await parseBody(errorBody, context);
751
- value.message = value.message ?? value.Message;
752
- return value;
753
- }, "parseErrorBody");
754
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
755
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
756
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
757
- let cleanValue = rawValue;
758
- if (typeof cleanValue === "number") {
759
- cleanValue = cleanValue.toString();
760
- }
761
- if (cleanValue.indexOf(",") >= 0) {
762
- cleanValue = cleanValue.split(",")[0];
763
- }
764
- if (cleanValue.indexOf(":") >= 0) {
765
- cleanValue = cleanValue.split(":")[0];
766
- }
767
- if (cleanValue.indexOf("#") >= 0) {
768
- cleanValue = cleanValue.split("#")[1];
769
- }
770
- return cleanValue;
771
- }, "sanitizeErrorCode");
772
- const headerKey = findKey(output.headers, "x-amzn-errortype");
773
- if (headerKey !== void 0) {
774
- return sanitizeErrorCode(output.headers[headerKey]);
775
- }
776
- if (data.code !== void 0) {
777
- return sanitizeErrorCode(data.code);
778
- }
779
- if (data["__type"] !== void 0) {
780
- return sanitizeErrorCode(data["__type"]);
781
- }
782
- }, "loadRestJsonErrorCode");
783
743
 
784
744
  // src/commands/CreateSlackChannelConfigurationCommand.ts
785
745
  var _CreateSlackChannelConfigurationCommand = class _CreateSlackChannelConfigurationCommand 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, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
@@ -399,43 +400,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
399
400
  value !== "" &&
400
401
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
401
402
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
402
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
403
- if (encoded.length) {
404
- return JSON.parse(encoded);
405
- }
406
- return {};
407
- });
408
- const parseErrorBody = async (errorBody, context) => {
409
- const value = await parseBody(errorBody, context);
410
- value.message = value.message ?? value.Message;
411
- return value;
412
- };
413
- const loadRestJsonErrorCode = (output, data) => {
414
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
415
- const sanitizeErrorCode = (rawValue) => {
416
- let cleanValue = rawValue;
417
- if (typeof cleanValue === "number") {
418
- cleanValue = cleanValue.toString();
419
- }
420
- if (cleanValue.indexOf(",") >= 0) {
421
- cleanValue = cleanValue.split(",")[0];
422
- }
423
- if (cleanValue.indexOf(":") >= 0) {
424
- cleanValue = cleanValue.split(":")[0];
425
- }
426
- if (cleanValue.indexOf("#") >= 0) {
427
- cleanValue = cleanValue.split("#")[1];
428
- }
429
- return cleanValue;
430
- };
431
- const headerKey = findKey(output.headers, "x-amzn-errortype");
432
- if (headerKey !== undefined) {
433
- return sanitizeErrorCode(output.headers[headerKey]);
434
- }
435
- if (data.code !== undefined) {
436
- return sanitizeErrorCode(data.code);
437
- }
438
- if (data["__type"] !== undefined) {
439
- return sanitizeErrorCode(data["__type"]);
440
- }
441
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-support-app",
3
3
  "description": "AWS SDK for JavaScript Support App 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-support-app",
@@ -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");