@aws-sdk/client-sns 3.354.0 → 3.358.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.
@@ -473,7 +473,7 @@ const de_AddPermissionCommand = async (output, context) => {
473
473
  if (output.statusCode >= 300) {
474
474
  return de_AddPermissionCommandError(output, context);
475
475
  }
476
- await collectBody(output.body, context);
476
+ await (0, smithy_client_1.collectBody)(output.body, context);
477
477
  const response = {
478
478
  $metadata: deserializeMetadata(output),
479
479
  };
@@ -788,7 +788,7 @@ const de_DeleteEndpointCommand = async (output, context) => {
788
788
  if (output.statusCode >= 300) {
789
789
  return de_DeleteEndpointCommandError(output, context);
790
790
  }
791
- await collectBody(output.body, context);
791
+ await (0, smithy_client_1.collectBody)(output.body, context);
792
792
  const response = {
793
793
  $metadata: deserializeMetadata(output),
794
794
  };
@@ -824,7 +824,7 @@ const de_DeletePlatformApplicationCommand = async (output, context) => {
824
824
  if (output.statusCode >= 300) {
825
825
  return de_DeletePlatformApplicationCommandError(output, context);
826
826
  }
827
- await collectBody(output.body, context);
827
+ await (0, smithy_client_1.collectBody)(output.body, context);
828
828
  const response = {
829
829
  $metadata: deserializeMetadata(output),
830
830
  };
@@ -908,7 +908,7 @@ const de_DeleteTopicCommand = async (output, context) => {
908
908
  if (output.statusCode >= 300) {
909
909
  return de_DeleteTopicCommandError(output, context);
910
910
  }
911
- await collectBody(output.body, context);
911
+ await (0, smithy_client_1.collectBody)(output.body, context);
912
912
  const response = {
913
913
  $metadata: deserializeMetadata(output),
914
914
  };
@@ -1838,7 +1838,7 @@ const de_PutDataProtectionPolicyCommand = async (output, context) => {
1838
1838
  if (output.statusCode >= 300) {
1839
1839
  return de_PutDataProtectionPolicyCommandError(output, context);
1840
1840
  }
1841
- await collectBody(output.body, context);
1841
+ await (0, smithy_client_1.collectBody)(output.body, context);
1842
1842
  const response = {
1843
1843
  $metadata: deserializeMetadata(output),
1844
1844
  };
@@ -1880,7 +1880,7 @@ const de_RemovePermissionCommand = async (output, context) => {
1880
1880
  if (output.statusCode >= 300) {
1881
1881
  return de_RemovePermissionCommandError(output, context);
1882
1882
  }
1883
- await collectBody(output.body, context);
1883
+ await (0, smithy_client_1.collectBody)(output.body, context);
1884
1884
  const response = {
1885
1885
  $metadata: deserializeMetadata(output),
1886
1886
  };
@@ -1919,7 +1919,7 @@ const de_SetEndpointAttributesCommand = async (output, context) => {
1919
1919
  if (output.statusCode >= 300) {
1920
1920
  return de_SetEndpointAttributesCommandError(output, context);
1921
1921
  }
1922
- await collectBody(output.body, context);
1922
+ await (0, smithy_client_1.collectBody)(output.body, context);
1923
1923
  const response = {
1924
1924
  $metadata: deserializeMetadata(output),
1925
1925
  };
@@ -1958,7 +1958,7 @@ const de_SetPlatformApplicationAttributesCommand = async (output, context) => {
1958
1958
  if (output.statusCode >= 300) {
1959
1959
  return de_SetPlatformApplicationAttributesCommandError(output, context);
1960
1960
  }
1961
- await collectBody(output.body, context);
1961
+ await (0, smithy_client_1.collectBody)(output.body, context);
1962
1962
  const response = {
1963
1963
  $metadata: deserializeMetadata(output),
1964
1964
  };
@@ -2039,7 +2039,7 @@ const de_SetSubscriptionAttributesCommand = async (output, context) => {
2039
2039
  if (output.statusCode >= 300) {
2040
2040
  return de_SetSubscriptionAttributesCommandError(output, context);
2041
2041
  }
2042
- await collectBody(output.body, context);
2042
+ await (0, smithy_client_1.collectBody)(output.body, context);
2043
2043
  const response = {
2044
2044
  $metadata: deserializeMetadata(output),
2045
2045
  };
@@ -2081,7 +2081,7 @@ const de_SetTopicAttributesCommand = async (output, context) => {
2081
2081
  if (output.statusCode >= 300) {
2082
2082
  return de_SetTopicAttributesCommandError(output, context);
2083
2083
  }
2084
- await collectBody(output.body, context);
2084
+ await (0, smithy_client_1.collectBody)(output.body, context);
2085
2085
  const response = {
2086
2086
  $metadata: deserializeMetadata(output),
2087
2087
  };
@@ -2225,7 +2225,7 @@ const de_UnsubscribeCommand = async (output, context) => {
2225
2225
  if (output.statusCode >= 300) {
2226
2226
  return de_UnsubscribeCommandError(output, context);
2227
2227
  }
2228
- await collectBody(output.body, context);
2228
+ await (0, smithy_client_1.collectBody)(output.body, context);
2229
2229
  const response = {
2230
2230
  $metadata: deserializeMetadata(output),
2231
2231
  };
@@ -4066,13 +4066,7 @@ const deserializeMetadata = (output) => ({
4066
4066
  extendedRequestId: output.headers["x-amz-id-2"],
4067
4067
  cfId: output.headers["x-amz-cf-id"],
4068
4068
  });
4069
- const collectBody = (streamBody = new Uint8Array(), context) => {
4070
- if (streamBody instanceof Uint8Array) {
4071
- return Promise.resolve(streamBody);
4072
- }
4073
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
4074
- };
4075
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4069
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
4076
4070
  const throwDefaultError = (0, smithy_client_1.withBaseException)(SNSServiceException_1.SNSServiceException);
4077
4071
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
4078
4072
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -1,4 +1,4 @@
1
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, withBaseException, } from "@aws-sdk/smithy-client";
1
+ import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { XMLParser } from "fast-xml-parser";
4
4
  import { AuthorizationErrorException, BatchEntryIdsNotDistinctException, BatchRequestTooLongException, ConcurrentAccessException, EmptyBatchRequestException, EndpointDisabledException, FilterPolicyLimitExceededException, InternalErrorException, InvalidBatchEntryIdException, InvalidParameterException, InvalidParameterValueException, InvalidSecurityException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, KMSOptInRequired, KMSThrottlingException, NotFoundException, OptedOutException, PlatformApplicationDisabledException, ResourceNotFoundException, StaleTagException, SubscriptionLimitExceededException, TagLimitExceededException, TagPolicyException, ThrottledException, TooManyEntriesInBatchRequestException, TopicLimitExceededException, UserErrorException, ValidationException, VerificationException, } from "../models/models_0";
@@ -3978,12 +3978,6 @@ const deserializeMetadata = (output) => ({
3978
3978
  extendedRequestId: output.headers["x-amz-id-2"],
3979
3979
  cfId: output.headers["x-amz-cf-id"],
3980
3980
  });
3981
- const collectBody = (streamBody = new Uint8Array(), context) => {
3982
- if (streamBody instanceof Uint8Array) {
3983
- return Promise.resolve(streamBody);
3984
- }
3985
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3986
- };
3987
3981
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3988
3982
  const throwDefaultError = withBaseException(__BaseException);
3989
3983
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
@@ -115,7 +115,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
115
115
  */
116
116
  runtime?: string;
117
117
  /**
118
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
118
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
119
119
  * trait of an operation.
120
120
  */
121
121
  disableHostPrefix?: boolean;
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.354.0",
4
+ "version": "3.358.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,36 +21,36 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.354.0",
25
- "@aws-sdk/config-resolver": "3.354.0",
26
- "@aws-sdk/credential-provider-node": "3.354.0",
27
- "@aws-sdk/fetch-http-handler": "3.353.0",
28
- "@aws-sdk/hash-node": "3.347.0",
29
- "@aws-sdk/invalid-dependency": "3.347.0",
30
- "@aws-sdk/middleware-content-length": "3.347.0",
31
- "@aws-sdk/middleware-endpoint": "3.347.0",
32
- "@aws-sdk/middleware-host-header": "3.347.0",
33
- "@aws-sdk/middleware-logger": "3.347.0",
34
- "@aws-sdk/middleware-recursion-detection": "3.347.0",
35
- "@aws-sdk/middleware-retry": "3.354.0",
36
- "@aws-sdk/middleware-serde": "3.347.0",
37
- "@aws-sdk/middleware-signing": "3.354.0",
38
- "@aws-sdk/middleware-stack": "3.347.0",
39
- "@aws-sdk/middleware-user-agent": "3.352.0",
40
- "@aws-sdk/node-config-provider": "3.354.0",
41
- "@aws-sdk/node-http-handler": "3.350.0",
42
- "@aws-sdk/smithy-client": "3.347.0",
43
- "@aws-sdk/types": "3.347.0",
44
- "@aws-sdk/url-parser": "3.347.0",
24
+ "@aws-sdk/client-sts": "3.358.0",
25
+ "@aws-sdk/config-resolver": "3.357.0",
26
+ "@aws-sdk/credential-provider-node": "3.358.0",
27
+ "@aws-sdk/fetch-http-handler": "3.357.0",
28
+ "@aws-sdk/hash-node": "3.357.0",
29
+ "@aws-sdk/invalid-dependency": "3.357.0",
30
+ "@aws-sdk/middleware-content-length": "3.357.0",
31
+ "@aws-sdk/middleware-endpoint": "3.357.0",
32
+ "@aws-sdk/middleware-host-header": "3.357.0",
33
+ "@aws-sdk/middleware-logger": "3.357.0",
34
+ "@aws-sdk/middleware-recursion-detection": "3.357.0",
35
+ "@aws-sdk/middleware-retry": "3.357.0",
36
+ "@aws-sdk/middleware-serde": "3.357.0",
37
+ "@aws-sdk/middleware-signing": "3.357.0",
38
+ "@aws-sdk/middleware-stack": "3.357.0",
39
+ "@aws-sdk/middleware-user-agent": "3.357.0",
40
+ "@aws-sdk/node-config-provider": "3.357.0",
41
+ "@aws-sdk/node-http-handler": "3.357.0",
42
+ "@aws-sdk/smithy-client": "3.358.0",
43
+ "@aws-sdk/types": "3.357.0",
44
+ "@aws-sdk/url-parser": "3.357.0",
45
45
  "@aws-sdk/util-base64": "3.310.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.310.0",
47
47
  "@aws-sdk/util-body-length-node": "3.310.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.353.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.354.0",
50
- "@aws-sdk/util-endpoints": "3.352.0",
51
- "@aws-sdk/util-retry": "3.347.0",
52
- "@aws-sdk/util-user-agent-browser": "3.347.0",
53
- "@aws-sdk/util-user-agent-node": "3.354.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.358.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.358.0",
50
+ "@aws-sdk/util-endpoints": "3.357.0",
51
+ "@aws-sdk/util-retry": "3.357.0",
52
+ "@aws-sdk/util-user-agent-browser": "3.357.0",
53
+ "@aws-sdk/util-user-agent-node": "3.357.0",
54
54
  "@aws-sdk/util-utf8": "3.310.0",
55
55
  "@smithy/protocol-http": "^1.0.1",
56
56
  "@smithy/types": "^1.0.0",