@aws-sdk/client-mturk 3.525.0 → 3.529.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +42 -82
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -245,6 +245,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
245
245
|
var import_types = require("@smithy/types");
|
|
246
246
|
|
|
247
247
|
// src/protocols/Aws_json1_1.ts
|
|
248
|
+
var import_core2 = require("@aws-sdk/core");
|
|
248
249
|
|
|
249
250
|
|
|
250
251
|
|
|
@@ -621,7 +622,7 @@ var de_AcceptQualificationRequestCommand = /* @__PURE__ */ __name(async (output,
|
|
|
621
622
|
if (output.statusCode >= 300) {
|
|
622
623
|
return de_CommandError(output, context);
|
|
623
624
|
}
|
|
624
|
-
const data = await
|
|
625
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
625
626
|
let contents = {};
|
|
626
627
|
contents = (0, import_smithy_client._json)(data);
|
|
627
628
|
const response = {
|
|
@@ -634,7 +635,7 @@ var de_ApproveAssignmentCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
634
635
|
if (output.statusCode >= 300) {
|
|
635
636
|
return de_CommandError(output, context);
|
|
636
637
|
}
|
|
637
|
-
const data = await
|
|
638
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
638
639
|
let contents = {};
|
|
639
640
|
contents = (0, import_smithy_client._json)(data);
|
|
640
641
|
const response = {
|
|
@@ -647,7 +648,7 @@ var de_AssociateQualificationWithWorkerCommand = /* @__PURE__ */ __name(async (o
|
|
|
647
648
|
if (output.statusCode >= 300) {
|
|
648
649
|
return de_CommandError(output, context);
|
|
649
650
|
}
|
|
650
|
-
const data = await
|
|
651
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
651
652
|
let contents = {};
|
|
652
653
|
contents = (0, import_smithy_client._json)(data);
|
|
653
654
|
const response = {
|
|
@@ -660,7 +661,7 @@ var de_CreateAdditionalAssignmentsForHITCommand = /* @__PURE__ */ __name(async (
|
|
|
660
661
|
if (output.statusCode >= 300) {
|
|
661
662
|
return de_CommandError(output, context);
|
|
662
663
|
}
|
|
663
|
-
const data = await
|
|
664
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
664
665
|
let contents = {};
|
|
665
666
|
contents = (0, import_smithy_client._json)(data);
|
|
666
667
|
const response = {
|
|
@@ -673,7 +674,7 @@ var de_CreateHITCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
673
674
|
if (output.statusCode >= 300) {
|
|
674
675
|
return de_CommandError(output, context);
|
|
675
676
|
}
|
|
676
|
-
const data = await
|
|
677
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
677
678
|
let contents = {};
|
|
678
679
|
contents = de_CreateHITResponse(data, context);
|
|
679
680
|
const response = {
|
|
@@ -686,7 +687,7 @@ var de_CreateHITTypeCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
686
687
|
if (output.statusCode >= 300) {
|
|
687
688
|
return de_CommandError(output, context);
|
|
688
689
|
}
|
|
689
|
-
const data = await
|
|
690
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
690
691
|
let contents = {};
|
|
691
692
|
contents = (0, import_smithy_client._json)(data);
|
|
692
693
|
const response = {
|
|
@@ -699,7 +700,7 @@ var de_CreateHITWithHITTypeCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
699
700
|
if (output.statusCode >= 300) {
|
|
700
701
|
return de_CommandError(output, context);
|
|
701
702
|
}
|
|
702
|
-
const data = await
|
|
703
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
703
704
|
let contents = {};
|
|
704
705
|
contents = de_CreateHITWithHITTypeResponse(data, context);
|
|
705
706
|
const response = {
|
|
@@ -712,7 +713,7 @@ var de_CreateQualificationTypeCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
712
713
|
if (output.statusCode >= 300) {
|
|
713
714
|
return de_CommandError(output, context);
|
|
714
715
|
}
|
|
715
|
-
const data = await
|
|
716
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
716
717
|
let contents = {};
|
|
717
718
|
contents = de_CreateQualificationTypeResponse(data, context);
|
|
718
719
|
const response = {
|
|
@@ -725,7 +726,7 @@ var de_CreateWorkerBlockCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
725
726
|
if (output.statusCode >= 300) {
|
|
726
727
|
return de_CommandError(output, context);
|
|
727
728
|
}
|
|
728
|
-
const data = await
|
|
729
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
729
730
|
let contents = {};
|
|
730
731
|
contents = (0, import_smithy_client._json)(data);
|
|
731
732
|
const response = {
|
|
@@ -738,7 +739,7 @@ var de_DeleteHITCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
738
739
|
if (output.statusCode >= 300) {
|
|
739
740
|
return de_CommandError(output, context);
|
|
740
741
|
}
|
|
741
|
-
const data = await
|
|
742
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
742
743
|
let contents = {};
|
|
743
744
|
contents = (0, import_smithy_client._json)(data);
|
|
744
745
|
const response = {
|
|
@@ -751,7 +752,7 @@ var de_DeleteQualificationTypeCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
751
752
|
if (output.statusCode >= 300) {
|
|
752
753
|
return de_CommandError(output, context);
|
|
753
754
|
}
|
|
754
|
-
const data = await
|
|
755
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
755
756
|
let contents = {};
|
|
756
757
|
contents = (0, import_smithy_client._json)(data);
|
|
757
758
|
const response = {
|
|
@@ -764,7 +765,7 @@ var de_DeleteWorkerBlockCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
764
765
|
if (output.statusCode >= 300) {
|
|
765
766
|
return de_CommandError(output, context);
|
|
766
767
|
}
|
|
767
|
-
const data = await
|
|
768
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
768
769
|
let contents = {};
|
|
769
770
|
contents = (0, import_smithy_client._json)(data);
|
|
770
771
|
const response = {
|
|
@@ -777,7 +778,7 @@ var de_DisassociateQualificationFromWorkerCommand = /* @__PURE__ */ __name(async
|
|
|
777
778
|
if (output.statusCode >= 300) {
|
|
778
779
|
return de_CommandError(output, context);
|
|
779
780
|
}
|
|
780
|
-
const data = await
|
|
781
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
781
782
|
let contents = {};
|
|
782
783
|
contents = (0, import_smithy_client._json)(data);
|
|
783
784
|
const response = {
|
|
@@ -790,7 +791,7 @@ var de_GetAccountBalanceCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
790
791
|
if (output.statusCode >= 300) {
|
|
791
792
|
return de_CommandError(output, context);
|
|
792
793
|
}
|
|
793
|
-
const data = await
|
|
794
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
794
795
|
let contents = {};
|
|
795
796
|
contents = (0, import_smithy_client._json)(data);
|
|
796
797
|
const response = {
|
|
@@ -803,7 +804,7 @@ var de_GetAssignmentCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
803
804
|
if (output.statusCode >= 300) {
|
|
804
805
|
return de_CommandError(output, context);
|
|
805
806
|
}
|
|
806
|
-
const data = await
|
|
807
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
807
808
|
let contents = {};
|
|
808
809
|
contents = de_GetAssignmentResponse(data, context);
|
|
809
810
|
const response = {
|
|
@@ -816,7 +817,7 @@ var de_GetFileUploadURLCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
816
817
|
if (output.statusCode >= 300) {
|
|
817
818
|
return de_CommandError(output, context);
|
|
818
819
|
}
|
|
819
|
-
const data = await
|
|
820
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
820
821
|
let contents = {};
|
|
821
822
|
contents = (0, import_smithy_client._json)(data);
|
|
822
823
|
const response = {
|
|
@@ -829,7 +830,7 @@ var de_GetHITCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
829
830
|
if (output.statusCode >= 300) {
|
|
830
831
|
return de_CommandError(output, context);
|
|
831
832
|
}
|
|
832
|
-
const data = await
|
|
833
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
833
834
|
let contents = {};
|
|
834
835
|
contents = de_GetHITResponse(data, context);
|
|
835
836
|
const response = {
|
|
@@ -842,7 +843,7 @@ var de_GetQualificationScoreCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
842
843
|
if (output.statusCode >= 300) {
|
|
843
844
|
return de_CommandError(output, context);
|
|
844
845
|
}
|
|
845
|
-
const data = await
|
|
846
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
846
847
|
let contents = {};
|
|
847
848
|
contents = de_GetQualificationScoreResponse(data, context);
|
|
848
849
|
const response = {
|
|
@@ -855,7 +856,7 @@ var de_GetQualificationTypeCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
855
856
|
if (output.statusCode >= 300) {
|
|
856
857
|
return de_CommandError(output, context);
|
|
857
858
|
}
|
|
858
|
-
const data = await
|
|
859
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
859
860
|
let contents = {};
|
|
860
861
|
contents = de_GetQualificationTypeResponse(data, context);
|
|
861
862
|
const response = {
|
|
@@ -868,7 +869,7 @@ var de_ListAssignmentsForHITCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
868
869
|
if (output.statusCode >= 300) {
|
|
869
870
|
return de_CommandError(output, context);
|
|
870
871
|
}
|
|
871
|
-
const data = await
|
|
872
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
872
873
|
let contents = {};
|
|
873
874
|
contents = de_ListAssignmentsForHITResponse(data, context);
|
|
874
875
|
const response = {
|
|
@@ -881,7 +882,7 @@ var de_ListBonusPaymentsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
881
882
|
if (output.statusCode >= 300) {
|
|
882
883
|
return de_CommandError(output, context);
|
|
883
884
|
}
|
|
884
|
-
const data = await
|
|
885
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
885
886
|
let contents = {};
|
|
886
887
|
contents = de_ListBonusPaymentsResponse(data, context);
|
|
887
888
|
const response = {
|
|
@@ -894,7 +895,7 @@ var de_ListHITsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
894
895
|
if (output.statusCode >= 300) {
|
|
895
896
|
return de_CommandError(output, context);
|
|
896
897
|
}
|
|
897
|
-
const data = await
|
|
898
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
898
899
|
let contents = {};
|
|
899
900
|
contents = de_ListHITsResponse(data, context);
|
|
900
901
|
const response = {
|
|
@@ -907,7 +908,7 @@ var de_ListHITsForQualificationTypeCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
907
908
|
if (output.statusCode >= 300) {
|
|
908
909
|
return de_CommandError(output, context);
|
|
909
910
|
}
|
|
910
|
-
const data = await
|
|
911
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
911
912
|
let contents = {};
|
|
912
913
|
contents = de_ListHITsForQualificationTypeResponse(data, context);
|
|
913
914
|
const response = {
|
|
@@ -920,7 +921,7 @@ var de_ListQualificationRequestsCommand = /* @__PURE__ */ __name(async (output,
|
|
|
920
921
|
if (output.statusCode >= 300) {
|
|
921
922
|
return de_CommandError(output, context);
|
|
922
923
|
}
|
|
923
|
-
const data = await
|
|
924
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
924
925
|
let contents = {};
|
|
925
926
|
contents = de_ListQualificationRequestsResponse(data, context);
|
|
926
927
|
const response = {
|
|
@@ -933,7 +934,7 @@ var de_ListQualificationTypesCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
933
934
|
if (output.statusCode >= 300) {
|
|
934
935
|
return de_CommandError(output, context);
|
|
935
936
|
}
|
|
936
|
-
const data = await
|
|
937
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
937
938
|
let contents = {};
|
|
938
939
|
contents = de_ListQualificationTypesResponse(data, context);
|
|
939
940
|
const response = {
|
|
@@ -946,7 +947,7 @@ var de_ListReviewableHITsCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
946
947
|
if (output.statusCode >= 300) {
|
|
947
948
|
return de_CommandError(output, context);
|
|
948
949
|
}
|
|
949
|
-
const data = await
|
|
950
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
950
951
|
let contents = {};
|
|
951
952
|
contents = de_ListReviewableHITsResponse(data, context);
|
|
952
953
|
const response = {
|
|
@@ -959,7 +960,7 @@ var de_ListReviewPolicyResultsForHITCommand = /* @__PURE__ */ __name(async (outp
|
|
|
959
960
|
if (output.statusCode >= 300) {
|
|
960
961
|
return de_CommandError(output, context);
|
|
961
962
|
}
|
|
962
|
-
const data = await
|
|
963
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
963
964
|
let contents = {};
|
|
964
965
|
contents = de_ListReviewPolicyResultsForHITResponse(data, context);
|
|
965
966
|
const response = {
|
|
@@ -972,7 +973,7 @@ var de_ListWorkerBlocksCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
972
973
|
if (output.statusCode >= 300) {
|
|
973
974
|
return de_CommandError(output, context);
|
|
974
975
|
}
|
|
975
|
-
const data = await
|
|
976
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
976
977
|
let contents = {};
|
|
977
978
|
contents = (0, import_smithy_client._json)(data);
|
|
978
979
|
const response = {
|
|
@@ -985,7 +986,7 @@ var de_ListWorkersWithQualificationTypeCommand = /* @__PURE__ */ __name(async (o
|
|
|
985
986
|
if (output.statusCode >= 300) {
|
|
986
987
|
return de_CommandError(output, context);
|
|
987
988
|
}
|
|
988
|
-
const data = await
|
|
989
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
989
990
|
let contents = {};
|
|
990
991
|
contents = de_ListWorkersWithQualificationTypeResponse(data, context);
|
|
991
992
|
const response = {
|
|
@@ -998,7 +999,7 @@ var de_NotifyWorkersCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
998
999
|
if (output.statusCode >= 300) {
|
|
999
1000
|
return de_CommandError(output, context);
|
|
1000
1001
|
}
|
|
1001
|
-
const data = await
|
|
1002
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1002
1003
|
let contents = {};
|
|
1003
1004
|
contents = (0, import_smithy_client._json)(data);
|
|
1004
1005
|
const response = {
|
|
@@ -1011,7 +1012,7 @@ var de_RejectAssignmentCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1011
1012
|
if (output.statusCode >= 300) {
|
|
1012
1013
|
return de_CommandError(output, context);
|
|
1013
1014
|
}
|
|
1014
|
-
const data = await
|
|
1015
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1015
1016
|
let contents = {};
|
|
1016
1017
|
contents = (0, import_smithy_client._json)(data);
|
|
1017
1018
|
const response = {
|
|
@@ -1024,7 +1025,7 @@ var de_RejectQualificationRequestCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1024
1025
|
if (output.statusCode >= 300) {
|
|
1025
1026
|
return de_CommandError(output, context);
|
|
1026
1027
|
}
|
|
1027
|
-
const data = await
|
|
1028
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1028
1029
|
let contents = {};
|
|
1029
1030
|
contents = (0, import_smithy_client._json)(data);
|
|
1030
1031
|
const response = {
|
|
@@ -1037,7 +1038,7 @@ var de_SendBonusCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1037
1038
|
if (output.statusCode >= 300) {
|
|
1038
1039
|
return de_CommandError(output, context);
|
|
1039
1040
|
}
|
|
1040
|
-
const data = await
|
|
1041
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1041
1042
|
let contents = {};
|
|
1042
1043
|
contents = (0, import_smithy_client._json)(data);
|
|
1043
1044
|
const response = {
|
|
@@ -1050,7 +1051,7 @@ var de_SendTestEventNotificationCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1050
1051
|
if (output.statusCode >= 300) {
|
|
1051
1052
|
return de_CommandError(output, context);
|
|
1052
1053
|
}
|
|
1053
|
-
const data = await
|
|
1054
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1054
1055
|
let contents = {};
|
|
1055
1056
|
contents = (0, import_smithy_client._json)(data);
|
|
1056
1057
|
const response = {
|
|
@@ -1063,7 +1064,7 @@ var de_UpdateExpirationForHITCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1063
1064
|
if (output.statusCode >= 300) {
|
|
1064
1065
|
return de_CommandError(output, context);
|
|
1065
1066
|
}
|
|
1066
|
-
const data = await
|
|
1067
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1067
1068
|
let contents = {};
|
|
1068
1069
|
contents = (0, import_smithy_client._json)(data);
|
|
1069
1070
|
const response = {
|
|
@@ -1076,7 +1077,7 @@ var de_UpdateHITReviewStatusCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
1076
1077
|
if (output.statusCode >= 300) {
|
|
1077
1078
|
return de_CommandError(output, context);
|
|
1078
1079
|
}
|
|
1079
|
-
const data = await
|
|
1080
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1080
1081
|
let contents = {};
|
|
1081
1082
|
contents = (0, import_smithy_client._json)(data);
|
|
1082
1083
|
const response = {
|
|
@@ -1089,7 +1090,7 @@ var de_UpdateHITTypeOfHITCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1089
1090
|
if (output.statusCode >= 300) {
|
|
1090
1091
|
return de_CommandError(output, context);
|
|
1091
1092
|
}
|
|
1092
|
-
const data = await
|
|
1093
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1093
1094
|
let contents = {};
|
|
1094
1095
|
contents = (0, import_smithy_client._json)(data);
|
|
1095
1096
|
const response = {
|
|
@@ -1102,7 +1103,7 @@ var de_UpdateNotificationSettingsCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1102
1103
|
if (output.statusCode >= 300) {
|
|
1103
1104
|
return de_CommandError(output, context);
|
|
1104
1105
|
}
|
|
1105
|
-
const data = await
|
|
1106
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1106
1107
|
let contents = {};
|
|
1107
1108
|
contents = (0, import_smithy_client._json)(data);
|
|
1108
1109
|
const response = {
|
|
@@ -1115,7 +1116,7 @@ var de_UpdateQualificationTypeCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
1115
1116
|
if (output.statusCode >= 300) {
|
|
1116
1117
|
return de_CommandError(output, context);
|
|
1117
1118
|
}
|
|
1118
|
-
const data = await
|
|
1119
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1119
1120
|
let contents = {};
|
|
1120
1121
|
contents = de_UpdateQualificationTypeResponse(data, context);
|
|
1121
1122
|
const response = {
|
|
@@ -1127,9 +1128,9 @@ var de_UpdateQualificationTypeCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
1127
1128
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1128
1129
|
const parsedOutput = {
|
|
1129
1130
|
...output,
|
|
1130
|
-
body: await
|
|
1131
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1131
1132
|
};
|
|
1132
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1133
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1133
1134
|
switch (errorCode) {
|
|
1134
1135
|
case "RequestError":
|
|
1135
1136
|
case "com.amazonaws.mturk#RequestError":
|
|
@@ -1430,7 +1431,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1430
1431
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1431
1432
|
cfId: output.headers["x-amz-cf-id"]
|
|
1432
1433
|
}), "deserializeMetadata");
|
|
1433
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1434
1434
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(MTurkServiceException);
|
|
1435
1435
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1436
1436
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1457,46 +1457,6 @@ function sharedHeaders(operation) {
|
|
|
1457
1457
|
};
|
|
1458
1458
|
}
|
|
1459
1459
|
__name(sharedHeaders, "sharedHeaders");
|
|
1460
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1461
|
-
if (encoded.length) {
|
|
1462
|
-
return JSON.parse(encoded);
|
|
1463
|
-
}
|
|
1464
|
-
return {};
|
|
1465
|
-
}), "parseBody");
|
|
1466
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1467
|
-
const value = await parseBody(errorBody, context);
|
|
1468
|
-
value.message = value.message ?? value.Message;
|
|
1469
|
-
return value;
|
|
1470
|
-
}, "parseErrorBody");
|
|
1471
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1472
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1473
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1474
|
-
let cleanValue = rawValue;
|
|
1475
|
-
if (typeof cleanValue === "number") {
|
|
1476
|
-
cleanValue = cleanValue.toString();
|
|
1477
|
-
}
|
|
1478
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1479
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1480
|
-
}
|
|
1481
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1482
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1483
|
-
}
|
|
1484
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1485
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1486
|
-
}
|
|
1487
|
-
return cleanValue;
|
|
1488
|
-
}, "sanitizeErrorCode");
|
|
1489
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1490
|
-
if (headerKey !== void 0) {
|
|
1491
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1492
|
-
}
|
|
1493
|
-
if (data.code !== void 0) {
|
|
1494
|
-
return sanitizeErrorCode(data.code);
|
|
1495
|
-
}
|
|
1496
|
-
if (data["__type"] !== void 0) {
|
|
1497
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1498
|
-
}
|
|
1499
|
-
}, "loadRestJsonErrorCode");
|
|
1500
1460
|
|
|
1501
1461
|
// src/commands/AcceptQualificationRequestCommand.ts
|
|
1502
1462
|
var _AcceptQualificationRequestCommand = class _AcceptQualificationRequestCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { RequestError, ServiceFault, } from "../models/models_0";
|
|
@@ -1089,43 +1090,3 @@ function sharedHeaders(operation) {
|
|
|
1089
1090
|
"x-amz-target": `MTurkRequesterServiceV20170117.${operation}`,
|
|
1090
1091
|
};
|
|
1091
1092
|
}
|
|
1092
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1093
|
-
if (encoded.length) {
|
|
1094
|
-
return JSON.parse(encoded);
|
|
1095
|
-
}
|
|
1096
|
-
return {};
|
|
1097
|
-
});
|
|
1098
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1099
|
-
const value = await parseBody(errorBody, context);
|
|
1100
|
-
value.message = value.message ?? value.Message;
|
|
1101
|
-
return value;
|
|
1102
|
-
};
|
|
1103
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1104
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1105
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1106
|
-
let cleanValue = rawValue;
|
|
1107
|
-
if (typeof cleanValue === "number") {
|
|
1108
|
-
cleanValue = cleanValue.toString();
|
|
1109
|
-
}
|
|
1110
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1111
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1112
|
-
}
|
|
1113
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1114
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1115
|
-
}
|
|
1116
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1117
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1118
|
-
}
|
|
1119
|
-
return cleanValue;
|
|
1120
|
-
};
|
|
1121
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1122
|
-
if (headerKey !== undefined) {
|
|
1123
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1124
|
-
}
|
|
1125
|
-
if (data.code !== undefined) {
|
|
1126
|
-
return sanitizeErrorCode(data.code);
|
|
1127
|
-
}
|
|
1128
|
-
if (data["__type"] !== undefined) {
|
|
1129
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1130
|
-
}
|
|
1131
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-mturk",
|
|
3
3
|
"description": "AWS SDK for JavaScript Mturk Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
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-mturk",
|
|
@@ -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.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|