@aws-sdk/client-translate 3.353.0 → 3.357.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.
@@ -239,7 +239,7 @@ const de_DeleteTerminologyCommand = async (output, context) => {
239
239
  if (output.statusCode >= 300) {
240
240
  return de_DeleteTerminologyCommandError(output, context);
241
241
  }
242
- await collectBody(output.body, context);
242
+ await (0, smithy_client_1.collectBody)(output.body, context);
243
243
  const response = {
244
244
  $metadata: deserializeMetadata(output),
245
245
  };
@@ -1347,13 +1347,7 @@ const deserializeMetadata = (output) => ({
1347
1347
  extendedRequestId: output.headers["x-amz-id-2"],
1348
1348
  cfId: output.headers["x-amz-cf-id"],
1349
1349
  });
1350
- const collectBody = (streamBody = new Uint8Array(), context) => {
1351
- if (streamBody instanceof Uint8Array) {
1352
- return Promise.resolve(streamBody);
1353
- }
1354
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1355
- };
1356
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1350
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1357
1351
  const throwDefaultError = (0, smithy_client_1.withBaseException)(TranslateServiceException_1.TranslateServiceException);
1358
1352
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1359
1353
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -1,4 +1,4 @@
1
- import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
1
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ConcurrentModificationException, ConflictException, DetectedLanguageLowConfidenceException, InternalServerException, InvalidFilterException, InvalidParameterValueException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, ServiceUnavailableException, TextSizeLimitExceededException, TooManyRequestsException, TooManyTagsException, UnsupportedDisplayLanguageCodeException, UnsupportedLanguagePairException, } from "../models/models_0";
@@ -1306,12 +1306,6 @@ const deserializeMetadata = (output) => ({
1306
1306
  extendedRequestId: output.headers["x-amz-id-2"],
1307
1307
  cfId: output.headers["x-amz-cf-id"],
1308
1308
  });
1309
- const collectBody = (streamBody = new Uint8Array(), context) => {
1310
- if (streamBody instanceof Uint8Array) {
1311
- return Promise.resolve(streamBody);
1312
- }
1313
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1314
- };
1315
1309
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1316
1310
  const throwDefaultError = withBaseException(__BaseException);
1317
1311
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
@@ -92,7 +92,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
92
92
  */
93
93
  runtime?: string;
94
94
  /**
95
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
95
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
96
96
  * trait of an operation.
97
97
  */
98
98
  disableHostPrefix?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-translate",
3
3
  "description": "AWS SDK for JavaScript Translate Client for Node.js, Browser and React Native",
4
- "version": "3.353.0",
4
+ "version": "3.357.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.353.0",
25
- "@aws-sdk/config-resolver": "3.353.0",
26
- "@aws-sdk/credential-provider-node": "3.353.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.353.0",
36
- "@aws-sdk/middleware-serde": "3.347.0",
37
- "@aws-sdk/middleware-signing": "3.353.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.353.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.357.0",
25
+ "@aws-sdk/config-resolver": "3.357.0",
26
+ "@aws-sdk/credential-provider-node": "3.357.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.357.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.353.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.353.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.357.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.357.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",