@aws-sdk/client-textract 3.198.0 → 3.200.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/CHANGELOG.md +19 -0
- package/dist-cjs/models/models_0.js +10 -2
- package/dist-cjs/protocols/Aws_json1_1.js +39 -0
- package/dist-es/models/models_0.js +6 -0
- package/dist-es/protocols/Aws_json1_1.js +39 -0
- package/dist-types/Textract.d.ts +80 -51
- package/dist-types/commands/AnalyzeDocumentCommand.d.ts +23 -15
- package/dist-types/commands/AnalyzeExpenseCommand.d.ts +8 -5
- package/dist-types/commands/AnalyzeIDCommand.d.ts +4 -4
- package/dist-types/commands/DetectDocumentTextCommand.d.ts +3 -2
- package/dist-types/commands/GetDocumentAnalysisCommand.d.ts +42 -25
- package/dist-types/models/models_0.d.ts +84 -28
- package/dist-types/ts3.4/models/models_0.d.ts +17 -0
- package/package.json +29 -29
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **client-textract:** This release introduces additional support for 30+ normalized fields such as vendor address and currency. It also includes OCR output in the response and accuracy improvements for the already supported fields in previous version ([5ee0634](https://github.com/aws/aws-sdk-js-v3/commit/5ee0634c0fcb966479f12f95da3918395139dbfc))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.199.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.198.0...v3.199.0) (2022-10-28)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @aws-sdk/client-textract
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [3.198.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.197.0...v3.198.0) (2022-10-27)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @aws-sdk/client-textract
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.StartExpenseAnalysisResponseFilterSensitiveLog = exports.StartExpenseAnalysisRequestFilterSensitiveLog = exports.StartDocumentTextDetectionResponseFilterSensitiveLog = exports.StartDocumentTextDetectionRequestFilterSensitiveLog = exports.StartDocumentAnalysisResponseFilterSensitiveLog = exports.StartDocumentAnalysisRequestFilterSensitiveLog = exports.OutputConfigFilterSensitiveLog = exports.NotificationChannelFilterSensitiveLog = exports.GetExpenseAnalysisResponseFilterSensitiveLog = exports.GetExpenseAnalysisRequestFilterSensitiveLog = exports.GetDocumentTextDetectionResponseFilterSensitiveLog = exports.GetDocumentTextDetectionRequestFilterSensitiveLog = exports.GetDocumentAnalysisResponseFilterSensitiveLog = exports.WarningFilterSensitiveLog = exports.GetDocumentAnalysisRequestFilterSensitiveLog = exports.DocumentLocationFilterSensitiveLog = exports.DetectDocumentTextResponseFilterSensitiveLog = exports.DetectDocumentTextRequestFilterSensitiveLog = exports.AnalyzeIDResponseFilterSensitiveLog = exports.IdentityDocumentFilterSensitiveLog = void 0;
|
|
3
|
+
exports.NormalizedValueFilterSensitiveLog = exports.AnalyzeIDRequestFilterSensitiveLog = exports.AnalyzeExpenseResponseFilterSensitiveLog = exports.ExpenseDocumentFilterSensitiveLog = exports.LineItemGroupFilterSensitiveLog = exports.LineItemFieldsFilterSensitiveLog = exports.ExpenseFieldFilterSensitiveLog = exports.ExpenseTypeFilterSensitiveLog = exports.ExpenseDetectionFilterSensitiveLog = exports.ExpenseGroupPropertyFilterSensitiveLog = exports.ExpenseCurrencyFilterSensitiveLog = exports.AnalyzeExpenseRequestFilterSensitiveLog = exports.AnalyzeDocumentResponseFilterSensitiveLog = exports.HumanLoopActivationOutputFilterSensitiveLog = exports.DocumentMetadataFilterSensitiveLog = exports.BlockFilterSensitiveLog = exports.RelationshipFilterSensitiveLog = exports.GeometryFilterSensitiveLog = exports.PointFilterSensitiveLog = exports.BoundingBoxFilterSensitiveLog = exports.AnalyzeDocumentRequestFilterSensitiveLog = exports.QueriesConfigFilterSensitiveLog = exports.QueryFilterSensitiveLog = exports.HumanLoopConfigFilterSensitiveLog = exports.HumanLoopDataAttributesFilterSensitiveLog = exports.DocumentFilterSensitiveLog = exports.S3ObjectFilterSensitiveLog = exports.LimitExceededException = exports.IdempotentParameterMismatchException = exports.InvalidKMSKeyException = exports.InvalidJobIdException = exports.JobStatus = exports.ValueType = exports.UnsupportedDocumentException = exports.ThrottlingException = exports.ProvisionedThroughputExceededException = exports.InvalidS3ObjectException = exports.InvalidParameterException = exports.InternalServerError = exports.HumanLoopQuotaExceededException = exports.DocumentTooLargeException = exports.BadDocumentException = exports.TextType = exports.SelectionStatus = exports.RelationshipType = exports.EntityType = exports.BlockType = exports.ContentClassifier = exports.FeatureType = exports.AccessDeniedException = void 0;
|
|
4
|
+
exports.StartExpenseAnalysisResponseFilterSensitiveLog = exports.StartExpenseAnalysisRequestFilterSensitiveLog = exports.StartDocumentTextDetectionResponseFilterSensitiveLog = exports.StartDocumentTextDetectionRequestFilterSensitiveLog = exports.StartDocumentAnalysisResponseFilterSensitiveLog = exports.StartDocumentAnalysisRequestFilterSensitiveLog = exports.OutputConfigFilterSensitiveLog = exports.NotificationChannelFilterSensitiveLog = exports.GetExpenseAnalysisResponseFilterSensitiveLog = exports.GetExpenseAnalysisRequestFilterSensitiveLog = exports.GetDocumentTextDetectionResponseFilterSensitiveLog = exports.GetDocumentTextDetectionRequestFilterSensitiveLog = exports.GetDocumentAnalysisResponseFilterSensitiveLog = exports.WarningFilterSensitiveLog = exports.GetDocumentAnalysisRequestFilterSensitiveLog = exports.DocumentLocationFilterSensitiveLog = exports.DetectDocumentTextResponseFilterSensitiveLog = exports.DetectDocumentTextRequestFilterSensitiveLog = exports.AnalyzeIDResponseFilterSensitiveLog = exports.IdentityDocumentFilterSensitiveLog = exports.IdentityDocumentFieldFilterSensitiveLog = exports.AnalyzeIDDetectionsFilterSensitiveLog = void 0;
|
|
5
5
|
const TextractServiceException_1 = require("./TextractServiceException");
|
|
6
6
|
class AccessDeniedException extends TextractServiceException_1.TextractServiceException {
|
|
7
7
|
constructor(opts) {
|
|
@@ -341,6 +341,14 @@ const AnalyzeExpenseRequestFilterSensitiveLog = (obj) => ({
|
|
|
341
341
|
...obj,
|
|
342
342
|
});
|
|
343
343
|
exports.AnalyzeExpenseRequestFilterSensitiveLog = AnalyzeExpenseRequestFilterSensitiveLog;
|
|
344
|
+
const ExpenseCurrencyFilterSensitiveLog = (obj) => ({
|
|
345
|
+
...obj,
|
|
346
|
+
});
|
|
347
|
+
exports.ExpenseCurrencyFilterSensitiveLog = ExpenseCurrencyFilterSensitiveLog;
|
|
348
|
+
const ExpenseGroupPropertyFilterSensitiveLog = (obj) => ({
|
|
349
|
+
...obj,
|
|
350
|
+
});
|
|
351
|
+
exports.ExpenseGroupPropertyFilterSensitiveLog = ExpenseGroupPropertyFilterSensitiveLog;
|
|
344
352
|
const ExpenseDetectionFilterSensitiveLog = (obj) => ({
|
|
345
353
|
...obj,
|
|
346
354
|
});
|
|
@@ -1144,6 +1144,12 @@ const deserializeAws_json1_1EntityTypes = (output, context) => {
|
|
|
1144
1144
|
});
|
|
1145
1145
|
return retVal;
|
|
1146
1146
|
};
|
|
1147
|
+
const deserializeAws_json1_1ExpenseCurrency = (output, context) => {
|
|
1148
|
+
return {
|
|
1149
|
+
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
1150
|
+
Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1147
1153
|
const deserializeAws_json1_1ExpenseDetection = (output, context) => {
|
|
1148
1154
|
return {
|
|
1149
1155
|
Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
|
|
@@ -1153,6 +1159,7 @@ const deserializeAws_json1_1ExpenseDetection = (output, context) => {
|
|
|
1153
1159
|
};
|
|
1154
1160
|
const deserializeAws_json1_1ExpenseDocument = (output, context) => {
|
|
1155
1161
|
return {
|
|
1162
|
+
Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
|
|
1156
1163
|
ExpenseIndex: (0, smithy_client_1.expectInt32)(output.ExpenseIndex),
|
|
1157
1164
|
LineItemGroups: output.LineItemGroups != null
|
|
1158
1165
|
? deserializeAws_json1_1LineItemGroupList(output.LineItemGroups, context)
|
|
@@ -1173,6 +1180,10 @@ const deserializeAws_json1_1ExpenseDocumentList = (output, context) => {
|
|
|
1173
1180
|
};
|
|
1174
1181
|
const deserializeAws_json1_1ExpenseField = (output, context) => {
|
|
1175
1182
|
return {
|
|
1183
|
+
Currency: output.Currency != null ? deserializeAws_json1_1ExpenseCurrency(output.Currency, context) : undefined,
|
|
1184
|
+
GroupProperties: output.GroupProperties != null
|
|
1185
|
+
? deserializeAws_json1_1ExpenseGroupPropertyList(output.GroupProperties, context)
|
|
1186
|
+
: undefined,
|
|
1176
1187
|
LabelDetection: output.LabelDetection != null
|
|
1177
1188
|
? deserializeAws_json1_1ExpenseDetection(output.LabelDetection, context)
|
|
1178
1189
|
: undefined,
|
|
@@ -1194,6 +1205,23 @@ const deserializeAws_json1_1ExpenseFieldList = (output, context) => {
|
|
|
1194
1205
|
});
|
|
1195
1206
|
return retVal;
|
|
1196
1207
|
};
|
|
1208
|
+
const deserializeAws_json1_1ExpenseGroupProperty = (output, context) => {
|
|
1209
|
+
return {
|
|
1210
|
+
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1211
|
+
Types: output.Types != null ? deserializeAws_json1_1StringList(output.Types, context) : undefined,
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
const deserializeAws_json1_1ExpenseGroupPropertyList = (output, context) => {
|
|
1215
|
+
const retVal = (output || [])
|
|
1216
|
+
.filter((e) => e != null)
|
|
1217
|
+
.map((entry) => {
|
|
1218
|
+
if (entry === null) {
|
|
1219
|
+
return null;
|
|
1220
|
+
}
|
|
1221
|
+
return deserializeAws_json1_1ExpenseGroupProperty(entry, context);
|
|
1222
|
+
});
|
|
1223
|
+
return retVal;
|
|
1224
|
+
};
|
|
1197
1225
|
const deserializeAws_json1_1ExpenseType = (output, context) => {
|
|
1198
1226
|
return {
|
|
1199
1227
|
Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
|
|
@@ -1494,6 +1522,17 @@ const deserializeAws_json1_1StartExpenseAnalysisResponse = (output, context) =>
|
|
|
1494
1522
|
JobId: (0, smithy_client_1.expectString)(output.JobId),
|
|
1495
1523
|
};
|
|
1496
1524
|
};
|
|
1525
|
+
const deserializeAws_json1_1StringList = (output, context) => {
|
|
1526
|
+
const retVal = (output || [])
|
|
1527
|
+
.filter((e) => e != null)
|
|
1528
|
+
.map((entry) => {
|
|
1529
|
+
if (entry === null) {
|
|
1530
|
+
return null;
|
|
1531
|
+
}
|
|
1532
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
1533
|
+
});
|
|
1534
|
+
return retVal;
|
|
1535
|
+
};
|
|
1497
1536
|
const deserializeAws_json1_1ThrottlingException = (output, context) => {
|
|
1498
1537
|
return {
|
|
1499
1538
|
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
@@ -307,6 +307,12 @@ export const AnalyzeDocumentResponseFilterSensitiveLog = (obj) => ({
|
|
|
307
307
|
export const AnalyzeExpenseRequestFilterSensitiveLog = (obj) => ({
|
|
308
308
|
...obj,
|
|
309
309
|
});
|
|
310
|
+
export const ExpenseCurrencyFilterSensitiveLog = (obj) => ({
|
|
311
|
+
...obj,
|
|
312
|
+
});
|
|
313
|
+
export const ExpenseGroupPropertyFilterSensitiveLog = (obj) => ({
|
|
314
|
+
...obj,
|
|
315
|
+
});
|
|
310
316
|
export const ExpenseDetectionFilterSensitiveLog = (obj) => ({
|
|
311
317
|
...obj,
|
|
312
318
|
});
|
|
@@ -1121,6 +1121,12 @@ const deserializeAws_json1_1EntityTypes = (output, context) => {
|
|
|
1121
1121
|
});
|
|
1122
1122
|
return retVal;
|
|
1123
1123
|
};
|
|
1124
|
+
const deserializeAws_json1_1ExpenseCurrency = (output, context) => {
|
|
1125
|
+
return {
|
|
1126
|
+
Code: __expectString(output.Code),
|
|
1127
|
+
Confidence: __limitedParseFloat32(output.Confidence),
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1124
1130
|
const deserializeAws_json1_1ExpenseDetection = (output, context) => {
|
|
1125
1131
|
return {
|
|
1126
1132
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
@@ -1130,6 +1136,7 @@ const deserializeAws_json1_1ExpenseDetection = (output, context) => {
|
|
|
1130
1136
|
};
|
|
1131
1137
|
const deserializeAws_json1_1ExpenseDocument = (output, context) => {
|
|
1132
1138
|
return {
|
|
1139
|
+
Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
|
|
1133
1140
|
ExpenseIndex: __expectInt32(output.ExpenseIndex),
|
|
1134
1141
|
LineItemGroups: output.LineItemGroups != null
|
|
1135
1142
|
? deserializeAws_json1_1LineItemGroupList(output.LineItemGroups, context)
|
|
@@ -1150,6 +1157,10 @@ const deserializeAws_json1_1ExpenseDocumentList = (output, context) => {
|
|
|
1150
1157
|
};
|
|
1151
1158
|
const deserializeAws_json1_1ExpenseField = (output, context) => {
|
|
1152
1159
|
return {
|
|
1160
|
+
Currency: output.Currency != null ? deserializeAws_json1_1ExpenseCurrency(output.Currency, context) : undefined,
|
|
1161
|
+
GroupProperties: output.GroupProperties != null
|
|
1162
|
+
? deserializeAws_json1_1ExpenseGroupPropertyList(output.GroupProperties, context)
|
|
1163
|
+
: undefined,
|
|
1153
1164
|
LabelDetection: output.LabelDetection != null
|
|
1154
1165
|
? deserializeAws_json1_1ExpenseDetection(output.LabelDetection, context)
|
|
1155
1166
|
: undefined,
|
|
@@ -1171,6 +1182,23 @@ const deserializeAws_json1_1ExpenseFieldList = (output, context) => {
|
|
|
1171
1182
|
});
|
|
1172
1183
|
return retVal;
|
|
1173
1184
|
};
|
|
1185
|
+
const deserializeAws_json1_1ExpenseGroupProperty = (output, context) => {
|
|
1186
|
+
return {
|
|
1187
|
+
Id: __expectString(output.Id),
|
|
1188
|
+
Types: output.Types != null ? deserializeAws_json1_1StringList(output.Types, context) : undefined,
|
|
1189
|
+
};
|
|
1190
|
+
};
|
|
1191
|
+
const deserializeAws_json1_1ExpenseGroupPropertyList = (output, context) => {
|
|
1192
|
+
const retVal = (output || [])
|
|
1193
|
+
.filter((e) => e != null)
|
|
1194
|
+
.map((entry) => {
|
|
1195
|
+
if (entry === null) {
|
|
1196
|
+
return null;
|
|
1197
|
+
}
|
|
1198
|
+
return deserializeAws_json1_1ExpenseGroupProperty(entry, context);
|
|
1199
|
+
});
|
|
1200
|
+
return retVal;
|
|
1201
|
+
};
|
|
1174
1202
|
const deserializeAws_json1_1ExpenseType = (output, context) => {
|
|
1175
1203
|
return {
|
|
1176
1204
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
@@ -1471,6 +1499,17 @@ const deserializeAws_json1_1StartExpenseAnalysisResponse = (output, context) =>
|
|
|
1471
1499
|
JobId: __expectString(output.JobId),
|
|
1472
1500
|
};
|
|
1473
1501
|
};
|
|
1502
|
+
const deserializeAws_json1_1StringList = (output, context) => {
|
|
1503
|
+
const retVal = (output || [])
|
|
1504
|
+
.filter((e) => e != null)
|
|
1505
|
+
.map((entry) => {
|
|
1506
|
+
if (entry === null) {
|
|
1507
|
+
return null;
|
|
1508
|
+
}
|
|
1509
|
+
return __expectString(entry);
|
|
1510
|
+
});
|
|
1511
|
+
return retVal;
|
|
1512
|
+
};
|
|
1474
1513
|
const deserializeAws_json1_1ThrottlingException = (output, context) => {
|
|
1475
1514
|
return {
|
|
1476
1515
|
Code: __expectString(output.Code),
|
package/dist-types/Textract.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { TextractClient } from "./TextractClient";
|
|
|
17
17
|
*/
|
|
18
18
|
export declare class Textract extends TextractClient {
|
|
19
19
|
/**
|
|
20
|
-
* <p>Analyzes an input document for relationships between detected items.
|
|
20
|
+
* <p>Analyzes an input document for relationships between detected items. </p>
|
|
21
21
|
* <p>The types of information returned are as follows: </p>
|
|
22
22
|
* <ul>
|
|
23
23
|
* <li>
|
|
@@ -28,49 +28,60 @@ export declare class Textract extends TextractClient {
|
|
|
28
28
|
* the value.</p>
|
|
29
29
|
* </li>
|
|
30
30
|
* <li>
|
|
31
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
32
|
-
* <code>Block</code> object is returned for each cell in
|
|
31
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
32
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
33
|
+
* a table.</p>
|
|
33
34
|
* </li>
|
|
34
35
|
* <li>
|
|
35
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
36
|
-
*
|
|
37
|
-
* relationship with the value
|
|
36
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
37
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
38
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
39
|
+
* of <code>FeatureTypes</code>). </p>
|
|
38
40
|
* </li>
|
|
39
41
|
* <li>
|
|
40
|
-
* <p>
|
|
41
|
-
*
|
|
42
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
43
|
+
* associated Query results block object.</p>
|
|
44
|
+
* </li>
|
|
45
|
+
* <li>
|
|
46
|
+
* <p>Query Result. A QUERY_RESULT Block object contains the answer to the query and an
|
|
47
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
48
|
+
* score.</p>
|
|
42
49
|
* </li>
|
|
43
50
|
* </ul>
|
|
44
51
|
*
|
|
45
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
46
|
-
* A SELECTION_ELEMENT <code>Block</code> object contains
|
|
47
|
-
* including the selection status.</p>
|
|
52
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
53
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
54
|
+
* information about a selection element, including the selection status.</p>
|
|
48
55
|
*
|
|
49
|
-
* <p>You can choose which type of analysis to perform by specifying the
|
|
50
|
-
*
|
|
56
|
+
* <p>You can choose which type of analysis to perform by specifying the
|
|
57
|
+
* <code>FeatureTypes</code> list. </p>
|
|
51
58
|
* <p>The output is returned in a list of <code>Block</code> objects.</p>
|
|
52
59
|
* <p>
|
|
53
60
|
* <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
|
|
54
|
-
*
|
|
55
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
61
|
+
* asynchronously, use <a>StartDocumentAnalysis</a>.</p>
|
|
62
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
63
|
+
* Analysis</a>.</p>
|
|
56
64
|
*/
|
|
57
65
|
analyzeDocument(args: AnalyzeDocumentCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeDocumentCommandOutput>;
|
|
58
66
|
analyzeDocument(args: AnalyzeDocumentCommandInput, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
59
67
|
analyzeDocument(args: AnalyzeDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
60
68
|
/**
|
|
61
69
|
* <p>
|
|
62
|
-
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
63
|
-
*
|
|
70
|
+
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
71
|
+
* related relationships between text.</p>
|
|
72
|
+
* <p>Information is returned as <code>ExpenseDocuments</code> and seperated as
|
|
73
|
+
* follows:</p>
|
|
64
74
|
* <ul>
|
|
65
75
|
* <li>
|
|
66
76
|
* <p>
|
|
67
77
|
* <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
|
|
68
|
-
*
|
|
78
|
+
* store information about the lines of text, such as an item purchased and its price on
|
|
79
|
+
* a receipt.</p>
|
|
69
80
|
* </li>
|
|
70
81
|
* <li>
|
|
71
82
|
* <p>
|
|
72
|
-
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
73
|
-
*
|
|
83
|
+
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
84
|
+
* header information or the vendors name.</p>
|
|
74
85
|
* </li>
|
|
75
86
|
* </ul>
|
|
76
87
|
*/
|
|
@@ -78,18 +89,19 @@ export declare class Textract extends TextractClient {
|
|
|
78
89
|
analyzeExpense(args: AnalyzeExpenseCommandInput, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
79
90
|
analyzeExpense(args: AnalyzeExpenseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
80
91
|
/**
|
|
81
|
-
* <p>Analyzes identity documents for relevant information. This information is extracted
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
92
|
+
* <p>Analyzes identity documents for relevant information. This information is extracted and
|
|
93
|
+
* returned as <code>IdentityDocumentFields</code>, which records both the normalized field
|
|
94
|
+
* and value of the extracted text.Unlike other Amazon Textract operations,
|
|
95
|
+
* <code>AnalyzeID</code> doesn't return any Geometry data.</p>
|
|
85
96
|
*/
|
|
86
97
|
analyzeID(args: AnalyzeIDCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeIDCommandOutput>;
|
|
87
98
|
analyzeID(args: AnalyzeIDCommandInput, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
88
99
|
analyzeID(args: AnalyzeIDCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
89
100
|
/**
|
|
90
101
|
* <p>Detects text in the input document. Amazon Textract can detect lines of text and the
|
|
91
|
-
* words that make up a line of text. The input document must be
|
|
92
|
-
*
|
|
102
|
+
* words that make up a line of text. The input document must be in one of the following image
|
|
103
|
+
* formats: JPEG, PNG, PDF, or TIFF. <code>DetectDocumentText</code> returns the detected
|
|
104
|
+
* text in an array of <a>Block</a> objects. </p>
|
|
93
105
|
* <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
|
|
94
106
|
* is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
|
|
95
107
|
* a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
|
|
@@ -103,44 +115,60 @@ export declare class Textract extends TextractClient {
|
|
|
103
115
|
detectDocumentText(args: DetectDocumentTextCommandInput, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
104
116
|
detectDocumentText(args: DetectDocumentTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
105
117
|
/**
|
|
106
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
118
|
+
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
119
|
+
* document.</p>
|
|
120
|
+
* <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>,
|
|
121
|
+
* which returns a job identifier (<code>JobId</code>). When the text analysis operation
|
|
122
|
+
* finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic
|
|
123
|
+
* that's registered in the initial call to <code>StartDocumentAnalysis</code>. To get the
|
|
124
|
+
* results of the text-detection operation, first check that the status value published to the
|
|
125
|
+
* Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <code>GetDocumentAnalysis</code>, and
|
|
126
|
+
* pass the job identifier (<code>JobId</code>) from the initial call to
|
|
127
|
+
* <code>StartDocumentAnalysis</code>.</p>
|
|
114
128
|
* <p>
|
|
115
|
-
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
116
|
-
* types of information are returned: </p>
|
|
129
|
+
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
130
|
+
* The following types of information are returned: </p>
|
|
117
131
|
* <ul>
|
|
118
132
|
* <li>
|
|
119
133
|
* <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
134
|
+
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
135
|
+
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
136
|
+
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
137
|
+
* the value.</p>
|
|
124
138
|
* </li>
|
|
125
139
|
* <li>
|
|
126
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
127
|
-
*
|
|
140
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
141
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
142
|
+
* a table.</p>
|
|
128
143
|
* </li>
|
|
129
144
|
* <li>
|
|
130
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
131
|
-
*
|
|
132
|
-
*
|
|
145
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
146
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
147
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
148
|
+
* of the <code>StartDocumentAnalysis</code>
|
|
133
149
|
* <code>FeatureTypes</code> input parameter). </p>
|
|
134
150
|
* </li>
|
|
135
151
|
* <li>
|
|
136
|
-
* <p>
|
|
137
|
-
*
|
|
152
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
153
|
+
* associated Query results block object.</p>
|
|
154
|
+
* </li>
|
|
155
|
+
* <li>
|
|
156
|
+
* <p>Query Results. A QUERY_RESULT Block object contains the answer to the query and an
|
|
157
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
158
|
+
* score.</p>
|
|
138
159
|
* </li>
|
|
139
160
|
* </ul>
|
|
140
161
|
*
|
|
141
|
-
* <
|
|
142
|
-
*
|
|
143
|
-
*
|
|
162
|
+
* <note>
|
|
163
|
+
* <p>While processing a document with queries, look out for
|
|
164
|
+
* <code>INVALID_REQUEST_PARAMETERS</code> output. This indicates that either the per
|
|
165
|
+
* page query limit has been exceeded or that the operation is trying to query a page in
|
|
166
|
+
* the document which doesn’t exist. </p>
|
|
167
|
+
* </note>
|
|
168
|
+
*
|
|
169
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
170
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
171
|
+
* information about a selection element, including the selection status.</p>
|
|
144
172
|
*
|
|
145
173
|
*
|
|
146
174
|
* <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
|
|
@@ -150,7 +178,8 @@ export declare class Textract extends TextractClient {
|
|
|
150
178
|
* <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
|
|
151
179
|
* parameter with the token value that's returned from the previous call to
|
|
152
180
|
* <code>GetDocumentAnalysis</code>.</p>
|
|
153
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
181
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
182
|
+
* Analysis</a>.</p>
|
|
154
183
|
*/
|
|
155
184
|
getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentAnalysisCommandOutput>;
|
|
156
185
|
getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void): void;
|
|
@@ -8,7 +8,7 @@ export interface AnalyzeDocumentCommandInput extends AnalyzeDocumentRequest {
|
|
|
8
8
|
export interface AnalyzeDocumentCommandOutput extends AnalyzeDocumentResponse, __MetadataBearer {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* <p>Analyzes an input document for relationships between detected items.
|
|
11
|
+
* <p>Analyzes an input document for relationships between detected items. </p>
|
|
12
12
|
* <p>The types of information returned are as follows: </p>
|
|
13
13
|
* <ul>
|
|
14
14
|
* <li>
|
|
@@ -19,31 +19,39 @@ export interface AnalyzeDocumentCommandOutput extends AnalyzeDocumentResponse, _
|
|
|
19
19
|
* the value.</p>
|
|
20
20
|
* </li>
|
|
21
21
|
* <li>
|
|
22
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
23
|
-
* <code>Block</code> object is returned for each cell in
|
|
22
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
23
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
24
|
+
* a table.</p>
|
|
24
25
|
* </li>
|
|
25
26
|
* <li>
|
|
26
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
27
|
-
*
|
|
28
|
-
* relationship with the value
|
|
27
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
28
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
29
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
30
|
+
* of <code>FeatureTypes</code>). </p>
|
|
29
31
|
* </li>
|
|
30
32
|
* <li>
|
|
31
|
-
* <p>
|
|
32
|
-
*
|
|
33
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
34
|
+
* associated Query results block object.</p>
|
|
35
|
+
* </li>
|
|
36
|
+
* <li>
|
|
37
|
+
* <p>Query Result. A QUERY_RESULT Block object contains the answer to the query and an
|
|
38
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
39
|
+
* score.</p>
|
|
33
40
|
* </li>
|
|
34
41
|
* </ul>
|
|
35
42
|
*
|
|
36
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
37
|
-
* A SELECTION_ELEMENT <code>Block</code> object contains
|
|
38
|
-
* including the selection status.</p>
|
|
43
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
44
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
45
|
+
* information about a selection element, including the selection status.</p>
|
|
39
46
|
*
|
|
40
|
-
* <p>You can choose which type of analysis to perform by specifying the
|
|
41
|
-
*
|
|
47
|
+
* <p>You can choose which type of analysis to perform by specifying the
|
|
48
|
+
* <code>FeatureTypes</code> list. </p>
|
|
42
49
|
* <p>The output is returned in a list of <code>Block</code> objects.</p>
|
|
43
50
|
* <p>
|
|
44
51
|
* <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
|
|
45
|
-
*
|
|
46
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
52
|
+
* asynchronously, use <a>StartDocumentAnalysis</a>.</p>
|
|
53
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
54
|
+
* Analysis</a>.</p>
|
|
47
55
|
* @example
|
|
48
56
|
* Use a bare-bones client and the command you need to make an API call.
|
|
49
57
|
* ```javascript
|
|
@@ -9,18 +9,21 @@ export interface AnalyzeExpenseCommandOutput extends AnalyzeExpenseResponse, __M
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* <p>
|
|
12
|
-
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
13
|
-
*
|
|
12
|
+
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially
|
|
13
|
+
* related relationships between text.</p>
|
|
14
|
+
* <p>Information is returned as <code>ExpenseDocuments</code> and seperated as
|
|
15
|
+
* follows:</p>
|
|
14
16
|
* <ul>
|
|
15
17
|
* <li>
|
|
16
18
|
* <p>
|
|
17
19
|
* <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
|
|
18
|
-
*
|
|
20
|
+
* store information about the lines of text, such as an item purchased and its price on
|
|
21
|
+
* a receipt.</p>
|
|
19
22
|
* </li>
|
|
20
23
|
* <li>
|
|
21
24
|
* <p>
|
|
22
|
-
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
23
|
-
*
|
|
25
|
+
* <code>SummaryFields</code>- Contains all other information a receipt, such as
|
|
26
|
+
* header information or the vendors name.</p>
|
|
24
27
|
* </li>
|
|
25
28
|
* </ul>
|
|
26
29
|
* @example
|
|
@@ -8,10 +8,10 @@ export interface AnalyzeIDCommandInput extends AnalyzeIDRequest {
|
|
|
8
8
|
export interface AnalyzeIDCommandOutput extends AnalyzeIDResponse, __MetadataBearer {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* <p>Analyzes identity documents for relevant information. This information is extracted
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* <p>Analyzes identity documents for relevant information. This information is extracted and
|
|
12
|
+
* returned as <code>IdentityDocumentFields</code>, which records both the normalized field
|
|
13
|
+
* and value of the extracted text.Unlike other Amazon Textract operations,
|
|
14
|
+
* <code>AnalyzeID</code> doesn't return any Geometry data.</p>
|
|
15
15
|
* @example
|
|
16
16
|
* Use a bare-bones client and the command you need to make an API call.
|
|
17
17
|
* ```javascript
|
|
@@ -9,8 +9,9 @@ export interface DetectDocumentTextCommandOutput extends DetectDocumentTextRespo
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* <p>Detects text in the input document. Amazon Textract can detect lines of text and the
|
|
12
|
-
* words that make up a line of text. The input document must be
|
|
13
|
-
*
|
|
12
|
+
* words that make up a line of text. The input document must be in one of the following image
|
|
13
|
+
* formats: JPEG, PNG, PDF, or TIFF. <code>DetectDocumentText</code> returns the detected
|
|
14
|
+
* text in an array of <a>Block</a> objects. </p>
|
|
14
15
|
* <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
|
|
15
16
|
* is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
|
|
16
17
|
* a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
|
|
@@ -8,44 +8,60 @@ export interface GetDocumentAnalysisCommandInput extends GetDocumentAnalysisRequ
|
|
|
8
8
|
export interface GetDocumentAnalysisCommandOutput extends GetDocumentAnalysisResponse, __MetadataBearer {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
11
|
+
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
|
|
12
|
+
* document.</p>
|
|
13
|
+
* <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>,
|
|
14
|
+
* which returns a job identifier (<code>JobId</code>). When the text analysis operation
|
|
15
|
+
* finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic
|
|
16
|
+
* that's registered in the initial call to <code>StartDocumentAnalysis</code>. To get the
|
|
17
|
+
* results of the text-detection operation, first check that the status value published to the
|
|
18
|
+
* Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <code>GetDocumentAnalysis</code>, and
|
|
19
|
+
* pass the job identifier (<code>JobId</code>) from the initial call to
|
|
20
|
+
* <code>StartDocumentAnalysis</code>.</p>
|
|
19
21
|
* <p>
|
|
20
|
-
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
21
|
-
* types of information are returned: </p>
|
|
22
|
+
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects.
|
|
23
|
+
* The following types of information are returned: </p>
|
|
22
24
|
* <ul>
|
|
23
25
|
* <li>
|
|
24
26
|
* <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
28
|
+
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
29
|
+
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
30
|
+
* the value.</p>
|
|
29
31
|
* </li>
|
|
30
32
|
* <li>
|
|
31
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
32
|
-
*
|
|
33
|
+
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information
|
|
34
|
+
* about a detected table. A CELL <code>Block</code> object is returned for each cell in
|
|
35
|
+
* a table.</p>
|
|
33
36
|
* </li>
|
|
34
37
|
* <li>
|
|
35
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
+
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more
|
|
39
|
+
* WORD <code>Block</code> objects. All lines and words that are detected in the
|
|
40
|
+
* document are returned (including text that doesn't have a relationship with the value
|
|
41
|
+
* of the <code>StartDocumentAnalysis</code>
|
|
38
42
|
* <code>FeatureTypes</code> input parameter). </p>
|
|
39
43
|
* </li>
|
|
40
44
|
* <li>
|
|
41
|
-
* <p>
|
|
42
|
-
*
|
|
45
|
+
* <p>Query. A QUERY Block object contains the query text, alias and link to the
|
|
46
|
+
* associated Query results block object.</p>
|
|
47
|
+
* </li>
|
|
48
|
+
* <li>
|
|
49
|
+
* <p>Query Results. A QUERY_RESULT Block object contains the answer to the query and an
|
|
50
|
+
* ID that connects it to the query asked. This Block also contains a confidence
|
|
51
|
+
* score.</p>
|
|
43
52
|
* </li>
|
|
44
53
|
* </ul>
|
|
45
54
|
*
|
|
46
|
-
* <
|
|
47
|
-
*
|
|
48
|
-
*
|
|
55
|
+
* <note>
|
|
56
|
+
* <p>While processing a document with queries, look out for
|
|
57
|
+
* <code>INVALID_REQUEST_PARAMETERS</code> output. This indicates that either the per
|
|
58
|
+
* page query limit has been exceeded or that the operation is trying to query a page in
|
|
59
|
+
* the document which doesn’t exist. </p>
|
|
60
|
+
* </note>
|
|
61
|
+
*
|
|
62
|
+
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be
|
|
63
|
+
* detected in form data and in tables. A SELECTION_ELEMENT <code>Block</code> object contains
|
|
64
|
+
* information about a selection element, including the selection status.</p>
|
|
49
65
|
*
|
|
50
66
|
*
|
|
51
67
|
* <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
|
|
@@ -55,7 +71,8 @@ export interface GetDocumentAnalysisCommandOutput extends GetDocumentAnalysisRes
|
|
|
55
71
|
* <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
|
|
56
72
|
* parameter with the token value that's returned from the previous call to
|
|
57
73
|
* <code>GetDocumentAnalysis</code>.</p>
|
|
58
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
74
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text
|
|
75
|
+
* Analysis</a>.</p>
|
|
59
76
|
* @example
|
|
60
77
|
* Use a bare-bones client and the command you need to make an API call.
|
|
61
78
|
* ```javascript
|
|
@@ -125,7 +125,8 @@ export interface Query {
|
|
|
125
125
|
*/
|
|
126
126
|
Alias?: string;
|
|
127
127
|
/**
|
|
128
|
-
* <p>
|
|
128
|
+
* <p>Pages is a parameter that the user inputs to specify which pages to apply a query to. The following is a
|
|
129
|
+
* list of rules for using this parameter.</p>
|
|
129
130
|
* <ul>
|
|
130
131
|
* <li>
|
|
131
132
|
* <p>If a page is not specified, it is set to <code>["1"]</code> by default.</p>
|
|
@@ -135,8 +136,7 @@ export interface Query {
|
|
|
135
136
|
* <code>0 1 2 3 4 5 6 7 8 9 - *</code>. No whitespace is allowed.</p>
|
|
136
137
|
* </li>
|
|
137
138
|
* <li>
|
|
138
|
-
* <p>When using
|
|
139
|
-
* in the string.</p>
|
|
139
|
+
* <p>When using * to indicate all pages, it must be the only element in the list.</p>
|
|
140
140
|
* </li>
|
|
141
141
|
* <li>
|
|
142
142
|
* <p>You can use page intervals, such as <code>[“1-3”, “1-1”, “4-*”]</code>. Where <code>*</code> indicates last page of
|
|
@@ -160,23 +160,24 @@ export interface QueriesConfig {
|
|
|
160
160
|
}
|
|
161
161
|
export interface AnalyzeDocumentRequest {
|
|
162
162
|
/**
|
|
163
|
-
* <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS
|
|
164
|
-
* to call Amazon Textract operations, you can't pass image bytes. The document must be an
|
|
165
|
-
* in JPEG, PNG, PDF, or TIFF format.</p>
|
|
163
|
+
* <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS
|
|
164
|
+
* CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an
|
|
165
|
+
* image in JPEG, PNG, PDF, or TIFF format.</p>
|
|
166
166
|
* <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
|
|
167
167
|
* image bytes that are passed using the <code>Bytes</code> field. </p>
|
|
168
168
|
*/
|
|
169
169
|
Document: Document | undefined;
|
|
170
170
|
/**
|
|
171
171
|
* <p>A list of the types of analysis to perform. Add TABLES to the list to return information
|
|
172
|
-
* about the tables that are detected in the input document. Add FORMS to return detected form
|
|
173
|
-
* To perform both types of analysis, add TABLES and FORMS to
|
|
174
|
-
*
|
|
175
|
-
*
|
|
172
|
+
* about the tables that are detected in the input document. Add FORMS to return detected form
|
|
173
|
+
* data. To perform both types of analysis, add TABLES and FORMS to <code>FeatureTypes</code>.
|
|
174
|
+
* All lines and words detected in the document are included in the response (including text
|
|
175
|
+
* that isn't related to the value of <code>FeatureTypes</code>). </p>
|
|
176
176
|
*/
|
|
177
177
|
FeatureTypes: (FeatureType | string)[] | undefined;
|
|
178
178
|
/**
|
|
179
|
-
* <p>Sets the configuration for the human in the loop workflow for analyzing
|
|
179
|
+
* <p>Sets the configuration for the human in the loop workflow for analyzing
|
|
180
|
+
* documents.</p>
|
|
180
181
|
*/
|
|
181
182
|
HumanLoopConfig?: HumanLoopConfig;
|
|
182
183
|
/**
|
|
@@ -394,7 +395,7 @@ export interface Block {
|
|
|
394
395
|
* <li>
|
|
395
396
|
* <p>
|
|
396
397
|
* <i>QUERY</i> - A question asked during the call of AnalyzeDocument. Contains an
|
|
397
|
-
* alias and an ID that
|
|
398
|
+
* alias and an ID that attaches it to its answer.</p>
|
|
398
399
|
* </li>
|
|
399
400
|
* <li>
|
|
400
401
|
* <p>
|
|
@@ -492,12 +493,13 @@ export interface Block {
|
|
|
492
493
|
*/
|
|
493
494
|
SelectionStatus?: SelectionStatus | string;
|
|
494
495
|
/**
|
|
495
|
-
* <p>The page on which a block was detected. <code>Page</code> is returned by
|
|
496
|
-
* operations. Page values greater than 1 are only returned for multipage
|
|
497
|
-
* in PDF or TIFF format. A scanned image (JPEG/PNG)
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
496
|
+
* <p>The page on which a block was detected. <code>Page</code> is returned by synchronous and
|
|
497
|
+
* asynchronous operations. Page values greater than 1 are only returned for multipage
|
|
498
|
+
* documents that are in PDF or TIFF format. A scanned image (JPEG/PNG) provided to an
|
|
499
|
+
* asynchronous operation, even if it contains multiple document pages, is considered a
|
|
500
|
+
* single-page document. This means that for scanned images the value of <code>Page</code> is
|
|
501
|
+
* always 1. Synchronous operations operations will also return a <code>Page</code> value of 1
|
|
502
|
+
* because every input document is considered to be a single-page document.</p>
|
|
501
503
|
*/
|
|
502
504
|
Page?: number;
|
|
503
505
|
/**
|
|
@@ -714,6 +716,33 @@ export interface AnalyzeExpenseRequest {
|
|
|
714
716
|
*/
|
|
715
717
|
Document: Document | undefined;
|
|
716
718
|
}
|
|
719
|
+
/**
|
|
720
|
+
* <p>Returns the kind of currency detected.</p>
|
|
721
|
+
*/
|
|
722
|
+
export interface ExpenseCurrency {
|
|
723
|
+
/**
|
|
724
|
+
* <p>Currency code for detected currency.</p>
|
|
725
|
+
*/
|
|
726
|
+
Code?: string;
|
|
727
|
+
/**
|
|
728
|
+
* <p>Percentage confideence in the detected currency.</p>
|
|
729
|
+
*/
|
|
730
|
+
Confidence?: number;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* <p>Shows the group that a certain key belongs to. This helps differentiate responses
|
|
734
|
+
* like addresses that can appear similar in response JSON.</p>
|
|
735
|
+
*/
|
|
736
|
+
export interface ExpenseGroupProperty {
|
|
737
|
+
/**
|
|
738
|
+
* <p>Informs you on the kind of label associated with the group</p>
|
|
739
|
+
*/
|
|
740
|
+
Types?: string[];
|
|
741
|
+
/**
|
|
742
|
+
* <p>Provides a group Id number, which will be the same for each in the group.</p>
|
|
743
|
+
*/
|
|
744
|
+
Id?: string;
|
|
745
|
+
}
|
|
717
746
|
/**
|
|
718
747
|
* <p>An object used to store information about the Value or Label detected by Amazon Textract.</p>
|
|
719
748
|
*/
|
|
@@ -766,6 +795,16 @@ export interface ExpenseField {
|
|
|
766
795
|
* <p>The page number the value was detected on.</p>
|
|
767
796
|
*/
|
|
768
797
|
PageNumber?: number;
|
|
798
|
+
/**
|
|
799
|
+
* <p>Shows the kind of currency, both the code and confidence associated with any monatary value
|
|
800
|
+
* detected.</p>
|
|
801
|
+
*/
|
|
802
|
+
Currency?: ExpenseCurrency;
|
|
803
|
+
/**
|
|
804
|
+
* <p>Shows which group a response object belongs to, such as whether an address line
|
|
805
|
+
* belongs to the vendor's address or the recipent's address.</p>
|
|
806
|
+
*/
|
|
807
|
+
GroupProperties?: ExpenseGroupProperty[];
|
|
769
808
|
}
|
|
770
809
|
/**
|
|
771
810
|
* <p>A structure that holds information about the different lines found in a document's tables.</p>
|
|
@@ -806,6 +845,11 @@ export interface ExpenseDocument {
|
|
|
806
845
|
* <p>Information detected on each table of a document, seperated into <code>LineItems</code>.</p>
|
|
807
846
|
*/
|
|
808
847
|
LineItemGroups?: LineItemGroup[];
|
|
848
|
+
/**
|
|
849
|
+
* <p>This is a block object, the same as reported when DetectDocumentText is run on a document.
|
|
850
|
+
* It provides word level recognition of text.</p>
|
|
851
|
+
*/
|
|
852
|
+
Blocks?: Block[];
|
|
809
853
|
}
|
|
810
854
|
export interface AnalyzeExpenseResponse {
|
|
811
855
|
/**
|
|
@@ -889,8 +933,8 @@ export interface IdentityDocument {
|
|
|
889
933
|
}
|
|
890
934
|
export interface AnalyzeIDResponse {
|
|
891
935
|
/**
|
|
892
|
-
* <p>The list of documents processed by AnalyzeID. Includes a number denoting their
|
|
893
|
-
*
|
|
936
|
+
* <p>The list of documents processed by AnalyzeID. Includes a number denoting their place in
|
|
937
|
+
* the list and the response structure for the document.</p>
|
|
894
938
|
*/
|
|
895
939
|
IdentityDocuments?: IdentityDocument[];
|
|
896
940
|
/**
|
|
@@ -943,7 +987,8 @@ export interface DocumentLocation {
|
|
|
943
987
|
export interface GetDocumentAnalysisRequest {
|
|
944
988
|
/**
|
|
945
989
|
* <p>A unique identifier for the text-detection job. The <code>JobId</code> is returned from
|
|
946
|
-
*
|
|
990
|
+
* <code>StartDocumentAnalysis</code>. A <code>JobId</code> value is only valid for 7
|
|
991
|
+
* days.</p>
|
|
947
992
|
*/
|
|
948
993
|
JobId: string | undefined;
|
|
949
994
|
/**
|
|
@@ -953,8 +998,9 @@ export interface GetDocumentAnalysisRequest {
|
|
|
953
998
|
*/
|
|
954
999
|
MaxResults?: number;
|
|
955
1000
|
/**
|
|
956
|
-
* <p>If the previous response was incomplete (because there are more blocks to retrieve),
|
|
957
|
-
* token in the response. You can use this pagination
|
|
1001
|
+
* <p>If the previous response was incomplete (because there are more blocks to retrieve),
|
|
1002
|
+
* Amazon Textract returns a pagination token in the response. You can use this pagination
|
|
1003
|
+
* token to retrieve the next set of blocks.</p>
|
|
958
1004
|
*/
|
|
959
1005
|
NextToken?: string;
|
|
960
1006
|
}
|
|
@@ -979,8 +1025,9 @@ export interface Warning {
|
|
|
979
1025
|
}
|
|
980
1026
|
export interface GetDocumentAnalysisResponse {
|
|
981
1027
|
/**
|
|
982
|
-
* <p>Information about a document that Amazon Textract processed.
|
|
983
|
-
*
|
|
1028
|
+
* <p>Information about a document that Amazon Textract processed.
|
|
1029
|
+
* <code>DocumentMetadata</code> is returned in every page of paginated responses from an
|
|
1030
|
+
* Amazon Textract video operation.</p>
|
|
984
1031
|
*/
|
|
985
1032
|
DocumentMetadata?: DocumentMetadata;
|
|
986
1033
|
/**
|
|
@@ -988,8 +1035,8 @@ export interface GetDocumentAnalysisResponse {
|
|
|
988
1035
|
*/
|
|
989
1036
|
JobStatus?: JobStatus | string;
|
|
990
1037
|
/**
|
|
991
|
-
* <p>If the response is truncated, Amazon Textract returns this token. You can use this token
|
|
992
|
-
* the subsequent request to retrieve the next set of text detection results.</p>
|
|
1038
|
+
* <p>If the response is truncated, Amazon Textract returns this token. You can use this token
|
|
1039
|
+
* in the subsequent request to retrieve the next set of text detection results.</p>
|
|
993
1040
|
*/
|
|
994
1041
|
NextToken?: string;
|
|
995
1042
|
/**
|
|
@@ -1001,7 +1048,8 @@ export interface GetDocumentAnalysisResponse {
|
|
|
1001
1048
|
*/
|
|
1002
1049
|
Warnings?: Warning[];
|
|
1003
1050
|
/**
|
|
1004
|
-
* <p>Returns if the detection job could not be completed. Contains explanation for what error
|
|
1051
|
+
* <p>Returns if the detection job could not be completed. Contains explanation for what error
|
|
1052
|
+
* occured.</p>
|
|
1005
1053
|
*/
|
|
1006
1054
|
StatusMessage?: string;
|
|
1007
1055
|
/**
|
|
@@ -1431,6 +1479,14 @@ export declare const AnalyzeDocumentResponseFilterSensitiveLog: (obj: AnalyzeDoc
|
|
|
1431
1479
|
* @internal
|
|
1432
1480
|
*/
|
|
1433
1481
|
export declare const AnalyzeExpenseRequestFilterSensitiveLog: (obj: AnalyzeExpenseRequest) => any;
|
|
1482
|
+
/**
|
|
1483
|
+
* @internal
|
|
1484
|
+
*/
|
|
1485
|
+
export declare const ExpenseCurrencyFilterSensitiveLog: (obj: ExpenseCurrency) => any;
|
|
1486
|
+
/**
|
|
1487
|
+
* @internal
|
|
1488
|
+
*/
|
|
1489
|
+
export declare const ExpenseGroupPropertyFilterSensitiveLog: (obj: ExpenseGroupProperty) => any;
|
|
1434
1490
|
/**
|
|
1435
1491
|
* @internal
|
|
1436
1492
|
*/
|
|
@@ -228,6 +228,14 @@ export declare class UnsupportedDocumentException extends __BaseException {
|
|
|
228
228
|
export interface AnalyzeExpenseRequest {
|
|
229
229
|
Document: Document | undefined;
|
|
230
230
|
}
|
|
231
|
+
export interface ExpenseCurrency {
|
|
232
|
+
Code?: string;
|
|
233
|
+
Confidence?: number;
|
|
234
|
+
}
|
|
235
|
+
export interface ExpenseGroupProperty {
|
|
236
|
+
Types?: string[];
|
|
237
|
+
Id?: string;
|
|
238
|
+
}
|
|
231
239
|
export interface ExpenseDetection {
|
|
232
240
|
Text?: string;
|
|
233
241
|
Geometry?: Geometry;
|
|
@@ -242,6 +250,8 @@ export interface ExpenseField {
|
|
|
242
250
|
LabelDetection?: ExpenseDetection;
|
|
243
251
|
ValueDetection?: ExpenseDetection;
|
|
244
252
|
PageNumber?: number;
|
|
253
|
+
Currency?: ExpenseCurrency;
|
|
254
|
+
GroupProperties?: ExpenseGroupProperty[];
|
|
245
255
|
}
|
|
246
256
|
export interface LineItemFields {
|
|
247
257
|
LineItemExpenseFields?: ExpenseField[];
|
|
@@ -254,6 +264,7 @@ export interface ExpenseDocument {
|
|
|
254
264
|
ExpenseIndex?: number;
|
|
255
265
|
SummaryFields?: ExpenseField[];
|
|
256
266
|
LineItemGroups?: LineItemGroup[];
|
|
267
|
+
Blocks?: Block[];
|
|
257
268
|
}
|
|
258
269
|
export interface AnalyzeExpenseResponse {
|
|
259
270
|
DocumentMetadata?: DocumentMetadata;
|
|
@@ -464,6 +475,12 @@ export declare const AnalyzeDocumentResponseFilterSensitiveLog: (
|
|
|
464
475
|
export declare const AnalyzeExpenseRequestFilterSensitiveLog: (
|
|
465
476
|
obj: AnalyzeExpenseRequest
|
|
466
477
|
) => any;
|
|
478
|
+
export declare const ExpenseCurrencyFilterSensitiveLog: (
|
|
479
|
+
obj: ExpenseCurrency
|
|
480
|
+
) => any;
|
|
481
|
+
export declare const ExpenseGroupPropertyFilterSensitiveLog: (
|
|
482
|
+
obj: ExpenseGroupProperty
|
|
483
|
+
) => any;
|
|
467
484
|
export declare const ExpenseDetectionFilterSensitiveLog: (
|
|
468
485
|
obj: ExpenseDetection
|
|
469
486
|
) => any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-textract",
|
|
3
3
|
"description": "AWS SDK for JavaScript Textract Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.200.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,39 +19,39 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
-
"@aws-sdk/config-resolver": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
26
|
-
"@aws-sdk/hash-node": "3.
|
|
27
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
28
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
29
|
-
"@aws-sdk/middleware-endpoint": "3.
|
|
30
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
31
|
-
"@aws-sdk/middleware-logger": "3.
|
|
32
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
33
|
-
"@aws-sdk/middleware-retry": "3.
|
|
34
|
-
"@aws-sdk/middleware-serde": "3.
|
|
35
|
-
"@aws-sdk/middleware-signing": "3.
|
|
36
|
-
"@aws-sdk/middleware-stack": "3.
|
|
37
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
38
|
-
"@aws-sdk/node-config-provider": "3.
|
|
39
|
-
"@aws-sdk/node-http-handler": "3.
|
|
40
|
-
"@aws-sdk/protocol-http": "3.
|
|
41
|
-
"@aws-sdk/smithy-client": "3.
|
|
42
|
-
"@aws-sdk/types": "3.
|
|
43
|
-
"@aws-sdk/url-parser": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.200.0",
|
|
23
|
+
"@aws-sdk/config-resolver": "3.200.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.200.0",
|
|
25
|
+
"@aws-sdk/fetch-http-handler": "3.200.0",
|
|
26
|
+
"@aws-sdk/hash-node": "3.200.0",
|
|
27
|
+
"@aws-sdk/invalid-dependency": "3.200.0",
|
|
28
|
+
"@aws-sdk/middleware-content-length": "3.200.0",
|
|
29
|
+
"@aws-sdk/middleware-endpoint": "3.200.0",
|
|
30
|
+
"@aws-sdk/middleware-host-header": "3.200.0",
|
|
31
|
+
"@aws-sdk/middleware-logger": "3.200.0",
|
|
32
|
+
"@aws-sdk/middleware-recursion-detection": "3.200.0",
|
|
33
|
+
"@aws-sdk/middleware-retry": "3.200.0",
|
|
34
|
+
"@aws-sdk/middleware-serde": "3.200.0",
|
|
35
|
+
"@aws-sdk/middleware-signing": "3.200.0",
|
|
36
|
+
"@aws-sdk/middleware-stack": "3.200.0",
|
|
37
|
+
"@aws-sdk/middleware-user-agent": "3.200.0",
|
|
38
|
+
"@aws-sdk/node-config-provider": "3.200.0",
|
|
39
|
+
"@aws-sdk/node-http-handler": "3.200.0",
|
|
40
|
+
"@aws-sdk/protocol-http": "3.200.0",
|
|
41
|
+
"@aws-sdk/smithy-client": "3.200.0",
|
|
42
|
+
"@aws-sdk/types": "3.200.0",
|
|
43
|
+
"@aws-sdk/url-parser": "3.200.0",
|
|
44
44
|
"@aws-sdk/util-base64-browser": "3.188.0",
|
|
45
45
|
"@aws-sdk/util-base64-node": "3.188.0",
|
|
46
46
|
"@aws-sdk/util-body-length-browser": "3.188.0",
|
|
47
47
|
"@aws-sdk/util-body-length-node": "3.188.0",
|
|
48
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
49
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
50
|
-
"@aws-sdk/util-endpoints": "3.
|
|
51
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
52
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
48
|
+
"@aws-sdk/util-defaults-mode-browser": "3.200.0",
|
|
49
|
+
"@aws-sdk/util-defaults-mode-node": "3.200.0",
|
|
50
|
+
"@aws-sdk/util-endpoints": "3.200.0",
|
|
51
|
+
"@aws-sdk/util-user-agent-browser": "3.200.0",
|
|
52
|
+
"@aws-sdk/util-user-agent-node": "3.200.0",
|
|
53
53
|
"@aws-sdk/util-utf8-browser": "3.188.0",
|
|
54
|
-
"@aws-sdk/util-utf8-node": "3.
|
|
54
|
+
"@aws-sdk/util-utf8-node": "3.199.0",
|
|
55
55
|
"tslib": "^2.3.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|