@aws-sdk/client-textract 3.36.0 → 3.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist-cjs/Textract.js +30 -5
  3. package/dist-cjs/TextractClient.js +0 -10
  4. package/dist-cjs/commands/AnalyzeDocumentCommand.js +0 -54
  5. package/dist-cjs/commands/AnalyzeExpenseCommand.js +0 -37
  6. package/dist-cjs/commands/DetectDocumentTextCommand.js +0 -34
  7. package/dist-cjs/commands/GetDocumentAnalysisCommand.js +0 -68
  8. package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +0 -48
  9. package/dist-cjs/commands/GetExpenseAnalysisCommand.js +36 -0
  10. package/dist-cjs/commands/StartDocumentAnalysisCommand.js +0 -41
  11. package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +0 -40
  12. package/dist-cjs/commands/StartExpenseAnalysisCommand.js +36 -0
  13. package/dist-cjs/commands/index.js +12 -0
  14. package/dist-cjs/endpoints.js +42 -3
  15. package/dist-cjs/index.js +3 -9
  16. package/dist-cjs/models/models_0.js +26 -149
  17. package/dist-cjs/protocols/Aws_json1_1.js +306 -6
  18. package/dist-cjs/runtimeConfig.browser.js +1 -5
  19. package/dist-cjs/runtimeConfig.js +1 -5
  20. package/dist-cjs/runtimeConfig.native.js +0 -3
  21. package/dist-cjs/runtimeConfig.shared.js +0 -3
  22. package/dist-es/Textract.js +30 -0
  23. package/dist-es/commands/GetExpenseAnalysisCommand.js +39 -0
  24. package/dist-es/commands/StartExpenseAnalysisCommand.js +39 -0
  25. package/dist-es/commands/index.js +9 -0
  26. package/dist-es/endpoints.js +42 -3
  27. package/dist-es/index.js +3 -9
  28. package/dist-es/models/models_0.js +16 -0
  29. package/dist-es/protocols/Aws_json1_1.js +314 -0
  30. package/dist-types/Textract.d.ts +47 -2
  31. package/dist-types/TextractClient.d.ts +4 -2
  32. package/dist-types/commands/GetExpenseAnalysisCommand.d.ts +51 -0
  33. package/dist-types/commands/StartDocumentAnalysisCommand.d.ts +1 -1
  34. package/dist-types/commands/StartDocumentTextDetectionCommand.d.ts +1 -1
  35. package/dist-types/commands/StartExpenseAnalysisCommand.d.ts +50 -0
  36. package/dist-types/commands/index.d.ts +9 -0
  37. package/dist-types/index.d.ts +3 -9
  38. package/dist-types/models/models_0.d.ts +123 -2
  39. package/dist-types/protocols/Aws_json1_1.d.ts +6 -0
  40. package/dist-types/ts3.4/Textract.d.ts +18 -180
  41. package/dist-types/ts3.4/TextractClient.d.ts +28 -93
  42. package/dist-types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +2 -50
  43. package/dist-types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +2 -33
  44. package/dist-types/ts3.4/commands/DetectDocumentTextCommand.d.ts +2 -30
  45. package/dist-types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +2 -64
  46. package/dist-types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +2 -44
  47. package/dist-types/ts3.4/commands/GetExpenseAnalysisCommand.d.ts +17 -0
  48. package/dist-types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +2 -37
  49. package/dist-types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +2 -36
  50. package/dist-types/ts3.4/commands/StartExpenseAnalysisCommand.d.ts +17 -0
  51. package/dist-types/ts3.4/commands/index.d.ts +9 -0
  52. package/dist-types/ts3.4/index.d.ts +3 -9
  53. package/dist-types/ts3.4/models/models_0.d.ts +253 -893
  54. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +6 -0
  55. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  56. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  57. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  58. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  59. package/package.json +32 -32
@@ -11,7 +11,7 @@ export interface StartDocumentAnalysisCommandOutput extends StartDocumentAnalysi
11
11
  * items such as key-value pairs, tables, and selection elements.</p>
