@aws-sdk/client-codestar-notifications 3.525.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.
- package/dist-cjs/index.js +13 -53
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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,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.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",
|