@aws-sdk/client-polly 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.
- package/dist-cjs/index.js +9 -49
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +17 -17
- package/dist-cjs/Polly.js +0 -1
- package/dist-cjs/PollyClient.js +0 -1
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -1
- package/dist-cjs/commands/DeleteLexiconCommand.js +0 -1
- package/dist-cjs/commands/DescribeVoicesCommand.js +0 -1
- package/dist-cjs/commands/GetLexiconCommand.js +0 -1
- package/dist-cjs/commands/GetSpeechSynthesisTaskCommand.js +0 -1
- package/dist-cjs/commands/ListLexiconsCommand.js +0 -1
- package/dist-cjs/commands/ListSpeechSynthesisTasksCommand.js +0 -1
- package/dist-cjs/commands/PutLexiconCommand.js +0 -1
- package/dist-cjs/commands/StartSpeechSynthesisTaskCommand.js +0 -1
- package/dist-cjs/commands/SynthesizeSpeechCommand.js +0 -1
- package/dist-cjs/commands/index.js +0 -1
- package/dist-cjs/endpoint/EndpointParameters.js +0 -1
- package/dist-cjs/extensionConfiguration.js +0 -1
- package/dist-cjs/models/PollyServiceException.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListSpeechSynthesisTasksPaginator.js +0 -1
- package/dist-cjs/pagination/index.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeExtensions.js +0 -1
package/dist-cjs/index.js
CHANGED
|
@@ -224,6 +224,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
224
224
|
var import_types = require("@smithy/types");
|
|
225
225
|
|
|
226
226
|
// src/protocols/Aws_restJson1.ts
|
|
227
|
+
var import_core2 = require("@aws-sdk/core");
|
|
227
228
|
|
|
228
229
|
|
|
229
230
|
|
|
@@ -936,7 +937,7 @@ var de_DescribeVoicesCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
936
937
|
const contents = (0, import_smithy_client.map)({
|
|
937
938
|
$metadata: deserializeMetadata(output)
|
|
938
939
|
});
|
|
939
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
940
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
940
941
|
const doc = (0, import_smithy_client.take)(data, {
|
|
941
942
|
NextToken: import_smithy_client.expectString,
|
|
942
943
|
Voices: import_smithy_client._json
|
|
@@ -951,7 +952,7 @@ var de_GetLexiconCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
951
952
|
const contents = (0, import_smithy_client.map)({
|
|
952
953
|
$metadata: deserializeMetadata(output)
|
|
953
954
|
});
|
|
954
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
955
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
955
956
|
const doc = (0, import_smithy_client.take)(data, {
|
|
956
957
|
Lexicon: import_smithy_client._json,
|
|
957
958
|
LexiconAttributes: (_) => de_LexiconAttributes(_, context)
|
|
@@ -966,7 +967,7 @@ var de_GetSpeechSynthesisTaskCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
966
967
|
const contents = (0, import_smithy_client.map)({
|
|
967
968
|
$metadata: deserializeMetadata(output)
|
|
968
969
|
});
|
|
969
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
970
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
970
971
|
const doc = (0, import_smithy_client.take)(data, {
|
|
971
972
|
SynthesisTask: (_) => de_SynthesisTask(_, context)
|
|
972
973
|
});
|
|
@@ -980,7 +981,7 @@ var de_ListLexiconsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
980
981
|
const contents = (0, import_smithy_client.map)({
|
|
981
982
|
$metadata: deserializeMetadata(output)
|
|
982
983
|
});
|
|
983
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
984
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
984
985
|
const doc = (0, import_smithy_client.take)(data, {
|
|
985
986
|
Lexicons: (_) => de_LexiconDescriptionList(_, context),
|
|
986
987
|
NextToken: import_smithy_client.expectString
|
|
@@ -995,7 +996,7 @@ var de_ListSpeechSynthesisTasksCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
995
996
|
const contents = (0, import_smithy_client.map)({
|
|
996
997
|
$metadata: deserializeMetadata(output)
|
|
997
998
|
});
|
|
998
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
999
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
999
1000
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1000
1001
|
NextToken: import_smithy_client.expectString,
|
|
1001
1002
|
SynthesisTasks: (_) => de_SynthesisTasks(_, context)
|
|
@@ -1020,7 +1021,7 @@ var de_StartSpeechSynthesisTaskCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1020
1021
|
const contents = (0, import_smithy_client.map)({
|
|
1021
1022
|
$metadata: deserializeMetadata(output)
|
|
1022
1023
|
});
|
|
1023
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
1024
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1024
1025
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1025
1026
|
SynthesisTask: (_) => de_SynthesisTask(_, context)
|
|
1026
1027
|
});
|
|
@@ -1044,9 +1045,9 @@ var de_SynthesizeSpeechCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1044
1045
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1045
1046
|
const parsedOutput = {
|
|
1046
1047
|
...output,
|
|
1047
|
-
body: await
|
|
1048
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1048
1049
|
};
|
|
1049
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1050
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1050
1051
|
switch (errorCode) {
|
|
1051
1052
|
case "LexiconNotFoundException":
|
|
1052
1053
|
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
@@ -1447,7 +1448,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1447
1448
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1448
1449
|
cfId: output.headers["x-amz-cf-id"]
|
|
1449
1450
|
}), "deserializeMetadata");
|
|
1450
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1451
1451
|
var _CT = "ContentType";
|
|
1452
1452
|
var _E = "Engine";
|
|
1453
1453
|
var _IALC = "IncludeAdditionalLanguageCodes";
|
|
@@ -1458,46 +1458,6 @@ var _RC = "RequestCharacters";
|
|
|
1458
1458
|
var _S = "Status";
|
|
1459
1459
|
var _ct = "content-type";
|
|
1460
1460
|
var _xar = "x-amzn-requestcharacters";
|
|
1461
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1462
|
-
if (encoded.length) {
|
|
1463
|
-
return JSON.parse(encoded);
|
|
1464
|
-
}
|
|
1465
|
-
return {};
|
|
1466
|
-
}), "parseBody");
|
|
1467
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1468
|
-
const value = await parseBody(errorBody, context);
|
|
1469
|
-
value.message = value.message ?? value.Message;
|
|
1470
|
-
return value;
|
|
1471
|
-
}, "parseErrorBody");
|
|
1472
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1473
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1474
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1475
|
-
let cleanValue = rawValue;
|
|
1476
|
-
if (typeof cleanValue === "number") {
|
|
1477
|
-
cleanValue = cleanValue.toString();
|
|
1478
|
-
}
|
|
1479
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1480
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1481
|
-
}
|
|
1482
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1483
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1484
|
-
}
|
|
1485
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1486
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1487
|
-
}
|
|
1488
|
-
return cleanValue;
|
|
1489
|
-
}, "sanitizeErrorCode");
|
|
1490
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1491
|
-
if (headerKey !== void 0) {
|
|
1492
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1493
|
-
}
|
|
1494
|
-
if (data.code !== void 0) {
|
|
1495
|
-
return sanitizeErrorCode(data.code);
|
|
1496
|
-
}
|
|
1497
|
-
if (data["__type"] !== void 0) {
|
|
1498
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1499
|
-
}
|
|
1500
|
-
}, "loadRestJsonErrorCode");
|
|
1501
1461
|
|
|
1502
1462
|
// src/commands/DeleteLexiconCommand.ts
|
|
1503
1463
|
var _DeleteLexiconCommand = class _DeleteLexiconCommand 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, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { EngineNotSupportedException, InvalidLexiconException, InvalidNextTokenException, InvalidS3BucketException, InvalidS3KeyException, InvalidSampleRateException, InvalidSnsTopicArnException, InvalidSsmlException, InvalidTaskIdException, LanguageNotSupportedException, LexiconNotFoundException, LexiconSizeExceededException, MarksNotSupportedForFormatException, MaxLexemeLengthExceededException, MaxLexiconsNumberExceededException, ServiceFailureException, SsmlMarksNotSupportedForTextTypeException, SynthesisTaskNotFoundException, TextLengthExceededException, UnsupportedPlsAlphabetException, UnsupportedPlsLanguageException, } from "../models/models_0";
|
|
@@ -674,43 +675,3 @@ const _RC = "RequestCharacters";
|
|
|
674
675
|
const _S = "Status";
|
|
675
676
|
const _ct = "content-type";
|
|
676
677
|
const _xar = "x-amzn-requestcharacters";
|
|
677
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
678
|
-
if (encoded.length) {
|
|
679
|
-
return JSON.parse(encoded);
|
|
680
|
-
}
|
|
681
|
-
return {};
|
|
682
|
-
});
|
|
683
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
684
|
-
const value = await parseBody(errorBody, context);
|
|
685
|
-
value.message = value.message ?? value.Message;
|
|
686
|
-
return value;
|
|
687
|
-
};
|
|
688
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
689
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
690
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
691
|
-
let cleanValue = rawValue;
|
|
692
|
-
if (typeof cleanValue === "number") {
|
|
693
|
-
cleanValue = cleanValue.toString();
|
|
694
|
-
}
|
|
695
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
696
|
-
cleanValue = cleanValue.split(",")[0];
|
|
697
|
-
}
|
|
698
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
699
|
-
cleanValue = cleanValue.split(":")[0];
|
|
700
|
-
}
|
|
701
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
702
|
-
cleanValue = cleanValue.split("#")[1];
|
|
703
|
-
}
|
|
704
|
-
return cleanValue;
|
|
705
|
-
};
|
|
706
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
707
|
-
if (headerKey !== undefined) {
|
|
708
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
709
|
-
}
|
|
710
|
-
if (data.code !== undefined) {
|
|
711
|
-
return sanitizeErrorCode(data.code);
|
|
712
|
-
}
|
|
713
|
-
if (data["__type"] !== undefined) {
|
|
714
|
-
return sanitizeErrorCode(data["__type"]);
|
|
715
|
-
}
|
|
716
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-polly",
|
|
3
3
|
"description": "AWS SDK for JavaScript Polly 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-polly",
|
|
@@ -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.
|
|
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",
|
|
29
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
30
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
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.
|
|
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.
|
|
35
|
-
"@smithy/config-resolver": "^2.1.
|
|
36
|
-
"@smithy/core": "^1.3.
|
|
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.
|
|
42
|
-
"@smithy/middleware-retry": "^2.1.
|
|
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.
|
|
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.
|
|
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.
|
|
55
|
-
"@smithy/util-defaults-mode-node": "^2.2.
|
|
56
|
-
"@smithy/util-endpoints": "^1.1.
|
|
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-stream": "^2.1.3",
|
package/dist-cjs/Polly.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
package/dist-cjs/PollyClient.js
DELETED
|
@@ -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");
|
package/dist-cjs/models/index.js
DELETED
|
@@ -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");
|