12
12
  *
13
13
  * <p>
14
- * <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
14
+ * <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The
15
15
  * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
16
16
  * of the document.
17
17
  * </p>
@@ -10,7 +10,7 @@ export interface StartDocumentTextDetectionCommandOutput extends StartDocumentTe
10
10
  * <p>Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of
11
11
  * text and the words that make up a line of text.</p>
12
12
  * <p>
13
- * <code>StartDocumentTextDetection</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
13
+ * <code>StartDocumentTextDetection</code> can analyze text in documents that are in JPEG, PNG, TIFF, and PDF format. The
14
14
  * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
15
15
  * of the document.
16
16
  * </p>
@@ -0,0 +1,50 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { StartExpenseAnalysisRequest, StartExpenseAnalysisResponse } from "../models/models_0";
4
+ import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
5
+ export interface StartExpenseAnalysisCommandInput extends StartExpenseAnalysisRequest {
6
+ }
7
+ export interface StartExpenseAnalysisCommandOutput extends StartExpenseAnalysisResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Starts the asynchronous analysis of invoices or receipts for data like contact information,
11
+ * items purchased, and vendor names.</p>
12
+ *
13
+ * <p>
14
+ * <code>StartExpenseAnalysis</code> can analyze text in documents that are in JPEG, PNG, and
15
+ * PDF format. The documents must be stored in an Amazon S3 bucket. Use the <a>DocumentLocation</a> parameter to specify the name of your S3 bucket and the name of the
16
+ * document in that bucket. </p>
17
+ * <p>
18
+ * <code>StartExpenseAnalysis</code> returns a job identifier (<code>JobId</code>) that you
19
+ * will provide to <code>GetExpenseAnalysis</code> to retrieve the results of the operation. When
20
+ * the analysis of the input invoices/receipts is finished, Amazon Textract publishes a completion
21
+ * status to the Amazon Simple Notification Service (Amazon SNS) topic that you provide to the <code>NotificationChannel</code>.
22
+ * To obtain the results of the invoice and receipt analysis operation, ensure that the status value
23
+ * published to the Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <a>GetExpenseAnalysis</a>, and pass the job identifier (<code>JobId</code>) that was
24
+ * returned by your call to <code>StartExpenseAnalysis</code>.</p>
25
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html">Analyzing Invoices and Receipts</a>.</p>
26
+ * @example
27
+ * Use a bare-bones client and the command you need to make an API call.
28
+ * ```javascript
29
+ * import { TextractClient, StartExpenseAnalysisCommand } from "@aws-sdk/client-textract"; // ES Modules import
30
+ * // const { TextractClient, StartExpenseAnalysisCommand } = require("@aws-sdk/client-textract"); // CommonJS import
31
+ * const client = new TextractClient(config);
32
+ * const command = new StartExpenseAnalysisCommand(input);
33
+ * const response = await client.send(command);
34
+ * ```
35
+ *
36
+ * @see {@link StartExpenseAnalysisCommandInput} for command's `input` shape.
37
+ * @see {@link StartExpenseAnalysisCommandOutput} for command's `response` shape.
38
+ * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
39
+ *
40
+ */
41
+ export declare class StartExpenseAnalysisCommand extends $Command<StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput, TextractClientResolvedConfig> {
42
+ readonly input: StartExpenseAnalysisCommandInput;
43
+ constructor(input: StartExpenseAnalysisCommandInput);
44
+ /**
45
+ * @internal
46
+ */
47
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TextractClientResolvedConfig, options?: __HttpHandlerOptions): Handler<StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput>;
48
+ private serialize;
49
+ private deserialize;
50
+ }
@@ -0,0 +1,9 @@
1
+ export * from "./AnalyzeDocumentCommand";
2
+ export * from "./AnalyzeExpenseCommand";
3
+ export * from "./DetectDocumentTextCommand";
4
+ export * from "./GetDocumentAnalysisCommand";
5
+ export * from "./GetDocumentTextDetectionCommand";
6
+ export * from "./GetExpenseAnalysisCommand";
7
+ export * from "./StartDocumentAnalysisCommand";
8
+ export * from "./StartDocumentTextDetectionCommand";
9
+ export * from "./StartExpenseAnalysisCommand";
@@ -1,10 +1,4 @@
1
- export * from "./TextractClient";
2
1
  export * from "./Textract";
