@aws-sdk/client-sns 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 +33 -66
- package/dist-es/protocols/Aws_query.js +2 -34
- package/package.json +4 -5
package/dist-cjs/index.js
CHANGED
|
@@ -280,9 +280,9 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
280
280
|
var import_types = require("@smithy/types");
|
|
281
281
|
|
|
282
282
|
// src/protocols/Aws_query.ts
|
|
283
|
+
var import_core2 = require("@aws-sdk/core");
|
|
283
284
|
|
|
284
285
|
|
|
285
|
-
var import_fast_xml_parser = require("fast-xml-parser");
|
|
286
286
|
|
|
287
287
|
// src/models/models_0.ts
|
|
288
288
|
|
|
@@ -1396,7 +1396,7 @@ var de_CheckIfPhoneNumberIsOptedOutCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
1396
1396
|
if (output.statusCode >= 300) {
|
|
1397
1397
|
return de_CommandError(output, context);
|
|
1398
1398
|
}
|
|
1399
|
-
const data = await
|
|
1399
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1400
1400
|
let contents = {};
|
|
1401
1401
|
contents = de_CheckIfPhoneNumberIsOptedOutResponse(data.CheckIfPhoneNumberIsOptedOutResult, context);
|
|
1402
1402
|
const response = {
|
|
@@ -1409,7 +1409,7 @@ var de_ConfirmSubscriptionCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1409
1409
|
if (output.statusCode >= 300) {
|
|
1410
1410
|
return de_CommandError(output, context);
|
|
1411
1411
|
}
|
|
1412
|
-
const data = await
|
|
1412
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1413
1413
|
let contents = {};
|
|
1414
1414
|
contents = de_ConfirmSubscriptionResponse(data.ConfirmSubscriptionResult, context);
|
|
1415
1415
|
const response = {
|
|
@@ -1422,7 +1422,7 @@ var de_CreatePlatformApplicationCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1422
1422
|
if (output.statusCode >= 300) {
|
|
1423
1423
|
return de_CommandError(output, context);
|
|
1424
1424
|
}
|
|
1425
|
-
const data = await
|
|
1425
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1426
1426
|
let contents = {};
|
|
1427
1427
|
contents = de_CreatePlatformApplicationResponse(data.CreatePlatformApplicationResult, context);
|
|
1428
1428
|
const response = {
|
|
@@ -1435,7 +1435,7 @@ var de_CreatePlatformEndpointCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1435
1435
|
if (output.statusCode >= 300) {
|
|
1436
1436
|
return de_CommandError(output, context);
|
|
1437
1437
|
}
|
|
1438
|
-
const data = await
|
|
1438
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1439
1439
|
let contents = {};
|
|
1440
1440
|
contents = de_CreateEndpointResponse(data.CreatePlatformEndpointResult, context);
|
|
1441
1441
|
const response = {
|
|
@@ -1448,7 +1448,7 @@ var de_CreateSMSSandboxPhoneNumberCommand = /* @__PURE__ */ __name(async (output
|
|
|
1448
1448
|
if (output.statusCode >= 300) {
|
|
1449
1449
|
return de_CommandError(output, context);
|
|
1450
1450
|
}
|
|
1451
|
-
const data = await
|
|
1451
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1452
1452
|
let contents = {};
|
|
1453
1453
|
contents = de_CreateSMSSandboxPhoneNumberResult(data.CreateSMSSandboxPhoneNumberResult, context);
|
|
1454
1454
|
const response = {
|
|
@@ -1461,7 +1461,7 @@ var de_CreateTopicCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1461
1461
|
if (output.statusCode >= 300) {
|
|
1462
1462
|
return de_CommandError(output, context);
|
|
1463
1463
|
}
|
|
1464
|
-
const data = await
|
|
1464
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1465
1465
|
let contents = {};
|
|
1466
1466
|
contents = de_CreateTopicResponse(data.CreateTopicResult, context);
|
|
1467
1467
|
const response = {
|
|
@@ -1494,7 +1494,7 @@ var de_DeleteSMSSandboxPhoneNumberCommand = /* @__PURE__ */ __name(async (output
|
|
|
1494
1494
|
if (output.statusCode >= 300) {
|
|
1495
1495
|
return de_CommandError(output, context);
|
|
1496
1496
|
}
|
|
1497
|
-
const data = await
|
|
1497
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1498
1498
|
let contents = {};
|
|
1499
1499
|
contents = de_DeleteSMSSandboxPhoneNumberResult(data.DeleteSMSSandboxPhoneNumberResult, context);
|
|
1500
1500
|
const response = {
|
|
@@ -1517,7 +1517,7 @@ var de_GetDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
1517
1517
|
if (output.statusCode >= 300) {
|
|
1518
1518
|
return de_CommandError(output, context);
|
|
1519
1519
|
}
|
|
1520
|
-
const data = await
|
|
1520
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1521
1521
|
let contents = {};
|
|
1522
1522
|
contents = de_GetDataProtectionPolicyResponse(data.GetDataProtectionPolicyResult, context);
|
|
1523
1523
|
const response = {
|
|
@@ -1530,7 +1530,7 @@ var de_GetEndpointAttributesCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
1530
1530
|
if (output.statusCode >= 300) {
|
|
1531
1531
|
return de_CommandError(output, context);
|
|
1532
1532
|
}
|
|
1533
|
-
const data = await
|
|
1533
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1534
1534
|
let contents = {};
|
|
1535
1535
|
contents = de_GetEndpointAttributesResponse(data.GetEndpointAttributesResult, context);
|
|
1536
1536
|
const response = {
|
|
@@ -1543,7 +1543,7 @@ var de_GetPlatformApplicationAttributesCommand = /* @__PURE__ */ __name(async (o
|
|
|
1543
1543
|
if (output.statusCode >= 300) {
|
|
1544
1544
|
return de_CommandError(output, context);
|
|
1545
1545
|
}
|
|
1546
|
-
const data = await
|
|
1546
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1547
1547
|
let contents = {};
|
|
1548
1548
|
contents = de_GetPlatformApplicationAttributesResponse(data.GetPlatformApplicationAttributesResult, context);
|
|
1549
1549
|
const response = {
|
|
@@ -1556,7 +1556,7 @@ var de_GetSMSAttributesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1556
1556
|
if (output.statusCode >= 300) {
|
|
1557
1557
|
return de_CommandError(output, context);
|
|
1558
1558
|
}
|
|
1559
|
-
const data = await
|
|
1559
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1560
1560
|
let contents = {};
|
|
1561
1561
|
contents = de_GetSMSAttributesResponse(data.GetSMSAttributesResult, context);
|
|
1562
1562
|
const response = {
|
|
@@ -1569,7 +1569,7 @@ var de_GetSMSSandboxAccountStatusCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1569
1569
|
if (output.statusCode >= 300) {
|
|
1570
1570
|
return de_CommandError(output, context);
|
|
1571
1571
|
}
|
|
1572
|
-
const data = await
|
|
1572
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1573
1573
|
let contents = {};
|
|
1574
1574
|
contents = de_GetSMSSandboxAccountStatusResult(data.GetSMSSandboxAccountStatusResult, context);
|
|
1575
1575
|
const response = {
|
|
@@ -1582,7 +1582,7 @@ var de_GetSubscriptionAttributesCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1582
1582
|
if (output.statusCode >= 300) {
|
|
1583
1583
|
return de_CommandError(output, context);
|
|
1584
1584
|
}
|
|
1585
|
-
const data = await
|
|
1585
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1586
1586
|
let contents = {};
|
|
1587
1587
|
contents = de_GetSubscriptionAttributesResponse(data.GetSubscriptionAttributesResult, context);
|
|
1588
1588
|
const response = {
|
|
@@ -1595,7 +1595,7 @@ var de_GetTopicAttributesCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1595
1595
|
if (output.statusCode >= 300) {
|
|
1596
1596
|
return de_CommandError(output, context);
|
|
1597
1597
|
}
|
|
1598
|
-
const data = await
|
|
1598
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1599
1599
|
let contents = {};
|
|
1600
1600
|
contents = de_GetTopicAttributesResponse(data.GetTopicAttributesResult, context);
|
|
1601
1601
|
const response = {
|
|
@@ -1608,7 +1608,7 @@ var de_ListEndpointsByPlatformApplicationCommand = /* @__PURE__ */ __name(async
|
|
|
1608
1608
|
if (output.statusCode >= 300) {
|
|
1609
1609
|
return de_CommandError(output, context);
|
|
1610
1610
|
}
|
|
1611
|
-
const data = await
|
|
1611
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1612
1612
|
let contents = {};
|
|
1613
1613
|
contents = de_ListEndpointsByPlatformApplicationResponse(data.ListEndpointsByPlatformApplicationResult, context);
|
|
1614
1614
|
const response = {
|
|
@@ -1621,7 +1621,7 @@ var de_ListOriginationNumbersCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1621
1621
|
if (output.statusCode >= 300) {
|
|
1622
1622
|
return de_CommandError(output, context);
|
|
1623
1623
|
}
|
|
1624
|
-
const data = await
|
|
1624
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1625
1625
|
let contents = {};
|
|
1626
1626
|
contents = de_ListOriginationNumbersResult(data.ListOriginationNumbersResult, context);
|
|
1627
1627
|
const response = {
|
|
@@ -1634,7 +1634,7 @@ var de_ListPhoneNumbersOptedOutCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1634
1634
|
if (output.statusCode >= 300) {
|
|
1635
1635
|
return de_CommandError(output, context);
|
|
1636
1636
|
}
|
|
1637
|
-
const data = await
|
|
1637
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1638
1638
|
let contents = {};
|
|
1639
1639
|
contents = de_ListPhoneNumbersOptedOutResponse(data.ListPhoneNumbersOptedOutResult, context);
|
|
1640
1640
|
const response = {
|
|
@@ -1647,7 +1647,7 @@ var de_ListPlatformApplicationsCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1647
1647
|
if (output.statusCode >= 300) {
|
|
1648
1648
|
return de_CommandError(output, context);
|
|
1649
1649
|
}
|
|
1650
|
-
const data = await
|
|
1650
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1651
1651
|
let contents = {};
|
|
1652
1652
|
contents = de_ListPlatformApplicationsResponse(data.ListPlatformApplicationsResult, context);
|
|
1653
1653
|
const response = {
|
|
@@ -1660,7 +1660,7 @@ var de_ListSMSSandboxPhoneNumbersCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1660
1660
|
if (output.statusCode >= 300) {
|
|
1661
1661
|
return de_CommandError(output, context);
|
|
1662
1662
|
}
|
|
1663
|
-
const data = await
|
|
1663
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1664
1664
|
let contents = {};
|
|
1665
1665
|
contents = de_ListSMSSandboxPhoneNumbersResult(data.ListSMSSandboxPhoneNumbersResult, context);
|
|
1666
1666
|
const response = {
|
|
@@ -1673,7 +1673,7 @@ var de_ListSubscriptionsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1673
1673
|
if (output.statusCode >= 300) {
|
|
1674
1674
|
return de_CommandError(output, context);
|
|
1675
1675
|
}
|
|
1676
|
-
const data = await
|
|
1676
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1677
1677
|
let contents = {};
|
|
1678
1678
|
contents = de_ListSubscriptionsResponse(data.ListSubscriptionsResult, context);
|
|
1679
1679
|
const response = {
|
|
@@ -1686,7 +1686,7 @@ var de_ListSubscriptionsByTopicCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1686
1686
|
if (output.statusCode >= 300) {
|
|
1687
1687
|
return de_CommandError(output, context);
|
|
1688
1688
|
}
|
|
1689
|
-
const data = await
|
|
1689
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1690
1690
|
let contents = {};
|
|
1691
1691
|
contents = de_ListSubscriptionsByTopicResponse(data.ListSubscriptionsByTopicResult, context);
|
|
1692
1692
|
const response = {
|
|
@@ -1699,7 +1699,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1699
1699
|
if (output.statusCode >= 300) {
|
|
1700
1700
|
return de_CommandError(output, context);
|
|
1701
1701
|
}
|
|
1702
|
-
const data = await
|
|
1702
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1703
1703
|
let contents = {};
|
|
1704
1704
|
contents = de_ListTagsForResourceResponse(data.ListTagsForResourceResult, context);
|
|
1705
1705
|
const response = {
|
|
@@ -1712,7 +1712,7 @@ var de_ListTopicsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1712
1712
|
if (output.statusCode >= 300) {
|
|
1713
1713
|
return de_CommandError(output, context);
|
|
1714
1714
|
}
|
|
1715
|
-
const data = await
|
|
1715
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1716
1716
|
let contents = {};
|
|
1717
1717
|
contents = de_ListTopicsResponse(data.ListTopicsResult, context);
|
|
1718
1718
|
const response = {
|
|
@@ -1725,7 +1725,7 @@ var de_OptInPhoneNumberCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1725
1725
|
if (output.statusCode >= 300) {
|
|
1726
1726
|
return de_CommandError(output, context);
|
|
1727
1727
|
}
|
|
1728
|
-
const data = await
|
|
1728
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1729
1729
|
let contents = {};
|
|
1730
1730
|
contents = de_OptInPhoneNumberResponse(data.OptInPhoneNumberResult, context);
|
|
1731
1731
|
const response = {
|
|
@@ -1738,7 +1738,7 @@ var de_PublishCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1738
1738
|
if (output.statusCode >= 300) {
|
|
1739
1739
|
return de_CommandError(output, context);
|
|
1740
1740
|
}
|
|
1741
|
-
const data = await
|
|
1741
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1742
1742
|
let contents = {};
|
|
1743
1743
|
contents = de_PublishResponse(data.PublishResult, context);
|
|
1744
1744
|
const response = {
|
|
@@ -1751,7 +1751,7 @@ var de_PublishBatchCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1751
1751
|
if (output.statusCode >= 300) {
|
|
1752
1752
|
return de_CommandError(output, context);
|
|
1753
1753
|
}
|
|
1754
|
-
const data = await
|
|
1754
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1755
1755
|
let contents = {};
|
|
1756
1756
|
contents = de_PublishBatchResponse(data.PublishBatchResult, context);
|
|
1757
1757
|
const response = {
|
|
@@ -1804,7 +1804,7 @@ var de_SetSMSAttributesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1804
1804
|
if (output.statusCode >= 300) {
|
|
1805
1805
|
return de_CommandError(output, context);
|
|
1806
1806
|
}
|
|
1807
|
-
const data = await
|
|
1807
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1808
1808
|
let contents = {};
|
|
1809
1809
|
contents = de_SetSMSAttributesResponse(data.SetSMSAttributesResult, context);
|
|
1810
1810
|
const response = {
|
|
@@ -1837,7 +1837,7 @@ var de_SubscribeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1837
1837
|
if (output.statusCode >= 300) {
|
|
1838
1838
|
return de_CommandError(output, context);
|
|
1839
1839
|
}
|
|
1840
|
-
const data = await
|
|
1840
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1841
1841
|
let contents = {};
|
|
1842
1842
|
contents = de_SubscribeResponse(data.SubscribeResult, context);
|
|
1843
1843
|
const response = {
|
|
@@ -1850,7 +1850,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1850
1850
|
if (output.statusCode >= 300) {
|
|
1851
1851
|
return de_CommandError(output, context);
|
|
1852
1852
|
}
|
|
1853
|
-
const data = await
|
|
1853
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1854
1854
|
let contents = {};
|
|
1855
1855
|
contents = de_TagResourceResponse(data.TagResourceResult, context);
|
|
1856
1856
|
const response = {
|
|
@@ -1873,7 +1873,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1873
1873
|
if (output.statusCode >= 300) {
|
|
1874
1874
|
return de_CommandError(output, context);
|
|
1875
1875
|
}
|
|
1876
|
-
const data = await
|
|
1876
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1877
1877
|
let contents = {};
|
|
1878
1878
|
contents = de_UntagResourceResponse(data.UntagResourceResult, context);
|
|
1879
1879
|
const response = {
|
|
@@ -1886,7 +1886,7 @@ var de_VerifySMSSandboxPhoneNumberCommand = /* @__PURE__ */ __name(async (output
|
|
|
1886
1886
|
if (output.statusCode >= 300) {
|
|
1887
1887
|
return de_CommandError(output, context);
|
|
1888
1888
|
}
|
|
1889
|
-
const data = await
|
|
1889
|
+
const data = await (0, import_core2.parseXmlBody)(output.body, context);
|
|
1890
1890
|
let contents = {};
|
|
1891
1891
|
contents = de_VerifySMSSandboxPhoneNumberResult(data.VerifySMSSandboxPhoneNumberResult, context);
|
|
1892
1892
|
const response = {
|
|
@@ -1898,7 +1898,7 @@ var de_VerifySMSSandboxPhoneNumberCommand = /* @__PURE__ */ __name(async (output
|
|
|
1898
1898
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1899
1899
|
const parsedOutput = {
|
|
1900
1900
|
...output,
|
|
1901
|
-
body: await
|
|
1901
|
+
body: await (0, import_core2.parseXmlErrorBody)(output.body, context)
|
|
1902
1902
|
};
|
|
1903
1903
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1904
1904
|
switch (errorCode) {
|
|
@@ -3706,7 +3706,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
3706
3706
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3707
3707
|
cfId: output.headers["x-amz-cf-id"]
|
|
3708
3708
|
}), "deserializeMetadata");
|
|
3709
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
3710
3709
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(SNSServiceException);
|
|
3711
3710
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
3712
3711
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -3841,38 +3840,6 @@ var _me = "member";
|
|
|
3841
3840
|
var _nT = "nextToken";
|
|
3842
3841
|
var _pN = "phoneNumber";
|
|
3843
3842
|
var _pNh = "phoneNumbers";
|
|
3844
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
3845
|
-
if (encoded.length) {
|
|
3846
|
-
const parser = new import_fast_xml_parser.XMLParser({
|
|
3847
|
-
attributeNamePrefix: "",
|
|
3848
|
-
htmlEntities: true,
|
|
3849
|
-
ignoreAttributes: false,
|
|
3850
|
-
ignoreDeclaration: true,
|
|
3851
|
-
parseTagValue: false,
|
|
3852
|
-
trimValues: false,
|
|
3853
|
-
tagValueProcessor: (_2, val) => val.trim() === "" && val.includes("\n") ? "" : void 0
|
|
3854
|
-
});
|
|
3855
|
-
parser.addEntity("#xD", "\r");
|
|
3856
|
-
parser.addEntity("#10", "\n");
|
|
3857
|
-
const parsedObj = parser.parse(encoded);
|
|
3858
|
-
const textNodeName = "#text";
|
|
3859
|
-
const key = Object.keys(parsedObj)[0];
|
|
3860
|
-
const parsedObjToReturn = parsedObj[key];
|
|
3861
|
-
if (parsedObjToReturn[textNodeName]) {
|
|
3862
|
-
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
3863
|
-
delete parsedObjToReturn[textNodeName];
|
|
3864
|
-
}
|
|
3865
|
-
return (0, import_smithy_client.getValueFromTextNode)(parsedObjToReturn);
|
|
3866
|
-
}
|
|
3867
|
-
return {};
|
|
3868
|
-
}), "parseBody");
|
|
3869
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
3870
|
-
const value = await parseBody(errorBody, context);
|
|
3871
|
-
if (value.Error) {
|
|
3872
|
-
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
3873
|
-
}
|
|
3874
|
-
return value;
|
|
3875
|
-
}, "parseErrorBody");
|
|
3876
3843
|
var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString");
|
|
3877
3844
|
var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
3878
3845
|
var _a2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
|
-
import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem,
|
|
3
|
-
import { XMLParser } from "fast-xml-parser";
|
|
3
|
+
import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { AuthorizationErrorException, BatchEntryIdsNotDistinctException, BatchRequestTooLongException, ConcurrentAccessException, EmptyBatchRequestException, EndpointDisabledException, FilterPolicyLimitExceededException, InternalErrorException, InvalidBatchEntryIdException, InvalidParameterException, InvalidParameterValueException, InvalidSecurityException, InvalidStateException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, KMSOptInRequired, KMSThrottlingException, NotFoundException, OptedOutException, PlatformApplicationDisabledException, ReplayLimitExceededException, ResourceNotFoundException, StaleTagException, SubscriptionLimitExceededException, TagLimitExceededException, TagPolicyException, ThrottledException, TooManyEntriesInBatchRequestException, TopicLimitExceededException, UserErrorException, ValidationException, VerificationException, } from "../models/models_0";
|
|
5
5
|
import { SNSServiceException as __BaseException } from "../models/SNSServiceException";
|
|
6
6
|
export const se_AddPermissionCommand = async (input, context) => {
|
|
@@ -2925,38 +2925,6 @@ const _me = "member";
|
|
|
2925
2925
|
const _nT = "nextToken";
|
|
2926
2926
|
const _pN = "phoneNumber";
|
|
2927
2927
|
const _pNh = "phoneNumbers";
|
|
2928
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2929
|
-
if (encoded.length) {
|
|
2930
|
-
const parser = new XMLParser({
|
|
2931
|
-
attributeNamePrefix: "",
|
|
2932
|
-
htmlEntities: true,
|
|
2933
|
-
ignoreAttributes: false,
|
|
2934
|
-
ignoreDeclaration: true,
|
|
2935
|
-
parseTagValue: false,
|
|
2936
|
-
trimValues: false,
|
|
2937
|
-
tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined),
|
|
2938
|
-
});
|
|
2939
|
-
parser.addEntity("#xD", "\r");
|
|
2940
|
-
parser.addEntity("#10", "\n");
|
|
2941
|
-
const parsedObj = parser.parse(encoded);
|
|
2942
|
-
const textNodeName = "#text";
|
|
2943
|
-
const key = Object.keys(parsedObj)[0];
|
|
2944
|
-
const parsedObjToReturn = parsedObj[key];
|
|
2945
|
-
if (parsedObjToReturn[textNodeName]) {
|
|
2946
|
-
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
2947
|
-
delete parsedObjToReturn[textNodeName];
|
|
2948
|
-
}
|
|
2949
|
-
return __getValueFromTextNode(parsedObjToReturn);
|
|
2950
|
-
}
|
|
2951
|
-
return {};
|
|
2952
|
-
});
|
|
2953
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2954
|
-
const value = await parseBody(errorBody, context);
|
|
2955
|
-
if (value.Error) {
|
|
2956
|
-
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
2957
|
-
}
|
|
2958
|
-
return value;
|
|
2959
|
-
};
|
|
2960
2928
|
const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries)
|
|
2961
2929
|
.map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value))
|
|
2962
2930
|
.join("&");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sns",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sns 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-sns",
|
|
@@ -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",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"@smithy/util-middleware": "^2.1.3",
|
|
58
58
|
"@smithy/util-retry": "^2.1.3",
|
|
59
59
|
"@smithy/util-utf8": "^2.1.1",
|
|
60
|
-
"fast-xml-parser": "4.2.5",
|
|
61
60
|
"tslib": "^2.5.0"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|