@aws-sdk/client-polly 3.1172.0 → 3.1174.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.
Files changed (47) hide show
  1. package/README.md +21 -0
  2. package/dist-cjs/index.js +384 -137
  3. package/dist-es/Polly.js +11 -1
  4. package/dist-es/commands/CreateVoiceCommand.js +4 -0
  5. package/dist-es/commands/DeleteVoiceCommand.js +4 -0
  6. package/dist-es/commands/GetVoiceCommand.js +4 -0
  7. package/dist-es/commands/index.js +3 -0
  8. package/dist-es/index.js +1 -0
  9. package/dist-es/models/enums.js +49 -21
  10. package/dist-es/models/errors.js +129 -97
  11. package/dist-es/schemas/schemas_0.js +125 -17
  12. package/dist-es/waiters/index.js +1 -0
  13. package/dist-es/waiters/waitForVoiceActive.js +40 -0
  14. package/dist-types/Polly.d.ts +29 -1
  15. package/dist-types/PollyClient.d.ts +5 -2
  16. package/dist-types/commands/CreateVoiceCommand.d.ts +174 -0
  17. package/dist-types/commands/DeleteVoiceCommand.d.ts +99 -0
  18. package/dist-types/commands/DescribeVoicesCommand.d.ts +45 -9
  19. package/dist-types/commands/GetVoiceCommand.d.ts +129 -0
  20. package/dist-types/commands/ListTagsForResourceCommand.d.ts +2 -2
  21. package/dist-types/commands/StartSpeechSynthesisStreamCommand.d.ts +26 -2
  22. package/dist-types/commands/StartSpeechSynthesisTaskCommand.d.ts +31 -10
  23. package/dist-types/commands/SynthesizeSpeechCommand.d.ts +24 -0
  24. package/dist-types/commands/TagResourceCommand.d.ts +2 -2
  25. package/dist-types/commands/UntagResourceCommand.d.ts +2 -2
  26. package/dist-types/commands/index.d.ts +3 -0
  27. package/dist-types/index.d.ts +1 -0
  28. package/dist-types/models/enums.d.ts +101 -41
  29. package/dist-types/models/errors.d.ts +183 -126
  30. package/dist-types/models/models_0.d.ts +369 -77
  31. package/dist-types/schemas/schemas_0.d.ts +15 -0
  32. package/dist-types/ts3.4/Polly.d.ts +47 -0
  33. package/dist-types/ts3.4/PollyClient.d.ts +9 -0
  34. package/dist-types/ts3.4/commands/CreateVoiceCommand.d.ts +38 -0
  35. package/dist-types/ts3.4/commands/DeleteVoiceCommand.d.ts +38 -0
  36. package/dist-types/ts3.4/commands/GetVoiceCommand.d.ts +38 -0
  37. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  38. package/dist-types/ts3.4/index.d.ts +1 -0
  39. package/dist-types/ts3.4/models/enums.d.ts +60 -27
  40. package/dist-types/ts3.4/models/errors.d.ts +61 -46
  41. package/dist-types/ts3.4/models/models_0.d.ts +64 -16
  42. package/dist-types/ts3.4/schemas/schemas_0.d.ts +15 -0
  43. package/dist-types/ts3.4/waiters/index.d.ts +1 -0
  44. package/dist-types/ts3.4/waiters/waitForVoiceActive.d.ts +12 -0
  45. package/dist-types/waiters/index.d.ts +1 -0
  46. package/dist-types/waiters/waitForVoiceActive.d.ts +15 -0
  47. package/package.json +1 -1
package/dist-es/Polly.js CHANGED
@@ -1,8 +1,11 @@
1
1
  import { createAggregatedClient } from "@smithy/core/client";
2
+ import { CreateVoiceCommand, } from "./commands/CreateVoiceCommand";
2
3
  import { DeleteLexiconCommand, } from "./commands/DeleteLexiconCommand";
4
+ import { DeleteVoiceCommand, } from "./commands/DeleteVoiceCommand";
3
5
  import { DescribeVoicesCommand, } from "./commands/DescribeVoicesCommand";
4
6
  import { GetLexiconCommand, } from "./commands/GetLexiconCommand";
5
7
  import { GetSpeechSynthesisTaskCommand, } from "./commands/GetSpeechSynthesisTaskCommand";