3
- export * from "./commands/AnalyzeDocumentCommand";
4
- export * from "./commands/AnalyzeExpenseCommand";
5
- export * from "./commands/DetectDocumentTextCommand";
6
- export * from "./commands/GetDocumentAnalysisCommand";
7
- export * from "./commands/GetDocumentTextDetectionCommand";
8
- export * from "./commands/StartDocumentAnalysisCommand";
9
- export * from "./commands/StartDocumentTextDetectionCommand";
10
- export * from "./models/index";
2
+ export * from "./TextractClient";
3
+ export * from "./commands";
4
+ export * from "./models";
@@ -34,7 +34,7 @@ export interface S3Object {
34
34
  Bucket?: string;
35
35
  /**
36
36
  * <p>The file name of the input document. Synchronous operations can use image files that are
37
- * in JPEG or PNG format. Asynchronous operations also support PDF format files.</p>
37
+ * in JPEG or PNG format. Asynchronous operations also support PDF and TIFF format files.</p>
38
38
  */
39
39
  Name?: string;
40
40
  /**
@@ -480,7 +480,7 @@ export interface Block {
480
480
  /**
481
481
  * <p>The page on which a block was detected. <code>Page</code> is returned by asynchronous
482
482
  * operations. Page values greater than 1 are only returned for multipage documents that are
483
- * in PDF format. A scanned image (JPEG/PNG), even if it contains multiple document pages, is
483
+ * in PDF or TIFF format. A scanned image (JPEG/PNG), even if it contains multiple document pages, is
484
484
  * considered to be a single-page document. The value of <code>Page</code> is always 1.
485
485
  * Synchronous operations don't return <code>Page</code> because every input document is
486
486
  * considered to be a single-page document.</p>
@@ -1127,6 +1127,69 @@ export declare namespace GetDocumentTextDetectionResponse {
1127
1127
  */
1128
1128
  const filterSensitiveLog: (obj: GetDocumentTextDetectionResponse) => any;
1129
1129
  }
