@aws-sdk/client-codestar-notifications 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 (32) hide show
  1. package/dist-cjs/index.js +13 -53
  2. package/dist-es/protocols/Aws_restJson1.js +1 -40
  3. package/package.json +17 -17
  4. package/dist-cjs/CodestarNotifications.js +0 -1
  5. package/dist-cjs/CodestarNotificationsClient.js +0 -1
  6. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -1
  7. package/dist-cjs/commands/CreateNotificationRuleCommand.js +0 -1
  8. package/dist-cjs/commands/DeleteNotificationRuleCommand.js +0 -1
  9. package/dist-cjs/commands/DeleteTargetCommand.js +0 -1
  10. package/dist-cjs/commands/DescribeNotificationRuleCommand.js +0 -1
  11. package/dist-cjs/commands/ListEventTypesCommand.js +0 -1
  12. package/dist-cjs/commands/ListNotificationRulesCommand.js +0 -1
  13. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
  14. package/dist-cjs/commands/ListTargetsCommand.js +0 -1
  15. package/dist-cjs/commands/SubscribeCommand.js +0 -1
  16. package/dist-cjs/commands/TagResourceCommand.js +0 -1
  17. package/dist-cjs/commands/UnsubscribeCommand.js +0 -1
  18. package/dist-cjs/commands/UntagResourceCommand.js +0 -1
  19. package/dist-cjs/commands/UpdateNotificationRuleCommand.js +0 -1
  20. package/dist-cjs/commands/index.js +0 -1
  21. package/dist-cjs/endpoint/EndpointParameters.js +0 -1
  22. package/dist-cjs/extensionConfiguration.js +0 -1
  23. package/dist-cjs/models/CodestarNotificationsServiceException.js +0 -1
  24. package/dist-cjs/models/index.js +0 -1
  25. package/dist-cjs/models/models_0.js +0 -1
  26. package/dist-cjs/pagination/Interfaces.js +0 -1
  27. package/dist-cjs/pagination/ListEventTypesPaginator.js +0 -1
  28. package/dist-cjs/pagination/ListNotificationRulesPaginator.js +0 -1
  29. package/dist-cjs/pagination/ListTargetsPaginator.js +0 -1
  30. package/dist-cjs/pagination/index.js +0 -1
  31. package/dist-cjs/protocols/Aws_restJson1.js +0 -1
  32. package/dist-cjs/runtimeExtensions.js +0 -1
package/dist-cjs/index.js CHANGED
@@ -452,6 +452,7 @@ var UpdateNotificationRuleRequestFilterSensitiveLog = /* @__PURE__ */ __name((ob
452
452
  }), "UpdateNotificationRuleRequestFilterSensitiveLog");
453
453
 
454
454
  // src/protocols/Aws_restJson1.ts
455
+ var import_core2 = require("@aws-sdk/core");
455
456
 
456
457
 
457
458
  var import_uuid = require("uuid");
