@aws-sdk/client-lex-runtime-service 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 +25 -164
- package/dist-es/protocols/Aws_restJson1.js +24 -163
- package/package.json +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -573,7 +573,7 @@ var se_PutSessionCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
573
573
|
}, "se_PutSessionCommand");
|
|
574
574
|
var de_DeleteSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
575
575
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
576
|
-
return
|
|
576
|
+
return de_CommandError(output, context);
|
|
577
577
|
}
|
|
578
578
|
const contents = (0, import_smithy_client.map)({
|
|
579
579
|
$metadata: deserializeMetadata(output)
|
|
@@ -588,40 +588,9 @@ var de_DeleteSessionCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
588
588
|
Object.assign(contents, doc);
|
|
589
589
|
return contents;
|
|
590
590
|
}, "de_DeleteSessionCommand");
|
|
591
|
-
var de_DeleteSessionCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
592
|
-
const parsedOutput = {
|
|
593
|
-
...output,
|
|
594
|
-
body: await parseErrorBody(output.body, context)
|
|
595
|
-
};
|
|
596
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
597
|
-
switch (errorCode) {
|
|
598
|
-
case "BadRequestException":
|
|
599
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
600
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
601
|
-
case "ConflictException":
|
|
602
|
-
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
603
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
604
|
-
case "InternalFailureException":
|
|
605
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
606
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
607
|
-
case "LimitExceededException":
|
|
608
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
609
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
610
|
-
case "NotFoundException":
|
|
611
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
612
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
613
|
-
default:
|
|
614
|
-
const parsedBody = parsedOutput.body;
|
|
615
|
-
return throwDefaultError({
|
|
616
|
-
output,
|
|
617
|
-
parsedBody,
|
|
618
|
-
errorCode
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
}, "de_DeleteSessionCommandError");
|
|
622
591
|
var de_GetSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
623
592
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
624
|
-
return
|
|
593
|
+
return de_CommandError(output, context);
|
|
625
594
|
}
|
|
626
595
|
const contents = (0, import_smithy_client.map)({
|
|
627
596
|
$metadata: deserializeMetadata(output)
|
|
@@ -637,37 +606,9 @@ var de_GetSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
637
606
|
Object.assign(contents, doc);
|
|
638
607
|
return contents;
|
|
639
608
|
}, "de_GetSessionCommand");
|
|
640
|
-
var de_GetSessionCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
641
|
-
const parsedOutput = {
|
|
642
|
-
...output,
|
|
643
|
-
body: await parseErrorBody(output.body, context)
|
|
644
|
-
};
|
|
645
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
646
|
-
switch (errorCode) {
|
|
647
|
-
case "BadRequestException":
|
|
648
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
649
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
650
|
-
case "InternalFailureException":
|
|
651
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
652
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
653
|
-
case "LimitExceededException":
|
|
654
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
655
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
656
|
-
case "NotFoundException":
|
|
657
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
658
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
659
|
-
default:
|
|
660
|
-
const parsedBody = parsedOutput.body;
|
|
661
|
-
return throwDefaultError({
|
|
662
|
-
output,
|
|
663
|
-
parsedBody,
|
|
664
|
-
errorCode
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
}, "de_GetSessionCommandError");
|
|
668
609
|
var de_PostContentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
669
610
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
670
|
-
return
|
|
611
|
+
return de_CommandError(output, context);
|
|
671
612
|
}
|
|
672
613
|
const contents = (0, import_smithy_client.map)({
|
|
673
614
|
$metadata: deserializeMetadata(output),
|
|
@@ -709,58 +650,9 @@ var de_PostContentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
709
650
|
contents.audioStream = data;
|
|
710
651
|
return contents;
|
|
711
652
|
}, "de_PostContentCommand");
|
|
712
|
-
var de_PostContentCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
713
|
-
const parsedOutput = {
|
|
714
|
-
...output,
|
|
715
|
-
body: await parseErrorBody(output.body, context)
|
|
716
|
-
};
|
|
717
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
718
|
-
switch (errorCode) {
|
|
719
|
-
case "BadGatewayException":
|
|
720
|
-
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
721
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
722
|
-
case "BadRequestException":
|
|
723
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
724
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
725
|
-
case "ConflictException":
|
|
726
|
-
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
727
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
728
|
-
case "DependencyFailedException":
|
|
729
|
-
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
730
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
731
|
-
case "InternalFailureException":
|
|
732
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
733
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
734
|
-
case "LimitExceededException":
|
|
735
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
736
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
737
|
-
case "LoopDetectedException":
|
|
738
|
-
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
739
|
-
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
740
|
-
case "NotAcceptableException":
|
|
741
|
-
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
742
|
-
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
743
|
-
case "NotFoundException":
|
|
744
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
745
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
746
|
-
case "RequestTimeoutException":
|
|
747
|
-
case "com.amazonaws.lexruntimeservice#RequestTimeoutException":
|
|
748
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
749
|
-
case "UnsupportedMediaTypeException":
|
|
750
|
-
case "com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":
|
|
751
|
-
throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context);
|
|
752
|
-
default:
|
|
753
|
-
const parsedBody = parsedOutput.body;
|
|
754
|
-
return throwDefaultError({
|
|
755
|
-
output,
|
|
756
|
-
parsedBody,
|
|
757
|
-
errorCode
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
}, "de_PostContentCommandError");
|
|
761
653
|
var de_PostTextCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
762
654
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
763
|
-
return
|
|
655
|
+
return de_CommandError(output, context);
|
|
764
656
|
}
|
|
765
657
|
const contents = (0, import_smithy_client.map)({
|
|
766
658
|
$metadata: deserializeMetadata(output)
|
|
@@ -785,49 +677,9 @@ var de_PostTextCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
785
677
|
Object.assign(contents, doc);
|
|
786
678
|
return contents;
|
|
787
679
|
}, "de_PostTextCommand");
|
|
788
|
-
var de_PostTextCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
789
|
-
const parsedOutput = {
|
|
790
|
-
...output,
|
|
791
|
-
body: await parseErrorBody(output.body, context)
|
|
792
|
-
};
|
|
793
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
794
|
-
switch (errorCode) {
|
|
795
|
-
case "BadGatewayException":
|
|
796
|
-
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
797
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
798
|
-
case "BadRequestException":
|
|
799
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
800
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
801
|
-
case "ConflictException":
|
|
802
|
-
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
803
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
804
|
-
case "DependencyFailedException":
|
|
805
|
-
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
806
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
807
|
-
case "InternalFailureException":
|
|
808
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
809
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
810
|
-
case "LimitExceededException":
|
|
811
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
812
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
813
|
-
case "LoopDetectedException":
|
|
814
|
-
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
815
|
-
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
816
|
-
case "NotFoundException":
|
|
817
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
818
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
819
|
-
default:
|
|
820
|
-
const parsedBody = parsedOutput.body;
|
|
821
|
-
return throwDefaultError({
|
|
822
|
-
output,
|
|
823
|
-
parsedBody,
|
|
824
|
-
errorCode
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
}, "de_PostTextCommandError");
|
|
828
680
|
var de_PutSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
829
681
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
830
|
-
return
|
|
682
|
+
return de_CommandError(output, context);
|
|
831
683
|
}
|
|
832
684
|
const contents = (0, import_smithy_client.map)({
|
|
833
685
|
$metadata: deserializeMetadata(output),
|
|
@@ -857,37 +709,46 @@ var de_PutSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
857
709
|
contents.audioStream = data;
|
|
858
710
|
return contents;
|
|
859
711
|
}, "de_PutSessionCommand");
|
|
860
|
-
var
|
|
712
|
+
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
861
713
|
const parsedOutput = {
|
|
862
714
|
...output,
|
|
863
715
|
body: await parseErrorBody(output.body, context)
|
|
864
716
|
};
|
|
865
717
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
866
718
|
switch (errorCode) {
|
|
867
|
-
case "BadGatewayException":
|
|
868
|
-
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
869
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
870
719
|
case "BadRequestException":
|
|
871
720
|
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
872
721
|
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
873
722
|
case "ConflictException":
|
|
874
723
|
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
875
724
|
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
876
|
-
case "DependencyFailedException":
|
|
877
|
-
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
878
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
879
725
|
case "InternalFailureException":
|
|
880
726
|
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
881
727
|
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
882
728
|
case "LimitExceededException":
|
|
883
729
|
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
884
730
|
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
885
|
-
case "NotAcceptableException":
|
|
886
|
-
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
887
|
-
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
888
731
|
case "NotFoundException":
|
|
889
732
|
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
890
733
|
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
734
|
+
case "BadGatewayException":
|
|
735
|
+
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
736
|
+
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
737
|
+
case "DependencyFailedException":
|
|
738
|
+
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
739
|
+
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
740
|
+
case "LoopDetectedException":
|
|
741
|
+
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
742
|
+
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
743
|
+
case "NotAcceptableException":
|
|
744
|
+
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
745
|
+
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
746
|
+
case "RequestTimeoutException":
|
|
747
|
+
case "com.amazonaws.lexruntimeservice#RequestTimeoutException":
|
|
748
|
+
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
749
|
+
case "UnsupportedMediaTypeException":
|
|
750
|
+
case "com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":
|
|
751
|
+
throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context);
|
|
891
752
|
default:
|
|
892
753
|
const parsedBody = parsedOutput.body;
|
|
893
754
|
return throwDefaultError({
|
|
@@ -896,7 +757,7 @@ var de_PutSessionCommandError = /* @__PURE__ */ __name(async (output, context) =
|
|
|
896
757
|
errorCode
|
|
897
758
|
});
|
|
898
759
|
}
|
|
899
|
-
}, "
|
|
760
|
+
}, "de_CommandError");
|
|
900
761
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(LexRuntimeServiceServiceException);
|
|
901
762
|
var de_BadGatewayExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
902
763
|
const contents = (0, import_smithy_client.map)({});
|
|
@@ -98,7 +98,7 @@ export const se_PutSessionCommand = async (input, context) => {
|
|
|
98
98
|
};
|
|
99
99
|
export const de_DeleteSessionCommand = async (output, context) => {
|
|
100
100
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
101
|
-
return
|
|
101
|
+
return de_CommandError(output, context);
|
|
102
102
|
}
|
|
103
103
|
const contents = map({
|
|
104
104
|
$metadata: deserializeMetadata(output),
|
|
@@ -113,40 +113,9 @@ export const de_DeleteSessionCommand = async (output, context) => {
|
|
|
113
113
|
Object.assign(contents, doc);
|
|
114
114
|
return contents;
|
|
115
115
|
};
|
|
116
|
-
const de_DeleteSessionCommandError = async (output, context) => {
|
|
117
|
-
const parsedOutput = {
|
|
118
|
-
...output,
|
|
119
|
-
body: await parseErrorBody(output.body, context),
|
|
120
|
-
};
|
|
121
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
122
|
-
switch (errorCode) {
|
|
123
|
-
case "BadRequestException":
|
|
124
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
125
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
126
|
-
case "ConflictException":
|
|
127
|
-
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
128
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
129
|
-
case "InternalFailureException":
|
|
130
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
131
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
132
|
-
case "LimitExceededException":
|
|
133
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
134
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
135
|
-
case "NotFoundException":
|
|
136
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
137
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
138
|
-
default:
|
|
139
|
-
const parsedBody = parsedOutput.body;
|
|
140
|
-
return throwDefaultError({
|
|
141
|
-
output,
|
|
142
|
-
parsedBody,
|
|
143
|
-
errorCode,
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
116
|
export const de_GetSessionCommand = async (output, context) => {
|
|
148
117
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
149
|
-
return
|
|
118
|
+
return de_CommandError(output, context);
|
|
150
119
|
}
|
|
151
120
|
const contents = map({
|
|
152
121
|
$metadata: deserializeMetadata(output),
|
|
@@ -162,37 +131,9 @@ export const de_GetSessionCommand = async (output, context) => {
|
|
|
162
131
|
Object.assign(contents, doc);
|
|
163
132
|
return contents;
|
|
164
133
|
};
|
|
165
|
-
const de_GetSessionCommandError = async (output, context) => {
|
|
166
|
-
const parsedOutput = {
|
|
167
|
-
...output,
|
|
168
|
-
body: await parseErrorBody(output.body, context),
|
|
169
|
-
};
|
|
170
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
171
|
-
switch (errorCode) {
|
|
172
|
-
case "BadRequestException":
|
|
173
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
174
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
175
|
-
case "InternalFailureException":
|
|
176
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
177
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
178
|
-
case "LimitExceededException":
|
|
179
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
180
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
181
|
-
case "NotFoundException":
|
|
182
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
183
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
184
|
-
default:
|
|
185
|
-
const parsedBody = parsedOutput.body;
|
|
186
|
-
return throwDefaultError({
|
|
187
|
-
output,
|
|
188
|
-
parsedBody,
|
|
189
|
-
errorCode,
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
134
|
export const de_PostContentCommand = async (output, context) => {
|
|
194
135
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
195
|
-
return
|
|
136
|
+
return de_CommandError(output, context);
|
|
196
137
|
}
|
|
197
138
|
const contents = map({
|
|
198
139
|
$metadata: deserializeMetadata(output),
|
|
@@ -234,58 +175,9 @@ export const de_PostContentCommand = async (output, context) => {
|
|
|
234
175
|
contents.audioStream = data;
|
|
235
176
|
return contents;
|
|
236
177
|
};
|
|
237
|
-
const de_PostContentCommandError = async (output, context) => {
|
|
238
|
-
const parsedOutput = {
|
|
239
|
-
...output,
|
|
240
|
-
body: await parseErrorBody(output.body, context),
|
|
241
|
-
};
|
|
242
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
243
|
-
switch (errorCode) {
|
|
244
|
-
case "BadGatewayException":
|
|
245
|
-
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
246
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
247
|
-
case "BadRequestException":
|
|
248
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
249
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
250
|
-
case "ConflictException":
|
|
251
|
-
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
252
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
253
|
-
case "DependencyFailedException":
|
|
254
|
-
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
255
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
256
|
-
case "InternalFailureException":
|
|
257
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
258
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
259
|
-
case "LimitExceededException":
|
|
260
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
261
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
262
|
-
case "LoopDetectedException":
|
|
263
|
-
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
264
|
-
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
265
|
-
case "NotAcceptableException":
|
|
266
|
-
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
267
|
-
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
268
|
-
case "NotFoundException":
|
|
269
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
270
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
271
|
-
case "RequestTimeoutException":
|
|
272
|
-
case "com.amazonaws.lexruntimeservice#RequestTimeoutException":
|
|
273
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
274
|
-
case "UnsupportedMediaTypeException":
|
|
275
|
-
case "com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":
|
|
276
|
-
throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context);
|
|
277
|
-
default:
|
|
278
|
-
const parsedBody = parsedOutput.body;
|
|
279
|
-
return throwDefaultError({
|
|
280
|
-
output,
|
|
281
|
-
parsedBody,
|
|
282
|
-
errorCode,
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
178
|
export const de_PostTextCommand = async (output, context) => {
|
|
287
179
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
288
|
-
return
|
|
180
|
+
return de_CommandError(output, context);
|
|
289
181
|
}
|
|
290
182
|
const contents = map({
|
|
291
183
|
$metadata: deserializeMetadata(output),
|
|
@@ -310,49 +202,9 @@ export const de_PostTextCommand = async (output, context) => {
|
|
|
310
202
|
Object.assign(contents, doc);
|
|
311
203
|
return contents;
|
|
312
204
|
};
|
|
313
|
-
const de_PostTextCommandError = async (output, context) => {
|
|
314
|
-
const parsedOutput = {
|
|
315
|
-
...output,
|
|
316
|
-
body: await parseErrorBody(output.body, context),
|
|
317
|
-
};
|
|
318
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
319
|
-
switch (errorCode) {
|
|
320
|
-
case "BadGatewayException":
|
|
321
|
-
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
322
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
323
|
-
case "BadRequestException":
|
|
324
|
-
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
325
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
326
|
-
case "ConflictException":
|
|
327
|
-
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
328
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
329
|
-
case "DependencyFailedException":
|
|
330
|
-
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
331
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
332
|
-
case "InternalFailureException":
|
|
333
|
-
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
334
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
335
|
-
case "LimitExceededException":
|
|
336
|
-
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
337
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
338
|
-
case "LoopDetectedException":
|
|
339
|
-
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
340
|
-
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
341
|
-
case "NotFoundException":
|
|
342
|
-
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
343
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
344
|
-
default:
|
|
345
|
-
const parsedBody = parsedOutput.body;
|
|
346
|
-
return throwDefaultError({
|
|
347
|
-
output,
|
|
348
|
-
parsedBody,
|
|
349
|
-
errorCode,
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
205
|
export const de_PutSessionCommand = async (output, context) => {
|
|
354
206
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
355
|
-
return
|
|
207
|
+
return de_CommandError(output, context);
|
|
356
208
|
}
|
|
357
209
|
const contents = map({
|
|
358
210
|
$metadata: deserializeMetadata(output),
|
|
@@ -382,37 +234,46 @@ export const de_PutSessionCommand = async (output, context) => {
|
|
|
382
234
|
contents.audioStream = data;
|
|
383
235
|
return contents;
|
|
384
236
|
};
|
|
385
|
-
const
|
|
237
|
+
const de_CommandError = async (output, context) => {
|
|
386
238
|
const parsedOutput = {
|
|
387
239
|
...output,
|
|
388
240
|
body: await parseErrorBody(output.body, context),
|
|
389
241
|
};
|
|
390
242
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
391
243
|
switch (errorCode) {
|
|
392
|
-
case "BadGatewayException":
|
|
393
|
-
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
394
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
395
244
|
case "BadRequestException":
|
|
396
245
|
case "com.amazonaws.lexruntimeservice#BadRequestException":
|
|
397
246
|
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
398
247
|
case "ConflictException":
|
|
399
248
|
case "com.amazonaws.lexruntimeservice#ConflictException":
|
|
400
249
|
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
401
|
-
case "DependencyFailedException":
|
|
402
|
-
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
403
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
404
250
|
case "InternalFailureException":
|
|
405
251
|
case "com.amazonaws.lexruntimeservice#InternalFailureException":
|
|
406
252
|
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
407
253
|
case "LimitExceededException":
|
|
408
254
|
case "com.amazonaws.lexruntimeservice#LimitExceededException":
|
|
409
255
|
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
410
|
-
case "NotAcceptableException":
|
|
411
|
-
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
412
|
-
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
413
256
|
case "NotFoundException":
|
|
414
257
|
case "com.amazonaws.lexruntimeservice#NotFoundException":
|
|
415
258
|
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
259
|
+
case "BadGatewayException":
|
|
260
|
+
case "com.amazonaws.lexruntimeservice#BadGatewayException":
|
|
261
|
+
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
262
|
+
case "DependencyFailedException":
|
|
263
|
+
case "com.amazonaws.lexruntimeservice#DependencyFailedException":
|
|
264
|
+
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
265
|
+
case "LoopDetectedException":
|
|
266
|
+
case "com.amazonaws.lexruntimeservice#LoopDetectedException":
|
|
267
|
+
throw await de_LoopDetectedExceptionRes(parsedOutput, context);
|
|
268
|
+
case "NotAcceptableException":
|
|
269
|
+
case "com.amazonaws.lexruntimeservice#NotAcceptableException":
|
|
270
|
+
throw await de_NotAcceptableExceptionRes(parsedOutput, context);
|
|
271
|
+
case "RequestTimeoutException":
|
|
272
|
+
case "com.amazonaws.lexruntimeservice#RequestTimeoutException":
|
|
273
|
+
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
274
|
+
case "UnsupportedMediaTypeException":
|
|
275
|
+
case "com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":
|
|
276
|
+
throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context);
|
|
416
277
|
default:
|
|
417
278
|
const parsedBody = parsedOutput.body;
|
|
418
279
|
return throwDefaultError({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-lex-runtime-service",
|
|
3
3
|
"description": "AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
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-lex-runtime-service",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
25
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
+
"@aws-sdk/client-sts": "3.507.0",
|
|
26
26
|
"@aws-sdk/core": "3.496.0",
|
|
27
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
+
"@aws-sdk/credential-provider-node": "3.507.0",
|
|
28
28
|
"@aws-sdk/middleware-host-header": "3.502.0",
|
|
29
29
|
"@aws-sdk/middleware-logger": "3.502.0",
|
|
30
30
|
"@aws-sdk/middleware-recursion-detection": "3.502.0",
|