1130
+ export interface GetExpenseAnalysisRequest {
1131
+ /**
1132
+ * <p>A unique identifier for the text detection job. The <code>JobId</code> is returned from
1133
+ * <code>StartExpenseAnalysis</code>. A <code>JobId</code> value is only valid for 7 days.</p>
1134
+ */
1135
+ JobId: string | undefined;
1136
+ /**
1137
+ * <p>The maximum number of results to return per paginated call. The largest value you can
1138
+ * specify is 20. If you specify a value greater than 20, a maximum of 20 results is
1139
+ * returned. The default value is 20.</p>
1140
+ */
1141
+ MaxResults?: number;
1142
+ /**
1143
+ * <p>If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination
1144
+ * token in the response. You can use this pagination token to retrieve the next set of blocks.</p>
1145
+ */
1146
+ NextToken?: string;
1147
+ }
1148
+ export declare namespace GetExpenseAnalysisRequest {
1149
+ /**
1150
+ * @internal
1151
+ */
1152
+ const filterSensitiveLog: (obj: GetExpenseAnalysisRequest) => any;
1153
+ }
1154
+ export interface GetExpenseAnalysisResponse {
1155
+ /**
1156
+ * <p>Information about a document that Amazon Textract processed. <code>DocumentMetadata</code> is
1157
+ * returned in every page of paginated responses from an Amazon Textract operation.</p>
1158
+ */
1159
+ DocumentMetadata?: DocumentMetadata;
1160
+ /**
1161
+ * <p>The current status of the text detection job.</p>
1162
+ */
1163
+ JobStatus?: JobStatus | string;
1164
+ /**
1165
+ * <p>If the response is truncated, Amazon Textract returns this token. You can use this token in
1166
+ * the subsequent request to retrieve the next set of text-detection results.</p>
1167
+ */
1168
+ NextToken?: string;
1169
+ /**
1170
+ * <p>The expenses detected by Amazon Textract.</p>
1171
+ */
1172
+ ExpenseDocuments?: ExpenseDocument[];
1173
+ /**
1174
+ * <p>A list of warnings that occurred during the text-detection operation for the
1175
+ * document.</p>
1176
+ */
1177
+ Warnings?: Warning[];
1178
+ /**
1179
+ * <p>Returns if the detection job could not be completed. Contains explanation for what error occured. </p>
1180
+ */
1181
+ StatusMessage?: string;
1182
+ /**
1183
+ * <p>The current model version of AnalyzeExpense.</p>
1184
+ */
1185
+ AnalyzeExpenseModelVersion?: string;
1186
+ }
1187
+ export declare namespace GetExpenseAnalysisResponse {
1188
+ /**
1189
+ * @internal
1190
+ */
1191
+ const filterSensitiveLog: (obj: GetExpenseAnalysisResponse) => any;
1192
+ }
1130
1193
  /**
1131
1194
  * <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at
1132
1195
  * least one of the other input parameters is different from the previous call to the
@@ -1345,3 +1408,61 @@ export declare namespace StartDocumentTextDetectionResponse {
1345
1408
  */
1346
1409
  const filterSensitiveLog: (obj: StartDocumentTextDetectionResponse) => any;
1347
1410
  }
1411
+ export interface StartExpenseAnalysisRequest {
1412
+ /**
1413
+ * <p>The location of the document to be processed.</p>
1414
+ */
1415
+ DocumentLocation: DocumentLocation | undefined;
1416
+ /**
1417
+ * <p>The idempotent token that's used to identify the start request. If you use the same token with multiple <code>StartDocumentTextDetection</code> requests, the same <code>JobId</code> is returned.
1418
+ * Use <code>ClientRequestToken</code> to prevent the same job from being accidentally started more than once.
1419
+ * For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/api-async.html">Calling Amazon Textract Asynchronous Operations</a>
1420
+ * </p>
1421
+ */
1422
+ ClientRequestToken?: string;
1423
+ /**
1424
+ * <p>An identifier you specify that's included in the completion notification published
1425
+ * to the Amazon SNS topic. For example, you can use <code>JobTag</code> to identify the type of
1426
+ * document that the completion notification corresponds to (such as a tax form or a
1427
+ * receipt).</p>
1428
+ */
1429
+ JobTag?: string;
1430
+ /**
1431
+ * <p>The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the
1432
+ * operation to. </p>
1433
+ */
1434
+ NotificationChannel?: NotificationChannel;
1435
+ /**
1436
+ * <p>Sets if the output will go to a customer defined bucket. By default, Amazon Textract will
1437
+ * save the results internally to be accessed by the <code>GetExpenseAnalysis</code>
1438
+ * operation.</p>
1439
+ */
1440
+ OutputConfig?: OutputConfig;
1441
+ /**
1442
+ * <p>The KMS key used to encrypt the inference results. This can be
1443
+ * in either Key ID or Key Alias format. When a KMS key is provided, the
1444
+ * KMS key will be used for server-side encryption of the objects in the
1445
+ * customer bucket. When this parameter is not enabled, the result will
1446
+ * be encrypted server side,using SSE-S3.</p>
1447
+ */
1448
+ KMSKeyId?: string;
1449
+ }
1450
+ export declare namespace StartExpenseAnalysisRequest {
1451
+ /**
1452
+ * @internal
1453
+ */
1454
+ const filterSensitiveLog: (obj: StartExpenseAnalysisRequest) => any;
1455
+ }
1456
+ export interface StartExpenseAnalysisResponse {
1457
+ /**
1458
+ * <p>A unique identifier for the text detection job. The <code>JobId</code> is returned from
1459
+ * <code>StartExpenseAnalysis</code>. A <code>JobId</code> value is only valid for 7 days.</p>
1460
+ */
1461
+ JobId?: string;
1462
+ }
1463
+ export declare namespace StartExpenseAnalysisResponse {
1464
+ /**
1465
+ * @internal
1466
+ */
1467
+ const filterSensitiveLog: (obj: StartExpenseAnalysisResponse) => any;
1468
+ }
@@ -5,19 +5,25 @@ import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "../comm
5
5
  import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "../commands/DetectDocumentTextCommand";