@@ -680,7 +681,7 @@ var de_CreateNotificationRuleCommand = /* @__PURE__ */ __name(async (output, con
680
681
  const contents = (0, import_smithy_client.map)({
681
682
  $metadata: deserializeMetadata(output)
682
683
  });
683
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
684
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
684
685
  const doc = (0, import_smithy_client.take)(data, {
685
686
  Arn: import_smithy_client.expectString
686
687
  });
@@ -694,7 +695,7 @@ var de_DeleteNotificationRuleCommand = /* @__PURE__ */ __name(async (output, con
694
695
  const contents = (0, import_smithy_client.map)({
695
696
  $metadata: deserializeMetadata(output)
696
697
  });
697
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
698
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
698
699
  const doc = (0, import_smithy_client.take)(data, {
699
700
  Arn: import_smithy_client.expectString
700
701
  });
@@ -718,7 +719,7 @@ var de_DescribeNotificationRuleCommand = /* @__PURE__ */ __name(async (output, c
718
719
  const contents = (0, import_smithy_client.map)({
719
720
  $metadata: deserializeMetadata(output)
720
721
  });
721
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
722
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
722
723
  const doc = (0, import_smithy_client.take)(data, {
723
724
  Arn: import_smithy_client.expectString,
724
725
  CreatedBy: import_smithy_client.expectString,
@@ -742,7 +743,7 @@ var de_ListEventTypesCommand = /* @__PURE__ */ __name(async (output, context) =>
742
743
  const contents = (0, import_smithy_client.map)({
743
744
  $metadata: deserializeMetadata(output)
744
745
  });
745
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
746
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
746
747
  const doc = (0, import_smithy_client.take)(data, {
747
748
  EventTypes: import_smithy_client._json,
748
749
  NextToken: import_smithy_client.expectString
@@ -757,7 +758,7 @@ var de_ListNotificationRulesCommand = /* @__PURE__ */ __name(async (output, cont
757
758
  const contents = (0, import_smithy_client.map)({
758
759
  $metadata: deserializeMetadata(output)
759
760
  });
760
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
761
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
761
762
  const doc = (0, import_smithy_client.take)(data, {
762
763
  NextToken: import_smithy_client.expectString,
763
764
  NotificationRules: import_smithy_client._json
@@ -772,7 +773,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
772
773
  const contents = (0, import_smithy_client.map)({
773
774
  $metadata: deserializeMetadata(output)
774
775
  });
775
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
776
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
776
777
  const doc = (0, import_smithy_client.take)(data, {
777
778
  Tags: import_smithy_client._json
778
779
  });
@@ -786,7 +787,7 @@ var de_ListTargetsCommand = /* @__PURE__ */ __name(async (output, context) => {
786
787
  const contents = (0, import_smithy_client.map)({
787
788
  $metadata: deserializeMetadata(output)
788
789
  });
789
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
790
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
790
791
  const doc = (0, import_smithy_client.take)(data, {
791
792
  NextToken: import_smithy_client.expectString,
792
793
  Targets: import_smithy_client._json
@@ -801,7 +802,7 @@ var de_SubscribeCommand = /* @__PURE__ */ __name(async (output, context) => {
801
802
  const contents = (0, import_smithy_client.map)({
802
803
  $metadata: deserializeMetadata(output)
803
804
  });
804
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
805
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
805
806
  const doc = (0, import_smithy_client.take)(data, {
806
807
  Arn: import_smithy_client.expectString
807
808
  });
@@ -815,7 +816,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
815
816
  const contents = (0, import_smithy_client.map)({
816
817
  $metadata: deserializeMetadata(output)
817
818
  });
818
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
819
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
819
820
  const doc = (0, import_smithy_client.take)(data, {
820
821
  Tags: import_smithy_client._json
821
822
  });
@@ -829,7 +830,7 @@ var de_UnsubscribeCommand = /* @__PURE__ */ __name(async (output, context) => {
829
830
  const contents = (0, import_smithy_client.map)({
830
831
  $metadata: deserializeMetadata(output)
831
832
  });
832
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
833
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
833
834
  const doc = (0, import_smithy_client.take)(data, {
834
835
  Arn: import_smithy_client.expectString
835
836
  });
@@ -859,9 +860,9 @@ var de_UpdateNotificationRuleCommand = /* @__PURE__ */ __name(async (output, con
859
860
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
860
861
  const parsedOutput = {
861
862
  ...output,
862
- body: await parseErrorBody(output.body, context)
863
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
863
864
  };
864
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
865
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
865
866
  switch (errorCode) {
866
867
  case "AccessDeniedException":
867
868
  case "com.amazonaws.codestarnotifications#AccessDeniedException":
@@ -1007,49 +1008,8 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1007
1008
  extendedRequestId: output.headers["x-amz-id-2"],
1008
1009
  cfId: output.headers["x-amz-cf-id"]
1009
1010
  }), "deserializeMetadata");
1010
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1011
1011
  var _TK = "TagKeys";
1012
1012
  var _tK = "tagKeys";
1013
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1014
- if (encoded.length) {
1015
- return JSON.parse(encoded);
1016
- }
1017
- return {};
1018
- }), "parseBody");
1019
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1020
- const value = await parseBody(errorBody, context);
1021
- value.message = value.message ?? value.Message;
1022
- return value;
1023
- }, "parseErrorBody");
1024
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1025
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1026
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1027
- let cleanValue = rawValue;
1028
- if (typeof cleanValue === "number") {
1029
- cleanValue = cleanValue.toString();
1030
- }
1031
- if (cleanValue.indexOf(",") >= 0) {
1032
- cleanValue = cleanValue.split(",")[0];
1033
- }
1034
- if (cleanValue.indexOf(":") >= 0) {
1035
- cleanValue = cleanValue.split(":")[0];
1036
- }
1037
- if (cleanValue.indexOf("#") >= 0) {
1038
- cleanValue = cleanValue.split("#")[1];
1039
- }
1040
- return cleanValue;
1041
- }, "sanitizeErrorCode");
1042
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1043
- if (headerKey !== void 0) {
1044
- return sanitizeErrorCode(output.headers[headerKey]);
1045
- }
1046
- if (data.code !== void 0) {
1047
- return sanitizeErrorCode(data.code);
1048
- }
1049
- if (data["__type"] !== void 0) {
1050
- return sanitizeErrorCode(data["__type"]);
1051
- }
1052
- }, "loadRestJsonErrorCode");
1053
1013
 
1054
1014
  // src/commands/CreateNotificationRuleCommand.ts
1055
1015
  var _CreateNotificationRuleCommand = class _CreateNotificationRuleCommand 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";
@@ -539,43 +540,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
539
540
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
540
541
  const _TK = "TagKeys";
541
542
  const _tK = "tagKeys";
542
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
543
- if (encoded.length) {
544
- return JSON.parse(encoded);
545
- }
546
- return {};
547
- });
548
- const parseErrorBody = async (errorBody, context) => {
549
- const value = await parseBody(errorBody, context);
550
- value.message = value.message ?? value.Message;
551
- return value;
552
- };
553
- const loadRestJsonErrorCode = (output, data) => {
554
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
555
- const sanitizeErrorCode = (rawValue) => {
556
- let cleanValue = rawValue;
557
- if (typeof cleanValue === "number") {
558
- cleanValue = cleanValue.toString();
559
- }
560
- if (cleanValue.indexOf(",") >= 0) {
561
- cleanValue = cleanValue.split(",")[0];
562
- }
563
- if (cleanValue.indexOf(":") >= 0) {
564
- cleanValue = cleanValue.split(":")[0];
565
- }
566
- if (cleanValue.indexOf("#") >= 0) {
567
- cleanValue = cleanValue.split("#")[1];
568
- }
569
- return cleanValue;
570
- };
571
- const headerKey = findKey(output.headers, "x-amzn-errortype");
572
- if (headerKey !== undefined) {
573
- return sanitizeErrorCode(output.headers[headerKey]);
574
- }
575
- if (data.code !== undefined) {
576
- return sanitizeErrorCode(data.code);
577
- }
578
- if (data["__type"] !== undefined) {
579
- return sanitizeErrorCode(data["__type"]);
580
- }
581
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-codestar-notifications",
3
3
  "description": "AWS SDK for JavaScript Codestar Notifications 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-codestar-notifications",
@@ -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");