@aws-sdk/client-polly 3.1075.0 → 3.1077.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.
@@ -1,299 +0,0 @@
1
- const { PollyServiceException: __BaseException } = require("./PollyServiceException");
2
- exports.LexiconNotFoundException = class LexiconNotFoundException extends __BaseException {
3
- name = "LexiconNotFoundException";
4
- $fault = "client";
5
- constructor(opts) {
6
- super({
7
- name: "LexiconNotFoundException",
8
- $fault: "client",
9
- ...opts,
10
- });
11
- Object.setPrototypeOf(this, LexiconNotFoundException.prototype);
12
- }
13
- };
14
- exports.ServiceFailureException = class ServiceFailureException extends __BaseException {
15
- name = "ServiceFailureException";
16
- $fault = "server";
17
- constructor(opts) {
18
- super({
19
- name: "ServiceFailureException",
20
- $fault: "server",
21
- ...opts,
22
- });
23
- Object.setPrototypeOf(this, ServiceFailureException.prototype);
24
- }
25
- };
26
- exports.InvalidNextTokenException = class InvalidNextTokenException extends __BaseException {
27
- name = "InvalidNextTokenException";
28
- $fault = "client";
29
- constructor(opts) {
30
- super({
31
- name: "InvalidNextTokenException",
32
- $fault: "client",
33
- ...opts,
34
- });
35
- Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
36
- }
37
- };
38
- exports.EngineNotSupportedException = class EngineNotSupportedException extends __BaseException {
39
- name = "EngineNotSupportedException";
40
- $fault = "client";
41
- constructor(opts) {
42
- super({
43
- name: "EngineNotSupportedException",
44
- $fault: "client",
45
- ...opts,
46
- });
47
- Object.setPrototypeOf(this, EngineNotSupportedException.prototype);
48
- }
49
- };
50
- exports.InvalidTaskIdException = class InvalidTaskIdException extends __BaseException {
51
- name = "InvalidTaskIdException";
52
- $fault = "client";
53
- constructor(opts) {
54
- super({
55
- name: "InvalidTaskIdException",
56
- $fault: "client",
57
- ...opts,
58
- });
59
- Object.setPrototypeOf(this, InvalidTaskIdException.prototype);
60
- }
61
- };
62
- exports.SynthesisTaskNotFoundException = class SynthesisTaskNotFoundException extends __BaseException {
63
- name = "SynthesisTaskNotFoundException";
64
- $fault = "client";
65
- constructor(opts) {
66
- super({
67
- name: "SynthesisTaskNotFoundException",
68
- $fault: "client",
69
- ...opts,
70
- });
71
- Object.setPrototypeOf(this, SynthesisTaskNotFoundException.prototype);
72
- }
73
- };
74
- exports.InvalidLexiconException = class InvalidLexiconException extends __BaseException {
75
- name = "InvalidLexiconException";
76
- $fault = "client";
77
- constructor(opts) {
78
- super({
79
- name: "InvalidLexiconException",
80
- $fault: "client",
81
- ...opts,
82
- });
83
- Object.setPrototypeOf(this, InvalidLexiconException.prototype);
84
- }
85
- };
86
- exports.InvalidS3BucketException = class InvalidS3BucketException extends __BaseException {
87
- name = "InvalidS3BucketException";
88
- $fault = "client";
89
- constructor(opts) {
90
- super({
91
- name: "InvalidS3BucketException",
92
- $fault: "client",
93
- ...opts,
94
- });
95
- Object.setPrototypeOf(this, InvalidS3BucketException.prototype);
96
- }
97
- };
98
- exports.InvalidS3KeyException = class InvalidS3KeyException extends __BaseException {
99
- name = "InvalidS3KeyException";
100
- $fault = "client";
101
- constructor(opts) {
102
- super({
103
- name: "InvalidS3KeyException",
104
- $fault: "client",
105
- ...opts,
106
- });
107
- Object.setPrototypeOf(this, InvalidS3KeyException.prototype);
108
- }
109
- };
110
- exports.InvalidSampleRateException = class InvalidSampleRateException extends __BaseException {
111
- name = "InvalidSampleRateException";
112
- $fault = "client";
113
- constructor(opts) {
114
- super({
115
- name: "InvalidSampleRateException",
116
- $fault: "client",
117
- ...opts,
118
- });
119
- Object.setPrototypeOf(this, InvalidSampleRateException.prototype);
120
- }
121
- };
122
- exports.InvalidSnsTopicArnException = class InvalidSnsTopicArnException extends __BaseException {
123
- name = "InvalidSnsTopicArnException";
124
- $fault = "client";
125
- constructor(opts) {
126
- super({
127
- name: "InvalidSnsTopicArnException",
128
- $fault: "client",
129
- ...opts,
130
- });
131
- Object.setPrototypeOf(this, InvalidSnsTopicArnException.prototype);
132
- }
133
- };
134
- exports.InvalidSsmlException = class InvalidSsmlException extends __BaseException {
135
- name = "InvalidSsmlException";
136
- $fault = "client";
137
- constructor(opts) {
138
- super({
139
- name: "InvalidSsmlException",
140
- $fault: "client",
141
- ...opts,
142
- });
143
- Object.setPrototypeOf(this, InvalidSsmlException.prototype);
144
- }
145
- };
146
- exports.LanguageNotSupportedException = class LanguageNotSupportedException extends __BaseException {
147
- name = "LanguageNotSupportedException";
148
- $fault = "client";
149
- constructor(opts) {
150
- super({
151
- name: "LanguageNotSupportedException",
152
- $fault: "client",
153
- ...opts,
154
- });
155
- Object.setPrototypeOf(this, LanguageNotSupportedException.prototype);
156
- }
157
- };
158
- exports.LexiconSizeExceededException = class LexiconSizeExceededException extends __BaseException {
159
- name = "LexiconSizeExceededException";
160
- $fault = "client";
161
- constructor(opts) {
162
- super({
163
- name: "LexiconSizeExceededException",
164
- $fault: "client",
165
- ...opts,
166
- });
167
- Object.setPrototypeOf(this, LexiconSizeExceededException.prototype);
168
- }
169
- };
170
- exports.MarksNotSupportedForFormatException = class MarksNotSupportedForFormatException extends __BaseException {
171
- name = "MarksNotSupportedForFormatException";
172
- $fault = "client";
173
- constructor(opts) {
174
- super({
175
- name: "MarksNotSupportedForFormatException",
176
- $fault: "client",
177
- ...opts,
178
- });
179
- Object.setPrototypeOf(this, MarksNotSupportedForFormatException.prototype);
180
- }
181
- };
182
- exports.MaxLexemeLengthExceededException = class MaxLexemeLengthExceededException extends __BaseException {
183
- name = "MaxLexemeLengthExceededException";
184
- $fault = "client";
185
- constructor(opts) {
186
- super({
187
- name: "MaxLexemeLengthExceededException",
188
- $fault: "client",
189
- ...opts,
190
- });
191
- Object.setPrototypeOf(this, MaxLexemeLengthExceededException.prototype);
192
- }
193
- };
194
- exports.MaxLexiconsNumberExceededException = class MaxLexiconsNumberExceededException extends __BaseException {
195
- name = "MaxLexiconsNumberExceededException";
196
- $fault = "client";
197
- constructor(opts) {
198
- super({
199
- name: "MaxLexiconsNumberExceededException",
200
- $fault: "client",
201
- ...opts,
202
- });
203
- Object.setPrototypeOf(this, MaxLexiconsNumberExceededException.prototype);
204
- }
205
- };
206
- exports.UnsupportedPlsAlphabetException = class UnsupportedPlsAlphabetException extends __BaseException {
207
- name = "UnsupportedPlsAlphabetException";
208
- $fault = "client";
209
- constructor(opts) {
210
- super({
211
- name: "UnsupportedPlsAlphabetException",
212
- $fault: "client",
213
- ...opts,
214
- });
215
- Object.setPrototypeOf(this, UnsupportedPlsAlphabetException.prototype);
216
- }
217
- };
218
- exports.UnsupportedPlsLanguageException = class UnsupportedPlsLanguageException extends __BaseException {
219
- name = "UnsupportedPlsLanguageException";
220
- $fault = "client";
221
- constructor(opts) {
222
- super({
223
- name: "UnsupportedPlsLanguageException",
224
- $fault: "client",
225
- ...opts,
226
- });
227
- Object.setPrototypeOf(this, UnsupportedPlsLanguageException.prototype);
228
- }
229
- };
230
- exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
231
- name = "ServiceQuotaExceededException";
232
- $fault = "client";
233
- quotaCode;
234
- serviceCode;
235
- constructor(opts) {
236
- super({
237
- name: "ServiceQuotaExceededException",
238
- $fault: "client",
239
- ...opts,
240
- });
241
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
242
- this.quotaCode = opts.quotaCode;
243
- this.serviceCode = opts.serviceCode;
244
- }
245
- };
246
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
247
- name = "ThrottlingException";
248
- $fault = "client";
249
- throttlingReasons;
250
- constructor(opts) {
251
- super({
252
- name: "ThrottlingException",
253
- $fault: "client",
254
- ...opts,
255
- });
256
- Object.setPrototypeOf(this, ThrottlingException.prototype);
257
- this.throttlingReasons = opts.throttlingReasons;
258
- }
259
- };
260
- exports.ValidationException = class ValidationException extends __BaseException {
261
- name = "ValidationException";
262
- $fault = "client";
263
- reason;
264
- fields;
265
- constructor(opts) {
266
- super({
267
- name: "ValidationException",
268
- $fault: "client",
269
- ...opts,
270
- });
271
- Object.setPrototypeOf(this, ValidationException.prototype);
272
- this.reason = opts.reason;
273
- this.fields = opts.fields;
274
- }
275
- };
276
- exports.SsmlMarksNotSupportedForTextTypeException = class SsmlMarksNotSupportedForTextTypeException extends __BaseException {
277
- name = "SsmlMarksNotSupportedForTextTypeException";
278
- $fault = "client";
279
- constructor(opts) {
280
- super({
281
- name: "SsmlMarksNotSupportedForTextTypeException",
282
- $fault: "client",
283
- ...opts,
284
- });
285
- Object.setPrototypeOf(this, SsmlMarksNotSupportedForTextTypeException.prototype);
286
- }
287
- };
288
- exports.TextLengthExceededException = class TextLengthExceededException extends __BaseException {
289
- name = "TextLengthExceededException";
290
- $fault = "client";
291
- constructor(opts) {
292
- super({
293
- name: "TextLengthExceededException",
294
- $fault: "client",
295
- ...opts,
296
- });
297
- Object.setPrototypeOf(this, TextLengthExceededException.prototype);
298
- }
299
- };
@@ -1,37 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidFunction, invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
7
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
8
- const { calculateBodyLength } = require("@smithy/core/serde");
9
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- const defaultsMode = resolveDefaultsModeConfig(config);
13
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
14
- const clientSharedValues = getSharedRuntimeConfig(config);
15
- return {
16
- ...clientSharedValues,
17
- ...config,
18
- runtime: "browser",
19
- defaultsMode,
20
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
21
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
22
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
23
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
24
- handle: invalidFunction("event stream request is not supported in browser."),
25
- })),
26
- eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
27
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
28
- region: config?.region ?? invalidProvider("Region is missing"),
29
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
30
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
31
- sha256: config?.sha256 ?? Sha256,
32
- streamCollector: config?.streamCollector ?? streamCollector,
33
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
34
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
35
- };
36
- };
37
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,52 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { eventStreamPayloadHandlerProvider } = require("@aws-sdk/eventstream-handler-node");
6
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
7
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
8
- const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
9
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
10
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
11
- const { NodeHttp2Handler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
12
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
13
- const getRuntimeConfig = (config) => {
14
- emitWarningIfUnsupportedVersion(process.version);
15
- const defaultsMode = resolveDefaultsModeConfig(config);
16
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
- const clientSharedValues = getSharedRuntimeConfig(config);
18
- awsCheckVersion(process.version);
19
- const loaderConfig = {
20
- profile: config?.profile,
21
- logger: clientSharedValues.logger,
22
- };
23
- return {
24
- ...clientSharedValues,
25
- ...config,
26
- runtime: "node",
27
- defaultsMode,
28
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
29
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
31
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
32
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventStreamPayloadHandlerProvider,
33
- eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
34
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
35
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
36
- requestHandler: RequestHandler.create(config?.requestHandler ?? (async () => ({
37
- ...await defaultConfigProvider(),
38
- disableConcurrentStreams: true
39
- }))),
40
- retryMode: config?.retryMode ??
41
- loadNodeConfig({
42
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
43
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
44
- }, config),
45
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
46
- streamCollector: config?.streamCollector ?? streamCollector,
47
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
48
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
49
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
50
- };
51
- };
52
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,16 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { invalidFunction } = require("@smithy/core/client");
3
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
4
- const getRuntimeConfig = (config) => {
5
- const browserDefaults = getBrowserRuntimeConfig(config);
6
- return {
7
- ...browserDefaults,
8
- ...config,
9
- runtime: "react-native",
10
- eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
11
- handle: invalidFunction("event stream request is not supported in ReactNative."),
12
- })),
13
- sha256: config?.sha256 ?? Sha256,
14
- };
15
- };
16
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,40 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
3
- const { NoOpLogger } = require("@smithy/core/client");
4
- const { parseUrl } = require("@smithy/core/protocols");
5
- const { fromBase64, fromUtf8, sdkStreamMixin, toBase64, toUtf8 } = require("@smithy/core/serde");
6
- const { defaultPollyHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2016-06-10",
12
- base64Decoder: config?.base64Decoder ?? fromBase64,
13
- base64Encoder: config?.base64Encoder ?? toBase64,
14
- disableHostPrefix: config?.disableHostPrefix ?? false,
15
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
16
- extensions: config?.extensions ?? [],
17
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultPollyHttpAuthSchemeProvider,
18
- httpAuthSchemes: config?.httpAuthSchemes ?? [
19
- {
20
- schemeId: "aws.auth#sigv4",
21
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
22
- signer: new AwsSdkSigV4Signer(),
23
- },
24
- ],
25
- logger: config?.logger ?? new NoOpLogger(),
26
- protocol: config?.protocol ?? AwsRestJsonProtocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.polly",
29
- errorTypeRegistries,
30
- xmlNamespace: "http://polly.amazonaws.com/doc/v1",
31
- version: "2016-06-10",
32
- serviceTarget: "Parrot_v1",
33
- },
34
- sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
35
- serviceId: config?.serviceId ?? "Polly",
36
- urlParser: config?.urlParser ?? parseUrl,
37
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
38
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
39
- };
40
- };