@aws-sdk/client-textract 3.927.0 → 3.928.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 +1196 -1500
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/TextractClient.js +2 -0
- package/dist-es/commands/AnalyzeDocumentCommand.js +3 -9
- package/dist-es/commands/AnalyzeExpenseCommand.js +3 -9
- package/dist-es/commands/AnalyzeIDCommand.js +3 -9
- package/dist-es/commands/CreateAdapterCommand.js +3 -9
- package/dist-es/commands/CreateAdapterVersionCommand.js +3 -9
- package/dist-es/commands/DeleteAdapterCommand.js +3 -9
- package/dist-es/commands/DeleteAdapterVersionCommand.js +3 -9
- package/dist-es/commands/DetectDocumentTextCommand.js +3 -9
- package/dist-es/commands/GetAdapterCommand.js +3 -9
- package/dist-es/commands/GetAdapterVersionCommand.js +3 -9
- package/dist-es/commands/GetDocumentAnalysisCommand.js +3 -9
- package/dist-es/commands/GetDocumentTextDetectionCommand.js +3 -9
- package/dist-es/commands/GetExpenseAnalysisCommand.js +3 -9
- package/dist-es/commands/GetLendingAnalysisCommand.js +3 -9
- package/dist-es/commands/GetLendingAnalysisSummaryCommand.js +3 -9
- package/dist-es/commands/ListAdapterVersionsCommand.js +3 -9
- package/dist-es/commands/ListAdaptersCommand.js +3 -9
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
- package/dist-es/commands/StartDocumentAnalysisCommand.js +3 -9
- package/dist-es/commands/StartDocumentTextDetectionCommand.js +3 -9
- package/dist-es/commands/StartExpenseAnalysisCommand.js +3 -9
- package/dist-es/commands/StartLendingAnalysisCommand.js +3 -9
- package/dist-es/commands/TagResourceCommand.js +3 -9
- package/dist-es/commands/UntagResourceCommand.js +3 -9
- package/dist-es/commands/UpdateAdapterCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +1104 -0
- package/dist-types/TextractClient.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 +186 -0
- package/dist-types/ts3.4/TextractClient.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 +192 -0
- package/package.json +5 -6
- package/dist-es/protocols/Aws_json1_1.js +0 -1275
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -227
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -305
|
@@ -1,1275 +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, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { AccessDeniedException, BadDocumentException, ConflictException, DocumentTooLargeException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, InternalServerError, InvalidJobIdException, InvalidKMSKeyException, InvalidParameterException, InvalidS3ObjectException, LimitExceededException, ProvisionedThroughputExceededException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UnsupportedDocumentException, ValidationException, } from "../models/models_0";
|
|
6
|
-
import { TextractServiceException as __BaseException } from "../models/TextractServiceException";
|
|
7
|
-
export const se_AnalyzeDocumentCommand = async (input, context) => {
|
|
8
|
-
const headers = sharedHeaders("AnalyzeDocument");
|
|
9
|
-
let body;
|
|
10
|
-
body = JSON.stringify(se_AnalyzeDocumentRequest(input, context));
|
|
11
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
12
|
-
};
|
|
13
|
-
export const se_AnalyzeExpenseCommand = async (input, context) => {
|
|
14
|
-
const headers = sharedHeaders("AnalyzeExpense");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify(se_AnalyzeExpenseRequest(input, context));
|
|
17
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
18
|
-
};
|
|
19
|
-
export const se_AnalyzeIDCommand = async (input, context) => {
|
|
20
|
-
const headers = sharedHeaders("AnalyzeID");
|
|
21
|
-
let body;
|
|
22
|
-
body = JSON.stringify(se_AnalyzeIDRequest(input, context));
|
|
23
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
|
-
};
|
|
25
|
-
export const se_CreateAdapterCommand = async (input, context) => {
|
|
26
|
-
const headers = sharedHeaders("CreateAdapter");
|
|
27
|
-
let body;
|
|
28
|
-
body = JSON.stringify(se_CreateAdapterRequest(input, context));
|
|
29
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
30
|
-
};
|
|
31
|
-
export const se_CreateAdapterVersionCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("CreateAdapterVersion");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify(se_CreateAdapterVersionRequest(input, context));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
export const se_DeleteAdapterCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("DeleteAdapter");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify(_json(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
export const se_DeleteAdapterVersionCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("DeleteAdapterVersion");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify(_json(input));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
export const se_DetectDocumentTextCommand = async (input, context) => {
|
|
50
|
-
const headers = sharedHeaders("DetectDocumentText");
|
|
51
|
-
let body;
|
|
52
|
-
body = JSON.stringify(se_DetectDocumentTextRequest(input, context));
|
|
53
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
54
|
-
};
|
|
55
|
-
export const se_GetAdapterCommand = async (input, context) => {
|
|
56
|
-
const headers = sharedHeaders("GetAdapter");
|
|
57
|
-
let body;
|
|
58
|
-
body = JSON.stringify(_json(input));
|
|
59
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
60
|
-
};
|
|
61
|
-
export const se_GetAdapterVersionCommand = async (input, context) => {
|
|
62
|
-
const headers = sharedHeaders("GetAdapterVersion");
|
|
63
|
-
let body;
|
|
64
|
-
body = JSON.stringify(_json(input));
|
|
65
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
|
-
};
|
|
67
|
-
export const se_GetDocumentAnalysisCommand = async (input, context) => {
|
|
68
|
-
const headers = sharedHeaders("GetDocumentAnalysis");
|
|
69
|
-
let body;
|
|
70
|
-
body = JSON.stringify(_json(input));
|
|
71
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
72
|
-
};
|
|
73
|
-
export const se_GetDocumentTextDetectionCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("GetDocumentTextDetection");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify(_json(input));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
export const se_GetExpenseAnalysisCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("GetExpenseAnalysis");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify(_json(input));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
export const se_GetLendingAnalysisCommand = async (input, context) => {
|
|
86
|
-
const headers = sharedHeaders("GetLendingAnalysis");
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify(_json(input));
|
|
89
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
-
};
|
|
91
|
-
export const se_GetLendingAnalysisSummaryCommand = async (input, context) => {
|
|
92
|
-
const headers = sharedHeaders("GetLendingAnalysisSummary");
|
|
93
|
-
let body;
|
|
94
|
-
body = JSON.stringify(_json(input));
|
|
95
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
96
|
-
};
|
|
97
|
-
export const se_ListAdaptersCommand = async (input, context) => {
|
|
98
|
-
const headers = sharedHeaders("ListAdapters");
|
|
99
|
-
let body;
|
|
100
|
-
body = JSON.stringify(se_ListAdaptersRequest(input, context));
|
|
101
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
102
|
-
};
|
|
103
|
-
export const se_ListAdapterVersionsCommand = async (input, context) => {
|
|
104
|
-
const headers = sharedHeaders("ListAdapterVersions");
|
|
105
|
-
let body;
|
|
106
|
-
body = JSON.stringify(se_ListAdapterVersionsRequest(input, context));
|
|
107
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
108
|
-
};
|
|
109
|
-
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
110
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
111
|
-
let body;
|
|
112
|
-
body = JSON.stringify(_json(input));
|
|
113
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
114
|
-
};
|
|
115
|
-
export const se_StartDocumentAnalysisCommand = async (input, context) => {
|
|
116
|
-
const headers = sharedHeaders("StartDocumentAnalysis");
|
|
117
|
-
let body;
|
|
118
|
-
body = JSON.stringify(_json(input));
|
|
119
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
-
};
|
|
121
|
-
export const se_StartDocumentTextDetectionCommand = async (input, context) => {
|
|
122
|
-
const headers = sharedHeaders("StartDocumentTextDetection");
|
|
123
|
-
let body;
|
|
124
|
-
body = JSON.stringify(_json(input));
|
|
125
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
|
-
};
|
|
127
|
-
export const se_StartExpenseAnalysisCommand = async (input, context) => {
|
|
128
|
-
const headers = sharedHeaders("StartExpenseAnalysis");
|
|
129
|
-
let body;
|
|
130
|
-
body = JSON.stringify(_json(input));
|
|
131
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
132
|
-
};
|
|
133
|
-
export const se_StartLendingAnalysisCommand = async (input, context) => {
|
|
134
|
-
const headers = sharedHeaders("StartLendingAnalysis");
|
|
135
|
-
let body;
|
|
136
|
-
body = JSON.stringify(_json(input));
|
|
137
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
138
|
-
};
|
|
139
|
-
export const se_TagResourceCommand = async (input, context) => {
|
|
140
|
-
const headers = sharedHeaders("TagResource");
|
|
141
|
-
let body;
|
|
142
|
-
body = JSON.stringify(_json(input));
|
|
143
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
144
|
-
};
|
|
145
|
-
export const se_UntagResourceCommand = async (input, context) => {
|
|
146
|
-
const headers = sharedHeaders("UntagResource");
|
|
147
|
-
let body;
|
|
148
|
-
body = JSON.stringify(_json(input));
|
|
149
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
150
|
-
};
|
|
151
|
-
export const se_UpdateAdapterCommand = async (input, context) => {
|
|
152
|
-
const headers = sharedHeaders("UpdateAdapter");
|
|
153
|
-
let body;
|
|
154
|
-
body = JSON.stringify(_json(input));
|
|
155
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
156
|
-
};
|
|
157
|
-
export const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
158
|
-
if (output.statusCode >= 300) {
|
|
159
|
-
return de_CommandError(output, context);
|
|
160
|
-
}
|
|
161
|
-
const data = await parseBody(output.body, context);
|
|
162
|
-
let contents = {};
|
|
163
|
-
contents = de_AnalyzeDocumentResponse(data, context);
|
|
164
|
-
const response = {
|
|
165
|
-
$metadata: deserializeMetadata(output),
|
|
166
|
-
...contents,
|
|
167
|
-
};
|
|
168
|
-
return response;
|
|
169
|
-
};
|
|
170
|
-
export const de_AnalyzeExpenseCommand = async (output, context) => {
|
|
171
|
-
if (output.statusCode >= 300) {
|
|
172
|
-
return de_CommandError(output, context);
|
|
173
|
-
}
|
|
174
|
-
const data = await parseBody(output.body, context);
|
|
175
|
-
let contents = {};
|
|
176
|
-
contents = de_AnalyzeExpenseResponse(data, context);
|
|
177
|
-
const response = {
|
|
178
|
-
$metadata: deserializeMetadata(output),
|
|
179
|
-
...contents,
|
|
180
|
-
};
|
|
181
|
-
return response;
|
|
182
|
-
};
|
|
183
|
-
export const de_AnalyzeIDCommand = async (output, context) => {
|
|
184
|
-
if (output.statusCode >= 300) {
|
|
185
|
-
return de_CommandError(output, context);
|
|
186
|
-
}
|
|
187
|
-
const data = await parseBody(output.body, context);
|
|
188
|
-
let contents = {};
|
|
189
|
-
contents = de_AnalyzeIDResponse(data, context);
|
|
190
|
-
const response = {
|
|
191
|
-
$metadata: deserializeMetadata(output),
|
|
192
|
-
...contents,
|
|
193
|
-
};
|
|
194
|
-
return response;
|
|
195
|
-
};
|
|
196
|
-
export const de_CreateAdapterCommand = async (output, context) => {
|
|
197
|
-
if (output.statusCode >= 300) {
|
|
198
|
-
return de_CommandError(output, context);
|
|
199
|
-
}
|
|
200
|
-
const data = await parseBody(output.body, context);
|
|
201
|
-
let contents = {};
|
|
202
|
-
contents = _json(data);
|
|
203
|
-
const response = {
|
|
204
|
-
$metadata: deserializeMetadata(output),
|
|
205
|
-
...contents,
|
|
206
|
-
};
|
|
207
|
-
return response;
|
|
208
|
-
};
|
|
209
|
-
export const de_CreateAdapterVersionCommand = async (output, context) => {
|
|
210
|
-
if (output.statusCode >= 300) {
|
|
211
|
-
return de_CommandError(output, context);
|
|
212
|
-
}
|
|
213
|
-
const data = await parseBody(output.body, context);
|
|
214
|
-
let contents = {};
|
|
215
|
-
contents = _json(data);
|
|
216
|
-
const response = {
|
|
217
|
-
$metadata: deserializeMetadata(output),
|
|
218
|
-
...contents,
|
|
219
|
-
};
|
|
220
|
-
return response;
|
|
221
|
-
};
|
|
222
|
-
export const de_DeleteAdapterCommand = async (output, context) => {
|
|
223
|
-
if (output.statusCode >= 300) {
|
|
224
|
-
return de_CommandError(output, context);
|
|
225
|
-
}
|
|
226
|
-
const data = await parseBody(output.body, context);
|
|
227
|
-
let contents = {};
|
|
228
|
-
contents = _json(data);
|
|
229
|
-
const response = {
|
|
230
|
-
$metadata: deserializeMetadata(output),
|
|
231
|
-
...contents,
|
|
232
|
-
};
|
|
233
|
-
return response;
|
|
234
|
-
};
|
|
235
|
-
export const de_DeleteAdapterVersionCommand = async (output, context) => {
|
|
236
|
-
if (output.statusCode >= 300) {
|
|
237
|
-
return de_CommandError(output, context);
|
|
238
|
-
}
|
|
239
|
-
const data = await parseBody(output.body, context);
|
|
240
|
-
let contents = {};
|
|
241
|
-
contents = _json(data);
|
|
242
|
-
const response = {
|
|
243
|
-
$metadata: deserializeMetadata(output),
|
|
244
|
-
...contents,
|
|
245
|
-
};
|
|
246
|
-
return response;
|
|
247
|
-
};
|
|
248
|
-
export const de_DetectDocumentTextCommand = async (output, context) => {
|
|
249
|
-
if (output.statusCode >= 300) {
|
|
250
|
-
return de_CommandError(output, context);
|
|
251
|
-
}
|
|
252
|
-
const data = await parseBody(output.body, context);
|
|
253
|
-
let contents = {};
|
|
254
|
-
contents = de_DetectDocumentTextResponse(data, context);
|
|
255
|
-
const response = {
|
|
256
|
-
$metadata: deserializeMetadata(output),
|
|
257
|
-
...contents,
|
|
258
|
-
};
|
|
259
|
-
return response;
|
|
260
|
-
};
|
|
261
|
-
export const de_GetAdapterCommand = async (output, context) => {
|
|
262
|
-
if (output.statusCode >= 300) {
|
|
263
|
-
return de_CommandError(output, context);
|
|
264
|
-
}
|
|
265
|
-
const data = await parseBody(output.body, context);
|
|
266
|
-
let contents = {};
|
|
267
|
-
contents = de_GetAdapterResponse(data, context);
|
|
268
|
-
const response = {
|
|
269
|
-
$metadata: deserializeMetadata(output),
|
|
270
|
-
...contents,
|
|
271
|
-
};
|
|
272
|
-
return response;
|
|
273
|
-
};
|
|
274
|
-
export const de_GetAdapterVersionCommand = async (output, context) => {
|
|
275
|
-
if (output.statusCode >= 300) {
|
|
276
|
-
return de_CommandError(output, context);
|
|
277
|
-
}
|
|
278
|
-
const data = await parseBody(output.body, context);
|
|
279
|
-
let contents = {};
|
|
280
|
-
contents = de_GetAdapterVersionResponse(data, context);
|
|
281
|
-
const response = {
|
|
282
|
-
$metadata: deserializeMetadata(output),
|
|
283
|
-
...contents,
|
|
284
|
-
};
|
|
285
|
-
return response;
|
|
286
|
-
};
|
|
287
|
-
export const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
288
|
-
if (output.statusCode >= 300) {
|
|
289
|
-
return de_CommandError(output, context);
|
|
290
|
-
}
|
|
291
|
-
const data = await parseBody(output.body, context);
|
|
292
|
-
let contents = {};
|
|
293
|
-
contents = de_GetDocumentAnalysisResponse(data, context);
|
|
294
|
-
const response = {
|
|
295
|
-
$metadata: deserializeMetadata(output),
|
|
296
|
-
...contents,
|
|
297
|
-
};
|
|
298
|
-
return response;
|
|
299
|
-
};
|
|
300
|
-
export const de_GetDocumentTextDetectionCommand = async (output, context) => {
|
|
301
|
-
if (output.statusCode >= 300) {
|
|
302
|
-
return de_CommandError(output, context);
|
|
303
|
-
}
|
|
304
|
-
const data = await parseBody(output.body, context);
|
|
305
|
-
let contents = {};
|
|
306
|
-
contents = de_GetDocumentTextDetectionResponse(data, context);
|
|
307
|
-
const response = {
|
|
308
|
-
$metadata: deserializeMetadata(output),
|
|
309
|
-
...contents,
|
|
310
|
-
};
|
|
311
|
-
return response;
|
|
312
|
-
};
|
|
313
|
-
export const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
314
|
-
if (output.statusCode >= 300) {
|
|
315
|
-
return de_CommandError(output, context);
|
|
316
|
-
}
|
|
317
|
-
const data = await parseBody(output.body, context);
|
|
318
|
-
let contents = {};
|
|
319
|
-
contents = de_GetExpenseAnalysisResponse(data, context);
|
|
320
|
-
const response = {
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
...contents,
|
|
323
|
-
};
|
|
324
|
-
return response;
|
|
325
|
-
};
|
|
326
|
-
export const de_GetLendingAnalysisCommand = async (output, context) => {
|
|
327
|
-
if (output.statusCode >= 300) {
|
|
328
|
-
return de_CommandError(output, context);
|
|
329
|
-
}
|
|
330
|
-
const data = await parseBody(output.body, context);
|
|
331
|
-
let contents = {};
|
|
332
|
-
contents = de_GetLendingAnalysisResponse(data, context);
|
|
333
|
-
const response = {
|
|
334
|
-
$metadata: deserializeMetadata(output),
|
|
335
|
-
...contents,
|
|
336
|
-
};
|
|
337
|
-
return response;
|
|
338
|
-
};
|
|
339
|
-
export const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
340
|
-
if (output.statusCode >= 300) {
|
|
341
|
-
return de_CommandError(output, context);
|
|
342
|
-
}
|
|
343
|
-
const data = await parseBody(output.body, context);
|
|
344
|
-
let contents = {};
|
|
345
|
-
contents = _json(data);
|
|
346
|
-
const response = {
|
|
347
|
-
$metadata: deserializeMetadata(output),
|
|
348
|
-
...contents,
|
|
349
|
-
};
|
|
350
|
-
return response;
|
|
351
|
-
};
|
|
352
|
-
export const de_ListAdaptersCommand = async (output, context) => {
|
|
353
|
-
if (output.statusCode >= 300) {
|
|
354
|
-
return de_CommandError(output, context);
|
|
355
|
-
}
|
|
356
|
-
const data = await parseBody(output.body, context);
|
|
357
|
-
let contents = {};
|
|
358
|
-
contents = de_ListAdaptersResponse(data, context);
|
|
359
|
-
const response = {
|
|
360
|
-
$metadata: deserializeMetadata(output),
|
|
361
|
-
...contents,
|
|
362
|
-
};
|
|
363
|
-
return response;
|
|
364
|
-
};
|
|
365
|
-
export const de_ListAdapterVersionsCommand = async (output, context) => {
|
|
366
|
-
if (output.statusCode >= 300) {
|
|
367
|
-
return de_CommandError(output, context);
|
|
368
|
-
}
|
|
369
|
-
const data = await parseBody(output.body, context);
|
|
370
|
-
let contents = {};
|
|
371
|
-
contents = de_ListAdapterVersionsResponse(data, context);
|
|
372
|
-
const response = {
|
|
373
|
-
$metadata: deserializeMetadata(output),
|
|
374
|
-
...contents,
|
|
375
|
-
};
|
|
376
|
-
return response;
|
|
377
|
-
};
|
|
378
|
-
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
379
|
-
if (output.statusCode >= 300) {
|
|
380
|
-
return de_CommandError(output, context);
|
|
381
|
-
}
|
|
382
|
-
const data = await parseBody(output.body, context);
|
|
383
|
-
let contents = {};
|
|
384
|
-
contents = _json(data);
|
|
385
|
-
const response = {
|
|
386
|
-
$metadata: deserializeMetadata(output),
|
|
387
|
-
...contents,
|
|
388
|
-
};
|
|
389
|
-
return response;
|
|
390
|
-
};
|
|
391
|
-
export const de_StartDocumentAnalysisCommand = async (output, context) => {
|
|
392
|
-
if (output.statusCode >= 300) {
|
|
393
|
-
return de_CommandError(output, context);
|
|
394
|
-
}
|
|
395
|
-
const data = await parseBody(output.body, context);
|
|
396
|
-
let contents = {};
|
|
397
|
-
contents = _json(data);
|
|
398
|
-
const response = {
|
|
399
|
-
$metadata: deserializeMetadata(output),
|
|
400
|
-
...contents,
|
|
401
|
-
};
|
|
402
|
-
return response;
|
|
403
|
-
};
|
|
404
|
-
export const de_StartDocumentTextDetectionCommand = async (output, context) => {
|
|
405
|
-
if (output.statusCode >= 300) {
|
|
406
|
-
return de_CommandError(output, context);
|
|
407
|
-
}
|
|
408
|
-
const data = await parseBody(output.body, context);
|
|
409
|
-
let contents = {};
|
|
410
|
-
contents = _json(data);
|
|
411
|
-
const response = {
|
|
412
|
-
$metadata: deserializeMetadata(output),
|
|
413
|
-
...contents,
|
|
414
|
-
};
|
|
415
|
-
return response;
|
|
416
|
-
};
|
|
417
|
-
export const de_StartExpenseAnalysisCommand = async (output, context) => {
|
|
418
|
-
if (output.statusCode >= 300) {
|
|
419
|
-
return de_CommandError(output, context);
|
|
420
|
-
}
|
|
421
|
-
const data = await parseBody(output.body, context);
|
|
422
|
-
let contents = {};
|
|
423
|
-
contents = _json(data);
|
|
424
|
-
const response = {
|
|
425
|
-
$metadata: deserializeMetadata(output),
|
|
426
|
-
...contents,
|
|
427
|
-
};
|
|
428
|
-
return response;
|
|
429
|
-
};
|
|
430
|
-
export const de_StartLendingAnalysisCommand = async (output, context) => {
|
|
431
|
-
if (output.statusCode >= 300) {
|
|
432
|
-
return de_CommandError(output, context);
|
|
433
|
-
}
|
|
434
|
-
const data = await parseBody(output.body, context);
|
|
435
|
-
let contents = {};
|
|
436
|
-
contents = _json(data);
|
|
437
|
-
const response = {
|
|
438
|
-
$metadata: deserializeMetadata(output),
|
|
439
|
-
...contents,
|
|
440
|
-
};
|
|
441
|
-
return response;
|
|
442
|
-
};
|
|
443
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
444
|
-
if (output.statusCode >= 300) {
|
|
445
|
-
return de_CommandError(output, context);
|
|
446
|
-
}
|
|
447
|
-
const data = await parseBody(output.body, context);
|
|
448
|
-
let contents = {};
|
|
449
|
-
contents = _json(data);
|
|
450
|
-
const response = {
|
|
451
|
-
$metadata: deserializeMetadata(output),
|
|
452
|
-
...contents,
|
|
453
|
-
};
|
|
454
|
-
return response;
|
|
455
|
-
};
|
|
456
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
457
|
-
if (output.statusCode >= 300) {
|
|
458
|
-
return de_CommandError(output, context);
|
|
459
|
-
}
|
|
460
|
-
const data = await parseBody(output.body, context);
|
|
461
|
-
let contents = {};
|
|
462
|
-
contents = _json(data);
|
|
463
|
-
const response = {
|
|
464
|
-
$metadata: deserializeMetadata(output),
|
|
465
|
-
...contents,
|
|
466
|
-
};
|
|
467
|
-
return response;
|
|
468
|
-
};
|
|
469
|
-
export const de_UpdateAdapterCommand = async (output, context) => {
|
|
470
|
-
if (output.statusCode >= 300) {
|
|
471
|
-
return de_CommandError(output, context);
|
|
472
|
-
}
|
|
473
|
-
const data = await parseBody(output.body, context);
|
|
474
|
-
let contents = {};
|
|
475
|
-
contents = de_UpdateAdapterResponse(data, context);
|
|
476
|
-
const response = {
|
|
477
|
-
$metadata: deserializeMetadata(output),
|
|
478
|
-
...contents,
|
|
479
|
-
};
|
|
480
|
-
return response;
|
|
481
|
-
};
|
|
482
|
-
const de_CommandError = async (output, context) => {
|
|
483
|
-
const parsedOutput = {
|
|
484
|
-
...output,
|
|
485
|
-
body: await parseErrorBody(output.body, context),
|
|
486
|
-
};
|
|
487
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
488
|
-
switch (errorCode) {
|
|
489
|
-
case "AccessDeniedException":
|
|
490
|
-
case "com.amazonaws.textract#AccessDeniedException":
|
|
491
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
492
|
-
case "BadDocumentException":
|
|
493
|
-
case "com.amazonaws.textract#BadDocumentException":
|
|
494
|
-
throw await de_BadDocumentExceptionRes(parsedOutput, context);
|
|
495
|
-
case "DocumentTooLargeException":
|
|
496
|
-
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
497
|
-
throw await de_DocumentTooLargeExceptionRes(parsedOutput, context);
|
|
498
|
-
case "HumanLoopQuotaExceededException":
|
|
499
|
-
case "com.amazonaws.textract#HumanLoopQuotaExceededException":
|
|
500
|
-
throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
|
|
501
|
-
case "InternalServerError":
|
|
502
|
-
case "com.amazonaws.textract#InternalServerError":
|
|
503
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
504
|
-
case "InvalidParameterException":
|
|
505
|
-
case "com.amazonaws.textract#InvalidParameterException":
|
|
506
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
507
|
-
case "InvalidS3ObjectException":
|
|
508
|
-
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
509
|
-
throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
|
|
510
|
-
case "ProvisionedThroughputExceededException":
|
|
511
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
512
|
-
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
513
|
-
case "ThrottlingException":
|
|
514
|
-
case "com.amazonaws.textract#ThrottlingException":
|
|
515
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
516
|
-
case "UnsupportedDocumentException":
|
|
517
|
-
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
518
|
-
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
519
|
-
case "ConflictException":
|
|
520
|
-
case "com.amazonaws.textract#ConflictException":
|
|
521
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
522
|
-
case "IdempotentParameterMismatchException":
|
|
523
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
524
|
-
throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
|
|
525
|
-
case "LimitExceededException":
|
|
526
|
-
case "com.amazonaws.textract#LimitExceededException":
|
|
527
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
528
|
-
case "ServiceQuotaExceededException":
|
|
529
|
-
case "com.amazonaws.textract#ServiceQuotaExceededException":
|
|
530
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
531
|
-
case "ValidationException":
|
|
532
|
-
case "com.amazonaws.textract#ValidationException":
|
|
533
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
534
|
-
case "InvalidKMSKeyException":
|
|
535
|
-
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
536
|
-
throw await de_InvalidKMSKeyExceptionRes(parsedOutput, context);
|
|
537
|
-
case "ResourceNotFoundException":
|
|
538
|
-
case "com.amazonaws.textract#ResourceNotFoundException":
|
|
539
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
540
|
-
case "InvalidJobIdException":
|
|
541
|
-
case "com.amazonaws.textract#InvalidJobIdException":
|
|
542
|
-
throw await de_InvalidJobIdExceptionRes(parsedOutput, context);
|
|
543
|
-
default:
|
|
544
|
-
const parsedBody = parsedOutput.body;
|
|
545
|
-
return throwDefaultError({
|
|
546
|
-
output,
|
|
547
|
-
parsedBody,
|
|
548
|
-
errorCode,
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
553
|
-
const body = parsedOutput.body;
|
|
554
|
-
const deserialized = _json(body);
|
|
555
|
-
const exception = new AccessDeniedException({
|
|
556
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
557
|
-
...deserialized,
|
|
558
|
-
});
|
|
559
|
-
return __decorateServiceException(exception, body);
|
|
560
|
-
};
|
|
561
|
-
const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
562
|
-
const body = parsedOutput.body;
|
|
563
|
-
const deserialized = _json(body);
|
|
564
|
-
const exception = new BadDocumentException({
|
|
565
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
566
|
-
...deserialized,
|
|
567
|
-
});
|
|
568
|
-
return __decorateServiceException(exception, body);
|
|
569
|
-
};
|
|
570
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
571
|
-
const body = parsedOutput.body;
|
|
572
|
-
const deserialized = _json(body);
|
|
573
|
-
const exception = new ConflictException({
|
|
574
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
575
|
-
...deserialized,
|
|
576
|
-
});
|
|
577
|
-
return __decorateServiceException(exception, body);
|
|
578
|
-
};
|
|
579
|
-
const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
580
|
-
const body = parsedOutput.body;
|
|
581
|
-
const deserialized = _json(body);
|
|
582
|
-
const exception = new DocumentTooLargeException({
|
|
583
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
584
|
-
...deserialized,
|
|
585
|
-
});
|
|
586
|
-
return __decorateServiceException(exception, body);
|
|
587
|
-
};
|
|
588
|
-
const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
589
|
-
const body = parsedOutput.body;
|
|
590
|
-
const deserialized = _json(body);
|
|
591
|
-
const exception = new HumanLoopQuotaExceededException({
|
|
592
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
593
|
-
...deserialized,
|
|
594
|
-
});
|
|
595
|
-
return __decorateServiceException(exception, body);
|
|
596
|
-
};
|
|
597
|
-
const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
|
|
598
|
-
const body = parsedOutput.body;
|
|
599
|
-
const deserialized = _json(body);
|
|
600
|
-
const exception = new IdempotentParameterMismatchException({
|
|
601
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
602
|
-
...deserialized,
|
|
603
|
-
});
|
|
604
|
-
return __decorateServiceException(exception, body);
|
|
605
|
-
};
|
|
606
|
-
const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
607
|
-
const body = parsedOutput.body;
|
|
608
|
-
const deserialized = _json(body);
|
|
609
|
-
const exception = new InternalServerError({
|
|
610
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
611
|
-
...deserialized,
|
|
612
|
-
});
|
|
613
|
-
return __decorateServiceException(exception, body);
|
|
614
|
-
};
|
|
615
|
-
const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
|
|
616
|
-
const body = parsedOutput.body;
|
|
617
|
-
const deserialized = _json(body);
|
|
618
|
-
const exception = new InvalidJobIdException({
|
|
619
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
620
|
-
...deserialized,
|
|
621
|
-
});
|
|
622
|
-
return __decorateServiceException(exception, body);
|
|
623
|
-
};
|
|
624
|
-
const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
|
|
625
|
-
const body = parsedOutput.body;
|
|
626
|
-
const deserialized = _json(body);
|
|
627
|
-
const exception = new InvalidKMSKeyException({
|
|
628
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
629
|
-
...deserialized,
|
|
630
|
-
});
|
|
631
|
-
return __decorateServiceException(exception, body);
|
|
632
|
-
};
|
|
633
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
634
|
-
const body = parsedOutput.body;
|
|
635
|
-
const deserialized = _json(body);
|
|
636
|
-
const exception = new InvalidParameterException({
|
|
637
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
638
|
-
...deserialized,
|
|
639
|
-
});
|
|
640
|
-
return __decorateServiceException(exception, body);
|
|
641
|
-
};
|
|
642
|
-
const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
|
|
643
|
-
const body = parsedOutput.body;
|
|
644
|
-
const deserialized = _json(body);
|
|
645
|
-
const exception = new InvalidS3ObjectException({
|
|
646
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
647
|
-
...deserialized,
|
|
648
|
-
});
|
|
649
|
-
return __decorateServiceException(exception, body);
|
|
650
|
-
};
|
|
651
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
652
|
-
const body = parsedOutput.body;
|
|
653
|
-
const deserialized = _json(body);
|
|
654
|
-
const exception = new LimitExceededException({
|
|
655
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
656
|
-
...deserialized,
|
|
657
|
-
});
|
|
658
|
-
return __decorateServiceException(exception, body);
|
|
659
|
-
};
|
|
660
|
-
const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, context) => {
|
|
661
|
-
const body = parsedOutput.body;
|
|
662
|
-
const deserialized = _json(body);
|
|
663
|
-
const exception = new ProvisionedThroughputExceededException({
|
|
664
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
665
|
-
...deserialized,
|
|
666
|
-
});
|
|
667
|
-
return __decorateServiceException(exception, body);
|
|
668
|
-
};
|
|
669
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
670
|
-
const body = parsedOutput.body;
|
|
671
|
-
const deserialized = _json(body);
|
|
672
|
-
const exception = new ResourceNotFoundException({
|
|
673
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
674
|
-
...deserialized,
|
|
675
|
-
});
|
|
676
|
-
return __decorateServiceException(exception, body);
|
|
677
|
-
};
|
|
678
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
679
|
-
const body = parsedOutput.body;
|
|
680
|
-
const deserialized = _json(body);
|
|
681
|
-
const exception = new ServiceQuotaExceededException({
|
|
682
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
683
|
-
...deserialized,
|
|
684
|
-
});
|
|
685
|
-
return __decorateServiceException(exception, body);
|
|
686
|
-
};
|
|
687
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
688
|
-
const body = parsedOutput.body;
|
|
689
|
-
const deserialized = _json(body);
|
|
690
|
-
const exception = new ThrottlingException({
|
|
691
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
692
|
-
...deserialized,
|
|
693
|
-
});
|
|
694
|
-
return __decorateServiceException(exception, body);
|
|
695
|
-
};
|
|
696
|
-
const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
697
|
-
const body = parsedOutput.body;
|
|
698
|
-
const deserialized = _json(body);
|
|
699
|
-
const exception = new UnsupportedDocumentException({
|
|
700
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
701
|
-
...deserialized,
|
|
702
|
-
});
|
|
703
|
-
return __decorateServiceException(exception, body);
|
|
704
|
-
};
|
|
705
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
706
|
-
const body = parsedOutput.body;
|
|
707
|
-
const deserialized = _json(body);
|
|
708
|
-
const exception = new ValidationException({
|
|
709
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
710
|
-
...deserialized,
|
|
711
|
-
});
|
|
712
|
-
return __decorateServiceException(exception, body);
|
|
713
|
-
};
|
|
714
|
-
const se_AnalyzeDocumentRequest = (input, context) => {
|
|
715
|
-
return take(input, {
|
|
716
|
-
AdaptersConfig: _json,
|
|
717
|
-
Document: (_) => se_Document(_, context),
|
|
718
|
-
FeatureTypes: _json,
|
|
719
|
-
HumanLoopConfig: _json,
|
|
720
|
-
QueriesConfig: _json,
|
|
721
|
-
});
|
|
722
|
-
};
|
|
723
|
-
const se_AnalyzeExpenseRequest = (input, context) => {
|
|
724
|
-
return take(input, {
|
|
725
|
-
Document: (_) => se_Document(_, context),
|
|
726
|
-
});
|
|
727
|
-
};
|
|
728
|
-
const se_AnalyzeIDRequest = (input, context) => {
|
|
729
|
-
return take(input, {
|
|
730
|
-
DocumentPages: (_) => se_DocumentPages(_, context),
|
|
731
|
-
});
|
|
732
|
-
};
|
|
733
|
-
const se_CreateAdapterRequest = (input, context) => {
|
|
734
|
-
return take(input, {
|
|
735
|
-
AdapterName: [],
|
|
736
|
-
AutoUpdate: [],
|
|
737
|
-
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
738
|
-
Description: [],
|
|
739
|
-
FeatureTypes: _json,
|
|
740
|
-
Tags: _json,
|
|
741
|
-
});
|
|
742
|
-
};
|
|
743
|
-
const se_CreateAdapterVersionRequest = (input, context) => {
|
|
744
|
-
return take(input, {
|
|
745
|
-
AdapterId: [],
|
|
746
|
-
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
747
|
-
DatasetConfig: _json,
|
|
748
|
-
KMSKeyId: [],
|
|
749
|
-
OutputConfig: _json,
|
|
750
|
-
Tags: _json,
|
|
751
|
-
});
|
|
752
|
-
};
|
|
753
|
-
const se_DetectDocumentTextRequest = (input, context) => {
|
|
754
|
-
return take(input, {
|
|
755
|
-
Document: (_) => se_Document(_, context),
|
|
756
|
-
});
|
|
757
|
-
};
|
|
758
|
-
const se_Document = (input, context) => {
|
|
759
|
-
return take(input, {
|
|
760
|
-
Bytes: context.base64Encoder,
|
|
761
|
-
S3Object: _json,
|
|
762
|
-
});
|
|
763
|
-
};
|
|
764
|
-
const se_DocumentPages = (input, context) => {
|
|
765
|
-
return input
|
|
766
|
-
.filter((e) => e != null)
|
|
767
|
-
.map((entry) => {
|
|
768
|
-
return se_Document(entry, context);
|
|
769
|
-
});
|
|
770
|
-
};
|
|
771
|
-
const se_ListAdaptersRequest = (input, context) => {
|
|
772
|
-
return take(input, {
|
|
773
|
-
AfterCreationTime: (_) => _.getTime() / 1_000,
|
|
774
|
-
BeforeCreationTime: (_) => _.getTime() / 1_000,
|
|
775
|
-
MaxResults: [],
|
|
776
|
-
NextToken: [],
|
|
777
|
-
});
|
|
778
|
-
};
|
|
779
|
-
const se_ListAdapterVersionsRequest = (input, context) => {
|
|
780
|
-
return take(input, {
|
|
781
|
-
AdapterId: [],
|
|
782
|
-
AfterCreationTime: (_) => _.getTime() / 1_000,
|
|
783
|
-
BeforeCreationTime: (_) => _.getTime() / 1_000,
|
|
784
|
-
MaxResults: [],
|
|
785
|
-
NextToken: [],
|
|
786
|
-
});
|
|
787
|
-
};
|
|
788
|
-
const de_AdapterList = (output, context) => {
|
|
789
|
-
const retVal = (output || [])
|
|
790
|
-
.filter((e) => e != null)
|
|
791
|
-
.map((entry) => {
|
|
792
|
-
return de_AdapterOverview(entry, context);
|
|
793
|
-
});
|
|
794
|
-
return retVal;
|
|
795
|
-
};
|
|
796
|
-
const de_AdapterOverview = (output, context) => {
|
|
797
|
-
return take(output, {
|
|
798
|
-
AdapterId: __expectString,
|
|
799
|
-
AdapterName: __expectString,
|
|
800
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
801
|
-
FeatureTypes: _json,
|
|
802
|
-
});
|
|
803
|
-
};
|
|
804
|
-
const de_AdapterVersionEvaluationMetric = (output, context) => {
|
|
805
|
-
return take(output, {
|
|
806
|
-
AdapterVersion: (_) => de_EvaluationMetric(_, context),
|
|
807
|
-
Baseline: (_) => de_EvaluationMetric(_, context),
|
|
808
|
-
FeatureType: __expectString,
|
|
809
|
-
});
|
|
810
|
-
};
|
|
811
|
-
const de_AdapterVersionEvaluationMetrics = (output, context) => {
|
|
812
|
-
const retVal = (output || [])
|
|
813
|
-
.filter((e) => e != null)
|
|
814
|
-
.map((entry) => {
|
|
815
|
-
return de_AdapterVersionEvaluationMetric(entry, context);
|
|
816
|
-
});
|
|
817
|
-
return retVal;
|
|
818
|
-
};
|
|
819
|
-
const de_AdapterVersionList = (output, context) => {
|
|
820
|
-
const retVal = (output || [])
|
|
821
|
-
.filter((e) => e != null)
|
|
822
|
-
.map((entry) => {
|
|
823
|
-
return de_AdapterVersionOverview(entry, context);
|
|
824
|
-
});
|
|
825
|
-
return retVal;
|
|
826
|
-
};
|
|
827
|
-
const de_AdapterVersionOverview = (output, context) => {
|
|
828
|
-
return take(output, {
|
|
829
|
-
AdapterId: __expectString,
|
|
830
|
-
AdapterVersion: __expectString,
|
|
831
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
832
|
-
FeatureTypes: _json,
|
|
833
|
-
Status: __expectString,
|
|
834
|
-
StatusMessage: __expectString,
|
|
835
|
-
});
|
|
836
|
-
};
|
|
837
|
-
const de_AnalyzeDocumentResponse = (output, context) => {
|
|
838
|
-
return take(output, {
|
|
839
|
-
AnalyzeDocumentModelVersion: __expectString,
|
|
840
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
841
|
-
DocumentMetadata: _json,
|
|
842
|
-
HumanLoopActivationOutput: (_) => de_HumanLoopActivationOutput(_, context),
|
|
843
|
-
});
|
|
844
|
-
};
|
|
845
|
-
const de_AnalyzeExpenseResponse = (output, context) => {
|
|
846
|
-
return take(output, {
|
|
847
|
-
DocumentMetadata: _json,
|
|
848
|
-
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
849
|
-
});
|
|
850
|
-
};
|
|
851
|
-
const de_AnalyzeIDDetections = (output, context) => {
|
|
852
|
-
return take(output, {
|
|
853
|
-
Confidence: __limitedParseFloat32,
|
|
854
|
-
NormalizedValue: _json,
|
|
855
|
-
Text: __expectString,
|
|
856
|
-
});
|
|
857
|
-
};
|
|
858
|
-
const de_AnalyzeIDResponse = (output, context) => {
|
|
859
|
-
return take(output, {
|
|
860
|
-
AnalyzeIDModelVersion: __expectString,
|
|
861
|
-
DocumentMetadata: _json,
|
|
862
|
-
IdentityDocuments: (_) => de_IdentityDocumentList(_, context),
|
|
863
|
-
});
|
|
864
|
-
};
|
|
865
|
-
const de_Block = (output, context) => {
|
|
866
|
-
return take(output, {
|
|
867
|
-
BlockType: __expectString,
|
|
868
|
-
ColumnIndex: __expectInt32,
|
|
869
|
-
ColumnSpan: __expectInt32,
|
|
870
|
-
Confidence: __limitedParseFloat32,
|
|
871
|
-
EntityTypes: _json,
|
|
872
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
873
|
-
Id: __expectString,
|
|
874
|
-
Page: __expectInt32,
|
|
875
|
-
Query: _json,
|
|
876
|
-
Relationships: _json,
|
|
877
|
-
RowIndex: __expectInt32,
|
|
878
|
-
RowSpan: __expectInt32,
|
|
879
|
-
SelectionStatus: __expectString,
|
|
880
|
-
Text: __expectString,
|
|
881
|
-
TextType: __expectString,
|
|
882
|
-
});
|
|
883
|
-
};
|
|
884
|
-
const de_BlockList = (output, context) => {
|
|
885
|
-
const retVal = (output || [])
|
|
886
|
-
.filter((e) => e != null)
|
|
887
|
-
.map((entry) => {
|
|
888
|
-
return de_Block(entry, context);
|
|
889
|
-
});
|
|
890
|
-
return retVal;
|
|
891
|
-
};
|
|
892
|
-
const de_BoundingBox = (output, context) => {
|
|
893
|
-
return take(output, {
|
|
894
|
-
Height: __limitedParseFloat32,
|
|
895
|
-
Left: __limitedParseFloat32,
|
|
896
|
-
Top: __limitedParseFloat32,
|
|
897
|
-
Width: __limitedParseFloat32,
|
|
898
|
-
});
|
|
899
|
-
};
|
|
900
|
-
const de_DetectDocumentTextResponse = (output, context) => {
|
|
901
|
-
return take(output, {
|
|
902
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
903
|
-
DetectDocumentTextModelVersion: __expectString,
|
|
904
|
-
DocumentMetadata: _json,
|
|
905
|
-
});
|
|
906
|
-
};
|
|
907
|
-
const de_EvaluationMetric = (output, context) => {
|
|
908
|
-
return take(output, {
|
|
909
|
-
F1Score: __limitedParseFloat32,
|
|
910
|
-
Precision: __limitedParseFloat32,
|
|
911
|
-
Recall: __limitedParseFloat32,
|
|
912
|
-
});
|
|
913
|
-
};
|
|
914
|
-
const de_ExpenseCurrency = (output, context) => {
|
|
915
|
-
return take(output, {
|
|
916
|
-
Code: __expectString,
|
|
917
|
-
Confidence: __limitedParseFloat32,
|
|
918
|
-
});
|
|
919
|
-
};
|
|
920
|
-
const de_ExpenseDetection = (output, context) => {
|
|
921
|
-
return take(output, {
|
|
922
|
-
Confidence: __limitedParseFloat32,
|
|
923
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
924
|
-
Text: __expectString,
|
|
925
|
-
});
|
|
926
|
-
};
|
|
927
|
-
const de_ExpenseDocument = (output, context) => {
|
|
928
|
-
return take(output, {
|
|
929
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
930
|
-
ExpenseIndex: __expectInt32,
|
|
931
|
-
LineItemGroups: (_) => de_LineItemGroupList(_, context),
|
|
932
|
-
SummaryFields: (_) => de_ExpenseFieldList(_, context),
|
|
933
|
-
});
|
|
934
|
-
};
|
|
935
|
-
const de_ExpenseDocumentList = (output, context) => {
|
|
936
|
-
const retVal = (output || [])
|
|
937
|
-
.filter((e) => e != null)
|
|
938
|
-
.map((entry) => {
|
|
939
|
-
return de_ExpenseDocument(entry, context);
|
|
940
|
-
});
|
|
941
|
-
return retVal;
|
|
942
|
-
};
|
|
943
|
-
const de_ExpenseField = (output, context) => {
|
|
944
|
-
return take(output, {
|
|
945
|
-
Currency: (_) => de_ExpenseCurrency(_, context),
|
|
946
|
-
GroupProperties: _json,
|
|
947
|
-
LabelDetection: (_) => de_ExpenseDetection(_, context),
|
|
948
|
-
PageNumber: __expectInt32,
|
|
949
|
-
Type: (_) => de_ExpenseType(_, context),
|
|
950
|
-
ValueDetection: (_) => de_ExpenseDetection(_, context),
|
|
951
|
-
});
|
|
952
|
-
};
|
|
953
|
-
const de_ExpenseFieldList = (output, context) => {
|
|
954
|
-
const retVal = (output || [])
|
|
955
|
-
.filter((e) => e != null)
|
|
956
|
-
.map((entry) => {
|
|
957
|
-
return de_ExpenseField(entry, context);
|
|
958
|
-
});
|
|
959
|
-
return retVal;
|
|
960
|
-
};
|
|
961
|
-
const de_ExpenseType = (output, context) => {
|
|
962
|
-
return take(output, {
|
|
963
|
-
Confidence: __limitedParseFloat32,
|
|
964
|
-
Text: __expectString,
|
|
965
|
-
});
|
|
966
|
-
};
|
|
967
|
-
const de_Extraction = (output, context) => {
|
|
968
|
-
return take(output, {
|
|
969
|
-
ExpenseDocument: (_) => de_ExpenseDocument(_, context),
|
|
970
|
-
IdentityDocument: (_) => de_IdentityDocument(_, context),
|
|
971
|
-
LendingDocument: (_) => de_LendingDocument(_, context),
|
|
972
|
-
});
|
|
973
|
-
};
|
|
974
|
-
const de_ExtractionList = (output, context) => {
|
|
975
|
-
const retVal = (output || [])
|
|
976
|
-
.filter((e) => e != null)
|
|
977
|
-
.map((entry) => {
|
|
978
|
-
return de_Extraction(entry, context);
|
|
979
|
-
});
|
|
980
|
-
return retVal;
|
|
981
|
-
};
|
|
982
|
-
const de_Geometry = (output, context) => {
|
|
983
|
-
return take(output, {
|
|
984
|
-
BoundingBox: (_) => de_BoundingBox(_, context),
|
|
985
|
-
Polygon: (_) => de_Polygon(_, context),
|
|
986
|
-
RotationAngle: __limitedParseFloat32,
|
|
987
|
-
});
|
|
988
|
-
};
|
|
989
|
-
const de_GetAdapterResponse = (output, context) => {
|
|
990
|
-
return take(output, {
|
|
991
|
-
AdapterId: __expectString,
|
|
992
|
-
AdapterName: __expectString,
|
|
993
|
-
AutoUpdate: __expectString,
|
|
994
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
995
|
-
Description: __expectString,
|
|
996
|
-
FeatureTypes: _json,
|
|
997
|
-
Tags: _json,
|
|
998
|
-
});
|
|
999
|
-
};
|
|
1000
|
-
const de_GetAdapterVersionResponse = (output, context) => {
|
|
1001
|
-
return take(output, {
|
|
1002
|
-
AdapterId: __expectString,
|
|
1003
|
-
AdapterVersion: __expectString,
|
|
1004
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1005
|
-
DatasetConfig: _json,
|
|
1006
|
-
EvaluationMetrics: (_) => de_AdapterVersionEvaluationMetrics(_, context),
|
|
1007
|
-
FeatureTypes: _json,
|
|
1008
|
-
KMSKeyId: __expectString,
|
|
1009
|
-
OutputConfig: _json,
|
|
1010
|
-
Status: __expectString,
|
|
1011
|
-
StatusMessage: __expectString,
|
|
1012
|
-
Tags: _json,
|
|
1013
|
-
});
|
|
1014
|
-
};
|
|
1015
|
-
const de_GetDocumentAnalysisResponse = (output, context) => {
|
|
1016
|
-
return take(output, {
|
|
1017
|
-
AnalyzeDocumentModelVersion: __expectString,
|
|
1018
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
1019
|
-
DocumentMetadata: _json,
|
|
1020
|
-
JobStatus: __expectString,
|
|
1021
|
-
NextToken: __expectString,
|
|
1022
|
-
StatusMessage: __expectString,
|
|
1023
|
-
Warnings: _json,
|
|
1024
|
-
});
|
|
1025
|
-
};
|
|
1026
|
-
const de_GetDocumentTextDetectionResponse = (output, context) => {
|
|
1027
|
-
return take(output, {
|
|
1028
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
1029
|
-
DetectDocumentTextModelVersion: __expectString,
|
|
1030
|
-
DocumentMetadata: _json,
|
|
1031
|
-
JobStatus: __expectString,
|
|
1032
|
-
NextToken: __expectString,
|
|
1033
|
-
StatusMessage: __expectString,
|
|
1034
|
-
Warnings: _json,
|
|
1035
|
-
});
|
|
1036
|
-
};
|
|
1037
|
-
const de_GetExpenseAnalysisResponse = (output, context) => {
|
|
1038
|
-
return take(output, {
|
|
1039
|
-
AnalyzeExpenseModelVersion: __expectString,
|
|
1040
|
-
DocumentMetadata: _json,
|
|
1041
|
-
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
1042
|
-
JobStatus: __expectString,
|
|
1043
|
-
NextToken: __expectString,
|
|
1044
|
-
StatusMessage: __expectString,
|
|
1045
|
-
Warnings: _json,
|
|
1046
|
-
});
|
|
1047
|
-
};
|
|
1048
|
-
const de_GetLendingAnalysisResponse = (output, context) => {
|
|
1049
|
-
return take(output, {
|
|
1050
|
-
AnalyzeLendingModelVersion: __expectString,
|
|
1051
|
-
DocumentMetadata: _json,
|
|
1052
|
-
JobStatus: __expectString,
|
|
1053
|
-
NextToken: __expectString,
|
|
1054
|
-
Results: (_) => de_LendingResultList(_, context),
|
|
1055
|
-
StatusMessage: __expectString,
|
|
1056
|
-
Warnings: _json,
|
|
1057
|
-
});
|
|
1058
|
-
};
|
|
1059
|
-
const de_HumanLoopActivationOutput = (output, context) => {
|
|
1060
|
-
return take(output, {
|
|
1061
|
-
HumanLoopActivationConditionsEvaluationResults: __LazyJsonString.from,
|
|
1062
|
-
HumanLoopActivationReasons: _json,
|
|
1063
|
-
HumanLoopArn: __expectString,
|
|
1064
|
-
});
|
|
1065
|
-
};
|
|
1066
|
-
const de_IdentityDocument = (output, context) => {
|
|
1067
|
-
return take(output, {
|
|
1068
|
-
Blocks: (_) => de_BlockList(_, context),
|
|
1069
|
-
DocumentIndex: __expectInt32,
|
|
1070
|
-
IdentityDocumentFields: (_) => de_IdentityDocumentFieldList(_, context),
|
|
1071
|
-
});
|
|
1072
|
-
};
|
|
1073
|
-
const de_IdentityDocumentField = (output, context) => {
|
|
1074
|
-
return take(output, {
|
|
1075
|
-
Type: (_) => de_AnalyzeIDDetections(_, context),
|
|
1076
|
-
ValueDetection: (_) => de_AnalyzeIDDetections(_, context),
|
|
1077
|
-
});
|
|
1078
|
-
};
|
|
1079
|
-
const de_IdentityDocumentFieldList = (output, context) => {
|
|
1080
|
-
const retVal = (output || [])
|
|
1081
|
-
.filter((e) => e != null)
|
|
1082
|
-
.map((entry) => {
|
|
1083
|
-
return de_IdentityDocumentField(entry, context);
|
|
1084
|
-
});
|
|
1085
|
-
return retVal;
|
|
1086
|
-
};
|
|
1087
|
-
const de_IdentityDocumentList = (output, context) => {
|
|
1088
|
-
const retVal = (output || [])
|
|
1089
|
-
.filter((e) => e != null)
|
|
1090
|
-
.map((entry) => {
|
|
1091
|
-
return de_IdentityDocument(entry, context);
|
|
1092
|
-
});
|
|
1093
|
-
return retVal;
|
|
1094
|
-
};
|
|
1095
|
-
const de_LendingDetection = (output, context) => {
|
|
1096
|
-
return take(output, {
|
|
1097
|
-
Confidence: __limitedParseFloat32,
|
|
1098
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
1099
|
-
SelectionStatus: __expectString,
|
|
1100
|
-
Text: __expectString,
|
|
1101
|
-
});
|
|
1102
|
-
};
|
|
1103
|
-
const de_LendingDetectionList = (output, context) => {
|
|
1104
|
-
const retVal = (output || [])
|
|
1105
|
-
.filter((e) => e != null)
|
|
1106
|
-
.map((entry) => {
|
|
1107
|
-
return de_LendingDetection(entry, context);
|
|
1108
|
-
});
|
|
1109
|
-
return retVal;
|
|
1110
|
-
};
|
|
1111
|
-
const de_LendingDocument = (output, context) => {
|
|
1112
|
-
return take(output, {
|
|
1113
|
-
LendingFields: (_) => de_LendingFieldList(_, context),
|
|
1114
|
-
SignatureDetections: (_) => de_SignatureDetectionList(_, context),
|
|
1115
|
-
});
|
|
1116
|
-
};
|
|
1117
|
-
const de_LendingField = (output, context) => {
|
|
1118
|
-
return take(output, {
|
|
1119
|
-
KeyDetection: (_) => de_LendingDetection(_, context),
|
|
1120
|
-
Type: __expectString,
|
|
1121
|
-
ValueDetections: (_) => de_LendingDetectionList(_, context),
|
|
1122
|
-
});
|
|
1123
|
-
};
|
|
1124
|
-
const de_LendingFieldList = (output, context) => {
|
|
1125
|
-
const retVal = (output || [])
|
|
1126
|
-
.filter((e) => e != null)
|
|
1127
|
-
.map((entry) => {
|
|
1128
|
-
return de_LendingField(entry, context);
|
|
1129
|
-
});
|
|
1130
|
-
return retVal;
|
|
1131
|
-
};
|
|
1132
|
-
const de_LendingResult = (output, context) => {
|
|
1133
|
-
return take(output, {
|
|
1134
|
-
Extractions: (_) => de_ExtractionList(_, context),
|
|
1135
|
-
Page: __expectInt32,
|
|
1136
|
-
PageClassification: (_) => de_PageClassification(_, context),
|
|
1137
|
-
});
|
|
1138
|
-
};
|
|
1139
|
-
const de_LendingResultList = (output, context) => {
|
|
1140
|
-
const retVal = (output || [])
|
|
1141
|
-
.filter((e) => e != null)
|
|
1142
|
-
.map((entry) => {
|
|
1143
|
-
return de_LendingResult(entry, context);
|
|
1144
|
-
});
|
|
1145
|
-
return retVal;
|
|
1146
|
-
};
|
|
1147
|
-
const de_LineItemFields = (output, context) => {
|
|
1148
|
-
return take(output, {
|
|
1149
|
-
LineItemExpenseFields: (_) => de_ExpenseFieldList(_, context),
|
|
1150
|
-
});
|
|
1151
|
-
};
|
|
1152
|
-
const de_LineItemGroup = (output, context) => {
|
|
1153
|
-
return take(output, {
|
|
1154
|
-
LineItemGroupIndex: __expectInt32,
|
|
1155
|
-
LineItems: (_) => de_LineItemList(_, context),
|
|
1156
|
-
});
|
|
1157
|
-
};
|
|
1158
|
-
const de_LineItemGroupList = (output, context) => {
|
|
1159
|
-
const retVal = (output || [])
|
|
1160
|
-
.filter((e) => e != null)
|
|
1161
|
-
.map((entry) => {
|
|
1162
|
-
return de_LineItemGroup(entry, context);
|
|
1163
|
-
});
|
|
1164
|
-
return retVal;
|
|
1165
|
-
};
|
|
1166
|
-
const de_LineItemList = (output, context) => {
|
|
1167
|
-
const retVal = (output || [])
|
|
1168
|
-
.filter((e) => e != null)
|
|
1169
|
-
.map((entry) => {
|
|
1170
|
-
return de_LineItemFields(entry, context);
|
|
1171
|
-
});
|
|
1172
|
-
return retVal;
|
|
1173
|
-
};
|
|
1174
|
-
const de_ListAdaptersResponse = (output, context) => {
|
|
1175
|
-
return take(output, {
|
|
1176
|
-
Adapters: (_) => de_AdapterList(_, context),
|
|
1177
|
-
NextToken: __expectString,
|
|
1178
|
-
});
|
|
1179
|
-
};
|
|
1180
|
-
const de_ListAdapterVersionsResponse = (output, context) => {
|
|
1181
|
-
return take(output, {
|
|
1182
|
-
AdapterVersions: (_) => de_AdapterVersionList(_, context),
|
|
1183
|
-
NextToken: __expectString,
|
|
1184
|
-
});
|
|
1185
|
-
};
|
|
1186
|
-
const de_PageClassification = (output, context) => {
|
|
1187
|
-
return take(output, {
|
|
1188
|
-
PageNumber: (_) => de_PredictionList(_, context),
|
|
1189
|
-
PageType: (_) => de_PredictionList(_, context),
|
|
1190
|
-
});
|
|
1191
|
-
};
|
|
1192
|
-
const de_Point = (output, context) => {
|
|
1193
|
-
return take(output, {
|
|
1194
|
-
X: __limitedParseFloat32,
|
|
1195
|
-
Y: __limitedParseFloat32,
|
|
1196
|
-
});
|
|
1197
|
-
};
|
|
1198
|
-
const de_Polygon = (output, context) => {
|
|
1199
|
-
const retVal = (output || [])
|
|
1200
|
-
.filter((e) => e != null)
|
|
1201
|
-
.map((entry) => {
|
|
1202
|
-
return de_Point(entry, context);
|
|
1203
|
-
});
|
|
1204
|
-
return retVal;
|
|
1205
|
-
};
|
|
1206
|
-
const de_Prediction = (output, context) => {
|
|
1207
|
-
return take(output, {
|
|
1208
|
-
Confidence: __limitedParseFloat32,
|
|
1209
|
-
Value: __expectString,
|
|
1210
|
-
});
|
|
1211
|
-
};
|
|
1212
|
-
const de_PredictionList = (output, context) => {
|
|
1213
|
-
const retVal = (output || [])
|
|
1214
|
-
.filter((e) => e != null)
|
|
1215
|
-
.map((entry) => {
|
|
1216
|
-
return de_Prediction(entry, context);
|
|
1217
|
-
});
|
|
1218
|
-
return retVal;
|
|
1219
|
-
};
|
|
1220
|
-
const de_SignatureDetection = (output, context) => {
|
|
1221
|
-
return take(output, {
|
|
1222
|
-
Confidence: __limitedParseFloat32,
|
|
1223
|
-
Geometry: (_) => de_Geometry(_, context),
|
|
1224
|
-
});
|
|
1225
|
-
};
|
|
1226
|
-
const de_SignatureDetectionList = (output, context) => {
|
|
1227
|
-
const retVal = (output || [])
|
|
1228
|
-
.filter((e) => e != null)
|
|
1229
|
-
.map((entry) => {
|
|
1230
|
-
return de_SignatureDetection(entry, context);
|
|
1231
|
-
});
|
|
1232
|
-
return retVal;
|
|
1233
|
-
};
|
|
1234
|
-
const de_UpdateAdapterResponse = (output, context) => {
|
|
1235
|
-
return take(output, {
|
|
1236
|
-
AdapterId: __expectString,
|
|
1237
|
-
AdapterName: __expectString,
|
|
1238
|
-
AutoUpdate: __expectString,
|
|
1239
|
-
CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1240
|
-
Description: __expectString,
|
|
1241
|
-
FeatureTypes: _json,
|
|
1242
|
-
});
|
|
1243
|
-
};
|
|
1244
|
-
const deserializeMetadata = (output) => ({
|
|
1245
|
-
httpStatusCode: output.statusCode,
|
|
1246
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1247
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1248
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1249
|
-
});
|
|
1250
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1251
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
1252
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1253
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1254
|
-
const contents = {
|
|
1255
|
-
protocol,
|
|
1256
|
-
hostname,
|
|
1257
|
-
port,
|
|
1258
|
-
method: "POST",
|
|
1259
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1260
|
-
headers,
|
|
1261
|
-
};
|
|
1262
|
-
if (resolvedHostname !== undefined) {
|
|
1263
|
-
contents.hostname = resolvedHostname;
|
|
1264
|
-
}
|
|
1265
|
-
if (body !== undefined) {
|
|
1266
|
-
contents.body = body;
|
|
1267
|
-
}
|
|
1268
|
-
return new __HttpRequest(contents);
|
|
1269
|
-
};
|
|
1270
|
-
function sharedHeaders(operation) {
|
|
1271
|
-
return {
|
|
1272
|
-
"content-type": "application/x-amz-json-1.1",
|
|
1273
|
-
"x-amz-target": `Textract.${operation}`,
|
|
1274
|
-
};
|
|
1275
|
-
}
|