6
6
  import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "../commands/GetDocumentAnalysisCommand";
7
7
  import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "../commands/GetDocumentTextDetectionCommand";
8
+ import { GetExpenseAnalysisCommandInput, GetExpenseAnalysisCommandOutput } from "../commands/GetExpenseAnalysisCommand";
8
9
  import { StartDocumentAnalysisCommandInput, StartDocumentAnalysisCommandOutput } from "../commands/StartDocumentAnalysisCommand";
9
10
  import { StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionCommandOutput } from "../commands/StartDocumentTextDetectionCommand";
11
+ import { StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput } from "../commands/StartExpenseAnalysisCommand";
10
12
  export declare const serializeAws_json1_1AnalyzeDocumentCommand: (input: AnalyzeDocumentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
11
13
  export declare const serializeAws_json1_1AnalyzeExpenseCommand: (input: AnalyzeExpenseCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
12
14
  export declare const serializeAws_json1_1DetectDocumentTextCommand: (input: DetectDocumentTextCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
13
15
  export declare const serializeAws_json1_1GetDocumentAnalysisCommand: (input: GetDocumentAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
14
16
  export declare const serializeAws_json1_1GetDocumentTextDetectionCommand: (input: GetDocumentTextDetectionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
17
+ export declare const serializeAws_json1_1GetExpenseAnalysisCommand: (input: GetExpenseAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
15
18
  export declare const serializeAws_json1_1StartDocumentAnalysisCommand: (input: StartDocumentAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
16
19
  export declare const serializeAws_json1_1StartDocumentTextDetectionCommand: (input: StartDocumentTextDetectionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
20
+ export declare const serializeAws_json1_1StartExpenseAnalysisCommand: (input: StartExpenseAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
17
21
  export declare const deserializeAws_json1_1AnalyzeDocumentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeDocumentCommandOutput>;
18
22
  export declare const deserializeAws_json1_1AnalyzeExpenseCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeExpenseCommandOutput>;
19
23
  export declare const deserializeAws_json1_1DetectDocumentTextCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectDocumentTextCommandOutput>;
20
24
  export declare const deserializeAws_json1_1GetDocumentAnalysisCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDocumentAnalysisCommandOutput>;
21
25
  export declare const deserializeAws_json1_1GetDocumentTextDetectionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDocumentTextDetectionCommandOutput>;
26
+ export declare const deserializeAws_json1_1GetExpenseAnalysisCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetExpenseAnalysisCommandOutput>;
22
27
  export declare const deserializeAws_json1_1StartDocumentAnalysisCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StartDocumentAnalysisCommandOutput>;
23
28
  export declare const deserializeAws_json1_1StartDocumentTextDetectionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StartDocumentTextDetectionCommandOutput>;
29
+ export declare const deserializeAws_json1_1StartExpenseAnalysisCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StartExpenseAnalysisCommandOutput>;
@@ -4,209 +4,47 @@ import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "./comma
4
4
  import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "./commands/DetectDocumentTextCommand";
5
5
  import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "./commands/GetDocumentAnalysisCommand";
6
6
  import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "./commands/GetDocumentTextDetectionCommand";
7
+ import { GetExpenseAnalysisCommandInput, GetExpenseAnalysisCommandOutput } from "./commands/GetExpenseAnalysisCommand";
7
8
  import { StartDocumentAnalysisCommandInput, StartDocumentAnalysisCommandOutput } from "./commands/StartDocumentAnalysisCommand";
8
9
  import { StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionCommandOutput } from "./commands/StartDocumentTextDetectionCommand";
10
+ import { StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput } from "./commands/StartExpenseAnalysisCommand";
9
11
  import { TextractClient } from "./TextractClient";
10
- /**
11
- * <p>Amazon Textract detects and analyzes text in documents and converts it
12
- * into machine-readable text. This is the API reference documentation for
13
- * Amazon Textract.</p>
14
- */
12
+
15
13
  export declare class Textract extends TextractClient {
16
- /**
17
- * <p>Analyzes an input document for relationships between detected items. </p>
18
- * <p>The types of information returned are as follows: </p>
19
- * <ul>
20
- * <li>
21
- * <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
22
- * <code>Block</code> object and a VALUE <code>Block</code> object. For example,
23
- * <i>Name: Ana Silva Carolina</i> contains a key and value.
24
- * <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
25
- * the value.</p>
26
- * </li>
27
- * <li>
28
- * <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
29
- * <code>Block</code> object is returned for each cell in a table.</p>
30
- * </li>
31
- * <li>
32
- * <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
33
- * All lines and words that are detected in the document are returned (including text that doesn't have a
34
- * relationship with the value of <code>FeatureTypes</code>). </p>
35
- * </li>
36
- * </ul>
37
- *
38
- * <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
39
- * A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
40
- * including the selection status.</p>
41
- * <p>You can choose which type of analysis to perform by specifying the <code>FeatureTypes</code> list.
42
- * </p>
43
- * <p>The output is returned in a list of <code>Block</code> objects.</p>
44
- * <p>
45
- * <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
46
- * asynchronously, use <a>StartDocumentAnalysis</a>.</p>
47
- * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text Analysis</a>.</p>
48
- */
14
+
49
15
  analyzeDocument(args: AnalyzeDocumentCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeDocumentCommandOutput>;
50
16
  analyzeDocument(args: AnalyzeDocumentCommandInput, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
51
17
  analyzeDocument(args: AnalyzeDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
52
- /**
53
- * <p>Analyzes an input document for financially related relationships between text.</p>
54
- * <p>Information is returned as <code>ExpenseDocuments</code> and seperated as follows.</p>
55
- * <ul>
56
- * <li>
57
- * <p>
58
- * <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
59
- * store information about the lines of text, such as an item purchased and its price on a receipt.</p>
60
- * </li>
61
- * <li>
62
- * <p>
63
- * <code>SummaryFields</code>- Contains all other information a receipt, such as header information
64
- * or the vendors name.</p>
65
- * </li>
66
- * </ul>
67
- */
18
+
68
19
  analyzeExpense(args: AnalyzeExpenseCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeExpenseCommandOutput>;
69
20
  analyzeExpense(args: AnalyzeExpenseCommandInput, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
70
21
  analyzeExpense(args: AnalyzeExpenseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
71
- /**
72
- * <p>Detects text in the input document. Amazon Textract can detect lines of text and the
73
- * words that make up a line of text. The input document must be an image in JPEG or PNG
74
- * format. <code>DetectDocumentText</code> returns the detected text in an array of <a>Block</a> objects. </p>
75
- * <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
76
- * is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
77
- * a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
78
- *
79
- * <p>
80
- * <code>DetectDocumentText</code> is a synchronous operation. To analyze documents
81
- * asynchronously, use <a>StartDocumentTextDetection</a>.</p>
82
- * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html">Document Text Detection</a>.</p>
83
- */
22
+
84
23
  detectDocumentText(args: DetectDocumentTextCommandInput, options?: __HttpHandlerOptions): Promise<DetectDocumentTextCommandOutput>;
85
24
  detectDocumentText(args: DetectDocumentTextCommandInput, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
86
25
  detectDocumentText(args: DetectDocumentTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
87
- /**
88
- * <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.</p>
89
- * <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>, which returns a job identifier
90
- * (<code>JobId</code>). When the text analysis operation finishes, Amazon Textract publishes a
91
- * completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
92
- * <code>StartDocumentAnalysis</code>. To get the results of the text-detection operation,
93
- * first check that the status value published to the Amazon SNS topic is <code>SUCCEEDED</code>.
94
- * If so, call <code>GetDocumentAnalysis</code>, and pass the job identifier
95
- * (<code>JobId</code>) from the initial call to <code>StartDocumentAnalysis</code>.</p>
96
- * <p>
97
- * <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects. The following
98
- * types of information are returned: </p>
99
- * <ul>
100
- * <li>
101
- * <p>Form data (key-value pairs). The related information is returned in two <a>Block</a> objects, each of type <code>KEY_VALUE_SET</code>: a KEY
102
- * <code>Block</code> object and a VALUE <code>Block</code> object. For example,
103
- * <i>Name: Ana Silva Carolina</i> contains a key and value.
104
- * <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
105
- * the value.</p>
106
- * </li>
107
- * <li>
108
- * <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
109
- * <code>Block</code> object is returned for each cell in a table.</p>
110
- * </li>
111
- * <li>
112
- * <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
113
- * All lines and words that are detected in the document are returned (including text that doesn't have a
114
- * relationship with the value of the <code>StartDocumentAnalysis</code>
115
- * <code>FeatureTypes</code> input parameter). </p>
116
- * </li>
117
- * </ul>
118
- *
119
- * <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
120
- * A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
121
- * including the selection status.</p>
122
- *
123
- *
124
- *
125
- * <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
126
- * returned. If there are more results than specified in <code>MaxResults</code>, the value of
127
- * <code>NextToken</code> in the operation response contains a pagination token for getting
128
- * the next set of results. To get the next page of results, call
129
- * <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
130
- * parameter with the token value that's returned from the previous call to
131
- * <code>GetDocumentAnalysis</code>.</p>
132
- * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text Analysis</a>.</p>
133
- */
26
+
134
27
  getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentAnalysisCommandOutput>;
135
28
  getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void): void;
136
29
  getDocumentAnalysis(args: GetDocumentAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void): void;
137
- /**
138
- * <p>Gets the results for an Amazon Textract asynchronous operation that detects text in a document.
139
- * Amazon Textract can detect lines of text and the words that make up a line of text.</p>
140
- * <p>You start asynchronous text detection by calling <a>StartDocumentTextDetection</a>, which returns a job identifier
141
- * (<code>JobId</code>). When the text detection operation finishes, Amazon Textract publishes a
142
- * completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
143
- * <code>StartDocumentTextDetection</code>. To get the results of the text-detection
144
- * operation, first check that the status value published to the Amazon SNS topic is
145
- * <code>SUCCEEDED</code>. If so, call <code>GetDocumentTextDetection</code>, and pass the
146
- * job identifier (<code>JobId</code>) from the initial call to
147
- * <code>StartDocumentTextDetection</code>.</p>
148
- * <p>
149
- * <code>GetDocumentTextDetection</code> returns an array of <a>Block</a>
150
- * objects. </p>
151
- * <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
152
- * is the parent of LINE <code>Block</code> objects that represent the lines of detected text on a page. A LINE <code>Block</code> object is
153
- * a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
154
- *
155
- * <p>Use the MaxResults parameter to limit the number of blocks that are returned. If there
156
- * are more results than specified in <code>MaxResults</code>, the value of
157
- * <code>NextToken</code> in the operation response contains a pagination token for getting
158
- * the next set of results. To get the next page of results, call
159
- * <code>GetDocumentTextDetection</code>, and populate the <code>NextToken</code> request
160
- * parameter with the token value that's returned from the previous call to
161
- * <code>GetDocumentTextDetection</code>.</p>
162
- * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html">Document Text Detection</a>.</p>
163
- */
30
+
164
31
  getDocumentTextDetection(args: GetDocumentTextDetectionCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentTextDetectionCommandOutput>;
165
32
  getDocumentTextDetection(args: GetDocumentTextDetectionCommandInput, cb: (err: any, data?: GetDocumentTextDetectionCommandOutput) => void): void;
166
33
  getDocumentTextDetection(args: GetDocumentTextDetectionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentTextDetectionCommandOutput) => void): void;
167
- /**
168
- * <p>Starts the asynchronous analysis of an input document for relationships between detected
169
- * items such as key-value pairs, tables, and selection elements.</p>
170
- *
171
- * <p>
172
- * <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
173
- * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
174
- * of the document.
175
- * </p>
176
- * <p>
177
- * <code>StartDocumentAnalysis</code> returns a job identifier
178
- * (<code>JobId</code>) that you use to get the results of the operation. When text
179
- * analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
180
- * topic that you specify in <code>NotificationChannel</code>. To get the results of the text
181
- * analysis operation, first check that the status value published to the Amazon SNS topic is
182
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentAnalysis</a>, and pass
183
- * the job identifier (<code>JobId</code>) from the initial call to
184
- * <code>StartDocumentAnalysis</code>.</p>
185
- * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html">Document Text Analysis</a>.</p>
186
- */
34
+
35
+ getExpenseAnalysis(args: GetExpenseAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<GetExpenseAnalysisCommandOutput>;
36
+ getExpenseAnalysis(args: GetExpenseAnalysisCommandInput, cb: (err: any, data?: GetExpenseAnalysisCommandOutput) => void): void;
37
+ getExpenseAnalysis(args: GetExpenseAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetExpenseAnalysisCommandOutput) => void): void;
38
+
187
39
  startDocumentAnalysis(args: StartDocumentAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<StartDocumentAnalysisCommandOutput>;
188
40
  startDocumentAnalysis(args: StartDocumentAnalysisCommandInput, cb: (err: any, data?: StartDocumentAnalysisCommandOutput) => void): void;
189
41
  startDocumentAnalysis(args: StartDocumentAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartDocumentAnalysisCommandOutput) => void): void;
190
- /**
191
- * <p>Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of
192
- * text and the words that make up a line of text.</p>
193
- * <p>
194
- * <code>StartDocumentTextDetection</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
195
- * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
196
- * of the document.
197
- * </p>
198
- * <p>
199
- * <code>StartTextDetection</code> returns a job identifier
200
- * (<code>JobId</code>) that you use to get the results of the operation. When text
201
- * detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
202
- * topic that you specify in <code>NotificationChannel</code>. To get the results of the text
203
- * detection operation, first check that the status value published to the Amazon SNS topic is
204
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentTextDetection</a>, and
205
- * pass the job identifier (<code>JobId</code>) from the initial call to
206
- * <code>StartDocumentTextDetection</code>.</p>
207
- * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html">Document Text Detection</a>.</p>
208
- */
42
+
209
43
  startDocumentTextDetection(args: StartDocumentTextDetectionCommandInput, options?: __HttpHandlerOptions): Promise<StartDocumentTextDetectionCommandOutput>;
210
44
  startDocumentTextDetection(args: StartDocumentTextDetectionCommandInput, cb: (err: any, data?: StartDocumentTextDetectionCommandOutput) => void): void;
211
45
  startDocumentTextDetection(args: StartDocumentTextDetectionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartDocumentTextDetectionCommandOutput) => void): void;
46
+
47
+ startExpenseAnalysis(args: StartExpenseAnalysisCommandInput, options?: __HttpHandlerOptions): Promise<StartExpenseAnalysisCommandOutput>;
48
+ startExpenseAnalysis(args: StartExpenseAnalysisCommandInput, cb: (err: any, data?: StartExpenseAnalysisCommandOutput) => void): void;
49
+ startExpenseAnalysis(args: StartExpenseAnalysisCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartExpenseAnalysisCommandOutput) => void): void;
212
50
  }