@aws-sdk/client-textract 3.310.0 → 3.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/protocols/Aws_json1_1.js +266 -874
- package/dist-es/protocols/Aws_json1_1.js +267 -875
- package/package.json +6 -6
|
@@ -6,132 +6,93 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const TextractServiceException_1 = require("../models/TextractServiceException");
|
|
8
8
|
const se_AnalyzeDocumentCommand = async (input, context) => {
|
|
9
|
-
const headers =
|
|
10
|
-
"content-type": "application/x-amz-json-1.1",
|
|
11
|
-
"x-amz-target": "Textract.AnalyzeDocument",
|
|
12
|
-
};
|
|
9
|
+
const headers = sharedHeaders("AnalyzeDocument");
|
|
13
10
|
let body;
|
|
14
11
|
body = JSON.stringify(se_AnalyzeDocumentRequest(input, context));
|
|
15
12
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
16
13
|
};
|
|
17
14
|
exports.se_AnalyzeDocumentCommand = se_AnalyzeDocumentCommand;
|
|
18
15
|
const se_AnalyzeExpenseCommand = async (input, context) => {
|
|
19
|
-
const headers =
|
|
20
|
-
"content-type": "application/x-amz-json-1.1",
|
|
21
|
-
"x-amz-target": "Textract.AnalyzeExpense",
|
|
22
|
-
};
|
|
16
|
+
const headers = sharedHeaders("AnalyzeExpense");
|
|
23
17
|
let body;
|
|
24
18
|
body = JSON.stringify(se_AnalyzeExpenseRequest(input, context));
|
|
25
19
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
26
20
|
};
|
|
27
21
|
exports.se_AnalyzeExpenseCommand = se_AnalyzeExpenseCommand;
|
|
28
22
|
const se_AnalyzeIDCommand = async (input, context) => {
|
|
29
|
-
const headers =
|
|
30
|
-
"content-type": "application/x-amz-json-1.1",
|
|
31
|
-
"x-amz-target": "Textract.AnalyzeID",
|
|
32
|
-
};
|
|
23
|
+
const headers = sharedHeaders("AnalyzeID");
|
|
33
24
|
let body;
|
|
34
25
|
body = JSON.stringify(se_AnalyzeIDRequest(input, context));
|
|
35
26
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
27
|
};
|
|
37
28
|
exports.se_AnalyzeIDCommand = se_AnalyzeIDCommand;
|
|
38
29
|
const se_DetectDocumentTextCommand = async (input, context) => {
|
|
39
|
-
const headers =
|
|
40
|
-
"content-type": "application/x-amz-json-1.1",
|
|
41
|
-
"x-amz-target": "Textract.DetectDocumentText",
|
|
42
|
-
};
|
|
30
|
+
const headers = sharedHeaders("DetectDocumentText");
|
|
43
31
|
let body;
|
|
44
32
|
body = JSON.stringify(se_DetectDocumentTextRequest(input, context));
|
|
45
33
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
46
34
|
};
|
|
47
35
|
exports.se_DetectDocumentTextCommand = se_DetectDocumentTextCommand;
|
|
48
36
|
const se_GetDocumentAnalysisCommand = async (input, context) => {
|
|
49
|
-
const headers =
|
|
50
|
-
"content-type": "application/x-amz-json-1.1",
|
|
51
|
-
"x-amz-target": "Textract.GetDocumentAnalysis",
|
|
52
|
-
};
|
|
37
|
+
const headers = sharedHeaders("GetDocumentAnalysis");
|
|
53
38
|
let body;
|
|
54
|
-
body = JSON.stringify(
|
|
39
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
55
40
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
41
|
};
|
|
57
42
|
exports.se_GetDocumentAnalysisCommand = se_GetDocumentAnalysisCommand;
|
|
58
43
|
const se_GetDocumentTextDetectionCommand = async (input, context) => {
|
|
59
|
-
const headers =
|
|
60
|
-
"content-type": "application/x-amz-json-1.1",
|
|
61
|
-
"x-amz-target": "Textract.GetDocumentTextDetection",
|
|
62
|
-
};
|
|
44
|
+
const headers = sharedHeaders("GetDocumentTextDetection");
|
|
63
45
|
let body;
|
|
64
|
-
body = JSON.stringify(
|
|
46
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
65
47
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
48
|
};
|
|
67
49
|
exports.se_GetDocumentTextDetectionCommand = se_GetDocumentTextDetectionCommand;
|
|
68
50
|
const se_GetExpenseAnalysisCommand = async (input, context) => {
|
|
69
|
-
const headers =
|
|
70
|
-
"content-type": "application/x-amz-json-1.1",
|
|
71
|
-
"x-amz-target": "Textract.GetExpenseAnalysis",
|
|
72
|
-
};
|
|
51
|
+
const headers = sharedHeaders("GetExpenseAnalysis");
|
|
73
52
|
let body;
|
|
74
|
-
body = JSON.stringify(
|
|
53
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
75
54
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
55
|
};
|
|
77
56
|
exports.se_GetExpenseAnalysisCommand = se_GetExpenseAnalysisCommand;
|
|
78
57
|
const se_GetLendingAnalysisCommand = async (input, context) => {
|
|
79
|
-
const headers =
|
|
80
|
-
"content-type": "application/x-amz-json-1.1",
|
|
81
|
-
"x-amz-target": "Textract.GetLendingAnalysis",
|
|
82
|
-
};
|
|
58
|
+
const headers = sharedHeaders("GetLendingAnalysis");
|
|
83
59
|
let body;
|
|
84
|
-
body = JSON.stringify(
|
|
60
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
85
61
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
86
62
|
};
|
|
87
63
|
exports.se_GetLendingAnalysisCommand = se_GetLendingAnalysisCommand;
|
|
88
64
|
const se_GetLendingAnalysisSummaryCommand = async (input, context) => {
|
|
89
|
-
const headers =
|
|
90
|
-
"content-type": "application/x-amz-json-1.1",
|
|
91
|
-
"x-amz-target": "Textract.GetLendingAnalysisSummary",
|
|
92
|
-
};
|
|
65
|
+
const headers = sharedHeaders("GetLendingAnalysisSummary");
|
|
93
66
|
let body;
|
|
94
|
-
body = JSON.stringify(
|
|
67
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
95
68
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
96
69
|
};
|
|
97
70
|
exports.se_GetLendingAnalysisSummaryCommand = se_GetLendingAnalysisSummaryCommand;
|
|
98
71
|
const se_StartDocumentAnalysisCommand = async (input, context) => {
|
|
99
|
-
const headers =
|
|
100
|
-
"content-type": "application/x-amz-json-1.1",
|
|
101
|
-
"x-amz-target": "Textract.StartDocumentAnalysis",
|
|
102
|
-
};
|
|
72
|
+
const headers = sharedHeaders("StartDocumentAnalysis");
|
|
103
73
|
let body;
|
|
104
|
-
body = JSON.stringify(
|
|
74
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
105
75
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
106
76
|
};
|
|
107
77
|
exports.se_StartDocumentAnalysisCommand = se_StartDocumentAnalysisCommand;
|
|
108
78
|
const se_StartDocumentTextDetectionCommand = async (input, context) => {
|
|
109
|
-
const headers =
|
|
110
|
-
"content-type": "application/x-amz-json-1.1",
|
|
111
|
-
"x-amz-target": "Textract.StartDocumentTextDetection",
|
|
112
|
-
};
|
|
79
|
+
const headers = sharedHeaders("StartDocumentTextDetection");
|
|
113
80
|
let body;
|
|
114
|
-
body = JSON.stringify(
|
|
81
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
115
82
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
116
83
|
};
|
|
117
84
|
exports.se_StartDocumentTextDetectionCommand = se_StartDocumentTextDetectionCommand;
|
|
118
85
|
const se_StartExpenseAnalysisCommand = async (input, context) => {
|
|
119
|
-
const headers =
|
|
120
|
-
"content-type": "application/x-amz-json-1.1",
|
|
121
|
-
"x-amz-target": "Textract.StartExpenseAnalysis",
|
|
122
|
-
};
|
|
86
|
+
const headers = sharedHeaders("StartExpenseAnalysis");
|
|
123
87
|
let body;
|
|
124
|
-
body = JSON.stringify(
|
|
88
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
125
89
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
90
|
};
|
|
127
91
|
exports.se_StartExpenseAnalysisCommand = se_StartExpenseAnalysisCommand;
|
|
128
92
|
const se_StartLendingAnalysisCommand = async (input, context) => {
|
|
129
|
-
const headers =
|
|
130
|
-
"content-type": "application/x-amz-json-1.1",
|
|
131
|
-
"x-amz-target": "Textract.StartLendingAnalysis",
|
|
132
|
-
};
|
|
93
|
+
const headers = sharedHeaders("StartLendingAnalysis");
|
|
133
94
|
let body;
|
|
134
|
-
body = JSON.stringify(
|
|
95
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
135
96
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
136
97
|
};
|
|
137
98
|
exports.se_StartLendingAnalysisCommand = se_StartLendingAnalysisCommand;
|
|
@@ -146,7 +107,7 @@ const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
|
146
107
|
$metadata: deserializeMetadata(output),
|
|
147
108
|
...contents,
|
|
148
109
|
};
|
|
149
|
-
return
|
|
110
|
+
return response;
|
|
150
111
|
};
|
|
151
112
|
exports.de_AnalyzeDocumentCommand = de_AnalyzeDocumentCommand;
|
|
152
113
|
const de_AnalyzeDocumentCommandError = async (output, context) => {
|
|
@@ -188,10 +149,9 @@ const de_AnalyzeDocumentCommandError = async (output, context) => {
|
|
|
188
149
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
189
150
|
default:
|
|
190
151
|
const parsedBody = parsedOutput.body;
|
|
191
|
-
|
|
152
|
+
return throwDefaultError({
|
|
192
153
|
output,
|
|
193
154
|
parsedBody,
|
|
194
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
195
155
|
errorCode,
|
|
196
156
|
});
|
|
197
157
|
}
|
|
@@ -207,7 +167,7 @@ const de_AnalyzeExpenseCommand = async (output, context) => {
|
|
|
207
167
|
$metadata: deserializeMetadata(output),
|
|
208
168
|
...contents,
|
|
209
169
|
};
|
|
210
|
-
return
|
|
170
|
+
return response;
|
|
211
171
|
};
|
|
212
172
|
exports.de_AnalyzeExpenseCommand = de_AnalyzeExpenseCommand;
|
|
213
173
|
const de_AnalyzeExpenseCommandError = async (output, context) => {
|
|
@@ -246,10 +206,9 @@ const de_AnalyzeExpenseCommandError = async (output, context) => {
|
|
|
246
206
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
247
207
|
default:
|
|
248
208
|
const parsedBody = parsedOutput.body;
|
|
249
|
-
|
|
209
|
+
return throwDefaultError({
|
|
250
210
|
output,
|
|
251
211
|
parsedBody,
|
|
252
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
253
212
|
errorCode,
|
|
254
213
|
});
|
|
255
214
|
}
|
|
@@ -265,7 +224,7 @@ const de_AnalyzeIDCommand = async (output, context) => {
|
|
|
265
224
|
$metadata: deserializeMetadata(output),
|
|
266
225
|
...contents,
|
|
267
226
|
};
|
|
268
|
-
return
|
|
227
|
+
return response;
|
|
269
228
|
};
|
|
270
229
|
exports.de_AnalyzeIDCommand = de_AnalyzeIDCommand;
|
|
271
230
|
const de_AnalyzeIDCommandError = async (output, context) => {
|
|
@@ -304,10 +263,9 @@ const de_AnalyzeIDCommandError = async (output, context) => {
|
|
|
304
263
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
305
264
|
default:
|
|
306
265
|
const parsedBody = parsedOutput.body;
|
|
307
|
-
|
|
266
|
+
return throwDefaultError({
|
|
308
267
|
output,
|
|
309
268
|
parsedBody,
|
|
310
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
311
269
|
errorCode,
|
|
312
270
|
});
|
|
313
271
|
}
|
|
@@ -323,7 +281,7 @@ const de_DetectDocumentTextCommand = async (output, context) => {
|
|
|
323
281
|
$metadata: deserializeMetadata(output),
|
|
324
282
|
...contents,
|
|
325
283
|
};
|
|
326
|
-
return
|
|
284
|
+
return response;
|
|
327
285
|
};
|
|
328
286
|
exports.de_DetectDocumentTextCommand = de_DetectDocumentTextCommand;
|
|
329
287
|
const de_DetectDocumentTextCommandError = async (output, context) => {
|
|
@@ -362,10 +320,9 @@ const de_DetectDocumentTextCommandError = async (output, context) => {
|
|
|
362
320
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
363
321
|
default:
|
|
364
322
|
const parsedBody = parsedOutput.body;
|
|
365
|
-
|
|
323
|
+
return throwDefaultError({
|
|
366
324
|
output,
|
|
367
325
|
parsedBody,
|
|
368
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
369
326
|
errorCode,
|
|
370
327
|
});
|
|
371
328
|
}
|
|
@@ -381,7 +338,7 @@ const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
|
381
338
|
$metadata: deserializeMetadata(output),
|
|
382
339
|
...contents,
|
|
383
340
|
};
|
|
384
|
-
return
|
|
341
|
+
return response;
|
|
385
342
|
};
|
|
386
343
|
exports.de_GetDocumentAnalysisCommand = de_GetDocumentAnalysisCommand;
|
|
387
344
|
const de_GetDocumentAnalysisCommandError = async (output, context) => {
|
|
@@ -417,10 +374,9 @@ const de_GetDocumentAnalysisCommandError = async (output, context) => {
|
|
|
417
374
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
418
375
|
default:
|
|
419
376
|
const parsedBody = parsedOutput.body;
|
|
420
|
-
|
|
377
|
+
return throwDefaultError({
|
|
421
378
|
output,
|
|
422
379
|
parsedBody,
|
|
423
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
424
380
|
errorCode,
|
|
425
381
|
});
|
|
426
382
|
}
|
|
@@ -436,7 +392,7 @@ const de_GetDocumentTextDetectionCommand = async (output, context) => {
|
|
|
436
392
|
$metadata: deserializeMetadata(output),
|
|
437
393
|
...contents,
|
|
438
394
|
};
|
|
439
|
-
return
|
|
395
|
+
return response;
|
|
440
396
|
};
|
|
441
397
|
exports.de_GetDocumentTextDetectionCommand = de_GetDocumentTextDetectionCommand;
|
|
442
398
|
const de_GetDocumentTextDetectionCommandError = async (output, context) => {
|
|
@@ -472,10 +428,9 @@ const de_GetDocumentTextDetectionCommandError = async (output, context) => {
|
|
|
472
428
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
473
429
|
default:
|
|
474
430
|
const parsedBody = parsedOutput.body;
|
|
475
|
-
|
|
431
|
+
return throwDefaultError({
|
|
476
432
|
output,
|
|
477
433
|
parsedBody,
|
|
478
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
479
434
|
errorCode,
|
|
480
435
|
});
|
|
481
436
|
}
|
|
@@ -491,7 +446,7 @@ const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
|
491
446
|
$metadata: deserializeMetadata(output),
|
|
492
447
|
...contents,
|
|
493
448
|
};
|
|
494
|
-
return
|
|
449
|
+
return response;
|
|
495
450
|
};
|
|
496
451
|
exports.de_GetExpenseAnalysisCommand = de_GetExpenseAnalysisCommand;
|
|
497
452
|
const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
@@ -527,10 +482,9 @@ const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
|
527
482
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
528
483
|
default:
|
|
529
484
|
const parsedBody = parsedOutput.body;
|
|
530
|
-
|
|
485
|
+
return throwDefaultError({
|
|
531
486
|
output,
|
|
532
487
|
parsedBody,
|
|
533
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
534
488
|
errorCode,
|
|
535
489
|
});
|
|
536
490
|
}
|
|
@@ -546,7 +500,7 @@ const de_GetLendingAnalysisCommand = async (output, context) => {
|
|
|
546
500
|
$metadata: deserializeMetadata(output),
|
|
547
501
|
...contents,
|
|
548
502
|
};
|
|
549
|
-
return
|
|
503
|
+
return response;
|
|
550
504
|
};
|
|
551
505
|
exports.de_GetLendingAnalysisCommand = de_GetLendingAnalysisCommand;
|
|
552
506
|
const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
@@ -582,10 +536,9 @@ const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
|
582
536
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
583
537
|
default:
|
|
584
538
|
const parsedBody = parsedOutput.body;
|
|
585
|
-
|
|
539
|
+
return throwDefaultError({
|
|
586
540
|
output,
|
|
587
541
|
parsedBody,
|
|
588
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
589
542
|
errorCode,
|
|
590
543
|
});
|
|
591
544
|
}
|
|
@@ -596,12 +549,12 @@ const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
|
596
549
|
}
|
|
597
550
|
const data = await parseBody(output.body, context);
|
|
598
551
|
let contents = {};
|
|
599
|
-
contents =
|
|
552
|
+
contents = (0, smithy_client_1._json)(data);
|
|
600
553
|
const response = {
|
|
601
554
|
$metadata: deserializeMetadata(output),
|
|
602
555
|
...contents,
|
|
603
556
|
};
|
|
604
|
-
return
|
|
557
|
+
return response;
|
|
605
558
|
};
|
|
606
559
|
exports.de_GetLendingAnalysisSummaryCommand = de_GetLendingAnalysisSummaryCommand;
|
|
607
560
|
const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
@@ -637,10 +590,9 @@ const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
|
637
590
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
638
591
|
default:
|
|
639
592
|
const parsedBody = parsedOutput.body;
|
|
640
|
-
|
|
593
|
+
return throwDefaultError({
|
|
641
594
|
output,
|
|
642
595
|
parsedBody,
|
|
643
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
644
596
|
errorCode,
|
|
645
597
|
});
|
|
646
598
|
}
|
|
@@ -651,12 +603,12 @@ const de_StartDocumentAnalysisCommand = async (output, context) => {
|
|
|
651
603
|
}
|
|
652
604
|
const data = await parseBody(output.body, context);
|
|
653
605
|
let contents = {};
|
|
654
|
-
contents =
|
|
606
|
+
contents = (0, smithy_client_1._json)(data);
|
|
655
607
|
const response = {
|
|
656
608
|
$metadata: deserializeMetadata(output),
|
|
657
609
|
...contents,
|
|
658
610
|
};
|
|
659
|
-
return
|
|
611
|
+
return response;
|
|
660
612
|
};
|
|
661
613
|
exports.de_StartDocumentAnalysisCommand = de_StartDocumentAnalysisCommand;
|
|
662
614
|
const de_StartDocumentAnalysisCommandError = async (output, context) => {
|
|
@@ -704,10 +656,9 @@ const de_StartDocumentAnalysisCommandError = async (output, context) => {
|
|
|
704
656
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
705
657
|
default:
|
|
706
658
|
const parsedBody = parsedOutput.body;
|
|
707
|
-
|
|
659
|
+
return throwDefaultError({
|
|
708
660
|
output,
|
|
709
661
|
parsedBody,
|
|
710
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
711
662
|
errorCode,
|
|
712
663
|
});
|
|
713
664
|
}
|
|
@@ -718,12 +669,12 @@ const de_StartDocumentTextDetectionCommand = async (output, context) => {
|
|
|
718
669
|
}
|
|
719
670
|
const data = await parseBody(output.body, context);
|
|
720
671
|
let contents = {};
|
|
721
|
-
contents =
|
|
672
|
+
contents = (0, smithy_client_1._json)(data);
|
|
722
673
|
const response = {
|
|
723
674
|
$metadata: deserializeMetadata(output),
|
|
724
675
|
...contents,
|
|
725
676
|
};
|
|
726
|
-
return
|
|
677
|
+
return response;
|
|
727
678
|
};
|
|
728
679
|
exports.de_StartDocumentTextDetectionCommand = de_StartDocumentTextDetectionCommand;
|
|
729
680
|
const de_StartDocumentTextDetectionCommandError = async (output, context) => {
|
|
@@ -771,10 +722,9 @@ const de_StartDocumentTextDetectionCommandError = async (output, context) => {
|
|
|
771
722
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
772
723
|
default:
|
|
773
724
|
const parsedBody = parsedOutput.body;
|
|
774
|
-
|
|
725
|
+
return throwDefaultError({
|
|
775
726
|
output,
|
|
776
727
|
parsedBody,
|
|
777
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
778
728
|
errorCode,
|
|
779
729
|
});
|
|
780
730
|
}
|
|
@@ -785,12 +735,12 @@ const de_StartExpenseAnalysisCommand = async (output, context) => {
|
|
|
785
735
|
}
|
|
786
736
|
const data = await parseBody(output.body, context);
|
|
787
737
|
let contents = {};
|
|
788
|
-
contents =
|
|
738
|
+
contents = (0, smithy_client_1._json)(data);
|
|
789
739
|
const response = {
|
|
790
740
|
$metadata: deserializeMetadata(output),
|
|
791
741
|
...contents,
|
|
792
742
|
};
|
|
793
|
-
return
|
|
743
|
+
return response;
|
|
794
744
|
};
|
|
795
745
|
exports.de_StartExpenseAnalysisCommand = de_StartExpenseAnalysisCommand;
|
|
796
746
|
const de_StartExpenseAnalysisCommandError = async (output, context) => {
|
|
@@ -838,10 +788,9 @@ const de_StartExpenseAnalysisCommandError = async (output, context) => {
|
|
|
838
788
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
839
789
|
default:
|
|
840
790
|
const parsedBody = parsedOutput.body;
|
|
841
|
-
|
|
791
|
+
return throwDefaultError({
|
|
842
792
|
output,
|
|
843
793
|
parsedBody,
|
|
844
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
845
794
|
errorCode,
|
|
846
795
|
});
|
|
847
796
|
}
|
|
@@ -852,12 +801,12 @@ const de_StartLendingAnalysisCommand = async (output, context) => {
|
|
|
852
801
|
}
|
|
853
802
|
const data = await parseBody(output.body, context);
|
|
854
803
|
let contents = {};
|
|
855
|
-
contents =
|
|
804
|
+
contents = (0, smithy_client_1._json)(data);
|
|
856
805
|
const response = {
|
|
857
806
|
$metadata: deserializeMetadata(output),
|
|
858
807
|
...contents,
|
|
859
808
|
};
|
|
860
|
-
return
|
|
809
|
+
return response;
|
|
861
810
|
};
|
|
862
811
|
exports.de_StartLendingAnalysisCommand = de_StartLendingAnalysisCommand;
|
|
863
812
|
const de_StartLendingAnalysisCommandError = async (output, context) => {
|
|
@@ -905,17 +854,16 @@ const de_StartLendingAnalysisCommandError = async (output, context) => {
|
|
|
905
854
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
906
855
|
default:
|
|
907
856
|
const parsedBody = parsedOutput.body;
|
|
908
|
-
|
|
857
|
+
return throwDefaultError({
|
|
909
858
|
output,
|
|
910
859
|
parsedBody,
|
|
911
|
-
exceptionCtor: TextractServiceException_1.TextractServiceException,
|
|
912
860
|
errorCode,
|
|
913
861
|
});
|
|
914
862
|
}
|
|
915
863
|
};
|
|
916
864
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
917
865
|
const body = parsedOutput.body;
|
|
918
|
-
const deserialized =
|
|
866
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
919
867
|
const exception = new models_0_1.AccessDeniedException({
|
|
920
868
|
$metadata: deserializeMetadata(parsedOutput),
|
|
921
869
|
...deserialized,
|
|
@@ -924,7 +872,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
924
872
|
};
|
|
925
873
|
const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
926
874
|
const body = parsedOutput.body;
|
|
927
|
-
const deserialized =
|
|
875
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
928
876
|
const exception = new models_0_1.BadDocumentException({
|
|
929
877
|
$metadata: deserializeMetadata(parsedOutput),
|
|
930
878
|
...deserialized,
|
|
@@ -933,7 +881,7 @@ const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
933
881
|
};
|
|
934
882
|
const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
935
883
|
const body = parsedOutput.body;
|
|
936
|
-
const deserialized =
|
|
884
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
937
885
|
const exception = new models_0_1.DocumentTooLargeException({
|
|
938
886
|
$metadata: deserializeMetadata(parsedOutput),
|
|
939
887
|
...deserialized,
|
|
@@ -942,7 +890,7 @@ const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
|
942
890
|
};
|
|
943
891
|
const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
944
892
|
const body = parsedOutput.body;
|
|
945
|
-
const deserialized =
|
|
893
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
946
894
|
const exception = new models_0_1.HumanLoopQuotaExceededException({
|
|
947
895
|
$metadata: deserializeMetadata(parsedOutput),
|
|
948
896
|
...deserialized,
|
|
@@ -951,7 +899,7 @@ const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
951
899
|
};
|
|
952
900
|
const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
|
|
953
901
|
const body = parsedOutput.body;
|
|
954
|
-
const deserialized =
|
|
902
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
955
903
|
const exception = new models_0_1.IdempotentParameterMismatchException({
|
|
956
904
|
$metadata: deserializeMetadata(parsedOutput),
|
|
957
905
|
...deserialized,
|
|
@@ -960,7 +908,7 @@ const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context)
|
|
|
960
908
|
};
|
|
961
909
|
const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
962
910
|
const body = parsedOutput.body;
|
|
963
|
-
const deserialized =
|
|
911
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
964
912
|
const exception = new models_0_1.InternalServerError({
|
|
965
913
|
$metadata: deserializeMetadata(parsedOutput),
|
|
966
914
|
...deserialized,
|
|
@@ -969,7 +917,7 @@ const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
|
969
917
|
};
|
|
970
918
|
const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
|
|
971
919
|
const body = parsedOutput.body;
|
|
972
|
-
const deserialized =
|
|
920
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
973
921
|
const exception = new models_0_1.InvalidJobIdException({
|
|
974
922
|
$metadata: deserializeMetadata(parsedOutput),
|
|
975
923
|
...deserialized,
|
|
@@ -978,7 +926,7 @@ const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
|
|
|
978
926
|
};
|
|
979
927
|
const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
|
|
980
928
|
const body = parsedOutput.body;
|
|
981
|
-
const deserialized =
|
|
929
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
982
930
|
const exception = new models_0_1.InvalidKMSKeyException({
|
|
983
931
|
$metadata: deserializeMetadata(parsedOutput),
|
|
984
932
|
...deserialized,
|
|
@@ -987,7 +935,7 @@ const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
|
|
|
987
935
|
};
|
|
988
936
|
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
989
937
|
const body = parsedOutput.body;
|
|
990
|
-
const deserialized =
|
|
938
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
991
939
|
const exception = new models_0_1.InvalidParameterException({
|
|
992
940
|
$metadata: deserializeMetadata(parsedOutput),
|
|
993
941
|
...deserialized,
|
|
@@ -996,7 +944,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
|
996
944
|
};
|
|
997
945
|
const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
|
|
998
946
|
const body = parsedOutput.body;
|
|
999
|
-
const deserialized =
|
|
947
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1000
948
|
const exception = new models_0_1.InvalidS3ObjectException({
|
|
1001
949
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1002
950
|
...deserialized,
|
|
@@ -1005,7 +953,7 @@ const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
|
|
|
1005
953
|
};
|
|
1006
954
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1007
955
|
const body = parsedOutput.body;
|
|
1008
|
-
const deserialized =
|
|
956
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1009
957
|
const exception = new models_0_1.LimitExceededException({
|
|
1010
958
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1011
959
|
...deserialized,
|
|
@@ -1014,7 +962,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
1014
962
|
};
|
|
1015
963
|
const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, context) => {
|
|
1016
964
|
const body = parsedOutput.body;
|
|
1017
|
-
const deserialized =
|
|
965
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1018
966
|
const exception = new models_0_1.ProvisionedThroughputExceededException({
|
|
1019
967
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1020
968
|
...deserialized,
|
|
@@ -1023,7 +971,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, contex
|
|
|
1023
971
|
};
|
|
1024
972
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1025
973
|
const body = parsedOutput.body;
|
|
1026
|
-
const deserialized =
|
|
974
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1027
975
|
const exception = new models_0_1.ThrottlingException({
|
|
1028
976
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1029
977
|
...deserialized,
|
|
@@ -1032,7 +980,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
1032
980
|
};
|
|
1033
981
|
const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
1034
982
|
const body = parsedOutput.body;
|
|
1035
|
-
const deserialized =
|
|
983
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
1036
984
|
const exception = new models_0_1.UnsupportedDocumentException({
|
|
1037
985
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1038
986
|
...deserialized,
|
|
@@ -1040,45 +988,33 @@ const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
1040
988
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1041
989
|
};
|
|
1042
990
|
const se_AnalyzeDocumentRequest = (input, context) => {
|
|
1043
|
-
return {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
};
|
|
991
|
+
return (0, smithy_client_1.take)(input, {
|
|
992
|
+
Document: (_) => se_Document(_, context),
|
|
993
|
+
FeatureTypes: smithy_client_1._json,
|
|
994
|
+
HumanLoopConfig: smithy_client_1._json,
|
|
995
|
+
QueriesConfig: smithy_client_1._json,
|
|
996
|
+
});
|
|
1049
997
|
};
|
|
1050
998
|
const se_AnalyzeExpenseRequest = (input, context) => {
|
|
1051
|
-
return {
|
|
1052
|
-
|
|
1053
|
-
};
|
|
999
|
+
return (0, smithy_client_1.take)(input, {
|
|
1000
|
+
Document: (_) => se_Document(_, context),
|
|
1001
|
+
});
|
|
1054
1002
|
};
|
|
1055
1003
|
const se_AnalyzeIDRequest = (input, context) => {
|
|
1056
|
-
return {
|
|
1057
|
-
|
|
1058
|
-
};
|
|
1059
|
-
};
|
|
1060
|
-
const se_ContentClassifiers = (input, context) => {
|
|
1061
|
-
return input
|
|
1062
|
-
.filter((e) => e != null)
|
|
1063
|
-
.map((entry) => {
|
|
1064
|
-
return entry;
|
|
1004
|
+
return (0, smithy_client_1.take)(input, {
|
|
1005
|
+
DocumentPages: (_) => se_DocumentPages(_, context),
|
|
1065
1006
|
});
|
|
1066
1007
|
};
|
|
1067
1008
|
const se_DetectDocumentTextRequest = (input, context) => {
|
|
1068
|
-
return {
|
|
1069
|
-
|
|
1070
|
-
};
|
|
1009
|
+
return (0, smithy_client_1.take)(input, {
|
|
1010
|
+
Document: (_) => se_Document(_, context),
|
|
1011
|
+
});
|
|
1071
1012
|
};
|
|
1072
1013
|
const se_Document = (input, context) => {
|
|
1073
|
-
return {
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
};
|
|
1077
|
-
};
|
|
1078
|
-
const se_DocumentLocation = (input, context) => {
|
|
1079
|
-
return {
|
|
1080
|
-
...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }),
|
|
1081
|
-
};
|
|
1014
|
+
return (0, smithy_client_1.take)(input, {
|
|
1015
|
+
Bytes: context.base64Encoder,
|
|
1016
|
+
S3Object: smithy_client_1._json,
|
|
1017
|
+
});
|
|
1082
1018
|
};
|
|
1083
1019
|
const se_DocumentPages = (input, context) => {
|
|
1084
1020
|
return input
|
|
@@ -1087,514 +1023,218 @@ const se_DocumentPages = (input, context) => {
|
|
|
1087
1023
|
return se_Document(entry, context);
|
|
1088
1024
|
});
|
|
1089
1025
|
};
|
|
1090
|
-
const se_FeatureTypes = (input, context) => {
|
|
1091
|
-
return input
|
|
1092
|
-
.filter((e) => e != null)
|
|
1093
|
-
.map((entry) => {
|
|
1094
|
-
return entry;
|
|
1095
|
-
});
|
|
1096
|
-
};
|
|
1097
|
-
const se_GetDocumentAnalysisRequest = (input, context) => {
|
|
1098
|
-
return {
|
|
1099
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1100
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1101
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1102
|
-
};
|
|
1103
|
-
};
|
|
1104
|
-
const se_GetDocumentTextDetectionRequest = (input, context) => {
|
|
1105
|
-
return {
|
|
1106
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1107
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1108
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
const se_GetExpenseAnalysisRequest = (input, context) => {
|
|
1112
|
-
return {
|
|
1113
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1114
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1115
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1116
|
-
};
|
|
1117
|
-
};
|
|
1118
|
-
const se_GetLendingAnalysisRequest = (input, context) => {
|
|
1119
|
-
return {
|
|
1120
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1121
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1122
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1123
|
-
};
|
|
1124
|
-
};
|
|
1125
|
-
const se_GetLendingAnalysisSummaryRequest = (input, context) => {
|
|
1126
|
-
return {
|
|
1127
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1128
|
-
};
|
|
1129
|
-
};
|
|
1130
|
-
const se_HumanLoopConfig = (input, context) => {
|
|
1131
|
-
return {
|
|
1132
|
-
...(input.DataAttributes != null && { DataAttributes: se_HumanLoopDataAttributes(input.DataAttributes, context) }),
|
|
1133
|
-
...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }),
|
|
1134
|
-
...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }),
|
|
1135
|
-
};
|
|
1136
|
-
};
|
|
1137
|
-
const se_HumanLoopDataAttributes = (input, context) => {
|
|
1138
|
-
return {
|
|
1139
|
-
...(input.ContentClassifiers != null && {
|
|
1140
|
-
ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context),
|
|
1141
|
-
}),
|
|
1142
|
-
};
|
|
1143
|
-
};
|
|
1144
|
-
const se_NotificationChannel = (input, context) => {
|
|
1145
|
-
return {
|
|
1146
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
1147
|
-
...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }),
|
|
1148
|
-
};
|
|
1149
|
-
};
|
|
1150
|
-
const se_OutputConfig = (input, context) => {
|
|
1151
|
-
return {
|
|
1152
|
-
...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
|
|
1153
|
-
...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }),
|
|
1154
|
-
};
|
|
1155
|
-
};
|
|
1156
|
-
const se_Queries = (input, context) => {
|
|
1157
|
-
return input
|
|
1158
|
-
.filter((e) => e != null)
|
|
1159
|
-
.map((entry) => {
|
|
1160
|
-
return se_Query(entry, context);
|
|
1161
|
-
});
|
|
1162
|
-
};
|
|
1163
|
-
const se_QueriesConfig = (input, context) => {
|
|
1164
|
-
return {
|
|
1165
|
-
...(input.Queries != null && { Queries: se_Queries(input.Queries, context) }),
|
|
1166
|
-
};
|
|
1167
|
-
};
|
|
1168
|
-
const se_Query = (input, context) => {
|
|
1169
|
-
return {
|
|
1170
|
-
...(input.Alias != null && { Alias: input.Alias }),
|
|
1171
|
-
...(input.Pages != null && { Pages: se_QueryPages(input.Pages, context) }),
|
|
1172
|
-
...(input.Text != null && { Text: input.Text }),
|
|
1173
|
-
};
|
|
1174
|
-
};
|
|
1175
|
-
const se_QueryPages = (input, context) => {
|
|
1176
|
-
return input
|
|
1177
|
-
.filter((e) => e != null)
|
|
1178
|
-
.map((entry) => {
|
|
1179
|
-
return entry;
|
|
1180
|
-
});
|
|
1181
|
-
};
|
|
1182
|
-
const se_S3Object = (input, context) => {
|
|
1183
|
-
return {
|
|
1184
|
-
...(input.Bucket != null && { Bucket: input.Bucket }),
|
|
1185
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1186
|
-
...(input.Version != null && { Version: input.Version }),
|
|
1187
|
-
};
|
|
1188
|
-
};
|
|
1189
|
-
const se_StartDocumentAnalysisRequest = (input, context) => {
|
|
1190
|
-
return {
|
|
1191
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1192
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1193
|
-
...(input.FeatureTypes != null && { FeatureTypes: se_FeatureTypes(input.FeatureTypes, context) }),
|
|
1194
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1195
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1196
|
-
...(input.NotificationChannel != null && {
|
|
1197
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1198
|
-
}),
|
|
1199
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1200
|
-
...(input.QueriesConfig != null && { QueriesConfig: se_QueriesConfig(input.QueriesConfig, context) }),
|
|
1201
|
-
};
|
|
1202
|
-
};
|
|
1203
|
-
const se_StartDocumentTextDetectionRequest = (input, context) => {
|
|
1204
|
-
return {
|
|
1205
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1206
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1207
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1208
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1209
|
-
...(input.NotificationChannel != null && {
|
|
1210
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1211
|
-
}),
|
|
1212
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1213
|
-
};
|
|
1214
|
-
};
|
|
1215
|
-
const se_StartExpenseAnalysisRequest = (input, context) => {
|
|
1216
|
-
return {
|
|
1217
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1218
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1219
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1220
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1221
|
-
...(input.NotificationChannel != null && {
|
|
1222
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1223
|
-
}),
|
|
1224
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1225
|
-
};
|
|
1226
|
-
};
|
|
1227
|
-
const se_StartLendingAnalysisRequest = (input, context) => {
|
|
1228
|
-
return {
|
|
1229
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1230
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1231
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1232
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1233
|
-
...(input.NotificationChannel != null && {
|
|
1234
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1235
|
-
}),
|
|
1236
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1237
|
-
};
|
|
1238
|
-
};
|
|
1239
|
-
const de_AccessDeniedException = (output, context) => {
|
|
1240
|
-
return {
|
|
1241
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1242
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1243
|
-
};
|
|
1244
|
-
};
|
|
1245
1026
|
const de_AnalyzeDocumentResponse = (output, context) => {
|
|
1246
|
-
return {
|
|
1247
|
-
AnalyzeDocumentModelVersion:
|
|
1248
|
-
Blocks:
|
|
1249
|
-
DocumentMetadata:
|
|
1250
|
-
HumanLoopActivationOutput:
|
|
1251
|
-
|
|
1252
|
-
: undefined,
|
|
1253
|
-
};
|
|
1027
|
+
return (0, smithy_client_1.take)(output, {
|
|
1028
|
+
AnalyzeDocumentModelVersion: smithy_client_1.expectString,
|
|
1029
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1030
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1031
|
+
HumanLoopActivationOutput: (_) => de_HumanLoopActivationOutput(_, context),
|
|
1032
|
+
});
|
|
1254
1033
|
};
|
|
1255
1034
|
const de_AnalyzeExpenseResponse = (output, context) => {
|
|
1256
|
-
return {
|
|
1257
|
-
DocumentMetadata:
|
|
1258
|
-
ExpenseDocuments:
|
|
1259
|
-
};
|
|
1035
|
+
return (0, smithy_client_1.take)(output, {
|
|
1036
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1037
|
+
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
1038
|
+
});
|
|
1260
1039
|
};
|
|
1261
1040
|
const de_AnalyzeIDDetections = (output, context) => {
|
|
1262
|
-
return {
|
|
1263
|
-
Confidence:
|
|
1264
|
-
NormalizedValue:
|
|
1265
|
-
Text:
|
|
1266
|
-
};
|
|
1041
|
+
return (0, smithy_client_1.take)(output, {
|
|
1042
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1043
|
+
NormalizedValue: smithy_client_1._json,
|
|
1044
|
+
Text: smithy_client_1.expectString,
|
|
1045
|
+
});
|
|
1267
1046
|
};
|
|
1268
1047
|
const de_AnalyzeIDResponse = (output, context) => {
|
|
1269
|
-
return {
|
|
1270
|
-
AnalyzeIDModelVersion:
|
|
1271
|
-
DocumentMetadata:
|
|
1272
|
-
IdentityDocuments:
|
|
1273
|
-
};
|
|
1274
|
-
};
|
|
1275
|
-
const de_BadDocumentException = (output, context) => {
|
|
1276
|
-
return {
|
|
1277
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1278
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1279
|
-
};
|
|
1048
|
+
return (0, smithy_client_1.take)(output, {
|
|
1049
|
+
AnalyzeIDModelVersion: smithy_client_1.expectString,
|
|
1050
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1051
|
+
IdentityDocuments: (_) => de_IdentityDocumentList(_, context),
|
|
1052
|
+
});
|
|
1280
1053
|
};
|
|
1281
1054
|
const de_Block = (output, context) => {
|
|
1282
|
-
return {
|
|
1283
|
-
BlockType:
|
|
1284
|
-
ColumnIndex:
|
|
1285
|
-
ColumnSpan:
|
|
1286
|
-
Confidence:
|
|
1287
|
-
EntityTypes:
|
|
1288
|
-
Geometry:
|
|
1289
|
-
Id:
|
|
1290
|
-
Page:
|
|
1291
|
-
Query:
|
|
1292
|
-
Relationships:
|
|
1293
|
-
RowIndex:
|
|
1294
|
-
RowSpan:
|
|
1295
|
-
SelectionStatus:
|
|
1296
|
-
Text:
|
|
1297
|
-
TextType:
|
|
1298
|
-
};
|
|
1055
|
+
return (0, smithy_client_1.take)(output, {
|
|
1056
|
+
BlockType: smithy_client_1.expectString,
|
|
1057
|
+
ColumnIndex: smithy_client_1.expectInt32,
|
|
1058
|
+
ColumnSpan: smithy_client_1.expectInt32,
|
|
1059
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1060
|
+
EntityTypes: smithy_client_1._json,
|
|
1061
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1062
|
+
Id: smithy_client_1.expectString,
|
|
1063
|
+
Page: smithy_client_1.expectInt32,
|
|
1064
|
+
Query: smithy_client_1._json,
|
|
1065
|
+
Relationships: smithy_client_1._json,
|
|
1066
|
+
RowIndex: smithy_client_1.expectInt32,
|
|
1067
|
+
RowSpan: smithy_client_1.expectInt32,
|
|
1068
|
+
SelectionStatus: smithy_client_1.expectString,
|
|
1069
|
+
Text: smithy_client_1.expectString,
|
|
1070
|
+
TextType: smithy_client_1.expectString,
|
|
1071
|
+
});
|
|
1299
1072
|
};
|
|
1300
1073
|
const de_BlockList = (output, context) => {
|
|
1301
1074
|
const retVal = (output || [])
|
|
1302
1075
|
.filter((e) => e != null)
|
|
1303
1076
|
.map((entry) => {
|
|
1304
|
-
if (entry === null) {
|
|
1305
|
-
return null;
|
|
1306
|
-
}
|
|
1307
1077
|
return de_Block(entry, context);
|
|
1308
1078
|
});
|
|
1309
1079
|
return retVal;
|
|
1310
1080
|
};
|
|
1311
1081
|
const de_BoundingBox = (output, context) => {
|
|
1312
|
-
return {
|
|
1313
|
-
Height:
|
|
1314
|
-
Left:
|
|
1315
|
-
Top:
|
|
1316
|
-
Width:
|
|
1317
|
-
};
|
|
1318
|
-
};
|
|
1319
|
-
const de_DetectDocumentTextResponse = (output, context) => {
|
|
1320
|
-
return {
|
|
1321
|
-
Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
|
|
1322
|
-
DetectDocumentTextModelVersion: (0, smithy_client_1.expectString)(output.DetectDocumentTextModelVersion),
|
|
1323
|
-
DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
|
|
1324
|
-
};
|
|
1325
|
-
};
|
|
1326
|
-
const de_DetectedSignature = (output, context) => {
|
|
1327
|
-
return {
|
|
1328
|
-
Page: (0, smithy_client_1.expectInt32)(output.Page),
|
|
1329
|
-
};
|
|
1330
|
-
};
|
|
1331
|
-
const de_DetectedSignatureList = (output, context) => {
|
|
1332
|
-
const retVal = (output || [])
|
|
1333
|
-
.filter((e) => e != null)
|
|
1334
|
-
.map((entry) => {
|
|
1335
|
-
if (entry === null) {
|
|
1336
|
-
return null;
|
|
1337
|
-
}
|
|
1338
|
-
return de_DetectedSignature(entry, context);
|
|
1339
|
-
});
|
|
1340
|
-
return retVal;
|
|
1341
|
-
};
|
|
1342
|
-
const de_DocumentGroup = (output, context) => {
|
|
1343
|
-
return {
|
|
1344
|
-
DetectedSignatures: output.DetectedSignatures != null ? de_DetectedSignatureList(output.DetectedSignatures, context) : undefined,
|
|
1345
|
-
SplitDocuments: output.SplitDocuments != null ? de_SplitDocumentList(output.SplitDocuments, context) : undefined,
|
|
1346
|
-
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1347
|
-
UndetectedSignatures: output.UndetectedSignatures != null
|
|
1348
|
-
? de_UndetectedSignatureList(output.UndetectedSignatures, context)
|
|
1349
|
-
: undefined,
|
|
1350
|
-
};
|
|
1351
|
-
};
|
|
1352
|
-
const de_DocumentGroupList = (output, context) => {
|
|
1353
|
-
const retVal = (output || [])
|
|
1354
|
-
.filter((e) => e != null)
|
|
1355
|
-
.map((entry) => {
|
|
1356
|
-
if (entry === null) {
|
|
1357
|
-
return null;
|
|
1358
|
-
}
|
|
1359
|
-
return de_DocumentGroup(entry, context);
|
|
1082
|
+
return (0, smithy_client_1.take)(output, {
|
|
1083
|
+
Height: smithy_client_1.limitedParseFloat32,
|
|
1084
|
+
Left: smithy_client_1.limitedParseFloat32,
|
|
1085
|
+
Top: smithy_client_1.limitedParseFloat32,
|
|
1086
|
+
Width: smithy_client_1.limitedParseFloat32,
|
|
1360
1087
|
});
|
|
1361
|
-
return retVal;
|
|
1362
1088
|
};
|
|
1363
|
-
const
|
|
1364
|
-
return {
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
const de_DocumentTooLargeException = (output, context) => {
|
|
1369
|
-
return {
|
|
1370
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1371
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1372
|
-
};
|
|
1373
|
-
};
|
|
1374
|
-
const de_EntityTypes = (output, context) => {
|
|
1375
|
-
const retVal = (output || [])
|
|
1376
|
-
.filter((e) => e != null)
|
|
1377
|
-
.map((entry) => {
|
|
1378
|
-
if (entry === null) {
|
|
1379
|
-
return null;
|
|
1380
|
-
}
|
|
1381
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1089
|
+
const de_DetectDocumentTextResponse = (output, context) => {
|
|
1090
|
+
return (0, smithy_client_1.take)(output, {
|
|
1091
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1092
|
+
DetectDocumentTextModelVersion: smithy_client_1.expectString,
|
|
1093
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1382
1094
|
});
|
|
1383
|
-
return retVal;
|
|
1384
1095
|
};
|
|
1385
1096
|
const de_ExpenseCurrency = (output, context) => {
|
|
1386
|
-
return {
|
|
1387
|
-
Code:
|
|
1388
|
-
Confidence:
|
|
1389
|
-
};
|
|
1097
|
+
return (0, smithy_client_1.take)(output, {
|
|
1098
|
+
Code: smithy_client_1.expectString,
|
|
1099
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1100
|
+
});
|
|
1390
1101
|
};
|
|
1391
1102
|
const de_ExpenseDetection = (output, context) => {
|
|
1392
|
-
return {
|
|
1393
|
-
Confidence:
|
|
1394
|
-
Geometry:
|
|
1395
|
-
Text:
|
|
1396
|
-
};
|
|
1103
|
+
return (0, smithy_client_1.take)(output, {
|
|
1104
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1105
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1106
|
+
Text: smithy_client_1.expectString,
|
|
1107
|
+
});
|
|
1397
1108
|
};
|
|
1398
1109
|
const de_ExpenseDocument = (output, context) => {
|
|
1399
|
-
return {
|
|
1400
|
-
Blocks:
|
|
1401
|
-
ExpenseIndex:
|
|
1402
|
-
LineItemGroups:
|
|
1403
|
-
SummaryFields:
|
|
1404
|
-
};
|
|
1110
|
+
return (0, smithy_client_1.take)(output, {
|
|
1111
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1112
|
+
ExpenseIndex: smithy_client_1.expectInt32,
|
|
1113
|
+
LineItemGroups: (_) => de_LineItemGroupList(_, context),
|
|
1114
|
+
SummaryFields: (_) => de_ExpenseFieldList(_, context),
|
|
1115
|
+
});
|
|
1405
1116
|
};
|
|
1406
1117
|
const de_ExpenseDocumentList = (output, context) => {
|
|
1407
1118
|
const retVal = (output || [])
|
|
1408
1119
|
.filter((e) => e != null)
|
|
1409
1120
|
.map((entry) => {
|
|
1410
|
-
if (entry === null) {
|
|
1411
|
-
return null;
|
|
1412
|
-
}
|
|
1413
1121
|
return de_ExpenseDocument(entry, context);
|
|
1414
1122
|
});
|
|
1415
1123
|
return retVal;
|
|
1416
1124
|
};
|
|
1417
1125
|
const de_ExpenseField = (output, context) => {
|
|
1418
|
-
return {
|
|
1419
|
-
Currency:
|
|
1420
|
-
GroupProperties:
|
|
1421
|
-
LabelDetection:
|
|
1422
|
-
PageNumber:
|
|
1423
|
-
Type:
|
|
1424
|
-
ValueDetection:
|
|
1425
|
-
};
|
|
1126
|
+
return (0, smithy_client_1.take)(output, {
|
|
1127
|
+
Currency: (_) => de_ExpenseCurrency(_, context),
|
|
1128
|
+
GroupProperties: smithy_client_1._json,
|
|
1129
|
+
LabelDetection: (_) => de_ExpenseDetection(_, context),
|
|
1130
|
+
PageNumber: smithy_client_1.expectInt32,
|
|
1131
|
+
Type: (_) => de_ExpenseType(_, context),
|
|
1132
|
+
ValueDetection: (_) => de_ExpenseDetection(_, context),
|
|
1133
|
+
});
|
|
1426
1134
|
};
|
|
1427
1135
|
const de_ExpenseFieldList = (output, context) => {
|
|
1428
1136
|
const retVal = (output || [])
|
|
1429
1137
|
.filter((e) => e != null)
|
|
1430
1138
|
.map((entry) => {
|
|
1431
|
-
if (entry === null) {
|
|
1432
|
-
return null;
|
|
1433
|
-
}
|
|
1434
1139
|
return de_ExpenseField(entry, context);
|
|
1435
1140
|
});
|
|
1436
1141
|
return retVal;
|
|
1437
1142
|
};
|
|
1438
|
-
const de_ExpenseGroupProperty = (output, context) => {
|
|
1439
|
-
return {
|
|
1440
|
-
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1441
|
-
Types: output.Types != null ? de_StringList(output.Types, context) : undefined,
|
|
1442
|
-
};
|
|
1443
|
-
};
|
|
1444
|
-
const de_ExpenseGroupPropertyList = (output, context) => {
|
|
1445
|
-
const retVal = (output || [])
|
|
1446
|
-
.filter((e) => e != null)
|
|
1447
|
-
.map((entry) => {
|
|
1448
|
-
if (entry === null) {
|
|
1449
|
-
return null;
|
|
1450
|
-
}
|
|
1451
|
-
return de_ExpenseGroupProperty(entry, context);
|
|
1452
|
-
});
|
|
1453
|
-
return retVal;
|
|
1454
|
-
};
|
|
1455
1143
|
const de_ExpenseType = (output, context) => {
|
|
1456
|
-
return {
|
|
1457
|
-
Confidence:
|
|
1458
|
-
Text:
|
|
1459
|
-
};
|
|
1144
|
+
return (0, smithy_client_1.take)(output, {
|
|
1145
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1146
|
+
Text: smithy_client_1.expectString,
|
|
1147
|
+
});
|
|
1460
1148
|
};
|
|
1461
1149
|
const de_Extraction = (output, context) => {
|
|
1462
|
-
return {
|
|
1463
|
-
ExpenseDocument:
|
|
1464
|
-
IdentityDocument:
|
|
1465
|
-
LendingDocument:
|
|
1466
|
-
};
|
|
1150
|
+
return (0, smithy_client_1.take)(output, {
|
|
1151
|
+
ExpenseDocument: (_) => de_ExpenseDocument(_, context),
|
|
1152
|
+
IdentityDocument: (_) => de_IdentityDocument(_, context),
|
|
1153
|
+
LendingDocument: (_) => de_LendingDocument(_, context),
|
|
1154
|
+
});
|
|
1467
1155
|
};
|
|
1468
1156
|
const de_ExtractionList = (output, context) => {
|
|
1469
1157
|
const retVal = (output || [])
|
|
1470
1158
|
.filter((e) => e != null)
|
|
1471
1159
|
.map((entry) => {
|
|
1472
|
-
if (entry === null) {
|
|
1473
|
-
return null;
|
|
1474
|
-
}
|
|
1475
1160
|
return de_Extraction(entry, context);
|
|
1476
1161
|
});
|
|
1477
1162
|
return retVal;
|
|
1478
1163
|
};
|
|
1479
1164
|
const de_Geometry = (output, context) => {
|
|
1480
|
-
return {
|
|
1481
|
-
BoundingBox:
|
|
1482
|
-
Polygon:
|
|
1483
|
-
};
|
|
1165
|
+
return (0, smithy_client_1.take)(output, {
|
|
1166
|
+
BoundingBox: (_) => de_BoundingBox(_, context),
|
|
1167
|
+
Polygon: (_) => de_Polygon(_, context),
|
|
1168
|
+
});
|
|
1484
1169
|
};
|
|
1485
1170
|
const de_GetDocumentAnalysisResponse = (output, context) => {
|
|
1486
|
-
return {
|
|
1487
|
-
AnalyzeDocumentModelVersion:
|
|
1488
|
-
Blocks:
|
|
1489
|
-
DocumentMetadata:
|
|
1490
|
-
JobStatus:
|
|
1491
|
-
NextToken:
|
|
1492
|
-
StatusMessage:
|
|
1493
|
-
Warnings:
|
|
1494
|
-
};
|
|
1171
|
+
return (0, smithy_client_1.take)(output, {
|
|
1172
|
+
AnalyzeDocumentModelVersion: smithy_client_1.expectString,
|
|
1173
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1174
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1175
|
+
JobStatus: smithy_client_1.expectString,
|
|
1176
|
+
NextToken: smithy_client_1.expectString,
|
|
1177
|
+
StatusMessage: smithy_client_1.expectString,
|
|
1178
|
+
Warnings: smithy_client_1._json,
|
|
1179
|
+
});
|
|
1495
1180
|
};
|
|
1496
1181
|
const de_GetDocumentTextDetectionResponse = (output, context) => {
|
|
1497
|
-
return {
|
|
1498
|
-
Blocks:
|
|
1499
|
-
DetectDocumentTextModelVersion:
|
|
1500
|
-
DocumentMetadata:
|
|
1501
|
-
JobStatus:
|
|
1502
|
-
NextToken:
|
|
1503
|
-
StatusMessage:
|
|
1504
|
-
Warnings:
|
|
1505
|
-
};
|
|
1182
|
+
return (0, smithy_client_1.take)(output, {
|
|
1183
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1184
|
+
DetectDocumentTextModelVersion: smithy_client_1.expectString,
|
|
1185
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1186
|
+
JobStatus: smithy_client_1.expectString,
|
|
1187
|
+
NextToken: smithy_client_1.expectString,
|
|
1188
|
+
StatusMessage: smithy_client_1.expectString,
|
|
1189
|
+
Warnings: smithy_client_1._json,
|
|
1190
|
+
});
|
|
1506
1191
|
};
|
|
1507
1192
|
const de_GetExpenseAnalysisResponse = (output, context) => {
|
|
1508
|
-
return {
|
|
1509
|
-
AnalyzeExpenseModelVersion:
|
|
1510
|
-
DocumentMetadata:
|
|
1511
|
-
ExpenseDocuments:
|
|
1512
|
-
JobStatus:
|
|
1513
|
-
NextToken:
|
|
1514
|
-
StatusMessage:
|
|
1515
|
-
Warnings:
|
|
1516
|
-
};
|
|
1193
|
+
return (0, smithy_client_1.take)(output, {
|
|
1194
|
+
AnalyzeExpenseModelVersion: smithy_client_1.expectString,
|
|
1195
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1196
|
+
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
1197
|
+
JobStatus: smithy_client_1.expectString,
|
|
1198
|
+
NextToken: smithy_client_1.expectString,
|
|
1199
|
+
StatusMessage: smithy_client_1.expectString,
|
|
1200
|
+
Warnings: smithy_client_1._json,
|
|
1201
|
+
});
|
|
1517
1202
|
};
|
|
1518
1203
|
const de_GetLendingAnalysisResponse = (output, context) => {
|
|
1519
|
-
return {
|
|
1520
|
-
AnalyzeLendingModelVersion:
|
|
1521
|
-
DocumentMetadata:
|
|
1522
|
-
JobStatus:
|
|
1523
|
-
NextToken:
|
|
1524
|
-
Results:
|
|
1525
|
-
StatusMessage:
|
|
1526
|
-
Warnings:
|
|
1527
|
-
};
|
|
1528
|
-
};
|
|
1529
|
-
const de_GetLendingAnalysisSummaryResponse = (output, context) => {
|
|
1530
|
-
return {
|
|
1531
|
-
AnalyzeLendingModelVersion: (0, smithy_client_1.expectString)(output.AnalyzeLendingModelVersion),
|
|
1532
|
-
DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
|
|
1533
|
-
JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
|
|
1534
|
-
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
1535
|
-
Summary: output.Summary != null ? de_LendingSummary(output.Summary, context) : undefined,
|
|
1536
|
-
Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined,
|
|
1537
|
-
};
|
|
1204
|
+
return (0, smithy_client_1.take)(output, {
|
|
1205
|
+
AnalyzeLendingModelVersion: smithy_client_1.expectString,
|
|
1206
|
+
DocumentMetadata: smithy_client_1._json,
|
|
1207
|
+
JobStatus: smithy_client_1.expectString,
|
|
1208
|
+
NextToken: smithy_client_1.expectString,
|
|
1209
|
+
Results: (_) => de_LendingResultList(_, context),
|
|
1210
|
+
StatusMessage: smithy_client_1.expectString,
|
|
1211
|
+
Warnings: smithy_client_1._json,
|
|
1212
|
+
});
|
|
1538
1213
|
};
|
|
1539
1214
|
const de_HumanLoopActivationOutput = (output, context) => {
|
|
1540
|
-
return {
|
|
1541
|
-
HumanLoopActivationConditionsEvaluationResults:
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
HumanLoopActivationReasons: output.HumanLoopActivationReasons != null
|
|
1545
|
-
? de_HumanLoopActivationReasons(output.HumanLoopActivationReasons, context)
|
|
1546
|
-
: undefined,
|
|
1547
|
-
HumanLoopArn: (0, smithy_client_1.expectString)(output.HumanLoopArn),
|
|
1548
|
-
};
|
|
1549
|
-
};
|
|
1550
|
-
const de_HumanLoopActivationReasons = (output, context) => {
|
|
1551
|
-
const retVal = (output || [])
|
|
1552
|
-
.filter((e) => e != null)
|
|
1553
|
-
.map((entry) => {
|
|
1554
|
-
if (entry === null) {
|
|
1555
|
-
return null;
|
|
1556
|
-
}
|
|
1557
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1215
|
+
return (0, smithy_client_1.take)(output, {
|
|
1216
|
+
HumanLoopActivationConditionsEvaluationResults: (_) => new smithy_client_1.LazyJsonString(_),
|
|
1217
|
+
HumanLoopActivationReasons: smithy_client_1._json,
|
|
1218
|
+
HumanLoopArn: smithy_client_1.expectString,
|
|
1558
1219
|
});
|
|
1559
|
-
return retVal;
|
|
1560
|
-
};
|
|
1561
|
-
const de_HumanLoopQuotaExceededException = (output, context) => {
|
|
1562
|
-
return {
|
|
1563
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1564
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1565
|
-
QuotaCode: (0, smithy_client_1.expectString)(output.QuotaCode),
|
|
1566
|
-
ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
|
|
1567
|
-
ServiceCode: (0, smithy_client_1.expectString)(output.ServiceCode),
|
|
1568
|
-
};
|
|
1569
|
-
};
|
|
1570
|
-
const de_IdempotentParameterMismatchException = (output, context) => {
|
|
1571
|
-
return {
|
|
1572
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1573
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1574
|
-
};
|
|
1575
1220
|
};
|
|
1576
1221
|
const de_IdentityDocument = (output, context) => {
|
|
1577
|
-
return {
|
|
1578
|
-
Blocks:
|
|
1579
|
-
DocumentIndex:
|
|
1580
|
-
IdentityDocumentFields:
|
|
1581
|
-
|
|
1582
|
-
: undefined,
|
|
1583
|
-
};
|
|
1222
|
+
return (0, smithy_client_1.take)(output, {
|
|
1223
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1224
|
+
DocumentIndex: smithy_client_1.expectInt32,
|
|
1225
|
+
IdentityDocumentFields: (_) => de_IdentityDocumentFieldList(_, context),
|
|
1226
|
+
});
|
|
1584
1227
|
};
|
|
1585
1228
|
const de_IdentityDocumentField = (output, context) => {
|
|
1586
|
-
return {
|
|
1587
|
-
Type:
|
|
1588
|
-
ValueDetection:
|
|
1589
|
-
};
|
|
1229
|
+
return (0, smithy_client_1.take)(output, {
|
|
1230
|
+
Type: (_) => de_AnalyzeIDDetections(_, context),
|
|
1231
|
+
ValueDetection: (_) => de_AnalyzeIDDetections(_, context),
|
|
1232
|
+
});
|
|
1590
1233
|
};
|
|
1591
1234
|
const de_IdentityDocumentFieldList = (output, context) => {
|
|
1592
1235
|
const retVal = (output || [])
|
|
1593
1236
|
.filter((e) => e != null)
|
|
1594
1237
|
.map((entry) => {
|
|
1595
|
-
if (entry === null) {
|
|
1596
|
-
return null;
|
|
1597
|
-
}
|
|
1598
1238
|
return de_IdentityDocumentField(entry, context);
|
|
1599
1239
|
});
|
|
1600
1240
|
return retVal;
|
|
@@ -1603,147 +1243,77 @@ const de_IdentityDocumentList = (output, context) => {
|
|
|
1603
1243
|
const retVal = (output || [])
|
|
1604
1244
|
.filter((e) => e != null)
|
|
1605
1245
|
.map((entry) => {
|
|
1606
|
-
if (entry === null) {
|
|
1607
|
-
return null;
|
|
1608
|
-
}
|
|
1609
1246
|
return de_IdentityDocument(entry, context);
|
|
1610
1247
|
});
|
|
1611
1248
|
return retVal;
|
|
1612
1249
|
};
|
|
1613
|
-
const de_IdList = (output, context) => {
|
|
1614
|
-
const retVal = (output || [])
|
|
1615
|
-
.filter((e) => e != null)
|
|
1616
|
-
.map((entry) => {
|
|
1617
|
-
if (entry === null) {
|
|
1618
|
-
return null;
|
|
1619
|
-
}
|
|
1620
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1621
|
-
});
|
|
1622
|
-
return retVal;
|
|
1623
|
-
};
|
|
1624
|
-
const de_InternalServerError = (output, context) => {
|
|
1625
|
-
return {
|
|
1626
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1627
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1628
|
-
};
|
|
1629
|
-
};
|
|
1630
|
-
const de_InvalidJobIdException = (output, context) => {
|
|
1631
|
-
return {
|
|
1632
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1633
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1634
|
-
};
|
|
1635
|
-
};
|
|
1636
|
-
const de_InvalidKMSKeyException = (output, context) => {
|
|
1637
|
-
return {
|
|
1638
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1639
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1640
|
-
};
|
|
1641
|
-
};
|
|
1642
|
-
const de_InvalidParameterException = (output, context) => {
|
|
1643
|
-
return {
|
|
1644
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1645
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1646
|
-
};
|
|
1647
|
-
};
|
|
1648
|
-
const de_InvalidS3ObjectException = (output, context) => {
|
|
1649
|
-
return {
|
|
1650
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1651
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1652
|
-
};
|
|
1653
|
-
};
|
|
1654
1250
|
const de_LendingDetection = (output, context) => {
|
|
1655
|
-
return {
|
|
1656
|
-
Confidence:
|
|
1657
|
-
Geometry:
|
|
1658
|
-
SelectionStatus:
|
|
1659
|
-
Text:
|
|
1660
|
-
};
|
|
1251
|
+
return (0, smithy_client_1.take)(output, {
|
|
1252
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1253
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1254
|
+
SelectionStatus: smithy_client_1.expectString,
|
|
1255
|
+
Text: smithy_client_1.expectString,
|
|
1256
|
+
});
|
|
1661
1257
|
};
|
|
1662
1258
|
const de_LendingDetectionList = (output, context) => {
|
|
1663
1259
|
const retVal = (output || [])
|
|
1664
1260
|
.filter((e) => e != null)
|
|
1665
1261
|
.map((entry) => {
|
|
1666
|
-
if (entry === null) {
|
|
1667
|
-
return null;
|
|
1668
|
-
}
|
|
1669
1262
|
return de_LendingDetection(entry, context);
|
|
1670
1263
|
});
|
|
1671
1264
|
return retVal;
|
|
1672
1265
|
};
|
|
1673
1266
|
const de_LendingDocument = (output, context) => {
|
|
1674
|
-
return {
|
|
1675
|
-
LendingFields:
|
|
1676
|
-
SignatureDetections:
|
|
1677
|
-
};
|
|
1267
|
+
return (0, smithy_client_1.take)(output, {
|
|
1268
|
+
LendingFields: (_) => de_LendingFieldList(_, context),
|
|
1269
|
+
SignatureDetections: (_) => de_SignatureDetectionList(_, context),
|
|
1270
|
+
});
|
|
1678
1271
|
};
|
|
1679
1272
|
const de_LendingField = (output, context) => {
|
|
1680
|
-
return {
|
|
1681
|
-
KeyDetection:
|
|
1682
|
-
Type:
|
|
1683
|
-
ValueDetections:
|
|
1684
|
-
};
|
|
1273
|
+
return (0, smithy_client_1.take)(output, {
|
|
1274
|
+
KeyDetection: (_) => de_LendingDetection(_, context),
|
|
1275
|
+
Type: smithy_client_1.expectString,
|
|
1276
|
+
ValueDetections: (_) => de_LendingDetectionList(_, context),
|
|
1277
|
+
});
|
|
1685
1278
|
};
|
|
1686
1279
|
const de_LendingFieldList = (output, context) => {
|
|
1687
1280
|
const retVal = (output || [])
|
|
1688
1281
|
.filter((e) => e != null)
|
|
1689
1282
|
.map((entry) => {
|
|
1690
|
-
if (entry === null) {
|
|
1691
|
-
return null;
|
|
1692
|
-
}
|
|
1693
1283
|
return de_LendingField(entry, context);
|
|
1694
1284
|
});
|
|
1695
1285
|
return retVal;
|
|
1696
1286
|
};
|
|
1697
1287
|
const de_LendingResult = (output, context) => {
|
|
1698
|
-
return {
|
|
1699
|
-
Extractions:
|
|
1700
|
-
Page:
|
|
1701
|
-
PageClassification:
|
|
1702
|
-
};
|
|
1288
|
+
return (0, smithy_client_1.take)(output, {
|
|
1289
|
+
Extractions: (_) => de_ExtractionList(_, context),
|
|
1290
|
+
Page: smithy_client_1.expectInt32,
|
|
1291
|
+
PageClassification: (_) => de_PageClassification(_, context),
|
|
1292
|
+
});
|
|
1703
1293
|
};
|
|
1704
1294
|
const de_LendingResultList = (output, context) => {
|
|
1705
1295
|
const retVal = (output || [])
|
|
1706
1296
|
.filter((e) => e != null)
|
|
1707
1297
|
.map((entry) => {
|
|
1708
|
-
if (entry === null) {
|
|
1709
|
-
return null;
|
|
1710
|
-
}
|
|
1711
1298
|
return de_LendingResult(entry, context);
|
|
1712
1299
|
});
|
|
1713
1300
|
return retVal;
|
|
1714
1301
|
};
|
|
1715
|
-
const de_LendingSummary = (output, context) => {
|
|
1716
|
-
return {
|
|
1717
|
-
DocumentGroups: output.DocumentGroups != null ? de_DocumentGroupList(output.DocumentGroups, context) : undefined,
|
|
1718
|
-
UndetectedDocumentTypes: output.UndetectedDocumentTypes != null
|
|
1719
|
-
? de_UndetectedDocumentTypeList(output.UndetectedDocumentTypes, context)
|
|
1720
|
-
: undefined,
|
|
1721
|
-
};
|
|
1722
|
-
};
|
|
1723
|
-
const de_LimitExceededException = (output, context) => {
|
|
1724
|
-
return {
|
|
1725
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1726
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1727
|
-
};
|
|
1728
|
-
};
|
|
1729
1302
|
const de_LineItemFields = (output, context) => {
|
|
1730
|
-
return {
|
|
1731
|
-
LineItemExpenseFields:
|
|
1732
|
-
};
|
|
1303
|
+
return (0, smithy_client_1.take)(output, {
|
|
1304
|
+
LineItemExpenseFields: (_) => de_ExpenseFieldList(_, context),
|
|
1305
|
+
});
|
|
1733
1306
|
};
|
|
1734
1307
|
const de_LineItemGroup = (output, context) => {
|
|
1735
|
-
return {
|
|
1736
|
-
LineItemGroupIndex:
|
|
1737
|
-
LineItems:
|
|
1738
|
-
};
|
|
1308
|
+
return (0, smithy_client_1.take)(output, {
|
|
1309
|
+
LineItemGroupIndex: smithy_client_1.expectInt32,
|
|
1310
|
+
LineItems: (_) => de_LineItemList(_, context),
|
|
1311
|
+
});
|
|
1739
1312
|
};
|
|
1740
1313
|
const de_LineItemGroupList = (output, context) => {
|
|
1741
1314
|
const retVal = (output || [])
|
|
1742
1315
|
.filter((e) => e != null)
|
|
1743
1316
|
.map((entry) => {
|
|
1744
|
-
if (entry === null) {
|
|
1745
|
-
return null;
|
|
1746
|
-
}
|
|
1747
1317
|
return de_LineItemGroup(entry, context);
|
|
1748
1318
|
});
|
|
1749
1319
|
return retVal;
|
|
@@ -1752,243 +1322,58 @@ const de_LineItemList = (output, context) => {
|
|
|
1752
1322
|
const retVal = (output || [])
|
|
1753
1323
|
.filter((e) => e != null)
|
|
1754
1324
|
.map((entry) => {
|
|
1755
|
-
if (entry === null) {
|
|
1756
|
-
return null;
|
|
1757
|
-
}
|
|
1758
1325
|
return de_LineItemFields(entry, context);
|
|
1759
1326
|
});
|
|
1760
1327
|
return retVal;
|
|
1761
1328
|
};
|
|
1762
|
-
const de_NormalizedValue = (output, context) => {
|
|
1763
|
-
return {
|
|
1764
|
-
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
1765
|
-
ValueType: (0, smithy_client_1.expectString)(output.ValueType),
|
|
1766
|
-
};
|
|
1767
|
-
};
|
|
1768
1329
|
const de_PageClassification = (output, context) => {
|
|
1769
|
-
return {
|
|
1770
|
-
PageNumber:
|
|
1771
|
-
PageType:
|
|
1772
|
-
};
|
|
1773
|
-
};
|
|
1774
|
-
const de_PageList = (output, context) => {
|
|
1775
|
-
const retVal = (output || [])
|
|
1776
|
-
.filter((e) => e != null)
|
|
1777
|
-
.map((entry) => {
|
|
1778
|
-
if (entry === null) {
|
|
1779
|
-
return null;
|
|
1780
|
-
}
|
|
1781
|
-
return (0, smithy_client_1.expectInt32)(entry);
|
|
1782
|
-
});
|
|
1783
|
-
return retVal;
|
|
1784
|
-
};
|
|
1785
|
-
const de_Pages = (output, context) => {
|
|
1786
|
-
const retVal = (output || [])
|
|
1787
|
-
.filter((e) => e != null)
|
|
1788
|
-
.map((entry) => {
|
|
1789
|
-
if (entry === null) {
|
|
1790
|
-
return null;
|
|
1791
|
-
}
|
|
1792
|
-
return (0, smithy_client_1.expectInt32)(entry);
|
|
1330
|
+
return (0, smithy_client_1.take)(output, {
|
|
1331
|
+
PageNumber: (_) => de_PredictionList(_, context),
|
|
1332
|
+
PageType: (_) => de_PredictionList(_, context),
|
|
1793
1333
|
});
|
|
1794
|
-
return retVal;
|
|
1795
1334
|
};
|
|
1796
1335
|
const de_Point = (output, context) => {
|
|
1797
|
-
return {
|
|
1798
|
-
X:
|
|
1799
|
-
Y:
|
|
1800
|
-
};
|
|
1336
|
+
return (0, smithy_client_1.take)(output, {
|
|
1337
|
+
X: smithy_client_1.limitedParseFloat32,
|
|
1338
|
+
Y: smithy_client_1.limitedParseFloat32,
|
|
1339
|
+
});
|
|
1801
1340
|
};
|
|
1802
1341
|
const de_Polygon = (output, context) => {
|
|
1803
1342
|
const retVal = (output || [])
|
|
1804
1343
|
.filter((e) => e != null)
|
|
1805
1344
|
.map((entry) => {
|
|
1806
|
-
if (entry === null) {
|
|
1807
|
-
return null;
|
|
1808
|
-
}
|
|
1809
1345
|
return de_Point(entry, context);
|
|
1810
1346
|
});
|
|
1811
1347
|
return retVal;
|
|
1812
1348
|
};
|
|
1813
1349
|
const de_Prediction = (output, context) => {
|
|
1814
|
-
return {
|
|
1815
|
-
Confidence:
|
|
1816
|
-
Value:
|
|
1817
|
-
};
|
|
1350
|
+
return (0, smithy_client_1.take)(output, {
|
|
1351
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1352
|
+
Value: smithy_client_1.expectString,
|
|
1353
|
+
});
|
|
1818
1354
|
};
|
|
1819
1355
|
const de_PredictionList = (output, context) => {
|
|
1820
1356
|
const retVal = (output || [])
|
|
1821
1357
|
.filter((e) => e != null)
|
|
1822
1358
|
.map((entry) => {
|
|
1823
|
-
if (entry === null) {
|
|
1824
|
-
return null;
|
|
1825
|
-
}
|
|
1826
1359
|
return de_Prediction(entry, context);
|
|
1827
1360
|
});
|
|
1828
1361
|
return retVal;
|
|
1829
1362
|
};
|
|
1830
|
-
const de_ProvisionedThroughputExceededException = (output, context) => {
|
|
1831
|
-
return {
|
|
1832
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1833
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1834
|
-
};
|
|
1835
|
-
};
|
|
1836
|
-
const de_Query = (output, context) => {
|
|
1837
|
-
return {
|
|
1838
|
-
Alias: (0, smithy_client_1.expectString)(output.Alias),
|
|
1839
|
-
Pages: output.Pages != null ? de_QueryPages(output.Pages, context) : undefined,
|
|
1840
|
-
Text: (0, smithy_client_1.expectString)(output.Text),
|
|
1841
|
-
};
|
|
1842
|
-
};
|
|
1843
|
-
const de_QueryPages = (output, context) => {
|
|
1844
|
-
const retVal = (output || [])
|
|
1845
|
-
.filter((e) => e != null)
|
|
1846
|
-
.map((entry) => {
|
|
1847
|
-
if (entry === null) {
|
|
1848
|
-
return null;
|
|
1849
|
-
}
|
|
1850
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1851
|
-
});
|
|
1852
|
-
return retVal;
|
|
1853
|
-
};
|
|
1854
|
-
const de_Relationship = (output, context) => {
|
|
1855
|
-
return {
|
|
1856
|
-
Ids: output.Ids != null ? de_IdList(output.Ids, context) : undefined,
|
|
1857
|
-
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1858
|
-
};
|
|
1859
|
-
};
|
|
1860
|
-
const de_RelationshipList = (output, context) => {
|
|
1861
|
-
const retVal = (output || [])
|
|
1862
|
-
.filter((e) => e != null)
|
|
1863
|
-
.map((entry) => {
|
|
1864
|
-
if (entry === null) {
|
|
1865
|
-
return null;
|
|
1866
|
-
}
|
|
1867
|
-
return de_Relationship(entry, context);
|
|
1868
|
-
});
|
|
1869
|
-
return retVal;
|
|
1870
|
-
};
|
|
1871
1363
|
const de_SignatureDetection = (output, context) => {
|
|
1872
|
-
return {
|
|
1873
|
-
Confidence:
|
|
1874
|
-
Geometry:
|
|
1875
|
-
};
|
|
1364
|
+
return (0, smithy_client_1.take)(output, {
|
|
1365
|
+
Confidence: smithy_client_1.limitedParseFloat32,
|
|
1366
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1367
|
+
});
|
|
1876
1368
|
};
|
|
1877
1369
|
const de_SignatureDetectionList = (output, context) => {
|
|
1878
1370
|
const retVal = (output || [])
|
|
1879
1371
|
.filter((e) => e != null)
|
|
1880
1372
|
.map((entry) => {
|
|
1881
|
-
if (entry === null) {
|
|
1882
|
-
return null;
|
|
1883
|
-
}
|
|
1884
1373
|
return de_SignatureDetection(entry, context);
|
|
1885
1374
|
});
|
|
1886
1375
|
return retVal;
|
|
1887
1376
|
};
|
|
1888
|
-
const de_SplitDocument = (output, context) => {
|
|
1889
|
-
return {
|
|
1890
|
-
Index: (0, smithy_client_1.expectInt32)(output.Index),
|
|
1891
|
-
Pages: output.Pages != null ? de_PageList(output.Pages, context) : undefined,
|
|
1892
|
-
};
|
|
1893
|
-
};
|
|
1894
|
-
const de_SplitDocumentList = (output, context) => {
|
|
1895
|
-
const retVal = (output || [])
|
|
1896
|
-
.filter((e) => e != null)
|
|
1897
|
-
.map((entry) => {
|
|
1898
|
-
if (entry === null) {
|
|
1899
|
-
return null;
|
|
1900
|
-
}
|
|
1901
|
-
return de_SplitDocument(entry, context);
|
|
1902
|
-
});
|
|
1903
|
-
return retVal;
|
|
1904
|
-
};
|
|
1905
|
-
const de_StartDocumentAnalysisResponse = (output, context) => {
|
|
1906
|
-
return {
|
|
1907
|
-
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1908
|
-
};
|
|
1909
|
-
};
|
|
1910
|
-
const de_StartDocumentTextDetectionResponse = (output, context) => {
|
|
1911
|
-
return {
|
|
1912
|
-
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1913
|
-
};
|
|
1914
|
-
};
|
|
1915
|
-
const de_StartExpenseAnalysisResponse = (output, context) => {
|
|
1916
|
-
return {
|
|
1917
|
-
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1918
|
-
};
|
|
1919
|
-
};
|
|
1920
|
-
const de_StartLendingAnalysisResponse = (output, context) => {
|
|
1921
|
-
return {
|
|
1922
|
-
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1923
|
-
};
|
|
1924
|
-
};
|
|
1925
|
-
const de_StringList = (output, context) => {
|
|
1926
|
-
const retVal = (output || [])
|
|
1927
|
-
.filter((e) => e != null)
|
|
1928
|
-
.map((entry) => {
|
|
1929
|
-
if (entry === null) {
|
|
1930
|
-
return null;
|
|
1931
|
-
}
|
|
1932
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1933
|
-
});
|
|
1934
|
-
return retVal;
|
|
1935
|
-
};
|
|
1936
|
-
const de_ThrottlingException = (output, context) => {
|
|
1937
|
-
return {
|
|
1938
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1939
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1940
|
-
};
|
|
1941
|
-
};
|
|
1942
|
-
const de_UndetectedDocumentTypeList = (output, context) => {
|
|
1943
|
-
const retVal = (output || [])
|
|
1944
|
-
.filter((e) => e != null)
|
|
1945
|
-
.map((entry) => {
|
|
1946
|
-
if (entry === null) {
|
|
1947
|
-
return null;
|
|
1948
|
-
}
|
|
1949
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1950
|
-
});
|
|
1951
|
-
return retVal;
|
|
1952
|
-
};
|
|
1953
|
-
const de_UndetectedSignature = (output, context) => {
|
|
1954
|
-
return {
|
|
1955
|
-
Page: (0, smithy_client_1.expectInt32)(output.Page),
|
|
1956
|
-
};
|
|
1957
|
-
};
|
|
1958
|
-
const de_UndetectedSignatureList = (output, context) => {
|
|
1959
|
-
const retVal = (output || [])
|
|
1960
|
-
.filter((e) => e != null)
|
|
1961
|
-
.map((entry) => {
|
|
1962
|
-
if (entry === null) {
|
|
1963
|
-
return null;
|
|
1964
|
-
}
|
|
1965
|
-
return de_UndetectedSignature(entry, context);
|
|
1966
|
-
});
|
|
1967
|
-
return retVal;
|
|
1968
|
-
};
|
|
1969
|
-
const de_UnsupportedDocumentException = (output, context) => {
|
|
1970
|
-
return {
|
|
1971
|
-
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1972
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1973
|
-
};
|
|
1974
|
-
};
|
|
1975
|
-
const de_Warning = (output, context) => {
|
|
1976
|
-
return {
|
|
1977
|
-
ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
|
|
1978
|
-
Pages: output.Pages != null ? de_Pages(output.Pages, context) : undefined,
|
|
1979
|
-
};
|
|
1980
|
-
};
|
|
1981
|
-
const de_Warnings = (output, context) => {
|
|
1982
|
-
const retVal = (output || [])
|
|
1983
|
-
.filter((e) => e != null)
|
|
1984
|
-
.map((entry) => {
|
|
1985
|
-
if (entry === null) {
|
|
1986
|
-
return null;
|
|
1987
|
-
}
|
|
1988
|
-
return de_Warning(entry, context);
|
|
1989
|
-
});
|
|
1990
|
-
return retVal;
|
|
1991
|
-
};
|
|
1992
1377
|
const deserializeMetadata = (output) => ({
|
|
1993
1378
|
httpStatusCode: output.statusCode,
|
|
1994
1379
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -2002,6 +1387,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
2002
1387
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2003
1388
|
};
|
|
2004
1389
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1390
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(TextractServiceException_1.TextractServiceException);
|
|
2005
1391
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
2006
1392
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2007
1393
|
const contents = {
|
|
@@ -2020,6 +1406,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
2020
1406
|
}
|
|
2021
1407
|
return new protocol_http_1.HttpRequest(contents);
|
|
2022
1408
|
};
|
|
1409
|
+
function sharedHeaders(operation) {
|
|
1410
|
+
return {
|
|
1411
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1412
|
+
"x-amz-target": `Textract.${operation}`,
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
2023
1415
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2024
1416
|
if (encoded.length) {
|
|
2025
1417
|
return JSON.parse(encoded);
|