@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
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
|
|
2
|
-
import { GetDocumentAnalysisRequest, GetDocumentAnalysisResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_json1_1GetDocumentAnalysisCommand,
|
|
5
|
-
serializeAws_json1_1GetDocumentAnalysisCommand,
|
|
6
|
-
} from "../protocols/Aws_json1_1";
|
|
7
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
8
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
9
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
FinalizeHandlerArguments,
|
|
12
|
-
Handler,
|
|
13
|
-
HandlerExecutionContext,
|
|
14
|
-
MiddlewareStack,
|
|
15
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
export interface GetDocumentAnalysisCommandInput extends GetDocumentAnalysisRequest {}
|
|
21
|
-
export interface GetDocumentAnalysisCommandOutput extends GetDocumentAnalysisResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.</p>
|
|
25
|
-
* <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>, which returns a job identifier
|
|
26
|
-
* (<code>JobId</code>). When the text analysis operation finishes, Amazon Textract publishes a
|
|
27
|
-
* completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
|
|
28
|
-
* <code>StartDocumentAnalysis</code>. To get the results of the text-detection operation,
|
|
29
|
-
* first check that the status value published to the Amazon SNS topic is <code>SUCCEEDED</code>.
|
|
30
|
-
* If so, call <code>GetDocumentAnalysis</code>, and pass the job identifier
|
|
31
|
-
* (<code>JobId</code>) from the initial call to <code>StartDocumentAnalysis</code>.</p>
|
|
32
|
-
* <p>
|
|
33
|
-
* <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects. The following
|
|
34
|
-
* types of information are returned: </p>
|
|
35
|
-
* <ul>
|
|
36
|
-
* <li>
|
|
37
|
-
* <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
|
|
38
|
-
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
39
|
-
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
40
|
-
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
41
|
-
* the value.</p>
|
|
42
|
-
* </li>
|
|
43
|
-
* <li>
|
|
44
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
|
|
45
|
-
* <code>Block</code> object is returned for each cell in a table.</p>
|
|
46
|
-
* </li>
|
|
47
|
-
* <li>
|
|
48
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
|
|
49
|
-
* All lines and words that are detected in the document are returned (including text that doesn't have a
|
|
50
|
-
* relationship with the value of the <code>StartDocumentAnalysis</code>
|
|
51
|
-
* <code>FeatureTypes</code> input parameter). </p>
|
|
52
|
-
* </li>
|
|
53
|
-
* </ul>
|
|
54
|
-
*
|
|
55
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
|
|
56
|
-
* A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
|
|
57
|
-
* including the selection status.</p>
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
|
|
62
|
-
* returned. If there are more results than specified in <code>MaxResults</code>, the value of
|
|
63
|
-
* <code>NextToken</code> in the operation response contains a pagination token for getting
|
|
64
|
-
* the next set of results. To get the next page of results, call
|
|
65
|
-
* <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
|
|
66
|
-
* parameter with the token value that's returned from the previous call to
|
|
67
|
-
* <code>GetDocumentAnalysis</code>.</p>
|
|
68
|
-
* <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>
|
|
69
|
-
* @example
|
|
70
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
71
|
-
* ```javascript
|
|
72
|
-
* import { TextractClient, GetDocumentAnalysisCommand } from "@aws-sdk/client-textract"; // ES Modules import
|
|
73
|
-
* // const { TextractClient, GetDocumentAnalysisCommand } = require("@aws-sdk/client-textract"); // CommonJS import
|
|
74
|
-
* const client = new TextractClient(config);
|
|
75
|
-
* const command = new GetDocumentAnalysisCommand(input);
|
|
76
|
-
* const response = await client.send(command);
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @see {@link GetDocumentAnalysisCommandInput} for command's `input` shape.
|
|
80
|
-
* @see {@link GetDocumentAnalysisCommandOutput} for command's `response` shape.
|
|
81
|
-
* @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
export class GetDocumentAnalysisCommand extends $Command<
|
|
85
|
-
GetDocumentAnalysisCommandInput,
|
|
86
|
-
GetDocumentAnalysisCommandOutput,
|
|
87
|
-
TextractClientResolvedConfig
|
|
88
|
-
> {
|
|
89
|
-
// Start section: command_properties
|
|
90
|
-
// End section: command_properties
|
|
91
|
-
|
|
92
|
-
constructor(readonly input: GetDocumentAnalysisCommandInput) {
|
|
93
|
-
// Start section: command_constructor
|
|
94
|
-
super();
|
|
95
|
-
// End section: command_constructor
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
resolveMiddleware(
|
|
102
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
103
|
-
configuration: TextractClientResolvedConfig,
|
|
104
|
-
options?: __HttpHandlerOptions
|
|
105
|
-
): Handler<GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput> {
|
|
106
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
107
|
-
|
|
108
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
109
|
-
|
|
110
|
-
const { logger } = configuration;
|
|
111
|
-
const clientName = "TextractClient";
|
|
112
|
-
const commandName = "GetDocumentAnalysisCommand";
|
|
113
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
114
|
-
logger,
|
|
115
|
-
clientName,
|
|
116
|
-
commandName,
|
|
117
|
-
inputFilterSensitiveLog: GetDocumentAnalysisRequest.filterSensitiveLog,
|
|
118
|
-
outputFilterSensitiveLog: GetDocumentAnalysisResponse.filterSensitiveLog,
|
|
119
|
-
};
|
|
120
|
-
const { requestHandler } = configuration;
|
|
121
|
-
return stack.resolve(
|
|
122
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
123
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
124
|
-
handlerExecutionContext
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
private serialize(input: GetDocumentAnalysisCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
129
|
-
return serializeAws_json1_1GetDocumentAnalysisCommand(input, context);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetDocumentAnalysisCommandOutput> {
|
|
133
|
-
return deserializeAws_json1_1GetDocumentAnalysisCommand(output, context);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Start section: command_body_extra
|
|
137
|
-
// End section: command_body_extra
|
|
138
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
|
|
2
|
-
import { GetDocumentTextDetectionRequest, GetDocumentTextDetectionResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_json1_1GetDocumentTextDetectionCommand,
|
|
5
|
-
serializeAws_json1_1GetDocumentTextDetectionCommand,
|
|
6
|
-
} from "../protocols/Aws_json1_1";
|
|
7
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
8
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
9
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
FinalizeHandlerArguments,
|
|
12
|
-
Handler,
|
|
13
|
-
HandlerExecutionContext,
|
|
14
|
-
MiddlewareStack,
|
|
15
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
export interface GetDocumentTextDetectionCommandInput extends GetDocumentTextDetectionRequest {}
|
|
21
|
-
export interface GetDocumentTextDetectionCommandOutput extends GetDocumentTextDetectionResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Gets the results for an Amazon Textract asynchronous operation that detects text in a document.
|
|
25
|
-
* Amazon Textract can detect lines of text and the words that make up a line of text.</p>
|
|
26
|
-
* <p>You start asynchronous text detection by calling <a>StartDocumentTextDetection</a>, which returns a job identifier
|
|
27
|
-
* (<code>JobId</code>). When the text detection operation finishes, Amazon Textract publishes a
|
|
28
|
-
* completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
|
|
29
|
-
* <code>StartDocumentTextDetection</code>. To get the results of the text-detection
|
|
30
|
-
* operation, first check that the status value published to the Amazon SNS topic is
|
|
31
|
-
* <code>SUCCEEDED</code>. If so, call <code>GetDocumentTextDetection</code>, and pass the
|
|
32
|
-
* job identifier (<code>JobId</code>) from the initial call to
|
|
33
|
-
* <code>StartDocumentTextDetection</code>.</p>
|
|
34
|
-
* <p>
|
|
35
|
-
* <code>GetDocumentTextDetection</code> returns an array of <a>Block</a>
|
|
36
|
-
* objects. </p>
|
|
37
|
-
* <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
|
|
38
|
-
* 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
|
|
39
|
-
* a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
|
|
40
|
-
*
|
|
41
|
-
* <p>Use the MaxResults parameter to limit the number of blocks that are returned. If there
|
|
42
|
-
* are more results than specified in <code>MaxResults</code>, the value of
|
|
43
|
-
* <code>NextToken</code> in the operation response contains a pagination token for getting
|
|
44
|
-
* the next set of results. To get the next page of results, call
|
|
45
|
-
* <code>GetDocumentTextDetection</code>, and populate the <code>NextToken</code> request
|
|
46
|
-
* parameter with the token value that's returned from the previous call to
|
|
47
|
-
* <code>GetDocumentTextDetection</code>.</p>
|
|
48
|
-
* <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>
|
|
49
|
-
* @example
|
|
50
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
51
|
-
* ```javascript
|
|
52
|
-
* import { TextractClient, GetDocumentTextDetectionCommand } from "@aws-sdk/client-textract"; // ES Modules import
|
|
53
|
-
* // const { TextractClient, GetDocumentTextDetectionCommand } = require("@aws-sdk/client-textract"); // CommonJS import
|
|
54
|
-
* const client = new TextractClient(config);
|
|
55
|
-
* const command = new GetDocumentTextDetectionCommand(input);
|
|
56
|
-
* const response = await client.send(command);
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* @see {@link GetDocumentTextDetectionCommandInput} for command's `input` shape.
|
|
60
|
-
* @see {@link GetDocumentTextDetectionCommandOutput} for command's `response` shape.
|
|
61
|
-
* @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
export class GetDocumentTextDetectionCommand extends $Command<
|
|
65
|
-
GetDocumentTextDetectionCommandInput,
|
|
66
|
-
GetDocumentTextDetectionCommandOutput,
|
|
67
|
-
TextractClientResolvedConfig
|
|
68
|
-
> {
|
|
69
|
-
// Start section: command_properties
|
|
70
|
-
// End section: command_properties
|
|
71
|
-
|
|
72
|
-
constructor(readonly input: GetDocumentTextDetectionCommandInput) {
|
|
73
|
-
// Start section: command_constructor
|
|
74
|
-
super();
|
|
75
|
-
// End section: command_constructor
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
resolveMiddleware(
|
|
82
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
83
|
-
configuration: TextractClientResolvedConfig,
|
|
84
|
-
options?: __HttpHandlerOptions
|
|
85
|
-
): Handler<GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput> {
|
|
86
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
87
|
-
|
|
88
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
89
|
-
|
|
90
|
-
const { logger } = configuration;
|
|
91
|
-
const clientName = "TextractClient";
|
|
92
|
-
const commandName = "GetDocumentTextDetectionCommand";
|
|
93
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
94
|
-
logger,
|
|
95
|
-
clientName,
|
|
96
|
-
commandName,
|
|
97
|
-
inputFilterSensitiveLog: GetDocumentTextDetectionRequest.filterSensitiveLog,
|
|
98
|
-
outputFilterSensitiveLog: GetDocumentTextDetectionResponse.filterSensitiveLog,
|
|
99
|
-
};
|
|
100
|
-
const { requestHandler } = configuration;
|
|
101
|
-
return stack.resolve(
|
|
102
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
103
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
104
|
-
handlerExecutionContext
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
private serialize(input: GetDocumentTextDetectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
109
|
-
return serializeAws_json1_1GetDocumentTextDetectionCommand(input, context);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetDocumentTextDetectionCommandOutput> {
|
|
113
|
-
return deserializeAws_json1_1GetDocumentTextDetectionCommand(output, context);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Start section: command_body_extra
|
|
117
|
-
// End section: command_body_extra
|
|
118
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
|
|
2
|
-
import { StartDocumentAnalysisRequest, StartDocumentAnalysisResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_json1_1StartDocumentAnalysisCommand,
|
|
5
|
-
serializeAws_json1_1StartDocumentAnalysisCommand,
|
|
6
|
-
} from "../protocols/Aws_json1_1";
|
|
7
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
8
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
9
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
FinalizeHandlerArguments,
|
|
12
|
-
Handler,
|
|
13
|
-
HandlerExecutionContext,
|
|
14
|
-
MiddlewareStack,
|
|
15
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
export interface StartDocumentAnalysisCommandInput extends StartDocumentAnalysisRequest {}
|
|
21
|
-
export interface StartDocumentAnalysisCommandOutput extends StartDocumentAnalysisResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Starts the asynchronous analysis of an input document for relationships between detected
|
|
25
|
-
* items such as key-value pairs, tables, and selection elements.</p>
|
|
26
|
-
*
|
|
27
|
-
* <p>
|
|
28
|
-
* <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
|
|
29
|
-
* documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
|
|
30
|
-
* of the document.
|
|
31
|
-
* </p>
|
|
32
|
-
* <p>
|
|
33
|
-
* <code>StartDocumentAnalysis</code> returns a job identifier
|
|
34
|
-
* (<code>JobId</code>) that you use to get the results of the operation. When text
|
|
35
|
-
* analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
|
|
36
|
-
* topic that you specify in <code>NotificationChannel</code>. To get the results of the text
|
|
37
|
-
* analysis operation, first check that the status value published to the Amazon SNS topic is
|
|
38
|
-
* <code>SUCCEEDED</code>. If so, call <a>GetDocumentAnalysis</a>, and pass
|
|
39
|
-
* the job identifier (<code>JobId</code>) from the initial call to
|
|
40
|
-
* <code>StartDocumentAnalysis</code>.</p>
|
|
41
|
-
* <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>
|
|
42
|
-
* @example
|
|
43
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
44
|
-
* ```javascript
|
|
45
|
-
* import { TextractClient, StartDocumentAnalysisCommand } from "@aws-sdk/client-textract"; // ES Modules import
|
|
46
|
-
* // const { TextractClient, StartDocumentAnalysisCommand } = require("@aws-sdk/client-textract"); // CommonJS import
|
|
47
|
-
* const client = new TextractClient(config);
|
|
48
|
-
* const command = new StartDocumentAnalysisCommand(input);
|
|
49
|
-
* const response = await client.send(command);
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @see {@link StartDocumentAnalysisCommandInput} for command's `input` shape.
|
|
53
|
-
* @see {@link StartDocumentAnalysisCommandOutput} for command's `response` shape.
|
|
54
|
-
* @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
export class StartDocumentAnalysisCommand extends $Command<
|
|
58
|
-
StartDocumentAnalysisCommandInput,
|
|
59
|
-
StartDocumentAnalysisCommandOutput,
|
|
60
|
-
TextractClientResolvedConfig
|
|
61
|
-
> {
|
|
62
|
-
// Start section: command_properties
|
|
63
|
-
// End section: command_properties
|
|
64
|
-
|
|
65
|
-
constructor(readonly input: StartDocumentAnalysisCommandInput) {
|
|
66
|
-
// Start section: command_constructor
|
|
67
|
-
super();
|
|
68
|
-
// End section: command_constructor
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @internal
|
|
73
|
-
*/
|
|
74
|
-
resolveMiddleware(
|
|
75
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
76
|
-
configuration: TextractClientResolvedConfig,
|
|
77
|
-
options?: __HttpHandlerOptions
|
|
78
|
-
): Handler<StartDocumentAnalysisCommandInput, StartDocumentAnalysisCommandOutput> {
|
|
79
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
80
|
-
|
|
81
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
82
|
-
|
|
83
|
-
const { logger } = configuration;
|
|
84
|
-
const clientName = "TextractClient";
|
|
85
|
-
const commandName = "StartDocumentAnalysisCommand";
|
|
86
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
87
|
-
logger,
|
|
88
|
-
clientName,
|
|
89
|
-
commandName,
|
|
90
|
-
inputFilterSensitiveLog: StartDocumentAnalysisRequest.filterSensitiveLog,
|
|
91
|
-
outputFilterSensitiveLog: StartDocumentAnalysisResponse.filterSensitiveLog,
|
|
92
|
-
};
|
|
93
|
-
const { requestHandler } = configuration;
|
|
94
|
-
return stack.resolve(
|
|
95
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
96
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
97
|
-
handlerExecutionContext
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
private serialize(input: StartDocumentAnalysisCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
102
|
-
return serializeAws_json1_1StartDocumentAnalysisCommand(input, context);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<StartDocumentAnalysisCommandOutput> {
|
|
106
|
-
return deserializeAws_json1_1StartDocumentAnalysisCommand(output, context);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Start section: command_body_extra
|
|
110
|
-
// End section: command_body_extra
|
|
111
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
|
|
2
|
-
import { StartDocumentTextDetectionRequest, StartDocumentTextDetectionResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_json1_1StartDocumentTextDetectionCommand,
|
|
5
|
-
serializeAws_json1_1StartDocumentTextDetectionCommand,
|
|
6
|
-
} from "../protocols/Aws_json1_1";
|
|
7
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
8
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
9
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
FinalizeHandlerArguments,
|
|
12
|
-
Handler,
|
|
13
|
-
HandlerExecutionContext,
|
|
14
|
-
MiddlewareStack,
|
|
15
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
export interface StartDocumentTextDetectionCommandInput extends StartDocumentTextDetectionRequest {}
|
|
21
|
-
export interface StartDocumentTextDetectionCommandOutput extends StartDocumentTextDetectionResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of
|
|
25
|
-
* text and the words that make up a line of text.</p>
|
|
26
|
-
* <p>
|
|
27
|
-
* <code>StartDocumentTextDetection</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
|
|
28
|
-
* documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
|
|
29
|
-
* of the document.
|
|
30
|
-
* </p>
|
|
31
|
-
* <p>
|
|
32
|
-
* <code>StartTextDetection</code> returns a job identifier
|
|
33
|
-
* (<code>JobId</code>) that you use to get the results of the operation. When text
|
|
34
|
-
* detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
|
|
35
|
-
* topic that you specify in <code>NotificationChannel</code>. To get the results of the text
|
|
36
|
-
* detection operation, first check that the status value published to the Amazon SNS topic is
|
|
37
|
-
* <code>SUCCEEDED</code>. If so, call <a>GetDocumentTextDetection</a>, and
|
|
38
|
-
* pass the job identifier (<code>JobId</code>) from the initial call to
|
|
39
|
-
* <code>StartDocumentTextDetection</code>.</p>
|
|
40
|
-
* <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>
|
|
41
|
-
* @example
|
|
42
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
43
|
-
* ```javascript
|
|
44
|
-
* import { TextractClient, StartDocumentTextDetectionCommand } from "@aws-sdk/client-textract"; // ES Modules import
|
|
45
|
-
* // const { TextractClient, StartDocumentTextDetectionCommand } = require("@aws-sdk/client-textract"); // CommonJS import
|
|
46
|
-
* const client = new TextractClient(config);
|
|
47
|
-
* const command = new StartDocumentTextDetectionCommand(input);
|
|
48
|
-
* const response = await client.send(command);
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @see {@link StartDocumentTextDetectionCommandInput} for command's `input` shape.
|
|
52
|
-
* @see {@link StartDocumentTextDetectionCommandOutput} for command's `response` shape.
|
|
53
|
-
* @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
export class StartDocumentTextDetectionCommand extends $Command<
|
|
57
|
-
StartDocumentTextDetectionCommandInput,
|
|
58
|
-
StartDocumentTextDetectionCommandOutput,
|
|
59
|
-
TextractClientResolvedConfig
|
|
60
|
-
> {
|
|
61
|
-
// Start section: command_properties
|
|
62
|
-
// End section: command_properties
|
|
63
|
-
|
|
64
|
-
constructor(readonly input: StartDocumentTextDetectionCommandInput) {
|
|
65
|
-
// Start section: command_constructor
|
|
66
|
-
super();
|
|
67
|
-
// End section: command_constructor
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
resolveMiddleware(
|
|
74
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
75
|
-
configuration: TextractClientResolvedConfig,
|
|
76
|
-
options?: __HttpHandlerOptions
|
|
77
|
-
): Handler<StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionCommandOutput> {
|
|
78
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
79
|
-
|
|
80
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
81
|
-
|
|
82
|
-
const { logger } = configuration;
|
|
83
|
-
const clientName = "TextractClient";
|
|
84
|
-
const commandName = "StartDocumentTextDetectionCommand";
|
|
85
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
86
|
-
logger,
|
|
87
|
-
clientName,
|
|
88
|
-
commandName,
|
|
89
|
-
inputFilterSensitiveLog: StartDocumentTextDetectionRequest.filterSensitiveLog,
|
|
90
|
-
outputFilterSensitiveLog: StartDocumentTextDetectionResponse.filterSensitiveLog,
|
|
91
|
-
};
|
|
92
|
-
const { requestHandler } = configuration;
|
|
93
|
-
return stack.resolve(
|
|
94
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
95
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
96
|
-
handlerExecutionContext
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
private serialize(input: StartDocumentTextDetectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
101
|
-
return serializeAws_json1_1StartDocumentTextDetectionCommand(input, context);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private deserialize(
|
|
105
|
-
output: __HttpResponse,
|
|
106
|
-
context: __SerdeContext
|
|
107
|
-
): Promise<StartDocumentTextDetectionCommandOutput> {
|
|
108
|
-
return deserializeAws_json1_1StartDocumentTextDetectionCommand(output, context);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Start section: command_body_extra
|
|
112
|
-
// End section: command_body_extra
|
|
113
|
-
}
|
package/dist/cjs/Textract.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Textract.js","sourceRoot":"","sources":["../../Textract.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAClD,8EAI2C;AAC3C,4EAI0C;AAC1C,oFAI8C;AAC9C,sFAI+C;AAC/C,gGAIoD;AACpD,0FAIiD;AACjD,oGAIsD;AAGtD;;;;GAIG;AACH,MAAa,QAAS,SAAQ,+BAAc;IA+CnC,eAAe,CACpB,IAAiC,EACjC,WAA8F,EAC9F,EAA4D;QAE5D,MAAM,OAAO,GAAG,IAAI,+CAAsB,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE;YACrC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;SACjC;aAAM,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE;YACnC,IAAI,OAAO,WAAW,KAAK,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,OAAO,WAAW,EAAE,CAAC,CAAC;YAC1G,IAAI,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AAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF;AArCD,wCAqCC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnalyzeDocumentCommand = void 0;
|
|
4
|
-
const models_0_1 = require("../models/models_0");
|
|
5
|
-
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
6
|
-
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
7
|
-
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Analyzes an input document for relationships between detected items. </p>
|
|
10
|
-
* <p>The types of information returned are as follows: </p>
|
|
11
|
-
* <ul>
|
|
12
|
-
* <li>
|
|
13
|
-
* <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
|
|
14
|
-
* <code>Block</code> object and a VALUE <code>Block</code> object. For example,
|
|
15
|
-
* <i>Name: Ana Silva Carolina</i> contains a key and value.
|
|
16
|
-
* <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
|
|
17
|
-
* the value.</p>
|
|
18
|
-
* </li>
|
|
19
|
-
* <li>
|
|
20
|
-
* <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
|
|
21
|
-
* <code>Block</code> object is returned for each cell in a table.</p>
|
|
22
|
-
* </li>
|
|
23
|
-
* <li>
|
|
24
|
-
* <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
|
|
25
|
-
* All lines and words that are detected in the document are returned (including text that doesn't have a
|
|
26
|
-
* relationship with the value of <code>FeatureTypes</code>). </p>
|
|
27
|
-
* </li>
|
|
28
|
-
* </ul>
|
|
29
|
-
*
|
|
30
|
-
* <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
|
|
31
|
-
* A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
|
|
32
|
-
* including the selection status.</p>
|
|
33
|
-
* <p>You can choose which type of analysis to perform by specifying the <code>FeatureTypes</code> list.
|
|
34
|
-
* </p>
|
|
35
|
-
* <p>The output is returned in a list of <code>Block</code> objects.</p>
|
|
36
|
-
* <p>
|
|
37
|
-
* <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
|
|
38
|
-
* asynchronously, use <a>StartDocumentAnalysis</a>.</p>
|
|
39
|
-
* <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>
|
|
40
|
-
* @example
|
|
41
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
42
|
-
* ```javascript
|
|
43
|
-
* import { TextractClient, AnalyzeDocumentCommand } from "@aws-sdk/client-textract"; // ES Modules import
|
|
44
|
-
* // const { TextractClient, AnalyzeDocumentCommand } = require("@aws-sdk/client-textract"); // CommonJS import
|
|
45
|
-
* const client = new TextractClient(config);
|
|
46
|
-
* const command = new AnalyzeDocumentCommand(input);
|
|
47
|
-
* const response = await client.send(command);
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* @see {@link AnalyzeDocumentCommandInput} for command's `input` shape.
|
|
51
|
-
* @see {@link AnalyzeDocumentCommandOutput} for command's `response` shape.
|
|
52
|
-
* @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
class AnalyzeDocumentCommand extends smithy_client_1.Command {
|
|
56
|
-
// Start section: command_properties
|
|
57
|
-
// End section: command_properties
|
|
58
|
-
constructor(input) {
|
|
59
|
-
// Start section: command_constructor
|
|
60
|
-
super();
|
|
61
|
-
this.input = input;
|
|
62
|
-
// End section: command_constructor
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
resolveMiddleware(clientStack, configuration, options) {
|
|
68
|
-
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
69
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
70
|
-
const { logger } = configuration;
|
|
71
|
-
const clientName = "TextractClient";
|
|
72
|
-
const commandName = "AnalyzeDocumentCommand";
|
|
73
|
-
const handlerExecutionContext = {
|
|
74
|
-
logger,
|
|
75
|
-
clientName,
|
|
76
|
-
commandName,
|
|
77
|
-
inputFilterSensitiveLog: models_0_1.AnalyzeDocumentRequest.filterSensitiveLog,
|
|
78
|
-
outputFilterSensitiveLog: models_0_1.AnalyzeDocumentResponse.filterSensitiveLog,
|
|
79
|
-
};
|
|
80
|
-
const { requestHandler } = configuration;
|
|
81
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
82
|
-
}
|
|
83
|
-
serialize(input, context) {
|
|
84
|
-
return Aws_json1_1_1.serializeAws_json1_1AnalyzeDocumentCommand(input, context);
|
|
85
|
-
}
|
|
86
|
-
deserialize(output, context) {
|
|
87
|
-
return Aws_json1_1_1.deserializeAws_json1_1AnalyzeDocumentCommand(output, context);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
exports.AnalyzeDocumentCommand = AnalyzeDocumentCommand;
|
|
91
|
-
//# sourceMappingURL=AnalyzeDocumentCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyzeDocumentCommand.js","sourceRoot":"","sources":["../../../commands/AnalyzeDocumentCommand.ts"],"names":[],"mappings":";;;AACA,iDAAqF;AACrF,0DAGkC;AAClC,gEAA2D;AAE3D,0DAA6D;AAc7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAa,sBAAuB,SAAQ,uBAI3C;IACC,oCAAoC;IACpC,kCAAkC;IAElC,YAAqB,KAAkC;QACrD,qCAAqC;QACrC,KAAK,EAAE,CAAC;QAFW,UAAK,GAAL,KAAK,CAA6B;QAGrD,mCAAmC;IACrC,CAAC;IAED;;OAEG;IACH,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