@aws-sdk/client-voice-id 3.927.0 → 3.928.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 (53) hide show
  1. package/dist-cjs/index.js +960 -1524
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/VoiceIDClient.js +2 -0
  4. package/dist-es/commands/AssociateFraudsterCommand.js +3 -10
  5. package/dist-es/commands/CreateDomainCommand.js +3 -10
  6. package/dist-es/commands/CreateWatchlistCommand.js +3 -10
  7. package/dist-es/commands/DeleteDomainCommand.js +3 -9
  8. package/dist-es/commands/DeleteFraudsterCommand.js +3 -10
  9. package/dist-es/commands/DeleteSpeakerCommand.js +3 -10
  10. package/dist-es/commands/DeleteWatchlistCommand.js +3 -9
  11. package/dist-es/commands/DescribeDomainCommand.js +3 -10
  12. package/dist-es/commands/DescribeFraudsterCommand.js +3 -10
  13. package/dist-es/commands/DescribeFraudsterRegistrationJobCommand.js +3 -10
  14. package/dist-es/commands/DescribeSpeakerCommand.js +3 -10
  15. package/dist-es/commands/DescribeSpeakerEnrollmentJobCommand.js +3 -10
  16. package/dist-es/commands/DescribeWatchlistCommand.js +3 -10
  17. package/dist-es/commands/DisassociateFraudsterCommand.js +3 -10
  18. package/dist-es/commands/EvaluateSessionCommand.js +3 -10
  19. package/dist-es/commands/ListDomainsCommand.js +3 -10
  20. package/dist-es/commands/ListFraudsterRegistrationJobsCommand.js +3 -10
  21. package/dist-es/commands/ListFraudstersCommand.js +3 -9
  22. package/dist-es/commands/ListSpeakerEnrollmentJobsCommand.js +3 -10
  23. package/dist-es/commands/ListSpeakersCommand.js +3 -10
  24. package/dist-es/commands/ListTagsForResourceCommand.js +3 -10
  25. package/dist-es/commands/ListWatchlistsCommand.js +3 -10
  26. package/dist-es/commands/OptOutSpeakerCommand.js +3 -10
  27. package/dist-es/commands/StartFraudsterRegistrationJobCommand.js +3 -10
  28. package/dist-es/commands/StartSpeakerEnrollmentJobCommand.js +3 -10
  29. package/dist-es/commands/TagResourceCommand.js +3 -10
  30. package/dist-es/commands/UntagResourceCommand.js +3 -10
  31. package/dist-es/commands/UpdateDomainCommand.js +3 -10
  32. package/dist-es/commands/UpdateWatchlistCommand.js +3 -10
  33. package/dist-es/models/models_0.js +0 -207
  34. package/dist-es/runtimeConfig.shared.js +7 -0
  35. package/dist-es/schemas/schemas_0.js +883 -0
  36. package/dist-types/VoiceIDClient.d.ts +10 -1
  37. package/dist-types/models/models_0.d.ts +0 -184
  38. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  39. package/dist-types/runtimeConfig.d.ts +1 -0
  40. package/dist-types/runtimeConfig.native.d.ts +1 -0
  41. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  42. package/dist-types/schemas/schemas_0.d.ts +145 -0
  43. package/dist-types/ts3.4/VoiceIDClient.d.ts +4 -0
  44. package/dist-types/ts3.4/models/models_0.d.ts +0 -130
  45. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  46. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  47. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  48. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  49. package/dist-types/ts3.4/schemas/schemas_0.d.ts +151 -0
  50. package/package.json +5 -6
  51. package/dist-es/protocols/Aws_json1_0.js +0 -1052
  52. package/dist-types/protocols/Aws_json1_0.d.ts +0 -263
  53. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -353
