@aws-sdk/client-textract 3.33.0 → 3.36.1
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 +47 -0
- package/{dist/cjs → dist-cjs}/Textract.js +1 -7
- package/{dist/cjs → dist-cjs}/TextractClient.js +8 -19
- package/dist-cjs/commands/AnalyzeDocumentCommand.js +36 -0
- package/dist-cjs/commands/AnalyzeExpenseCommand.js +36 -0
- package/dist-cjs/commands/DetectDocumentTextCommand.js +36 -0
- package/dist-cjs/commands/GetDocumentAnalysisCommand.js +36 -0
- package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +36 -0
- package/dist-cjs/commands/StartDocumentAnalysisCommand.js +36 -0
- package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -148
- package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/Textract.js +2 -8
- package/{dist/es → dist-es}/TextractClient.js +2 -13
- package/dist-es/commands/AnalyzeDocumentCommand.js +39 -0
- package/{dist/es → dist-es}/commands/AnalyzeExpenseCommand.js +4 -43
- package/dist-es/commands/DetectDocumentTextCommand.js +39 -0
- package/dist-es/commands/GetDocumentAnalysisCommand.js +39 -0
- package/dist-es/commands/GetDocumentTextDetectionCommand.js +39 -0
- package/dist-es/commands/StartDocumentAnalysisCommand.js +39 -0
- package/dist-es/commands/StartDocumentTextDetectionCommand.js +39 -0
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -148
- package/{dist/es → dist-es}/protocols/Aws_json1_1.js +338 -344
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/Textract.d.ts +2 -2
- package/{dist/types → dist-types}/TextractClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/AnalyzeDocumentCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/AnalyzeExpenseCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DetectDocumentTextCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetDocumentAnalysisCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetDocumentTextDetectionCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StartDocumentAnalysisCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StartDocumentTextDetectionCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/Textract.d.ts +40 -0
- package/{dist/types → dist-types}/ts3.4/TextractClient.d.ts +32 -99
- package/dist-types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DetectDocumentTextCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +649 -0
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +52 -49
- package/Textract.ts +0 -422
- package/TextractClient.ts +0 -270
- package/commands/AnalyzeDocumentCommand.ts +0 -124
- package/commands/AnalyzeExpenseCommand.ts +0 -107
- package/commands/DetectDocumentTextCommand.ts +0 -104
- package/commands/GetDocumentAnalysisCommand.ts +0 -138
- package/commands/GetDocumentTextDetectionCommand.ts +0 -118
- package/commands/StartDocumentAnalysisCommand.ts +0 -111
- package/commands/StartDocumentTextDetectionCommand.ts +0 -113
- package/dist/cjs/Textract.js.map +0 -1
- package/dist/cjs/TextractClient.js.map +0 -1
- package/dist/cjs/commands/AnalyzeDocumentCommand.js +0 -91
- package/dist/cjs/commands/AnalyzeDocumentCommand.js.map +0 -1
- package/dist/cjs/commands/AnalyzeExpenseCommand.js +0 -74
- package/dist/cjs/commands/AnalyzeExpenseCommand.js.map +0 -1
- package/dist/cjs/commands/DetectDocumentTextCommand.js +0 -71
- package/dist/cjs/commands/DetectDocumentTextCommand.js.map +0 -1
- package/dist/cjs/commands/GetDocumentAnalysisCommand.js +0 -105
- package/dist/cjs/commands/GetDocumentAnalysisCommand.js.map +0 -1
- package/dist/cjs/commands/GetDocumentTextDetectionCommand.js +0 -85
- package/dist/cjs/commands/GetDocumentTextDetectionCommand.js.map +0 -1
- package/dist/cjs/commands/StartDocumentAnalysisCommand.js +0 -78
- package/dist/cjs/commands/StartDocumentAnalysisCommand.js.map +0 -1
- package/dist/cjs/commands/StartDocumentTextDetectionCommand.js +0 -77
- package/dist/cjs/commands/StartDocumentTextDetectionCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -91
- package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/Textract.js.map +0 -1
- package/dist/es/TextractClient.js.map +0 -1
- package/dist/es/commands/AnalyzeDocumentCommand.js +0 -95
- package/dist/es/commands/AnalyzeDocumentCommand.js.map +0 -1
- package/dist/es/commands/AnalyzeExpenseCommand.js.map +0 -1
- package/dist/es/commands/DetectDocumentTextCommand.js +0 -75
- package/dist/es/commands/DetectDocumentTextCommand.js.map +0 -1
- package/dist/es/commands/GetDocumentAnalysisCommand.js +0 -109
- package/dist/es/commands/GetDocumentAnalysisCommand.js.map +0 -1
- package/dist/es/commands/GetDocumentTextDetectionCommand.js +0 -89
- package/dist/es/commands/GetDocumentTextDetectionCommand.js.map +0 -1
- package/dist/es/commands/StartDocumentAnalysisCommand.js +0 -82
- package/dist/es/commands/StartDocumentAnalysisCommand.js.map +0 -1
- package/dist/es/commands/StartDocumentTextDetectionCommand.js +0 -81
- package/dist/es/commands/StartDocumentTextDetectionCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -11
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -91
- package/dist/es/protocols/Aws_json1_1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/ts3.4/Textract.d.ts +0 -212
- package/dist/types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +0 -65
- package/dist/types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +0 -48
- package/dist/types/ts3.4/commands/DetectDocumentTextCommand.d.ts +0 -45
- package/dist/types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +0 -79
- package/dist/types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +0 -59
- package/dist/types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +0 -52
- package/dist/types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +0 -51
- package/dist/types/ts3.4/models/models_0.d.ts +0 -1347
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -1627
- package/protocols/Aws_json1_1.ts +0 -2060
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
package/models/models_0.ts
DELETED
|
@@ -1,1627 +0,0 @@
|
|
|
1
|
-
import { LazyJsonString as __LazyJsonString } from "@aws-sdk/smithy-client";
|
|
2
|
-
import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* <p>You aren't authorized to perform the action. Use the Amazon Resource Name (ARN)
|
|
6
|
-
* of an authorized user or IAM role to perform the operation.</p>
|
|
7
|
-
*/
|
|
8
|
-
export interface AccessDeniedException extends __SmithyException, $MetadataBearer {
|
|
9
|
-
name: "AccessDeniedException";
|
|
10
|
-
$fault: "client";
|
|
11
|
-
Message?: string;
|
|
12
|
-
Code?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export namespace AccessDeniedException {
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export const filterSensitiveLog = (obj: AccessDeniedException): any => ({
|
|
20
|
-
...obj,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* <p>The S3 bucket name and file name that identifies the document.</p>
|
|
26
|
-
* <p>The AWS Region for the S3 bucket that contains the document must match the Region that
|
|
27
|
-
* you use for Amazon Textract operations.</p>
|
|
28
|
-
*
|
|
29
|
-
* <p>For Amazon Textract to process a file in an S3 bucket, the user must have
|
|
30
|
-
* permission to access the S3 bucket and file.
|
|
31
|
-
*
|
|
32
|
-
* </p>
|
|
33
|
-
*/
|
|
34
|
-
export interface S3Object {
|
|
35
|
-
/**
|
|
36
|
-
* <p>The name of the S3 bucket. Note that the # character is not valid in the file
|
|
37
|
-
* name.</p>
|
|
38
|
-
*/
|
|
39
|
-
Bucket?: string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* <p>The file name of the input document. Synchronous operations can use image files that are
|
|
43
|
-
* in JPEG or PNG format. Asynchronous operations also support PDF format files.</p>
|
|
44
|
-
*/
|
|
45
|
-
Name?: string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* <p>If the bucket has versioning enabled, you can specify the object version. </p>
|
|
49
|
-
*/
|
|
50
|
-
Version?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export namespace S3Object {
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
*/
|
|
57
|
-
export const filterSensitiveLog = (obj: S3Object): any => ({
|
|
58
|
-
...obj,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* <p>The input document, either as bytes or as an S3 object.</p>
|
|
64
|
-
* <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code>
|
|
65
|
-
* property. For example, you would use the <code>Bytes</code> property to pass a document
|
|
66
|
-
* loaded from a local file system. Image bytes passed by using the <code>Bytes</code>
|
|
67
|
-
* property must be base64 encoded. Your code might not need to encode document file bytes if
|
|
68
|
-
* you're using an AWS SDK to call Amazon Textract API operations. </p>
|
|
69
|
-
* <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the
|
|
70
|
-
* <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64
|
|
71
|
-
* encoded.</p>
|
|
72
|
-
* <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS
|
|
73
|
-
* Region that you use for Amazon Textract operations.</p>
|
|
74
|
-
* <p>If you use the AWS CLI to call Amazon Textract operations, passing image bytes using
|
|
75
|
-
* the Bytes property isn't supported. You must first upload the document to an Amazon S3
|
|
76
|
-
* bucket, and then call the operation using the S3Object property.</p>
|
|
77
|
-
*
|
|
78
|
-
* <p>For Amazon Textract to process an S3 object, the user must have permission
|
|
79
|
-
* to access the S3 object. </p>
|
|
80
|
-
*/
|
|
81
|
-
export interface Document {
|
|
82
|
-
/**
|
|
83
|
-
* <p>A blob of base64-encoded document bytes. The maximum size of a document that's provided
|
|
84
|
-
* in a blob of bytes is 5 MB. The document bytes must be in PNG or JPEG format.</p>
|
|
85
|
-
* <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
|
|
86
|
-
* image bytes passed using the <code>Bytes</code> field. </p>
|
|
87
|
-
*/
|
|
88
|
-
Bytes?: Uint8Array;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* <p>Identifies an S3 object as the document source. The maximum size of a document that's
|
|
92
|
-
* stored in an S3 bucket is 5 MB.</p>
|
|
93
|
-
*/
|
|
94
|
-
S3Object?: S3Object;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export namespace Document {
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
export const filterSensitiveLog = (obj: Document): any => ({
|
|
102
|
-
...obj,
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export enum FeatureType {
|
|
107
|
-
FORMS = "FORMS",
|
|
108
|
-
TABLES = "TABLES",
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export enum ContentClassifier {
|
|
112
|
-
FREE_OF_ADULT_CONTENT = "FreeOfAdultContent",
|
|
113
|
-
FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION = "FreeOfPersonallyIdentifiableInformation",
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* <p>Allows you to set attributes of the image. Currently, you can declare an image as free
|
|
118
|
-
* of personally identifiable information and adult content. </p>
|
|
119
|
-
*/
|
|
120
|
-
export interface HumanLoopDataAttributes {
|
|
121
|
-
/**
|
|
122
|
-
* <p>Sets whether the input image is free of personally identifiable information or adult
|
|
123
|
-
* content.</p>
|
|
124
|
-
*/
|
|
125
|
-
ContentClassifiers?: (ContentClassifier | string)[];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export namespace HumanLoopDataAttributes {
|
|
129
|
-
/**
|
|
130
|
-
* @internal
|
|
131
|
-
*/
|
|
132
|
-
export const filterSensitiveLog = (obj: HumanLoopDataAttributes): any => ({
|
|
133
|
-
...obj,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* <p>Sets up the human review workflow the document will be sent to if one of the conditions
|
|
139
|
-
* is met. You can also set certain attributes of the image before review. </p>
|
|
140
|
-
*/
|
|
141
|
-
export interface HumanLoopConfig {
|
|
142
|
-
/**
|
|
143
|
-
* <p>The name of the human workflow used for this image. This should be kept unique within a
|
|
144
|
-
* region.</p>
|
|
145
|
-
*/
|
|
146
|
-
HumanLoopName: string | undefined;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* <p>The Amazon Resource Name (ARN) of the flow definition.</p>
|
|
150
|
-
*/
|
|
151
|
-
FlowDefinitionArn: string | undefined;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* <p>Sets attributes of the input data.</p>
|
|
155
|
-
*/
|
|
156
|
-
DataAttributes?: HumanLoopDataAttributes;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export namespace HumanLoopConfig {
|
|
160
|
-
/**
|
|
161
|
-
* @internal
|
|
162
|
-
*/
|
|
163
|
-
export const filterSensitiveLog = (obj: HumanLoopConfig): any => ({
|
|
164
|
-
...obj,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface AnalyzeDocumentRequest {
|
|
169
|
-
/**
|
|
170
|
-
* <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI
|
|
171
|
-
* to call Amazon Textract operations, you can't pass image bytes. The document must be an image
|
|
172
|
-
* in JPEG or PNG format.</p>
|
|
173
|
-
* <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
|
|
174
|
-
* image bytes that are passed using the <code>Bytes</code> field. </p>
|
|
175
|
-
*/
|
|
176
|
-
Document: Document | undefined;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* <p>A list of the types of analysis to perform. Add TABLES to the list to return information
|
|
180
|
-
* about the tables that are detected in the input document. Add FORMS to return detected form data.
|
|
181
|
-
* To perform both types of analysis, add TABLES and FORMS to
|
|
182
|
-
* <code>FeatureTypes</code>. All lines and words detected in the document are included in
|
|
183
|
-
* the response (including text that isn't related to the value of <code>FeatureTypes</code>). </p>
|
|
184
|
-
*/
|
|
185
|
-
FeatureTypes: (FeatureType | string)[] | undefined;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* <p>Sets the configuration for the human in the loop workflow for analyzing documents.</p>
|
|
189
|
-
*/
|
|
190
|
-
HumanLoopConfig?: HumanLoopConfig;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export namespace AnalyzeDocumentRequest {
|
|
194
|
-
/**
|
|
195
|
-
* @internal
|
|
196
|
-
*/
|
|
197
|
-
export const filterSensitiveLog = (obj: AnalyzeDocumentRequest): any => ({
|
|
198
|
-
...obj,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export enum BlockType {
|
|
203
|
-
CELL = "CELL",
|
|
204
|
-
KEY_VALUE_SET = "KEY_VALUE_SET",
|
|
205
|
-
LINE = "LINE",
|
|
206
|
-
PAGE = "PAGE",
|
|
207
|
-
SELECTION_ELEMENT = "SELECTION_ELEMENT",
|
|
208
|
-
TABLE = "TABLE",
|
|
209
|
-
WORD = "WORD",
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export enum EntityType {
|
|
213
|
-
KEY = "KEY",
|
|
214
|
-
VALUE = "VALUE",
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* <p>The bounding box around the detected page, text, key-value pair, table, table cell, or
|
|
219
|
-
* selection element on a document page. The <code>left</code> (x-coordinate) and
|
|
220
|
-
* <code>top</code> (y-coordinate) are coordinates that represent the top and left sides of
|
|
221
|
-
* the bounding box. Note that the upper-left corner of the image is the origin (0,0). </p>
|
|
222
|
-
* <p>The <code>top</code> and <code>left</code> values returned are ratios of the overall
|
|
223
|
-
* document page size. For example, if the input image is 700 x 200 pixels, and the top-left
|
|
224
|
-
* coordinate of the bounding box is 350 x 50 pixels, the API returns a <code>left</code>
|
|
225
|
-
* value of 0.5 (350/700) and a <code>top</code> value of 0.25 (50/200).</p>
|
|
226
|
-
* <p>The <code>width</code> and <code>height</code> values represent the dimensions of the
|
|
227
|
-
* bounding box as a ratio of the overall document page dimension. For example, if the
|
|
228
|
-
* document page size is 700 x 200 pixels, and the bounding box width is 70 pixels, the width
|
|
229
|
-
* returned is 0.1. </p>
|
|
230
|
-
*/
|
|
231
|
-
export interface BoundingBox {
|
|
232
|
-
/**
|
|
233
|
-
* <p>The width of the bounding box as a ratio of the overall document page
|
|
234
|
-
* width.</p>
|
|
235
|
-
*/
|
|
236
|
-
Width?: number;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* <p>The height of the bounding box as a ratio of the overall document page
|
|
240
|
-
* height.</p>
|
|
241
|
-
*/
|
|
242
|
-
Height?: number;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* <p>The left coordinate of the bounding box as a ratio of overall document page
|
|
246
|
-
* width.</p>
|
|
247
|
-
*/
|
|
248
|
-
Left?: number;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* <p>The top coordinate of the bounding box as a ratio of overall document page
|
|
252
|
-
* height.</p>
|
|
253
|
-
*/
|
|
254
|
-
Top?: number;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export namespace BoundingBox {
|
|
258
|
-
/**
|
|
259
|
-
* @internal
|
|
260
|
-
*/
|
|
261
|
-
export const filterSensitiveLog = (obj: BoundingBox): any => ({
|
|
262
|
-
...obj,
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* <p>The X and Y coordinates of a point on a document page. The X and Y
|
|
268
|
-
* values that are returned are ratios of the overall document page size. For example, if the
|
|
269
|
-
* input document is 700 x 200 and the operation returns X=0.5 and Y=0.25, then the point is
|
|
270
|
-
* at the (350,50) pixel coordinate on the document page.</p>
|
|
271
|
-
*
|
|
272
|
-
* <p>An array of <code>Point</code> objects, <code>Polygon</code>, is returned
|
|
273
|
-
* by <a>DetectDocumentText</a>. <code>Polygon</code> represents a fine-grained
|
|
274
|
-
* polygon around detected text. For more information, see Geometry in the Amazon Textract
|
|
275
|
-
* Developer Guide. </p>
|
|
276
|
-
*/
|
|
277
|
-
export interface Point {
|
|
278
|
-
/**
|
|
279
|
-
* <p>The value of the X coordinate for a point on a <code>Polygon</code>.</p>
|
|
280
|
-
*/
|
|
281
|
-
X?: number;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* <p>The value of the Y coordinate for a point on a <code>Polygon</code>.</p>
|
|
285
|
-
*/
|
|
286
|
-
Y?: number;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export namespace Point {
|
|
290
|
-
/**
|
|
291
|
-
* @internal
|
|
292
|
-
*/
|
|
293
|
-
export const filterSensitiveLog = (obj: Point): any => ({
|
|
294
|
-
...obj,
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* <p>Information about where the following items are located on a document page: detected
|
|
300
|
-
* page, text, key-value pairs, tables, table cells, and selection elements.</p>
|
|
301
|
-
*/
|
|
302
|
-
export interface Geometry {
|
|
303
|
-
/**
|
|
304
|
-
* <p>An axis-aligned coarse representation of the location of the recognized item on the
|
|
305
|
-
* document page.</p>
|
|
306
|
-
*/
|
|
307
|
-
BoundingBox?: BoundingBox;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* <p>Within the bounding box, a fine-grained polygon around the recognized item.</p>
|
|
311
|
-
*/
|
|
312
|
-
Polygon?: Point[];
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
export namespace Geometry {
|
|
316
|
-
/**
|
|
317
|
-
* @internal
|
|
318
|
-
*/
|
|
319
|
-
export const filterSensitiveLog = (obj: Geometry): any => ({
|
|
320
|
-
...obj,
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export enum RelationshipType {
|
|
325
|
-
CHILD = "CHILD",
|
|
326
|
-
COMPLEX_FEATURES = "COMPLEX_FEATURES",
|
|
327
|
-
VALUE = "VALUE",
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* <p>Information about how blocks are related to each other. A <code>Block</code> object
|
|
332
|
-
* contains 0 or more <code>Relation</code> objects in a list, <code>Relationships</code>. For
|
|
333
|
-
* more information, see <a>Block</a>.</p>
|
|
334
|
-
* <p>The <code>Type</code> element provides the type of the relationship for all blocks in
|
|
335
|
-
* the <code>IDs</code> array. </p>
|
|
336
|
-
*/
|
|
337
|
-
export interface Relationship {
|
|
338
|
-
/**
|
|
339
|
-
* <p>The type of relationship that the blocks in the IDs array have with the current block.
|
|
340
|
-
* The relationship can be <code>VALUE</code> or <code>CHILD</code>. A relationship of type
|
|
341
|
-
* VALUE is a list that contains the ID of the VALUE block that's associated with the KEY of a
|
|
342
|
-
* key-value pair. A relationship of type CHILD is a list of IDs that identify WORD blocks in
|
|
343
|
-
* the case of lines Cell blocks in the case of Tables, and WORD blocks in the case of
|
|
344
|
-
* Selection Elements.</p>
|
|
345
|
-
*/
|
|
346
|
-
Type?: RelationshipType | string;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* <p>An
|
|
350
|
-
* array of IDs for related blocks. You can get the type of the relationship from the
|
|
351
|
-
* <code>Type</code> element.</p>
|
|
352
|
-
*/
|
|
353
|
-
Ids?: string[];
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
export namespace Relationship {
|
|
357
|
-
/**
|
|
358
|
-
* @internal
|
|
359
|
-
*/
|
|
360
|
-
export const filterSensitiveLog = (obj: Relationship): any => ({
|
|
361
|
-
...obj,
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
export enum SelectionStatus {
|
|
366
|
-
NOT_SELECTED = "NOT_SELECTED",
|
|
367
|
-
SELECTED = "SELECTED",
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export enum TextType {
|
|
371
|
-
HANDWRITING = "HANDWRITING",
|
|
372
|
-
PRINTED = "PRINTED",
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* <p>A <code>Block</code> represents items that are recognized in a document within a group
|
|
377
|
-
* of pixels close to each other. The information returned in a <code>Block</code> object
|
|
378
|
-
* depends on the type of operation. In text detection for documents (for example <a>DetectDocumentText</a>), you get information about the detected words and lines
|
|
379
|
-
* of text. In text analysis (for example <a>AnalyzeDocument</a>), you can also get
|
|
380
|
-
* information about the fields, tables, and selection elements that are detected in the
|
|
381
|
-
* document.</p>
|
|
382
|
-
* <p>An array of <code>Block</code> objects is returned by both synchronous and asynchronous
|
|
383
|
-
* operations. In synchronous operations, such as <a>DetectDocumentText</a>, the
|
|
384
|
-
* array of <code>Block</code> objects is the entire set of results. In asynchronous
|
|
385
|
-
* operations, such as <a>GetDocumentAnalysis</a>, the array is returned over one
|
|
386
|
-
* or more responses.</p>
|
|
387
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html">How Amazon Textract Works</a>.</p>
|
|
388
|
-
*/
|
|
389
|
-
export interface Block {
|
|
390
|
-
/**
|
|
391
|
-
* <p>The type of text item that's recognized. In operations for text detection, the following
|
|
392
|
-
* types are returned:</p>
|
|
393
|
-
* <ul>
|
|
394
|
-
* <li>
|
|
395
|
-
* <p>
|
|
396
|
-
* <i>PAGE</i> - Contains a list of the LINE <code>Block</code> objects
|
|
397
|
-
* that are detected on a document page.</p>
|
|
398
|
-
* </li>
|
|
399
|
-
* <li>
|
|
400
|
-
* <p>
|
|
401
|
-
* <i>WORD</i> - A word detected on a document page. A word is one or
|
|
402
|
-
* more ISO basic Latin script characters that aren't separated by spaces.</p>
|
|
403
|
-
* </li>
|
|
404
|
-
* <li>
|
|
405
|
-
* <p>
|
|
406
|
-
* <i>LINE</i> - A string of tab-delimited, contiguous words that are
|
|
407
|
-
* detected on a document page.</p>
|
|
408
|
-
* </li>
|
|
409
|
-
* </ul>
|
|
410
|
-
* <p>In text analysis operations, the following types are returned:</p>
|
|
411
|
-
* <ul>
|
|
412
|
-
* <li>
|
|
413
|
-
* <p>
|
|
414
|
-
* <i>PAGE</i> - Contains a list of child <code>Block</code> objects
|
|
415
|
-
* that are detected on a document page.</p>
|
|
416
|
-
* </li>
|
|
417
|
-
* <li>
|
|
418
|
-
* <p>
|
|
419
|
-
* <i>KEY_VALUE_SET</i> - Stores the KEY and VALUE <code>Block</code>
|
|
420
|
-
* objects for linked text that's detected on a document page. Use the
|
|
421
|
-
* <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY
|
|
422
|
-
* <code>Block</code> object or a VALUE <code>Block</code> object. </p>
|
|
423
|
-
* </li>
|
|
424
|
-
* <li>
|
|
425
|
-
* <p>
|
|
426
|
-
* <i>WORD</i> - A word that's detected on a document page. A word is
|
|
427
|
-
* one or more ISO basic Latin script characters that aren't separated by spaces.</p>
|
|
428
|
-
* </li>
|
|
429
|
-
* <li>
|
|
430
|
-
* <p>
|
|
431
|
-
* <i>LINE</i> - A string of tab-delimited, contiguous words that are
|
|
432
|
-
* detected on a document page.</p>
|
|
433
|
-
* </li>
|
|
434
|
-
* <li>
|
|
435
|
-
* <p>
|
|
436
|
-
* <i>TABLE</i> - A table that's detected on a document page. A table
|
|
437
|
-
* is grid-based information with two or more rows or columns, with a cell span of one
|
|
438
|
-
* row and one column each. </p>
|
|
439
|
-
* </li>
|
|
440
|
-
* <li>
|
|
441
|
-
* <p>
|
|
442
|
-
* <i>CELL</i> - A cell within a detected table. The cell is the parent
|
|
443
|
-
* of the block that contains the text in the cell.</p>
|
|
444
|
-
* </li>
|
|
445
|
-
* <li>
|
|
446
|
-
* <p>
|
|
447
|
-
* <i>SELECTION_ELEMENT</i> - A selection element such as an option
|
|
448
|
-
* button (radio button) or a check box that's detected on a document page. Use the
|
|
449
|
-
* value of <code>SelectionStatus</code> to determine the status of the selection
|
|
450
|
-
* element.</p>
|
|
451
|
-
* </li>
|
|
452
|
-
* </ul>
|
|
453
|
-
*/
|
|
454
|
-
BlockType?: BlockType | string;
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* <p>The confidence score that Amazon Textract has in the accuracy of the recognized text and
|
|
458
|
-
* the accuracy of the geometry points around the recognized text.</p>
|
|
459
|
-
*/
|
|
460
|
-
Confidence?: number;
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* <p>The word or line of text that's recognized by Amazon Textract. </p>
|
|
464
|
-
*/
|
|
465
|
-
Text?: string;
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* <p>The kind of text that Amazon Textract has detected. Can check for handwritten text and
|
|
469
|
-
* printed text.</p>
|
|
470
|
-
*/
|
|
471
|
-
TextType?: TextType | string;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* <p>The row in which a table cell is located. The first row position is 1.
|
|
475
|
-
* <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and
|
|
476
|
-
* <code>GetDocumentTextDetection</code>.</p>
|
|
477
|
-
*/
|
|
478
|
-
RowIndex?: number;
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* <p>The column in which a table cell appears. The first column position is 1.
|
|
482
|
-
* <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and
|
|
483
|
-
* <code>GetDocumentTextDetection</code>.</p>
|
|
484
|
-
*/
|
|
485
|
-
ColumnIndex?: number;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* <p>The number of rows that a table cell spans. Currently this value is always 1, even if
|
|
489
|
-
* the number of rows spanned is greater than 1. <code>RowSpan</code> isn't returned by
|
|
490
|
-
* <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
|
|
491
|
-
*/
|
|
492
|
-
RowSpan?: number;
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* <p>The number of columns that a table cell spans. Currently this value is always 1, even if
|
|
496
|
-
* the number of columns spanned is greater than 1. <code>ColumnSpan</code> isn't returned by
|
|
497
|
-
* <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>. </p>
|
|
498
|
-
*/
|
|
499
|
-
ColumnSpan?: number;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* <p>The location of the recognized text on the image. It includes an axis-aligned, coarse
|
|
503
|
-
* bounding box that surrounds the text, and a finer-grain polygon for more accurate spatial
|
|
504
|
-
* information. </p>
|
|
505
|
-
*/
|
|
506
|
-
Geometry?: Geometry;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* <p>The identifier for the recognized text. The identifier is only unique for a single
|
|
510
|
-
* operation. </p>
|
|
511
|
-
*/
|
|
512
|
-
Id?: string;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* <p>A list of child blocks of the current block. For example, a LINE object has child blocks
|
|
516
|
-
* for each WORD block that's part of the line of text. There aren't Relationship objects in
|
|
517
|
-
* the list for relationships that don't exist, such as when the current block has no child
|
|
518
|
-
* blocks. The list size can be the following:</p>
|
|
519
|
-
* <ul>
|
|
520
|
-
* <li>
|
|
521
|
-
* <p>0 - The block has no child blocks.</p>
|
|
522
|
-
* </li>
|
|
523
|
-
* <li>
|
|
524
|
-
* <p>1 - The block has child blocks.</p>
|
|
525
|
-
* </li>
|
|
526
|
-
* </ul>
|
|
527
|
-
*/
|
|
528
|
-
Relationships?: Relationship[];
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* <p>The type of entity. The following can be returned:</p>
|
|
532
|
-
* <ul>
|
|
533
|
-
* <li>
|
|
534
|
-
* <p>
|
|
535
|
-
* <i>KEY</i> - An identifier for a field on the document.</p>
|
|
536
|
-
* </li>
|
|
537
|
-
* <li>
|
|
538
|
-
* <p>
|
|
539
|
-
* <i>VALUE</i> - The field text.</p>
|
|
540
|
-
* </li>
|
|
541
|
-
* </ul>
|
|
542
|
-
* <p>
|
|
543
|
-
* <code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and
|
|
544
|
-
* <code>GetDocumentTextDetection</code>.</p>
|
|
545
|
-
*/
|
|
546
|
-
EntityTypes?: (EntityType | string)[];
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* <p>The selection status of a selection element, such as an option button or check box.
|
|
550
|
-
* </p>
|
|
551
|
-
*/
|
|
552
|
-
SelectionStatus?: SelectionStatus | string;
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* <p>The page on which a block was detected. <code>Page</code> is returned by asynchronous
|
|
556
|
-
* operations. Page values greater than 1 are only returned for multipage documents that are
|
|
557
|
-
* in PDF format. A scanned image (JPEG/PNG), even if it contains multiple document pages, is
|
|
558
|
-
* considered to be a single-page document. The value of <code>Page</code> is always 1.
|
|
559
|
-
* Synchronous operations don't return <code>Page</code> because every input document is
|
|
560
|
-
* considered to be a single-page document.</p>
|
|
561
|
-
*/
|
|
562
|
-
Page?: number;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
export namespace Block {
|
|
566
|
-
/**
|
|
567
|
-
* @internal
|
|
568
|
-
*/
|
|
569
|
-
export const filterSensitiveLog = (obj: Block): any => ({
|
|
570
|
-
...obj,
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* <p>Information about the input document.</p>
|
|
576
|
-
*/
|
|
577
|
-
export interface DocumentMetadata {
|
|
578
|
-
/**
|
|
579
|
-
* <p>The number of pages that are detected in the document.</p>
|
|
580
|
-
*/
|
|
581
|
-
Pages?: number;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
export namespace DocumentMetadata {
|
|
585
|
-
/**
|
|
586
|
-
* @internal
|
|
587
|
-
*/
|
|
588
|
-
export const filterSensitiveLog = (obj: DocumentMetadata): any => ({
|
|
589
|
-
...obj,
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* <p>Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, the
|
|
595
|
-
* input did not trigger human review.</p>
|
|
596
|
-
*/
|
|
597
|
-
export interface HumanLoopActivationOutput {
|
|
598
|
-
/**
|
|
599
|
-
* <p>The Amazon Resource Name (ARN) of the HumanLoop created.</p>
|
|
600
|
-
*/
|
|
601
|
-
HumanLoopArn?: string;
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* <p>Shows if and why human review was needed.</p>
|
|
605
|
-
*/
|
|
606
|
-
HumanLoopActivationReasons?: string[];
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* <p>Shows the result of condition evaluations, including those conditions which activated a
|
|
610
|
-
* human review.</p>
|
|
611
|
-
*/
|
|
612
|
-
HumanLoopActivationConditionsEvaluationResults?: __LazyJsonString | string;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
export namespace HumanLoopActivationOutput {
|
|
616
|
-
/**
|
|
617
|
-
* @internal
|
|
618
|
-
*/
|
|
619
|
-
export const filterSensitiveLog = (obj: HumanLoopActivationOutput): any => ({
|
|
620
|
-
...obj,
|
|
621
|
-
});
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
export interface AnalyzeDocumentResponse {
|
|
625
|
-
/**
|
|
626
|
-
* <p>Metadata about the analyzed document. An example is the number of pages.</p>
|
|
627
|
-
*/
|
|
628
|
-
DocumentMetadata?: DocumentMetadata;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* <p>The items that are detected and analyzed by <code>AnalyzeDocument</code>.</p>
|
|
632
|
-
*/
|
|
633
|
-
Blocks?: Block[];
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* <p>Shows the results of the human in the loop evaluation.</p>
|
|
637
|
-
*/
|
|
638
|
-
HumanLoopActivationOutput?: HumanLoopActivationOutput;
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* <p>The version of the model used to analyze the document.</p>
|
|
642
|
-
*/
|
|
643
|
-
AnalyzeDocumentModelVersion?: string;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
export namespace AnalyzeDocumentResponse {
|
|
647
|
-
/**
|
|
648
|
-
* @internal
|
|
649
|
-
*/
|
|
650
|
-
export const filterSensitiveLog = (obj: AnalyzeDocumentResponse): any => ({
|
|
651
|
-
...obj,
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* <p>Amazon Textract isn't able to read the document. For more information on the document
|
|
657
|
-
* limits in Amazon Textract, see <a>limits</a>.</p>
|
|
658
|
-
*/
|
|
659
|
-
export interface BadDocumentException extends __SmithyException, $MetadataBearer {
|
|
660
|
-
name: "BadDocumentException";
|
|
661
|
-
$fault: "client";
|
|
662
|
-
Message?: string;
|
|
663
|
-
Code?: string;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
export namespace BadDocumentException {
|
|
667
|
-
/**
|
|
668
|
-
* @internal
|
|
669
|
-
*/
|
|
670
|
-
export const filterSensitiveLog = (obj: BadDocumentException): any => ({
|
|
671
|
-
...obj,
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* <p>The document can't be processed because it's too large. The maximum document size for
|
|
677
|
-
* synchronous operations 10 MB. The maximum document size for asynchronous operations is 500
|
|
678
|
-
* MB for PDF files.</p>
|
|
679
|
-
*/
|
|
680
|
-
export interface DocumentTooLargeException extends __SmithyException, $MetadataBearer {
|
|
681
|
-
name: "DocumentTooLargeException";
|
|
682
|
-
$fault: "client";
|
|
683
|
-
Message?: string;
|
|
684
|
-
Code?: string;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
export namespace DocumentTooLargeException {
|
|
688
|
-
/**
|
|
689
|
-
* @internal
|
|
690
|
-
*/
|
|
691
|
-
export const filterSensitiveLog = (obj: DocumentTooLargeException): any => ({
|
|
692
|
-
...obj,
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* <p>Indicates you have exceeded the maximum number of active human in the loop workflows available</p>
|
|
698
|
-
*/
|
|
699
|
-
export interface HumanLoopQuotaExceededException extends __SmithyException, $MetadataBearer {
|
|
700
|
-
name: "HumanLoopQuotaExceededException";
|
|
701
|
-
$fault: "client";
|
|
702
|
-
/**
|
|
703
|
-
* <p>The resource type.</p>
|
|
704
|
-
*/
|
|
705
|
-
ResourceType?: string;
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* <p>The quota code.</p>
|
|
709
|
-
*/
|
|
710
|
-
QuotaCode?: string;
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* <p>The service code.</p>
|
|
714
|
-
*/
|
|
715
|
-
ServiceCode?: string;
|
|
716
|
-
|
|
717
|
-
Message?: string;
|
|
718
|
-
Code?: string;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
export namespace HumanLoopQuotaExceededException {
|
|
722
|
-
/**
|
|
723
|
-
* @internal
|
|
724
|
-
*/
|
|
725
|
-
export const filterSensitiveLog = (obj: HumanLoopQuotaExceededException): any => ({
|
|
726
|
-
...obj,
|
|
727
|
-
});
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* <p>Amazon Textract experienced a service issue. Try your call again.</p>
|
|
732
|
-
*/
|
|
733
|
-
export interface InternalServerError extends __SmithyException, $MetadataBearer {
|
|
734
|
-
name: "InternalServerError";
|
|
735
|
-
$fault: "server";
|
|
736
|
-
Message?: string;
|
|
737
|
-
Code?: string;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
export namespace InternalServerError {
|
|
741
|
-
/**
|
|
742
|
-
* @internal
|
|
743
|
-
*/
|
|
744
|
-
export const filterSensitiveLog = (obj: InternalServerError): any => ({
|
|
745
|
-
...obj,
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* <p>An input parameter violated a constraint. For example, in synchronous operations,
|
|
751
|
-
* an <code>InvalidParameterException</code> exception occurs
|
|
752
|
-
* when neither of the <code>S3Object</code> or <code>Bytes</code> values are supplied in the <code>Document</code>
|
|
753
|
-
* request parameter.
|
|
754
|
-
* Validate your parameter before calling the API operation again.</p>
|
|
755
|
-
*/
|
|
756
|
-
export interface InvalidParameterException extends __SmithyException, $MetadataBearer {
|
|
757
|
-
name: "InvalidParameterException";
|
|
758
|
-
$fault: "client";
|
|
759
|
-
Message?: string;
|
|
760
|
-
Code?: string;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
export namespace InvalidParameterException {
|
|
764
|
-
/**
|
|
765
|
-
* @internal
|
|
766
|
-
*/
|
|
767
|
-
export const filterSensitiveLog = (obj: InvalidParameterException): any => ({
|
|
768
|
-
...obj,
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
/**
|
|
773
|
-
* <p>Amazon Textract is unable to access the S3 object that's specified in the request.
|
|
774
|
-
* for more information, <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Configure Access to Amazon S3</a>
|
|
775
|
-
* For troubleshooting information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html">Troubleshooting Amazon S3</a>
|
|
776
|
-
* </p>
|
|
777
|
-
*/
|
|
778
|
-
export interface InvalidS3ObjectException extends __SmithyException, $MetadataBearer {
|
|
779
|
-
name: "InvalidS3ObjectException";
|
|
780
|
-
$fault: "client";
|
|
781
|
-
Message?: string;
|
|
782
|
-
Code?: string;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
export namespace InvalidS3ObjectException {
|
|
786
|
-
/**
|
|
787
|
-
* @internal
|
|
788
|
-
*/
|
|
789
|
-
export const filterSensitiveLog = (obj: InvalidS3ObjectException): any => ({
|
|
790
|
-
...obj,
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* <p>The number of requests exceeded your throughput limit. If you want to increase this limit,
|
|
796
|
-
* contact Amazon Textract.</p>
|
|
797
|
-
*/
|
|
798
|
-
export interface ProvisionedThroughputExceededException extends __SmithyException, $MetadataBearer {
|
|
799
|
-
name: "ProvisionedThroughputExceededException";
|
|
800
|
-
$fault: "client";
|
|
801
|
-
Message?: string;
|
|
802
|
-
Code?: string;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
export namespace ProvisionedThroughputExceededException {
|
|
806
|
-
/**
|
|
807
|
-
* @internal
|
|
808
|
-
*/
|
|
809
|
-
export const filterSensitiveLog = (obj: ProvisionedThroughputExceededException): any => ({
|
|
810
|
-
...obj,
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* <p>Amazon Textract is temporarily unable to process the request. Try your call again.</p>
|
|
816
|
-
*/
|
|
817
|
-
export interface ThrottlingException extends __SmithyException, $MetadataBearer {
|
|
818
|
-
name: "ThrottlingException";
|
|
819
|
-
$fault: "server";
|
|
820
|
-
Message?: string;
|
|
821
|
-
Code?: string;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
export namespace ThrottlingException {
|
|
825
|
-
/**
|
|
826
|
-
* @internal
|
|
827
|
-
*/
|
|
828
|
-
export const filterSensitiveLog = (obj: ThrottlingException): any => ({
|
|
829
|
-
...obj,
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* <p>The format of the input document isn't supported. Documents for synchronous operations can be in
|
|
835
|
-
* PNG or JPEG format. Documents for asynchronous operations can also be in PDF format.</p>
|
|
836
|
-
*/
|
|
837
|
-
export interface UnsupportedDocumentException extends __SmithyException, $MetadataBearer {
|
|
838
|
-
name: "UnsupportedDocumentException";
|
|
839
|
-
$fault: "client";
|
|
840
|
-
Message?: string;
|
|
841
|
-
Code?: string;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
export namespace UnsupportedDocumentException {
|
|
845
|
-
/**
|
|
846
|
-
* @internal
|
|
847
|
-
*/
|
|
848
|
-
export const filterSensitiveLog = (obj: UnsupportedDocumentException): any => ({
|
|
849
|
-
...obj,
|
|
850
|
-
});
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
export interface AnalyzeExpenseRequest {
|
|
854
|
-
/**
|
|
855
|
-
* <p>The input document, either as bytes or as an S3 object.</p>
|
|
856
|
-
* <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code>
|
|
857
|
-
* property. For example, you would use the <code>Bytes</code> property to pass a document
|
|
858
|
-
* loaded from a local file system. Image bytes passed by using the <code>Bytes</code>
|
|
859
|
-
* property must be base64 encoded. Your code might not need to encode document file bytes if
|
|
860
|
-
* you're using an AWS SDK to call Amazon Textract API operations. </p>
|
|
861
|
-
* <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the
|
|
862
|
-
* <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64
|
|
863
|
-
* encoded.</p>
|
|
864
|
-
* <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS
|
|
865
|
-
* Region that you use for Amazon Textract operations.</p>
|
|
866
|
-
* <p>If you use the AWS CLI to call Amazon Textract operations, passing image bytes using
|
|
867
|
-
* the Bytes property isn't supported. You must first upload the document to an Amazon S3
|
|
868
|
-
* bucket, and then call the operation using the S3Object property.</p>
|
|
869
|
-
*
|
|
870
|
-
* <p>For Amazon Textract to process an S3 object, the user must have permission
|
|
871
|
-
* to access the S3 object. </p>
|
|
872
|
-
*/
|
|
873
|
-
Document: Document | undefined;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
export namespace AnalyzeExpenseRequest {
|
|
877
|
-
/**
|
|
878
|
-
* @internal
|
|
879
|
-
*/
|
|
880
|
-
export const filterSensitiveLog = (obj: AnalyzeExpenseRequest): any => ({
|
|
881
|
-
...obj,
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* <p>An object used to store information about the Value or Label detected by Amazon Textract.</p>
|
|
887
|
-
*/
|
|
888
|
-
export interface ExpenseDetection {
|
|
889
|
-
/**
|
|
890
|
-
* <p>The word or line of text recognized by Amazon Textract</p>
|
|
891
|
-
*/
|
|
892
|
-
Text?: string;
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
* <p>Information about where the following items are located on a document page: detected
|
|
896
|
-
* page, text, key-value pairs, tables, table cells, and selection elements.</p>
|
|
897
|
-
*/
|
|
898
|
-
Geometry?: Geometry;
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* <p>The confidence in detection, as a percentage</p>
|
|
902
|
-
*/
|
|
903
|
-
Confidence?: number;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
export namespace ExpenseDetection {
|
|
907
|
-
/**
|
|
908
|
-
* @internal
|
|
909
|
-
*/
|
|
910
|
-
export const filterSensitiveLog = (obj: ExpenseDetection): any => ({
|
|
911
|
-
...obj,
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* <p>An object used to store information about the Type detected by Amazon Textract.</p>
|
|
917
|
-
*/
|
|
918
|
-
export interface ExpenseType {
|
|
919
|
-
/**
|
|
920
|
-
* <p>The word or line of text detected by Amazon Textract.</p>
|
|
921
|
-
*/
|
|
922
|
-
Text?: string;
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* <p>The confidence of accuracy, as a percentage.</p>
|
|
926
|
-
*/
|
|
927
|
-
Confidence?: number;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
export namespace ExpenseType {
|
|
931
|
-
/**
|
|
932
|
-
* @internal
|
|
933
|
-
*/
|
|
934
|
-
export const filterSensitiveLog = (obj: ExpenseType): any => ({
|
|
935
|
-
...obj,
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* <p>Breakdown of detected information, seperated into
|
|
941
|
-
* the catagories Type, LableDetection, and ValueDetection</p>
|
|
942
|
-
*/
|
|
943
|
-
export interface ExpenseField {
|
|
944
|
-
/**
|
|
945
|
-
* <p>The implied label of a detected element. Present alongside LabelDetection for explicit elements.</p>
|
|
946
|
-
*/
|
|
947
|
-
Type?: ExpenseType;
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* <p>The explicitly stated label of a detected element.</p>
|
|
951
|
-
*/
|
|
952
|
-
LabelDetection?: ExpenseDetection;
|
|
953
|
-
|
|
954
|
-
/**
|
|
955
|
-
* <p>The value of a detected element. Present in explicit and implicit elements.</p>
|
|
956
|
-
*/
|
|
957
|
-
ValueDetection?: ExpenseDetection;
|
|
958
|
-
|
|
959
|
-
/**
|
|
960
|
-
* <p>The page number the value was detected on.</p>
|
|
961
|
-
*/
|
|
962
|
-
PageNumber?: number;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
export namespace ExpenseField {
|
|
966
|
-
/**
|
|
967
|
-
* @internal
|
|
968
|
-
*/
|
|
969
|
-
export const filterSensitiveLog = (obj: ExpenseField): any => ({
|
|
970
|
-
...obj,
|
|
971
|
-
});
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
* <p>A structure that holds information about the different lines found in a document's tables.</p>
|
|
976
|
-
*/
|
|
977
|
-
export interface LineItemFields {
|
|
978
|
-
/**
|
|
979
|
-
* <p>ExpenseFields used to show information from detected lines on a table.</p>
|
|
980
|
-
*/
|
|
981
|
-
LineItemExpenseFields?: ExpenseField[];
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
export namespace LineItemFields {
|
|
985
|
-
/**
|
|
986
|
-
* @internal
|
|
987
|
-
*/
|
|
988
|
-
export const filterSensitiveLog = (obj: LineItemFields): any => ({
|
|
989
|
-
...obj,
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* <p>A grouping of tables which contain LineItems, with each table identified by the table's <code>LineItemGroupIndex</code>.</p>
|
|
995
|
-
*/
|
|
996
|
-
export interface LineItemGroup {
|
|
997
|
-
/**
|
|
998
|
-
* <p>The number used to identify a specific table in a document. The first table encountered will have a LineItemGroupIndex of 1, the second 2, etc.</p>
|
|
999
|
-
*/
|
|
1000
|
-
LineItemGroupIndex?: number;
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* <p>The breakdown of information on a particular line of a table. </p>
|
|
1004
|
-
*/
|
|
1005
|
-
LineItems?: LineItemFields[];
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
export namespace LineItemGroup {
|
|
1009
|
-
/**
|
|
1010
|
-
* @internal
|
|
1011
|
-
*/
|
|
1012
|
-
export const filterSensitiveLog = (obj: LineItemGroup): any => ({
|
|
1013
|
-
...obj,
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
/**
|
|
1018
|
-
* <p>The structure holding all the information returned by AnalyzeExpense</p>
|
|
1019
|
-
*/
|
|
1020
|
-
export interface ExpenseDocument {
|
|
1021
|
-
/**
|
|
1022
|
-
* <p>Denotes which invoice or receipt in the document the information is coming from.
|
|
1023
|
-
* First document will be 1, the second 2, and so on.</p>
|
|
1024
|
-
*/
|
|
1025
|
-
ExpenseIndex?: number;
|
|
1026
|
-
|
|
1027
|
-
/**
|
|
1028
|
-
* <p>Any information found outside of a table by Amazon Textract.</p>
|
|
1029
|
-
*/
|
|
1030
|
-
SummaryFields?: ExpenseField[];
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* <p>Information detected on each table of a document, seperated into <code>LineItems</code>.</p>
|
|
1034
|
-
*/
|
|
1035
|
-
LineItemGroups?: LineItemGroup[];
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
export namespace ExpenseDocument {
|
|
1039
|
-
/**
|
|
1040
|
-
* @internal
|
|
1041
|
-
*/
|
|
1042
|
-
export const filterSensitiveLog = (obj: ExpenseDocument): any => ({
|
|
1043
|
-
...obj,
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
export interface AnalyzeExpenseResponse {
|
|
1048
|
-
/**
|
|
1049
|
-
* <p>Information about the input document.</p>
|
|
1050
|
-
*/
|
|
1051
|
-
DocumentMetadata?: DocumentMetadata;
|
|
1052
|
-
|
|
1053
|
-
/**
|
|
1054
|
-
* <p>The expenses detected by Amazon Textract.</p>
|
|
1055
|
-
*/
|
|
1056
|
-
ExpenseDocuments?: ExpenseDocument[];
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
export namespace AnalyzeExpenseResponse {
|
|
1060
|
-
/**
|
|
1061
|
-
* @internal
|
|
1062
|
-
*/
|
|
1063
|
-
export const filterSensitiveLog = (obj: AnalyzeExpenseResponse): any => ({
|
|
1064
|
-
...obj,
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
export interface DetectDocumentTextRequest {
|
|
1069
|
-
/**
|
|
1070
|
-
* <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI
|
|
1071
|
-
* to call Amazon Textract operations, you can't pass image bytes. The document must be an image
|
|
1072
|
-
* in JPEG or PNG format.</p>
|
|
1073
|
-
* <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
|
|
1074
|
-
* image bytes that are passed using the <code>Bytes</code> field. </p>
|
|
1075
|
-
*/
|
|
1076
|
-
Document: Document | undefined;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
export namespace DetectDocumentTextRequest {
|
|
1080
|
-
/**
|
|
1081
|
-
* @internal
|
|
1082
|
-
*/
|
|
1083
|
-
export const filterSensitiveLog = (obj: DetectDocumentTextRequest): any => ({
|
|
1084
|
-
...obj,
|
|
1085
|
-
});
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
export interface DetectDocumentTextResponse {
|
|
1089
|
-
/**
|
|
1090
|
-
* <p>Metadata about the document. It contains the number of pages that are detected in the
|
|
1091
|
-
* document.</p>
|
|
1092
|
-
*/
|
|
1093
|
-
DocumentMetadata?: DocumentMetadata;
|
|
1094
|
-
|
|
1095
|
-
/**
|
|
1096
|
-
* <p>An array of <code>Block</code> objects that contain the text that's detected in the
|
|
1097
|
-
* document.</p>
|
|
1098
|
-
*/
|
|
1099
|
-
Blocks?: Block[];
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* <p></p>
|
|
1103
|
-
*/
|
|
1104
|
-
DetectDocumentTextModelVersion?: string;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
export namespace DetectDocumentTextResponse {
|
|
1108
|
-
/**
|
|
1109
|
-
* @internal
|
|
1110
|
-
*/
|
|
1111
|
-
export const filterSensitiveLog = (obj: DetectDocumentTextResponse): any => ({
|
|
1112
|
-
...obj,
|
|
1113
|
-
});
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* <p>The Amazon S3 bucket that contains the document to be processed. It's used by asynchronous
|
|
1118
|
-
* operations such as <a>StartDocumentTextDetection</a>.</p>
|
|
1119
|
-
* <p>The input document can be an image file in JPEG or PNG format. It can also be a file in
|
|
1120
|
-
* PDF format.</p>
|
|
1121
|
-
*/
|
|
1122
|
-
export interface DocumentLocation {
|
|
1123
|
-
/**
|
|
1124
|
-
* <p>The Amazon S3 bucket that contains the input document.</p>
|
|
1125
|
-
*/
|
|
1126
|
-
S3Object?: S3Object;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
export namespace DocumentLocation {
|
|
1130
|
-
/**
|
|
1131
|
-
* @internal
|
|
1132
|
-
*/
|
|
1133
|
-
export const filterSensitiveLog = (obj: DocumentLocation): any => ({
|
|
1134
|
-
...obj,
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
export interface GetDocumentAnalysisRequest {
|
|
1139
|
-
/**
|
|
1140
|
-
* <p>A unique identifier for the text-detection job. The <code>JobId</code> is returned from
|
|
1141
|
-
* <code>StartDocumentAnalysis</code>. A <code>JobId</code> value is only valid for 7 days.</p>
|
|
1142
|
-
*/
|
|
1143
|
-
JobId: string | undefined;
|
|
1144
|
-
|
|
1145
|
-
/**
|
|
1146
|
-
* <p>The maximum number of results to return per paginated call. The largest value that you
|
|
1147
|
-
* can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results
|
|
1148
|
-
* is returned. The default value is 1,000.</p>
|
|
1149
|
-
*/
|
|
1150
|
-
MaxResults?: number;
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* <p>If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination
|
|
1154
|
-
* token in the response. You can use this pagination token to retrieve the next set of blocks.</p>
|
|
1155
|
-
*/
|
|
1156
|
-
NextToken?: string;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
export namespace GetDocumentAnalysisRequest {
|
|
1160
|
-
/**
|
|
1161
|
-
* @internal
|
|
1162
|
-
*/
|
|
1163
|
-
export const filterSensitiveLog = (obj: GetDocumentAnalysisRequest): any => ({
|
|
1164
|
-
...obj,
|
|
1165
|
-
});
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
export enum JobStatus {
|
|
1169
|
-
FAILED = "FAILED",
|
|
1170
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
1171
|
-
PARTIAL_SUCCESS = "PARTIAL_SUCCESS",
|
|
1172
|
-
SUCCEEDED = "SUCCEEDED",
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* <p>A warning about an issue that occurred during asynchronous text analysis (<a>StartDocumentAnalysis</a>) or asynchronous document text detection (<a>StartDocumentTextDetection</a>). </p>
|
|
1177
|
-
*/
|
|
1178
|
-
export interface Warning {
|
|
1179
|
-
/**
|
|
1180
|
-
* <p>The error code for the warning.</p>
|
|
1181
|
-
*/
|
|
1182
|
-
ErrorCode?: string;
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* <p>A list of the pages that the warning applies to.</p>
|
|
1186
|
-
*/
|
|
1187
|
-
Pages?: number[];
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
export namespace Warning {
|
|
1191
|
-
/**
|
|
1192
|
-
* @internal
|
|
1193
|
-
*/
|
|
1194
|
-
export const filterSensitiveLog = (obj: Warning): any => ({
|
|
1195
|
-
...obj,
|
|
1196
|
-
});
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
export interface GetDocumentAnalysisResponse {
|
|
1200
|
-
/**
|
|
1201
|
-
* <p>Information about a document that Amazon Textract processed. <code>DocumentMetadata</code> is
|
|
1202
|
-
* returned in every page of paginated responses from an Amazon Textract video operation.</p>
|
|
1203
|
-
*/
|
|
1204
|
-
DocumentMetadata?: DocumentMetadata;
|
|
1205
|
-
|
|
1206
|
-
/**
|
|
1207
|
-
* <p>The current status of the text detection job.</p>
|
|
1208
|
-
*/
|
|
1209
|
-
JobStatus?: JobStatus | string;
|
|
1210
|
-
|
|
1211
|
-
/**
|
|
1212
|
-
* <p>If the response is truncated, Amazon Textract returns this token. You can use this token in
|
|
1213
|
-
* the subsequent request to retrieve the next set of text detection results.</p>
|
|
1214
|
-
*/
|
|
1215
|
-
NextToken?: string;
|
|
1216
|
-
|
|
1217
|
-
/**
|
|
1218
|
-
* <p>The results of the text-analysis operation.</p>
|
|
1219
|
-
*/
|
|
1220
|
-
Blocks?: Block[];
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* <p>A list of warnings that occurred during the document-analysis operation.</p>
|
|
1224
|
-
*/
|
|
1225
|
-
Warnings?: Warning[];
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* <p>Returns if the detection job could not be completed. Contains explanation for what error occured.</p>
|
|
1229
|
-
*/
|
|
1230
|
-
StatusMessage?: string;
|
|
1231
|
-
|
|
1232
|
-
/**
|
|
1233
|
-
* <p></p>
|
|
1234
|
-
*/
|
|
1235
|
-
AnalyzeDocumentModelVersion?: string;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
export namespace GetDocumentAnalysisResponse {
|
|
1239
|
-
/**
|
|
1240
|
-
* @internal
|
|
1241
|
-
*/
|
|
1242
|
-
export const filterSensitiveLog = (obj: GetDocumentAnalysisResponse): any => ({
|
|
1243
|
-
...obj,
|
|
1244
|
-
});
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* <p>An invalid job identifier was passed to <a>GetDocumentAnalysis</a> or to
|
|
1249
|
-
* <a>GetDocumentAnalysis</a>.</p>
|
|
1250
|
-
*/
|
|
1251
|
-
export interface InvalidJobIdException extends __SmithyException, $MetadataBearer {
|
|
1252
|
-
name: "InvalidJobIdException";
|
|
1253
|
-
$fault: "client";
|
|
1254
|
-
Message?: string;
|
|
1255
|
-
Code?: string;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
export namespace InvalidJobIdException {
|
|
1259
|
-
/**
|
|
1260
|
-
* @internal
|
|
1261
|
-
*/
|
|
1262
|
-
export const filterSensitiveLog = (obj: InvalidJobIdException): any => ({
|
|
1263
|
-
...obj,
|
|
1264
|
-
});
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
/**
|
|
1268
|
-
* <p> Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key
|
|
1269
|
-
* was entered incorrectly. </p>
|
|
1270
|
-
*/
|
|
1271
|
-
export interface InvalidKMSKeyException extends __SmithyException, $MetadataBearer {
|
|
1272
|
-
name: "InvalidKMSKeyException";
|
|
1273
|
-
$fault: "client";
|
|
1274
|
-
Message?: string;
|
|
1275
|
-
Code?: string;
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
export namespace InvalidKMSKeyException {
|
|
1279
|
-
/**
|
|
1280
|
-
* @internal
|
|
1281
|
-
*/
|
|
1282
|
-
export const filterSensitiveLog = (obj: InvalidKMSKeyException): any => ({
|
|
1283
|
-
...obj,
|
|
1284
|
-
});
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
export interface GetDocumentTextDetectionRequest {
|
|
1288
|
-
/**
|
|
1289
|
-
* <p>A unique identifier for the text detection job. The <code>JobId</code> is returned from
|
|
1290
|
-
* <code>StartDocumentTextDetection</code>. A <code>JobId</code> value is only valid for 7 days.</p>
|
|
1291
|
-
*/
|
|
1292
|
-
JobId: string | undefined;
|
|
1293
|
-
|
|
1294
|
-
/**
|
|
1295
|
-
* <p>The maximum number of results to return per paginated call. The largest value you can
|
|
1296
|
-
* specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is
|
|
1297
|
-
* returned. The default value is 1,000.</p>
|
|
1298
|
-
*/
|
|
1299
|
-
MaxResults?: number;
|
|
1300
|
-
|
|
1301
|
-
/**
|
|
1302
|
-
* <p>If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination
|
|
1303
|
-
* token in the response. You can use this pagination token to retrieve the next set of blocks.</p>
|
|
1304
|
-
*/
|
|
1305
|
-
NextToken?: string;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
export namespace GetDocumentTextDetectionRequest {
|
|
1309
|
-
/**
|
|
1310
|
-
* @internal
|
|
1311
|
-
*/
|
|
1312
|
-
export const filterSensitiveLog = (obj: GetDocumentTextDetectionRequest): any => ({
|
|
1313
|
-
...obj,
|
|
1314
|
-
});
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
export interface GetDocumentTextDetectionResponse {
|
|
1318
|
-
/**
|
|
1319
|
-
* <p>Information about a document that Amazon Textract processed. <code>DocumentMetadata</code> is
|
|
1320
|
-
* returned in every page of paginated responses from an Amazon Textract video operation.</p>
|
|
1321
|
-
*/
|
|
1322
|
-
DocumentMetadata?: DocumentMetadata;
|
|
1323
|
-
|
|
1324
|
-
/**
|
|
1325
|
-
* <p>The current status of the text detection job.</p>
|
|
1326
|
-
*/
|
|
1327
|
-
JobStatus?: JobStatus | string;
|
|
1328
|
-
|
|
1329
|
-
/**
|
|
1330
|
-
* <p>If the response is truncated, Amazon Textract returns this token. You can use this token in
|
|
1331
|
-
* the subsequent request to retrieve the next set of text-detection results.</p>
|
|
1332
|
-
*/
|
|
1333
|
-
NextToken?: string;
|
|
1334
|
-
|
|
1335
|
-
/**
|
|
1336
|
-
* <p>The results of the text-detection operation.</p>
|
|
1337
|
-
*/
|
|
1338
|
-
Blocks?: Block[];
|
|
1339
|
-
|
|
1340
|
-
/**
|
|
1341
|
-
* <p>A list of warnings that occurred during the text-detection operation for the
|
|
1342
|
-
* document.</p>
|
|
1343
|
-
*/
|
|
1344
|
-
Warnings?: Warning[];
|
|
1345
|
-
|
|
1346
|
-
/**
|
|
1347
|
-
* <p>Returns if the detection job could not be completed. Contains explanation for what error occured. </p>
|
|
1348
|
-
*/
|
|
1349
|
-
StatusMessage?: string;
|
|
1350
|
-
|
|
1351
|
-
/**
|
|
1352
|
-
* <p></p>
|
|
1353
|
-
*/
|
|
1354
|
-
DetectDocumentTextModelVersion?: string;
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
export namespace GetDocumentTextDetectionResponse {
|
|
1358
|
-
/**
|
|
1359
|
-
* @internal
|
|
1360
|
-
*/
|
|
1361
|
-
export const filterSensitiveLog = (obj: GetDocumentTextDetectionResponse): any => ({
|
|
1362
|
-
...obj,
|
|
1363
|
-
});
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at
|
|
1368
|
-
* least one of the other input parameters is different from the previous call to the
|
|
1369
|
-
* operation. </p>
|
|
1370
|
-
*/
|
|
1371
|
-
export interface IdempotentParameterMismatchException extends __SmithyException, $MetadataBearer {
|
|
1372
|
-
name: "IdempotentParameterMismatchException";
|
|
1373
|
-
$fault: "client";
|
|
1374
|
-
Message?: string;
|
|
1375
|
-
Code?: string;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
export namespace IdempotentParameterMismatchException {
|
|
1379
|
-
/**
|
|
1380
|
-
* @internal
|
|
1381
|
-
*/
|
|
1382
|
-
export const filterSensitiveLog = (obj: IdempotentParameterMismatchException): any => ({
|
|
1383
|
-
...obj,
|
|
1384
|
-
});
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
/**
|
|
1388
|
-
* <p>An Amazon Textract service limit was exceeded. For example, if you start too many
|
|
1389
|
-
* asynchronous jobs concurrently, calls to start operations
|
|
1390
|
-
* (<code>StartDocumentTextDetection</code>, for example) raise a LimitExceededException
|
|
1391
|
-
* exception (HTTP status code: 400) until the number of concurrently running jobs is below
|
|
1392
|
-
* the Amazon Textract service limit. </p>
|
|
1393
|
-
*/
|
|
1394
|
-
export interface LimitExceededException extends __SmithyException, $MetadataBearer {
|
|
1395
|
-
name: "LimitExceededException";
|
|
1396
|
-
$fault: "client";
|
|
1397
|
-
Message?: string;
|
|
1398
|
-
Code?: string;
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
export namespace LimitExceededException {
|
|
1402
|
-
/**
|
|
1403
|
-
* @internal
|
|
1404
|
-
*/
|
|
1405
|
-
export const filterSensitiveLog = (obj: LimitExceededException): any => ({
|
|
1406
|
-
...obj,
|
|
1407
|
-
});
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
/**
|
|
1411
|
-
* <p>The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon Textract publishes the completion status of
|
|
1412
|
-
* an asynchronous document operation, such as <a>StartDocumentTextDetection</a>. </p>
|
|
1413
|
-
*/
|
|
1414
|
-
export interface NotificationChannel {
|
|
1415
|
-
/**
|
|
1416
|
-
* <p>The Amazon SNS topic that Amazon Textract posts the completion status to.</p>
|
|
1417
|
-
*/
|
|
1418
|
-
SNSTopicArn: string | undefined;
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
* <p>The Amazon Resource Name (ARN) of an IAM role that gives Amazon Textract publishing permissions to the Amazon SNS topic. </p>
|
|
1422
|
-
*/
|
|
1423
|
-
RoleArn: string | undefined;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
export namespace NotificationChannel {
|
|
1427
|
-
/**
|
|
1428
|
-
* @internal
|
|
1429
|
-
*/
|
|
1430
|
-
export const filterSensitiveLog = (obj: NotificationChannel): any => ({
|
|
1431
|
-
...obj,
|
|
1432
|
-
});
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
/**
|
|
1436
|
-
* <p>Sets whether or not your output will go to a user created bucket. Used to set the name
|
|
1437
|
-
* of the bucket, and the prefix on the output file.</p>
|
|
1438
|
-
* <p>
|
|
1439
|
-
* <code>OutputConfig</code> is an optional parameter which lets you adjust where your output will be placed.
|
|
1440
|
-
* By default, Amazon Textract will store the results internally and can only be accessed by the Get
|
|
1441
|
-
* API operations. With OutputConfig enabled, you can set the name of the bucket the output will be
|
|
1442
|
-
* sent to and the file prefix of the results where you can download your results. Additionally, you
|
|
1443
|
-
* can set the <code>KMSKeyID</code> parameter to a customer master key (CMK) to encrypt your output. Without this
|
|
1444
|
-
* parameter set Amazon Textract will encrypt server-side using the AWS managed CMK for Amazon S3.</p>
|
|
1445
|
-
* <p>Decryption of Customer Content is necessary for processing of the documents by Amazon Textract. If your account
|
|
1446
|
-
* is opted out under an AI services opt out policy then all unencrypted Customer Content is immediately and permanently deleted after
|
|
1447
|
-
* the Customer Content has been processed by the service. No copy of of the output is retained by Amazon Textract. For information about how to opt out, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html"> Managing AI services opt-out policy. </a>
|
|
1448
|
-
* </p>
|
|
1449
|
-
* <p>For more information on data privacy,
|
|
1450
|
-
* see the <a href="https://aws.amazon.com/compliance/data-privacy-faq/">Data Privacy
|
|
1451
|
-
* FAQ</a>.</p>
|
|
1452
|
-
*/
|
|
1453
|
-
export interface OutputConfig {
|
|
1454
|
-
/**
|
|
1455
|
-
* <p>The name of the bucket your output will go to.</p>
|
|
1456
|
-
*/
|
|
1457
|
-
S3Bucket: string | undefined;
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* <p>The prefix of the object key that the output will be saved to. When not enabled, the
|
|
1461
|
-
* prefix will be “textract_output".</p>
|
|
1462
|
-
*/
|
|
1463
|
-
S3Prefix?: string;
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
export namespace OutputConfig {
|
|
1467
|
-
/**
|
|
1468
|
-
* @internal
|
|
1469
|
-
*/
|
|
1470
|
-
export const filterSensitiveLog = (obj: OutputConfig): any => ({
|
|
1471
|
-
...obj,
|
|
1472
|
-
});
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
export interface StartDocumentAnalysisRequest {
|
|
1476
|
-
/**
|
|
1477
|
-
* <p>The location of the document to be processed.</p>
|
|
1478
|
-
*/
|
|
1479
|
-
DocumentLocation: DocumentLocation | undefined;
|
|
1480
|
-
|
|
1481
|
-
/**
|
|
1482
|
-
* <p>A list of the types of analysis to perform. Add TABLES to the list to return information
|
|
1483
|
-
* about the tables that are detected in the input document. Add FORMS to return detected
|
|
1484
|
-
* form data. To perform both types of analysis, add TABLES
|
|
1485
|
-
* and FORMS to <code>FeatureTypes</code>. All lines and words detected in the document are
|
|
1486
|
-
* included in the response (including text that isn't related to the value of
|
|
1487
|
-
* <code>FeatureTypes</code>). </p>
|
|
1488
|
-
*/
|
|
1489
|
-
FeatureTypes: (FeatureType | string)[] | undefined;
|
|
1490
|
-
|
|
1491
|
-
/**
|
|
1492
|
-
* <p>The idempotent token that you use to identify the start request. If you use the same
|
|
1493
|
-
* token with multiple <code>StartDocumentAnalysis</code> requests, the same
|
|
1494
|
-
* <code>JobId</code> is returned. Use <code>ClientRequestToken</code> to prevent the same
|
|
1495
|
-
* job from being accidentally started more than once. For more information, see
|
|
1496
|
-
* <a href="https://docs.aws.amazon.com/textract/latest/dg/api-async.html">Calling Amazon Textract Asynchronous Operations</a>.</p>
|
|
1497
|
-
*/
|
|
1498
|
-
ClientRequestToken?: string;
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* <p>An identifier that you specify that's included in the completion notification published
|
|
1502
|
-
* to the Amazon SNS topic. For example, you can use <code>JobTag</code> to identify the type of
|
|
1503
|
-
* document that the completion notification corresponds to (such as a tax form or a
|
|
1504
|
-
* receipt).</p>
|
|
1505
|
-
*/
|
|
1506
|
-
JobTag?: string;
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* <p>The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the
|
|
1510
|
-
* operation to. </p>
|
|
1511
|
-
*/
|
|
1512
|
-
NotificationChannel?: NotificationChannel;
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* <p>Sets if the output will go to a customer defined bucket. By default, Amazon Textract will save
|
|
1516
|
-
* the results internally to be accessed by the GetDocumentAnalysis operation.</p>
|
|
1517
|
-
*/
|
|
1518
|
-
OutputConfig?: OutputConfig;
|
|
1519
|
-
|
|
1520
|
-
/**
|
|
1521
|
-
* <p>The KMS key used to encrypt the inference results. This can be
|
|
1522
|
-
* in either Key ID or Key Alias format. When a KMS key is provided, the
|
|
1523
|
-
* KMS key will be used for server-side encryption of the objects in the
|
|
1524
|
-
* customer bucket. When this parameter is not enabled, the result will
|
|
1525
|
-
* be encrypted server side,using SSE-S3.</p>
|
|
1526
|
-
*/
|
|
1527
|
-
KMSKeyId?: string;
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
export namespace StartDocumentAnalysisRequest {
|
|
1531
|
-
/**
|
|
1532
|
-
* @internal
|
|
1533
|
-
*/
|
|
1534
|
-
export const filterSensitiveLog = (obj: StartDocumentAnalysisRequest): any => ({
|
|
1535
|
-
...obj,
|
|
1536
|
-
});
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
export interface StartDocumentAnalysisResponse {
|
|
1540
|
-
/**
|
|
1541
|
-
* <p>The identifier for the document text detection job. Use <code>JobId</code> to identify
|
|
1542
|
-
* the job in a subsequent call to <code>GetDocumentAnalysis</code>. A <code>JobId</code> value
|
|
1543
|
-
* is only valid for 7 days.</p>
|
|
1544
|
-
*/
|
|
1545
|
-
JobId?: string;
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
export namespace StartDocumentAnalysisResponse {
|
|
1549
|
-
/**
|
|
1550
|
-
* @internal
|
|
1551
|
-
*/
|
|
1552
|
-
export const filterSensitiveLog = (obj: StartDocumentAnalysisResponse): any => ({
|
|
1553
|
-
...obj,
|
|
1554
|
-
});
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
export interface StartDocumentTextDetectionRequest {
|
|
1558
|
-
/**
|
|
1559
|
-
* <p>The location of the document to be processed.</p>
|
|
1560
|
-
*/
|
|
1561
|
-
DocumentLocation: DocumentLocation | undefined;
|
|
1562
|
-
|
|
1563
|
-
/**
|
|
1564
|
-
* <p>The idempotent token that's used to identify the start request. If you use the same
|
|
1565
|
-
* token with multiple <code>StartDocumentTextDetection</code> requests, the same
|
|
1566
|
-
* <code>JobId</code> is returned. Use <code>ClientRequestToken</code> to prevent the same
|
|
1567
|
-
* job from being accidentally started more than once. For more information, see
|
|
1568
|
-
* <a href="https://docs.aws.amazon.com/textract/latest/dg/api-async.html">Calling Amazon Textract Asynchronous Operations</a>.</p>
|
|
1569
|
-
*/
|
|
1570
|
-
ClientRequestToken?: string;
|
|
1571
|
-
|
|
1572
|
-
/**
|
|
1573
|
-
* <p>An identifier that you specify that's included in the completion notification published
|
|
1574
|
-
* to the Amazon SNS topic. For example, you can use <code>JobTag</code> to identify the type of
|
|
1575
|
-
* document that the completion notification corresponds to (such as a tax form or a
|
|
1576
|
-
* receipt).</p>
|
|
1577
|
-
*/
|
|
1578
|
-
JobTag?: string;
|
|
1579
|
-
|
|
1580
|
-
/**
|
|
1581
|
-
* <p>The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the
|
|
1582
|
-
* operation to. </p>
|
|
1583
|
-
*/
|
|
1584
|
-
NotificationChannel?: NotificationChannel;
|
|
1585
|
-
|
|
1586
|
-
/**
|
|
1587
|
-
* <p>Sets if the output will go to a customer defined bucket. By default Amazon Textract will
|
|
1588
|
-
* save the results internally to be accessed with the GetDocumentTextDetection operation.</p>
|
|
1589
|
-
*/
|
|
1590
|
-
OutputConfig?: OutputConfig;
|
|
1591
|
-
|
|
1592
|
-
/**
|
|
1593
|
-
* <p>The KMS key used to encrypt the inference results. This can be
|
|
1594
|
-
* in either Key ID or Key Alias format. When a KMS key is provided, the
|
|
1595
|
-
* KMS key will be used for server-side encryption of the objects in the
|
|
1596
|
-
* customer bucket. When this parameter is not enabled, the result will
|
|
1597
|
-
* be encrypted server side,using SSE-S3.</p>
|
|
1598
|
-
*/
|
|
1599
|
-
KMSKeyId?: string;
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
export namespace StartDocumentTextDetectionRequest {
|
|
1603
|
-
/**
|
|
1604
|
-
* @internal
|
|
1605
|
-
*/
|
|
1606
|
-
export const filterSensitiveLog = (obj: StartDocumentTextDetectionRequest): any => ({
|
|
1607
|
-
...obj,
|
|
1608
|
-
});
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
export interface StartDocumentTextDetectionResponse {
|
|
1612
|
-
/**
|
|
1613
|
-
* <p>The identifier of the text detection job for the document. Use <code>JobId</code> to
|
|
1614
|
-
* identify the job in a subsequent call to <code>GetDocumentTextDetection</code>.
|
|
1615
|
-
* A <code>JobId</code> value is only valid for 7 days.</p>
|
|
1616
|
-
*/
|
|
1617
|
-
JobId?: string;
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
export namespace StartDocumentTextDetectionResponse {
|
|
1621
|
-
/**
|
|
1622
|
-
* @internal
|
|
1623
|
-
*/
|
|
1624
|
-
export const filterSensitiveLog = (obj: StartDocumentTextDetectionResponse): any => ({
|
|
1625
|
-
...obj,
|
|
1626
|
-
});
|
|
1627
|
-
}
|