UNPKG

31.3 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class Textract extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: Textract.Types.ClientConfiguration)
13 config: Config & Textract.Types.ClientConfiguration;
14 /**
15 * Analyzes an input document for relationships in the detected text and tables. Two types of information are returned: Words and lines that are related to nearby lines and words. The related information is returned in two Block objects: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. Table and table cell data. A TABLE Block contains information about a detected table. A CELL block is returned for each cell in a table. You can choose which type of analysis to perform by specifying the FeatureTypes list. The output is returned in a list of BLOCK objects (Blocks). For more information, see how-it-works-analyzing. AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, use StartDocumentAnalysis.
16 */
17 analyzeDocument(params: Textract.Types.AnalyzeDocumentRequest, callback?: (err: AWSError, data: Textract.Types.AnalyzeDocumentResponse) => void): Request<Textract.Types.AnalyzeDocumentResponse, AWSError>;
18 /**
19 * Analyzes an input document for relationships in the detected text and tables. Two types of information are returned: Words and lines that are related to nearby lines and words. The related information is returned in two Block objects: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. Table and table cell data. A TABLE Block contains information about a detected table. A CELL block is returned for each cell in a table. You can choose which type of analysis to perform by specifying the FeatureTypes list. The output is returned in a list of BLOCK objects (Blocks). For more information, see how-it-works-analyzing. AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, use StartDocumentAnalysis.
20 */
21 analyzeDocument(callback?: (err: AWSError, data: Textract.Types.AnalyzeDocumentResponse) => void): Request<Textract.Types.AnalyzeDocumentResponse, AWSError>;
22 /**
23 * Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be an image in JPG or PNG format. DetectDocumentText returns the detected text in an array of Block objects. For more information, see how-it-works-detecting. DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection.
24 */
25 detectDocumentText(params: Textract.Types.DetectDocumentTextRequest, callback?: (err: AWSError, data: Textract.Types.DetectDocumentTextResponse) => void): Request<Textract.Types.DetectDocumentTextResponse, AWSError>;
26 /**
27 * Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be an image in JPG or PNG format. DetectDocumentText returns the detected text in an array of Block objects. For more information, see how-it-works-detecting. DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection.
28 */
29 detectDocumentText(callback?: (err: AWSError, data: Textract.Types.DetectDocumentTextResponse) => void): Request<Textract.Types.DetectDocumentTextResponse, AWSError>;
30 /**
31 * Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document image. You start asynchronous text analysis by calling StartDocumentAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentAnalysis. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis. GetDocumentAnalysis returns an array of Block objects. For more information, see how-it-works-analyzing. Use the MaxResults parameter to limit the number of blocks returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentAnalysis, and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentAnalysis.
32 */
33 getDocumentAnalysis(params: Textract.Types.GetDocumentAnalysisRequest, callback?: (err: AWSError, data: Textract.Types.GetDocumentAnalysisResponse) => void): Request<Textract.Types.GetDocumentAnalysisResponse, AWSError>;
34 /**
35 * Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document image. You start asynchronous text analysis by calling StartDocumentAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentAnalysis. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis. GetDocumentAnalysis returns an array of Block objects. For more information, see how-it-works-analyzing. Use the MaxResults parameter to limit the number of blocks returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentAnalysis, and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentAnalysis.
36 */
37 getDocumentAnalysis(callback?: (err: AWSError, data: Textract.Types.GetDocumentAnalysisResponse) => void): Request<Textract.Types.GetDocumentAnalysisResponse, AWSError>;
38 /**
39 * Gets the results for an Amazon Textract asynchronous operation that detects text in a document image. Amazon Textract can detect lines of text and the words that make up a line of text. You start asynchronous text detection by calling StartDocumentTextDetection, which returns a job identifier (JobId). When the text detection operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentTextDetection. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. GetDocumentTextDetection returns an array of Block objects. For more information, see how-it-works-detecting. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentTextDetection, and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentTextDetection. For more information, see Document Text Detection in the Amazon Textract Developer Guide.
40 */
41 getDocumentTextDetection(params: Textract.Types.GetDocumentTextDetectionRequest, callback?: (err: AWSError, data: Textract.Types.GetDocumentTextDetectionResponse) => void): Request<Textract.Types.GetDocumentTextDetectionResponse, AWSError>;
42 /**
43 * Gets the results for an Amazon Textract asynchronous operation that detects text in a document image. Amazon Textract can detect lines of text and the words that make up a line of text. You start asynchronous text detection by calling StartDocumentTextDetection, which returns a job identifier (JobId). When the text detection operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentTextDetection. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. GetDocumentTextDetection returns an array of Block objects. For more information, see how-it-works-detecting. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentTextDetection, and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentTextDetection. For more information, see Document Text Detection in the Amazon Textract Developer Guide.
44 */
45 getDocumentTextDetection(callback?: (err: AWSError, data: Textract.Types.GetDocumentTextDetectionResponse) => void): Request<Textract.Types.GetDocumentTextDetectionResponse, AWSError>;
46 /**
47 * Starts asynchronous analysis of text for relationships in the text and tables that are detected in a document. Amazon Textract returns for two types of information: Words and lines that are related to nearby lines and words. The related information is returned in two Block objects: A KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. Table and table cell data. A TABLE block contains information about a detected table. A CELL block is returned for each cell in a table. Amazon Textract can analyze text in document images and PDF files that are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and file name of the document image. StartDocumentAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis.
48 */
49 startDocumentAnalysis(params: Textract.Types.StartDocumentAnalysisRequest, callback?: (err: AWSError, data: Textract.Types.StartDocumentAnalysisResponse) => void): Request<Textract.Types.StartDocumentAnalysisResponse, AWSError>;
50 /**
51 * Starts asynchronous analysis of text for relationships in the text and tables that are detected in a document. Amazon Textract returns for two types of information: Words and lines that are related to nearby lines and words. The related information is returned in two Block objects: A KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value. Table and table cell data. A TABLE block contains information about a detected table. A CELL block is returned for each cell in a table. Amazon Textract can analyze text in document images and PDF files that are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and file name of the document image. StartDocumentAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis.
52 */
53 startDocumentAnalysis(callback?: (err: AWSError, data: Textract.Types.StartDocumentAnalysisResponse) => void): Request<Textract.Types.StartDocumentAnalysisResponse, AWSError>;
54 /**
55 * Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of text and the words that make up a line of text. Amazon Textract can detect text in document images and PDF files that are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and the file name of the document image. StartTextDetection returns a job identifier (JobId) that you use to get the results of the operation. When text detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. For more information, see Document Text Detection in the Amazon Textract Developer Guide.
56 */
57 startDocumentTextDetection(params: Textract.Types.StartDocumentTextDetectionRequest, callback?: (err: AWSError, data: Textract.Types.StartDocumentTextDetectionResponse) => void): Request<Textract.Types.StartDocumentTextDetectionResponse, AWSError>;
58 /**
59 * Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of text and the words that make up a line of text. Amazon Textract can detect text in document images and PDF files that are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and the file name of the document image. StartTextDetection returns a job identifier (JobId) that you use to get the results of the operation. When text detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. For more information, see Document Text Detection in the Amazon Textract Developer Guide.
60 */
61 startDocumentTextDetection(callback?: (err: AWSError, data: Textract.Types.StartDocumentTextDetectionResponse) => void): Request<Textract.Types.StartDocumentTextDetectionResponse, AWSError>;
62}
63declare namespace Textract {
64 export interface AnalyzeDocumentRequest {
65 /**
66 * The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an image in JPG or PNG format.
67 */
68 Document: Document;
69 /**
70 * A list of the types of analysis to perform. Add TABLES to the list to return information about the tables detected in the input document. Add FORMS to return detected fields and the associated text. To perform both types of analysis, add TABLES and FORMS to FeatureTypes.
71 */
72 FeatureTypes: FeatureTypes;
73 }
74 export interface AnalyzeDocumentResponse {
75 /**
76 * Metadata about the analyzed document. An example is the number of pages.
77 */
78 DocumentMetadata?: DocumentMetadata;
79 /**
80 * The text that's detected and analyzed by AnalyzeDocument.
81 */
82 Blocks?: BlockList;
83 }
84 export interface Block {
85 /**
86 * The type of text that's recognized in a block. In text-detection operations, the following types are returned: PAGE - Contains a list of the LINE Block objects that are detected on a specific page. WORD - One or more ISO basic Latin script characters that aren't separated by spaces. LINE - A string of equally spaced words. In text analysis operations, the following types are returned: PAGE - Contains a list of child Block objects that are detected on a specific page. KEY_VALUE_SET - Stores the KEY and VALUE Block objects for a field that's detected in a document. Use the EntityType field to determine if a KEY_VALUE_SET object is a KEY Block object or a VALUE Block object. WORD - One or more ISO basic Latin script characters that aren't separated by spaces. LINE - A string of tab-delimited, contiguous words. TABLE - A table that's detected in the document. CELL - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.
87 */
88 BlockType?: BlockType;
89 /**
90 * The confidence that Amazon Textract has in the accuracy of the recognized text and the accuracy of the geometry points around the recognized text.
91 */
92 Confidence?: Percent;
93 /**
94 * The word or line of text that's recognized by Amazon Textract.
95 */
96 Text?: String;
97 /**
98 * The row in which a table cell is located. The first row position is 1. RowIndex isn't returned by DetectDocumentText and GetDocumentTextDetection.
99 */
100 RowIndex?: UInteger;
101 /**
102 * The column in which a table cell appears. The first column position is 1. ColumnIndex isn't returned by DetectDocumentText and GetDocumentTextDetection.
103 */
104 ColumnIndex?: UInteger;
105 /**
106 * The number of rows that a table spans. RowSpan isn't returned by DetectDocumentText and GetDocumentTextDetection.
107 */
108 RowSpan?: UInteger;
109 /**
110 * The number of columns that a table cell spans. ColumnSpan isn't returned by DetectDocumentText and GetDocumentTextDetection.
111 */
112 ColumnSpan?: UInteger;
113 /**
114 * The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that surrounds the text, and a finer-grain polygon for more accurate spatial information.
115 */
116 Geometry?: Geometry;
117 /**
118 * The identifier for the recognized text. The identifier is only unique for a single operation.
119 */
120 Id?: NonEmptyString;
121 /**
122 * A list of child blocks of the current block. For example a LINE object has child blocks for each WORD block that's part of the line of text. There aren't Relationship objects in the list for relationships that don't exist, such as when the current block has no child blocks. The list size can be the following: 0 - The block has no child blocks. 1 - The block has child blocks.
123 */
124 Relationships?: RelationshipList;
125 /**
126 * The type of entity. The following can be returned: KEY - An identifier for a field on the document. VALUE - The field text. EntityTypes isn't returned by DetectDocumentText and GetDocumentTextDetection.
127 */
128 EntityTypes?: EntityTypes;
129 /**
130 * The page in which a block was detected.
131 */
132 Page?: UInteger;
133 }
134 export type BlockList = Block[];
135 export type BlockType = "KEY_VALUE_SET"|"PAGE"|"LINE"|"WORD"|"TABLE"|"CELL"|string;
136 export interface BoundingBox {
137 /**
138 * The width of the bounding box as a ratio of the overall document page width.
139 */
140 Width?: Float;
141 /**
142 * The height of the bounding box as a ratio of the overall document page height.
143 */
144 Height?: Float;
145 /**
146 * The left coordinate of the bounding box as a ratio of overall document page width.
147 */
148 Left?: Float;
149 /**
150 * The top coordinate of the bounding box as a ratio of overall document page height.
151 */
152 Top?: Float;
153 }
154 export type ClientRequestToken = string;
155 export interface DetectDocumentTextRequest {
156 /**
157 * The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an image in JPG or PNG format.
158 */
159 Document: Document;
160 }
161 export interface DetectDocumentTextResponse {
162 /**
163 * Metadata about the document. Contains the number of pages that are detected in the document.
164 */
165 DocumentMetadata?: DocumentMetadata;
166 /**
167 * An array of Block objects containing the text detected in the document.
168 */
169 Blocks?: BlockList;
170 }
171 export interface Document {
172 /**
173 * A blob of documents bytes. The maximum size of a document that's provided in a blob of bytes is 5 MB.
174 */
175 Bytes?: ImageBlob;
176 /**
177 * Identifies an S3 object as the document source. The maximum size of a document stored in an S3 bucket is 5 MB.
178 */
179 S3Object?: S3Object;
180 }
181 export interface DocumentLocation {
182 /**
183 * The Amazon S3 bucket that contains the input document.
184 */
185 S3Object?: S3Object;
186 }
187 export interface DocumentMetadata {
188 /**
189 * The number of pages detected in the document.
190 */
191 Pages?: UInteger;
192 }
193 export type EntityType = "KEY"|"VALUE"|string;
194 export type EntityTypes = EntityType[];
195 export type ErrorCode = string;
196 export type FeatureType = "TABLES"|"FORMS"|string;
197 export type FeatureTypes = FeatureType[];
198 export type Float = number;
199 export interface Geometry {
200 /**
201 * An axis-aligned coarse representation of the location of the recognized text on the document page.
202 */
203 BoundingBox?: BoundingBox;
204 /**
205 * Within the bounding box, a fine-grained polygon around the recognized text.
206 */
207 Polygon?: Polygon;
208 }
209 export interface GetDocumentAnalysisRequest {
210 /**
211 * A unique identifier for the text-detection job. The JobId is returned from StartDocumentAnalysis.
212 */
213 JobId: JobId;
214 /**
215 * The maximum number of results to return per paginated call. The largest value that you can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is returned. The default value is 1,000.
216 */
217 MaxResults?: MaxResults;
218 /**
219 * If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of blocks.
220 */
221 NextToken?: PaginationToken;
222 }
223 export interface GetDocumentAnalysisResponse {
224 /**
225 * Information about a document that Amazon Textract processed. DocumentMetadata is returned in every page of paginated responses from an Amazon Textract video operation.
226 */
227 DocumentMetadata?: DocumentMetadata;
228 /**
229 * The current status of the text detection job.
230 */
231 JobStatus?: JobStatus;
232 /**
233 * If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text detection results.
234 */
235 NextToken?: PaginationToken;
236 /**
237 * The results of the text analysis operation.
238 */
239 Blocks?: BlockList;
240 /**
241 * A list of warnings that occurred during the document analysis operation.
242 */
243 Warnings?: Warnings;
244 /**
245 * The current status of an asynchronous document analysis operation.
246 */
247 StatusMessage?: StatusMessage;
248 }
249 export interface GetDocumentTextDetectionRequest {
250 /**
251 * A unique identifier for the text detection job. The JobId is returned from StartDocumentTextDetection.
252 */
253 JobId: JobId;
254 /**
255 * The maximum number of results to return per paginated call. The largest value you can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is returned. The default value is 1,000.
256 */
257 MaxResults?: MaxResults;
258 /**
259 * If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of blocks.
260 */
261 NextToken?: PaginationToken;
262 }
263 export interface GetDocumentTextDetectionResponse {
264 /**
265 * Information about a document that Amazon Textract processed. DocumentMetadata is returned in every page of paginated responses from an Amazon Textract video operation.
266 */
267 DocumentMetadata?: DocumentMetadata;
268 /**
269 * The current status of the text detection job.
270 */
271 JobStatus?: JobStatus;
272 /**
273 * If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text-detection results.
274 */
275 NextToken?: PaginationToken;
276 /**
277 * The results of the text-detection operation.
278 */
279 Blocks?: BlockList;
280 /**
281 * A list of warnings that occurred during the document text-detection operation.
282 */
283 Warnings?: Warnings;
284 /**
285 * The current status of an asynchronous document text-detection operation.
286 */
287 StatusMessage?: StatusMessage;
288 }
289 export type IdList = NonEmptyString[];
290 export type ImageBlob = Buffer|Uint8Array|Blob|string;
291 export type JobId = string;
292 export type JobStatus = "IN_PROGRESS"|"SUCCEEDED"|"FAILED"|"PARTIAL_SUCCESS"|string;
293 export type JobTag = string;
294 export type MaxResults = number;
295 export type NonEmptyString = string;
296 export interface NotificationChannel {
297 /**
298 * The Amazon SNS topic that Amazon Textract posts the completion status to.
299 */
300 SNSTopicArn: SNSTopicArn;
301 /**
302 * The Amazon Resource Name (ARN) of an IAM role that gives Amazon Textract publishing permissions to the Amazon SNS topic.
303 */
304 RoleArn: RoleArn;
305 }
306 export type Pages = UInteger[];
307 export type PaginationToken = string;
308 export type Percent = number;
309 export interface Point {
310 /**
311 * The value of the X coordinate for a point on a Polygon.
312 */
313 X?: Float;
314 /**
315 * The value of the Y coordinate for a point on a Polygon.
316 */
317 Y?: Float;
318 }
319 export type Polygon = Point[];
320 export interface Relationship {
321 /**
322 * The type of relationship that the blocks in the IDs array have with the current block. The relationship can be VALUE or CHILD.
323 */
324 Type?: RelationshipType;
325 /**
326 * An array of IDs for related blocks. You can get the type of the relationship from the Type element.
327 */
328 Ids?: IdList;
329 }
330 export type RelationshipList = Relationship[];
331 export type RelationshipType = "VALUE"|"CHILD"|string;
332 export type RoleArn = string;
333 export type S3Bucket = string;
334 export interface S3Object {
335 /**
336 * The name of the S3 bucket.
337 */
338 Bucket?: S3Bucket;
339 /**
340 * The file name of the input document. It must be an image file (.JPG or .PNG format). Asynchronous operations also support PDF files.
341 */
342 Name?: S3ObjectName;
343 /**
344 * If the bucket has versioning enabled, you can specify the object version.
345 */
346 Version?: S3ObjectVersion;
347 }
348 export type S3ObjectName = string;
349 export type S3ObjectVersion = string;
350 export type SNSTopicArn = string;
351 export interface StartDocumentAnalysisRequest {
352 /**
353 * The location of the document to be processed.
354 */
355 DocumentLocation: DocumentLocation;
356 /**
357 * A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that are detected in the input document. Add FORMS to return detected fields and the associated text. To perform both types of analysis, add TABLES and FORMS to FeatureTypes.
358 */
359 FeatureTypes: FeatureTypes;
360 /**
361 * The idempotent token that you use to identify the start request. If you use the same token with multiple StartDocumentAnalysis requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidentally started more than once.
362 */
363 ClientRequestToken?: ClientRequestToken;
364 /**
365 * The unique identifier you specify to identify the job in the completion status that's published to the Amazon SNS topic.
366 */
367 JobTag?: JobTag;
368 /**
369 * The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
370 */
371 NotificationChannel?: NotificationChannel;
372 }
373 export interface StartDocumentAnalysisResponse {
374 /**
375 * The identifier for the document text-detection job. Use JobId to identify the job in a subsequent call to GetDocumentAnalysis.
376 */
377 JobId?: JobId;
378 }
379 export interface StartDocumentTextDetectionRequest {
380 /**
381 * The location of the document to be processed.
382 */
383 DocumentLocation: DocumentLocation;
384 /**
385 * The idempotent token that's used to identify the start request. If you use the same token with multiple StartDocumentTextDetection requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidentally started more than once.
386 */
387 ClientRequestToken?: ClientRequestToken;
388 /**
389 * A unique identifier you specify to identify the job in the completion status that's published to the Amazon Simple Notification Service (Amazon SNS) topic.
390 */
391 JobTag?: JobTag;
392 /**
393 * The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
394 */
395 NotificationChannel?: NotificationChannel;
396 }
397 export interface StartDocumentTextDetectionResponse {
398 /**
399 * The identifier for the document text-detection job. Use JobId to identify the job in a subsequent call to GetDocumentTextDetection.
400 */
401 JobId?: JobId;
402 }
403 export type StatusMessage = string;
404 export type String = string;
405 export type UInteger = number;
406 export interface Warning {
407 /**
408 * The error code for the warning.
409 */
410 ErrorCode?: ErrorCode;
411 /**
412 * A list of the pages that the warning applies to.
413 */
414 Pages?: Pages;
415 }
416 export type Warnings = Warning[];
417 /**
418 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
419 */
420 export type apiVersion = "2018-06-27"|"latest"|string;
421 export interface ClientApiVersions {
422 /**
423 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
424 */
425 apiVersion?: apiVersion;
426 }
427 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
428 /**
429 * Contains interfaces for use with the Textract client.
430 */
431 export import Types = Textract;
432}
433export = Textract;