@aws-sdk/client-connectparticipant 3.52.0 → 3.54.1
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/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/ConnectParticipantServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +86 -1
- package/dist-cjs/protocols/Aws_restJson1.js +109 -334
- package/dist-es/index.js +1 -0
- package/dist-es/models/ConnectParticipantServiceException.js +12 -0
- package/dist-es/models/models_0.js +80 -1
- package/dist-es/protocols/Aws_restJson1.js +197 -373
- package/dist-types/ConnectParticipantClient.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/ConnectParticipantServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +44 -19
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/ConnectParticipantClient.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/ConnectParticipantServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +32 -19
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +27 -27
|
@@ -4,6 +4,8 @@ exports.deserializeAws_restJson1StartAttachmentUploadCommand = exports.deseriali
|
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
7
|
+
const ConnectParticipantServiceException_1 = require("../models/ConnectParticipantServiceException");
|
|
8
|
+
const models_0_1 = require("../models/models_0");
|
|
7
9
|
const serializeAws_restJson1CompleteAttachmentUploadCommand = async (input, context) => {
|
|
8
10
|
var _a;
|
|
9
11
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -231,67 +233,31 @@ const deserializeAws_restJson1CompleteAttachmentUploadCommandError = async (outp
|
|
|
231
233
|
switch (errorCode) {
|
|
232
234
|
case "AccessDeniedException":
|
|
233
235
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
234
|
-
|
|
235
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
236
|
-
name: errorCode,
|
|
237
|
-
$metadata: deserializeMetadata(output),
|
|
238
|
-
};
|
|
239
|
-
break;
|
|
236
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
240
237
|
case "ConflictException":
|
|
241
238
|
case "com.amazonaws.connectparticipant#ConflictException":
|
|
242
|
-
|
|
243
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
244
|
-
name: errorCode,
|
|
245
|
-
$metadata: deserializeMetadata(output),
|
|
246
|
-
};
|
|
247
|
-
break;
|
|
239
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
248
240
|
case "InternalServerException":
|
|
249
241
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
250
|
-
|
|
251
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
252
|
-
name: errorCode,
|
|
253
|
-
$metadata: deserializeMetadata(output),
|
|
254
|
-
};
|
|
255
|
-
break;
|
|
242
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
256
243
|
case "ServiceQuotaExceededException":
|
|
257
244
|
case "com.amazonaws.connectparticipant#ServiceQuotaExceededException":
|
|
258
|
-
|
|
259
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
260
|
-
name: errorCode,
|
|
261
|
-
$metadata: deserializeMetadata(output),
|
|
262
|
-
};
|
|
263
|
-
break;
|
|
245
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
264
246
|
case "ThrottlingException":
|
|
265
247
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
266
|
-
|
|
267
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
268
|
-
name: errorCode,
|
|
269
|
-
$metadata: deserializeMetadata(output),
|
|
270
|
-
};
|
|
271
|
-
break;
|
|
248
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
272
249
|
case "ValidationException":
|
|
273
250
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
274
|
-
|
|
275
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
276
|
-
name: errorCode,
|
|
277
|
-
$metadata: deserializeMetadata(output),
|
|
278
|
-
};
|
|
279
|
-
break;
|
|
251
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
280
252
|
default:
|
|
281
253
|
const parsedBody = parsedOutput.body;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
...parsedBody,
|
|
285
|
-
name: `${errorCode}`,
|
|
286
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
254
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
255
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
287
256
|
$fault: "client",
|
|
288
257
|
$metadata: deserializeMetadata(output),
|
|
289
|
-
};
|
|
258
|
+
});
|
|
259
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
290
260
|
}
|
|
291
|
-
const message = response.message || response.Message || errorCode;
|
|
292
|
-
response.message = message;
|
|
293
|
-
delete response.Message;
|
|
294
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
295
261
|
};
|
|
296
262
|
const deserializeAws_restJson1CreateParticipantConnectionCommand = async (output, context) => {
|
|
297
263
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -323,51 +289,25 @@ const deserializeAws_restJson1CreateParticipantConnectionCommandError = async (o
|
|
|
323
289
|
switch (errorCode) {
|
|
324
290
|
case "AccessDeniedException":
|
|
325
291
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
326
|
-
|
|
327
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
328
|
-
name: errorCode,
|
|
329
|
-
$metadata: deserializeMetadata(output),
|
|
330
|
-
};
|
|
331
|
-
break;
|
|
292
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
332
293
|
case "InternalServerException":
|
|
333
294
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
334
|
-
|
|
335
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
336
|
-
name: errorCode,
|
|
337
|
-
$metadata: deserializeMetadata(output),
|
|
338
|
-
};
|
|
339
|
-
break;
|
|
295
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
340
296
|
case "ThrottlingException":
|
|
341
297
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
342
|
-
|
|
343
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
344
|
-
name: errorCode,
|
|
345
|
-
$metadata: deserializeMetadata(output),
|
|
346
|
-
};
|
|
347
|
-
break;
|
|
298
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
348
299
|
case "ValidationException":
|
|
349
300
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
350
|
-
|
|
351
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
352
|
-
name: errorCode,
|
|
353
|
-
$metadata: deserializeMetadata(output),
|
|
354
|
-
};
|
|
355
|
-
break;
|
|
301
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
356
302
|
default:
|
|
357
303
|
const parsedBody = parsedOutput.body;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
...parsedBody,
|
|
361
|
-
name: `${errorCode}`,
|
|
362
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
304
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
305
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
363
306
|
$fault: "client",
|
|
364
307
|
$metadata: deserializeMetadata(output),
|
|
365
|
-
};
|
|
308
|
+
});
|
|
309
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
366
310
|
}
|
|
367
|
-
const message = response.message || response.Message || errorCode;
|
|
368
|
-
response.message = message;
|
|
369
|
-
delete response.Message;
|
|
370
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
371
311
|
};
|
|
372
312
|
const deserializeAws_restJson1DisconnectParticipantCommand = async (output, context) => {
|
|
373
313
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -391,51 +331,25 @@ const deserializeAws_restJson1DisconnectParticipantCommandError = async (output,
|
|
|
391
331
|
switch (errorCode) {
|
|
392
332
|
case "AccessDeniedException":
|
|
393
333
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
394
|
-
|
|
395
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
396
|
-
name: errorCode,
|
|
397
|
-
$metadata: deserializeMetadata(output),
|
|
398
|
-
};
|
|
399
|
-
break;
|
|
334
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
400
335
|
case "InternalServerException":
|
|
401
336
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
402
|
-
|
|
403
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
404
|
-
name: errorCode,
|
|
405
|
-
$metadata: deserializeMetadata(output),
|
|
406
|
-
};
|
|
407
|
-
break;
|
|
337
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
408
338
|
case "ThrottlingException":
|
|
409
339
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
410
|
-
|
|
411
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
412
|
-
name: errorCode,
|
|
413
|
-
$metadata: deserializeMetadata(output),
|
|
414
|
-
};
|
|
415
|
-
break;
|
|
340
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
416
341
|
case "ValidationException":
|
|
417
342
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
418
|
-
|
|
419
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
420
|
-
name: errorCode,
|
|
421
|
-
$metadata: deserializeMetadata(output),
|
|
422
|
-
};
|
|
423
|
-
break;
|
|
343
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
424
344
|
default:
|
|
425
345
|
const parsedBody = parsedOutput.body;
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
...parsedBody,
|
|
429
|
-
name: `${errorCode}`,
|
|
430
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
346
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
347
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
431
348
|
$fault: "client",
|
|
432
349
|
$metadata: deserializeMetadata(output),
|
|
433
|
-
};
|
|
350
|
+
});
|
|
351
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
434
352
|
}
|
|
435
|
-
const message = response.message || response.Message || errorCode;
|
|
436
|
-
response.message = message;
|
|
437
|
-
delete response.Message;
|
|
438
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
439
353
|
};
|
|
440
354
|
const deserializeAws_restJson1GetAttachmentCommand = async (output, context) => {
|
|
441
355
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -467,51 +381,25 @@ const deserializeAws_restJson1GetAttachmentCommandError = async (output, context
|
|
|
467
381
|
switch (errorCode) {
|
|
468
382
|
case "AccessDeniedException":
|
|
469
383
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
470
|
-
|
|
471
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
472
|
-
name: errorCode,
|
|
473
|
-
$metadata: deserializeMetadata(output),
|
|
474
|
-
};
|
|
475
|
-
break;
|
|
384
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
476
385
|
case "InternalServerException":
|
|
477
386
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
478
|
-
|
|
479
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
480
|
-
name: errorCode,
|
|
481
|
-
$metadata: deserializeMetadata(output),
|
|
482
|
-
};
|
|
483
|
-
break;
|
|
387
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
484
388
|
case "ThrottlingException":
|
|
485
389
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
486
|
-
|
|
487
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
488
|
-
name: errorCode,
|
|
489
|
-
$metadata: deserializeMetadata(output),
|
|
490
|
-
};
|
|
491
|
-
break;
|
|
390
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
492
391
|
case "ValidationException":
|
|
493
392
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
494
|
-
|
|
495
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
496
|
-
name: errorCode,
|
|
497
|
-
$metadata: deserializeMetadata(output),
|
|
498
|
-
};
|
|
499
|
-
break;
|
|
393
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
500
394
|
default:
|
|
501
395
|
const parsedBody = parsedOutput.body;
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
...parsedBody,
|
|
505
|
-
name: `${errorCode}`,
|
|
506
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
396
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
397
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
507
398
|
$fault: "client",
|
|
508
399
|
$metadata: deserializeMetadata(output),
|
|
509
|
-
};
|
|
400
|
+
});
|
|
401
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
510
402
|
}
|
|
511
|
-
const message = response.message || response.Message || errorCode;
|
|
512
|
-
response.message = message;
|
|
513
|
-
delete response.Message;
|
|
514
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
515
403
|
};
|
|
516
404
|
const deserializeAws_restJson1GetTranscriptCommand = async (output, context) => {
|
|
517
405
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -547,51 +435,25 @@ const deserializeAws_restJson1GetTranscriptCommandError = async (output, context
|
|
|
547
435
|
switch (errorCode) {
|
|
548
436
|
case "AccessDeniedException":
|
|
549
437
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
550
|
-
|
|
551
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
552
|
-
name: errorCode,
|
|
553
|
-
$metadata: deserializeMetadata(output),
|
|
554
|
-
};
|
|
555
|
-
break;
|
|
438
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
556
439
|
case "InternalServerException":
|
|
557
440
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
558
|
-
|
|
559
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
560
|
-
name: errorCode,
|
|
561
|
-
$metadata: deserializeMetadata(output),
|
|
562
|
-
};
|
|
563
|
-
break;
|
|
441
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
564
442
|
case "ThrottlingException":
|
|
565
443
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
566
|
-
|
|
567
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
568
|
-
name: errorCode,
|
|
569
|
-
$metadata: deserializeMetadata(output),
|
|
570
|
-
};
|
|
571
|
-
break;
|
|
444
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
572
445
|
case "ValidationException":
|
|
573
446
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
574
|
-
|
|
575
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
576
|
-
name: errorCode,
|
|
577
|
-
$metadata: deserializeMetadata(output),
|
|
578
|
-
};
|
|
579
|
-
break;
|
|
447
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
580
448
|
default:
|
|
581
449
|
const parsedBody = parsedOutput.body;
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
...parsedBody,
|
|
585
|
-
name: `${errorCode}`,
|
|
586
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
450
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
451
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
587
452
|
$fault: "client",
|
|
588
453
|
$metadata: deserializeMetadata(output),
|
|
589
|
-
};
|
|
454
|
+
});
|
|
455
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
590
456
|
}
|
|
591
|
-
const message = response.message || response.Message || errorCode;
|
|
592
|
-
response.message = message;
|
|
593
|
-
delete response.Message;
|
|
594
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
595
457
|
};
|
|
596
458
|
const deserializeAws_restJson1SendEventCommand = async (output, context) => {
|
|
597
459
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -623,51 +485,25 @@ const deserializeAws_restJson1SendEventCommandError = async (output, context) =>
|
|
|
623
485
|
switch (errorCode) {
|
|
624
486
|
case "AccessDeniedException":
|
|
625
487
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
626
|
-
|
|
627
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
628
|
-
name: errorCode,
|
|
629
|
-
$metadata: deserializeMetadata(output),
|
|
630
|
-
};
|
|
631
|
-
break;
|
|
488
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
632
489
|
case "InternalServerException":
|
|
633
490
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
634
|
-
|
|
635
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
636
|
-
name: errorCode,
|
|
637
|
-
$metadata: deserializeMetadata(output),
|
|
638
|
-
};
|
|
639
|
-
break;
|
|
491
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
640
492
|
case "ThrottlingException":
|
|
641
493
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
642
|
-
|
|
643
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
644
|
-
name: errorCode,
|
|
645
|
-
$metadata: deserializeMetadata(output),
|
|
646
|
-
};
|
|
647
|
-
break;
|
|
494
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
648
495
|
case "ValidationException":
|
|
649
496
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
650
|
-
|
|
651
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
652
|
-
name: errorCode,
|
|
653
|
-
$metadata: deserializeMetadata(output),
|
|
654
|
-
};
|
|
655
|
-
break;
|
|
497
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
656
498
|
default:
|
|
657
499
|
const parsedBody = parsedOutput.body;
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
...parsedBody,
|
|
661
|
-
name: `${errorCode}`,
|
|
662
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
500
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
501
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
663
502
|
$fault: "client",
|
|
664
503
|
$metadata: deserializeMetadata(output),
|
|
665
|
-
};
|
|
504
|
+
});
|
|
505
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
666
506
|
}
|
|
667
|
-
const message = response.message || response.Message || errorCode;
|
|
668
|
-
response.message = message;
|
|
669
|
-
delete response.Message;
|
|
670
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
671
507
|
};
|
|
672
508
|
const deserializeAws_restJson1SendMessageCommand = async (output, context) => {
|
|
673
509
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -699,51 +535,25 @@ const deserializeAws_restJson1SendMessageCommandError = async (output, context)
|
|
|
699
535
|
switch (errorCode) {
|
|
700
536
|
case "AccessDeniedException":
|
|
701
537
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
702
|
-
|
|
703
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
704
|
-
name: errorCode,
|
|
705
|
-
$metadata: deserializeMetadata(output),
|
|
706
|
-
};
|
|
707
|
-
break;
|
|
538
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
708
539
|
case "InternalServerException":
|
|
709
540
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
710
|
-
|
|
711
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
712
|
-
name: errorCode,
|
|
713
|
-
$metadata: deserializeMetadata(output),
|
|
714
|
-
};
|
|
715
|
-
break;
|
|
541
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
716
542
|
case "ThrottlingException":
|
|
717
543
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
718
|
-
|
|
719
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
720
|
-
name: errorCode,
|
|
721
|
-
$metadata: deserializeMetadata(output),
|
|
722
|
-
};
|
|
723
|
-
break;
|
|
544
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
724
545
|
case "ValidationException":
|
|
725
546
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
726
|
-
|
|
727
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
728
|
-
name: errorCode,
|
|
729
|
-
$metadata: deserializeMetadata(output),
|
|
730
|
-
};
|
|
731
|
-
break;
|
|
547
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
732
548
|
default:
|
|
733
549
|
const parsedBody = parsedOutput.body;
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
...parsedBody,
|
|
737
|
-
name: `${errorCode}`,
|
|
738
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
550
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
551
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
739
552
|
$fault: "client",
|
|
740
553
|
$metadata: deserializeMetadata(output),
|
|
741
|
-
};
|
|
554
|
+
});
|
|
555
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
742
556
|
}
|
|
743
|
-
const message = response.message || response.Message || errorCode;
|
|
744
|
-
response.message = message;
|
|
745
|
-
delete response.Message;
|
|
746
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
747
557
|
};
|
|
748
558
|
const deserializeAws_restJson1StartAttachmentUploadCommand = async (output, context) => {
|
|
749
559
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -775,137 +585,100 @@ const deserializeAws_restJson1StartAttachmentUploadCommandError = async (output,
|
|
|
775
585
|
switch (errorCode) {
|
|
776
586
|
case "AccessDeniedException":
|
|
777
587
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
778
|
-
|
|
779
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
780
|
-
name: errorCode,
|
|
781
|
-
$metadata: deserializeMetadata(output),
|
|
782
|
-
};
|
|
783
|
-
break;
|
|
588
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
784
589
|
case "InternalServerException":
|
|
785
590
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
786
|
-
|
|
787
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
788
|
-
name: errorCode,
|
|
789
|
-
$metadata: deserializeMetadata(output),
|
|
790
|
-
};
|
|
791
|
-
break;
|
|
591
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
792
592
|
case "ServiceQuotaExceededException":
|
|
793
593
|
case "com.amazonaws.connectparticipant#ServiceQuotaExceededException":
|
|
794
|
-
|
|
795
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
796
|
-
name: errorCode,
|
|
797
|
-
$metadata: deserializeMetadata(output),
|
|
798
|
-
};
|
|
799
|
-
break;
|
|
594
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
800
595
|
case "ThrottlingException":
|
|
801
596
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
802
|
-
|
|
803
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
804
|
-
name: errorCode,
|
|
805
|
-
$metadata: deserializeMetadata(output),
|
|
806
|
-
};
|
|
807
|
-
break;
|
|
597
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
808
598
|
case "ValidationException":
|
|
809
599
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
810
|
-
|
|
811
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
812
|
-
name: errorCode,
|
|
813
|
-
$metadata: deserializeMetadata(output),
|
|
814
|
-
};
|
|
815
|
-
break;
|
|
600
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
816
601
|
default:
|
|
817
602
|
const parsedBody = parsedOutput.body;
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
...parsedBody,
|
|
821
|
-
name: `${errorCode}`,
|
|
822
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
603
|
+
response = new ConnectParticipantServiceException_1.ConnectParticipantServiceException({
|
|
604
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
823
605
|
$fault: "client",
|
|
824
606
|
$metadata: deserializeMetadata(output),
|
|
825
|
-
};
|
|
607
|
+
});
|
|
608
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
826
609
|
}
|
|
827
|
-
const message = response.message || response.Message || errorCode;
|
|
828
|
-
response.message = message;
|
|
829
|
-
delete response.Message;
|
|
830
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
831
610
|
};
|
|
832
611
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
833
|
-
const contents = {
|
|
834
|
-
name: "AccessDeniedException",
|
|
835
|
-
$fault: "client",
|
|
836
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
837
|
-
Message: undefined,
|
|
838
|
-
};
|
|
612
|
+
const contents = {};
|
|
839
613
|
const data = parsedOutput.body;
|
|
840
614
|
if (data.Message !== undefined && data.Message !== null) {
|
|
841
615
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
842
616
|
}
|
|
843
|
-
|
|
617
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
618
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
619
|
+
...contents,
|
|
620
|
+
});
|
|
621
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
844
622
|
};
|
|
845
623
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
846
|
-
const contents = {
|
|
847
|
-
name: "ConflictException",
|
|
848
|
-
$fault: "client",
|
|
849
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
850
|
-
Message: undefined,
|
|
851
|
-
};
|
|
624
|
+
const contents = {};
|
|
852
625
|
const data = parsedOutput.body;
|
|
853
626
|
if (data.Message !== undefined && data.Message !== null) {
|
|
854
627
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
855
628
|
}
|
|
856
|
-
|
|
629
|
+
const exception = new models_0_1.ConflictException({
|
|
630
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
631
|
+
...contents,
|
|
632
|
+
});
|
|
633
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
857
634
|
};
|
|
858
635
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
859
|
-
const contents = {
|
|
860
|
-
name: "InternalServerException",
|
|
861
|
-
$fault: "server",
|
|
862
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
863
|
-
Message: undefined,
|
|
864
|
-
};
|
|
636
|
+
const contents = {};
|
|
865
637
|
const data = parsedOutput.body;
|
|
866
638
|
if (data.Message !== undefined && data.Message !== null) {
|
|
867
639
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
868
640
|
}
|
|
869
|
-
|
|
641
|
+
const exception = new models_0_1.InternalServerException({
|
|
642
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
643
|
+
...contents,
|
|
644
|
+
});
|
|
645
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
870
646
|
};
|
|
871
647
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
872
|
-
const contents = {
|
|
873
|
-
name: "ServiceQuotaExceededException",
|
|
874
|
-
$fault: "client",
|
|
875
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
876
|
-
Message: undefined,
|
|
877
|
-
};
|
|
648
|
+
const contents = {};
|
|
878
649
|
const data = parsedOutput.body;
|
|
879
650
|
if (data.Message !== undefined && data.Message !== null) {
|
|
880
651
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
881
652
|
}
|
|
882
|
-
|
|
653
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
654
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
655
|
+
...contents,
|
|
656
|
+
});
|
|
657
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
883
658
|
};
|
|
884
659
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
885
|
-
const contents = {
|
|
886
|
-
name: "ThrottlingException",
|
|
887
|
-
$fault: "client",
|
|
888
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
889
|
-
Message: undefined,
|
|
890
|
-
};
|
|
660
|
+
const contents = {};
|
|
891
661
|
const data = parsedOutput.body;
|
|
892
662
|
if (data.Message !== undefined && data.Message !== null) {
|
|
893
663
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
894
664
|
}
|
|
895
|
-
|
|
665
|
+
const exception = new models_0_1.ThrottlingException({
|
|
666
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
667
|
+
...contents,
|
|
668
|
+
});
|
|
669
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
896
670
|
};
|
|
897
671
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
898
|
-
const contents = {
|
|
899
|
-
name: "ValidationException",
|
|
900
|
-
$fault: "client",
|
|
901
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
902
|
-
Message: undefined,
|
|
903
|
-
};
|
|
672
|
+
const contents = {};
|
|
904
673
|
const data = parsedOutput.body;
|
|
905
674
|
if (data.Message !== undefined && data.Message !== null) {
|
|
906
675
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
907
676
|
}
|
|
908
|
-
|
|
677
|
+
const exception = new models_0_1.ValidationException({
|
|
678
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
679
|
+
...contents,
|
|
680
|
+
});
|
|
681
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
909
682
|
};
|
|
910
683
|
const serializeAws_restJson1AttachmentIdList = (input, context) => {
|
|
911
684
|
return input
|
|
@@ -943,7 +716,7 @@ const deserializeAws_restJson1AttachmentItem = (output, context) => {
|
|
|
943
716
|
};
|
|
944
717
|
};
|
|
945
718
|
const deserializeAws_restJson1Attachments = (output, context) => {
|
|
946
|
-
|
|
719
|
+
const retVal = (output || [])
|
|
947
720
|
.filter((e) => e != null)
|
|
948
721
|
.map((entry) => {
|
|
949
722
|
if (entry === null) {
|
|
@@ -951,6 +724,7 @@ const deserializeAws_restJson1Attachments = (output, context) => {
|
|
|
951
724
|
}
|
|
952
725
|
return deserializeAws_restJson1AttachmentItem(entry, context);
|
|
953
726
|
});
|
|
727
|
+
return retVal;
|
|
954
728
|
};
|
|
955
729
|
const deserializeAws_restJson1ConnectionCredentials = (output, context) => {
|
|
956
730
|
return {
|
|
@@ -974,7 +748,7 @@ const deserializeAws_restJson1Item = (output, context) => {
|
|
|
974
748
|
};
|
|
975
749
|
};
|
|
976
750
|
const deserializeAws_restJson1Transcript = (output, context) => {
|
|
977
|
-
|
|
751
|
+
const retVal = (output || [])
|
|
978
752
|
.filter((e) => e != null)
|
|
979
753
|
.map((entry) => {
|
|
980
754
|
if (entry === null) {
|
|
@@ -982,6 +756,7 @@ const deserializeAws_restJson1Transcript = (output, context) => {
|
|
|
982
756
|
}
|
|
983
757
|
return deserializeAws_restJson1Item(entry, context);
|
|
984
758
|
});
|
|
759
|
+
return retVal;
|
|
985
760
|
};
|
|
986
761
|
const deserializeAws_restJson1UploadMetadata = (output, context) => {
|
|
987
762
|
return {
|
package/dist-es/index.js
CHANGED