@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
|
@@ -1,122 +1,83 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32,
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { AccessDeniedException, BadDocumentException, DocumentTooLargeException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, InternalServerError, InvalidJobIdException, InvalidKMSKeyException, InvalidParameterException, InvalidS3ObjectException, LimitExceededException, ProvisionedThroughputExceededException, ThrottlingException, UnsupportedDocumentException, } from "../models/models_0";
|
|
4
4
|
import { TextractServiceException as __BaseException } from "../models/TextractServiceException";
|
|
5
5
|
export const se_AnalyzeDocumentCommand = async (input, context) => {
|
|
6
|
-
const headers =
|
|
7
|
-
"content-type": "application/x-amz-json-1.1",
|
|
8
|
-
"x-amz-target": "Textract.AnalyzeDocument",
|
|
9
|
-
};
|
|
6
|
+
const headers = sharedHeaders("AnalyzeDocument");
|
|
10
7
|
let body;
|
|
11
8
|
body = JSON.stringify(se_AnalyzeDocumentRequest(input, context));
|
|
12
9
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
10
|
};
|
|
14
11
|
export const se_AnalyzeExpenseCommand = async (input, context) => {
|
|
15
|
-
const headers =
|
|
16
|
-
"content-type": "application/x-amz-json-1.1",
|
|
17
|
-
"x-amz-target": "Textract.AnalyzeExpense",
|
|
18
|
-
};
|
|
12
|
+
const headers = sharedHeaders("AnalyzeExpense");
|
|
19
13
|
let body;
|
|
20
14
|
body = JSON.stringify(se_AnalyzeExpenseRequest(input, context));
|
|
21
15
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
16
|
};
|
|
23
17
|
export const se_AnalyzeIDCommand = async (input, context) => {
|
|
24
|
-
const headers =
|
|
25
|
-
"content-type": "application/x-amz-json-1.1",
|
|
26
|
-
"x-amz-target": "Textract.AnalyzeID",
|
|
27
|
-
};
|
|
18
|
+
const headers = sharedHeaders("AnalyzeID");
|
|
28
19
|
let body;
|
|
29
20
|
body = JSON.stringify(se_AnalyzeIDRequest(input, context));
|
|
30
21
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
22
|
};
|
|
32
23
|
export const se_DetectDocumentTextCommand = async (input, context) => {
|
|
33
|
-
const headers =
|
|
34
|
-
"content-type": "application/x-amz-json-1.1",
|
|
35
|
-
"x-amz-target": "Textract.DetectDocumentText",
|
|
36
|
-
};
|
|
24
|
+
const headers = sharedHeaders("DetectDocumentText");
|
|
37
25
|
let body;
|
|
38
26
|
body = JSON.stringify(se_DetectDocumentTextRequest(input, context));
|
|
39
27
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
28
|
};
|
|
41
29
|
export const se_GetDocumentAnalysisCommand = async (input, context) => {
|
|
42
|
-
const headers =
|
|
43
|
-
"content-type": "application/x-amz-json-1.1",
|
|
44
|
-
"x-amz-target": "Textract.GetDocumentAnalysis",
|
|
45
|
-
};
|
|
30
|
+
const headers = sharedHeaders("GetDocumentAnalysis");
|
|
46
31
|
let body;
|
|
47
|
-
body = JSON.stringify(
|
|
32
|
+
body = JSON.stringify(_json(input));
|
|
48
33
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
34
|
};
|
|
50
35
|
export const se_GetDocumentTextDetectionCommand = async (input, context) => {
|
|
51
|
-
const headers =
|
|
52
|
-
"content-type": "application/x-amz-json-1.1",
|
|
53
|
-
"x-amz-target": "Textract.GetDocumentTextDetection",
|
|
54
|
-
};
|
|
36
|
+
const headers = sharedHeaders("GetDocumentTextDetection");
|
|
55
37
|
let body;
|
|
56
|
-
body = JSON.stringify(
|
|
38
|
+
body = JSON.stringify(_json(input));
|
|
57
39
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
40
|
};
|
|
59
41
|
export const se_GetExpenseAnalysisCommand = async (input, context) => {
|
|
60
|
-
const headers =
|
|
61
|
-
"content-type": "application/x-amz-json-1.1",
|
|
62
|
-
"x-amz-target": "Textract.GetExpenseAnalysis",
|
|
63
|
-
};
|
|
42
|
+
const headers = sharedHeaders("GetExpenseAnalysis");
|
|
64
43
|
let body;
|
|
65
|
-
body = JSON.stringify(
|
|
44
|
+
body = JSON.stringify(_json(input));
|
|
66
45
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
46
|
};
|
|
68
47
|
export const se_GetLendingAnalysisCommand = async (input, context) => {
|
|
69
|
-
const headers =
|
|
70
|
-
"content-type": "application/x-amz-json-1.1",
|
|
71
|
-
"x-amz-target": "Textract.GetLendingAnalysis",
|
|
72
|
-
};
|
|
48
|
+
const headers = sharedHeaders("GetLendingAnalysis");
|
|
73
49
|
let body;
|
|
74
|
-
body = JSON.stringify(
|
|
50
|
+
body = JSON.stringify(_json(input));
|
|
75
51
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
52
|
};
|
|
77
53
|
export const se_GetLendingAnalysisSummaryCommand = async (input, context) => {
|
|
78
|
-
const headers =
|
|
79
|
-
"content-type": "application/x-amz-json-1.1",
|
|
80
|
-
"x-amz-target": "Textract.GetLendingAnalysisSummary",
|
|
81
|
-
};
|
|
54
|
+
const headers = sharedHeaders("GetLendingAnalysisSummary");
|
|
82
55
|
let body;
|
|
83
|
-
body = JSON.stringify(
|
|
56
|
+
body = JSON.stringify(_json(input));
|
|
84
57
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
58
|
};
|
|
86
59
|
export const se_StartDocumentAnalysisCommand = async (input, context) => {
|
|
87
|
-
const headers =
|
|
88
|
-
"content-type": "application/x-amz-json-1.1",
|
|
89
|
-
"x-amz-target": "Textract.StartDocumentAnalysis",
|
|
90
|
-
};
|
|
60
|
+
const headers = sharedHeaders("StartDocumentAnalysis");
|
|
91
61
|
let body;
|
|
92
|
-
body = JSON.stringify(
|
|
62
|
+
body = JSON.stringify(_json(input));
|
|
93
63
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
64
|
};
|
|
95
65
|
export const se_StartDocumentTextDetectionCommand = async (input, context) => {
|
|
96
|
-
const headers =
|
|
97
|
-
"content-type": "application/x-amz-json-1.1",
|
|
98
|
-
"x-amz-target": "Textract.StartDocumentTextDetection",
|
|
99
|
-
};
|
|
66
|
+
const headers = sharedHeaders("StartDocumentTextDetection");
|
|
100
67
|
let body;
|
|
101
|
-
body = JSON.stringify(
|
|
68
|
+
body = JSON.stringify(_json(input));
|
|
102
69
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
103
70
|
};
|
|
104
71
|
export const se_StartExpenseAnalysisCommand = async (input, context) => {
|
|
105
|
-
const headers =
|
|
106
|
-
"content-type": "application/x-amz-json-1.1",
|
|
107
|
-
"x-amz-target": "Textract.StartExpenseAnalysis",
|
|
108
|
-
};
|
|
72
|
+
const headers = sharedHeaders("StartExpenseAnalysis");
|
|
109
73
|
let body;
|
|
110
|
-
body = JSON.stringify(
|
|
74
|
+
body = JSON.stringify(_json(input));
|
|
111
75
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
76
|
};
|
|
113
77
|
export const se_StartLendingAnalysisCommand = async (input, context) => {
|
|
114
|
-
const headers =
|
|
115
|
-
"content-type": "application/x-amz-json-1.1",
|
|
116
|
-
"x-amz-target": "Textract.StartLendingAnalysis",
|
|
117
|
-
};
|
|
78
|
+
const headers = sharedHeaders("StartLendingAnalysis");
|
|
118
79
|
let body;
|
|
119
|
-
body = JSON.stringify(
|
|
80
|
+
body = JSON.stringify(_json(input));
|
|
120
81
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
121
82
|
};
|
|
122
83
|
export const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
@@ -130,7 +91,7 @@ export const de_AnalyzeDocumentCommand = async (output, context) => {
|
|
|
130
91
|
$metadata: deserializeMetadata(output),
|
|
131
92
|
...contents,
|
|
132
93
|
};
|
|
133
|
-
return
|
|
94
|
+
return response;
|
|
134
95
|
};
|
|
135
96
|
const de_AnalyzeDocumentCommandError = async (output, context) => {
|
|
136
97
|
const parsedOutput = {
|
|
@@ -171,10 +132,9 @@ const de_AnalyzeDocumentCommandError = async (output, context) => {
|
|
|
171
132
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
172
133
|
default:
|
|
173
134
|
const parsedBody = parsedOutput.body;
|
|
174
|
-
throwDefaultError({
|
|
135
|
+
return throwDefaultError({
|
|
175
136
|
output,
|
|
176
137
|
parsedBody,
|
|
177
|
-
exceptionCtor: __BaseException,
|
|
178
138
|
errorCode,
|
|
179
139
|
});
|
|
180
140
|
}
|
|
@@ -190,7 +150,7 @@ export const de_AnalyzeExpenseCommand = async (output, context) => {
|
|
|
190
150
|
$metadata: deserializeMetadata(output),
|
|
191
151
|
...contents,
|
|
192
152
|
};
|
|
193
|
-
return
|
|
153
|
+
return response;
|
|
194
154
|
};
|
|
195
155
|
const de_AnalyzeExpenseCommandError = async (output, context) => {
|
|
196
156
|
const parsedOutput = {
|
|
@@ -228,10 +188,9 @@ const de_AnalyzeExpenseCommandError = async (output, context) => {
|
|
|
228
188
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
229
189
|
default:
|
|
230
190
|
const parsedBody = parsedOutput.body;
|
|
231
|
-
throwDefaultError({
|
|
191
|
+
return throwDefaultError({
|
|
232
192
|
output,
|
|
233
193
|
parsedBody,
|
|
234
|
-
exceptionCtor: __BaseException,
|
|
235
194
|
errorCode,
|
|
236
195
|
});
|
|
237
196
|
}
|
|
@@ -247,7 +206,7 @@ export const de_AnalyzeIDCommand = async (output, context) => {
|
|
|
247
206
|
$metadata: deserializeMetadata(output),
|
|
248
207
|
...contents,
|
|
249
208
|
};
|
|
250
|
-
return
|
|
209
|
+
return response;
|
|
251
210
|
};
|
|
252
211
|
const de_AnalyzeIDCommandError = async (output, context) => {
|
|
253
212
|
const parsedOutput = {
|
|
@@ -285,10 +244,9 @@ const de_AnalyzeIDCommandError = async (output, context) => {
|
|
|
285
244
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
286
245
|
default:
|
|
287
246
|
const parsedBody = parsedOutput.body;
|
|
288
|
-
throwDefaultError({
|
|
247
|
+
return throwDefaultError({
|
|
289
248
|
output,
|
|
290
249
|
parsedBody,
|
|
291
|
-
exceptionCtor: __BaseException,
|
|
292
250
|
errorCode,
|
|
293
251
|
});
|
|
294
252
|
}
|
|
@@ -304,7 +262,7 @@ export const de_DetectDocumentTextCommand = async (output, context) => {
|
|
|
304
262
|
$metadata: deserializeMetadata(output),
|
|
305
263
|
...contents,
|
|
306
264
|
};
|
|
307
|
-
return
|
|
265
|
+
return response;
|
|
308
266
|
};
|
|
309
267
|
const de_DetectDocumentTextCommandError = async (output, context) => {
|
|
310
268
|
const parsedOutput = {
|
|
@@ -342,10 +300,9 @@ const de_DetectDocumentTextCommandError = async (output, context) => {
|
|
|
342
300
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
343
301
|
default:
|
|
344
302
|
const parsedBody = parsedOutput.body;
|
|
345
|
-
throwDefaultError({
|
|
303
|
+
return throwDefaultError({
|
|
346
304
|
output,
|
|
347
305
|
parsedBody,
|
|
348
|
-
exceptionCtor: __BaseException,
|
|
349
306
|
errorCode,
|
|
350
307
|
});
|
|
351
308
|
}
|
|
@@ -361,7 +318,7 @@ export const de_GetDocumentAnalysisCommand = async (output, context) => {
|
|
|
361
318
|
$metadata: deserializeMetadata(output),
|
|
362
319
|
...contents,
|
|
363
320
|
};
|
|
364
|
-
return
|
|
321
|
+
return response;
|
|
365
322
|
};
|
|
366
323
|
const de_GetDocumentAnalysisCommandError = async (output, context) => {
|
|
367
324
|
const parsedOutput = {
|
|
@@ -396,10 +353,9 @@ const de_GetDocumentAnalysisCommandError = async (output, context) => {
|
|
|
396
353
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
397
354
|
default:
|
|
398
355
|
const parsedBody = parsedOutput.body;
|
|
399
|
-
throwDefaultError({
|
|
356
|
+
return throwDefaultError({
|
|
400
357
|
output,
|
|
401
358
|
parsedBody,
|
|
402
|
-
exceptionCtor: __BaseException,
|
|
403
359
|
errorCode,
|
|
404
360
|
});
|
|
405
361
|
}
|
|
@@ -415,7 +371,7 @@ export const de_GetDocumentTextDetectionCommand = async (output, context) => {
|
|
|
415
371
|
$metadata: deserializeMetadata(output),
|
|
416
372
|
...contents,
|
|
417
373
|
};
|
|
418
|
-
return
|
|
374
|
+
return response;
|
|
419
375
|
};
|
|
420
376
|
const de_GetDocumentTextDetectionCommandError = async (output, context) => {
|
|
421
377
|
const parsedOutput = {
|
|
@@ -450,10 +406,9 @@ const de_GetDocumentTextDetectionCommandError = async (output, context) => {
|
|
|
450
406
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
451
407
|
default:
|
|
452
408
|
const parsedBody = parsedOutput.body;
|
|
453
|
-
throwDefaultError({
|
|
409
|
+
return throwDefaultError({
|
|
454
410
|
output,
|
|
455
411
|
parsedBody,
|
|
456
|
-
exceptionCtor: __BaseException,
|
|
457
412
|
errorCode,
|
|
458
413
|
});
|
|
459
414
|
}
|
|
@@ -469,7 +424,7 @@ export const de_GetExpenseAnalysisCommand = async (output, context) => {
|
|
|
469
424
|
$metadata: deserializeMetadata(output),
|
|
470
425
|
...contents,
|
|
471
426
|
};
|
|
472
|
-
return
|
|
427
|
+
return response;
|
|
473
428
|
};
|
|
474
429
|
const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
475
430
|
const parsedOutput = {
|
|
@@ -504,10 +459,9 @@ const de_GetExpenseAnalysisCommandError = async (output, context) => {
|
|
|
504
459
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
505
460
|
default:
|
|
506
461
|
const parsedBody = parsedOutput.body;
|
|
507
|
-
throwDefaultError({
|
|
462
|
+
return throwDefaultError({
|
|
508
463
|
output,
|
|
509
464
|
parsedBody,
|
|
510
|
-
exceptionCtor: __BaseException,
|
|
511
465
|
errorCode,
|
|
512
466
|
});
|
|
513
467
|
}
|
|
@@ -523,7 +477,7 @@ export const de_GetLendingAnalysisCommand = async (output, context) => {
|
|
|
523
477
|
$metadata: deserializeMetadata(output),
|
|
524
478
|
...contents,
|
|
525
479
|
};
|
|
526
|
-
return
|
|
480
|
+
return response;
|
|
527
481
|
};
|
|
528
482
|
const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
529
483
|
const parsedOutput = {
|
|
@@ -558,10 +512,9 @@ const de_GetLendingAnalysisCommandError = async (output, context) => {
|
|
|
558
512
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
559
513
|
default:
|
|
560
514
|
const parsedBody = parsedOutput.body;
|
|
561
|
-
throwDefaultError({
|
|
515
|
+
return throwDefaultError({
|
|
562
516
|
output,
|
|
563
517
|
parsedBody,
|
|
564
|
-
exceptionCtor: __BaseException,
|
|
565
518
|
errorCode,
|
|
566
519
|
});
|
|
567
520
|
}
|
|
@@ -572,12 +525,12 @@ export const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
|
|
|
572
525
|
}
|
|
573
526
|
const data = await parseBody(output.body, context);
|
|
574
527
|
let contents = {};
|
|
575
|
-
contents =
|
|
528
|
+
contents = _json(data);
|
|
576
529
|
const response = {
|
|
577
530
|
$metadata: deserializeMetadata(output),
|
|
578
531
|
...contents,
|
|
579
532
|
};
|
|
580
|
-
return
|
|
533
|
+
return response;
|
|
581
534
|
};
|
|
582
535
|
const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
583
536
|
const parsedOutput = {
|
|
@@ -612,10 +565,9 @@ const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
|
|
|
612
565
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
613
566
|
default:
|
|
614
567
|
const parsedBody = parsedOutput.body;
|
|
615
|
-
throwDefaultError({
|
|
568
|
+
return throwDefaultError({
|
|
616
569
|
output,
|
|
617
570
|
parsedBody,
|
|
618
|
-
exceptionCtor: __BaseException,
|
|
619
571
|
errorCode,
|
|
620
572
|
});
|
|
621
573
|
}
|
|
@@ -626,12 +578,12 @@ export const de_StartDocumentAnalysisCommand = async (output, context) => {
|
|
|
626
578
|
}
|
|
627
579
|
const data = await parseBody(output.body, context);
|
|
628
580
|
let contents = {};
|
|
629
|
-
contents =
|
|
581
|
+
contents = _json(data);
|
|
630
582
|
const response = {
|
|
631
583
|
$metadata: deserializeMetadata(output),
|
|
632
584
|
...contents,
|
|
633
585
|
};
|
|
634
|
-
return
|
|
586
|
+
return response;
|
|
635
587
|
};
|
|
636
588
|
const de_StartDocumentAnalysisCommandError = async (output, context) => {
|
|
637
589
|
const parsedOutput = {
|
|
@@ -678,10 +630,9 @@ const de_StartDocumentAnalysisCommandError = async (output, context) => {
|
|
|
678
630
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
679
631
|
default:
|
|
680
632
|
const parsedBody = parsedOutput.body;
|
|
681
|
-
throwDefaultError({
|
|
633
|
+
return throwDefaultError({
|
|
682
634
|
output,
|
|
683
635
|
parsedBody,
|
|
684
|
-
exceptionCtor: __BaseException,
|
|
685
636
|
errorCode,
|
|
686
637
|
});
|
|
687
638
|
}
|
|
@@ -692,12 +643,12 @@ export const de_StartDocumentTextDetectionCommand = async (output, context) => {
|
|
|
692
643
|
}
|
|
693
644
|
const data = await parseBody(output.body, context);
|
|
694
645
|
let contents = {};
|
|
695
|
-
contents =
|
|
646
|
+
contents = _json(data);
|
|
696
647
|
const response = {
|
|
697
648
|
$metadata: deserializeMetadata(output),
|
|
698
649
|
...contents,
|
|
699
650
|
};
|
|
700
|
-
return
|
|
651
|
+
return response;
|
|
701
652
|
};
|
|
702
653
|
const de_StartDocumentTextDetectionCommandError = async (output, context) => {
|
|
703
654
|
const parsedOutput = {
|
|
@@ -744,10 +695,9 @@ const de_StartDocumentTextDetectionCommandError = async (output, context) => {
|
|
|
744
695
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
745
696
|
default:
|
|
746
697
|
const parsedBody = parsedOutput.body;
|
|
747
|
-
throwDefaultError({
|
|
698
|
+
return throwDefaultError({
|
|
748
699
|
output,
|
|
749
700
|
parsedBody,
|
|
750
|
-
exceptionCtor: __BaseException,
|
|
751
701
|
errorCode,
|
|
752
702
|
});
|
|
753
703
|
}
|
|
@@ -758,12 +708,12 @@ export const de_StartExpenseAnalysisCommand = async (output, context) => {
|
|
|
758
708
|
}
|
|
759
709
|
const data = await parseBody(output.body, context);
|
|
760
710
|
let contents = {};
|
|
761
|
-
contents =
|
|
711
|
+
contents = _json(data);
|
|
762
712
|
const response = {
|
|
763
713
|
$metadata: deserializeMetadata(output),
|
|
764
714
|
...contents,
|
|
765
715
|
};
|
|
766
|
-
return
|
|
716
|
+
return response;
|
|
767
717
|
};
|
|
768
718
|
const de_StartExpenseAnalysisCommandError = async (output, context) => {
|
|
769
719
|
const parsedOutput = {
|
|
@@ -810,10 +760,9 @@ const de_StartExpenseAnalysisCommandError = async (output, context) => {
|
|
|
810
760
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
811
761
|
default:
|
|
812
762
|
const parsedBody = parsedOutput.body;
|
|
813
|
-
throwDefaultError({
|
|
763
|
+
return throwDefaultError({
|
|
814
764
|
output,
|
|
815
765
|
parsedBody,
|
|
816
|
-
exceptionCtor: __BaseException,
|
|
817
766
|
errorCode,
|
|
818
767
|
});
|
|
819
768
|
}
|
|
@@ -824,12 +773,12 @@ export const de_StartLendingAnalysisCommand = async (output, context) => {
|
|
|
824
773
|
}
|
|
825
774
|
const data = await parseBody(output.body, context);
|
|
826
775
|
let contents = {};
|
|
827
|
-
contents =
|
|
776
|
+
contents = _json(data);
|
|
828
777
|
const response = {
|
|
829
778
|
$metadata: deserializeMetadata(output),
|
|
830
779
|
...contents,
|
|
831
780
|
};
|
|
832
|
-
return
|
|
781
|
+
return response;
|
|
833
782
|
};
|
|
834
783
|
const de_StartLendingAnalysisCommandError = async (output, context) => {
|
|
835
784
|
const parsedOutput = {
|
|
@@ -876,17 +825,16 @@ const de_StartLendingAnalysisCommandError = async (output, context) => {
|
|
|
876
825
|
throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
|
|
877
826
|
default:
|
|
878
827
|
const parsedBody = parsedOutput.body;
|
|
879
|
-
throwDefaultError({
|
|
828
|
+
return throwDefaultError({
|
|
880
829
|
output,
|
|
881
830
|
parsedBody,
|
|
882
|
-
exceptionCtor: __BaseException,
|
|
883
831
|
errorCode,
|
|
884
832
|
});
|
|
885
833
|
}
|
|
886
834
|
};
|
|
887
835
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
888
836
|
const body = parsedOutput.body;
|
|
889
|
-
const deserialized =
|
|
837
|
+
const deserialized = _json(body);
|
|
890
838
|
const exception = new AccessDeniedException({
|
|
891
839
|
$metadata: deserializeMetadata(parsedOutput),
|
|
892
840
|
...deserialized,
|
|
@@ -895,7 +843,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
895
843
|
};
|
|
896
844
|
const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
897
845
|
const body = parsedOutput.body;
|
|
898
|
-
const deserialized =
|
|
846
|
+
const deserialized = _json(body);
|
|
899
847
|
const exception = new BadDocumentException({
|
|
900
848
|
$metadata: deserializeMetadata(parsedOutput),
|
|
901
849
|
...deserialized,
|
|
@@ -904,7 +852,7 @@ const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
904
852
|
};
|
|
905
853
|
const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
906
854
|
const body = parsedOutput.body;
|
|
907
|
-
const deserialized =
|
|
855
|
+
const deserialized = _json(body);
|
|
908
856
|
const exception = new DocumentTooLargeException({
|
|
909
857
|
$metadata: deserializeMetadata(parsedOutput),
|
|
910
858
|
...deserialized,
|
|
@@ -913,7 +861,7 @@ const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
|
913
861
|
};
|
|
914
862
|
const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
915
863
|
const body = parsedOutput.body;
|
|
916
|
-
const deserialized =
|
|
864
|
+
const deserialized = _json(body);
|
|
917
865
|
const exception = new HumanLoopQuotaExceededException({
|
|
918
866
|
$metadata: deserializeMetadata(parsedOutput),
|
|
919
867
|
...deserialized,
|
|
@@ -922,7 +870,7 @@ const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
922
870
|
};
|
|
923
871
|
const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
|
|
924
872
|
const body = parsedOutput.body;
|
|
925
|
-
const deserialized =
|
|
873
|
+
const deserialized = _json(body);
|
|
926
874
|
const exception = new IdempotentParameterMismatchException({
|
|
927
875
|
$metadata: deserializeMetadata(parsedOutput),
|
|
928
876
|
...deserialized,
|
|
@@ -931,7 +879,7 @@ const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context)
|
|
|
931
879
|
};
|
|
932
880
|
const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
933
881
|
const body = parsedOutput.body;
|
|
934
|
-
const deserialized =
|
|
882
|
+
const deserialized = _json(body);
|
|
935
883
|
const exception = new InternalServerError({
|
|
936
884
|
$metadata: deserializeMetadata(parsedOutput),
|
|
937
885
|
...deserialized,
|
|
@@ -940,7 +888,7 @@ const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
|
940
888
|
};
|
|
941
889
|
const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
|
|
942
890
|
const body = parsedOutput.body;
|
|
943
|
-
const deserialized =
|
|
891
|
+
const deserialized = _json(body);
|
|
944
892
|
const exception = new InvalidJobIdException({
|
|
945
893
|
$metadata: deserializeMetadata(parsedOutput),
|
|
946
894
|
...deserialized,
|
|
@@ -949,7 +897,7 @@ const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
|
|
|
949
897
|
};
|
|
950
898
|
const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
|
|
951
899
|
const body = parsedOutput.body;
|
|
952
|
-
const deserialized =
|
|
900
|
+
const deserialized = _json(body);
|
|
953
901
|
const exception = new InvalidKMSKeyException({
|
|
954
902
|
$metadata: deserializeMetadata(parsedOutput),
|
|
955
903
|
...deserialized,
|
|
@@ -958,7 +906,7 @@ const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
|
|
|
958
906
|
};
|
|
959
907
|
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
960
908
|
const body = parsedOutput.body;
|
|
961
|
-
const deserialized =
|
|
909
|
+
const deserialized = _json(body);
|
|
962
910
|
const exception = new InvalidParameterException({
|
|
963
911
|
$metadata: deserializeMetadata(parsedOutput),
|
|
964
912
|
...deserialized,
|
|
@@ -967,7 +915,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
|
967
915
|
};
|
|
968
916
|
const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
|
|
969
917
|
const body = parsedOutput.body;
|
|
970
|
-
const deserialized =
|
|
918
|
+
const deserialized = _json(body);
|
|
971
919
|
const exception = new InvalidS3ObjectException({
|
|
972
920
|
$metadata: deserializeMetadata(parsedOutput),
|
|
973
921
|
...deserialized,
|
|
@@ -976,7 +924,7 @@ const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
|
|
|
976
924
|
};
|
|
977
925
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
978
926
|
const body = parsedOutput.body;
|
|
979
|
-
const deserialized =
|
|
927
|
+
const deserialized = _json(body);
|
|
980
928
|
const exception = new LimitExceededException({
|
|
981
929
|
$metadata: deserializeMetadata(parsedOutput),
|
|
982
930
|
...deserialized,
|
|
@@ -985,7 +933,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
985
933
|
};
|
|
986
934
|
const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, context) => {
|
|
987
935
|
const body = parsedOutput.body;
|
|
988
|
-
const deserialized =
|
|
936
|
+
const deserialized = _json(body);
|
|
989
937
|
const exception = new ProvisionedThroughputExceededException({
|
|
990
938
|
$metadata: deserializeMetadata(parsedOutput),
|
|
991
939
|
...deserialized,
|
|
@@ -994,7 +942,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, contex
|
|
|
994
942
|
};
|
|
995
943
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
996
944
|
const body = parsedOutput.body;
|
|
997
|
-
const deserialized =
|
|
945
|
+
const deserialized = _json(body);
|
|
998
946
|
const exception = new ThrottlingException({
|
|
999
947
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1000
948
|
...deserialized,
|
|
@@ -1003,7 +951,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
1003
951
|
};
|
|
1004
952
|
const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
1005
953
|
const body = parsedOutput.body;
|
|
1006
|
-
const deserialized =
|
|
954
|
+
const deserialized = _json(body);
|
|
1007
955
|
const exception = new UnsupportedDocumentException({
|
|
1008
956
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1009
957
|
...deserialized,
|
|
@@ -1011,45 +959,33 @@ const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
|
|
|
1011
959
|
return __decorateServiceException(exception, body);
|
|
1012
960
|
};
|
|
1013
961
|
const se_AnalyzeDocumentRequest = (input, context) => {
|
|
1014
|
-
return {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
};
|
|
962
|
+
return take(input, {
|
|
963
|
+
Document: (_) => se_Document(_, context),
|
|
964
|
+
FeatureTypes: _json,
|
|
965
|
+
HumanLoopConfig: _json,
|
|
966
|
+
QueriesConfig: _json,
|
|
967
|
+
});
|
|
1020
968
|
};
|
|
1021
969
|
const se_AnalyzeExpenseRequest = (input, context) => {
|
|
1022
|
-
return {
|
|
1023
|
-
|
|
1024
|
-
};
|
|
970
|
+
return take(input, {
|
|
971
|
+
Document: (_) => se_Document(_, context),
|
|
972
|
+
});
|
|
1025
973
|
};
|
|
1026
974
|
const se_AnalyzeIDRequest = (input, context) => {
|
|
1027
|
-
return {
|
|
1028
|
-
|
|
1029
|
-
};
|
|
1030
|
-
};
|
|
1031
|
-
const se_ContentClassifiers = (input, context) => {
|
|
1032
|
-
return input
|
|
1033
|
-
.filter((e) => e != null)
|
|
1034
|
-
.map((entry) => {
|
|
1035
|
-
return entry;
|
|
975
|
+
return take(input, {
|
|
976
|
+
DocumentPages: (_) => se_DocumentPages(_, context),
|
|
1036
977
|
});
|
|
1037
978
|
};
|
|
1038
979
|
const se_DetectDocumentTextRequest = (input, context) => {
|
|
1039
|
-
return {
|
|
1040
|
-
|
|
1041
|
-
};
|
|
980
|
+
return take(input, {
|
|
981
|
+
Document: (_) => se_Document(_, context),
|
|
982
|
+
});
|
|
1042
983
|
};
|
|
1043
984
|
const se_Document = (input, context) => {
|
|
1044
|
-
return {
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
};
|
|
1048
|
-
};
|
|
1049
|
-
const se_DocumentLocation = (input, context) => {
|
|
1050
|
-
return {
|
|
1051
|
-
...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }),
|
|
1052
|
-
};
|
|
985
|
+
return take(input, {
|
|
986
|
+
Bytes: context.base64Encoder,
|
|
987
|
+
S3Object: _json,
|
|
988
|
+
});
|
|
1053
989
|
};
|
|
1054
990
|
const se_DocumentPages = (input, context) => {
|
|
1055
991
|
return input
|
|
@@ -1058,514 +994,218 @@ const se_DocumentPages = (input, context) => {
|
|
|
1058
994
|
return se_Document(entry, context);
|
|
1059
995
|
});
|
|
1060
996
|
};
|
|
1061
|
-
const se_FeatureTypes = (input, context) => {
|
|
1062
|
-
return input
|
|
1063
|
-
.filter((e) => e != null)
|
|
1064
|
-
.map((entry) => {
|
|
1065
|
-
return entry;
|
|
1066
|
-
});
|
|
1067
|
-
};
|
|
1068
|
-
const se_GetDocumentAnalysisRequest = (input, context) => {
|
|
1069
|
-
return {
|
|
1070
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1071
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1072
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1073
|
-
};
|
|
1074
|
-
};
|
|
1075
|
-
const se_GetDocumentTextDetectionRequest = (input, context) => {
|
|
1076
|
-
return {
|
|
1077
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1078
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1079
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1080
|
-
};
|
|
1081
|
-
};
|
|
1082
|
-
const se_GetExpenseAnalysisRequest = (input, context) => {
|
|
1083
|
-
return {
|
|
1084
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1085
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1086
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1087
|
-
};
|
|
1088
|
-
};
|
|
1089
|
-
const se_GetLendingAnalysisRequest = (input, context) => {
|
|
1090
|
-
return {
|
|
1091
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1092
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1093
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1094
|
-
};
|
|
1095
|
-
};
|
|
1096
|
-
const se_GetLendingAnalysisSummaryRequest = (input, context) => {
|
|
1097
|
-
return {
|
|
1098
|
-
...(input.JobId != null && { JobId: input.JobId }),
|
|
1099
|
-
};
|
|
1100
|
-
};
|
|
1101
|
-
const se_HumanLoopConfig = (input, context) => {
|
|
1102
|
-
return {
|
|
1103
|
-
...(input.DataAttributes != null && { DataAttributes: se_HumanLoopDataAttributes(input.DataAttributes, context) }),
|
|
1104
|
-
...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }),
|
|
1105
|
-
...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }),
|
|
1106
|
-
};
|
|
1107
|
-
};
|
|
1108
|
-
const se_HumanLoopDataAttributes = (input, context) => {
|
|
1109
|
-
return {
|
|
1110
|
-
...(input.ContentClassifiers != null && {
|
|
1111
|
-
ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context),
|
|
1112
|
-
}),
|
|
1113
|
-
};
|
|
1114
|
-
};
|
|
1115
|
-
const se_NotificationChannel = (input, context) => {
|
|
1116
|
-
return {
|
|
1117
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
1118
|
-
...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }),
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1121
|
-
const se_OutputConfig = (input, context) => {
|
|
1122
|
-
return {
|
|
1123
|
-
...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
|
|
1124
|
-
...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }),
|
|
1125
|
-
};
|
|
1126
|
-
};
|
|
1127
|
-
const se_Queries = (input, context) => {
|
|
1128
|
-
return input
|
|
1129
|
-
.filter((e) => e != null)
|
|
1130
|
-
.map((entry) => {
|
|
1131
|
-
return se_Query(entry, context);
|
|
1132
|
-
});
|
|
1133
|
-
};
|
|
1134
|
-
const se_QueriesConfig = (input, context) => {
|
|
1135
|
-
return {
|
|
1136
|
-
...(input.Queries != null && { Queries: se_Queries(input.Queries, context) }),
|
|
1137
|
-
};
|
|
1138
|
-
};
|
|
1139
|
-
const se_Query = (input, context) => {
|
|
1140
|
-
return {
|
|
1141
|
-
...(input.Alias != null && { Alias: input.Alias }),
|
|
1142
|
-
...(input.Pages != null && { Pages: se_QueryPages(input.Pages, context) }),
|
|
1143
|
-
...(input.Text != null && { Text: input.Text }),
|
|
1144
|
-
};
|
|
1145
|
-
};
|
|
1146
|
-
const se_QueryPages = (input, context) => {
|
|
1147
|
-
return input
|
|
1148
|
-
.filter((e) => e != null)
|
|
1149
|
-
.map((entry) => {
|
|
1150
|
-
return entry;
|
|
1151
|
-
});
|
|
1152
|
-
};
|
|
1153
|
-
const se_S3Object = (input, context) => {
|
|
1154
|
-
return {
|
|
1155
|
-
...(input.Bucket != null && { Bucket: input.Bucket }),
|
|
1156
|
-
...(input.Name != null && { Name: input.Name }),
|
|
1157
|
-
...(input.Version != null && { Version: input.Version }),
|
|
1158
|
-
};
|
|
1159
|
-
};
|
|
1160
|
-
const se_StartDocumentAnalysisRequest = (input, context) => {
|
|
1161
|
-
return {
|
|
1162
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1163
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1164
|
-
...(input.FeatureTypes != null && { FeatureTypes: se_FeatureTypes(input.FeatureTypes, context) }),
|
|
1165
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1166
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1167
|
-
...(input.NotificationChannel != null && {
|
|
1168
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1169
|
-
}),
|
|
1170
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1171
|
-
...(input.QueriesConfig != null && { QueriesConfig: se_QueriesConfig(input.QueriesConfig, context) }),
|
|
1172
|
-
};
|
|
1173
|
-
};
|
|
1174
|
-
const se_StartDocumentTextDetectionRequest = (input, context) => {
|
|
1175
|
-
return {
|
|
1176
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1177
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1178
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1179
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1180
|
-
...(input.NotificationChannel != null && {
|
|
1181
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1182
|
-
}),
|
|
1183
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1184
|
-
};
|
|
1185
|
-
};
|
|
1186
|
-
const se_StartExpenseAnalysisRequest = (input, context) => {
|
|
1187
|
-
return {
|
|
1188
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1189
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1190
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1191
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1192
|
-
...(input.NotificationChannel != null && {
|
|
1193
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1194
|
-
}),
|
|
1195
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1196
|
-
};
|
|
1197
|
-
};
|
|
1198
|
-
const se_StartLendingAnalysisRequest = (input, context) => {
|
|
1199
|
-
return {
|
|
1200
|
-
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
1201
|
-
...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
|
|
1202
|
-
...(input.JobTag != null && { JobTag: input.JobTag }),
|
|
1203
|
-
...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
|
|
1204
|
-
...(input.NotificationChannel != null && {
|
|
1205
|
-
NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
|
|
1206
|
-
}),
|
|
1207
|
-
...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
|
|
1208
|
-
};
|
|
1209
|
-
};
|
|
1210
|
-
const de_AccessDeniedException = (output, context) => {
|
|
1211
|
-
return {
|
|
1212
|
-
Code: __expectString(output.Code),
|
|
1213
|
-
Message: __expectString(output.Message),
|
|
1214
|
-
};
|
|
1215
|
-
};
|
|
1216
997
|
const de_AnalyzeDocumentResponse = (output, context) => {
|
|
1217
|
-
return {
|
|
1218
|
-
AnalyzeDocumentModelVersion: __expectString
|
|
1219
|
-
Blocks:
|
|
1220
|
-
DocumentMetadata:
|
|
1221
|
-
HumanLoopActivationOutput:
|
|
1222
|
-
|
|
1223
|
-
: undefined,
|
|
1224
|
-
};
|
|
998
|
+
return take(output, {
|
|
999
|
+
AnalyzeDocumentModelVersion: __expectString,
|
|
1000
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1001
|
+
DocumentMetadata: _json,
|
|
1002
|
+
HumanLoopActivationOutput: (_) => de_HumanLoopActivationOutput(_, context),
|
|
1003
|
+
});
|
|
1225
1004
|
};
|
|
1226
1005
|
const de_AnalyzeExpenseResponse = (output, context) => {
|
|
1227
|
-
return {
|
|
1228
|
-
DocumentMetadata:
|
|
1229
|
-
ExpenseDocuments:
|
|
1230
|
-
};
|
|
1006
|
+
return take(output, {
|
|
1007
|
+
DocumentMetadata: _json,
|
|
1008
|
+
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
1009
|
+
});
|
|
1231
1010
|
};
|
|
1232
1011
|
const de_AnalyzeIDDetections = (output, context) => {
|
|
1233
|
-
return {
|
|
1234
|
-
Confidence: __limitedParseFloat32
|
|
1235
|
-
NormalizedValue:
|
|
1236
|
-
Text: __expectString
|
|
1237
|
-
};
|
|
1012
|
+
return take(output, {
|
|
1013
|
+
Confidence: __limitedParseFloat32,
|
|
1014
|
+
NormalizedValue: _json,
|
|
1015
|
+
Text: __expectString,
|
|
1016
|
+
});
|
|
1238
1017
|
};
|
|
1239
1018
|
const de_AnalyzeIDResponse = (output, context) => {
|
|
1240
|
-
return {
|
|
1241
|
-
AnalyzeIDModelVersion: __expectString
|
|
1242
|
-
DocumentMetadata:
|
|
1243
|
-
IdentityDocuments:
|
|
1244
|
-
};
|
|
1245
|
-
};
|
|
1246
|
-
const de_BadDocumentException = (output, context) => {
|
|
1247
|
-
return {
|
|
1248
|
-
Code: __expectString(output.Code),
|
|
1249
|
-
Message: __expectString(output.Message),
|
|
1250
|
-
};
|
|
1019
|
+
return take(output, {
|
|
1020
|
+
AnalyzeIDModelVersion: __expectString,
|
|
1021
|
+
DocumentMetadata: _json,
|
|
1022
|
+
IdentityDocuments: (_) => de_IdentityDocumentList(_, context),
|
|
1023
|
+
});
|
|
1251
1024
|
};
|
|
1252
1025
|
const de_Block = (output, context) => {
|
|
1253
|
-
return {
|
|
1254
|
-
BlockType: __expectString
|
|
1255
|
-
ColumnIndex: __expectInt32
|
|
1256
|
-
ColumnSpan: __expectInt32
|
|
1257
|
-
Confidence: __limitedParseFloat32
|
|
1258
|
-
EntityTypes:
|
|
1259
|
-
Geometry:
|
|
1260
|
-
Id: __expectString
|
|
1261
|
-
Page: __expectInt32
|
|
1262
|
-
Query:
|
|
1263
|
-
Relationships:
|
|
1264
|
-
RowIndex: __expectInt32
|
|
1265
|
-
RowSpan: __expectInt32
|
|
1266
|
-
SelectionStatus: __expectString
|
|
1267
|
-
Text: __expectString
|
|
1268
|
-
TextType: __expectString
|
|
1269
|
-
};
|
|
1026
|
+
return take(output, {
|
|
1027
|
+
BlockType: __expectString,
|
|
1028
|
+
ColumnIndex: __expectInt32,
|
|
1029
|
+
ColumnSpan: __expectInt32,
|
|
1030
|
+
Confidence: __limitedParseFloat32,
|
|
1031
|
+
EntityTypes: _json,
|
|
1032
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1033
|
+
Id: __expectString,
|
|
1034
|
+
Page: __expectInt32,
|
|
1035
|
+
Query: _json,
|
|
1036
|
+
Relationships: _json,
|
|
1037
|
+
RowIndex: __expectInt32,
|
|
1038
|
+
RowSpan: __expectInt32,
|
|
1039
|
+
SelectionStatus: __expectString,
|
|
1040
|
+
Text: __expectString,
|
|
1041
|
+
TextType: __expectString,
|
|
1042
|
+
});
|
|
1270
1043
|
};
|
|
1271
1044
|
const de_BlockList = (output, context) => {
|
|
1272
1045
|
const retVal = (output || [])
|
|
1273
1046
|
.filter((e) => e != null)
|
|
1274
1047
|
.map((entry) => {
|
|
1275
|
-
if (entry === null) {
|
|
1276
|
-
return null;
|
|
1277
|
-
}
|
|
1278
1048
|
return de_Block(entry, context);
|
|
1279
1049
|
});
|
|
1280
1050
|
return retVal;
|
|
1281
1051
|
};
|
|
1282
1052
|
const de_BoundingBox = (output, context) => {
|
|
1283
|
-
return {
|
|
1284
|
-
Height: __limitedParseFloat32
|
|
1285
|
-
Left: __limitedParseFloat32
|
|
1286
|
-
Top: __limitedParseFloat32
|
|
1287
|
-
Width: __limitedParseFloat32
|
|
1288
|
-
};
|
|
1289
|
-
};
|
|
1290
|
-
const de_DetectDocumentTextResponse = (output, context) => {
|
|
1291
|
-
return {
|
|
1292
|
-
Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
|
|
1293
|
-
DetectDocumentTextModelVersion: __expectString(output.DetectDocumentTextModelVersion),
|
|
1294
|
-
DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
|
|
1295
|
-
};
|
|
1296
|
-
};
|
|
1297
|
-
const de_DetectedSignature = (output, context) => {
|
|
1298
|
-
return {
|
|
1299
|
-
Page: __expectInt32(output.Page),
|
|
1300
|
-
};
|
|
1301
|
-
};
|
|
1302
|
-
const de_DetectedSignatureList = (output, context) => {
|
|
1303
|
-
const retVal = (output || [])
|
|
1304
|
-
.filter((e) => e != null)
|
|
1305
|
-
.map((entry) => {
|
|
1306
|
-
if (entry === null) {
|
|
1307
|
-
return null;
|
|
1308
|
-
}
|
|
1309
|
-
return de_DetectedSignature(entry, context);
|
|
1310
|
-
});
|
|
1311
|
-
return retVal;
|
|
1312
|
-
};
|
|
1313
|
-
const de_DocumentGroup = (output, context) => {
|
|
1314
|
-
return {
|
|
1315
|
-
DetectedSignatures: output.DetectedSignatures != null ? de_DetectedSignatureList(output.DetectedSignatures, context) : undefined,
|
|
1316
|
-
SplitDocuments: output.SplitDocuments != null ? de_SplitDocumentList(output.SplitDocuments, context) : undefined,
|
|
1317
|
-
Type: __expectString(output.Type),
|
|
1318
|
-
UndetectedSignatures: output.UndetectedSignatures != null
|
|
1319
|
-
? de_UndetectedSignatureList(output.UndetectedSignatures, context)
|
|
1320
|
-
: undefined,
|
|
1321
|
-
};
|
|
1322
|
-
};
|
|
1323
|
-
const de_DocumentGroupList = (output, context) => {
|
|
1324
|
-
const retVal = (output || [])
|
|
1325
|
-
.filter((e) => e != null)
|
|
1326
|
-
.map((entry) => {
|
|
1327
|
-
if (entry === null) {
|
|
1328
|
-
return null;
|
|
1329
|
-
}
|
|
1330
|
-
return de_DocumentGroup(entry, context);
|
|
1053
|
+
return take(output, {
|
|
1054
|
+
Height: __limitedParseFloat32,
|
|
1055
|
+
Left: __limitedParseFloat32,
|
|
1056
|
+
Top: __limitedParseFloat32,
|
|
1057
|
+
Width: __limitedParseFloat32,
|
|
1331
1058
|
});
|
|
1332
|
-
return retVal;
|
|
1333
1059
|
};
|
|
1334
|
-
const
|
|
1335
|
-
return {
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
const de_DocumentTooLargeException = (output, context) => {
|
|
1340
|
-
return {
|
|
1341
|
-
Code: __expectString(output.Code),
|
|
1342
|
-
Message: __expectString(output.Message),
|
|
1343
|
-
};
|
|
1344
|
-
};
|
|
1345
|
-
const de_EntityTypes = (output, context) => {
|
|
1346
|
-
const retVal = (output || [])
|
|
1347
|
-
.filter((e) => e != null)
|
|
1348
|
-
.map((entry) => {
|
|
1349
|
-
if (entry === null) {
|
|
1350
|
-
return null;
|
|
1351
|
-
}
|
|
1352
|
-
return __expectString(entry);
|
|
1060
|
+
const de_DetectDocumentTextResponse = (output, context) => {
|
|
1061
|
+
return take(output, {
|
|
1062
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1063
|
+
DetectDocumentTextModelVersion: __expectString,
|
|
1064
|
+
DocumentMetadata: _json,
|
|
1353
1065
|
});
|
|
1354
|
-
return retVal;
|
|
1355
1066
|
};
|
|
1356
1067
|
const de_ExpenseCurrency = (output, context) => {
|
|
1357
|
-
return {
|
|
1358
|
-
Code: __expectString
|
|
1359
|
-
Confidence: __limitedParseFloat32
|
|
1360
|
-
};
|
|
1068
|
+
return take(output, {
|
|
1069
|
+
Code: __expectString,
|
|
1070
|
+
Confidence: __limitedParseFloat32,
|
|
1071
|
+
});
|
|
1361
1072
|
};
|
|
1362
1073
|
const de_ExpenseDetection = (output, context) => {
|
|
1363
|
-
return {
|
|
1364
|
-
Confidence: __limitedParseFloat32
|
|
1365
|
-
Geometry:
|
|
1366
|
-
Text: __expectString
|
|
1367
|
-
};
|
|
1074
|
+
return take(output, {
|
|
1075
|
+
Confidence: __limitedParseFloat32,
|
|
1076
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1077
|
+
Text: __expectString,
|
|
1078
|
+
});
|
|
1368
1079
|
};
|
|
1369
1080
|
const de_ExpenseDocument = (output, context) => {
|
|
1370
|
-
return {
|
|
1371
|
-
Blocks:
|
|
1372
|
-
ExpenseIndex: __expectInt32
|
|
1373
|
-
LineItemGroups:
|
|
1374
|
-
SummaryFields:
|
|
1375
|
-
};
|
|
1081
|
+
return take(output, {
|
|
1082
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1083
|
+
ExpenseIndex: __expectInt32,
|
|
1084
|
+
LineItemGroups: (_) => de_LineItemGroupList(_, context),
|
|
1085
|
+
SummaryFields: (_) => de_ExpenseFieldList(_, context),
|
|
1086
|
+
});
|
|
1376
1087
|
};
|
|
1377
1088
|
const de_ExpenseDocumentList = (output, context) => {
|
|
1378
1089
|
const retVal = (output || [])
|
|
1379
1090
|
.filter((e) => e != null)
|
|
1380
1091
|
.map((entry) => {
|
|
1381
|
-
if (entry === null) {
|
|
1382
|
-
return null;
|
|
1383
|
-
}
|
|
1384
1092
|
return de_ExpenseDocument(entry, context);
|
|
1385
1093
|
});
|
|
1386
1094
|
return retVal;
|
|
1387
1095
|
};
|
|
1388
1096
|
const de_ExpenseField = (output, context) => {
|
|
1389
|
-
return {
|
|
1390
|
-
Currency:
|
|
1391
|
-
GroupProperties:
|
|
1392
|
-
LabelDetection:
|
|
1393
|
-
PageNumber: __expectInt32
|
|
1394
|
-
Type:
|
|
1395
|
-
ValueDetection:
|
|
1396
|
-
};
|
|
1097
|
+
return take(output, {
|
|
1098
|
+
Currency: (_) => de_ExpenseCurrency(_, context),
|
|
1099
|
+
GroupProperties: _json,
|
|
1100
|
+
LabelDetection: (_) => de_ExpenseDetection(_, context),
|
|
1101
|
+
PageNumber: __expectInt32,
|
|
1102
|
+
Type: (_) => de_ExpenseType(_, context),
|
|
1103
|
+
ValueDetection: (_) => de_ExpenseDetection(_, context),
|
|
1104
|
+
});
|
|
1397
1105
|
};
|
|
1398
1106
|
const de_ExpenseFieldList = (output, context) => {
|
|
1399
1107
|
const retVal = (output || [])
|
|
1400
1108
|
.filter((e) => e != null)
|
|
1401
1109
|
.map((entry) => {
|
|
1402
|
-
if (entry === null) {
|
|
1403
|
-
return null;
|
|
1404
|
-
}
|
|
1405
1110
|
return de_ExpenseField(entry, context);
|
|
1406
1111
|
});
|
|
1407
1112
|
return retVal;
|
|
1408
1113
|
};
|
|
1409
|
-
const de_ExpenseGroupProperty = (output, context) => {
|
|
1410
|
-
return {
|
|
1411
|
-
Id: __expectString(output.Id),
|
|
1412
|
-
Types: output.Types != null ? de_StringList(output.Types, context) : undefined,
|
|
1413
|
-
};
|
|
1414
|
-
};
|
|
1415
|
-
const de_ExpenseGroupPropertyList = (output, context) => {
|
|
1416
|
-
const retVal = (output || [])
|
|
1417
|
-
.filter((e) => e != null)
|
|
1418
|
-
.map((entry) => {
|
|
1419
|
-
if (entry === null) {
|
|
1420
|
-
return null;
|
|
1421
|
-
}
|
|
1422
|
-
return de_ExpenseGroupProperty(entry, context);
|
|
1423
|
-
});
|
|
1424
|
-
return retVal;
|
|
1425
|
-
};
|
|
1426
1114
|
const de_ExpenseType = (output, context) => {
|
|
1427
|
-
return {
|
|
1428
|
-
Confidence: __limitedParseFloat32
|
|
1429
|
-
Text: __expectString
|
|
1430
|
-
};
|
|
1115
|
+
return take(output, {
|
|
1116
|
+
Confidence: __limitedParseFloat32,
|
|
1117
|
+
Text: __expectString,
|
|
1118
|
+
});
|
|
1431
1119
|
};
|
|
1432
1120
|
const de_Extraction = (output, context) => {
|
|
1433
|
-
return {
|
|
1434
|
-
ExpenseDocument:
|
|
1435
|
-
IdentityDocument:
|
|
1436
|
-
LendingDocument:
|
|
1437
|
-
};
|
|
1121
|
+
return take(output, {
|
|
1122
|
+
ExpenseDocument: (_) => de_ExpenseDocument(_, context),
|
|
1123
|
+
IdentityDocument: (_) => de_IdentityDocument(_, context),
|
|
1124
|
+
LendingDocument: (_) => de_LendingDocument(_, context),
|
|
1125
|
+
});
|
|
1438
1126
|
};
|
|
1439
1127
|
const de_ExtractionList = (output, context) => {
|
|
1440
1128
|
const retVal = (output || [])
|
|
1441
1129
|
.filter((e) => e != null)
|
|
1442
1130
|
.map((entry) => {
|
|
1443
|
-
if (entry === null) {
|
|
1444
|
-
return null;
|
|
1445
|
-
}
|
|
1446
1131
|
return de_Extraction(entry, context);
|
|
1447
1132
|
});
|
|
1448
1133
|
return retVal;
|
|
1449
1134
|
};
|
|
1450
1135
|
const de_Geometry = (output, context) => {
|
|
1451
|
-
return {
|
|
1452
|
-
BoundingBox:
|
|
1453
|
-
Polygon:
|
|
1454
|
-
};
|
|
1136
|
+
return take(output, {
|
|
1137
|
+
BoundingBox: (_) => de_BoundingBox(_, context),
|
|
1138
|
+
Polygon: (_) => de_Polygon(_, context),
|
|
1139
|
+
});
|
|
1455
1140
|
};
|
|
1456
1141
|
const de_GetDocumentAnalysisResponse = (output, context) => {
|
|
1457
|
-
return {
|
|
1458
|
-
AnalyzeDocumentModelVersion: __expectString
|
|
1459
|
-
Blocks:
|
|
1460
|
-
DocumentMetadata:
|
|
1461
|
-
JobStatus: __expectString
|
|
1462
|
-
NextToken: __expectString
|
|
1463
|
-
StatusMessage: __expectString
|
|
1464
|
-
Warnings:
|
|
1465
|
-
};
|
|
1142
|
+
return take(output, {
|
|
1143
|
+
AnalyzeDocumentModelVersion: __expectString,
|
|
1144
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1145
|
+
DocumentMetadata: _json,
|
|
1146
|
+
JobStatus: __expectString,
|
|
1147
|
+
NextToken: __expectString,
|
|
1148
|
+
StatusMessage: __expectString,
|
|
1149
|
+
Warnings: _json,
|
|
1150
|
+
});
|
|
1466
1151
|
};
|
|
1467
1152
|
const de_GetDocumentTextDetectionResponse = (output, context) => {
|
|
1468
|
-
return {
|
|
1469
|
-
Blocks:
|
|
1470
|
-
DetectDocumentTextModelVersion: __expectString
|
|
1471
|
-
DocumentMetadata:
|
|
1472
|
-
JobStatus: __expectString
|
|
1473
|
-
NextToken: __expectString
|
|
1474
|
-
StatusMessage: __expectString
|
|
1475
|
-
Warnings:
|
|
1476
|
-
};
|
|
1153
|
+
return take(output, {
|
|
1154
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1155
|
+
DetectDocumentTextModelVersion: __expectString,
|
|
1156
|
+
DocumentMetadata: _json,
|
|
1157
|
+
JobStatus: __expectString,
|
|
1158
|
+
NextToken: __expectString,
|
|
1159
|
+
StatusMessage: __expectString,
|
|
1160
|
+
Warnings: _json,
|
|
1161
|
+
});
|
|
1477
1162
|
};
|
|
1478
1163
|
const de_GetExpenseAnalysisResponse = (output, context) => {
|
|
1479
|
-
return {
|
|
1480
|
-
AnalyzeExpenseModelVersion: __expectString
|
|
1481
|
-
DocumentMetadata:
|
|
1482
|
-
ExpenseDocuments:
|
|
1483
|
-
JobStatus: __expectString
|
|
1484
|
-
NextToken: __expectString
|
|
1485
|
-
StatusMessage: __expectString
|
|
1486
|
-
Warnings:
|
|
1487
|
-
};
|
|
1164
|
+
return take(output, {
|
|
1165
|
+
AnalyzeExpenseModelVersion: __expectString,
|
|
1166
|
+
DocumentMetadata: _json,
|
|
1167
|
+
ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
|
|
1168
|
+
JobStatus: __expectString,
|
|
1169
|
+
NextToken: __expectString,
|
|
1170
|
+
StatusMessage: __expectString,
|
|
1171
|
+
Warnings: _json,
|
|
1172
|
+
});
|
|
1488
1173
|
};
|
|
1489
1174
|
const de_GetLendingAnalysisResponse = (output, context) => {
|
|
1490
|
-
return {
|
|
1491
|
-
AnalyzeLendingModelVersion: __expectString
|
|
1492
|
-
DocumentMetadata:
|
|
1493
|
-
JobStatus: __expectString
|
|
1494
|
-
NextToken: __expectString
|
|
1495
|
-
Results:
|
|
1496
|
-
StatusMessage: __expectString
|
|
1497
|
-
Warnings:
|
|
1498
|
-
};
|
|
1499
|
-
};
|
|
1500
|
-
const de_GetLendingAnalysisSummaryResponse = (output, context) => {
|
|
1501
|
-
return {
|
|
1502
|
-
AnalyzeLendingModelVersion: __expectString(output.AnalyzeLendingModelVersion),
|
|
1503
|
-
DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
|
|
1504
|
-
JobStatus: __expectString(output.JobStatus),
|
|
1505
|
-
StatusMessage: __expectString(output.StatusMessage),
|
|
1506
|
-
Summary: output.Summary != null ? de_LendingSummary(output.Summary, context) : undefined,
|
|
1507
|
-
Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined,
|
|
1508
|
-
};
|
|
1175
|
+
return take(output, {
|
|
1176
|
+
AnalyzeLendingModelVersion: __expectString,
|
|
1177
|
+
DocumentMetadata: _json,
|
|
1178
|
+
JobStatus: __expectString,
|
|
1179
|
+
NextToken: __expectString,
|
|
1180
|
+
Results: (_) => de_LendingResultList(_, context),
|
|
1181
|
+
StatusMessage: __expectString,
|
|
1182
|
+
Warnings: _json,
|
|
1183
|
+
});
|
|
1509
1184
|
};
|
|
1510
1185
|
const de_HumanLoopActivationOutput = (output, context) => {
|
|
1511
|
-
return {
|
|
1512
|
-
HumanLoopActivationConditionsEvaluationResults:
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
HumanLoopActivationReasons: output.HumanLoopActivationReasons != null
|
|
1516
|
-
? de_HumanLoopActivationReasons(output.HumanLoopActivationReasons, context)
|
|
1517
|
-
: undefined,
|
|
1518
|
-
HumanLoopArn: __expectString(output.HumanLoopArn),
|
|
1519
|
-
};
|
|
1520
|
-
};
|
|
1521
|
-
const de_HumanLoopActivationReasons = (output, context) => {
|
|
1522
|
-
const retVal = (output || [])
|
|
1523
|
-
.filter((e) => e != null)
|
|
1524
|
-
.map((entry) => {
|
|
1525
|
-
if (entry === null) {
|
|
1526
|
-
return null;
|
|
1527
|
-
}
|
|
1528
|
-
return __expectString(entry);
|
|
1186
|
+
return take(output, {
|
|
1187
|
+
HumanLoopActivationConditionsEvaluationResults: (_) => new __LazyJsonString(_),
|
|
1188
|
+
HumanLoopActivationReasons: _json,
|
|
1189
|
+
HumanLoopArn: __expectString,
|
|
1529
1190
|
});
|
|
1530
|
-
return retVal;
|
|
1531
|
-
};
|
|
1532
|
-
const de_HumanLoopQuotaExceededException = (output, context) => {
|
|
1533
|
-
return {
|
|
1534
|
-
Code: __expectString(output.Code),
|
|
1535
|
-
Message: __expectString(output.Message),
|
|
1536
|
-
QuotaCode: __expectString(output.QuotaCode),
|
|
1537
|
-
ResourceType: __expectString(output.ResourceType),
|
|
1538
|
-
ServiceCode: __expectString(output.ServiceCode),
|
|
1539
|
-
};
|
|
1540
|
-
};
|
|
1541
|
-
const de_IdempotentParameterMismatchException = (output, context) => {
|
|
1542
|
-
return {
|
|
1543
|
-
Code: __expectString(output.Code),
|
|
1544
|
-
Message: __expectString(output.Message),
|
|
1545
|
-
};
|
|
1546
1191
|
};
|
|
1547
1192
|
const de_IdentityDocument = (output, context) => {
|
|
1548
|
-
return {
|
|
1549
|
-
Blocks:
|
|
1550
|
-
DocumentIndex: __expectInt32
|
|
1551
|
-
IdentityDocumentFields:
|
|
1552
|
-
|
|
1553
|
-
: undefined,
|
|
1554
|
-
};
|
|
1193
|
+
return take(output, {
|
|
1194
|
+
Blocks: (_) => de_BlockList(_, context),
|
|
1195
|
+
DocumentIndex: __expectInt32,
|
|
1196
|
+
IdentityDocumentFields: (_) => de_IdentityDocumentFieldList(_, context),
|
|
1197
|
+
});
|
|
1555
1198
|
};
|
|
1556
1199
|
const de_IdentityDocumentField = (output, context) => {
|
|
1557
|
-
return {
|
|
1558
|
-
Type:
|
|
1559
|
-
ValueDetection:
|
|
1560
|
-
};
|
|
1200
|
+
return take(output, {
|
|
1201
|
+
Type: (_) => de_AnalyzeIDDetections(_, context),
|
|
1202
|
+
ValueDetection: (_) => de_AnalyzeIDDetections(_, context),
|
|
1203
|
+
});
|
|
1561
1204
|
};
|
|
1562
1205
|
const de_IdentityDocumentFieldList = (output, context) => {
|
|
1563
1206
|
const retVal = (output || [])
|
|
1564
1207
|
.filter((e) => e != null)
|
|
1565
1208
|
.map((entry) => {
|
|
1566
|
-
if (entry === null) {
|
|
1567
|
-
return null;
|
|
1568
|
-
}
|
|
1569
1209
|
return de_IdentityDocumentField(entry, context);
|
|
1570
1210
|
});
|
|
1571
1211
|
return retVal;
|
|
@@ -1574,147 +1214,77 @@ const de_IdentityDocumentList = (output, context) => {
|
|
|
1574
1214
|
const retVal = (output || [])
|
|
1575
1215
|
.filter((e) => e != null)
|
|
1576
1216
|
.map((entry) => {
|
|
1577
|
-
if (entry === null) {
|
|
1578
|
-
return null;
|
|
1579
|
-
}
|
|
1580
1217
|
return de_IdentityDocument(entry, context);
|
|
1581
1218
|
});
|
|
1582
1219
|
return retVal;
|
|
1583
1220
|
};
|
|
1584
|
-
const de_IdList = (output, context) => {
|
|
1585
|
-
const retVal = (output || [])
|
|
1586
|
-
.filter((e) => e != null)
|
|
1587
|
-
.map((entry) => {
|
|
1588
|
-
if (entry === null) {
|
|
1589
|
-
return null;
|
|
1590
|
-
}
|
|
1591
|
-
return __expectString(entry);
|
|
1592
|
-
});
|
|
1593
|
-
return retVal;
|
|
1594
|
-
};
|
|
1595
|
-
const de_InternalServerError = (output, context) => {
|
|
1596
|
-
return {
|
|
1597
|
-
Code: __expectString(output.Code),
|
|
1598
|
-
Message: __expectString(output.Message),
|
|
1599
|
-
};
|
|
1600
|
-
};
|
|
1601
|
-
const de_InvalidJobIdException = (output, context) => {
|
|
1602
|
-
return {
|
|
1603
|
-
Code: __expectString(output.Code),
|
|
1604
|
-
Message: __expectString(output.Message),
|
|
1605
|
-
};
|
|
1606
|
-
};
|
|
1607
|
-
const de_InvalidKMSKeyException = (output, context) => {
|
|
1608
|
-
return {
|
|
1609
|
-
Code: __expectString(output.Code),
|
|
1610
|
-
Message: __expectString(output.Message),
|
|
1611
|
-
};
|
|
1612
|
-
};
|
|
1613
|
-
const de_InvalidParameterException = (output, context) => {
|
|
1614
|
-
return {
|
|
1615
|
-
Code: __expectString(output.Code),
|
|
1616
|
-
Message: __expectString(output.Message),
|
|
1617
|
-
};
|
|
1618
|
-
};
|
|
1619
|
-
const de_InvalidS3ObjectException = (output, context) => {
|
|
1620
|
-
return {
|
|
1621
|
-
Code: __expectString(output.Code),
|
|
1622
|
-
Message: __expectString(output.Message),
|
|
1623
|
-
};
|
|
1624
|
-
};
|
|
1625
1221
|
const de_LendingDetection = (output, context) => {
|
|
1626
|
-
return {
|
|
1627
|
-
Confidence: __limitedParseFloat32
|
|
1628
|
-
Geometry:
|
|
1629
|
-
SelectionStatus: __expectString
|
|
1630
|
-
Text: __expectString
|
|
1631
|
-
};
|
|
1222
|
+
return take(output, {
|
|
1223
|
+
Confidence: __limitedParseFloat32,
|
|
1224
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1225
|
+
SelectionStatus: __expectString,
|
|
1226
|
+
Text: __expectString,
|
|
1227
|
+
});
|
|
1632
1228
|
};
|
|
1633
1229
|
const de_LendingDetectionList = (output, context) => {
|
|
1634
1230
|
const retVal = (output || [])
|
|
1635
1231
|
.filter((e) => e != null)
|
|
1636
1232
|
.map((entry) => {
|
|
1637
|
-
if (entry === null) {
|
|
1638
|
-
return null;
|
|
1639
|
-
}
|
|
1640
1233
|
return de_LendingDetection(entry, context);
|
|
1641
1234
|
});
|
|
1642
1235
|
return retVal;
|
|
1643
1236
|
};
|
|
1644
1237
|
const de_LendingDocument = (output, context) => {
|
|
1645
|
-
return {
|
|
1646
|
-
LendingFields:
|
|
1647
|
-
SignatureDetections:
|
|
1648
|
-
};
|
|
1238
|
+
return take(output, {
|
|
1239
|
+
LendingFields: (_) => de_LendingFieldList(_, context),
|
|
1240
|
+
SignatureDetections: (_) => de_SignatureDetectionList(_, context),
|
|
1241
|
+
});
|
|
1649
1242
|
};
|
|
1650
1243
|
const de_LendingField = (output, context) => {
|
|
1651
|
-
return {
|
|
1652
|
-
KeyDetection:
|
|
1653
|
-
Type: __expectString
|
|
1654
|
-
ValueDetections:
|
|
1655
|
-
};
|
|
1244
|
+
return take(output, {
|
|
1245
|
+
KeyDetection: (_) => de_LendingDetection(_, context),
|
|
1246
|
+
Type: __expectString,
|
|
1247
|
+
ValueDetections: (_) => de_LendingDetectionList(_, context),
|
|
1248
|
+
});
|
|
1656
1249
|
};
|
|
1657
1250
|
const de_LendingFieldList = (output, context) => {
|
|
1658
1251
|
const retVal = (output || [])
|
|
1659
1252
|
.filter((e) => e != null)
|
|
1660
1253
|
.map((entry) => {
|
|
1661
|
-
if (entry === null) {
|
|
1662
|
-
return null;
|
|
1663
|
-
}
|
|
1664
1254
|
return de_LendingField(entry, context);
|
|
1665
1255
|
});
|
|
1666
1256
|
return retVal;
|
|
1667
1257
|
};
|
|
1668
1258
|
const de_LendingResult = (output, context) => {
|
|
1669
|
-
return {
|
|
1670
|
-
Extractions:
|
|
1671
|
-
Page: __expectInt32
|
|
1672
|
-
PageClassification:
|
|
1673
|
-
};
|
|
1259
|
+
return take(output, {
|
|
1260
|
+
Extractions: (_) => de_ExtractionList(_, context),
|
|
1261
|
+
Page: __expectInt32,
|
|
1262
|
+
PageClassification: (_) => de_PageClassification(_, context),
|
|
1263
|
+
});
|
|
1674
1264
|
};
|
|
1675
1265
|
const de_LendingResultList = (output, context) => {
|
|
1676
1266
|
const retVal = (output || [])
|
|
1677
1267
|
.filter((e) => e != null)
|
|
1678
1268
|
.map((entry) => {
|
|
1679
|
-
if (entry === null) {
|
|
1680
|
-
return null;
|
|
1681
|
-
}
|
|
1682
1269
|
return de_LendingResult(entry, context);
|
|
1683
1270
|
});
|
|
1684
1271
|
return retVal;
|
|
1685
1272
|
};
|
|
1686
|
-
const de_LendingSummary = (output, context) => {
|
|
1687
|
-
return {
|
|
1688
|
-
DocumentGroups: output.DocumentGroups != null ? de_DocumentGroupList(output.DocumentGroups, context) : undefined,
|
|
1689
|
-
UndetectedDocumentTypes: output.UndetectedDocumentTypes != null
|
|
1690
|
-
? de_UndetectedDocumentTypeList(output.UndetectedDocumentTypes, context)
|
|
1691
|
-
: undefined,
|
|
1692
|
-
};
|
|
1693
|
-
};
|
|
1694
|
-
const de_LimitExceededException = (output, context) => {
|
|
1695
|
-
return {
|
|
1696
|
-
Code: __expectString(output.Code),
|
|
1697
|
-
Message: __expectString(output.Message),
|
|
1698
|
-
};
|
|
1699
|
-
};
|
|
1700
1273
|
const de_LineItemFields = (output, context) => {
|
|
1701
|
-
return {
|
|
1702
|
-
LineItemExpenseFields:
|
|
1703
|
-
};
|
|
1274
|
+
return take(output, {
|
|
1275
|
+
LineItemExpenseFields: (_) => de_ExpenseFieldList(_, context),
|
|
1276
|
+
});
|
|
1704
1277
|
};
|
|
1705
1278
|
const de_LineItemGroup = (output, context) => {
|
|
1706
|
-
return {
|
|
1707
|
-
LineItemGroupIndex: __expectInt32
|
|
1708
|
-
LineItems:
|
|
1709
|
-
};
|
|
1279
|
+
return take(output, {
|
|
1280
|
+
LineItemGroupIndex: __expectInt32,
|
|
1281
|
+
LineItems: (_) => de_LineItemList(_, context),
|
|
1282
|
+
});
|
|
1710
1283
|
};
|
|
1711
1284
|
const de_LineItemGroupList = (output, context) => {
|
|
1712
1285
|
const retVal = (output || [])
|
|
1713
1286
|
.filter((e) => e != null)
|
|
1714
1287
|
.map((entry) => {
|
|
1715
|
-
if (entry === null) {
|
|
1716
|
-
return null;
|
|
1717
|
-
}
|
|
1718
1288
|
return de_LineItemGroup(entry, context);
|
|
1719
1289
|
});
|
|
1720
1290
|
return retVal;
|
|
@@ -1723,243 +1293,58 @@ const de_LineItemList = (output, context) => {
|
|
|
1723
1293
|
const retVal = (output || [])
|
|
1724
1294
|
.filter((e) => e != null)
|
|
1725
1295
|
.map((entry) => {
|
|
1726
|
-
if (entry === null) {
|
|
1727
|
-
return null;
|
|
1728
|
-
}
|
|
1729
1296
|
return de_LineItemFields(entry, context);
|
|
1730
1297
|
});
|
|
1731
1298
|
return retVal;
|
|
1732
1299
|
};
|
|
1733
|
-
const de_NormalizedValue = (output, context) => {
|
|
1734
|
-
return {
|
|
1735
|
-
Value: __expectString(output.Value),
|
|
1736
|
-
ValueType: __expectString(output.ValueType),
|
|
1737
|
-
};
|
|
1738
|
-
};
|
|
1739
1300
|
const de_PageClassification = (output, context) => {
|
|
1740
|
-
return {
|
|
1741
|
-
PageNumber:
|
|
1742
|
-
PageType:
|
|
1743
|
-
};
|
|
1744
|
-
};
|
|
1745
|
-
const de_PageList = (output, context) => {
|
|
1746
|
-
const retVal = (output || [])
|
|
1747
|
-
.filter((e) => e != null)
|
|
1748
|
-
.map((entry) => {
|
|
1749
|
-
if (entry === null) {
|
|
1750
|
-
return null;
|
|
1751
|
-
}
|
|
1752
|
-
return __expectInt32(entry);
|
|
1753
|
-
});
|
|
1754
|
-
return retVal;
|
|
1755
|
-
};
|
|
1756
|
-
const de_Pages = (output, context) => {
|
|
1757
|
-
const retVal = (output || [])
|
|
1758
|
-
.filter((e) => e != null)
|
|
1759
|
-
.map((entry) => {
|
|
1760
|
-
if (entry === null) {
|
|
1761
|
-
return null;
|
|
1762
|
-
}
|
|
1763
|
-
return __expectInt32(entry);
|
|
1301
|
+
return take(output, {
|
|
1302
|
+
PageNumber: (_) => de_PredictionList(_, context),
|
|
1303
|
+
PageType: (_) => de_PredictionList(_, context),
|
|
1764
1304
|
});
|
|
1765
|
-
return retVal;
|
|
1766
1305
|
};
|
|
1767
1306
|
const de_Point = (output, context) => {
|
|
1768
|
-
return {
|
|
1769
|
-
X: __limitedParseFloat32
|
|
1770
|
-
Y: __limitedParseFloat32
|
|
1771
|
-
};
|
|
1307
|
+
return take(output, {
|
|
1308
|
+
X: __limitedParseFloat32,
|
|
1309
|
+
Y: __limitedParseFloat32,
|
|
1310
|
+
});
|
|
1772
1311
|
};
|
|
1773
1312
|
const de_Polygon = (output, context) => {
|
|
1774
1313
|
const retVal = (output || [])
|
|
1775
1314
|
.filter((e) => e != null)
|
|
1776
1315
|
.map((entry) => {
|
|
1777
|
-
if (entry === null) {
|
|
1778
|
-
return null;
|
|
1779
|
-
}
|
|
1780
1316
|
return de_Point(entry, context);
|
|
1781
1317
|
});
|
|
1782
1318
|
return retVal;
|
|
1783
1319
|
};
|
|
1784
1320
|
const de_Prediction = (output, context) => {
|
|
1785
|
-
return {
|
|
1786
|
-
Confidence: __limitedParseFloat32
|
|
1787
|
-
Value: __expectString
|
|
1788
|
-
};
|
|
1321
|
+
return take(output, {
|
|
1322
|
+
Confidence: __limitedParseFloat32,
|
|
1323
|
+
Value: __expectString,
|
|
1324
|
+
});
|
|
1789
1325
|
};
|
|
1790
1326
|
const de_PredictionList = (output, context) => {
|
|
1791
1327
|
const retVal = (output || [])
|
|
1792
1328
|
.filter((e) => e != null)
|
|
1793
1329
|
.map((entry) => {
|
|
1794
|
-
if (entry === null) {
|
|
1795
|
-
return null;
|
|
1796
|
-
}
|
|
1797
1330
|
return de_Prediction(entry, context);
|
|
1798
1331
|
});
|
|
1799
1332
|
return retVal;
|
|
1800
1333
|
};
|
|
1801
|
-
const de_ProvisionedThroughputExceededException = (output, context) => {
|
|
1802
|
-
return {
|
|
1803
|
-
Code: __expectString(output.Code),
|
|
1804
|
-
Message: __expectString(output.Message),
|
|
1805
|
-
};
|
|
1806
|
-
};
|
|
1807
|
-
const de_Query = (output, context) => {
|
|
1808
|
-
return {
|
|
1809
|
-
Alias: __expectString(output.Alias),
|
|
1810
|
-
Pages: output.Pages != null ? de_QueryPages(output.Pages, context) : undefined,
|
|
1811
|
-
Text: __expectString(output.Text),
|
|
1812
|
-
};
|
|
1813
|
-
};
|
|
1814
|
-
const de_QueryPages = (output, context) => {
|
|
1815
|
-
const retVal = (output || [])
|
|
1816
|
-
.filter((e) => e != null)
|
|
1817
|
-
.map((entry) => {
|
|
1818
|
-
if (entry === null) {
|
|
1819
|
-
return null;
|
|
1820
|
-
}
|
|
1821
|
-
return __expectString(entry);
|
|
1822
|
-
});
|
|
1823
|
-
return retVal;
|
|
1824
|
-
};
|
|
1825
|
-
const de_Relationship = (output, context) => {
|
|
1826
|
-
return {
|
|
1827
|
-
Ids: output.Ids != null ? de_IdList(output.Ids, context) : undefined,
|
|
1828
|
-
Type: __expectString(output.Type),
|
|
1829
|
-
};
|
|
1830
|
-
};
|
|
1831
|
-
const de_RelationshipList = (output, context) => {
|
|
1832
|
-
const retVal = (output || [])
|
|
1833
|
-
.filter((e) => e != null)
|
|
1834
|
-
.map((entry) => {
|
|
1835
|
-
if (entry === null) {
|
|
1836
|
-
return null;
|
|
1837
|
-
}
|
|
1838
|
-
return de_Relationship(entry, context);
|
|
1839
|
-
});
|
|
1840
|
-
return retVal;
|
|
1841
|
-
};
|
|
1842
1334
|
const de_SignatureDetection = (output, context) => {
|
|
1843
|
-
return {
|
|
1844
|
-
Confidence: __limitedParseFloat32
|
|
1845
|
-
Geometry:
|
|
1846
|
-
};
|
|
1335
|
+
return take(output, {
|
|
1336
|
+
Confidence: __limitedParseFloat32,
|
|
1337
|
+
Geometry: (_) => de_Geometry(_, context),
|
|
1338
|
+
});
|
|
1847
1339
|
};
|
|
1848
1340
|
const de_SignatureDetectionList = (output, context) => {
|
|
1849
1341
|
const retVal = (output || [])
|
|
1850
1342
|
.filter((e) => e != null)
|
|
1851
1343
|
.map((entry) => {
|
|
1852
|
-
if (entry === null) {
|
|
1853
|
-
return null;
|
|
1854
|
-
}
|
|
1855
1344
|
return de_SignatureDetection(entry, context);
|
|
1856
1345
|
});
|
|
1857
1346
|
return retVal;
|
|
1858
1347
|
};
|
|
1859
|
-
const de_SplitDocument = (output, context) => {
|
|
1860
|
-
return {
|
|
1861
|
-
Index: __expectInt32(output.Index),
|
|
1862
|
-
Pages: output.Pages != null ? de_PageList(output.Pages, context) : undefined,
|
|
1863
|
-
};
|
|
1864
|
-
};
|
|
1865
|
-
const de_SplitDocumentList = (output, context) => {
|
|
1866
|
-
const retVal = (output || [])
|
|
1867
|
-
.filter((e) => e != null)
|
|
1868
|
-
.map((entry) => {
|
|
1869
|
-
if (entry === null) {
|
|
1870
|
-
return null;
|
|
1871
|
-
}
|
|
1872
|
-
return de_SplitDocument(entry, context);
|
|
1873
|
-
});
|
|
1874
|
-
return retVal;
|
|
1875
|
-
};
|
|
1876
|
-
const de_StartDocumentAnalysisResponse = (output, context) => {
|
|
1877
|
-
return {
|
|
1878
|
-
JobId: __expectString(output.JobId),
|
|
1879
|
-
};
|
|
1880
|
-
};
|
|
1881
|
-
const de_StartDocumentTextDetectionResponse = (output, context) => {
|
|
1882
|
-
return {
|
|
1883
|
-
JobId: __expectString(output.JobId),
|
|
1884
|
-
};
|
|
1885
|
-
};
|
|
1886
|
-
const de_StartExpenseAnalysisResponse = (output, context) => {
|
|
1887
|
-
return {
|
|
1888
|
-
JobId: __expectString(output.JobId),
|
|
1889
|
-
};
|
|
1890
|
-
};
|
|
1891
|
-
const de_StartLendingAnalysisResponse = (output, context) => {
|
|
1892
|
-
return {
|
|
1893
|
-
JobId: __expectString(output.JobId),
|
|
1894
|
-
};
|
|
1895
|
-
};
|
|
1896
|
-
const de_StringList = (output, context) => {
|
|
1897
|
-
const retVal = (output || [])
|
|
1898
|
-
.filter((e) => e != null)
|
|
1899
|
-
.map((entry) => {
|
|
1900
|
-
if (entry === null) {
|
|
1901
|
-
return null;
|
|
1902
|
-
}
|
|
1903
|
-
return __expectString(entry);
|
|
1904
|
-
});
|
|
1905
|
-
return retVal;
|
|
1906
|
-
};
|
|
1907
|
-
const de_ThrottlingException = (output, context) => {
|
|
1908
|
-
return {
|
|
1909
|
-
Code: __expectString(output.Code),
|
|
1910
|
-
Message: __expectString(output.Message),
|
|
1911
|
-
};
|
|
1912
|
-
};
|
|
1913
|
-
const de_UndetectedDocumentTypeList = (output, context) => {
|
|
1914
|
-
const retVal = (output || [])
|
|
1915
|
-
.filter((e) => e != null)
|
|
1916
|
-
.map((entry) => {
|
|
1917
|
-
if (entry === null) {
|
|
1918
|
-
return null;
|
|
1919
|
-
}
|
|
1920
|
-
return __expectString(entry);
|
|
1921
|
-
});
|
|
1922
|
-
return retVal;
|
|
1923
|
-
};
|
|
1924
|
-
const de_UndetectedSignature = (output, context) => {
|
|
1925
|
-
return {
|
|
1926
|
-
Page: __expectInt32(output.Page),
|
|
1927
|
-
};
|
|
1928
|
-
};
|
|
1929
|
-
const de_UndetectedSignatureList = (output, context) => {
|
|
1930
|
-
const retVal = (output || [])
|
|
1931
|
-
.filter((e) => e != null)
|
|
1932
|
-
.map((entry) => {
|
|
1933
|
-
if (entry === null) {
|
|
1934
|
-
return null;
|
|
1935
|
-
}
|
|
1936
|
-
return de_UndetectedSignature(entry, context);
|
|
1937
|
-
});
|
|
1938
|
-
return retVal;
|
|
1939
|
-
};
|
|
1940
|
-
const de_UnsupportedDocumentException = (output, context) => {
|
|
1941
|
-
return {
|
|
1942
|
-
Code: __expectString(output.Code),
|
|
1943
|
-
Message: __expectString(output.Message),
|
|
1944
|
-
};
|
|
1945
|
-
};
|
|
1946
|
-
const de_Warning = (output, context) => {
|
|
1947
|
-
return {
|
|
1948
|
-
ErrorCode: __expectString(output.ErrorCode),
|
|
1949
|
-
Pages: output.Pages != null ? de_Pages(output.Pages, context) : undefined,
|
|
1950
|
-
};
|
|
1951
|
-
};
|
|
1952
|
-
const de_Warnings = (output, context) => {
|
|
1953
|
-
const retVal = (output || [])
|
|
1954
|
-
.filter((e) => e != null)
|
|
1955
|
-
.map((entry) => {
|
|
1956
|
-
if (entry === null) {
|
|
1957
|
-
return null;
|
|
1958
|
-
}
|
|
1959
|
-
return de_Warning(entry, context);
|
|
1960
|
-
});
|
|
1961
|
-
return retVal;
|
|
1962
|
-
};
|
|
1963
1348
|
const deserializeMetadata = (output) => ({
|
|
1964
1349
|
httpStatusCode: output.statusCode,
|
|
1965
1350
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1973,6 +1358,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
1973
1358
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1974
1359
|
};
|
|
1975
1360
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1361
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
1976
1362
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1977
1363
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1978
1364
|
const contents = {
|
|
@@ -1991,6 +1377,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1991
1377
|
}
|
|
1992
1378
|
return new __HttpRequest(contents);
|
|
1993
1379
|
};
|
|
1380
|
+
function sharedHeaders(operation) {
|
|
1381
|
+
return {
|
|
1382
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1383
|
+
"x-amz-target": `Textract.${operation}`,
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1994
1386
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1995
1387
|
if (encoded.length) {
|
|
1996
1388
|
return JSON.parse(encoded);
|