@aws-sdk/client-pinpoint-sms-voice 3.504.0 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -385,7 +385,7 @@ var se_UpdateConfigurationSetEventDestinationCommand = /* @__PURE__ */ __name(as
385
385
  }, "se_UpdateConfigurationSetEventDestinationCommand");
386
386
  var de_CreateConfigurationSetCommand = /* @__PURE__ */ __name(async (output, context) => {
387
387
  if (output.statusCode !== 200 && output.statusCode >= 300) {
388
- return de_CreateConfigurationSetCommandError(output, context);
388
+ return de_CommandError(output, context);
389
389
  }
390
390
  const contents = (0, import_smithy_client.map)({
391
391
  $metadata: deserializeMetadata(output)
@@ -393,40 +393,9 @@ var de_CreateConfigurationSetCommand = /* @__PURE__ */ __name(async (output, con
393
393
  await (0, import_smithy_client.collectBody)(output.body, context);
394
394
  return contents;
395
395
  }, "de_CreateConfigurationSetCommand");
396
- var de_CreateConfigurationSetCommandError = /* @__PURE__ */ __name(async (output, context) => {
397
- const parsedOutput = {
398
- ...output,
399
- body: await parseErrorBody(output.body, context)
400
- };
401
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
- switch (errorCode) {
403
- case "AlreadyExistsException":
404
- case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
405
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
406
- case "BadRequestException":
407
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
408
- throw await de_BadRequestExceptionRes(parsedOutput, context);
409
- case "InternalServiceErrorException":
410
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
411
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
412
- case "LimitExceededException":
413
- case "com.amazonaws.pinpointsmsvoice#LimitExceededException":
414
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
415
- case "TooManyRequestsException":
416
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
417
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
418
- default:
419
- const parsedBody = parsedOutput.body;
420
- return throwDefaultError({
421
- output,
422
- parsedBody,
423
- errorCode
424
- });
425
- }
426
- }, "de_CreateConfigurationSetCommandError");
427
396
  var de_CreateConfigurationSetEventDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
428
397
  if (output.statusCode !== 200 && output.statusCode >= 300) {
429
- return de_CreateConfigurationSetEventDestinationCommandError(output, context);
398
+ return de_CommandError(output, context);
430
399
  }
431
400
  const contents = (0, import_smithy_client.map)({
432
401
  $metadata: deserializeMetadata(output)
@@ -434,43 +403,9 @@ var de_CreateConfigurationSetEventDestinationCommand = /* @__PURE__ */ __name(as
434
403
  await (0, import_smithy_client.collectBody)(output.body, context);
435
404
  return contents;
436
405
  }, "de_CreateConfigurationSetEventDestinationCommand");
437
- var de_CreateConfigurationSetEventDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
438
- const parsedOutput = {
439
- ...output,
440
- body: await parseErrorBody(output.body, context)
441
- };
442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
- switch (errorCode) {
444
- case "AlreadyExistsException":
445
- case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
446
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
447
- case "BadRequestException":
448
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
449
- throw await de_BadRequestExceptionRes(parsedOutput, context);
450
- case "InternalServiceErrorException":
451
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
452
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
453
- case "LimitExceededException":
454
- case "com.amazonaws.pinpointsmsvoice#LimitExceededException":
455
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
456
- case "NotFoundException":
457
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
458
- throw await de_NotFoundExceptionRes(parsedOutput, context);
459
- case "TooManyRequestsException":
460
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
461
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
462
- default:
463
- const parsedBody = parsedOutput.body;
464
- return throwDefaultError({
465
- output,
466
- parsedBody,
467
- errorCode
468
- });
469
- }
470
- }, "de_CreateConfigurationSetEventDestinationCommandError");
471
406
  var de_DeleteConfigurationSetCommand = /* @__PURE__ */ __name(async (output, context) => {
472
407
  if (output.statusCode !== 200 && output.statusCode >= 300) {
473
- return de_DeleteConfigurationSetCommandError(output, context);
408
+ return de_CommandError(output, context);
474
409
  }
475
410
  const contents = (0, import_smithy_client.map)({
476
411
  $metadata: deserializeMetadata(output)
@@ -478,37 +413,9 @@ var de_DeleteConfigurationSetCommand = /* @__PURE__ */ __name(async (output, con
478
413
  await (0, import_smithy_client.collectBody)(output.body, context);
479
414
  return contents;
480
415
  }, "de_DeleteConfigurationSetCommand");
481
- var de_DeleteConfigurationSetCommandError = /* @__PURE__ */ __name(async (output, context) => {
482
- const parsedOutput = {
483
- ...output,
484
- body: await parseErrorBody(output.body, context)
485
- };
486
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
487
- switch (errorCode) {
488
- case "BadRequestException":
489
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
490
- throw await de_BadRequestExceptionRes(parsedOutput, context);
491
- case "InternalServiceErrorException":
492
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
493
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
494
- case "NotFoundException":
495
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
496
- throw await de_NotFoundExceptionRes(parsedOutput, context);
497
- case "TooManyRequestsException":
498
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
499
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
500
- default:
501
- const parsedBody = parsedOutput.body;
502
- return throwDefaultError({
503
- output,
504
- parsedBody,
505
- errorCode
506
- });
507
- }
508
- }, "de_DeleteConfigurationSetCommandError");
509
416
  var de_DeleteConfigurationSetEventDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
510
417
  if (output.statusCode !== 200 && output.statusCode >= 300) {
511
- return de_DeleteConfigurationSetEventDestinationCommandError(output, context);
418
+ return de_CommandError(output, context);
512
419
  }
513
420
  const contents = (0, import_smithy_client.map)({
514
421
  $metadata: deserializeMetadata(output)
@@ -516,37 +423,9 @@ var de_DeleteConfigurationSetEventDestinationCommand = /* @__PURE__ */ __name(as
516
423
  await (0, import_smithy_client.collectBody)(output.body, context);
517
424
  return contents;
518
425
  }, "de_DeleteConfigurationSetEventDestinationCommand");
519
- var de_DeleteConfigurationSetEventDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
520
- const parsedOutput = {
521
- ...output,
522
- body: await parseErrorBody(output.body, context)
523
- };
524
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
525
- switch (errorCode) {
526
- case "BadRequestException":
527
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
528
- throw await de_BadRequestExceptionRes(parsedOutput, context);
529
- case "InternalServiceErrorException":
530
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
531
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
532
- case "NotFoundException":
533
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
534
- throw await de_NotFoundExceptionRes(parsedOutput, context);
535
- case "TooManyRequestsException":
536
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
537
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
538
- default:
539
- const parsedBody = parsedOutput.body;
540
- return throwDefaultError({
541
- output,
542
- parsedBody,
543
- errorCode
544
- });
545
- }
546
- }, "de_DeleteConfigurationSetEventDestinationCommandError");
547
426
  var de_GetConfigurationSetEventDestinationsCommand = /* @__PURE__ */ __name(async (output, context) => {
548
427
  if (output.statusCode !== 200 && output.statusCode >= 300) {
549
- return de_GetConfigurationSetEventDestinationsCommandError(output, context);
428
+ return de_CommandError(output, context);
550
429
  }
551
430
  const contents = (0, import_smithy_client.map)({
552
431
  $metadata: deserializeMetadata(output)
@@ -558,37 +437,9 @@ var de_GetConfigurationSetEventDestinationsCommand = /* @__PURE__ */ __name(asyn
558
437
  Object.assign(contents, doc);
559
438
  return contents;
560
439
  }, "de_GetConfigurationSetEventDestinationsCommand");
561
- var de_GetConfigurationSetEventDestinationsCommandError = /* @__PURE__ */ __name(async (output, context) => {
562
- const parsedOutput = {
563
- ...output,
564
- body: await parseErrorBody(output.body, context)
565
- };
566
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
567
- switch (errorCode) {
568
- case "BadRequestException":
569
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
570
- throw await de_BadRequestExceptionRes(parsedOutput, context);
571
- case "InternalServiceErrorException":
572
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
573
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
574
- case "NotFoundException":
575
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
576
- throw await de_NotFoundExceptionRes(parsedOutput, context);
577
- case "TooManyRequestsException":
578
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
579
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
580
- default:
581
- const parsedBody = parsedOutput.body;
582
- return throwDefaultError({
583
- output,
584
- parsedBody,
585
- errorCode
586
- });
587
- }
588
- }, "de_GetConfigurationSetEventDestinationsCommandError");
589
440
  var de_ListConfigurationSetsCommand = /* @__PURE__ */ __name(async (output, context) => {
590
441
  if (output.statusCode !== 200 && output.statusCode >= 300) {
591
- return de_ListConfigurationSetsCommandError(output, context);
442
+ return de_CommandError(output, context);
592
443
  }
593
444
  const contents = (0, import_smithy_client.map)({
594
445
  $metadata: deserializeMetadata(output)
@@ -601,34 +452,9 @@ var de_ListConfigurationSetsCommand = /* @__PURE__ */ __name(async (output, cont
601
452
  Object.assign(contents, doc);
602
453
  return contents;
603
454
  }, "de_ListConfigurationSetsCommand");
604
- var de_ListConfigurationSetsCommandError = /* @__PURE__ */ __name(async (output, context) => {
605
- const parsedOutput = {
606
- ...output,
607
- body: await parseErrorBody(output.body, context)
608
- };
609
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
610
- switch (errorCode) {
611
- case "BadRequestException":
612
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
613
- throw await de_BadRequestExceptionRes(parsedOutput, context);
614
- case "InternalServiceErrorException":
615
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
616
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
617
- case "TooManyRequestsException":
618
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
619
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
620
- default:
621
- const parsedBody = parsedOutput.body;
622
- return throwDefaultError({
623
- output,
624
- parsedBody,
625
- errorCode
626
- });
627
- }
628
- }, "de_ListConfigurationSetsCommandError");
629
455
  var de_SendVoiceMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
630
456
  if (output.statusCode !== 200 && output.statusCode >= 300) {
631
- return de_SendVoiceMessageCommandError(output, context);
457
+ return de_CommandError(output, context);
632
458
  }
633
459
  const contents = (0, import_smithy_client.map)({
634
460
  $metadata: deserializeMetadata(output)
@@ -640,34 +466,9 @@ var de_SendVoiceMessageCommand = /* @__PURE__ */ __name(async (output, context)
640
466
  Object.assign(contents, doc);
641
467
  return contents;
642
468
  }, "de_SendVoiceMessageCommand");
643
- var de_SendVoiceMessageCommandError = /* @__PURE__ */ __name(async (output, context) => {
644
- const parsedOutput = {
645
- ...output,
646
- body: await parseErrorBody(output.body, context)
647
- };
648
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
649
- switch (errorCode) {
650
- case "BadRequestException":
651
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
652
- throw await de_BadRequestExceptionRes(parsedOutput, context);
653
- case "InternalServiceErrorException":
654
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
655
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
656
- case "TooManyRequestsException":
657
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
658
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
659
- default:
660
- const parsedBody = parsedOutput.body;
661
- return throwDefaultError({
662
- output,
663
- parsedBody,
664
- errorCode
665
- });
666
- }
667
- }, "de_SendVoiceMessageCommandError");
668
469
  var de_UpdateConfigurationSetEventDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
669
470
  if (output.statusCode !== 200 && output.statusCode >= 300) {
670
- return de_UpdateConfigurationSetEventDestinationCommandError(output, context);
471
+ return de_CommandError(output, context);
671
472
  }
672
473
  const contents = (0, import_smithy_client.map)({
673
474
  $metadata: deserializeMetadata(output)
@@ -675,25 +476,31 @@ var de_UpdateConfigurationSetEventDestinationCommand = /* @__PURE__ */ __name(as
675
476
  await (0, import_smithy_client.collectBody)(output.body, context);
676
477
  return contents;
677
478
  }, "de_UpdateConfigurationSetEventDestinationCommand");
678
- var de_UpdateConfigurationSetEventDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
479
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
679
480
  const parsedOutput = {
680
481
  ...output,
681
482
  body: await parseErrorBody(output.body, context)
682
483
  };
683
484
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
684
485
  switch (errorCode) {
486
+ case "AlreadyExistsException":
487
+ case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
488
+ throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
685
489
  case "BadRequestException":
686
490
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
687
491
  throw await de_BadRequestExceptionRes(parsedOutput, context);
688
492
  case "InternalServiceErrorException":
689
493
  case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
690
494
  throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
691
- case "NotFoundException":
692
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
693
- throw await de_NotFoundExceptionRes(parsedOutput, context);
495
+ case "LimitExceededException":
496
+ case "com.amazonaws.pinpointsmsvoice#LimitExceededException":
497
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
694
498
  case "TooManyRequestsException":
695
499
  case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
696
500
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
501
+ case "NotFoundException":
502
+ case "com.amazonaws.pinpointsmsvoice#NotFoundException":
503
+ throw await de_NotFoundExceptionRes(parsedOutput, context);
697
504
  default:
698
505
  const parsedBody = parsedOutput.body;
699
506
  return throwDefaultError({
@@ -702,7 +509,7 @@ var de_UpdateConfigurationSetEventDestinationCommandError = /* @__PURE__ */ __na
702
509
  errorCode
703
510
  });
704
511
  }
705
- }, "de_UpdateConfigurationSetEventDestinationCommandError");
512
+ }, "de_CommandError");
706
513
  var throwDefaultError = (0, import_smithy_client.withBaseException)(PinpointSMSVoiceServiceException);
707
514
  var de_AlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
708
515
  const contents = (0, import_smithy_client.map)({});
@@ -104,7 +104,7 @@ export const se_UpdateConfigurationSetEventDestinationCommand = async (input, co
104
104
  };
105
105
  export const de_CreateConfigurationSetCommand = async (output, context) => {
106
106
  if (output.statusCode !== 200 && output.statusCode >= 300) {
107
- return de_CreateConfigurationSetCommandError(output, context);
107
+ return de_CommandError(output, context);
108
108
  }
109
109
  const contents = map({
110
110
  $metadata: deserializeMetadata(output),
@@ -112,40 +112,9 @@ export const de_CreateConfigurationSetCommand = async (output, context) => {
112
112
  await collectBody(output.body, context);
113
113
  return contents;
114
114
  };
115
- const de_CreateConfigurationSetCommandError = async (output, context) => {
116
- const parsedOutput = {
117
- ...output,
118
- body: await parseErrorBody(output.body, context),
119
- };
120
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
121
- switch (errorCode) {
122
- case "AlreadyExistsException":
123
- case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
124
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
125
- case "BadRequestException":
126
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
127
- throw await de_BadRequestExceptionRes(parsedOutput, context);
128
- case "InternalServiceErrorException":
129
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
130
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
131
- case "LimitExceededException":
132
- case "com.amazonaws.pinpointsmsvoice#LimitExceededException":
133
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
134
- case "TooManyRequestsException":
135
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
136
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
137
- default:
138
- const parsedBody = parsedOutput.body;
139
- return throwDefaultError({
140
- output,
141
- parsedBody,
142
- errorCode,
143
- });
144
- }
145
- };
146
115
  export const de_CreateConfigurationSetEventDestinationCommand = async (output, context) => {
147
116
  if (output.statusCode !== 200 && output.statusCode >= 300) {
148
- return de_CreateConfigurationSetEventDestinationCommandError(output, context);
117
+ return de_CommandError(output, context);
149
118
  }
150
119
  const contents = map({
151
120
  $metadata: deserializeMetadata(output),
@@ -153,43 +122,9 @@ export const de_CreateConfigurationSetEventDestinationCommand = async (output, c
153
122
  await collectBody(output.body, context);
154
123
  return contents;
155
124
  };
156
- const de_CreateConfigurationSetEventDestinationCommandError = async (output, context) => {
157
- const parsedOutput = {
158
- ...output,
159
- body: await parseErrorBody(output.body, context),
160
- };
161
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
162
- switch (errorCode) {
163
- case "AlreadyExistsException":
164
- case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
165
- throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
166
- case "BadRequestException":
167
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
168
- throw await de_BadRequestExceptionRes(parsedOutput, context);
169
- case "InternalServiceErrorException":
170
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
171
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
172
- case "LimitExceededException":
173
- case "com.amazonaws.pinpointsmsvoice#LimitExceededException":
174
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
175
- case "NotFoundException":
176
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
177
- throw await de_NotFoundExceptionRes(parsedOutput, context);
178
- case "TooManyRequestsException":
179
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
180
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
181
- default:
182
- const parsedBody = parsedOutput.body;
183
- return throwDefaultError({
184
- output,
185
- parsedBody,
186
- errorCode,
187
- });
188
- }
189
- };
190
125
  export const de_DeleteConfigurationSetCommand = async (output, context) => {
191
126
  if (output.statusCode !== 200 && output.statusCode >= 300) {
192
- return de_DeleteConfigurationSetCommandError(output, context);
127
+ return de_CommandError(output, context);
193
128
  }
194
129
  const contents = map({
195
130
  $metadata: deserializeMetadata(output),
@@ -197,37 +132,9 @@ export const de_DeleteConfigurationSetCommand = async (output, context) => {
197
132
  await collectBody(output.body, context);
198
133
  return contents;
199
134
  };
200
- const de_DeleteConfigurationSetCommandError = async (output, context) => {
201
- const parsedOutput = {
202
- ...output,
203
- body: await parseErrorBody(output.body, context),
204
- };
205
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
206
- switch (errorCode) {
207
- case "BadRequestException":
208
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
209
- throw await de_BadRequestExceptionRes(parsedOutput, context);
210
- case "InternalServiceErrorException":
211
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
212
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
213
- case "NotFoundException":
214
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
215
- throw await de_NotFoundExceptionRes(parsedOutput, context);
216
- case "TooManyRequestsException":
217
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
218
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
219
- default:
220
- const parsedBody = parsedOutput.body;
221
- return throwDefaultError({
222
- output,
223
- parsedBody,
224
- errorCode,
225
- });
226
- }
227
- };
228
135
  export const de_DeleteConfigurationSetEventDestinationCommand = async (output, context) => {
229
136
  if (output.statusCode !== 200 && output.statusCode >= 300) {
230
- return de_DeleteConfigurationSetEventDestinationCommandError(output, context);
137
+ return de_CommandError(output, context);
231
138
  }
232
139
  const contents = map({
233
140
  $metadata: deserializeMetadata(output),
@@ -235,37 +142,9 @@ export const de_DeleteConfigurationSetEventDestinationCommand = async (output, c
235
142
  await collectBody(output.body, context);
236
143
  return contents;
237
144
  };
238
- const de_DeleteConfigurationSetEventDestinationCommandError = async (output, context) => {
239
- const parsedOutput = {
240
- ...output,
241
- body: await parseErrorBody(output.body, context),
242
- };
243
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
244
- switch (errorCode) {
245
- case "BadRequestException":
246
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
247
- throw await de_BadRequestExceptionRes(parsedOutput, context);
248
- case "InternalServiceErrorException":
249
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
250
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
251
- case "NotFoundException":
252
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
253
- throw await de_NotFoundExceptionRes(parsedOutput, context);
254
- case "TooManyRequestsException":
255
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
256
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
257
- default:
258
- const parsedBody = parsedOutput.body;
259
- return throwDefaultError({
260
- output,
261
- parsedBody,
262
- errorCode,
263
- });
264
- }
265
- };
266
145
  export const de_GetConfigurationSetEventDestinationsCommand = async (output, context) => {
267
146
  if (output.statusCode !== 200 && output.statusCode >= 300) {
268
- return de_GetConfigurationSetEventDestinationsCommandError(output, context);
147
+ return de_CommandError(output, context);
269
148
  }
270
149
  const contents = map({
271
150
  $metadata: deserializeMetadata(output),
@@ -277,37 +156,9 @@ export const de_GetConfigurationSetEventDestinationsCommand = async (output, con
277
156
  Object.assign(contents, doc);
278
157
  return contents;
279
158
  };
280
- const de_GetConfigurationSetEventDestinationsCommandError = async (output, context) => {
281
- const parsedOutput = {
282
- ...output,
283
- body: await parseErrorBody(output.body, context),
284
- };
285
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
286
- switch (errorCode) {
287
- case "BadRequestException":
288
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
289
- throw await de_BadRequestExceptionRes(parsedOutput, context);
290
- case "InternalServiceErrorException":
291
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
292
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
293
- case "NotFoundException":
294
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
295
- throw await de_NotFoundExceptionRes(parsedOutput, context);
296
- case "TooManyRequestsException":
297
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
298
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
299
- default:
300
- const parsedBody = parsedOutput.body;
301
- return throwDefaultError({
302
- output,
303
- parsedBody,
304
- errorCode,
305
- });
306
- }
307
- };
308
159
  export const de_ListConfigurationSetsCommand = async (output, context) => {
309
160
  if (output.statusCode !== 200 && output.statusCode >= 300) {
310
- return de_ListConfigurationSetsCommandError(output, context);
161
+ return de_CommandError(output, context);
311
162
  }
312
163
  const contents = map({
313
164
  $metadata: deserializeMetadata(output),
@@ -320,34 +171,9 @@ export const de_ListConfigurationSetsCommand = async (output, context) => {
320
171
  Object.assign(contents, doc);
321
172
  return contents;
322
173
  };
323
- const de_ListConfigurationSetsCommandError = async (output, context) => {
324
- const parsedOutput = {
325
- ...output,
326
- body: await parseErrorBody(output.body, context),
327
- };
328
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
329
- switch (errorCode) {
330
- case "BadRequestException":
331
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
332
- throw await de_BadRequestExceptionRes(parsedOutput, context);
333
- case "InternalServiceErrorException":
334
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
335
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
336
- case "TooManyRequestsException":
337
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
338
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
339
- default:
340
- const parsedBody = parsedOutput.body;
341
- return throwDefaultError({
342
- output,
343
- parsedBody,
344
- errorCode,
345
- });
346
- }
347
- };
348
174
  export const de_SendVoiceMessageCommand = async (output, context) => {
349
175
  if (output.statusCode !== 200 && output.statusCode >= 300) {
350
- return de_SendVoiceMessageCommandError(output, context);
176
+ return de_CommandError(output, context);
351
177
  }
352
178
  const contents = map({
353
179
  $metadata: deserializeMetadata(output),
@@ -359,34 +185,9 @@ export const de_SendVoiceMessageCommand = async (output, context) => {
359
185
  Object.assign(contents, doc);
360
186
  return contents;
361
187
  };
362
- const de_SendVoiceMessageCommandError = async (output, context) => {
363
- const parsedOutput = {
364
- ...output,
365
- body: await parseErrorBody(output.body, context),
366
- };
367
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
368
- switch (errorCode) {
369
- case "BadRequestException":
370
- case "com.amazonaws.pinpointsmsvoice#BadRequestException":
371
- throw await de_BadRequestExceptionRes(parsedOutput, context);
372
- case "InternalServiceErrorException":
373
- case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
374
- throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
375
- case "TooManyRequestsException":
376
- case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
377
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
378
- default:
379
- const parsedBody = parsedOutput.body;
380
- return throwDefaultError({
381
- output,
382
- parsedBody,
383
- errorCode,
384
- });
385
- }
386
- };
387
188
  export const de_UpdateConfigurationSetEventDestinationCommand = async (output, context) => {
388
189
  if (output.statusCode !== 200 && output.statusCode >= 300) {
389
- return de_UpdateConfigurationSetEventDestinationCommandError(output, context);
190
+ return de_CommandError(output, context);
390
191
  }
391
192
  const contents = map({
392
193
  $metadata: deserializeMetadata(output),
@@ -394,25 +195,31 @@ export const de_UpdateConfigurationSetEventDestinationCommand = async (output, c
394
195
  await collectBody(output.body, context);
395
196
  return contents;
396
197
  };
397
- const de_UpdateConfigurationSetEventDestinationCommandError = async (output, context) => {
198
+ const de_CommandError = async (output, context) => {
398
199
  const parsedOutput = {
399
200
  ...output,
400
201
  body: await parseErrorBody(output.body, context),
401
202
  };
402
203
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
403
204
  switch (errorCode) {
205
+ case "AlreadyExistsException":
206
+ case "com.amazonaws.pinpointsmsvoice#AlreadyExistsException":
207
+ throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
404
208
  case "BadRequestException":
405
209
  case "com.amazonaws.pinpointsmsvoice#BadRequestException":
406
210
  throw await de_BadRequestExceptionRes(parsedOutput, context);
407
211
  case "InternalServiceErrorException":
408
212
  case "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException":
409
213
  throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
410
- case "NotFoundException":
411
- case "com.amazonaws.pinpointsmsvoice#NotFoundException":
412
- throw await de_NotFoundExceptionRes(parsedOutput, context);
214
+ case "LimitExceededException":
215
+ case "com.amazonaws.pinpointsmsvoice#LimitExceededException":
216
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
413
217
  case "TooManyRequestsException":
414
218
  case "com.amazonaws.pinpointsmsvoice#TooManyRequestsException":
415
219
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
220
+ case "NotFoundException":
221
+ case "com.amazonaws.pinpointsmsvoice#NotFoundException":
222
+ throw await de_NotFoundExceptionRes(parsedOutput, context);
416
223
  default:
417
224
  const parsedBody = parsedOutput.body;
418
225
  return throwDefaultError({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-pinpoint-sms-voice",
3
3
  "description": "AWS SDK for JavaScript Pinpoint Sms Voice Client for Node.js, Browser and React Native",
4
- "version": "3.504.0",
4
+ "version": "3.507.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-pinpoint-sms-voice",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.504.0",
23
+ "@aws-sdk/client-sts": "3.507.0",
24
24
  "@aws-sdk/core": "3.496.0",
25
- "@aws-sdk/credential-provider-node": "3.504.0",
25
+ "@aws-sdk/credential-provider-node": "3.507.0",
26
26
  "@aws-sdk/middleware-host-header": "3.502.0",
27
27
  "@aws-sdk/middleware-logger": "3.502.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.502.0",