@aws-sdk/client-connectparticipant 3.504.0 → 3.509.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
@@ -519,7 +519,7 @@ var se_StartAttachmentUploadCommand = /* @__PURE__ */ __name(async (input, conte
519
519
  }, "se_StartAttachmentUploadCommand");
520
520
  var de_CompleteAttachmentUploadCommand = /* @__PURE__ */ __name(async (output, context) => {
521
521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
522
- return de_CompleteAttachmentUploadCommandError(output, context);
522
+ return de_CommandError(output, context);
523
523
  }
524
524
  const contents = (0, import_smithy_client.map)({
525
525
  $metadata: deserializeMetadata(output)
@@ -527,43 +527,9 @@ var de_CompleteAttachmentUploadCommand = /* @__PURE__ */ __name(async (output, c
527
527
  await (0, import_smithy_client.collectBody)(output.body, context);
528
528
  return contents;
529
529
  }, "de_CompleteAttachmentUploadCommand");
530
- var de_CompleteAttachmentUploadCommandError = /* @__PURE__ */ __name(async (output, context) => {
531
- const parsedOutput = {
532
- ...output,
533
- body: await parseErrorBody(output.body, context)
534
- };
535
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
536
- switch (errorCode) {
537
- case "AccessDeniedException":
538
- case "com.amazonaws.connectparticipant#AccessDeniedException":
539
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
540
- case "ConflictException":
541
- case "com.amazonaws.connectparticipant#ConflictException":
542
- throw await de_ConflictExceptionRes(parsedOutput, context);
543
- case "InternalServerException":
544
- case "com.amazonaws.connectparticipant#InternalServerException":
545
- throw await de_InternalServerExceptionRes(parsedOutput, context);
546
- case "ServiceQuotaExceededException":
547
- case "com.amazonaws.connectparticipant#ServiceQuotaExceededException":
548
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
549
- case "ThrottlingException":
550
- case "com.amazonaws.connectparticipant#ThrottlingException":
551
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
552
- case "ValidationException":
553
- case "com.amazonaws.connectparticipant#ValidationException":
554
- throw await de_ValidationExceptionRes(parsedOutput, context);
555
- default:
556
- const parsedBody = parsedOutput.body;
557
- return throwDefaultError({
558
- output,
559
- parsedBody,
560
- errorCode
561
- });
562
- }
563
- }, "de_CompleteAttachmentUploadCommandError");
564
530
  var de_CreateParticipantConnectionCommand = /* @__PURE__ */ __name(async (output, context) => {
565
531
  if (output.statusCode !== 200 && output.statusCode >= 300) {
566
- return de_CreateParticipantConnectionCommandError(output, context);
532
+ return de_CommandError(output, context);
567
533
  }
568
534
  const contents = (0, import_smithy_client.map)({
569
535
  $metadata: deserializeMetadata(output)
@@ -576,37 +542,9 @@ var de_CreateParticipantConnectionCommand = /* @__PURE__ */ __name(async (output
576
542
  Object.assign(contents, doc);
577
543
  return contents;
578
544
  }, "de_CreateParticipantConnectionCommand");
579
- var de_CreateParticipantConnectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
580
- const parsedOutput = {
581
- ...output,
582
- body: await parseErrorBody(output.body, context)
583
- };
584
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
585
- switch (errorCode) {
586
- case "AccessDeniedException":
587
- case "com.amazonaws.connectparticipant#AccessDeniedException":
588
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
589
- case "InternalServerException":
590
- case "com.amazonaws.connectparticipant#InternalServerException":
591
- throw await de_InternalServerExceptionRes(parsedOutput, context);
592
- case "ThrottlingException":
593
- case "com.amazonaws.connectparticipant#ThrottlingException":
594
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
595
- case "ValidationException":
596
- case "com.amazonaws.connectparticipant#ValidationException":
597
- throw await de_ValidationExceptionRes(parsedOutput, context);
598
- default:
599
- const parsedBody = parsedOutput.body;
600
- return throwDefaultError({
601
- output,
602
- parsedBody,
603
- errorCode
604
- });
605
- }
606
- }, "de_CreateParticipantConnectionCommandError");
607
545
  var de_DescribeViewCommand = /* @__PURE__ */ __name(async (output, context) => {
608
546
  if (output.statusCode !== 200 && output.statusCode >= 300) {
609
- return de_DescribeViewCommandError(output, context);
547
+ return de_CommandError(output, context);
610
548
  }
611
549
  const contents = (0, import_smithy_client.map)({
612
550
  $metadata: deserializeMetadata(output)
@@ -618,40 +556,9 @@ var de_DescribeViewCommand = /* @__PURE__ */ __name(async (output, context) => {
618
556
  Object.assign(contents, doc);
619
557
  return contents;
620
558
  }, "de_DescribeViewCommand");
621
- var de_DescribeViewCommandError = /* @__PURE__ */ __name(async (output, context) => {
622
- const parsedOutput = {
623
- ...output,
624
- body: await parseErrorBody(output.body, context)
625
- };
626
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
627
- switch (errorCode) {
628
- case "AccessDeniedException":
629
- case "com.amazonaws.connectparticipant#AccessDeniedException":
630
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
631
- case "InternalServerException":
632
- case "com.amazonaws.connectparticipant#InternalServerException":
633
- throw await de_InternalServerExceptionRes(parsedOutput, context);
634
- case "ResourceNotFoundException":
635
- case "com.amazonaws.connectparticipant#ResourceNotFoundException":
636
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
637
- case "ThrottlingException":
638
- case "com.amazonaws.connectparticipant#ThrottlingException":
639
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
640
- case "ValidationException":
641
- case "com.amazonaws.connectparticipant#ValidationException":
642
- throw await de_ValidationExceptionRes(parsedOutput, context);
643
- default:
644
- const parsedBody = parsedOutput.body;
645
- return throwDefaultError({
646
- output,
647
- parsedBody,
648
- errorCode
649
- });
650
- }
651
- }, "de_DescribeViewCommandError");
652
559
  var de_DisconnectParticipantCommand = /* @__PURE__ */ __name(async (output, context) => {
653
560
  if (output.statusCode !== 200 && output.statusCode >= 300) {
654
- return de_DisconnectParticipantCommandError(output, context);
561
+ return de_CommandError(output, context);
655
562
  }
656
563
  const contents = (0, import_smithy_client.map)({
657
564
  $metadata: deserializeMetadata(output)
@@ -659,37 +566,9 @@ var de_DisconnectParticipantCommand = /* @__PURE__ */ __name(async (output, cont
659
566
  await (0, import_smithy_client.collectBody)(output.body, context);
660
567
  return contents;
661
568
  }, "de_DisconnectParticipantCommand");
662
- var de_DisconnectParticipantCommandError = /* @__PURE__ */ __name(async (output, context) => {
663
- const parsedOutput = {
664
- ...output,
665
- body: await parseErrorBody(output.body, context)
666
- };
667
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
668
- switch (errorCode) {
669
- case "AccessDeniedException":
670
- case "com.amazonaws.connectparticipant#AccessDeniedException":
671
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
672
- case "InternalServerException":
673
- case "com.amazonaws.connectparticipant#InternalServerException":
674
- throw await de_InternalServerExceptionRes(parsedOutput, context);
675
- case "ThrottlingException":
676
- case "com.amazonaws.connectparticipant#ThrottlingException":
677
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
678
- case "ValidationException":
679
- case "com.amazonaws.connectparticipant#ValidationException":
680
- throw await de_ValidationExceptionRes(parsedOutput, context);
681
- default:
682
- const parsedBody = parsedOutput.body;
683
- return throwDefaultError({
684
- output,
685
- parsedBody,
686
- errorCode
687
- });
688
- }
689
- }, "de_DisconnectParticipantCommandError");
690
569
  var de_GetAttachmentCommand = /* @__PURE__ */ __name(async (output, context) => {
691
570
  if (output.statusCode !== 200 && output.statusCode >= 300) {
692
- return de_GetAttachmentCommandError(output, context);
571
+ return de_CommandError(output, context);
693
572
  }
694
573
  const contents = (0, import_smithy_client.map)({
695
574
  $metadata: deserializeMetadata(output)
@@ -702,37 +581,9 @@ var de_GetAttachmentCommand = /* @__PURE__ */ __name(async (output, context) =>
702
581
  Object.assign(contents, doc);
703
582
  return contents;
704
583
  }, "de_GetAttachmentCommand");
705
- var de_GetAttachmentCommandError = /* @__PURE__ */ __name(async (output, context) => {
706
- const parsedOutput = {
707
- ...output,
708
- body: await parseErrorBody(output.body, context)
709
- };
710
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
711
- switch (errorCode) {
712
- case "AccessDeniedException":
713
- case "com.amazonaws.connectparticipant#AccessDeniedException":
714
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
715
- case "InternalServerException":
716
- case "com.amazonaws.connectparticipant#InternalServerException":
717
- throw await de_InternalServerExceptionRes(parsedOutput, context);
718
- case "ThrottlingException":
719
- case "com.amazonaws.connectparticipant#ThrottlingException":
720
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
721
- case "ValidationException":
722
- case "com.amazonaws.connectparticipant#ValidationException":
723
- throw await de_ValidationExceptionRes(parsedOutput, context);
724
- default:
725
- const parsedBody = parsedOutput.body;
726
- return throwDefaultError({
727
- output,
728
- parsedBody,
729
- errorCode
730
- });
731
- }
732
- }, "de_GetAttachmentCommandError");
733
584
  var de_GetTranscriptCommand = /* @__PURE__ */ __name(async (output, context) => {
734
585
  if (output.statusCode !== 200 && output.statusCode >= 300) {
735
- return de_GetTranscriptCommandError(output, context);
586
+ return de_CommandError(output, context);
736
587
  }
737
588
  const contents = (0, import_smithy_client.map)({
738
589
  $metadata: deserializeMetadata(output)
@@ -746,37 +597,9 @@ var de_GetTranscriptCommand = /* @__PURE__ */ __name(async (output, context) =>
746
597
  Object.assign(contents, doc);
747
598
  return contents;
748
599
  }, "de_GetTranscriptCommand");
749
- var de_GetTranscriptCommandError = /* @__PURE__ */ __name(async (output, context) => {
750
- const parsedOutput = {
751
- ...output,
752
- body: await parseErrorBody(output.body, context)
753
- };
754
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
755
- switch (errorCode) {
756
- case "AccessDeniedException":
757
- case "com.amazonaws.connectparticipant#AccessDeniedException":
758
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
759
- case "InternalServerException":
760
- case "com.amazonaws.connectparticipant#InternalServerException":
761
- throw await de_InternalServerExceptionRes(parsedOutput, context);
762
- case "ThrottlingException":
763
- case "com.amazonaws.connectparticipant#ThrottlingException":
764
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
765
- case "ValidationException":
766
- case "com.amazonaws.connectparticipant#ValidationException":
767
- throw await de_ValidationExceptionRes(parsedOutput, context);
768
- default:
769
- const parsedBody = parsedOutput.body;
770
- return throwDefaultError({
771
- output,
772
- parsedBody,
773
- errorCode
774
- });
775
- }
776
- }, "de_GetTranscriptCommandError");
777
600
  var de_SendEventCommand = /* @__PURE__ */ __name(async (output, context) => {
778
601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
779
- return de_SendEventCommandError(output, context);
602
+ return de_CommandError(output, context);
780
603
  }
781
604
  const contents = (0, import_smithy_client.map)({
782
605
  $metadata: deserializeMetadata(output)
@@ -789,40 +612,9 @@ var de_SendEventCommand = /* @__PURE__ */ __name(async (output, context) => {
789
612
  Object.assign(contents, doc);
790
613
  return contents;
791
614
  }, "de_SendEventCommand");
792
- var de_SendEventCommandError = /* @__PURE__ */ __name(async (output, context) => {
793
- const parsedOutput = {
794
- ...output,
795
- body: await parseErrorBody(output.body, context)
796
- };
797
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
798
- switch (errorCode) {
799
- case "AccessDeniedException":
800
- case "com.amazonaws.connectparticipant#AccessDeniedException":
801
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
802
- case "ConflictException":
803
- case "com.amazonaws.connectparticipant#ConflictException":
804
- throw await de_ConflictExceptionRes(parsedOutput, context);
805
- case "InternalServerException":
806
- case "com.amazonaws.connectparticipant#InternalServerException":
807
- throw await de_InternalServerExceptionRes(parsedOutput, context);
808
- case "ThrottlingException":
809
- case "com.amazonaws.connectparticipant#ThrottlingException":
810
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
811
- case "ValidationException":
812
- case "com.amazonaws.connectparticipant#ValidationException":
813
- throw await de_ValidationExceptionRes(parsedOutput, context);
814
- default:
815
- const parsedBody = parsedOutput.body;
816
- return throwDefaultError({
817
- output,
818
- parsedBody,
819
- errorCode
820
- });
821
- }
822
- }, "de_SendEventCommandError");
823
615
  var de_SendMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
824
616
  if (output.statusCode !== 200 && output.statusCode >= 300) {
825
- return de_SendMessageCommandError(output, context);
617
+ return de_CommandError(output, context);
826
618
  }
827
619
  const contents = (0, import_smithy_client.map)({
828
620
  $metadata: deserializeMetadata(output)
@@ -835,37 +627,9 @@ var de_SendMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
835
627
  Object.assign(contents, doc);
836
628
  return contents;
837
629
  }, "de_SendMessageCommand");
838
- var de_SendMessageCommandError = /* @__PURE__ */ __name(async (output, context) => {
839
- const parsedOutput = {
840
- ...output,
841
- body: await parseErrorBody(output.body, context)
842
- };
843
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
844
- switch (errorCode) {
845
- case "AccessDeniedException":
846
- case "com.amazonaws.connectparticipant#AccessDeniedException":
847
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
848
- case "InternalServerException":
849
- case "com.amazonaws.connectparticipant#InternalServerException":
850
- throw await de_InternalServerExceptionRes(parsedOutput, context);
851
- case "ThrottlingException":
852
- case "com.amazonaws.connectparticipant#ThrottlingException":
853
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
854
- case "ValidationException":
855
- case "com.amazonaws.connectparticipant#ValidationException":
856
- throw await de_ValidationExceptionRes(parsedOutput, context);
857
- default:
858
- const parsedBody = parsedOutput.body;
859
- return throwDefaultError({
860
- output,
861
- parsedBody,
862
- errorCode
863
- });
864
- }
865
- }, "de_SendMessageCommandError");
866
630
  var de_StartAttachmentUploadCommand = /* @__PURE__ */ __name(async (output, context) => {
867
631
  if (output.statusCode !== 200 && output.statusCode >= 300) {
868
- return de_StartAttachmentUploadCommandError(output, context);
632
+ return de_CommandError(output, context);
869
633
  }
870
634
  const contents = (0, import_smithy_client.map)({
871
635
  $metadata: deserializeMetadata(output)
@@ -878,7 +642,7 @@ var de_StartAttachmentUploadCommand = /* @__PURE__ */ __name(async (output, cont
878
642
  Object.assign(contents, doc);
879
643
  return contents;
880
644
  }, "de_StartAttachmentUploadCommand");
881
- var de_StartAttachmentUploadCommandError = /* @__PURE__ */ __name(async (output, context) => {
645
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
882
646
  const parsedOutput = {
883
647
  ...output,
884
648
  body: await parseErrorBody(output.body, context)
@@ -888,6 +652,9 @@ var de_StartAttachmentUploadCommandError = /* @__PURE__ */ __name(async (output,
888
652
  case "AccessDeniedException":
889
653
  case "com.amazonaws.connectparticipant#AccessDeniedException":
890
654
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
655
+ case "ConflictException":
656
+ case "com.amazonaws.connectparticipant#ConflictException":
657
+ throw await de_ConflictExceptionRes(parsedOutput, context);
891
658
  case "InternalServerException":
892
659
  case "com.amazonaws.connectparticipant#InternalServerException":
893
660
  throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -900,6 +667,9 @@ var de_StartAttachmentUploadCommandError = /* @__PURE__ */ __name(async (output,
900
667
  case "ValidationException":
901
668
  case "com.amazonaws.connectparticipant#ValidationException":
902
669
  throw await de_ValidationExceptionRes(parsedOutput, context);
670
+ case "ResourceNotFoundException":
671
+ case "com.amazonaws.connectparticipant#ResourceNotFoundException":
672
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
903
673
  default:
904
674
  const parsedBody = parsedOutput.body;
905
675
  return throwDefaultError({
@@ -908,7 +678,7 @@ var de_StartAttachmentUploadCommandError = /* @__PURE__ */ __name(async (output,
908
678
  errorCode
909
679
  });
910
680
  }
911
- }, "de_StartAttachmentUploadCommandError");
681
+ }, "de_CommandError");
912
682
  var throwDefaultError = (0, import_smithy_client.withBaseException)(ConnectParticipantServiceException);
913
683
  var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
914
684
  const contents = (0, import_smithy_client.map)({});
@@ -142,7 +142,7 @@ export const se_StartAttachmentUploadCommand = async (input, context) => {
142
142
  };
143
143
  export const de_CompleteAttachmentUploadCommand = async (output, context) => {
144
144
  if (output.statusCode !== 200 && output.statusCode >= 300) {
145
- return de_CompleteAttachmentUploadCommandError(output, context);
145
+ return de_CommandError(output, context);
146
146
  }
147
147
  const contents = map({
148
148
  $metadata: deserializeMetadata(output),
@@ -150,43 +150,9 @@ export const de_CompleteAttachmentUploadCommand = async (output, context) => {
150
150
  await collectBody(output.body, context);
151
151
  return contents;
152
152
  };
153
- const de_CompleteAttachmentUploadCommandError = async (output, context) => {
154
- const parsedOutput = {
155
- ...output,
156
- body: await parseErrorBody(output.body, context),
157
- };
158
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
159
- switch (errorCode) {
160
- case "AccessDeniedException":
161
- case "com.amazonaws.connectparticipant#AccessDeniedException":
162
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
163
- case "ConflictException":
164
- case "com.amazonaws.connectparticipant#ConflictException":
165
- throw await de_ConflictExceptionRes(parsedOutput, context);
166
- case "InternalServerException":
167
- case "com.amazonaws.connectparticipant#InternalServerException":
168
- throw await de_InternalServerExceptionRes(parsedOutput, context);
169
- case "ServiceQuotaExceededException":
170
- case "com.amazonaws.connectparticipant#ServiceQuotaExceededException":
171
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
172
- case "ThrottlingException":
173
- case "com.amazonaws.connectparticipant#ThrottlingException":
174
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
175
- case "ValidationException":
176
- case "com.amazonaws.connectparticipant#ValidationException":
177
- throw await de_ValidationExceptionRes(parsedOutput, context);
178
- default:
179
- const parsedBody = parsedOutput.body;
180
- return throwDefaultError({
181
- output,
182
- parsedBody,
183
- errorCode,
184
- });
185
- }
186
- };
187
153
  export const de_CreateParticipantConnectionCommand = async (output, context) => {
188
154
  if (output.statusCode !== 200 && output.statusCode >= 300) {
189
- return de_CreateParticipantConnectionCommandError(output, context);
155
+ return de_CommandError(output, context);
190
156
  }
191
157
  const contents = map({
192
158
  $metadata: deserializeMetadata(output),
@@ -199,37 +165,9 @@ export const de_CreateParticipantConnectionCommand = async (output, context) =>
199
165
  Object.assign(contents, doc);
200
166
  return contents;
201
167
  };
202
- const de_CreateParticipantConnectionCommandError = async (output, context) => {
203
- const parsedOutput = {
204
- ...output,
205
- body: await parseErrorBody(output.body, context),
206
- };
207
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
208
- switch (errorCode) {
209
- case "AccessDeniedException":
210
- case "com.amazonaws.connectparticipant#AccessDeniedException":
211
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
212
- case "InternalServerException":
213
- case "com.amazonaws.connectparticipant#InternalServerException":
214
- throw await de_InternalServerExceptionRes(parsedOutput, context);
215
- case "ThrottlingException":
216
- case "com.amazonaws.connectparticipant#ThrottlingException":
217
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
218
- case "ValidationException":
219
- case "com.amazonaws.connectparticipant#ValidationException":
220
- throw await de_ValidationExceptionRes(parsedOutput, context);
221
- default:
222
- const parsedBody = parsedOutput.body;
223
- return throwDefaultError({
224
- output,
225
- parsedBody,
226
- errorCode,
227
- });
228
- }
229
- };
230
168
  export const de_DescribeViewCommand = async (output, context) => {
231
169
  if (output.statusCode !== 200 && output.statusCode >= 300) {
232
- return de_DescribeViewCommandError(output, context);
170
+ return de_CommandError(output, context);
233
171
  }
234
172
  const contents = map({
235
173
  $metadata: deserializeMetadata(output),
@@ -241,40 +179,9 @@ export const de_DescribeViewCommand = async (output, context) => {
241
179
  Object.assign(contents, doc);
242
180
  return contents;
243
181
  };
244
- const de_DescribeViewCommandError = async (output, context) => {
245
- const parsedOutput = {
246
- ...output,
247
- body: await parseErrorBody(output.body, context),
248
- };
249
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
250
- switch (errorCode) {
251
- case "AccessDeniedException":
252
- case "com.amazonaws.connectparticipant#AccessDeniedException":
253
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
254
- case "InternalServerException":
255
- case "com.amazonaws.connectparticipant#InternalServerException":
256
- throw await de_InternalServerExceptionRes(parsedOutput, context);
257
- case "ResourceNotFoundException":
258
- case "com.amazonaws.connectparticipant#ResourceNotFoundException":
259
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
260
- case "ThrottlingException":
261
- case "com.amazonaws.connectparticipant#ThrottlingException":
262
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
263
- case "ValidationException":
264
- case "com.amazonaws.connectparticipant#ValidationException":
265
- throw await de_ValidationExceptionRes(parsedOutput, context);
266
- default:
267
- const parsedBody = parsedOutput.body;
268
- return throwDefaultError({
269
- output,
270
- parsedBody,
271
- errorCode,
272
- });
273
- }
274
- };
275
182
  export const de_DisconnectParticipantCommand = async (output, context) => {
276
183
  if (output.statusCode !== 200 && output.statusCode >= 300) {
277
- return de_DisconnectParticipantCommandError(output, context);
184
+ return de_CommandError(output, context);
278
185
  }
279
186
  const contents = map({
280
187
  $metadata: deserializeMetadata(output),
@@ -282,37 +189,9 @@ export const de_DisconnectParticipantCommand = async (output, context) => {
282
189
  await collectBody(output.body, context);
283
190
  return contents;
284
191
  };
285
- const de_DisconnectParticipantCommandError = async (output, context) => {
286
- const parsedOutput = {
287
- ...output,
288
- body: await parseErrorBody(output.body, context),
289
- };
290
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
291
- switch (errorCode) {
292
- case "AccessDeniedException":
293
- case "com.amazonaws.connectparticipant#AccessDeniedException":
294
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
295
- case "InternalServerException":
296
- case "com.amazonaws.connectparticipant#InternalServerException":
297
- throw await de_InternalServerExceptionRes(parsedOutput, context);
298
- case "ThrottlingException":
299
- case "com.amazonaws.connectparticipant#ThrottlingException":
300
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
301
- case "ValidationException":
302
- case "com.amazonaws.connectparticipant#ValidationException":
303
- throw await de_ValidationExceptionRes(parsedOutput, context);
304
- default:
305
- const parsedBody = parsedOutput.body;
306
- return throwDefaultError({
307
- output,
308
- parsedBody,
309
- errorCode,
310
- });
311
- }
312
- };
313
192
  export const de_GetAttachmentCommand = async (output, context) => {
314
193
  if (output.statusCode !== 200 && output.statusCode >= 300) {
315
- return de_GetAttachmentCommandError(output, context);
194
+ return de_CommandError(output, context);
316
195
  }
317
196
  const contents = map({
318
197
  $metadata: deserializeMetadata(output),
@@ -325,37 +204,9 @@ export const de_GetAttachmentCommand = async (output, context) => {
325
204
  Object.assign(contents, doc);
326
205
  return contents;
327
206
  };
328
- const de_GetAttachmentCommandError = async (output, context) => {
329
- const parsedOutput = {
330
- ...output,
331
- body: await parseErrorBody(output.body, context),
332
- };
333
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
334
- switch (errorCode) {
335
- case "AccessDeniedException":
336
- case "com.amazonaws.connectparticipant#AccessDeniedException":
337
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
338
- case "InternalServerException":
339
- case "com.amazonaws.connectparticipant#InternalServerException":
340
- throw await de_InternalServerExceptionRes(parsedOutput, context);
341
- case "ThrottlingException":
342
- case "com.amazonaws.connectparticipant#ThrottlingException":
343
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
344
- case "ValidationException":
345
- case "com.amazonaws.connectparticipant#ValidationException":
346
- throw await de_ValidationExceptionRes(parsedOutput, context);
347
- default:
348
- const parsedBody = parsedOutput.body;
349
- return throwDefaultError({
350
- output,
351
- parsedBody,
352
- errorCode,
353
- });
354
- }
355
- };
356
207
  export const de_GetTranscriptCommand = async (output, context) => {
357
208
  if (output.statusCode !== 200 && output.statusCode >= 300) {
358
- return de_GetTranscriptCommandError(output, context);
209
+ return de_CommandError(output, context);
359
210
  }
360
211
  const contents = map({
361
212
  $metadata: deserializeMetadata(output),
@@ -369,37 +220,9 @@ export const de_GetTranscriptCommand = async (output, context) => {
369
220
  Object.assign(contents, doc);
370
221
  return contents;
371
222
  };
372
- const de_GetTranscriptCommandError = async (output, context) => {
373
- const parsedOutput = {
374
- ...output,
375
- body: await parseErrorBody(output.body, context),
376
- };
377
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
378
- switch (errorCode) {
379
- case "AccessDeniedException":
380
- case "com.amazonaws.connectparticipant#AccessDeniedException":
381
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
382
- case "InternalServerException":
383
- case "com.amazonaws.connectparticipant#InternalServerException":
384
- throw await de_InternalServerExceptionRes(parsedOutput, context);
385
- case "ThrottlingException":
386
- case "com.amazonaws.connectparticipant#ThrottlingException":
387
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
388
- case "ValidationException":
389
- case "com.amazonaws.connectparticipant#ValidationException":
390
- throw await de_ValidationExceptionRes(parsedOutput, context);
391
- default:
392
- const parsedBody = parsedOutput.body;
393
- return throwDefaultError({
394
- output,
395
- parsedBody,
396
- errorCode,
397
- });
398
- }
399
- };
400
223
  export const de_SendEventCommand = async (output, context) => {
401
224
  if (output.statusCode !== 200 && output.statusCode >= 300) {
402
- return de_SendEventCommandError(output, context);
225
+ return de_CommandError(output, context);
403
226
  }
404
227
  const contents = map({
405
228
  $metadata: deserializeMetadata(output),
@@ -412,40 +235,9 @@ export const de_SendEventCommand = async (output, context) => {
412
235
  Object.assign(contents, doc);
413
236
  return contents;
414
237
  };
415
- const de_SendEventCommandError = async (output, context) => {
416
- const parsedOutput = {
417
- ...output,
418
- body: await parseErrorBody(output.body, context),
419
- };
420
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
421
- switch (errorCode) {
422
- case "AccessDeniedException":
423
- case "com.amazonaws.connectparticipant#AccessDeniedException":
424
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
425
- case "ConflictException":
426
- case "com.amazonaws.connectparticipant#ConflictException":
427
- throw await de_ConflictExceptionRes(parsedOutput, context);
428
- case "InternalServerException":
429
- case "com.amazonaws.connectparticipant#InternalServerException":
430
- throw await de_InternalServerExceptionRes(parsedOutput, context);
431
- case "ThrottlingException":
432
- case "com.amazonaws.connectparticipant#ThrottlingException":
433
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
434
- case "ValidationException":
435
- case "com.amazonaws.connectparticipant#ValidationException":
436
- throw await de_ValidationExceptionRes(parsedOutput, context);
437
- default:
438
- const parsedBody = parsedOutput.body;
439
- return throwDefaultError({
440
- output,
441
- parsedBody,
442
- errorCode,
443
- });
444
- }
445
- };
446
238
  export const de_SendMessageCommand = async (output, context) => {
447
239
  if (output.statusCode !== 200 && output.statusCode >= 300) {
448
- return de_SendMessageCommandError(output, context);
240
+ return de_CommandError(output, context);
449
241
  }
450
242
  const contents = map({
451
243
  $metadata: deserializeMetadata(output),
@@ -458,37 +250,9 @@ export const de_SendMessageCommand = async (output, context) => {
458
250
  Object.assign(contents, doc);
459
251
  return contents;
460
252
  };
461
- const de_SendMessageCommandError = async (output, context) => {
462
- const parsedOutput = {
463
- ...output,
464
- body: await parseErrorBody(output.body, context),
465
- };
466
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
467
- switch (errorCode) {
468
- case "AccessDeniedException":
469
- case "com.amazonaws.connectparticipant#AccessDeniedException":
470
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
471
- case "InternalServerException":
472
- case "com.amazonaws.connectparticipant#InternalServerException":
473
- throw await de_InternalServerExceptionRes(parsedOutput, context);
474
- case "ThrottlingException":
475
- case "com.amazonaws.connectparticipant#ThrottlingException":
476
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
477
- case "ValidationException":
478
- case "com.amazonaws.connectparticipant#ValidationException":
479
- throw await de_ValidationExceptionRes(parsedOutput, context);
480
- default:
481
- const parsedBody = parsedOutput.body;
482
- return throwDefaultError({
483
- output,
484
- parsedBody,
485
- errorCode,
486
- });
487
- }
488
- };
489
253
  export const de_StartAttachmentUploadCommand = async (output, context) => {
490
254
  if (output.statusCode !== 200 && output.statusCode >= 300) {
491
- return de_StartAttachmentUploadCommandError(output, context);
255
+ return de_CommandError(output, context);
492
256
  }
493
257
  const contents = map({
494
258
  $metadata: deserializeMetadata(output),
@@ -501,7 +265,7 @@ export const de_StartAttachmentUploadCommand = async (output, context) => {
501
265
  Object.assign(contents, doc);
502
266
  return contents;
503
267
  };
504
- const de_StartAttachmentUploadCommandError = async (output, context) => {
268
+ const de_CommandError = async (output, context) => {
505
269
  const parsedOutput = {
506
270
  ...output,
507
271
  body: await parseErrorBody(output.body, context),
@@ -511,6 +275,9 @@ const de_StartAttachmentUploadCommandError = async (output, context) => {
511
275
  case "AccessDeniedException":
512
276
  case "com.amazonaws.connectparticipant#AccessDeniedException":
513
277
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
278
+ case "ConflictException":
279
+ case "com.amazonaws.connectparticipant#ConflictException":
280
+ throw await de_ConflictExceptionRes(parsedOutput, context);
514
281
  case "InternalServerException":
515
282
  case "com.amazonaws.connectparticipant#InternalServerException":
516
283
  throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -523,6 +290,9 @@ const de_StartAttachmentUploadCommandError = async (output, context) => {
523
290
  case "ValidationException":
524
291
  case "com.amazonaws.connectparticipant#ValidationException":
525
292
  throw await de_ValidationExceptionRes(parsedOutput, context);
293
+ case "ResourceNotFoundException":
294
+ case "com.amazonaws.connectparticipant#ResourceNotFoundException":
295
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
526
296
  default:
527
297
  const parsedBody = parsedOutput.body;
528
298
  return throwDefaultError({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-connectparticipant",
3
3
  "description": "AWS SDK for JavaScript Connectparticipant Client for Node.js, Browser and React Native",
4
- "version": "3.504.0",
4
+ "version": "3.509.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-connectparticipant",
@@ -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.509.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",