8
+ import { GetVoiceCommand } from "./commands/GetVoiceCommand";
6
9
  import { ListLexiconsCommand, } from "./commands/ListLexiconsCommand";
7
10
  import { ListSpeechSynthesisTasksCommand, } from "./commands/ListSpeechSynthesisTasksCommand";
8
11
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
@@ -14,11 +17,15 @@ import { TagResourceCommand, } from "./commands/TagResourceCommand";
14
17
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
15
18
  import { paginateListSpeechSynthesisTasks } from "./pagination/ListSpeechSynthesisTasksPaginator";
16
19
  import { PollyClient } from "./PollyClient";
20
+ import { waitUntilVoiceActive } from "./waiters/waitForVoiceActive";
17
21
  const commands = {
22
+ CreateVoiceCommand,
18
23
  DeleteLexiconCommand,
24
+ DeleteVoiceCommand,
19
25
  DescribeVoicesCommand,
20
26
  GetLexiconCommand,
21
27
  GetSpeechSynthesisTaskCommand,
28
+ GetVoiceCommand,
22
29
  ListLexiconsCommand,
23
30
  ListSpeechSynthesisTasksCommand,
24
31
  ListTagsForResourceCommand,
@@ -32,6 +39,9 @@ const commands = {
32
39
  const paginators = {
33
40
  paginateListSpeechSynthesisTasks,
34
41
  };
42
+ const waiters = {
43
+ waitUntilVoiceActive,
44
+ };
35
45
  export class Polly extends PollyClient {
36
46
  }
37
- createAggregatedClient(commands, Polly, { paginators });
47
+ createAggregatedClient(commands, Polly, { paginators, waiters });
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { CreateVoice$ } from "../schemas/schemas_0";
3
+ export class CreateVoiceCommand extends command(_ep0, _mw0, "CreateVoice", CreateVoice$) {
4
+ }
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { DeleteVoice$ } from "../schemas/schemas_0";
3
+ export class DeleteVoiceCommand extends command(_ep0, _mw0, "DeleteVoice", DeleteVoice$) {
4
+ }
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { GetVoice$ } from "../schemas/schemas_0";
3
+ export class GetVoiceCommand extends command(_ep0, _mw0, "GetVoice", GetVoice$) {
4
+ }
@@ -1,7 +1,10 @@
1
+ export * from "./CreateVoiceCommand";
1
2
  export * from "./DeleteLexiconCommand";
3
+ export * from "./DeleteVoiceCommand";
2
4
  export * from "./DescribeVoicesCommand";
3
5
  export * from "./GetLexiconCommand";
4
6
  export * from "./GetSpeechSynthesisTaskCommand";
7
+ export * from "./GetVoiceCommand";
5
8
  export * from "./ListLexiconsCommand";
6
9
  export * from "./ListSpeechSynthesisTasksCommand";
7
10
  export * from "./ListTagsForResourceCommand";
package/dist-es/index.js CHANGED
@@ -3,6 +3,7 @@ export * from "./Polly";
3
3
  export * from "./commands";
4
4
  export { Command as $Command } from "@smithy/core/client";
5
5
  export * from "./pagination";
6
+ export * from "./waiters";
6
7
  export * from "./schemas/schemas_0";
7
8
  export * from "./models/enums";
8
9
  export * from "./models/errors";
@@ -1,8 +1,21 @@
1
- export const Engine = {
2
- GENERATIVE: "generative",
3
- LONG_FORM: "long-form",
4
- NEURAL: "neural",
5
- STANDARD: "standard",
1
+ export const AudioFormat = {
2
+ FLAC: "flac",
3
+ MP3: "mp3",
4
+ OGG_VORBIS: "ogg_vorbis",
5
+ WAV: "wav",
6
+ };
7
+ export const ResourceType = {
8
+ LEXICON: "lexicon",
9
+ VOICE: "voice",
10
+ };
11
+ export const CustomVoiceLanguageCode = {
12
+ DE_DE: "de-DE",
13
+ EN_US: "en-US",
14
+ ES_US: "es-US",
15
+ FR_FR: "fr-FR",
16
+ HI_IN: "hi-IN",
17
+ IT_IT: "it-IT",
18
+ PT_BR: "pt-BR",
6
19
  };
7
20
  export const LanguageCode = {
8
21
  ar_AE: "ar-AE",
@@ -170,6 +183,37 @@ export const VoiceId = {
170
183
  Zeina: "Zeina",
171
184
  Zhiyu: "Zhiyu",
172
185
  };
186
+ export const VoiceOrigin = {
187
+ AWS: "aws",
188
+ CUSTOMER: "customer",
189
+ };
190
+ export const VoiceStatus = {
191
+ ACTIVE: "active",
192
+ FAILED: "failed",
193
+ PENDING: "pending",
194
+ };
195
+ export const Engine = {
196
+ GENERATIVE: "generative",
197
+ LONG_FORM: "long-form",
198
+ NEURAL: "neural",
199
+ STANDARD: "standard",
200
+ };
201
+ export const QuotaCode = {
202
+ CUSTOM_VOICE_MAX_COUNT: "custom-voice-max-count",
203
+ INPUT_STREAM_INBOUND_EVENT_TIMEOUT: "input-stream-inbound-event-timeout",
204
+ INPUT_STREAM_TIMEOUT: "input-stream-timeout",
205
+ };
206
+ export const ServiceCode = {
207
+ POLLY: "polly",
208
+ };
209
+ export const ValidationExceptionReason = {
210
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
211
+ INVALID_INBOUND_EVENT: "invalidInboundEvent",
212
+ KMS_KEY_NOT_FOUND: "kmsKeyNotFound",
213
+ KMS_KEY_UNUSABLE: "kmsKeyUnusable",
214
+ OTHER: "other",
215
+ UNSUPPORTED_OPERATION: "unsupportedOperation",
216
+ };
173
217
  export const OutputFormat = {
174
218
  ALAW: "alaw",
175
219
  JSON: "json",
@@ -195,19 +239,3 @@ export const TextType = {
195
239
  SSML: "ssml",
196
240
  TEXT: "text",
197
241
  };
198
- export const ResourceType = {
199
- LEXICON: "lexicon",
200
- };
201
- export const ValidationExceptionReason = {
202
- FIELD_VALIDATION_FAILED: "fieldValidationFailed",
203
- INVALID_INBOUND_EVENT: "invalidInboundEvent",
204
- OTHER: "other",
205
- UNSUPPORTED_OPERATION: "unsupportedOperation",
206
- };
207
- export const QuotaCode = {
208
- INPUT_STREAM_INBOUND_EVENT_TIMEOUT: "input-stream-inbound-event-timeout",
209
- INPUT_STREAM_TIMEOUT: "input-stream-timeout",
210
- };
211
- export const ServiceCode = {
212
- POLLY: "polly",
213
- };
@@ -1,15 +1,47 @@
1
1
  import { PollyServiceException as __BaseException } from "./PollyServiceException";
2
- export class LexiconNotFoundException extends __BaseException {
3
- static shapeId = "com.amazonaws.polly#LexiconNotFoundException";
4
- name = "LexiconNotFoundException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ static shapeId = "com.amazonaws.polly#AccessDeniedException";
4
+ name = "AccessDeniedException";
5
5
  $fault = "client";
6
+ Message;
6
7
  constructor(opts) {
7
8
  super({
8
- name: "LexiconNotFoundException",
9
+ name: "AccessDeniedException",
9
10
  $fault: "client",
10
11
  ...opts,
11
12
  });
12
- Object.setPrototypeOf(this, LexiconNotFoundException.prototype);
13
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
14
+ this.Message = opts.Message;
15
+ }
16
+ }
17
+ export class ConflictException extends __BaseException {
18
+ static shapeId = "com.amazonaws.polly#ConflictException";
19
+ name = "ConflictException";
20
+ $fault = "client";
21
+ resourceId;
22
+ resourceType;
23
+ constructor(opts) {
24
+ super({
25
+ name: "ConflictException",
26
+ $fault: "client",
27
+ ...opts,
28
+ });
29
+ Object.setPrototypeOf(this, ConflictException.prototype);
30
+ this.resourceId = opts.resourceId;
31
+ this.resourceType = opts.resourceType;
32
+ }
33
+ }
34
+ export class InvalidTagParameterException extends __BaseException {
35
+ static shapeId = "com.amazonaws.polly#InvalidTagParameterException";
36
+ name = "InvalidTagParameterException";
37
+ $fault = "client";
38
+ constructor(opts) {
39
+ super({
40
+ name: "InvalidTagParameterException",
41
+ $fault: "client",
42
+ ...opts,
43
+ });
44
+ Object.setPrototypeOf(this, InvalidTagParameterException.prototype);
13
45
  }
14
46
  }
15
47
  export class ServiceFailureException extends __BaseException {
@@ -25,6 +57,98 @@ export class ServiceFailureException extends __BaseException {
25
57
  Object.setPrototypeOf(this, ServiceFailureException.prototype);
26
58
  }
27
59
  }
60
+ export class ServiceQuotaExceededException extends __BaseException {
61
+ static shapeId = "com.amazonaws.polly#ServiceQuotaExceededException";
62
+ name = "ServiceQuotaExceededException";
63
+ $fault = "client";
64
+ quotaCode;
65
+ serviceCode;
66
+ constructor(opts) {
67
+ super({
68
+ name: "ServiceQuotaExceededException",
69
+ $fault: "client",
70
+ ...opts,
71
+ });
72
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
73
+ this.quotaCode = opts.quotaCode;
74
+ this.serviceCode = opts.serviceCode;
75
+ }
76
+ }
77
+ export class ThrottlingException extends __BaseException {
78
+ static shapeId = "com.amazonaws.polly#ThrottlingException";
79
+ name = "ThrottlingException";
80
+ $fault = "client";
81
+ throttlingReasons;
82
+ constructor(opts) {
83
+ super({
84
+ name: "ThrottlingException",
85
+ $fault: "client",
86
+ ...opts,
87
+ });
88
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
89
+ this.throttlingReasons = opts.throttlingReasons;
90
+ }
91
+ }
92
+ export class TooManyTagsException extends __BaseException {
93
+ static shapeId = "com.amazonaws.polly#TooManyTagsException";
94
+ name = "TooManyTagsException";
95
+ $fault = "client";
96
+ constructor(opts) {
97
+ super({
98
+ name: "TooManyTagsException",
99
+ $fault: "client",
100
+ ...opts,
101
+ });
102
+ Object.setPrototypeOf(this, TooManyTagsException.prototype);
103
+ }
104
+ }
105
+ export class ValidationException extends __BaseException {
106
+ static shapeId = "com.amazonaws.polly#ValidationException";
107
+ name = "ValidationException";
108
+ $fault = "client";
109
+ reason;
110
+ fields;
111
+ constructor(opts) {
112
+ super({
113
+ name: "ValidationException",
114
+ $fault: "client",
115
+ ...opts,
116
+ });
117
+ Object.setPrototypeOf(this, ValidationException.prototype);
118
+ this.reason = opts.reason;
119
+ this.fields = opts.fields;
120
+ }
121
+ }
122
+ export class LexiconNotFoundException extends __BaseException {
123
+ static shapeId = "com.amazonaws.polly#LexiconNotFoundException";
124
+ name = "LexiconNotFoundException";
125
+ $fault = "client";
126
+ constructor(opts) {
127
+ super({
128
+ name: "LexiconNotFoundException",
129
+ $fault: "client",
130
+ ...opts,
131
+ });
132
+ Object.setPrototypeOf(this, LexiconNotFoundException.prototype);
133
+ }
134
+ }
135
+ export class ResourceNotFoundException extends __BaseException {
136
+ static shapeId = "com.amazonaws.polly#ResourceNotFoundException";
137
+ name = "ResourceNotFoundException";
138
+ $fault = "client";
139
+ resourceId;
140
+ resourceType;
141
+ constructor(opts) {
142
+ super({
143
+ name: "ResourceNotFoundException",
144
+ $fault: "client",
145
+ ...opts,
146
+ });
147
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
148
+ this.resourceId = opts.resourceId;
149
+ this.resourceType = opts.resourceType;
150
+ }
151
+ }
28
152
  export class InvalidNextTokenException extends __BaseException {
29
153
  static shapeId = "com.amazonaws.polly#InvalidNextTokenException";
30
154
  name = "InvalidNextTokenException";
@@ -155,19 +279,6 @@ export class InvalidSsmlException extends __BaseException {
155
279
  Object.setPrototypeOf(this, InvalidSsmlException.prototype);
156
280
  }
157
281
  }
158
- export class InvalidTagParameterException extends __BaseException {
159
- static shapeId = "com.amazonaws.polly#InvalidTagParameterException";
160
- name = "InvalidTagParameterException";
161
- $fault = "client";
162
- constructor(opts) {
163
- super({
164
- name: "InvalidTagParameterException",
165
- $fault: "client",
166
- ...opts,
167
- });
168
- Object.setPrototypeOf(this, InvalidTagParameterException.prototype);
169
- }
170
- }
171
282
  export class LanguageNotSupportedException extends __BaseException {
172
283
  static shapeId = "com.amazonaws.polly#LanguageNotSupportedException";
173
284
  name = "LanguageNotSupportedException";
@@ -194,55 +305,6 @@ export class LexiconSizeExceededException extends __BaseException {
194
305
  Object.setPrototypeOf(this, LexiconSizeExceededException.prototype);
195
306
  }
196
307
  }
197
- export class ResourceNotFoundException extends __BaseException {
198
- static shapeId = "com.amazonaws.polly#ResourceNotFoundException";
199
- name = "ResourceNotFoundException";
200
- $fault = "client";
201
- resourceId;
202
- resourceType;
203
- constructor(opts) {
204
- super({
205
- name: "ResourceNotFoundException",
206
- $fault: "client",
207
- ...opts,
208
- });
209
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
210
- this.resourceId = opts.resourceId;
211
- this.resourceType = opts.resourceType;
212
- }
213
- }
214
- export class ThrottlingException extends __BaseException {
215
- static shapeId = "com.amazonaws.polly#ThrottlingException";
216
- name = "ThrottlingException";
217
- $fault = "client";
218
- throttlingReasons;
219
- constructor(opts) {
220
- super({
221
- name: "ThrottlingException",
222
- $fault: "client",
223
- ...opts,
224
- });
225
- Object.setPrototypeOf(this, ThrottlingException.prototype);
226
- this.throttlingReasons = opts.throttlingReasons;
227
- }
228
- }
229
- export class ValidationException extends __BaseException {
230
- static shapeId = "com.amazonaws.polly#ValidationException";
231
- name = "ValidationException";
232
- $fault = "client";
233
- reason;
234
- fields;
235
- constructor(opts) {
236
- super({
237
- name: "ValidationException",
238
- $fault: "client",
239
- ...opts,
240
- });
241
- Object.setPrototypeOf(this, ValidationException.prototype);
242
- this.reason = opts.reason;
243
- this.fields = opts.fields;
244
- }
245
- }
246
308
  export class MarksNotSupportedForFormatException extends __BaseException {
247
309
  static shapeId = "com.amazonaws.polly#MarksNotSupportedForFormatException";
248
310
  name = "MarksNotSupportedForFormatException";
@@ -282,19 +344,6 @@ export class MaxLexiconsNumberExceededException extends __BaseException {
282
344
  Object.setPrototypeOf(this, MaxLexiconsNumberExceededException.prototype);
283
345
  }
284
346
  }
285
- export class TooManyTagsException extends __BaseException {
286
- static shapeId = "com.amazonaws.polly#TooManyTagsException";
287
- name = "TooManyTagsException";
288
- $fault = "client";
289
- constructor(opts) {
290
- super({
291
- name: "TooManyTagsException",
292
- $fault: "client",
293
- ...opts,
294
- });
295
- Object.setPrototypeOf(this, TooManyTagsException.prototype);
296
- }
297
- }
298
347
  export class UnsupportedPlsAlphabetException extends __BaseException {
299
348
  static shapeId = "com.amazonaws.polly#UnsupportedPlsAlphabetException";
300
349
  name = "UnsupportedPlsAlphabetException";
@@ -321,23 +370,6 @@ export class UnsupportedPlsLanguageException extends __BaseException {
321
370
  Object.setPrototypeOf(this, UnsupportedPlsLanguageException.prototype);
322
371
  }
323
372
  }
324
- export class ServiceQuotaExceededException extends __BaseException {
325
- static shapeId = "com.amazonaws.polly#ServiceQuotaExceededException";
326
- name = "ServiceQuotaExceededException";
327
- $fault = "client";
328
- quotaCode;
329
- serviceCode;
330
- constructor(opts) {
331
- super({
332
- name: "ServiceQuotaExceededException",
333
- $fault: "client",
334
- ...opts,
335
- });
336
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
337
- this.quotaCode = opts.quotaCode;
338
- this.serviceCode = opts.serviceCode;
339
- }
340
- }
341
373
  export class SsmlMarksNotSupportedForTextTypeException extends __BaseException {
342
374
  static shapeId = "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException";
343
375
  name = "SsmlMarksNotSupportedForTextTypeException";