@aws-sdk/client-lex-runtime-v2 3.118.0 → 3.121.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/CHANGELOG.md +30 -0
- package/dist-cjs/protocols/Aws_restJson1.js +36 -25
- package/dist-es/protocols/Aws_restJson1.js +36 -25
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.120.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.119.0...v3.120.0) (2022-06-29)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* populate content-type header for all event messages ([#3760](https://github.com/aws/aws-sdk-js-v3/issues/3760)) ([4f3d41e](https://github.com/aws/aws-sdk-js-v3/commit/4f3d41e3d30207033487de947a461cbfe195767e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @aws-sdk/client-lex-runtime-v2
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
# [3.118.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.117.0...v3.118.0) (2022-06-24)
|
|
7
37
|
|
|
8
38
|
**Note:** Version bump only for package @aws-sdk/client-lex-runtime-v2
|
|
@@ -425,8 +425,7 @@ const deserializeAws_restJson1DeleteSessionCommandError = async (output, context
|
|
|
425
425
|
body: await parseBody(output.body, context),
|
|
426
426
|
};
|
|
427
427
|
let response;
|
|
428
|
-
|
|
429
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
428
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
430
429
|
switch (errorCode) {
|
|
431
430
|
case "AccessDeniedException":
|
|
432
431
|
case "com.amazonaws.lexruntimev2#AccessDeniedException":
|
|
@@ -448,10 +447,12 @@ const deserializeAws_restJson1DeleteSessionCommandError = async (output, context
|
|
|
448
447
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
449
448
|
default:
|
|
450
449
|
const parsedBody = parsedOutput.body;
|
|
450
|
+
const $metadata = deserializeMetadata(output);
|
|
451
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
451
452
|
response = new LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException({
|
|
452
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
453
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
453
454
|
$fault: "client",
|
|
454
|
-
$metadata
|
|
455
|
+
$metadata,
|
|
455
456
|
});
|
|
456
457
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
457
458
|
}
|
|
@@ -489,8 +490,7 @@ const deserializeAws_restJson1GetSessionCommandError = async (output, context) =
|
|
|
489
490
|
body: await parseBody(output.body, context),
|
|
490
491
|
};
|
|
491
492
|
let response;
|
|
492
|
-
|
|
493
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
493
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
494
|
switch (errorCode) {
|
|
495
495
|
case "AccessDeniedException":
|
|
496
496
|
case "com.amazonaws.lexruntimev2#AccessDeniedException":
|
|
@@ -509,10 +509,12 @@ const deserializeAws_restJson1GetSessionCommandError = async (output, context) =
|
|
|
509
509
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
510
510
|
default:
|
|
511
511
|
const parsedBody = parsedOutput.body;
|
|
512
|
+
const $metadata = deserializeMetadata(output);
|
|
513
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
512
514
|
response = new LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException({
|
|
513
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
515
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
514
516
|
$fault: "client",
|
|
515
|
-
$metadata
|
|
517
|
+
$metadata,
|
|
516
518
|
});
|
|
517
519
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
518
520
|
}
|
|
@@ -556,8 +558,7 @@ const deserializeAws_restJson1PutSessionCommandError = async (output, context) =
|
|
|
556
558
|
body: await parseBody(output.body, context),
|
|
557
559
|
};
|
|
558
560
|
let response;
|
|
559
|
-
|
|
560
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
562
|
switch (errorCode) {
|
|
562
563
|
case "AccessDeniedException":
|
|
563
564
|
case "com.amazonaws.lexruntimev2#AccessDeniedException":
|
|
@@ -585,10 +586,12 @@ const deserializeAws_restJson1PutSessionCommandError = async (output, context) =
|
|
|
585
586
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
586
587
|
default:
|
|
587
588
|
const parsedBody = parsedOutput.body;
|
|
589
|
+
const $metadata = deserializeMetadata(output);
|
|
590
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
588
591
|
response = new LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException({
|
|
589
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
592
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
590
593
|
$fault: "client",
|
|
591
|
-
$metadata
|
|
594
|
+
$metadata,
|
|
592
595
|
});
|
|
593
596
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
594
597
|
}
|
|
@@ -630,8 +633,7 @@ const deserializeAws_restJson1RecognizeTextCommandError = async (output, context
|
|
|
630
633
|
body: await parseBody(output.body, context),
|
|
631
634
|
};
|
|
632
635
|
let response;
|
|
633
|
-
|
|
634
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
636
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
635
637
|
switch (errorCode) {
|
|
636
638
|
case "AccessDeniedException":
|
|
637
639
|
case "com.amazonaws.lexruntimev2#AccessDeniedException":
|
|
@@ -659,10 +661,12 @@ const deserializeAws_restJson1RecognizeTextCommandError = async (output, context
|
|
|
659
661
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
660
662
|
default:
|
|
661
663
|
const parsedBody = parsedOutput.body;
|
|
664
|
+
const $metadata = deserializeMetadata(output);
|
|
665
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
662
666
|
response = new LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException({
|
|
663
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
667
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
664
668
|
$fault: "client",
|
|
665
|
-
$metadata
|
|
669
|
+
$metadata,
|
|
666
670
|
});
|
|
667
671
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
668
672
|
}
|
|
@@ -718,8 +722,7 @@ const deserializeAws_restJson1RecognizeUtteranceCommandError = async (output, co
|
|
|
718
722
|
body: await parseBody(output.body, context),
|
|
719
723
|
};
|
|
720
724
|
let response;
|
|
721
|
-
|
|
722
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
725
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
723
726
|
switch (errorCode) {
|
|
724
727
|
case "AccessDeniedException":
|
|
725
728
|
case "com.amazonaws.lexruntimev2#AccessDeniedException":
|
|
@@ -747,10 +750,12 @@ const deserializeAws_restJson1RecognizeUtteranceCommandError = async (output, co
|
|
|
747
750
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
748
751
|
default:
|
|
749
752
|
const parsedBody = parsedOutput.body;
|
|
753
|
+
const $metadata = deserializeMetadata(output);
|
|
754
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
750
755
|
response = new LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException({
|
|
751
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
756
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
752
757
|
$fault: "client",
|
|
753
|
-
$metadata
|
|
758
|
+
$metadata,
|
|
754
759
|
});
|
|
755
760
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
756
761
|
}
|
|
@@ -788,8 +793,7 @@ const deserializeAws_restJson1StartConversationCommandError = async (output, con
|
|
|
788
793
|
body: await parseBody(output.body, context),
|
|
789
794
|
};
|
|
790
795
|
let response;
|
|
791
|
-
|
|
792
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
796
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
793
797
|
switch (errorCode) {
|
|
794
798
|
case "AccessDeniedException":
|
|
795
799
|
case "com.amazonaws.lexruntimev2#AccessDeniedException":
|
|
@@ -805,10 +809,12 @@ const deserializeAws_restJson1StartConversationCommandError = async (output, con
|
|
|
805
809
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
806
810
|
default:
|
|
807
811
|
const parsedBody = parsedOutput.body;
|
|
812
|
+
const $metadata = deserializeMetadata(output);
|
|
813
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
808
814
|
response = new LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException({
|
|
809
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
815
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
810
816
|
$fault: "client",
|
|
811
|
-
$metadata
|
|
817
|
+
$metadata,
|
|
812
818
|
});
|
|
813
819
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
814
820
|
}
|
|
@@ -902,6 +908,7 @@ const serializeAws_restJson1AudioInputEvent_event = (input, context) => {
|
|
|
902
908
|
headers: {
|
|
903
909
|
":event-type": { type: "string", value: "AudioInputEvent" },
|
|
904
910
|
":message-type": { type: "string", value: "event" },
|
|
911
|
+
":content-type": { type: "string", value: "application/json" },
|
|
905
912
|
},
|
|
906
913
|
body: new Uint8Array(),
|
|
907
914
|
};
|
|
@@ -914,6 +921,7 @@ const serializeAws_restJson1ConfigurationEvent_event = (input, context) => {
|
|
|
914
921
|
headers: {
|
|
915
922
|
":event-type": { type: "string", value: "ConfigurationEvent" },
|
|
916
923
|
":message-type": { type: "string", value: "event" },
|
|
924
|
+
":content-type": { type: "string", value: "application/json" },
|
|
917
925
|
},
|
|
918
926
|
body: new Uint8Array(),
|
|
919
927
|
};
|
|
@@ -926,6 +934,7 @@ const serializeAws_restJson1DisconnectionEvent_event = (input, context) => {
|
|
|
926
934
|
headers: {
|
|
927
935
|
":event-type": { type: "string", value: "DisconnectionEvent" },
|
|
928
936
|
":message-type": { type: "string", value: "event" },
|
|
937
|
+
":content-type": { type: "string", value: "application/json" },
|
|
929
938
|
},
|
|
930
939
|
body: new Uint8Array(),
|
|
931
940
|
};
|
|
@@ -938,6 +947,7 @@ const serializeAws_restJson1DTMFInputEvent_event = (input, context) => {
|
|
|
938
947
|
headers: {
|
|
939
948
|
":event-type": { type: "string", value: "DTMFInputEvent" },
|
|
940
949
|
":message-type": { type: "string", value: "event" },
|
|
950
|
+
":content-type": { type: "string", value: "application/json" },
|
|
941
951
|
},
|
|
942
952
|
body: new Uint8Array(),
|
|
943
953
|
};
|
|
@@ -950,6 +960,7 @@ const serializeAws_restJson1PlaybackCompletionEvent_event = (input, context) =>
|
|
|
950
960
|
headers: {
|
|
951
961
|
":event-type": { type: "string", value: "PlaybackCompletionEvent" },
|
|
952
962
|
":message-type": { type: "string", value: "event" },
|
|
963
|
+
":content-type": { type: "string", value: "application/json" },
|
|
953
964
|
},
|
|
954
965
|
body: new Uint8Array(),
|
|
955
966
|
};
|
|
@@ -962,6 +973,7 @@ const serializeAws_restJson1TextInputEvent_event = (input, context) => {
|
|
|
962
973
|
headers: {
|
|
963
974
|
":event-type": { type: "string", value: "TextInputEvent" },
|
|
964
975
|
":message-type": { type: "string", value: "event" },
|
|
976
|
+
":content-type": { type: "string", value: "application/json" },
|
|
965
977
|
},
|
|
966
978
|
body: new Uint8Array(),
|
|
967
979
|
};
|
|
@@ -1984,5 +1996,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1984
1996
|
if (data["__type"] !== undefined) {
|
|
1985
1997
|
return sanitizeErrorCode(data["__type"]);
|
|
1986
1998
|
}
|
|
1987
|
-
return "";
|
|
1988
1999
|
};
|
|
@@ -439,7 +439,7 @@ export var deserializeAws_restJson1DeleteSessionCommand = function (output, cont
|
|
|
439
439
|
});
|
|
440
440
|
}); };
|
|
441
441
|
var deserializeAws_restJson1DeleteSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
442
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
442
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
443
443
|
var _c;
|
|
444
444
|
return __generator(this, function (_d) {
|
|
445
445
|
switch (_d.label) {
|
|
@@ -449,7 +449,6 @@ var deserializeAws_restJson1DeleteSessionCommandError = function (output, contex
|
|
|
449
449
|
return [4, parseBody(output.body, context)];
|
|
450
450
|
case 1:
|
|
451
451
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
452
|
-
errorCode = "UnknownError";
|
|
453
452
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
454
453
|
_b = errorCode;
|
|
455
454
|
switch (_b) {
|
|
@@ -481,10 +480,12 @@ var deserializeAws_restJson1DeleteSessionCommandError = function (output, contex
|
|
|
481
480
|
case 13: throw _d.sent();
|
|
482
481
|
case 14:
|
|
483
482
|
parsedBody = parsedOutput.body;
|
|
483
|
+
$metadata = deserializeMetadata(output);
|
|
484
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
484
485
|
response = new __BaseException({
|
|
485
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
486
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
486
487
|
$fault: "client",
|
|
487
|
-
$metadata:
|
|
488
|
+
$metadata: $metadata,
|
|
488
489
|
});
|
|
489
490
|
throw __decorateServiceException(response, parsedBody);
|
|
490
491
|
}
|
|
@@ -527,7 +528,7 @@ export var deserializeAws_restJson1GetSessionCommand = function (output, context
|
|
|
527
528
|
});
|
|
528
529
|
}); };
|
|
529
530
|
var deserializeAws_restJson1GetSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
530
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
531
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
531
532
|
var _c;
|
|
532
533
|
return __generator(this, function (_d) {
|
|
533
534
|
switch (_d.label) {
|
|
@@ -537,7 +538,6 @@ var deserializeAws_restJson1GetSessionCommandError = function (output, context)
|
|
|
537
538
|
return [4, parseBody(output.body, context)];
|
|
538
539
|
case 1:
|
|
539
540
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
540
|
-
errorCode = "UnknownError";
|
|
541
541
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
542
542
|
_b = errorCode;
|
|
543
543
|
switch (_b) {
|
|
@@ -565,10 +565,12 @@ var deserializeAws_restJson1GetSessionCommandError = function (output, context)
|
|
|
565
565
|
case 11: throw _d.sent();
|
|
566
566
|
case 12:
|
|
567
567
|
parsedBody = parsedOutput.body;
|
|
568
|
+
$metadata = deserializeMetadata(output);
|
|
569
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
568
570
|
response = new __BaseException({
|
|
569
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
571
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
570
572
|
$fault: "client",
|
|
571
|
-
$metadata:
|
|
573
|
+
$metadata: $metadata,
|
|
572
574
|
});
|
|
573
575
|
throw __decorateServiceException(response, parsedBody);
|
|
574
576
|
}
|
|
@@ -610,7 +612,7 @@ export var deserializeAws_restJson1PutSessionCommand = function (output, context
|
|
|
610
612
|
});
|
|
611
613
|
}); };
|
|
612
614
|
var deserializeAws_restJson1PutSessionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
613
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
615
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
614
616
|
var _c;
|
|
615
617
|
return __generator(this, function (_d) {
|
|
616
618
|
switch (_d.label) {
|
|
@@ -620,7 +622,6 @@ var deserializeAws_restJson1PutSessionCommandError = function (output, context)
|
|
|
620
622
|
return [4, parseBody(output.body, context)];
|
|
621
623
|
case 1:
|
|
622
624
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
623
|
-
errorCode = "UnknownError";
|
|
624
625
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
625
626
|
_b = errorCode;
|
|
626
627
|
switch (_b) {
|
|
@@ -660,10 +661,12 @@ var deserializeAws_restJson1PutSessionCommandError = function (output, context)
|
|
|
660
661
|
case 17: throw _d.sent();
|
|
661
662
|
case 18:
|
|
662
663
|
parsedBody = parsedOutput.body;
|
|
664
|
+
$metadata = deserializeMetadata(output);
|
|
665
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
663
666
|
response = new __BaseException({
|
|
664
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
667
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
665
668
|
$fault: "client",
|
|
666
|
-
$metadata:
|
|
669
|
+
$metadata: $metadata,
|
|
667
670
|
});
|
|
668
671
|
throw __decorateServiceException(response, parsedBody);
|
|
669
672
|
}
|
|
@@ -710,7 +713,7 @@ export var deserializeAws_restJson1RecognizeTextCommand = function (output, cont
|
|
|
710
713
|
});
|
|
711
714
|
}); };
|
|
712
715
|
var deserializeAws_restJson1RecognizeTextCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
713
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
716
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
714
717
|
var _c;
|
|
715
718
|
return __generator(this, function (_d) {
|
|
716
719
|
switch (_d.label) {
|
|
@@ -720,7 +723,6 @@ var deserializeAws_restJson1RecognizeTextCommandError = function (output, contex
|
|
|
720
723
|
return [4, parseBody(output.body, context)];
|
|
721
724
|
case 1:
|
|
722
725
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
723
|
-
errorCode = "UnknownError";
|
|
724
726
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
725
727
|
_b = errorCode;
|
|
726
728
|
switch (_b) {
|
|
@@ -760,10 +762,12 @@ var deserializeAws_restJson1RecognizeTextCommandError = function (output, contex
|
|
|
760
762
|
case 17: throw _d.sent();
|
|
761
763
|
case 18:
|
|
762
764
|
parsedBody = parsedOutput.body;
|
|
765
|
+
$metadata = deserializeMetadata(output);
|
|
766
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
763
767
|
response = new __BaseException({
|
|
764
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
768
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
765
769
|
$fault: "client",
|
|
766
|
-
$metadata:
|
|
770
|
+
$metadata: $metadata,
|
|
767
771
|
});
|
|
768
772
|
throw __decorateServiceException(response, parsedBody);
|
|
769
773
|
}
|
|
@@ -817,7 +821,7 @@ export var deserializeAws_restJson1RecognizeUtteranceCommand = function (output,
|
|
|
817
821
|
});
|
|
818
822
|
}); };
|
|
819
823
|
var deserializeAws_restJson1RecognizeUtteranceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
820
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
824
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
821
825
|
var _c;
|
|
822
826
|
return __generator(this, function (_d) {
|
|
823
827
|
switch (_d.label) {
|
|
@@ -827,7 +831,6 @@ var deserializeAws_restJson1RecognizeUtteranceCommandError = function (output, c
|
|
|
827
831
|
return [4, parseBody(output.body, context)];
|
|
828
832
|
case 1:
|
|
829
833
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
830
|
-
errorCode = "UnknownError";
|
|
831
834
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
832
835
|
_b = errorCode;
|
|
833
836
|
switch (_b) {
|
|
@@ -867,10 +870,12 @@ var deserializeAws_restJson1RecognizeUtteranceCommandError = function (output, c
|
|
|
867
870
|
case 17: throw _d.sent();
|
|
868
871
|
case 18:
|
|
869
872
|
parsedBody = parsedOutput.body;
|
|
873
|
+
$metadata = deserializeMetadata(output);
|
|
874
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
870
875
|
response = new __BaseException({
|
|
871
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
876
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
872
877
|
$fault: "client",
|
|
873
|
-
$metadata:
|
|
878
|
+
$metadata: $metadata,
|
|
874
879
|
});
|
|
875
880
|
throw __decorateServiceException(response, parsedBody);
|
|
876
881
|
}
|
|
@@ -914,7 +919,7 @@ export var deserializeAws_restJson1StartConversationCommand = function (output,
|
|
|
914
919
|
});
|
|
915
920
|
}); };
|
|
916
921
|
var deserializeAws_restJson1StartConversationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
917
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
922
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
918
923
|
var _c;
|
|
919
924
|
return __generator(this, function (_d) {
|
|
920
925
|
switch (_d.label) {
|
|
@@ -924,7 +929,6 @@ var deserializeAws_restJson1StartConversationCommandError = function (output, co
|
|
|
924
929
|
return [4, parseBody(output.body, context)];
|
|
925
930
|
case 1:
|
|
926
931
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
927
|
-
errorCode = "UnknownError";
|
|
928
932
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
929
933
|
_b = errorCode;
|
|
930
934
|
switch (_b) {
|
|
@@ -948,10 +952,12 @@ var deserializeAws_restJson1StartConversationCommandError = function (output, co
|
|
|
948
952
|
case 9: throw _d.sent();
|
|
949
953
|
case 10:
|
|
950
954
|
parsedBody = parsedOutput.body;
|
|
955
|
+
$metadata = deserializeMetadata(output);
|
|
956
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
951
957
|
response = new __BaseException({
|
|
952
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
958
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
953
959
|
$fault: "client",
|
|
954
|
-
$metadata:
|
|
960
|
+
$metadata: $metadata,
|
|
955
961
|
});
|
|
956
962
|
throw __decorateServiceException(response, parsedBody);
|
|
957
963
|
}
|
|
@@ -1065,6 +1071,7 @@ var serializeAws_restJson1AudioInputEvent_event = function (input, context) {
|
|
|
1065
1071
|
headers: {
|
|
1066
1072
|
":event-type": { type: "string", value: "AudioInputEvent" },
|
|
1067
1073
|
":message-type": { type: "string", value: "event" },
|
|
1074
|
+
":content-type": { type: "string", value: "application/json" },
|
|
1068
1075
|
},
|
|
1069
1076
|
body: new Uint8Array(),
|
|
1070
1077
|
};
|
|
@@ -1077,6 +1084,7 @@ var serializeAws_restJson1ConfigurationEvent_event = function (input, context) {
|
|
|
1077
1084
|
headers: {
|
|
1078
1085
|
":event-type": { type: "string", value: "ConfigurationEvent" },
|
|
1079
1086
|
":message-type": { type: "string", value: "event" },
|
|
1087
|
+
":content-type": { type: "string", value: "application/json" },
|
|
1080
1088
|
},
|
|
1081
1089
|
body: new Uint8Array(),
|
|
1082
1090
|
};
|
|
@@ -1089,6 +1097,7 @@ var serializeAws_restJson1DisconnectionEvent_event = function (input, context) {
|
|
|
1089
1097
|
headers: {
|
|
1090
1098
|
":event-type": { type: "string", value: "DisconnectionEvent" },
|
|
1091
1099
|
":message-type": { type: "string", value: "event" },
|
|
1100
|
+
":content-type": { type: "string", value: "application/json" },
|
|
1092
1101
|
},
|
|
1093
1102
|
body: new Uint8Array(),
|
|
1094
1103
|
};
|
|
@@ -1101,6 +1110,7 @@ var serializeAws_restJson1DTMFInputEvent_event = function (input, context) {
|
|
|
1101
1110
|
headers: {
|
|
1102
1111
|
":event-type": { type: "string", value: "DTMFInputEvent" },
|
|
1103
1112
|
":message-type": { type: "string", value: "event" },
|
|
1113
|
+
":content-type": { type: "string", value: "application/json" },
|
|
1104
1114
|
},
|
|
1105
1115
|
body: new Uint8Array(),
|
|
1106
1116
|
};
|
|
@@ -1113,6 +1123,7 @@ var serializeAws_restJson1PlaybackCompletionEvent_event = function (input, conte
|
|
|
1113
1123
|
headers: {
|
|
1114
1124
|
":event-type": { type: "string", value: "PlaybackCompletionEvent" },
|
|
1115
1125
|
":message-type": { type: "string", value: "event" },
|
|
1126
|
+
":content-type": { type: "string", value: "application/json" },
|
|
1116
1127
|
},
|
|
1117
1128
|
body: new Uint8Array(),
|
|
1118
1129
|
};
|
|
@@ -1125,6 +1136,7 @@ var serializeAws_restJson1TextInputEvent_event = function (input, context) {
|
|
|
1125
1136
|
headers: {
|
|
1126
1137
|
":event-type": { type: "string", value: "TextInputEvent" },
|
|
1127
1138
|
":message-type": { type: "string", value: "event" },
|
|
1139
|
+
":content-type": { type: "string", value: "application/json" },
|
|
1128
1140
|
},
|
|
1129
1141
|
body: new Uint8Array(),
|
|
1130
1142
|
};
|
|
@@ -2162,5 +2174,4 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2162
2174
|
if (data["__type"] !== undefined) {
|
|
2163
2175
|
return sanitizeErrorCode(data["__type"]);
|
|
2164
2176
|
}
|
|
2165
|
-
return "";
|
|
2166
2177
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-lex-runtime-v2",
|
|
3
3
|
"description": "AWS SDK for JavaScript Lex Runtime V2 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.121.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.121.0",
|
|
22
22
|
"@aws-sdk/config-resolver": "3.110.0",
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
25
|
-
"@aws-sdk/eventstream-serde-browser": "3.
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.121.0",
|
|
24
|
+
"@aws-sdk/eventstream-handler-node": "3.120.0",
|
|
25
|
+
"@aws-sdk/eventstream-serde-browser": "3.120.0",
|
|
26
26
|
"@aws-sdk/eventstream-serde-config-resolver": "3.110.0",
|
|
27
|
-
"@aws-sdk/eventstream-serde-node": "3.
|
|
27
|
+
"@aws-sdk/eventstream-serde-node": "3.120.0",
|
|
28
28
|
"@aws-sdk/fetch-http-handler": "3.110.0",
|
|
29
29
|
"@aws-sdk/hash-node": "3.110.0",
|
|
30
30
|
"@aws-sdk/invalid-dependency": "3.110.0",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@aws-sdk/middleware-host-header": "3.110.0",
|
|
34
34
|
"@aws-sdk/middleware-logger": "3.110.0",
|
|
35
35
|
"@aws-sdk/middleware-recursion-detection": "3.110.0",
|
|
36
|
-
"@aws-sdk/middleware-retry": "3.
|
|
36
|
+
"@aws-sdk/middleware-retry": "3.118.1",
|
|
37
37
|
"@aws-sdk/middleware-serde": "3.110.0",
|
|
38
38
|
"@aws-sdk/middleware-signing": "3.110.0",
|
|
39
39
|
"@aws-sdk/middleware-stack": "3.110.0",
|
|
40
40
|
"@aws-sdk/middleware-user-agent": "3.110.0",
|
|
41
41
|
"@aws-sdk/node-config-provider": "3.110.0",
|
|
42
|
-
"@aws-sdk/node-http-handler": "3.
|
|
42
|
+
"@aws-sdk/node-http-handler": "3.118.1",
|
|
43
43
|
"@aws-sdk/protocol-http": "3.110.0",
|
|
44
44
|
"@aws-sdk/smithy-client": "3.110.0",
|
|
45
45
|
"@aws-sdk/types": "3.110.0",
|