@aws-sdk/client-textract 3.36.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/Textract.js +0 -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/StartDocumentAnalysisCommand.js +0 -41
  10. package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +0 -40
  11. package/dist-cjs/models/models_0.js +0 -147
  12. package/dist-cjs/protocols/Aws_json1_1.js +0 -5
  13. package/dist-cjs/runtimeConfig.browser.js +1 -5
  14. package/dist-cjs/runtimeConfig.js +1 -5
  15. package/dist-cjs/runtimeConfig.native.js +0 -3
  16. package/dist-cjs/runtimeConfig.shared.js +0 -3
  17. package/dist-types/ts3.4/Textract.d.ts +8 -180
  18. package/dist-types/ts3.4/TextractClient.d.ts +24 -91
  19. package/dist-types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +2 -50
  20. package/dist-types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +2 -33
  21. package/dist-types/ts3.4/commands/DetectDocumentTextCommand.d.ts +2 -30
  22. package/dist-types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +2 -64
  23. package/dist-types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +2 -44
  24. package/dist-types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +2 -37
  25. package/dist-types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +2 -36
  26. package/dist-types/ts3.4/models/models_0.d.ts +195 -893
  27. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  28. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  29. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  30. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  31. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.36.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.0...v3.36.1) (2021-10-12)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **clients:** emitDeclarationOnly in tsconfig.types.json ([#2893](https://github.com/aws/aws-sdk-js-v3/issues/2893)) ([6dc3d56](https://github.com/aws/aws-sdk-js-v3/commit/6dc3d56c20809c90cbdc4dd48627eeebc64af99d))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
7
18
 
8
19
 
@@ -9,11 +9,6 @@ const GetDocumentTextDetectionCommand_1 = require("./commands/GetDocumentTextDet
9
9
  const StartDocumentAnalysisCommand_1 = require("./commands/StartDocumentAnalysisCommand");
10
10
  const StartDocumentTextDetectionCommand_1 = require("./commands/StartDocumentTextDetectionCommand");
11
11
  const TextractClient_1 = require("./TextractClient");
12
- /**
13
- * <p>Amazon Textract detects and analyzes text in documents and converts it
14
- * into machine-readable text. This is the API reference documentation for
15
- * Amazon Textract.</p>
16
- */
17
12
  class Textract extends TextractClient_1.TextractClient {
18
13
  analyzeDocument(args, optionsOrCb, cb) {
19
14
  const command = new AnalyzeDocumentCommand_1.AnalyzeDocumentCommand(args);
@@ -10,11 +10,6 @@ const middleware_signing_1 = require("@aws-sdk/middleware-signing");
10
10
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
11
11
  const smithy_client_1 = require("@aws-sdk/smithy-client");
12
12
  const runtimeConfig_1 = require("./runtimeConfig");
13
- /**
14
- * <p>Amazon Textract detects and analyzes text in documents and converts it
15
- * into machine-readable text. This is the API reference documentation for
16
- * Amazon Textract.</p>
17
- */
18
13
  class TextractClient extends smithy_client_1.Client {
19
14
  constructor(configuration) {
20
15
  const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration);
@@ -33,11 +28,6 @@ class TextractClient extends smithy_client_1.Client {
33
28
  this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config));
34
29
  this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config));
35
30
  }
36
- /**
37
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
38
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
39
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
40
- */
41
31
  destroy() {
42
32
  super.destroy();
43
33
  }
@@ -5,65 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
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
8
  class AnalyzeDocumentCommand extends smithy_client_1.Command {
56
- // Start section: command_properties
57
- // End section: command_properties
58
9
  constructor(input) {
59
- // Start section: command_constructor
60
10
  super();
61
11
  this.input = input;
62
- // End section: command_constructor
63
12
  }
64
- /**
65
- * @internal
66
- */
67
13
  resolveMiddleware(clientStack, configuration, options) {
68
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
69
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,48 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Analyzes an input document for financially related relationships between text.</p>
10
- * <p>Information is returned as <code>ExpenseDocuments</code> and seperated as follows.</p>
11
- * <ul>
12
- * <li>
13
- * <p>
14
- * <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
15
- * store information about the lines of text, such as an item purchased and its price on a receipt.</p>
16
- * </li>
17
- * <li>
18
- * <p>
19
- * <code>SummaryFields</code>- Contains all other information a receipt, such as header information
20
- * or the vendors name.</p>
21
- * </li>
22
- * </ul>
23
- * @example
24
- * Use a bare-bones client and the command you need to make an API call.
25
- * ```javascript
26
- * import { TextractClient, AnalyzeExpenseCommand } from "@aws-sdk/client-textract"; // ES Modules import
27
- * // const { TextractClient, AnalyzeExpenseCommand } = require("@aws-sdk/client-textract"); // CommonJS import
28
- * const client = new TextractClient(config);
29
- * const command = new AnalyzeExpenseCommand(input);
30
- * const response = await client.send(command);
31
- * ```
32
- *
33
- * @see {@link AnalyzeExpenseCommandInput} for command's `input` shape.
34
- * @see {@link AnalyzeExpenseCommandOutput} for command's `response` shape.
35
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
36
- *
37
- */
38
8
  class AnalyzeExpenseCommand extends smithy_client_1.Command {
39
- // Start section: command_properties
40
- // End section: command_properties
41
9
  constructor(input) {
42
- // Start section: command_constructor
43
10
  super();
44
11
  this.input = input;
45
- // End section: command_constructor
46
12
  }
47
- /**
48
- * @internal
49
- */
50
13
  resolveMiddleware(clientStack, configuration, options) {
51
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
52
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,45 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Detects text in the input document. Amazon Textract can detect lines of text and the
10
- * words that make up a line of text. The input document must be an image in JPEG or PNG
11
- * format. <code>DetectDocumentText</code> returns the detected text in an array of <a>Block</a> objects. </p>
12
- * <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
13
- * 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
14
- * a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
15
- *
16
- * <p>
17
- * <code>DetectDocumentText</code> is a synchronous operation. To analyze documents
18
- * asynchronously, use <a>StartDocumentTextDetection</a>.</p>
19
- * <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>
20
- * @example
21
- * Use a bare-bones client and the command you need to make an API call.
22
- * ```javascript
23
- * import { TextractClient, DetectDocumentTextCommand } from "@aws-sdk/client-textract"; // ES Modules import
24
- * // const { TextractClient, DetectDocumentTextCommand } = require("@aws-sdk/client-textract"); // CommonJS import
25
- * const client = new TextractClient(config);
26
- * const command = new DetectDocumentTextCommand(input);
27
- * const response = await client.send(command);
28
- * ```
29
- *
30
- * @see {@link DetectDocumentTextCommandInput} for command's `input` shape.
31
- * @see {@link DetectDocumentTextCommandOutput} for command's `response` shape.
32
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
33
- *
34
- */
35
8
  class DetectDocumentTextCommand extends smithy_client_1.Command {
36
- // Start section: command_properties
37
- // End section: command_properties
38
9
  constructor(input) {
39
- // Start section: command_constructor
40
10
  super();
41
11
  this.input = input;
42
- // End section: command_constructor
43
12
  }
44
- /**
45
- * @internal
46
- */
47
13
  resolveMiddleware(clientStack, configuration, options) {
48
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
49
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,79 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.</p>
10
- * <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>, which returns a job identifier
11
- * (<code>JobId</code>). When the text analysis operation finishes, Amazon Textract publishes a
12
- * completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
13
- * <code>StartDocumentAnalysis</code>. To get the results of the text-detection operation,
14
- * first check that the status value published to the Amazon SNS topic is <code>SUCCEEDED</code>.
15
- * If so, call <code>GetDocumentAnalysis</code>, and pass the job identifier
16
- * (<code>JobId</code>) from the initial call to <code>StartDocumentAnalysis</code>.</p>
17
- * <p>
18
- * <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects. The following
19
- * types of information are returned: </p>
20
- * <ul>
21
- * <li>
22
- * <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
23
- * <code>Block</code> object and a VALUE <code>Block</code> object. For example,
24
- * <i>Name: Ana Silva Carolina</i> contains a key and value.
25
- * <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
26
- * the value.</p>
27
- * </li>
28
- * <li>
29
- * <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
30
- * <code>Block</code> object is returned for each cell in a table.</p>
31
- * </li>
32
- * <li>
33
- * <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
34
- * All lines and words that are detected in the document are returned (including text that doesn't have a
35
- * relationship with the value of the <code>StartDocumentAnalysis</code>
36
- * <code>FeatureTypes</code> input parameter). </p>
37
- * </li>
38
- * </ul>
39
- *
40
- * <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
41
- * A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
42
- * including the selection status.</p>
43
- *
44
- *
45
- *
46
- * <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
47
- * returned. If there are more results than specified in <code>MaxResults</code>, the value of
48
- * <code>NextToken</code> in the operation response contains a pagination token for getting
49
- * the next set of results. To get the next page of results, call
50
- * <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
51
- * parameter with the token value that's returned from the previous call to
52
- * <code>GetDocumentAnalysis</code>.</p>
53
- * <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>
54
- * @example
55
- * Use a bare-bones client and the command you need to make an API call.
56
- * ```javascript
57
- * import { TextractClient, GetDocumentAnalysisCommand } from "@aws-sdk/client-textract"; // ES Modules import
58
- * // const { TextractClient, GetDocumentAnalysisCommand } = require("@aws-sdk/client-textract"); // CommonJS import
59
- * const client = new TextractClient(config);
60
- * const command = new GetDocumentAnalysisCommand(input);
61
- * const response = await client.send(command);
62
- * ```
63
- *
64
- * @see {@link GetDocumentAnalysisCommandInput} for command's `input` shape.
65
- * @see {@link GetDocumentAnalysisCommandOutput} for command's `response` shape.
66
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
67
- *
68
- */
69
8
  class GetDocumentAnalysisCommand extends smithy_client_1.Command {
70
- // Start section: command_properties
71
- // End section: command_properties
72
9
  constructor(input) {
73
- // Start section: command_constructor
74
10
  super();
75
11
  this.input = input;
76
- // End section: command_constructor
77
12
  }
78
- /**
79
- * @internal
80
- */
81
13
  resolveMiddleware(clientStack, configuration, options) {
82
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
83
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,59 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Gets the results for an Amazon Textract asynchronous operation that detects text in a document.
10
- * Amazon Textract can detect lines of text and the words that make up a line of text.</p>
11
- * <p>You start asynchronous text detection by calling <a>StartDocumentTextDetection</a>, which returns a job identifier
12
- * (<code>JobId</code>). When the text detection operation finishes, Amazon Textract publishes a
13
- * completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
14
- * <code>StartDocumentTextDetection</code>. To get the results of the text-detection
15
- * operation, first check that the status value published to the Amazon SNS topic is
16
- * <code>SUCCEEDED</code>. If so, call <code>GetDocumentTextDetection</code>, and pass the
17
- * job identifier (<code>JobId</code>) from the initial call to
18
- * <code>StartDocumentTextDetection</code>.</p>
19
- * <p>
20
- * <code>GetDocumentTextDetection</code> returns an array of <a>Block</a>
21
- * objects. </p>
22
- * <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
23
- * 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
24
- * a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
25
- *
26
- * <p>Use the MaxResults parameter to limit the number of blocks that are returned. If there
27
- * are more results than specified in <code>MaxResults</code>, the value of
28
- * <code>NextToken</code> in the operation response contains a pagination token for getting
29
- * the next set of results. To get the next page of results, call
30
- * <code>GetDocumentTextDetection</code>, and populate the <code>NextToken</code> request
31
- * parameter with the token value that's returned from the previous call to
32
- * <code>GetDocumentTextDetection</code>.</p>
33
- * <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>
34
- * @example
35
- * Use a bare-bones client and the command you need to make an API call.
36
- * ```javascript
37
- * import { TextractClient, GetDocumentTextDetectionCommand } from "@aws-sdk/client-textract"; // ES Modules import
38
- * // const { TextractClient, GetDocumentTextDetectionCommand } = require("@aws-sdk/client-textract"); // CommonJS import
39
- * const client = new TextractClient(config);
40
- * const command = new GetDocumentTextDetectionCommand(input);
41
- * const response = await client.send(command);
42
- * ```
43
- *
44
- * @see {@link GetDocumentTextDetectionCommandInput} for command's `input` shape.
45
- * @see {@link GetDocumentTextDetectionCommandOutput} for command's `response` shape.
46
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
47
- *
48
- */
49
8
  class GetDocumentTextDetectionCommand extends smithy_client_1.Command {
50
- // Start section: command_properties
51
- // End section: command_properties
52
9
  constructor(input) {
53
- // Start section: command_constructor
54
10
  super();
55
11
  this.input = input;
56
- // End section: command_constructor
57
12
  }
58
- /**
59
- * @internal
60
- */
61
13
  resolveMiddleware(clientStack, configuration, options) {
62
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
63
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,52 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Starts the asynchronous analysis of an input document for relationships between detected
10
- * items such as key-value pairs, tables, and selection elements.</p>
11
- *
12
- * <p>
13
- * <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
14
- * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
15
- * of the document.
16
- * </p>
17
- * <p>
18
- * <code>StartDocumentAnalysis</code> returns a job identifier
19
- * (<code>JobId</code>) that you use to get the results of the operation. When text
20
- * analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
21
- * topic that you specify in <code>NotificationChannel</code>. To get the results of the text
22
- * analysis operation, first check that the status value published to the Amazon SNS topic is
23
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentAnalysis</a>, and pass
24
- * the job identifier (<code>JobId</code>) from the initial call to
25
- * <code>StartDocumentAnalysis</code>.</p>
26
- * <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>
27
- * @example
28
- * Use a bare-bones client and the command you need to make an API call.
29
- * ```javascript
30
- * import { TextractClient, StartDocumentAnalysisCommand } from "@aws-sdk/client-textract"; // ES Modules import
31
- * // const { TextractClient, StartDocumentAnalysisCommand } = require("@aws-sdk/client-textract"); // CommonJS import
32
- * const client = new TextractClient(config);
33
- * const command = new StartDocumentAnalysisCommand(input);
34
- * const response = await client.send(command);
35
- * ```
36
- *
37
- * @see {@link StartDocumentAnalysisCommandInput} for command's `input` shape.
38
- * @see {@link StartDocumentAnalysisCommandOutput} for command's `response` shape.
39
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
40
- *
41
- */
42
8
  class StartDocumentAnalysisCommand extends smithy_client_1.Command {
43
- // Start section: command_properties
44
- // End section: command_properties
45
9
  constructor(input) {
46
- // Start section: command_constructor
47
10
  super();
48
11
  this.input = input;
49
- // End section: command_constructor
50
12
  }
51
- /**
52
- * @internal
53
- */
54
13
  resolveMiddleware(clientStack, configuration, options) {
55
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
56
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,51 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of
10
- * text and the words that make up a line of text.</p>
11
- * <p>
12
- * <code>StartDocumentTextDetection</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
13
- * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
14
- * of the document.
15
- * </p>
16
- * <p>
17
- * <code>StartTextDetection</code> returns a job identifier
18
- * (<code>JobId</code>) that you use to get the results of the operation. When text
19
- * detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
20
- * topic that you specify in <code>NotificationChannel</code>. To get the results of the text
21
- * detection operation, first check that the status value published to the Amazon SNS topic is
22
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentTextDetection</a>, and
23
- * pass the job identifier (<code>JobId</code>) from the initial call to
24
- * <code>StartDocumentTextDetection</code>.</p>
25
- * <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>
26
- * @example
27
- * Use a bare-bones client and the command you need to make an API call.
28
- * ```javascript
29
- * import { TextractClient, StartDocumentTextDetectionCommand } from "@aws-sdk/client-textract"; // ES Modules import
30
- * // const { TextractClient, StartDocumentTextDetectionCommand } = require("@aws-sdk/client-textract"); // CommonJS import
31
- * const client = new TextractClient(config);
32
- * const command = new StartDocumentTextDetectionCommand(input);
33
- * const response = await client.send(command);
34
- * ```
35
- *
36
- * @see {@link StartDocumentTextDetectionCommandInput} for command's `input` shape.
37
- * @see {@link StartDocumentTextDetectionCommandOutput} for command's `response` shape.
38
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
39
- *
40
- */
41
8
  class StartDocumentTextDetectionCommand extends smithy_client_1.Command {
42
- // Start section: command_properties
43
- // End section: command_properties
44
9
  constructor(input) {
45
- // Start section: command_constructor
46
10
  super();
47
11
  this.input = input;
48
- // End section: command_constructor
49
12
  }
50
- /**
51
- * @internal
52
- */
53
13
  resolveMiddleware(clientStack, configuration, options) {
54
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
55
15
  const stack = clientStack.concat(this.middlewareStack);