@@ -1,1052 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- import { VoiceIDServiceException as __BaseException } from "../models/VoiceIDServiceException";
7
- export const se_AssociateFraudsterCommand = async (input, context) => {
8
- const headers = sharedHeaders("AssociateFraudster");
9
- let body;
10
- body = JSON.stringify(_json(input));
11
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
12
- };
13
- export const se_CreateDomainCommand = async (input, context) => {
14
- const headers = sharedHeaders("CreateDomain");
15
- let body;
16
- body = JSON.stringify(se_CreateDomainRequest(input, context));
17
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
- };
19
- export const se_CreateWatchlistCommand = async (input, context) => {
20
- const headers = sharedHeaders("CreateWatchlist");
21
- let body;
22
- body = JSON.stringify(se_CreateWatchlistRequest(input, context));
23
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
24
- };
25
- export const se_DeleteDomainCommand = async (input, context) => {
26
- const headers = sharedHeaders("DeleteDomain");
27
- let body;
28
- body = JSON.stringify(_json(input));
29
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
30
- };
31
- export const se_DeleteFraudsterCommand = async (input, context) => {
32
- const headers = sharedHeaders("DeleteFraudster");
33
- let body;
34
- body = JSON.stringify(_json(input));
35
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
- };
37
- export const se_DeleteSpeakerCommand = async (input, context) => {
38
- const headers = sharedHeaders("DeleteSpeaker");
39
- let body;
40
- body = JSON.stringify(_json(input));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- export const se_DeleteWatchlistCommand = async (input, context) => {
44
- const headers = sharedHeaders("DeleteWatchlist");
45
- let body;
46
- body = JSON.stringify(_json(input));
47
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
- };
49
- export const se_DescribeDomainCommand = async (input, context) => {
50
- const headers = sharedHeaders("DescribeDomain");
51
- let body;
52
- body = JSON.stringify(_json(input));
53
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
54
- };
55
- export const se_DescribeFraudsterCommand = async (input, context) => {
56
- const headers = sharedHeaders("DescribeFraudster");
57
- let body;
58
- body = JSON.stringify(_json(input));
59
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
60
- };
61
- export const se_DescribeFraudsterRegistrationJobCommand = async (input, context) => {
62
- const headers = sharedHeaders("DescribeFraudsterRegistrationJob");
63
- let body;
64
- body = JSON.stringify(_json(input));
65
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
- };
67
- export const se_DescribeSpeakerCommand = async (input, context) => {
68
- const headers = sharedHeaders("DescribeSpeaker");
69
- let body;
70
- body = JSON.stringify(_json(input));
71
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
72
- };
73
- export const se_DescribeSpeakerEnrollmentJobCommand = async (input, context) => {
74
- const headers = sharedHeaders("DescribeSpeakerEnrollmentJob");
75
- let body;
76
- body = JSON.stringify(_json(input));
77
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
- };
79
- export const se_DescribeWatchlistCommand = async (input, context) => {
80
- const headers = sharedHeaders("DescribeWatchlist");
81
- let body;
82
- body = JSON.stringify(_json(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- export const se_DisassociateFraudsterCommand = async (input, context) => {
86
- const headers = sharedHeaders("DisassociateFraudster");
87
- let body;
88
- body = JSON.stringify(_json(input));
89
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
- };
91
- export const se_EvaluateSessionCommand = async (input, context) => {
92
- const headers = sharedHeaders("EvaluateSession");
93
- let body;
94
- body = JSON.stringify(_json(input));
95
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
96
- };
97
- export const se_ListDomainsCommand = async (input, context) => {
98
- const headers = sharedHeaders("ListDomains");
99
- let body;
100
- body = JSON.stringify(_json(input));
101
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
102
- };
103
- export const se_ListFraudsterRegistrationJobsCommand = async (input, context) => {
104
- const headers = sharedHeaders("ListFraudsterRegistrationJobs");
105
- let body;
106
- body = JSON.stringify(_json(input));
107
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
108
- };
109
- export const se_ListFraudstersCommand = async (input, context) => {
110
- const headers = sharedHeaders("ListFraudsters");
111
- let body;
112
- body = JSON.stringify(_json(input));
113
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
114
- };
115
- export const se_ListSpeakerEnrollmentJobsCommand = async (input, context) => {
116
- const headers = sharedHeaders("ListSpeakerEnrollmentJobs");
117
- let body;
118
- body = JSON.stringify(_json(input));
119
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
- };
121
- export const se_ListSpeakersCommand = async (input, context) => {
122
- const headers = sharedHeaders("ListSpeakers");
123
- let body;
124
- body = JSON.stringify(_json(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- export const se_ListTagsForResourceCommand = async (input, context) => {
128
- const headers = sharedHeaders("ListTagsForResource");
129
- let body;
130
- body = JSON.stringify(_json(input));
131
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
132
- };
133
- export const se_ListWatchlistsCommand = async (input, context) => {
134
- const headers = sharedHeaders("ListWatchlists");
135
- let body;
136
- body = JSON.stringify(_json(input));
137
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
- };
139
- export const se_OptOutSpeakerCommand = async (input, context) => {
140
- const headers = sharedHeaders("OptOutSpeaker");
141
- let body;
142
- body = JSON.stringify(_json(input));
143
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
144
- };
145
- export const se_StartFraudsterRegistrationJobCommand = async (input, context) => {
146
- const headers = sharedHeaders("StartFraudsterRegistrationJob");
147
- let body;
148
- body = JSON.stringify(se_StartFraudsterRegistrationJobRequest(input, context));
149
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
150
- };
151
- export const se_StartSpeakerEnrollmentJobCommand = async (input, context) => {
152
- const headers = sharedHeaders("StartSpeakerEnrollmentJob");
153
- let body;
154
- body = JSON.stringify(se_StartSpeakerEnrollmentJobRequest(input, context));
155
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
- };
157
- export const se_TagResourceCommand = async (input, context) => {
158
- const headers = sharedHeaders("TagResource");
159
- let body;
160
- body = JSON.stringify(_json(input));
161
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
- };
163
- export const se_UntagResourceCommand = async (input, context) => {
164
- const headers = sharedHeaders("UntagResource");
165
- let body;
166
- body = JSON.stringify(_json(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- export const se_UpdateDomainCommand = async (input, context) => {
170
- const headers = sharedHeaders("UpdateDomain");
171
- let body;
172
- body = JSON.stringify(_json(input));
173
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
174
- };
175
- export const se_UpdateWatchlistCommand = async (input, context) => {
176
- const headers = sharedHeaders("UpdateWatchlist");
177
- let body;
178
- body = JSON.stringify(_json(input));
179
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
180
- };
181
- export const de_AssociateFraudsterCommand = async (output, context) => {
182
- if (output.statusCode >= 300) {
183
- return de_CommandError(output, context);
184
- }
185
- const data = await parseBody(output.body, context);
186
- let contents = {};
187
- contents = de_AssociateFraudsterResponse(data, context);
188
- const response = {
189
- $metadata: deserializeMetadata(output),
190
- ...contents,
191
- };
192
- return response;
193
- };
194
- export const de_CreateDomainCommand = async (output, context) => {
195
- if (output.statusCode >= 300) {
196
- return de_CommandError(output, context);
197
- }
198
- const data = await parseBody(output.body, context);
199
- let contents = {};
200
- contents = de_CreateDomainResponse(data, context);
201
- const response = {
202
- $metadata: deserializeMetadata(output),
203
- ...contents,
204
- };
205
- return response;
206
- };
207
- export const de_CreateWatchlistCommand = async (output, context) => {
208
- if (output.statusCode >= 300) {
209
- return de_CommandError(output, context);
210
- }
211
- const data = await parseBody(output.body, context);
212
- let contents = {};
213
- contents = de_CreateWatchlistResponse(data, context);
214
- const response = {
215
- $metadata: deserializeMetadata(output),
216
- ...contents,
217
- };
218
- return response;
219
- };
220
- export const de_DeleteDomainCommand = async (output, context) => {
221
- if (output.statusCode >= 300) {
222
- return de_CommandError(output, context);
223
- }
224
- await collectBody(output.body, context);
225
- const response = {
226
- $metadata: deserializeMetadata(output),
227
- };
228
- return response;
229
- };
230
- export const de_DeleteFraudsterCommand = async (output, context) => {
231
- if (output.statusCode >= 300) {
232
- return de_CommandError(output, context);
233
- }
234
- await collectBody(output.body, context);
235
- const response = {
236
- $metadata: deserializeMetadata(output),
237
- };
238
- return response;
239
- };
240
- export const de_DeleteSpeakerCommand = async (output, context) => {
241
- if (output.statusCode >= 300) {
242
- return de_CommandError(output, context);
243
- }
244
- await collectBody(output.body, context);
245
- const response = {
246
- $metadata: deserializeMetadata(output),
247
- };
248
- return response;
249
- };
250
- export const de_DeleteWatchlistCommand = async (output, context) => {
251
- if (output.statusCode >= 300) {
252
- return de_CommandError(output, context);
253
- }
254
- await collectBody(output.body, context);
255
- const response = {
256
- $metadata: deserializeMetadata(output),
257
- };
258
- return response;
259
- };
260
- export const de_DescribeDomainCommand = async (output, context) => {
261
- if (output.statusCode >= 300) {
262
- return de_CommandError(output, context);
263
- }
264
- const data = await parseBody(output.body, context);
265
- let contents = {};
266
- contents = de_DescribeDomainResponse(data, context);
267
- const response = {
268
- $metadata: deserializeMetadata(output),
269
- ...contents,
270
- };
271
- return response;
272
- };
273
- export const de_DescribeFraudsterCommand = async (output, context) => {
274
- if (output.statusCode >= 300) {
275
- return de_CommandError(output, context);
276
- }
277
- const data = await parseBody(output.body, context);
278
- let contents = {};
279
- contents = de_DescribeFraudsterResponse(data, context);
280
- const response = {
281
- $metadata: deserializeMetadata(output),
282
- ...contents,
283
- };
284
- return response;
285
- };
286
- export const de_DescribeFraudsterRegistrationJobCommand = async (output, context) => {
287
- if (output.statusCode >= 300) {
288
- return de_CommandError(output, context);
289
- }
290
- const data = await parseBody(output.body, context);
291
- let contents = {};
292
- contents = de_DescribeFraudsterRegistrationJobResponse(data, context);
293
- const response = {
294
- $metadata: deserializeMetadata(output),
295
- ...contents,
296
- };
297
- return response;
298
- };
299
- export const de_DescribeSpeakerCommand = async (output, context) => {
300
- if (output.statusCode >= 300) {
301
- return de_CommandError(output, context);
302
- }
303
- const data = await parseBody(output.body, context);
304
- let contents = {};
305
- contents = de_DescribeSpeakerResponse(data, context);
306
- const response = {
307
- $metadata: deserializeMetadata(output),
308
- ...contents,
309
- };
310
- return response;
311
- };
312
- export const de_DescribeSpeakerEnrollmentJobCommand = async (output, context) => {
313
- if (output.statusCode >= 300) {
314
- return de_CommandError(output, context);
315
- }
316
- const data = await parseBody(output.body, context);
317
- let contents = {};
318
- contents = de_DescribeSpeakerEnrollmentJobResponse(data, context);
319
- const response = {
320
- $metadata: deserializeMetadata(output),
321
- ...contents,
322
- };
323
- return response;
324
- };
325
- export const de_DescribeWatchlistCommand = async (output, context) => {
326
- if (output.statusCode >= 300) {
327
- return de_CommandError(output, context);
328
- }
329
- const data = await parseBody(output.body, context);
330
- let contents = {};
331
- contents = de_DescribeWatchlistResponse(data, context);
332
- const response = {
333
- $metadata: deserializeMetadata(output),
334
- ...contents,
335
- };
336
- return response;
337
- };
338
- export const de_DisassociateFraudsterCommand = async (output, context) => {
339
- if (output.statusCode >= 300) {
340
- return de_CommandError(output, context);
341
- }
342
- const data = await parseBody(output.body, context);
343
- let contents = {};
344
- contents = de_DisassociateFraudsterResponse(data, context);
345
- const response = {
346
- $metadata: deserializeMetadata(output),
347
- ...contents,
348
- };
349
- return response;
350
- };
351
- export const de_EvaluateSessionCommand = async (output, context) => {
352
- if (output.statusCode >= 300) {
353
- return de_CommandError(output, context);
354
- }
355
- const data = await parseBody(output.body, context);
356
- let contents = {};
357
- contents = de_EvaluateSessionResponse(data, context);
358
- const response = {
359
- $metadata: deserializeMetadata(output),
360
- ...contents,
361
- };
362
- return response;
363
- };
364
- export const de_ListDomainsCommand = async (output, context) => {
365
- if (output.statusCode >= 300) {
366
- return de_CommandError(output, context);
367
- }
368
- const data = await parseBody(output.body, context);
369
- let contents = {};
370
- contents = de_ListDomainsResponse(data, context);
371
- const response = {
372
- $metadata: deserializeMetadata(output),
373
- ...contents,
374
- };
375
- return response;
376
- };
377
- export const de_ListFraudsterRegistrationJobsCommand = async (output, context) => {
378
- if (output.statusCode >= 300) {
379
- return de_CommandError(output, context);
380
- }
381
- const data = await parseBody(output.body, context);
382
- let contents = {};
383
- contents = de_ListFraudsterRegistrationJobsResponse(data, context);
384
- const response = {
385
- $metadata: deserializeMetadata(output),
386
- ...contents,
387
- };
388
- return response;
389
- };
390
- export const de_ListFraudstersCommand = async (output, context) => {
391
- if (output.statusCode >= 300) {
392
- return de_CommandError(output, context);
393
- }
394
- const data = await parseBody(output.body, context);
395
- let contents = {};
396
- contents = de_ListFraudstersResponse(data, context);
397
- const response = {
398
- $metadata: deserializeMetadata(output),
399
- ...contents,
400
- };
401
- return response;
402
- };
403
- export const de_ListSpeakerEnrollmentJobsCommand = async (output, context) => {
404
- if (output.statusCode >= 300) {
405
- return de_CommandError(output, context);
406
- }
407
- const data = await parseBody(output.body, context);
408
- let contents = {};
409
- contents = de_ListSpeakerEnrollmentJobsResponse(data, context);
410
- const response = {
411
- $metadata: deserializeMetadata(output),
412
- ...contents,
413
- };
414
- return response;
415
- };
416
- export const de_ListSpeakersCommand = async (output, context) => {
417
- if (output.statusCode >= 300) {
418
- return de_CommandError(output, context);
419
- }
420
- const data = await parseBody(output.body, context);
421
- let contents = {};
422
- contents = de_ListSpeakersResponse(data, context);
423
- const response = {
424
- $metadata: deserializeMetadata(output),
425
- ...contents,
426
- };
427
- return response;
428
- };
429
- export const de_ListTagsForResourceCommand = async (output, context) => {
430
- if (output.statusCode >= 300) {
431
- return de_CommandError(output, context);
432
- }
433
- const data = await parseBody(output.body, context);
434
- let contents = {};
435
- contents = _json(data);
436
- const response = {
437
- $metadata: deserializeMetadata(output),
438
- ...contents,
439
- };
440
- return response;
441
- };
442
- export const de_ListWatchlistsCommand = async (output, context) => {
443
- if (output.statusCode >= 300) {
444
- return de_CommandError(output, context);
445
- }
446
- const data = await parseBody(output.body, context);
447
- let contents = {};
448
- contents = de_ListWatchlistsResponse(data, context);
449
- const response = {
450
- $metadata: deserializeMetadata(output),
451
- ...contents,
452
- };
453
- return response;
454
- };
455
- export const de_OptOutSpeakerCommand = async (output, context) => {
456
- if (output.statusCode >= 300) {
457
- return de_CommandError(output, context);
458
- }
459
- const data = await parseBody(output.body, context);
460
- let contents = {};
461
- contents = de_OptOutSpeakerResponse(data, context);
462
- const response = {
463
- $metadata: deserializeMetadata(output),
464
- ...contents,
465
- };
466
- return response;
467
- };
468
- export const de_StartFraudsterRegistrationJobCommand = async (output, context) => {
469
- if (output.statusCode >= 300) {
470
- return de_CommandError(output, context);
471
- }
472
- const data = await parseBody(output.body, context);
473
- let contents = {};
474
- contents = de_StartFraudsterRegistrationJobResponse(data, context);
475
- const response = {
476
- $metadata: deserializeMetadata(output),
477
- ...contents,
478
- };
479
- return response;
480
- };
481
- export const de_StartSpeakerEnrollmentJobCommand = async (output, context) => {
482
- if (output.statusCode >= 300) {
483
- return de_CommandError(output, context);
484
- }
485
- const data = await parseBody(output.body, context);
486
- let contents = {};
487
- contents = de_StartSpeakerEnrollmentJobResponse(data, context);
488
- const response = {
489
- $metadata: deserializeMetadata(output),
490
- ...contents,
491
- };
492
- return response;
493
- };
494
- export const de_TagResourceCommand = async (output, context) => {
495
- if (output.statusCode >= 300) {
496
- return de_CommandError(output, context);
497
- }
498
- const data = await parseBody(output.body, context);
499
- let contents = {};
500
- contents = _json(data);
501
- const response = {
502
- $metadata: deserializeMetadata(output),
503
- ...contents,
504
- };
505
- return response;
506
- };
507
- export const de_UntagResourceCommand = async (output, context) => {
508
- if (output.statusCode >= 300) {
509
- return de_CommandError(output, context);
510
- }
511
- const data = await parseBody(output.body, context);
512
- let contents = {};
513
- contents = _json(data);
514
- const response = {
515
- $metadata: deserializeMetadata(output),
516
- ...contents,
517
- };
518
- return response;
519
- };
520
- export const de_UpdateDomainCommand = async (output, context) => {
521
- if (output.statusCode >= 300) {
522
- return de_CommandError(output, context);
523
- }
524
- const data = await parseBody(output.body, context);
525
- let contents = {};
526
- contents = de_UpdateDomainResponse(data, context);
527
- const response = {
528
- $metadata: deserializeMetadata(output),
529
- ...contents,
530
- };
531
- return response;
532
- };
533
- export const de_UpdateWatchlistCommand = async (output, context) => {
534
- if (output.statusCode >= 300) {
535
- return de_CommandError(output, context);
536
- }
537
- const data = await parseBody(output.body, context);
538
- let contents = {};
539
- contents = de_UpdateWatchlistResponse(data, context);
540
- const response = {
541
- $metadata: deserializeMetadata(output),
542
- ...contents,
543
- };
544
- return response;
545
- };
546
- const de_CommandError = async (output, context) => {
547
- const parsedOutput = {
548
- ...output,
549
- body: await parseErrorBody(output.body, context),
550
- };
551
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
552
- switch (errorCode) {
553
- case "AccessDeniedException":
554
- case "com.amazonaws.voiceid#AccessDeniedException":
555
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
556
- case "ConflictException":
557
- case "com.amazonaws.voiceid#ConflictException":
558
- throw await de_ConflictExceptionRes(parsedOutput, context);
559
- case "InternalServerException":
560
- case "com.amazonaws.voiceid#InternalServerException":
561
- throw await de_InternalServerExceptionRes(parsedOutput, context);
562
- case "ResourceNotFoundException":
563
- case "com.amazonaws.voiceid#ResourceNotFoundException":
564
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
565
- case "ServiceQuotaExceededException":
566
- case "com.amazonaws.voiceid#ServiceQuotaExceededException":
567
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
568
- case "ThrottlingException":
569
- case "com.amazonaws.voiceid#ThrottlingException":
570
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
571
- case "ValidationException":
572
- case "com.amazonaws.voiceid#ValidationException":
573
- throw await de_ValidationExceptionRes(parsedOutput, context);
574
- default:
575
- const parsedBody = parsedOutput.body;
576
- return throwDefaultError({
577
- output,
578
- parsedBody,
579
- errorCode,
580
- });
581
- }
582
- };
583
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
584
- const body = parsedOutput.body;
585
- const deserialized = _json(body);
586
- const exception = new AccessDeniedException({
587
- $metadata: deserializeMetadata(parsedOutput),
588
- ...deserialized,
589
- });
590
- return __decorateServiceException(exception, body);
591
- };
592
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
593
- const body = parsedOutput.body;
594
- const deserialized = _json(body);
595
- const exception = new ConflictException({
596
- $metadata: deserializeMetadata(parsedOutput),
597
- ...deserialized,
598
- });
599
- return __decorateServiceException(exception, body);
600
- };
601
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
602
- const body = parsedOutput.body;
603
- const deserialized = _json(body);
604
- const exception = new InternalServerException({
605
- $metadata: deserializeMetadata(parsedOutput),
606
- ...deserialized,
607
- });
608
- return __decorateServiceException(exception, body);
609
- };
610
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
611
- const body = parsedOutput.body;
612
- const deserialized = _json(body);
613
- const exception = new ResourceNotFoundException({
614
- $metadata: deserializeMetadata(parsedOutput),
615
- ...deserialized,
616
- });
617
- return __decorateServiceException(exception, body);
618
- };
619
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
620
- const body = parsedOutput.body;
621
- const deserialized = _json(body);
622
- const exception = new ServiceQuotaExceededException({
623
- $metadata: deserializeMetadata(parsedOutput),
624
- ...deserialized,
625
- });
626
- return __decorateServiceException(exception, body);
627
- };
628
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
629
- const body = parsedOutput.body;
630
- const deserialized = _json(body);
631
- const exception = new ThrottlingException({
632
- $metadata: deserializeMetadata(parsedOutput),
633
- ...deserialized,
634
- });
635
- return __decorateServiceException(exception, body);
636
- };
637
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
638
- const body = parsedOutput.body;
639
- const deserialized = _json(body);
640
- const exception = new ValidationException({
641
- $metadata: deserializeMetadata(parsedOutput),
642
- ...deserialized,
643
- });
644
- return __decorateServiceException(exception, body);
645
- };
646
- const se_CreateDomainRequest = (input, context) => {
647
- return take(input, {
648
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
649
- Description: [],
650
- Name: [],
651
- ServerSideEncryptionConfiguration: _json,
652
- Tags: _json,
653
- });
654
- };
655
- const se_CreateWatchlistRequest = (input, context) => {
656
- return take(input, {
657
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
658
- Description: [],
659
- DomainId: [],
660
- Name: [],
661
- });
662
- };
663
- const se_StartFraudsterRegistrationJobRequest = (input, context) => {
664
- return take(input, {
665
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
666
- DataAccessRoleArn: [],
667
- DomainId: [],
668
- InputDataConfig: _json,
669
- JobName: [],
670
- OutputDataConfig: _json,
671
- RegistrationConfig: _json,
672
- });
673
- };
674
- const se_StartSpeakerEnrollmentJobRequest = (input, context) => {
675
- return take(input, {
676
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
677
- DataAccessRoleArn: [],
678
- DomainId: [],
679
- EnrollmentConfig: _json,
680
- InputDataConfig: _json,
681
- JobName: [],
682
- OutputDataConfig: _json,
683
- });
684
- };
685
- const de_AssociateFraudsterResponse = (output, context) => {
686
- return take(output, {
687
- Fraudster: (_) => de_Fraudster(_, context),
688
- });
689
- };
690
- const de_AuthenticationResult = (output, context) => {
691
- return take(output, {
692
- AudioAggregationEndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
693
- AudioAggregationStartedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
694
- AuthenticationResultId: __expectString,
695
- Configuration: _json,
696
- CustomerSpeakerId: __expectString,
697
- Decision: __expectString,
698
- GeneratedSpeakerId: __expectString,
699
- Score: __expectInt32,
700
- });
701
- };
702
- const de_CreateDomainResponse = (output, context) => {
703
- return take(output, {
704
- Domain: (_) => de_Domain(_, context),
705
- });
706
- };
707
- const de_CreateWatchlistResponse = (output, context) => {
708
- return take(output, {
709
- Watchlist: (_) => de_Watchlist(_, context),
710
- });
711
- };
712
- const de_DescribeDomainResponse = (output, context) => {
713
- return take(output, {
714
- Domain: (_) => de_Domain(_, context),
715
- });
716
- };
717
- const de_DescribeFraudsterRegistrationJobResponse = (output, context) => {
718
- return take(output, {
719
- Job: (_) => de_FraudsterRegistrationJob(_, context),
720
- });
721
- };
722
- const de_DescribeFraudsterResponse = (output, context) => {
723
- return take(output, {
724
- Fraudster: (_) => de_Fraudster(_, context),
725
- });
726
- };
727
- const de_DescribeSpeakerEnrollmentJobResponse = (output, context) => {
728
- return take(output, {
729
- Job: (_) => de_SpeakerEnrollmentJob(_, context),
730
- });
731
- };
732
- const de_DescribeSpeakerResponse = (output, context) => {
733
- return take(output, {
734
- Speaker: (_) => de_Speaker(_, context),
735
- });
736
- };
737
- const de_DescribeWatchlistResponse = (output, context) => {
738
- return take(output, {
739
- Watchlist: (_) => de_Watchlist(_, context),
740
- });
741
- };
742
- const de_DisassociateFraudsterResponse = (output, context) => {
743
- return take(output, {
744
- Fraudster: (_) => de_Fraudster(_, context),
745
- });
746
- };
747
- const de_Domain = (output, context) => {
748
- return take(output, {
749
- Arn: __expectString,
750
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
751
- Description: __expectString,
752
- DomainId: __expectString,
753
- DomainStatus: __expectString,
754
- Name: __expectString,
755
- ServerSideEncryptionConfiguration: _json,
756
- ServerSideEncryptionUpdateDetails: _json,
757
- UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
758
- WatchlistDetails: _json,
759
- });
760
- };
761
- const de_DomainSummaries = (output, context) => {
762
- const retVal = (output || [])
763
- .filter((e) => e != null)
764
- .map((entry) => {
765
- return de_DomainSummary(entry, context);
766
- });
767
- return retVal;
768
- };
769
- const de_DomainSummary = (output, context) => {
770
- return take(output, {
771
- Arn: __expectString,
772
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
773
- Description: __expectString,
774
- DomainId: __expectString,
775
- DomainStatus: __expectString,
776
- Name: __expectString,
777
- ServerSideEncryptionConfiguration: _json,
778
- ServerSideEncryptionUpdateDetails: _json,
779
- UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
780
- WatchlistDetails: _json,
781
- });
782
- };
783
- const de_EvaluateSessionResponse = (output, context) => {
784
- return take(output, {
785
- AuthenticationResult: (_) => de_AuthenticationResult(_, context),
786
- DomainId: __expectString,
787
- FraudDetectionResult: (_) => de_FraudDetectionResult(_, context),
788
- SessionId: __expectString,
789
- SessionName: __expectString,
790
- StreamingStatus: __expectString,
791
- });
792
- };
793
- const de_FraudDetectionResult = (output, context) => {
794
- return take(output, {
795
- AudioAggregationEndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
796
- AudioAggregationStartedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
797
- Configuration: _json,
798
- Decision: __expectString,
799
- FraudDetectionResultId: __expectString,
800
- Reasons: _json,
801
- RiskDetails: _json,
802
- });
803
- };
804
- const de_Fraudster = (output, context) => {
805
- return take(output, {
806
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
807
- DomainId: __expectString,
808
- GeneratedFraudsterId: __expectString,
809
- WatchlistIds: _json,
810
- });
811
- };
812
- const de_FraudsterRegistrationJob = (output, context) => {
813
- return take(output, {
814
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
815
- DataAccessRoleArn: __expectString,
816
- DomainId: __expectString,
817
- EndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
818
- FailureDetails: _json,
819
- InputDataConfig: _json,
820
- JobId: __expectString,
821
- JobName: __expectString,
822
- JobProgress: _json,
823
- JobStatus: __expectString,
824
- OutputDataConfig: _json,
825
- RegistrationConfig: _json,
826
- });
827
- };
828
- const de_FraudsterRegistrationJobSummaries = (output, context) => {
829
- const retVal = (output || [])
830
- .filter((e) => e != null)
831
- .map((entry) => {
832
- return de_FraudsterRegistrationJobSummary(entry, context);
833
- });
834
- return retVal;
835
- };
836
- const de_FraudsterRegistrationJobSummary = (output, context) => {
837
- return take(output, {
838
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
839
- DomainId: __expectString,
840
- EndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
841
- FailureDetails: _json,
842
- JobId: __expectString,
843
- JobName: __expectString,
844
- JobProgress: _json,
845
- JobStatus: __expectString,
846
- });
847
- };
848
- const de_FraudsterSummaries = (output, context) => {
849
- const retVal = (output || [])
850
- .filter((e) => e != null)
851
- .map((entry) => {
852
- return de_FraudsterSummary(entry, context);
853
- });
854
- return retVal;
855
- };
856
- const de_FraudsterSummary = (output, context) => {
857
- return take(output, {
858
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
859
- DomainId: __expectString,
860
- GeneratedFraudsterId: __expectString,
861
- WatchlistIds: _json,
862
- });
863
- };
864
- const de_ListDomainsResponse = (output, context) => {
865
- return take(output, {
866
- DomainSummaries: (_) => de_DomainSummaries(_, context),
867
- NextToken: __expectString,
868
- });
869
- };
870
- const de_ListFraudsterRegistrationJobsResponse = (output, context) => {
871
- return take(output, {
872
- JobSummaries: (_) => de_FraudsterRegistrationJobSummaries(_, context),
873
- NextToken: __expectString,
874
- });
875
- };
876
- const de_ListFraudstersResponse = (output, context) => {
877
- return take(output, {
878
- FraudsterSummaries: (_) => de_FraudsterSummaries(_, context),
879
- NextToken: __expectString,
880
- });
881
- };
882
- const de_ListSpeakerEnrollmentJobsResponse = (output, context) => {
883
- return take(output, {
884
- JobSummaries: (_) => de_SpeakerEnrollmentJobSummaries(_, context),
885
- NextToken: __expectString,
886
- });
887
- };
888
- const de_ListSpeakersResponse = (output, context) => {
889
- return take(output, {
890
- NextToken: __expectString,
891
- SpeakerSummaries: (_) => de_SpeakerSummaries(_, context),
892
- });
893
- };
894
- const de_ListWatchlistsResponse = (output, context) => {
895
- return take(output, {
896
- NextToken: __expectString,
897
- WatchlistSummaries: (_) => de_WatchlistSummaries(_, context),
898
- });
899
- };
900
- const de_OptOutSpeakerResponse = (output, context) => {
901
- return take(output, {
902
- Speaker: (_) => de_Speaker(_, context),
903
- });
904
- };
905
- const de_Speaker = (output, context) => {
906
- return take(output, {
907
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
908
- CustomerSpeakerId: __expectString,
909
- DomainId: __expectString,
910
- GeneratedSpeakerId: __expectString,
911
- LastAccessedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
912
- Status: __expectString,
913
- UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
914
- });
915
- };
916
- const de_SpeakerEnrollmentJob = (output, context) => {
917
- return take(output, {
918
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
919
- DataAccessRoleArn: __expectString,
920
- DomainId: __expectString,
921
- EndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
922
- EnrollmentConfig: _json,
923
- FailureDetails: _json,
924
- InputDataConfig: _json,
925
- JobId: __expectString,
926
- JobName: __expectString,
927
- JobProgress: _json,
928
- JobStatus: __expectString,
929
- OutputDataConfig: _json,
930
- });
931
- };
932
- const de_SpeakerEnrollmentJobSummaries = (output, context) => {
933
- const retVal = (output || [])
934
- .filter((e) => e != null)
935
- .map((entry) => {
936
- return de_SpeakerEnrollmentJobSummary(entry, context);
937
- });
938
- return retVal;
939
- };
940
- const de_SpeakerEnrollmentJobSummary = (output, context) => {
941
- return take(output, {
942
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
943
- DomainId: __expectString,
944
- EndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
945
- FailureDetails: _json,
946
- JobId: __expectString,
947
- JobName: __expectString,
948
- JobProgress: _json,
949
- JobStatus: __expectString,
950
- });
951
- };
952
- const de_SpeakerSummaries = (output, context) => {
953
- const retVal = (output || [])
954
- .filter((e) => e != null)
955
- .map((entry) => {
956
- return de_SpeakerSummary(entry, context);
957
- });
958
- return retVal;
959
- };
960
- const de_SpeakerSummary = (output, context) => {
961
- return take(output, {
962
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
963
- CustomerSpeakerId: __expectString,
964
- DomainId: __expectString,
965
- GeneratedSpeakerId: __expectString,
966
- LastAccessedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
967
- Status: __expectString,
968
- UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
969
- });
970
- };
971
- const de_StartFraudsterRegistrationJobResponse = (output, context) => {
972
- return take(output, {
973
- Job: (_) => de_FraudsterRegistrationJob(_, context),
974
- });
975
- };
976
- const de_StartSpeakerEnrollmentJobResponse = (output, context) => {
977
- return take(output, {
978
- Job: (_) => de_SpeakerEnrollmentJob(_, context),
979
- });
980
- };
981
- const de_UpdateDomainResponse = (output, context) => {
982
- return take(output, {
983
- Domain: (_) => de_Domain(_, context),
984
- });
985
- };
986
- const de_UpdateWatchlistResponse = (output, context) => {
987
- return take(output, {
988
- Watchlist: (_) => de_Watchlist(_, context),
989
- });
990
- };
991
- const de_Watchlist = (output, context) => {
992
- return take(output, {
993
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
994
- DefaultWatchlist: __expectBoolean,
995
- Description: __expectString,
996
- DomainId: __expectString,
997
- Name: __expectString,
998
- UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
999
- WatchlistId: __expectString,
1000
- });
1001
- };
1002
- const de_WatchlistSummaries = (output, context) => {
1003
- const retVal = (output || [])
1004
- .filter((e) => e != null)
1005
- .map((entry) => {
1006
- return de_WatchlistSummary(entry, context);
1007
- });
1008
- return retVal;
1009
- };
1010
- const de_WatchlistSummary = (output, context) => {
1011
- return take(output, {
1012
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1013
- DefaultWatchlist: __expectBoolean,
1014
- Description: __expectString,
1015
- DomainId: __expectString,
1016
- Name: __expectString,
1017
- UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1018
- WatchlistId: __expectString,
1019
- });
1020
- };
1021
- const deserializeMetadata = (output) => ({
1022
- httpStatusCode: output.statusCode,
1023
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1024
- extendedRequestId: output.headers["x-amz-id-2"],
1025
- cfId: output.headers["x-amz-cf-id"],
1026
- });
1027
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1028
- const throwDefaultError = withBaseException(__BaseException);
1029
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1030
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1031
- const contents = {
1032
- protocol,
1033
- hostname,
1034
- port,
1035
- method: "POST",
1036
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1037
- headers,
1038
- };
1039
- if (resolvedHostname !== undefined) {
1040
- contents.hostname = resolvedHostname;
1041
- }
1042
- if (body !== undefined) {
1043
- contents.body = body;
1044
- }
1045
- return new __HttpRequest(contents);
1046
- };
1047
- function sharedHeaders(operation) {
1048
- return {
1049
- "content-type": "application/x-amz-json-1.0",
1050
- "x-amz-target": `VoiceID.${operation}`,
1051
- };
1052
- }