@aws-sdk/client-translate 3.309.0 → 3.312.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/protocols/Aws_json1_1.js +24 -72
- package/dist-es/protocols/Aws_json1_1.js +24 -72
- package/package.json +35 -35
|
@@ -7,180 +7,126 @@ const uuid_1 = require("uuid");
|
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const TranslateServiceException_1 = require("../models/TranslateServiceException");
|
|
9
9
|
const se_CreateParallelDataCommand = async (input, context) => {
|
|
10
|
-
const headers =
|
|
11
|
-
"content-type": "application/x-amz-json-1.1",
|
|
12
|
-
"x-amz-target": "AWSShineFrontendService_20170701.CreateParallelData",
|
|
13
|
-
};
|
|
10
|
+
const headers = sharedHeaders("CreateParallelData");
|
|
14
11
|
let body;
|
|
15
12
|
body = JSON.stringify(se_CreateParallelDataRequest(input, context));
|
|
16
13
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
14
|
};
|
|
18
15
|
exports.se_CreateParallelDataCommand = se_CreateParallelDataCommand;
|
|
19
16
|
const se_DeleteParallelDataCommand = async (input, context) => {
|
|
20
|
-
const headers =
|
|
21
|
-
"content-type": "application/x-amz-json-1.1",
|
|
22
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DeleteParallelData",
|
|
23
|
-
};
|
|
17
|
+
const headers = sharedHeaders("DeleteParallelData");
|
|
24
18
|
let body;
|
|
25
19
|
body = JSON.stringify(se_DeleteParallelDataRequest(input, context));
|
|
26
20
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
21
|
};
|
|
28
22
|
exports.se_DeleteParallelDataCommand = se_DeleteParallelDataCommand;
|
|
29
23
|
const se_DeleteTerminologyCommand = async (input, context) => {
|
|
30
|
-
const headers =
|
|
31
|
-
"content-type": "application/x-amz-json-1.1",
|
|
32
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DeleteTerminology",
|
|
33
|
-
};
|
|
24
|
+
const headers = sharedHeaders("DeleteTerminology");
|
|
34
25
|
let body;
|
|
35
26
|
body = JSON.stringify(se_DeleteTerminologyRequest(input, context));
|
|
36
27
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
37
28
|
};
|
|
38
29
|
exports.se_DeleteTerminologyCommand = se_DeleteTerminologyCommand;
|
|
39
30
|
const se_DescribeTextTranslationJobCommand = async (input, context) => {
|
|
40
|
-
const headers =
|
|
41
|
-
"content-type": "application/x-amz-json-1.1",
|
|
42
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DescribeTextTranslationJob",
|
|
43
|
-
};
|
|
31
|
+
const headers = sharedHeaders("DescribeTextTranslationJob");
|
|
44
32
|
let body;
|
|
45
33
|
body = JSON.stringify(se_DescribeTextTranslationJobRequest(input, context));
|
|
46
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
35
|
};
|
|
48
36
|
exports.se_DescribeTextTranslationJobCommand = se_DescribeTextTranslationJobCommand;
|
|
49
37
|
const se_GetParallelDataCommand = async (input, context) => {
|
|
50
|
-
const headers =
|
|
51
|
-
"content-type": "application/x-amz-json-1.1",
|
|
52
|
-
"x-amz-target": "AWSShineFrontendService_20170701.GetParallelData",
|
|
53
|
-
};
|
|
38
|
+
const headers = sharedHeaders("GetParallelData");
|
|
54
39
|
let body;
|
|
55
40
|
body = JSON.stringify(se_GetParallelDataRequest(input, context));
|
|
56
41
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
42
|
};
|
|
58
43
|
exports.se_GetParallelDataCommand = se_GetParallelDataCommand;
|
|
59
44
|
const se_GetTerminologyCommand = async (input, context) => {
|
|
60
|
-
const headers =
|
|
61
|
-
"content-type": "application/x-amz-json-1.1",
|
|
62
|
-
"x-amz-target": "AWSShineFrontendService_20170701.GetTerminology",
|
|
63
|
-
};
|
|
45
|
+
const headers = sharedHeaders("GetTerminology");
|
|
64
46
|
let body;
|
|
65
47
|
body = JSON.stringify(se_GetTerminologyRequest(input, context));
|
|
66
48
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
49
|
};
|
|
68
50
|
exports.se_GetTerminologyCommand = se_GetTerminologyCommand;
|
|
69
51
|
const se_ImportTerminologyCommand = async (input, context) => {
|
|
70
|
-
const headers =
|
|
71
|
-
"content-type": "application/x-amz-json-1.1",
|
|
72
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ImportTerminology",
|
|
73
|
-
};
|
|
52
|
+
const headers = sharedHeaders("ImportTerminology");
|
|
74
53
|
let body;
|
|
75
54
|
body = JSON.stringify(se_ImportTerminologyRequest(input, context));
|
|
76
55
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
56
|
};
|
|
78
57
|
exports.se_ImportTerminologyCommand = se_ImportTerminologyCommand;
|
|
79
58
|
const se_ListLanguagesCommand = async (input, context) => {
|
|
80
|
-
const headers =
|
|
81
|
-
"content-type": "application/x-amz-json-1.1",
|
|
82
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListLanguages",
|
|
83
|
-
};
|
|
59
|
+
const headers = sharedHeaders("ListLanguages");
|
|
84
60
|
let body;
|
|
85
61
|
body = JSON.stringify(se_ListLanguagesRequest(input, context));
|
|
86
62
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
87
63
|
};
|
|
88
64
|
exports.se_ListLanguagesCommand = se_ListLanguagesCommand;
|
|
89
65
|
const se_ListParallelDataCommand = async (input, context) => {
|
|
90
|
-
const headers =
|
|
91
|
-
"content-type": "application/x-amz-json-1.1",
|
|
92
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListParallelData",
|
|
93
|
-
};
|
|
66
|
+
const headers = sharedHeaders("ListParallelData");
|
|
94
67
|
let body;
|
|
95
68
|
body = JSON.stringify(se_ListParallelDataRequest(input, context));
|
|
96
69
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
70
|
};
|
|
98
71
|
exports.se_ListParallelDataCommand = se_ListParallelDataCommand;
|
|
99
72
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
100
|
-
const headers =
|
|
101
|
-
"content-type": "application/x-amz-json-1.1",
|
|
102
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTagsForResource",
|
|
103
|
-
};
|
|
73
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
104
74
|
let body;
|
|
105
75
|
body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
|
|
106
76
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
77
|
};
|
|
108
78
|
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
109
79
|
const se_ListTerminologiesCommand = async (input, context) => {
|
|
110
|
-
const headers =
|
|
111
|
-
"content-type": "application/x-amz-json-1.1",
|
|
112
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTerminologies",
|
|
113
|
-
};
|
|
80
|
+
const headers = sharedHeaders("ListTerminologies");
|
|
114
81
|
let body;
|
|
115
82
|
body = JSON.stringify(se_ListTerminologiesRequest(input, context));
|
|
116
83
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
117
84
|
};
|
|
118
85
|
exports.se_ListTerminologiesCommand = se_ListTerminologiesCommand;
|
|
119
86
|
const se_ListTextTranslationJobsCommand = async (input, context) => {
|
|
120
|
-
const headers =
|
|
121
|
-
"content-type": "application/x-amz-json-1.1",
|
|
122
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTextTranslationJobs",
|
|
123
|
-
};
|
|
87
|
+
const headers = sharedHeaders("ListTextTranslationJobs");
|
|
124
88
|
let body;
|
|
125
89
|
body = JSON.stringify(se_ListTextTranslationJobsRequest(input, context));
|
|
126
90
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
127
91
|
};
|
|
128
92
|
exports.se_ListTextTranslationJobsCommand = se_ListTextTranslationJobsCommand;
|
|
129
93
|
const se_StartTextTranslationJobCommand = async (input, context) => {
|
|
130
|
-
const headers =
|
|
131
|
-
"content-type": "application/x-amz-json-1.1",
|
|
132
|
-
"x-amz-target": "AWSShineFrontendService_20170701.StartTextTranslationJob",
|
|
133
|
-
};
|
|
94
|
+
const headers = sharedHeaders("StartTextTranslationJob");
|
|
134
95
|
let body;
|
|
135
96
|
body = JSON.stringify(se_StartTextTranslationJobRequest(input, context));
|
|
136
97
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
137
98
|
};
|
|
138
99
|
exports.se_StartTextTranslationJobCommand = se_StartTextTranslationJobCommand;
|
|
139
100
|
const se_StopTextTranslationJobCommand = async (input, context) => {
|
|
140
|
-
const headers =
|
|
141
|
-
"content-type": "application/x-amz-json-1.1",
|
|
142
|
-
"x-amz-target": "AWSShineFrontendService_20170701.StopTextTranslationJob",
|
|
143
|
-
};
|
|
101
|
+
const headers = sharedHeaders("StopTextTranslationJob");
|
|
144
102
|
let body;
|
|
145
103
|
body = JSON.stringify(se_StopTextTranslationJobRequest(input, context));
|
|
146
104
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
147
105
|
};
|
|
148
106
|
exports.se_StopTextTranslationJobCommand = se_StopTextTranslationJobCommand;
|
|
149
107
|
const se_TagResourceCommand = async (input, context) => {
|
|
150
|
-
const headers =
|
|
151
|
-
"content-type": "application/x-amz-json-1.1",
|
|
152
|
-
"x-amz-target": "AWSShineFrontendService_20170701.TagResource",
|
|
153
|
-
};
|
|
108
|
+
const headers = sharedHeaders("TagResource");
|
|
154
109
|
let body;
|
|
155
110
|
body = JSON.stringify(se_TagResourceRequest(input, context));
|
|
156
111
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
157
112
|
};
|
|
158
113
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
159
114
|
const se_TranslateTextCommand = async (input, context) => {
|
|
160
|
-
const headers =
|
|
161
|
-
"content-type": "application/x-amz-json-1.1",
|
|
162
|
-
"x-amz-target": "AWSShineFrontendService_20170701.TranslateText",
|
|
163
|
-
};
|
|
115
|
+
const headers = sharedHeaders("TranslateText");
|
|
164
116
|
let body;
|
|
165
117
|
body = JSON.stringify(se_TranslateTextRequest(input, context));
|
|
166
118
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
167
119
|
};
|
|
168
120
|
exports.se_TranslateTextCommand = se_TranslateTextCommand;
|
|
169
121
|
const se_UntagResourceCommand = async (input, context) => {
|
|
170
|
-
const headers =
|
|
171
|
-
"content-type": "application/x-amz-json-1.1",
|
|
172
|
-
"x-amz-target": "AWSShineFrontendService_20170701.UntagResource",
|
|
173
|
-
};
|
|
122
|
+
const headers = sharedHeaders("UntagResource");
|
|
174
123
|
let body;
|
|
175
124
|
body = JSON.stringify(se_UntagResourceRequest(input, context));
|
|
176
125
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
177
126
|
};
|
|
178
127
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
179
128
|
const se_UpdateParallelDataCommand = async (input, context) => {
|
|
180
|
-
const headers =
|
|
181
|
-
"content-type": "application/x-amz-json-1.1",
|
|
182
|
-
"x-amz-target": "AWSShineFrontendService_20170701.UpdateParallelData",
|
|
183
|
-
};
|
|
129
|
+
const headers = sharedHeaders("UpdateParallelData");
|
|
184
130
|
let body;
|
|
185
131
|
body = JSON.stringify(se_UpdateParallelDataRequest(input, context));
|
|
186
132
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -1835,6 +1781,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1835
1781
|
}
|
|
1836
1782
|
return new protocol_http_1.HttpRequest(contents);
|
|
1837
1783
|
};
|
|
1784
|
+
function sharedHeaders(operation) {
|
|
1785
|
+
return {
|
|
1786
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1787
|
+
"x-amz-target": `AWSShineFrontendService_20170701.${operation}`,
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1838
1790
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1839
1791
|
if (encoded.length) {
|
|
1840
1792
|
return JSON.parse(encoded);
|
|
@@ -4,163 +4,109 @@ import { v4 as generateIdempotencyToken } from "uuid";
|
|
|
4
4
|
import { ConcurrentModificationException, ConflictException, DetectedLanguageLowConfidenceException, InternalServerException, InvalidFilterException, InvalidParameterValueException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, ServiceUnavailableException, TextSizeLimitExceededException, TooManyRequestsException, TooManyTagsException, UnsupportedDisplayLanguageCodeException, UnsupportedLanguagePairException, } from "../models/models_0";
|
|
5
5
|
import { TranslateServiceException as __BaseException } from "../models/TranslateServiceException";
|
|
6
6
|
export const se_CreateParallelDataCommand = async (input, context) => {
|
|
7
|
-
const headers =
|
|
8
|
-
"content-type": "application/x-amz-json-1.1",
|
|
9
|
-
"x-amz-target": "AWSShineFrontendService_20170701.CreateParallelData",
|
|
10
|
-
};
|
|
7
|
+
const headers = sharedHeaders("CreateParallelData");
|
|
11
8
|
let body;
|
|
12
9
|
body = JSON.stringify(se_CreateParallelDataRequest(input, context));
|
|
13
10
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
11
|
};
|
|
15
12
|
export const se_DeleteParallelDataCommand = async (input, context) => {
|
|
16
|
-
const headers =
|
|
17
|
-
"content-type": "application/x-amz-json-1.1",
|
|
18
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DeleteParallelData",
|
|
19
|
-
};
|
|
13
|
+
const headers = sharedHeaders("DeleteParallelData");
|
|
20
14
|
let body;
|
|
21
15
|
body = JSON.stringify(se_DeleteParallelDataRequest(input, context));
|
|
22
16
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
17
|
};
|
|
24
18
|
export const se_DeleteTerminologyCommand = async (input, context) => {
|
|
25
|
-
const headers =
|
|
26
|
-
"content-type": "application/x-amz-json-1.1",
|
|
27
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DeleteTerminology",
|
|
28
|
-
};
|
|
19
|
+
const headers = sharedHeaders("DeleteTerminology");
|
|
29
20
|
let body;
|
|
30
21
|
body = JSON.stringify(se_DeleteTerminologyRequest(input, context));
|
|
31
22
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
32
23
|
};
|
|
33
24
|
export const se_DescribeTextTranslationJobCommand = async (input, context) => {
|
|
34
|
-
const headers =
|
|
35
|
-
"content-type": "application/x-amz-json-1.1",
|
|
36
|
-
"x-amz-target": "AWSShineFrontendService_20170701.DescribeTextTranslationJob",
|
|
37
|
-
};
|
|
25
|
+
const headers = sharedHeaders("DescribeTextTranslationJob");
|
|
38
26
|
let body;
|
|
39
27
|
body = JSON.stringify(se_DescribeTextTranslationJobRequest(input, context));
|
|
40
28
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
29
|
};
|
|
42
30
|
export const se_GetParallelDataCommand = async (input, context) => {
|
|
43
|
-
const headers =
|
|
44
|
-
"content-type": "application/x-amz-json-1.1",
|
|
45
|
-
"x-amz-target": "AWSShineFrontendService_20170701.GetParallelData",
|
|
46
|
-
};
|
|
31
|
+
const headers = sharedHeaders("GetParallelData");
|
|
47
32
|
let body;
|
|
48
33
|
body = JSON.stringify(se_GetParallelDataRequest(input, context));
|
|
49
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
35
|
};
|
|
51
36
|
export const se_GetTerminologyCommand = async (input, context) => {
|
|
52
|
-
const headers =
|
|
53
|
-
"content-type": "application/x-amz-json-1.1",
|
|
54
|
-
"x-amz-target": "AWSShineFrontendService_20170701.GetTerminology",
|
|
55
|
-
};
|
|
37
|
+
const headers = sharedHeaders("GetTerminology");
|
|
56
38
|
let body;
|
|
57
39
|
body = JSON.stringify(se_GetTerminologyRequest(input, context));
|
|
58
40
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
41
|
};
|
|
60
42
|
export const se_ImportTerminologyCommand = async (input, context) => {
|
|
61
|
-
const headers =
|
|
62
|
-
"content-type": "application/x-amz-json-1.1",
|
|
63
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ImportTerminology",
|
|
64
|
-
};
|
|
43
|
+
const headers = sharedHeaders("ImportTerminology");
|
|
65
44
|
let body;
|
|
66
45
|
body = JSON.stringify(se_ImportTerminologyRequest(input, context));
|
|
67
46
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
68
47
|
};
|
|
69
48
|
export const se_ListLanguagesCommand = async (input, context) => {
|
|
70
|
-
const headers =
|
|
71
|
-
"content-type": "application/x-amz-json-1.1",
|
|
72
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListLanguages",
|
|
73
|
-
};
|
|
49
|
+
const headers = sharedHeaders("ListLanguages");
|
|
74
50
|
let body;
|
|
75
51
|
body = JSON.stringify(se_ListLanguagesRequest(input, context));
|
|
76
52
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
53
|
};
|
|
78
54
|
export const se_ListParallelDataCommand = async (input, context) => {
|
|
79
|
-
const headers =
|
|
80
|
-
"content-type": "application/x-amz-json-1.1",
|
|
81
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListParallelData",
|
|
82
|
-
};
|
|
55
|
+
const headers = sharedHeaders("ListParallelData");
|
|
83
56
|
let body;
|
|
84
57
|
body = JSON.stringify(se_ListParallelDataRequest(input, context));
|
|
85
58
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
86
59
|
};
|
|
87
60
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
88
|
-
const headers =
|
|
89
|
-
"content-type": "application/x-amz-json-1.1",
|
|
90
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTagsForResource",
|
|
91
|
-
};
|
|
61
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
92
62
|
let body;
|
|
93
63
|
body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
|
|
94
64
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
95
65
|
};
|
|
96
66
|
export const se_ListTerminologiesCommand = async (input, context) => {
|
|
97
|
-
const headers =
|
|
98
|
-
"content-type": "application/x-amz-json-1.1",
|
|
99
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTerminologies",
|
|
100
|
-
};
|
|
67
|
+
const headers = sharedHeaders("ListTerminologies");
|
|
101
68
|
let body;
|
|
102
69
|
body = JSON.stringify(se_ListTerminologiesRequest(input, context));
|
|
103
70
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
104
71
|
};
|
|
105
72
|
export const se_ListTextTranslationJobsCommand = async (input, context) => {
|
|
106
|
-
const headers =
|
|
107
|
-
"content-type": "application/x-amz-json-1.1",
|
|
108
|
-
"x-amz-target": "AWSShineFrontendService_20170701.ListTextTranslationJobs",
|
|
109
|
-
};
|
|
73
|
+
const headers = sharedHeaders("ListTextTranslationJobs");
|
|
110
74
|
let body;
|
|
111
75
|
body = JSON.stringify(se_ListTextTranslationJobsRequest(input, context));
|
|
112
76
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
77
|
};
|
|
114
78
|
export const se_StartTextTranslationJobCommand = async (input, context) => {
|
|
115
|
-
const headers =
|
|
116
|
-
"content-type": "application/x-amz-json-1.1",
|
|
117
|
-
"x-amz-target": "AWSShineFrontendService_20170701.StartTextTranslationJob",
|
|
118
|
-
};
|
|
79
|
+
const headers = sharedHeaders("StartTextTranslationJob");
|
|
119
80
|
let body;
|
|
120
81
|
body = JSON.stringify(se_StartTextTranslationJobRequest(input, context));
|
|
121
82
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
122
83
|
};
|
|
123
84
|
export const se_StopTextTranslationJobCommand = async (input, context) => {
|
|
124
|
-
const headers =
|
|
125
|
-
"content-type": "application/x-amz-json-1.1",
|
|
126
|
-
"x-amz-target": "AWSShineFrontendService_20170701.StopTextTranslationJob",
|
|
127
|
-
};
|
|
85
|
+
const headers = sharedHeaders("StopTextTranslationJob");
|
|
128
86
|
let body;
|
|
129
87
|
body = JSON.stringify(se_StopTextTranslationJobRequest(input, context));
|
|
130
88
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
131
89
|
};
|
|
132
90
|
export const se_TagResourceCommand = async (input, context) => {
|
|
133
|
-
const headers =
|
|
134
|
-
"content-type": "application/x-amz-json-1.1",
|
|
135
|
-
"x-amz-target": "AWSShineFrontendService_20170701.TagResource",
|
|
136
|
-
};
|
|
91
|
+
const headers = sharedHeaders("TagResource");
|
|
137
92
|
let body;
|
|
138
93
|
body = JSON.stringify(se_TagResourceRequest(input, context));
|
|
139
94
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
140
95
|
};
|
|
141
96
|
export const se_TranslateTextCommand = async (input, context) => {
|
|
142
|
-
const headers =
|
|
143
|
-
"content-type": "application/x-amz-json-1.1",
|
|
144
|
-
"x-amz-target": "AWSShineFrontendService_20170701.TranslateText",
|
|
145
|
-
};
|
|
97
|
+
const headers = sharedHeaders("TranslateText");
|
|
146
98
|
let body;
|
|
147
99
|
body = JSON.stringify(se_TranslateTextRequest(input, context));
|
|
148
100
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
149
101
|
};
|
|
150
102
|
export const se_UntagResourceCommand = async (input, context) => {
|
|
151
|
-
const headers =
|
|
152
|
-
"content-type": "application/x-amz-json-1.1",
|
|
153
|
-
"x-amz-target": "AWSShineFrontendService_20170701.UntagResource",
|
|
154
|
-
};
|
|
103
|
+
const headers = sharedHeaders("UntagResource");
|
|
155
104
|
let body;
|
|
156
105
|
body = JSON.stringify(se_UntagResourceRequest(input, context));
|
|
157
106
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
158
107
|
};
|
|
159
108
|
export const se_UpdateParallelDataCommand = async (input, context) => {
|
|
160
|
-
const headers =
|
|
161
|
-
"content-type": "application/x-amz-json-1.1",
|
|
162
|
-
"x-amz-target": "AWSShineFrontendService_20170701.UpdateParallelData",
|
|
163
|
-
};
|
|
109
|
+
const headers = sharedHeaders("UpdateParallelData");
|
|
164
110
|
let body;
|
|
165
111
|
body = JSON.stringify(se_UpdateParallelDataRequest(input, context));
|
|
166
112
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -1796,6 +1742,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1796
1742
|
}
|
|
1797
1743
|
return new __HttpRequest(contents);
|
|
1798
1744
|
};
|
|
1745
|
+
function sharedHeaders(operation) {
|
|
1746
|
+
return {
|
|
1747
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1748
|
+
"x-amz-target": `AWSShineFrontendService_20170701.${operation}`,
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1799
1751
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1800
1752
|
if (encoded.length) {
|
|
1801
1753
|
return JSON.parse(encoded);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-translate",
|
|
3
3
|
"description": "AWS SDK for JavaScript Translate Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.312.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",
|
|
@@ -21,43 +21,43 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/config-resolver": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
28
|
-
"@aws-sdk/hash-node": "3.
|
|
29
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
30
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
31
|
-
"@aws-sdk/middleware-endpoint": "3.
|
|
32
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
33
|
-
"@aws-sdk/middleware-logger": "3.
|
|
34
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
35
|
-
"@aws-sdk/middleware-retry": "3.
|
|
36
|
-
"@aws-sdk/middleware-serde": "3.
|
|
37
|
-
"@aws-sdk/middleware-signing": "3.
|
|
38
|
-
"@aws-sdk/middleware-stack": "3.
|
|
39
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
40
|
-
"@aws-sdk/node-config-provider": "3.
|
|
41
|
-
"@aws-sdk/node-http-handler": "3.
|
|
42
|
-
"@aws-sdk/protocol-http": "3.
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
44
|
-
"@aws-sdk/types": "3.
|
|
45
|
-
"@aws-sdk/url-parser": "3.
|
|
46
|
-
"@aws-sdk/util-base64": "3.
|
|
47
|
-
"@aws-sdk/util-body-length-browser": "3.
|
|
48
|
-
"@aws-sdk/util-body-length-node": "3.
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
51
|
-
"@aws-sdk/util-endpoints": "3.
|
|
52
|
-
"@aws-sdk/util-retry": "3.
|
|
53
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
54
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
55
|
-
"@aws-sdk/util-utf8": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.312.0",
|
|
25
|
+
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.310.0",
|
|
27
|
+
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
|
+
"@aws-sdk/hash-node": "3.310.0",
|
|
29
|
+
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
30
|
+
"@aws-sdk/middleware-content-length": "3.310.0",
|
|
31
|
+
"@aws-sdk/middleware-endpoint": "3.310.0",
|
|
32
|
+
"@aws-sdk/middleware-host-header": "3.310.0",
|
|
33
|
+
"@aws-sdk/middleware-logger": "3.310.0",
|
|
34
|
+
"@aws-sdk/middleware-recursion-detection": "3.310.0",
|
|
35
|
+
"@aws-sdk/middleware-retry": "3.310.0",
|
|
36
|
+
"@aws-sdk/middleware-serde": "3.310.0",
|
|
37
|
+
"@aws-sdk/middleware-signing": "3.310.0",
|
|
38
|
+
"@aws-sdk/middleware-stack": "3.310.0",
|
|
39
|
+
"@aws-sdk/middleware-user-agent": "3.310.0",
|
|
40
|
+
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
|
+
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
|
+
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
+
"@aws-sdk/smithy-client": "3.310.0",
|
|
44
|
+
"@aws-sdk/types": "3.310.0",
|
|
45
|
+
"@aws-sdk/url-parser": "3.310.0",
|
|
46
|
+
"@aws-sdk/util-base64": "3.310.0",
|
|
47
|
+
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
|
+
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.310.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.310.0",
|
|
51
|
+
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
|
+
"@aws-sdk/util-retry": "3.310.0",
|
|
53
|
+
"@aws-sdk/util-user-agent-browser": "3.310.0",
|
|
54
|
+
"@aws-sdk/util-user-agent-node": "3.310.0",
|
|
55
|
+
"@aws-sdk/util-utf8": "3.310.0",
|
|
56
56
|
"tslib": "^2.5.0",
|
|
57
57
|
"uuid": "^8.3.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@aws-sdk/service-client-documentation-generator": "3.
|
|
60
|
+
"@aws-sdk/service-client-documentation-generator": "3.310.0",
|
|
61
61
|
"@tsconfig/node14": "1.0.3",
|
|
62
62
|
"@types/node": "^14.14.31",
|
|
63
63
|
"@types/uuid": "^8.3.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
"files": [
|
|
81
|
-
"dist
|
|
81
|
+
"dist-*/**"
|
|
82
82
|
],
|
|
83
83
|
"author": {
|
|
84
84
|
"name": "AWS SDK for JavaScript Team",
|