@aws-sdk/client-mturk 3.927.0 → 3.929.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 +1084 -1367
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/MTurkClient.js +2 -0
- package/dist-es/commands/AcceptQualificationRequestCommand.js +3 -9
- package/dist-es/commands/ApproveAssignmentCommand.js +3 -9
- package/dist-es/commands/AssociateQualificationWithWorkerCommand.js +3 -9
- package/dist-es/commands/CreateAdditionalAssignmentsForHITCommand.js +3 -9
- package/dist-es/commands/CreateHITCommand.js +3 -9
- package/dist-es/commands/CreateHITTypeCommand.js +3 -9
- package/dist-es/commands/CreateHITWithHITTypeCommand.js +3 -9
- package/dist-es/commands/CreateQualificationTypeCommand.js +3 -9
- package/dist-es/commands/CreateWorkerBlockCommand.js +3 -9
- package/dist-es/commands/DeleteHITCommand.js +3 -9
- package/dist-es/commands/DeleteQualificationTypeCommand.js +3 -9
- package/dist-es/commands/DeleteWorkerBlockCommand.js +3 -9
- package/dist-es/commands/DisassociateQualificationFromWorkerCommand.js +3 -9
- package/dist-es/commands/GetAccountBalanceCommand.js +3 -9
- package/dist-es/commands/GetAssignmentCommand.js +3 -9
- package/dist-es/commands/GetFileUploadURLCommand.js +3 -9
- package/dist-es/commands/GetHITCommand.js +3 -9
- package/dist-es/commands/GetQualificationScoreCommand.js +3 -9
- package/dist-es/commands/GetQualificationTypeCommand.js +3 -9
- package/dist-es/commands/ListAssignmentsForHITCommand.js +3 -9
- package/dist-es/commands/ListBonusPaymentsCommand.js +3 -9
- package/dist-es/commands/ListHITsCommand.js +3 -9
- package/dist-es/commands/ListHITsForQualificationTypeCommand.js +3 -9
- package/dist-es/commands/ListQualificationRequestsCommand.js +3 -9
- package/dist-es/commands/ListQualificationTypesCommand.js +3 -9
- package/dist-es/commands/ListReviewPolicyResultsForHITCommand.js +3 -9
- package/dist-es/commands/ListReviewableHITsCommand.js +3 -9
- package/dist-es/commands/ListWorkerBlocksCommand.js +3 -9
- package/dist-es/commands/ListWorkersWithQualificationTypeCommand.js +3 -9
- package/dist-es/commands/NotifyWorkersCommand.js +3 -9
- package/dist-es/commands/RejectAssignmentCommand.js +3 -9
- package/dist-es/commands/RejectQualificationRequestCommand.js +3 -9
- package/dist-es/commands/SendBonusCommand.js +3 -9
- package/dist-es/commands/SendTestEventNotificationCommand.js +3 -9
- package/dist-es/commands/UpdateExpirationForHITCommand.js +3 -9
- package/dist-es/commands/UpdateHITReviewStatusCommand.js +3 -9
- package/dist-es/commands/UpdateHITTypeOfHITCommand.js +3 -9
- package/dist-es/commands/UpdateNotificationSettingsCommand.js +3 -9
- package/dist-es/commands/UpdateQualificationTypeCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +1005 -0
- package/dist-types/MTurkClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +161 -0
- package/dist-types/ts3.4/MTurkClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +166 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_json1_1.js +0 -1092
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -353
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -473
|
@@ -1,1092 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
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";
|
|
4
|
-
import { RequestError, ServiceFault, } from "../models/models_0";
|
|
5
|
-
import { MTurkServiceException as __BaseException } from "../models/MTurkServiceException";
|
|
6
|
-
export const se_AcceptQualificationRequestCommand = async (input, context) => {
|
|
7
|
-
const headers = sharedHeaders("AcceptQualificationRequest");
|
|
8
|
-
let body;
|
|
9
|
-
body = JSON.stringify(_json(input));
|
|
10
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
-
};
|
|
12
|
-
export const se_ApproveAssignmentCommand = async (input, context) => {
|
|
13
|
-
const headers = sharedHeaders("ApproveAssignment");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify(_json(input));
|
|
16
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
|
-
};
|
|
18
|
-
export const se_AssociateQualificationWithWorkerCommand = async (input, context) => {
|
|
19
|
-
const headers = sharedHeaders("AssociateQualificationWithWorker");
|
|
20
|
-
let body;
|
|
21
|
-
body = JSON.stringify(_json(input));
|
|
22
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
|
-
};
|
|
24
|
-
export const se_CreateAdditionalAssignmentsForHITCommand = async (input, context) => {
|
|
25
|
-
const headers = sharedHeaders("CreateAdditionalAssignmentsForHIT");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify(_json(input));
|
|
28
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
-
};
|
|
30
|
-
export const se_CreateHITCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("CreateHIT");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify(_json(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
export const se_CreateHITTypeCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("CreateHITType");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify(_json(input));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
export const se_CreateHITWithHITTypeCommand = async (input, context) => {
|
|
43
|
-
const headers = sharedHeaders("CreateHITWithHITType");
|
|
44
|
-
let body;
|
|
45
|
-
body = JSON.stringify(_json(input));
|
|
46
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
|
-
};
|
|
48
|
-
export const se_CreateQualificationTypeCommand = async (input, context) => {
|
|
49
|
-
const headers = sharedHeaders("CreateQualificationType");
|
|
50
|
-
let body;
|
|
51
|
-
body = JSON.stringify(_json(input));
|
|
52
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
53
|
-
};
|
|
54
|
-
export const se_CreateWorkerBlockCommand = async (input, context) => {
|
|
55
|
-
const headers = sharedHeaders("CreateWorkerBlock");
|
|
56
|
-
let body;
|
|
57
|
-
body = JSON.stringify(_json(input));
|
|
58
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
|
-
};
|
|
60
|
-
export const se_DeleteHITCommand = async (input, context) => {
|
|
61
|
-
const headers = sharedHeaders("DeleteHIT");
|
|
62
|
-
let body;
|
|
63
|
-
body = JSON.stringify(_json(input));
|
|
64
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
65
|
-
};
|
|
66
|
-
export const se_DeleteQualificationTypeCommand = async (input, context) => {
|
|
67
|
-
const headers = sharedHeaders("DeleteQualificationType");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify(_json(input));
|
|
70
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
|
-
};
|
|
72
|
-
export const se_DeleteWorkerBlockCommand = async (input, context) => {
|
|
73
|
-
const headers = sharedHeaders("DeleteWorkerBlock");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify(_json(input));
|
|
76
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
-
};
|
|
78
|
-
export const se_DisassociateQualificationFromWorkerCommand = async (input, context) => {
|
|
79
|
-
const headers = sharedHeaders("DisassociateQualificationFromWorker");
|
|
80
|
-
let body;
|
|
81
|
-
body = JSON.stringify(_json(input));
|
|
82
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
83
|
-
};
|
|
84
|
-
export const se_GetAccountBalanceCommand = async (input, context) => {
|
|
85
|
-
const headers = sharedHeaders("GetAccountBalance");
|
|
86
|
-
let body;
|
|
87
|
-
body = JSON.stringify(_json(input));
|
|
88
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
89
|
-
};
|
|
90
|
-
export const se_GetAssignmentCommand = async (input, context) => {
|
|
91
|
-
const headers = sharedHeaders("GetAssignment");
|
|
92
|
-
let body;
|
|
93
|
-
body = JSON.stringify(_json(input));
|
|
94
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
95
|
-
};
|
|
96
|
-
export const se_GetFileUploadURLCommand = async (input, context) => {
|
|
97
|
-
const headers = sharedHeaders("GetFileUploadURL");
|
|
98
|
-
let body;
|
|
99
|
-
body = JSON.stringify(_json(input));
|
|
100
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
101
|
-
};
|
|
102
|
-
export const se_GetHITCommand = async (input, context) => {
|
|
103
|
-
const headers = sharedHeaders("GetHIT");
|
|
104
|
-
let body;
|
|
105
|
-
body = JSON.stringify(_json(input));
|
|
106
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
|
-
};
|
|
108
|
-
export const se_GetQualificationScoreCommand = async (input, context) => {
|
|
109
|
-
const headers = sharedHeaders("GetQualificationScore");
|
|
110
|
-
let body;
|
|
111
|
-
body = JSON.stringify(_json(input));
|
|
112
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
|
-
};
|
|
114
|
-
export const se_GetQualificationTypeCommand = async (input, context) => {
|
|
115
|
-
const headers = sharedHeaders("GetQualificationType");
|
|
116
|
-
let body;
|
|
117
|
-
body = JSON.stringify(_json(input));
|
|
118
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
119
|
-
};
|
|
120
|
-
export const se_ListAssignmentsForHITCommand = async (input, context) => {
|
|
121
|
-
const headers = sharedHeaders("ListAssignmentsForHIT");
|
|
122
|
-
let body;
|
|
123
|
-
body = JSON.stringify(_json(input));
|
|
124
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
125
|
-
};
|
|
126
|
-
export const se_ListBonusPaymentsCommand = async (input, context) => {
|
|
127
|
-
const headers = sharedHeaders("ListBonusPayments");
|
|
128
|
-
let body;
|
|
129
|
-
body = JSON.stringify(_json(input));
|
|
130
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
131
|
-
};
|
|
132
|
-
export const se_ListHITsCommand = async (input, context) => {
|
|
133
|
-
const headers = sharedHeaders("ListHITs");
|
|
134
|
-
let body;
|
|
135
|
-
body = JSON.stringify(_json(input));
|
|
136
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
137
|
-
};
|
|
138
|
-
export const se_ListHITsForQualificationTypeCommand = async (input, context) => {
|
|
139
|
-
const headers = sharedHeaders("ListHITsForQualificationType");
|
|
140
|
-
let body;
|
|
141
|
-
body = JSON.stringify(_json(input));
|
|
142
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
143
|
-
};
|
|
144
|
-
export const se_ListQualificationRequestsCommand = async (input, context) => {
|
|
145
|
-
const headers = sharedHeaders("ListQualificationRequests");
|
|
146
|
-
let body;
|
|
147
|
-
body = JSON.stringify(_json(input));
|
|
148
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
149
|
-
};
|
|
150
|
-
export const se_ListQualificationTypesCommand = async (input, context) => {
|
|
151
|
-
const headers = sharedHeaders("ListQualificationTypes");
|
|
152
|
-
let body;
|
|
153
|
-
body = JSON.stringify(_json(input));
|
|
154
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
155
|
-
};
|
|
156
|
-
export const se_ListReviewableHITsCommand = async (input, context) => {
|
|
157
|
-
const headers = sharedHeaders("ListReviewableHITs");
|
|
158
|
-
let body;
|
|
159
|
-
body = JSON.stringify(_json(input));
|
|
160
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
161
|
-
};
|
|
162
|
-
export const se_ListReviewPolicyResultsForHITCommand = async (input, context) => {
|
|
163
|
-
const headers = sharedHeaders("ListReviewPolicyResultsForHIT");
|
|
164
|
-
let body;
|
|
165
|
-
body = JSON.stringify(_json(input));
|
|
166
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
167
|
-
};
|
|
168
|
-
export const se_ListWorkerBlocksCommand = async (input, context) => {
|
|
169
|
-
const headers = sharedHeaders("ListWorkerBlocks");
|
|
170
|
-
let body;
|
|
171
|
-
body = JSON.stringify(_json(input));
|
|
172
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
173
|
-
};
|
|
174
|
-
export const se_ListWorkersWithQualificationTypeCommand = async (input, context) => {
|
|
175
|
-
const headers = sharedHeaders("ListWorkersWithQualificationType");
|
|
176
|
-
let body;
|
|
177
|
-
body = JSON.stringify(_json(input));
|
|
178
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
179
|
-
};
|
|
180
|
-
export const se_NotifyWorkersCommand = async (input, context) => {
|
|
181
|
-
const headers = sharedHeaders("NotifyWorkers");
|
|
182
|
-
let body;
|
|
183
|
-
body = JSON.stringify(_json(input));
|
|
184
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
185
|
-
};
|
|
186
|
-
export const se_RejectAssignmentCommand = async (input, context) => {
|
|
187
|
-
const headers = sharedHeaders("RejectAssignment");
|
|
188
|
-
let body;
|
|
189
|
-
body = JSON.stringify(_json(input));
|
|
190
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
191
|
-
};
|
|
192
|
-
export const se_RejectQualificationRequestCommand = async (input, context) => {
|
|
193
|
-
const headers = sharedHeaders("RejectQualificationRequest");
|
|
194
|
-
let body;
|
|
195
|
-
body = JSON.stringify(_json(input));
|
|
196
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
197
|
-
};
|
|
198
|
-
export const se_SendBonusCommand = async (input, context) => {
|
|
199
|
-
const headers = sharedHeaders("SendBonus");
|
|
200
|
-
let body;
|
|
201
|
-
body = JSON.stringify(_json(input));
|
|
202
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
203
|
-
};
|
|
204
|
-
export const se_SendTestEventNotificationCommand = async (input, context) => {
|
|
205
|
-
const headers = sharedHeaders("SendTestEventNotification");
|
|
206
|
-
let body;
|
|
207
|
-
body = JSON.stringify(_json(input));
|
|
208
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
209
|
-
};
|
|
210
|
-
export const se_UpdateExpirationForHITCommand = async (input, context) => {
|
|
211
|
-
const headers = sharedHeaders("UpdateExpirationForHIT");
|
|
212
|
-
let body;
|
|
213
|
-
body = JSON.stringify(se_UpdateExpirationForHITRequest(input, context));
|
|
214
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
215
|
-
};
|
|
216
|
-
export const se_UpdateHITReviewStatusCommand = async (input, context) => {
|
|
217
|
-
const headers = sharedHeaders("UpdateHITReviewStatus");
|
|
218
|
-
let body;
|
|
219
|
-
body = JSON.stringify(_json(input));
|
|
220
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
221
|
-
};
|
|
222
|
-
export const se_UpdateHITTypeOfHITCommand = async (input, context) => {
|
|
223
|
-
const headers = sharedHeaders("UpdateHITTypeOfHIT");
|
|
224
|
-
let body;
|
|
225
|
-
body = JSON.stringify(_json(input));
|
|
226
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
227
|
-
};
|
|
228
|
-
export const se_UpdateNotificationSettingsCommand = async (input, context) => {
|
|
229
|
-
const headers = sharedHeaders("UpdateNotificationSettings");
|
|
230
|
-
let body;
|
|
231
|
-
body = JSON.stringify(_json(input));
|
|
232
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
233
|
-
};
|
|
234
|
-
export const se_UpdateQualificationTypeCommand = async (input, context) => {
|
|
235
|
-
const headers = sharedHeaders("UpdateQualificationType");
|
|
236
|
-
let body;
|
|
237
|
-
body = JSON.stringify(_json(input));
|
|
238
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
239
|
-
};
|
|
240
|
-
export const de_AcceptQualificationRequestCommand = async (output, context) => {
|
|
241
|
-
if (output.statusCode >= 300) {
|
|
242
|
-
return de_CommandError(output, context);
|
|
243
|
-
}
|
|
244
|
-
const data = await parseBody(output.body, context);
|
|
245
|
-
let contents = {};
|
|
246
|
-
contents = _json(data);
|
|
247
|
-
const response = {
|
|
248
|
-
$metadata: deserializeMetadata(output),
|
|
249
|
-
...contents,
|
|
250
|
-
};
|
|
251
|
-
return response;
|
|
252
|
-
};
|
|
253
|
-
export const de_ApproveAssignmentCommand = async (output, context) => {
|
|
254
|
-
if (output.statusCode >= 300) {
|
|
255
|
-
return de_CommandError(output, context);
|
|
256
|
-
}
|
|
257
|
-
const data = await parseBody(output.body, context);
|
|
258
|
-
let contents = {};
|
|
259
|
-
contents = _json(data);
|
|
260
|
-
const response = {
|
|
261
|
-
$metadata: deserializeMetadata(output),
|
|
262
|
-
...contents,
|
|
263
|
-
};
|
|
264
|
-
return response;
|
|
265
|
-
};
|
|
266
|
-
export const de_AssociateQualificationWithWorkerCommand = async (output, context) => {
|
|
267
|
-
if (output.statusCode >= 300) {
|
|
268
|
-
return de_CommandError(output, context);
|
|
269
|
-
}
|
|
270
|
-
const data = await parseBody(output.body, context);
|
|
271
|
-
let contents = {};
|
|
272
|
-
contents = _json(data);
|
|
273
|
-
const response = {
|
|
274
|
-
$metadata: deserializeMetadata(output),
|
|
275
|
-
...contents,
|
|
276
|
-
};
|
|
277
|
-
return response;
|
|
278
|
-
};
|
|
279
|
-
export const de_CreateAdditionalAssignmentsForHITCommand = async (output, context) => {
|
|
280
|
-
if (output.statusCode >= 300) {
|
|
281
|
-
return de_CommandError(output, context);
|
|
282
|
-
}
|
|
283
|
-
const data = await parseBody(output.body, context);
|
|
284
|
-
let contents = {};
|
|
285
|
-
contents = _json(data);
|
|
286
|
-
const response = {
|
|
287
|
-
$metadata: deserializeMetadata(output),
|
|
288
|
-
...contents,
|
|
289
|
-
};
|
|
290
|
-
return response;
|
|
291
|
-
};
|
|
292
|
-
export const de_CreateHITCommand = async (output, context) => {
|
|
293
|
-
if (output.statusCode >= 300) {
|
|
294
|
-
return de_CommandError(output, context);
|
|
295
|
-
}
|
|
296
|
-
const data = await parseBody(output.body, context);
|
|
297
|
-
let contents = {};
|
|
298
|
-
contents = de_CreateHITResponse(data, context);
|
|
299
|
-
const response = {
|
|
300
|
-
$metadata: deserializeMetadata(output),
|
|
301
|
-
...contents,
|
|
302
|
-
};
|
|
303
|
-
return response;
|
|
304
|
-
};
|
|
305
|
-
export const de_CreateHITTypeCommand = async (output, context) => {
|
|
306
|
-
if (output.statusCode >= 300) {
|
|
307
|
-
return de_CommandError(output, context);
|
|
308
|
-
}
|
|
309
|
-
const data = await parseBody(output.body, context);
|
|
310
|
-
let contents = {};
|
|
311
|
-
contents = _json(data);
|
|
312
|
-
const response = {
|
|
313
|
-
$metadata: deserializeMetadata(output),
|
|
314
|
-
...contents,
|
|
315
|
-
};
|
|
316
|
-
return response;
|
|
317
|
-
};
|
|
318
|
-
export const de_CreateHITWithHITTypeCommand = async (output, context) => {
|
|
319
|
-
if (output.statusCode >= 300) {
|
|
320
|
-
return de_CommandError(output, context);
|
|
321
|
-
}
|
|
322
|
-
const data = await parseBody(output.body, context);
|
|
323
|
-
let contents = {};
|
|
324
|
-
contents = de_CreateHITWithHITTypeResponse(data, context);
|
|
325
|
-
const response = {
|
|
326
|
-
$metadata: deserializeMetadata(output),
|
|
327
|
-
...contents,
|
|
328
|
-
};
|
|
329
|
-
return response;
|
|
330
|
-
};
|
|
331
|
-
export const de_CreateQualificationTypeCommand = async (output, context) => {
|
|
332
|
-
if (output.statusCode >= 300) {
|
|
333
|
-
return de_CommandError(output, context);
|
|
334
|
-
}
|
|
335
|
-
const data = await parseBody(output.body, context);
|
|
336
|
-
let contents = {};
|
|
337
|
-
contents = de_CreateQualificationTypeResponse(data, context);
|
|
338
|
-
const response = {
|
|
339
|
-
$metadata: deserializeMetadata(output),
|
|
340
|
-
...contents,
|
|
341
|
-
};
|
|
342
|
-
return response;
|
|
343
|
-
};
|
|
344
|
-
export const de_CreateWorkerBlockCommand = async (output, context) => {
|
|
345
|
-
if (output.statusCode >= 300) {
|
|
346
|
-
return de_CommandError(output, context);
|
|
347
|
-
}
|
|
348
|
-
const data = await parseBody(output.body, context);
|
|
349
|
-
let contents = {};
|
|
350
|
-
contents = _json(data);
|
|
351
|
-
const response = {
|
|
352
|
-
$metadata: deserializeMetadata(output),
|
|
353
|
-
...contents,
|
|
354
|
-
};
|
|
355
|
-
return response;
|
|
356
|
-
};
|
|
357
|
-
export const de_DeleteHITCommand = async (output, context) => {
|
|
358
|
-
if (output.statusCode >= 300) {
|
|
359
|
-
return de_CommandError(output, context);
|
|
360
|
-
}
|
|
361
|
-
const data = await parseBody(output.body, context);
|
|
362
|
-
let contents = {};
|
|
363
|
-
contents = _json(data);
|
|
364
|
-
const response = {
|
|
365
|
-
$metadata: deserializeMetadata(output),
|
|
366
|
-
...contents,
|
|
367
|
-
};
|
|
368
|
-
return response;
|
|
369
|
-
};
|
|
370
|
-
export const de_DeleteQualificationTypeCommand = async (output, context) => {
|
|
371
|
-
if (output.statusCode >= 300) {
|
|
372
|
-
return de_CommandError(output, context);
|
|
373
|
-
}
|
|
374
|
-
const data = await parseBody(output.body, context);
|
|
375
|
-
let contents = {};
|
|
376
|
-
contents = _json(data);
|
|
377
|
-
const response = {
|
|
378
|
-
$metadata: deserializeMetadata(output),
|
|
379
|
-
...contents,
|
|
380
|
-
};
|
|
381
|
-
return response;
|
|
382
|
-
};
|
|
383
|
-
export const de_DeleteWorkerBlockCommand = async (output, context) => {
|
|
384
|
-
if (output.statusCode >= 300) {
|
|
385
|
-
return de_CommandError(output, context);
|
|
386
|
-
}
|
|
387
|
-
const data = await parseBody(output.body, context);
|
|
388
|
-
let contents = {};
|
|
389
|
-
contents = _json(data);
|
|
390
|
-
const response = {
|
|
391
|
-
$metadata: deserializeMetadata(output),
|
|
392
|
-
...contents,
|
|
393
|
-
};
|
|
394
|
-
return response;
|
|
395
|
-
};
|
|
396
|
-
export const de_DisassociateQualificationFromWorkerCommand = async (output, context) => {
|
|
397
|
-
if (output.statusCode >= 300) {
|
|
398
|
-
return de_CommandError(output, context);
|
|
399
|
-
}
|
|
400
|
-
const data = await parseBody(output.body, context);
|
|
401
|
-
let contents = {};
|
|
402
|
-
contents = _json(data);
|
|
403
|
-
const response = {
|
|
404
|
-
$metadata: deserializeMetadata(output),
|
|
405
|
-
...contents,
|
|
406
|
-
};
|
|
407
|
-
return response;
|
|
408
|
-
};
|
|
409
|
-
export const de_GetAccountBalanceCommand = async (output, context) => {
|
|
410
|
-
if (output.statusCode >= 300) {
|
|
411
|
-
return de_CommandError(output, context);
|
|
412
|
-
}
|
|
413
|
-
const data = await parseBody(output.body, context);
|
|
414
|
-
let contents = {};
|
|
415
|
-
contents = _json(data);
|
|
416
|
-
const response = {
|
|
417
|
-
$metadata: deserializeMetadata(output),
|
|
418
|
-
...contents,
|
|
419
|
-
};
|
|
420
|
-
return response;
|
|
421
|
-
};
|
|
422
|
-
export const de_GetAssignmentCommand = async (output, context) => {
|
|
423
|
-
if (output.statusCode >= 300) {
|
|
424
|
-
return de_CommandError(output, context);
|
|
425
|
-
}
|
|
426
|
-
const data = await parseBody(output.body, context);
|
|
427
|
-
let contents = {};
|
|
428
|
-
contents = de_GetAssignmentResponse(data, context);
|
|
429
|
-
const response = {
|
|
430
|
-
$metadata: deserializeMetadata(output),
|
|
431
|
-
...contents,
|
|
432
|
-
};
|
|
433
|
-
return response;
|
|
434
|
-
};
|
|
435
|
-
export const de_GetFileUploadURLCommand = async (output, context) => {
|
|
436
|
-
if (output.statusCode >= 300) {
|
|
437
|
-
return de_CommandError(output, context);
|
|
438
|
-
}
|
|
439
|
-
const data = await parseBody(output.body, context);
|
|
440
|
-
let contents = {};
|
|
441
|
-
contents = _json(data);
|
|
442
|
-
const response = {
|
|
443
|
-
$metadata: deserializeMetadata(output),
|
|
444
|
-
...contents,
|
|
445
|
-
};
|
|
446
|
-
return response;
|
|
447
|
-
};
|
|
448
|
-
export const de_GetHITCommand = async (output, context) => {
|
|
449
|
-
if (output.statusCode >= 300) {
|
|
450
|
-
return de_CommandError(output, context);
|
|
451
|
-
}
|
|
452
|
-
const data = await parseBody(output.body, context);
|
|
453
|
-
let contents = {};
|
|
454
|
-
contents = de_GetHITResponse(data, context);
|
|
455
|
-
const response = {
|
|
456
|
-
$metadata: deserializeMetadata(output),
|
|
457
|
-
...contents,
|
|
458
|
-
};
|
|
459
|
-
return response;
|
|
460
|
-
};
|
|
461
|
-
export const de_GetQualificationScoreCommand = async (output, context) => {
|
|
462
|
-
if (output.statusCode >= 300) {
|
|
463
|
-
return de_CommandError(output, context);
|
|
464
|
-
}
|
|
465
|
-
const data = await parseBody(output.body, context);
|
|
466
|
-
let contents = {};
|
|
467
|
-
contents = de_GetQualificationScoreResponse(data, context);
|
|
468
|
-
const response = {
|
|
469
|
-
$metadata: deserializeMetadata(output),
|
|
470
|
-
...contents,
|
|
471
|
-
};
|
|
472
|
-
return response;
|
|
473
|
-
};
|
|
474
|
-
export const de_GetQualificationTypeCommand = async (output, context) => {
|
|
475
|
-
if (output.statusCode >= 300) {
|
|
476
|
-
return de_CommandError(output, context);
|
|
477
|
-
}
|
|
478
|
-
const data = await parseBody(output.body, context);
|
|
479
|
-
let contents = {};
|
|
480
|
-
contents = de_GetQualificationTypeResponse(data, context);
|
|
481
|
-
const response = {
|
|
482
|
-
$metadata: deserializeMetadata(output),
|
|
483
|
-
...contents,
|
|
484
|
-
};
|
|
485
|
-
return response;
|
|
486
|
-
};
|
|
487
|
-
export const de_ListAssignmentsForHITCommand = async (output, context) => {
|
|
488
|
-
if (output.statusCode >= 300) {
|
|
489
|
-
return de_CommandError(output, context);
|
|
490
|
-
}
|
|
491
|
-
const data = await parseBody(output.body, context);
|
|
492
|
-
let contents = {};
|
|
493
|
-
contents = de_ListAssignmentsForHITResponse(data, context);
|
|
494
|
-
const response = {
|
|
495
|
-
$metadata: deserializeMetadata(output),
|
|
496
|
-
...contents,
|
|
497
|
-
};
|
|
498
|
-
return response;
|
|
499
|
-
};
|
|
500
|
-
export const de_ListBonusPaymentsCommand = async (output, context) => {
|
|
501
|
-
if (output.statusCode >= 300) {
|
|
502
|
-
return de_CommandError(output, context);
|
|
503
|
-
}
|
|
504
|
-
const data = await parseBody(output.body, context);
|
|
505
|
-
let contents = {};
|
|
506
|
-
contents = de_ListBonusPaymentsResponse(data, context);
|
|
507
|
-
const response = {
|
|
508
|
-
$metadata: deserializeMetadata(output),
|
|
509
|
-
...contents,
|
|
510
|
-
};
|
|
511
|
-
return response;
|
|
512
|
-
};
|
|
513
|
-
export const de_ListHITsCommand = async (output, context) => {
|
|
514
|
-
if (output.statusCode >= 300) {
|
|
515
|
-
return de_CommandError(output, context);
|
|
516
|
-
}
|
|
517
|
-
const data = await parseBody(output.body, context);
|
|
518
|
-
let contents = {};
|
|
519
|
-
contents = de_ListHITsResponse(data, context);
|
|
520
|
-
const response = {
|
|
521
|
-
$metadata: deserializeMetadata(output),
|
|
522
|
-
...contents,
|
|
523
|
-
};
|
|
524
|
-
return response;
|
|
525
|
-
};
|
|
526
|
-
export const de_ListHITsForQualificationTypeCommand = async (output, context) => {
|
|
527
|
-
if (output.statusCode >= 300) {
|
|
528
|
-
return de_CommandError(output, context);
|
|
529
|
-
}
|
|
530
|
-
const data = await parseBody(output.body, context);
|
|
531
|
-
let contents = {};
|
|
532
|
-
contents = de_ListHITsForQualificationTypeResponse(data, context);
|
|
533
|
-
const response = {
|
|
534
|
-
$metadata: deserializeMetadata(output),
|
|
535
|
-
...contents,
|
|
536
|
-
};
|
|
537
|
-
return response;
|
|
538
|
-
};
|
|
539
|
-
export const de_ListQualificationRequestsCommand = async (output, context) => {
|
|
540
|
-
if (output.statusCode >= 300) {
|
|
541
|
-
return de_CommandError(output, context);
|
|
542
|
-
}
|
|
543
|
-
const data = await parseBody(output.body, context);
|
|
544
|
-
let contents = {};
|
|
545
|
-
contents = de_ListQualificationRequestsResponse(data, context);
|
|
546
|
-
const response = {
|
|
547
|
-
$metadata: deserializeMetadata(output),
|
|
548
|
-
...contents,
|
|
549
|
-
};
|
|
550
|
-
return response;
|
|
551
|
-
};
|
|
552
|
-
export const de_ListQualificationTypesCommand = async (output, context) => {
|
|
553
|
-
if (output.statusCode >= 300) {
|
|
554
|
-
return de_CommandError(output, context);
|
|
555
|
-
}
|
|
556
|
-
const data = await parseBody(output.body, context);
|
|
557
|
-
let contents = {};
|
|
558
|
-
contents = de_ListQualificationTypesResponse(data, context);
|
|
559
|
-
const response = {
|
|
560
|
-
$metadata: deserializeMetadata(output),
|
|
561
|
-
...contents,
|
|
562
|
-
};
|
|
563
|
-
return response;
|
|
564
|
-
};
|
|
565
|
-
export const de_ListReviewableHITsCommand = async (output, context) => {
|
|
566
|
-
if (output.statusCode >= 300) {
|
|
567
|
-
return de_CommandError(output, context);
|
|
568
|
-
}
|
|
569
|
-
const data = await parseBody(output.body, context);
|
|
570
|
-
let contents = {};
|
|
571
|
-
contents = de_ListReviewableHITsResponse(data, context);
|
|
572
|
-
const response = {
|
|
573
|
-
$metadata: deserializeMetadata(output),
|
|
574
|
-
...contents,
|
|
575
|
-
};
|
|
576
|
-
return response;
|
|
577
|
-
};
|
|
578
|
-
export const de_ListReviewPolicyResultsForHITCommand = async (output, context) => {
|
|
579
|
-
if (output.statusCode >= 300) {
|
|
580
|
-
return de_CommandError(output, context);
|
|
581
|
-
}
|
|
582
|
-
const data = await parseBody(output.body, context);
|
|
583
|
-
let contents = {};
|
|
584
|
-
contents = de_ListReviewPolicyResultsForHITResponse(data, context);
|
|
585
|
-
const response = {
|
|
586
|
-
$metadata: deserializeMetadata(output),
|
|
587
|
-
...contents,
|
|
588
|
-
};
|
|
589
|
-
return response;
|
|
590
|
-
};
|
|
591
|
-
export const de_ListWorkerBlocksCommand = async (output, context) => {
|
|
592
|
-
if (output.statusCode >= 300) {
|
|
593
|
-
return de_CommandError(output, context);
|
|
594
|
-
}
|
|
595
|
-
const data = await parseBody(output.body, context);
|
|
596
|
-
let contents = {};
|
|
597
|
-
contents = _json(data);
|
|
598
|
-
const response = {
|
|
599
|
-
$metadata: deserializeMetadata(output),
|
|
600
|
-
...contents,
|
|
601
|
-
};
|
|
602
|
-
return response;
|
|
603
|
-
};
|
|
604
|
-
export const de_ListWorkersWithQualificationTypeCommand = async (output, context) => {
|
|
605
|
-
if (output.statusCode >= 300) {
|
|
606
|
-
return de_CommandError(output, context);
|
|
607
|
-
}
|
|
608
|
-
const data = await parseBody(output.body, context);
|
|
609
|
-
let contents = {};
|
|
610
|
-
contents = de_ListWorkersWithQualificationTypeResponse(data, context);
|
|
611
|
-
const response = {
|
|
612
|
-
$metadata: deserializeMetadata(output),
|
|
613
|
-
...contents,
|
|
614
|
-
};
|
|
615
|
-
return response;
|
|
616
|
-
};
|
|
617
|
-
export const de_NotifyWorkersCommand = async (output, context) => {
|
|
618
|
-
if (output.statusCode >= 300) {
|
|
619
|
-
return de_CommandError(output, context);
|
|
620
|
-
}
|
|
621
|
-
const data = await parseBody(output.body, context);
|
|
622
|
-
let contents = {};
|
|
623
|
-
contents = _json(data);
|
|
624
|
-
const response = {
|
|
625
|
-
$metadata: deserializeMetadata(output),
|
|
626
|
-
...contents,
|
|
627
|
-
};
|
|
628
|
-
return response;
|
|
629
|
-
};
|
|
630
|
-
export const de_RejectAssignmentCommand = async (output, context) => {
|
|
631
|
-
if (output.statusCode >= 300) {
|
|
632
|
-
return de_CommandError(output, context);
|
|
633
|
-
}
|
|
634
|
-
const data = await parseBody(output.body, context);
|
|
635
|
-
let contents = {};
|
|
636
|
-
contents = _json(data);
|
|
637
|
-
const response = {
|
|
638
|
-
$metadata: deserializeMetadata(output),
|
|
639
|
-
...contents,
|
|
640
|
-
};
|
|
641
|
-
return response;
|
|
642
|
-
};
|
|
643
|
-
export const de_RejectQualificationRequestCommand = async (output, context) => {
|
|
644
|
-
if (output.statusCode >= 300) {
|
|
645
|
-
return de_CommandError(output, context);
|
|
646
|
-
}
|
|
647
|
-
const data = await parseBody(output.body, context);
|
|
648
|
-
let contents = {};
|
|
649
|
-
contents = _json(data);
|
|
650
|
-
const response = {
|
|
651
|
-
$metadata: deserializeMetadata(output),
|
|
652
|
-
...contents,
|
|
653
|
-
};
|
|
654
|
-
return response;
|
|
655
|
-
};
|
|
656
|
-
export const de_SendBonusCommand = async (output, context) => {
|
|
657
|
-
if (output.statusCode >= 300) {
|
|
658
|
-
return de_CommandError(output, context);
|
|
659
|
-
}
|
|
660
|
-
const data = await parseBody(output.body, context);
|
|
661
|
-
let contents = {};
|
|
662
|
-
contents = _json(data);
|
|
663
|
-
const response = {
|
|
664
|
-
$metadata: deserializeMetadata(output),
|
|
665
|
-
...contents,
|
|
666
|
-
};
|
|
667
|
-
return response;
|
|
668
|
-
};
|
|
669
|
-
export const de_SendTestEventNotificationCommand = async (output, context) => {
|
|
670
|
-
if (output.statusCode >= 300) {
|
|
671
|
-
return de_CommandError(output, context);
|
|
672
|
-
}
|
|
673
|
-
const data = await parseBody(output.body, context);
|
|
674
|
-
let contents = {};
|
|
675
|
-
contents = _json(data);
|
|
676
|
-
const response = {
|
|
677
|
-
$metadata: deserializeMetadata(output),
|
|
678
|
-
...contents,
|
|
679
|
-
};
|
|
680
|
-
return response;
|
|
681
|
-
};
|
|
682
|
-
export const de_UpdateExpirationForHITCommand = async (output, context) => {
|
|
683
|
-
if (output.statusCode >= 300) {
|
|
684
|
-
return de_CommandError(output, context);
|
|
685
|
-
}
|
|
686
|
-
const data = await parseBody(output.body, context);
|
|
687
|
-
let contents = {};
|
|
688
|
-
contents = _json(data);
|
|
689
|
-
const response = {
|
|
690
|
-
$metadata: deserializeMetadata(output),
|
|
691
|
-
...contents,
|
|
692
|
-
};
|
|
693
|
-
return response;
|
|
694
|
-
};
|
|
695
|
-
export const de_UpdateHITReviewStatusCommand = async (output, context) => {
|
|
696
|
-
if (output.statusCode >= 300) {
|
|
697
|
-
return de_CommandError(output, context);
|
|
698
|
-
}
|
|
699
|
-
const data = await parseBody(output.body, context);
|
|
700
|
-
let contents = {};
|
|
701
|
-
contents = _json(data);
|
|
702
|
-
const response = {
|
|
703
|
-
$metadata: deserializeMetadata(output),
|
|
704
|
-
...contents,
|
|
705
|
-
};
|
|
706
|
-
return response;
|
|
707
|
-
};
|
|
708
|
-
export const de_UpdateHITTypeOfHITCommand = async (output, context) => {
|
|
709
|
-
if (output.statusCode >= 300) {
|
|
710
|
-
return de_CommandError(output, context);
|
|
711
|
-
}
|
|
712
|
-
const data = await parseBody(output.body, context);
|
|
713
|
-
let contents = {};
|
|
714
|
-
contents = _json(data);
|
|
715
|
-
const response = {
|
|
716
|
-
$metadata: deserializeMetadata(output),
|
|
717
|
-
...contents,
|
|
718
|
-
};
|
|
719
|
-
return response;
|
|
720
|
-
};
|
|
721
|
-
export const de_UpdateNotificationSettingsCommand = async (output, context) => {
|
|
722
|
-
if (output.statusCode >= 300) {
|
|
723
|
-
return de_CommandError(output, context);
|
|
724
|
-
}
|
|
725
|
-
const data = await parseBody(output.body, context);
|
|
726
|
-
let contents = {};
|
|
727
|
-
contents = _json(data);
|
|
728
|
-
const response = {
|
|
729
|
-
$metadata: deserializeMetadata(output),
|
|
730
|
-
...contents,
|
|
731
|
-
};
|
|
732
|
-
return response;
|
|
733
|
-
};
|
|
734
|
-
export const de_UpdateQualificationTypeCommand = async (output, context) => {
|
|
735
|
-
if (output.statusCode >= 300) {
|
|
736
|
-
return de_CommandError(output, context);
|
|
737
|
-
}
|
|
738
|
-
const data = await parseBody(output.body, context);
|
|
739
|
-
let contents = {};
|
|
740
|
-
contents = de_UpdateQualificationTypeResponse(data, context);
|
|
741
|
-
const response = {
|
|
742
|
-
$metadata: deserializeMetadata(output),
|
|
743
|
-
...contents,
|
|
744
|
-
};
|
|
745
|
-
return response;
|
|
746
|
-
};
|
|
747
|
-
const de_CommandError = async (output, context) => {
|
|
748
|
-
const parsedOutput = {
|
|
749
|
-
...output,
|
|
750
|
-
body: await parseErrorBody(output.body, context),
|
|
751
|
-
};
|
|
752
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
753
|
-
switch (errorCode) {
|
|
754
|
-
case "RequestError":
|
|
755
|
-
case "com.amazonaws.mturk#RequestError":
|
|
756
|
-
throw await de_RequestErrorRes(parsedOutput, context);
|
|
757
|
-
case "ServiceFault":
|
|
758
|
-
case "com.amazonaws.mturk#ServiceFault":
|
|
759
|
-
throw await de_ServiceFaultRes(parsedOutput, context);
|
|
760
|
-
default:
|
|
761
|
-
const parsedBody = parsedOutput.body;
|
|
762
|
-
return throwDefaultError({
|
|
763
|
-
output,
|
|
764
|
-
parsedBody,
|
|
765
|
-
errorCode,
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
const de_RequestErrorRes = async (parsedOutput, context) => {
|
|
770
|
-
const body = parsedOutput.body;
|
|
771
|
-
const deserialized = _json(body);
|
|
772
|
-
const exception = new RequestError({
|
|
773
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
774
|
-
...deserialized,
|
|
775
|
-
});
|
|
776
|
-
return __decorateServiceException(exception, body);
|
|
777
|
-
};
|
|
778
|
-
const de_ServiceFaultRes = async (parsedOutput, context) => {
|
|
779
|
-
const body = parsedOutput.body;
|
|
780
|
-
const deserialized = _json(body);
|
|
781
|
-
const exception = new ServiceFault({
|
|
782
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
783
|
-
...deserialized,
|
|
784
|
-
});
|
|
785
|
-
return __decorateServiceException(exception, body);
|
|
786
|
-
};
|
|
787
|
-
const se_UpdateExpirationForHITRequest = (input, context) => {
|
|
788
|
-
return take(input, {
|
|
789
|
-
ExpireAt: (_) => _.getTime() / 1_000,
|
|
790
|
-
HITId: [],
|
|
791
|
-
});
|
|
792
|
-
};
|
|
793
|
-
const de_Assignment = (output, context) => {
|
|
794
|
-
return take(output, {
|
|
795
|
-
AcceptTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
796
|
-
Answer: __expectString,
|
|
797
|
-
ApprovalTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
798
|
-
AssignmentId: __expectString,
|
|
799
|
-
AssignmentStatus: __expectString,
|
|
800
|
-
AutoApprovalTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
801
|
-
Deadline: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
802
|
-
HITId: __expectString,
|
|
803
|
-
RejectionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
804
|
-
RequesterFeedback: __expectString,
|
|
805
|
-
SubmitTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
806
|
-
WorkerId: __expectString,
|
|
807
|
-
});
|
|
808
|
-
};
|
|
809
|
-
const de_AssignmentList = (output, context) => {
|
|
810
|
-
const retVal = (output || [])
|
|
811
|
-
.filter((e) => e != null)
|
|
812
|
-
.map((entry) => {
|
|
813
|
-
return de_Assignment(entry, context);
|
|
814
|
-
});
|
|
815
|
-
return retVal;
|
|
816
|
-
};
|
|
817
|
-
const de_BonusPayment = (output, context) => {
|
|
818
|
-
return take(output, {
|
|
819
|
-
AssignmentId: __expectString,
|
|
820
|
-
BonusAmount: __expectString,
|
|
821
|
-
GrantTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
822
|
-
Reason: __expectString,
|
|
823
|
-
WorkerId: __expectString,
|
|
824
|
-
});
|
|
825
|
-
};
|
|
826
|
-
const de_BonusPaymentList = (output, context) => {
|
|
827
|
-
const retVal = (output || [])
|
|
828
|
-
.filter((e) => e != null)
|
|
829
|
-
.map((entry) => {
|
|
830
|
-
return de_BonusPayment(entry, context);
|
|
831
|
-
});
|
|
832
|
-
return retVal;
|
|
833
|
-
};
|
|
834
|
-
const de_CreateHITResponse = (output, context) => {
|
|
835
|
-
return take(output, {
|
|
836
|
-
HIT: (_) => de_HIT(_, context),
|
|
837
|
-
});
|
|
838
|
-
};
|
|
839
|
-
const de_CreateHITWithHITTypeResponse = (output, context) => {
|
|
840
|
-
return take(output, {
|
|
841
|
-
HIT: (_) => de_HIT(_, context),
|
|
842
|
-
});
|
|
843
|
-
};
|
|
844
|
-
const de_CreateQualificationTypeResponse = (output, context) => {
|
|
845
|
-
return take(output, {
|
|
846
|
-
QualificationType: (_) => de_QualificationType(_, context),
|
|
847
|
-
});
|
|
848
|
-
};
|
|
849
|
-
const de_GetAssignmentResponse = (output, context) => {
|
|
850
|
-
return take(output, {
|
|
851
|
-
Assignment: (_) => de_Assignment(_, context),
|
|
852
|
-
HIT: (_) => de_HIT(_, context),
|
|
853
|
-
});
|
|
854
|
-
};
|
|
855
|
-
const de_GetHITResponse = (output, context) => {
|
|
856
|
-
return take(output, {
|
|
857
|
-
HIT: (_) => de_HIT(_, context),
|
|
858
|
-
});
|
|
859
|
-
};
|
|
860
|
-
const de_GetQualificationScoreResponse = (output, context) => {
|
|
861
|
-
return take(output, {
|
|
862
|
-
Qualification: (_) => de_Qualification(_, context),
|
|
863
|
-
});
|
|
864
|
-
};
|
|
865
|
-
const de_GetQualificationTypeResponse = (output, context) => {
|
|
866
|
-
return take(output, {
|
|
867
|
-
QualificationType: (_) => de_QualificationType(_, context),
|
|
868
|
-
});
|
|
869
|
-
};
|
|
870
|
-
const de_HIT = (output, context) => {
|
|
871
|
-
return take(output, {
|
|
872
|
-
AssignmentDurationInSeconds: __expectLong,
|
|
873
|
-
AutoApprovalDelayInSeconds: __expectLong,
|
|
874
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
875
|
-
Description: __expectString,
|
|
876
|
-
Expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
877
|
-
HITGroupId: __expectString,
|
|
878
|
-
HITId: __expectString,
|
|
879
|
-
HITLayoutId: __expectString,
|
|
880
|
-
HITReviewStatus: __expectString,
|
|
881
|
-
HITStatus: __expectString,
|
|
882
|
-
HITTypeId: __expectString,
|
|
883
|
-
Keywords: __expectString,
|
|
884
|
-
MaxAssignments: __expectInt32,
|
|
885
|
-
NumberOfAssignmentsAvailable: __expectInt32,
|
|
886
|
-
NumberOfAssignmentsCompleted: __expectInt32,
|
|
887
|
-
NumberOfAssignmentsPending: __expectInt32,
|
|
888
|
-
QualificationRequirements: _json,
|
|
889
|
-
Question: __expectString,
|
|
890
|
-
RequesterAnnotation: __expectString,
|
|
891
|
-
Reward: __expectString,
|
|
892
|
-
Title: __expectString,
|
|
893
|
-
});
|
|
894
|
-
};
|
|
895
|
-
const de_HITList = (output, context) => {
|
|
896
|
-
const retVal = (output || [])
|
|
897
|
-
.filter((e) => e != null)
|
|
898
|
-
.map((entry) => {
|
|
899
|
-
return de_HIT(entry, context);
|
|
900
|
-
});
|
|
901
|
-
return retVal;
|
|
902
|
-
};
|
|
903
|
-
const de_ListAssignmentsForHITResponse = (output, context) => {
|
|
904
|
-
return take(output, {
|
|
905
|
-
Assignments: (_) => de_AssignmentList(_, context),
|
|
906
|
-
NextToken: __expectString,
|
|
907
|
-
NumResults: __expectInt32,
|
|
908
|
-
});
|
|
909
|
-
};
|
|
910
|
-
const de_ListBonusPaymentsResponse = (output, context) => {
|
|
911
|
-
return take(output, {
|
|
912
|
-
BonusPayments: (_) => de_BonusPaymentList(_, context),
|
|
913
|
-
NextToken: __expectString,
|
|
914
|
-
NumResults: __expectInt32,
|
|
915
|
-
});
|
|
916
|
-
};
|
|
917
|
-
const de_ListHITsForQualificationTypeResponse = (output, context) => {
|
|
918
|
-
return take(output, {
|
|
919
|
-
HITs: (_) => de_HITList(_, context),
|
|
920
|
-
NextToken: __expectString,
|
|
921
|
-
NumResults: __expectInt32,
|
|
922
|
-
});
|
|
923
|
-
};
|
|
924
|
-
const de_ListHITsResponse = (output, context) => {
|
|
925
|
-
return take(output, {
|
|
926
|
-
HITs: (_) => de_HITList(_, context),
|
|
927
|
-
NextToken: __expectString,
|
|
928
|
-
NumResults: __expectInt32,
|
|
929
|
-
});
|
|
930
|
-
};
|
|
931
|
-
const de_ListQualificationRequestsResponse = (output, context) => {
|
|
932
|
-
return take(output, {
|
|
933
|
-
NextToken: __expectString,
|
|
934
|
-
NumResults: __expectInt32,
|
|
935
|
-
QualificationRequests: (_) => de_QualificationRequestList(_, context),
|
|
936
|
-
});
|
|
937
|
-
};
|
|
938
|
-
const de_ListQualificationTypesResponse = (output, context) => {
|
|
939
|
-
return take(output, {
|
|
940
|
-
NextToken: __expectString,
|
|
941
|
-
NumResults: __expectInt32,
|
|
942
|
-
QualificationTypes: (_) => de_QualificationTypeList(_, context),
|
|
943
|
-
});
|
|
944
|
-
};
|
|
945
|
-
const de_ListReviewableHITsResponse = (output, context) => {
|
|
946
|
-
return take(output, {
|
|
947
|
-
HITs: (_) => de_HITList(_, context),
|
|
948
|
-
NextToken: __expectString,
|
|
949
|
-
NumResults: __expectInt32,
|
|
950
|
-
});
|
|
951
|
-
};
|
|
952
|
-
const de_ListReviewPolicyResultsForHITResponse = (output, context) => {
|
|
953
|
-
return take(output, {
|
|
954
|
-
AssignmentReviewPolicy: _json,
|
|
955
|
-
AssignmentReviewReport: (_) => de_ReviewReport(_, context),
|
|
956
|
-
HITId: __expectString,
|
|
957
|
-
HITReviewPolicy: _json,
|
|
958
|
-
HITReviewReport: (_) => de_ReviewReport(_, context),
|
|
959
|
-
NextToken: __expectString,
|
|
960
|
-
});
|
|
961
|
-
};
|
|
962
|
-
const de_ListWorkersWithQualificationTypeResponse = (output, context) => {
|
|
963
|
-
return take(output, {
|
|
964
|
-
NextToken: __expectString,
|
|
965
|
-
NumResults: __expectInt32,
|
|
966
|
-
Qualifications: (_) => de_QualificationList(_, context),
|
|
967
|
-
});
|
|
968
|
-
};
|
|
969
|
-
const de_Qualification = (output, context) => {
|
|
970
|
-
return take(output, {
|
|
971
|
-
GrantTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
972
|
-
IntegerValue: __expectInt32,
|
|
973
|
-
LocaleValue: _json,
|
|
974
|
-
QualificationTypeId: __expectString,
|
|
975
|
-
Status: __expectString,
|
|
976
|
-
WorkerId: __expectString,
|
|
977
|
-
});
|
|
978
|
-
};
|
|
979
|
-
const de_QualificationList = (output, context) => {
|
|
980
|
-
const retVal = (output || [])
|
|
981
|
-
.filter((e) => e != null)
|
|
982
|
-
.map((entry) => {
|
|
983
|
-
return de_Qualification(entry, context);
|
|
984
|
-
});
|
|
985
|
-
return retVal;
|
|
986
|
-
};
|
|
987
|
-
const de_QualificationRequest = (output, context) => {
|
|
988
|
-
return take(output, {
|
|
989
|
-
Answer: __expectString,
|
|
990
|
-
QualificationRequestId: __expectString,
|
|
991
|
-
QualificationTypeId: __expectString,
|
|
992
|
-
SubmitTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
993
|
-
Test: __expectString,
|
|
994
|
-
WorkerId: __expectString,
|
|
995
|
-
});
|
|
996
|
-
};
|
|
997
|
-
const de_QualificationRequestList = (output, context) => {
|
|
998
|
-
const retVal = (output || [])
|
|
999
|
-
.filter((e) => e != null)
|
|
1000
|
-
.map((entry) => {
|
|
1001
|
-
return de_QualificationRequest(entry, context);
|
|
1002
|
-
});
|
|
1003
|
-
return retVal;
|
|
1004
|
-
};
|
|
1005
|
-
const de_QualificationType = (output, context) => {
|
|
1006
|
-
return take(output, {
|
|
1007
|
-
AnswerKey: __expectString,
|
|
1008
|
-
AutoGranted: __expectBoolean,
|
|
1009
|
-
AutoGrantedValue: __expectInt32,
|
|
1010
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1011
|
-
Description: __expectString,
|
|
1012
|
-
IsRequestable: __expectBoolean,
|
|
1013
|
-
Keywords: __expectString,
|
|
1014
|
-
Name: __expectString,
|
|
1015
|
-
QualificationTypeId: __expectString,
|
|
1016
|
-
QualificationTypeStatus: __expectString,
|
|
1017
|
-
RetryDelayInSeconds: __expectLong,
|
|
1018
|
-
Test: __expectString,
|
|
1019
|
-
TestDurationInSeconds: __expectLong,
|
|
1020
|
-
});
|
|
1021
|
-
};
|
|
1022
|
-
const de_QualificationTypeList = (output, context) => {
|
|
1023
|
-
const retVal = (output || [])
|
|
1024
|
-
.filter((e) => e != null)
|
|
1025
|
-
.map((entry) => {
|
|
1026
|
-
return de_QualificationType(entry, context);
|
|
1027
|
-
});
|
|
1028
|
-
return retVal;
|
|
1029
|
-
};
|
|
1030
|
-
const de_ReviewActionDetail = (output, context) => {
|
|
1031
|
-
return take(output, {
|
|
1032
|
-
ActionId: __expectString,
|
|
1033
|
-
ActionName: __expectString,
|
|
1034
|
-
CompleteTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1035
|
-
ErrorCode: __expectString,
|
|
1036
|
-
Result: __expectString,
|
|
1037
|
-
Status: __expectString,
|
|
1038
|
-
TargetId: __expectString,
|
|
1039
|
-
TargetType: __expectString,
|
|
1040
|
-
});
|
|
1041
|
-
};
|
|
1042
|
-
const de_ReviewActionDetailList = (output, context) => {
|
|
1043
|
-
const retVal = (output || [])
|
|
1044
|
-
.filter((e) => e != null)
|
|
1045
|
-
.map((entry) => {
|
|
1046
|
-
return de_ReviewActionDetail(entry, context);
|
|
1047
|
-
});
|
|
1048
|
-
return retVal;
|
|
1049
|
-
};
|
|
1050
|
-
const de_ReviewReport = (output, context) => {
|
|
1051
|
-
return take(output, {
|
|
1052
|
-
ReviewActions: (_) => de_ReviewActionDetailList(_, context),
|
|
1053
|
-
ReviewResults: _json,
|
|
1054
|
-
});
|
|
1055
|
-
};
|
|
1056
|
-
const de_UpdateQualificationTypeResponse = (output, context) => {
|
|
1057
|
-
return take(output, {
|
|
1058
|
-
QualificationType: (_) => de_QualificationType(_, context),
|
|
1059
|
-
});
|
|
1060
|
-
};
|
|
1061
|
-
const deserializeMetadata = (output) => ({
|
|
1062
|
-
httpStatusCode: output.statusCode,
|
|
1063
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1064
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1065
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1066
|
-
});
|
|
1067
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1068
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
1069
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1070
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1071
|
-
const contents = {
|
|
1072
|
-
protocol,
|
|
1073
|
-
hostname,
|
|
1074
|
-
port,
|
|
1075
|
-
method: "POST",
|
|
1076
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1077
|
-
headers,
|
|
1078
|
-
};
|
|
1079
|
-
if (resolvedHostname !== undefined) {
|
|
1080
|
-
contents.hostname = resolvedHostname;
|
|
1081
|
-
}
|
|
1082
|
-
if (body !== undefined) {
|
|
1083
|
-
contents.body = body;
|
|
1084
|
-
}
|
|
1085
|
-
return new __HttpRequest(contents);
|
|
1086
|
-
};
|
|
1087
|
-
function sharedHeaders(operation) {
|
|
1088
|
-
return {
|
|
1089
|
-
"content-type": "application/x-amz-json-1.1",
|
|
1090
|
-
"x-amz-target": `MTurkRequesterServiceV20170117.${operation}`,
|
|
1091
|
-
};
|
|
1092
|
-
}
|