@aws-sdk/client-textract 3.35.0 → 3.36.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 (96) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist-cjs/Textract.js +0 -1
  3. package/dist-cjs/TextractClient.js +0 -1
  4. package/dist-cjs/commands/AnalyzeDocumentCommand.js +0 -1
  5. package/dist-cjs/commands/AnalyzeExpenseCommand.js +0 -1
  6. package/dist-cjs/commands/DetectDocumentTextCommand.js +0 -1
  7. package/dist-cjs/commands/GetDocumentAnalysisCommand.js +0 -1
  8. package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +0 -1
  9. package/dist-cjs/commands/StartDocumentAnalysisCommand.js +0 -1
  10. package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +0 -1
  11. package/dist-cjs/endpoints.js +0 -1
  12. package/dist-cjs/index.js +0 -1
  13. package/dist-cjs/models/index.js +0 -1
  14. package/dist-cjs/models/models_0.js +0 -1
  15. package/dist-cjs/protocols/Aws_json1_1.js +0 -1
  16. package/dist-cjs/runtimeConfig.browser.js +2 -3
  17. package/dist-cjs/runtimeConfig.js +3 -4
  18. package/dist-cjs/runtimeConfig.native.js +0 -1
  19. package/dist-cjs/runtimeConfig.shared.js +0 -1
  20. package/dist-es/Textract.js +0 -1
  21. package/dist-es/TextractClient.js +0 -1
  22. package/dist-es/commands/AnalyzeDocumentCommand.js +0 -1
  23. package/dist-es/commands/AnalyzeExpenseCommand.js +0 -1
  24. package/dist-es/commands/DetectDocumentTextCommand.js +0 -1
  25. package/dist-es/commands/GetDocumentAnalysisCommand.js +0 -1
  26. package/dist-es/commands/GetDocumentTextDetectionCommand.js +0 -1
  27. package/dist-es/commands/StartDocumentAnalysisCommand.js +0 -1
  28. package/dist-es/commands/StartDocumentTextDetectionCommand.js +0 -1
  29. package/dist-es/endpoints.js +0 -1
  30. package/dist-es/index.js +0 -1
  31. package/dist-es/models/index.js +0 -1
  32. package/dist-es/models/models_0.js +0 -1
  33. package/dist-es/protocols/Aws_json1_1.js +0 -1
  34. package/dist-es/runtimeConfig.browser.js +1 -2
  35. package/dist-es/runtimeConfig.js +2 -3
  36. package/dist-es/runtimeConfig.native.js +0 -1
  37. package/dist-es/runtimeConfig.shared.js +0 -1
  38. package/package.json +33 -30
  39. package/dist-cjs/Textract.js.map +0 -1
  40. package/dist-cjs/TextractClient.js.map +0 -1
  41. package/dist-cjs/commands/AnalyzeDocumentCommand.js.map +0 -1
  42. package/dist-cjs/commands/AnalyzeExpenseCommand.js.map +0 -1
  43. package/dist-cjs/commands/DetectDocumentTextCommand.js.map +0 -1
  44. package/dist-cjs/commands/GetDocumentAnalysisCommand.js.map +0 -1
  45. package/dist-cjs/commands/GetDocumentTextDetectionCommand.js.map +0 -1
  46. package/dist-cjs/commands/StartDocumentAnalysisCommand.js.map +0 -1
  47. package/dist-cjs/commands/StartDocumentTextDetectionCommand.js.map +0 -1
  48. package/dist-cjs/endpoints.js.map +0 -1
  49. package/dist-cjs/index.js.map +0 -1
  50. package/dist-cjs/models/index.js.map +0 -1
  51. package/dist-cjs/models/models_0.js.map +0 -1
  52. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  53. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  54. package/dist-cjs/runtimeConfig.js.map +0 -1
  55. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  56. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  57. package/dist-es/Textract.js.map +0 -1
  58. package/dist-es/TextractClient.js.map +0 -1
  59. package/dist-es/commands/AnalyzeDocumentCommand.js.map +0 -1
  60. package/dist-es/commands/AnalyzeExpenseCommand.js.map +0 -1
  61. package/dist-es/commands/DetectDocumentTextCommand.js.map +0 -1
  62. package/dist-es/commands/GetDocumentAnalysisCommand.js.map +0 -1
  63. package/dist-es/commands/GetDocumentTextDetectionCommand.js.map +0 -1
  64. package/dist-es/commands/StartDocumentAnalysisCommand.js.map +0 -1
  65. package/dist-es/commands/StartDocumentTextDetectionCommand.js.map +0 -1
  66. package/dist-es/endpoints.js.map +0 -1
  67. package/dist-es/index.js.map +0 -1
  68. package/dist-es/models/index.js.map +0 -1
  69. package/dist-es/models/models_0.js.map +0 -1
  70. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  71. package/dist-es/runtimeConfig.browser.js.map +0 -1
  72. package/dist-es/runtimeConfig.js.map +0 -1
  73. package/dist-es/runtimeConfig.native.js.map +0 -1
  74. package/dist-es/runtimeConfig.shared.js.map +0 -1
  75. package/jest.config.js +0 -4
  76. package/src/Textract.ts +0 -423
  77. package/src/TextractClient.ts +0 -271
  78. package/src/commands/AnalyzeDocumentCommand.ts +0 -125
  79. package/src/commands/AnalyzeExpenseCommand.ts +0 -108
  80. package/src/commands/DetectDocumentTextCommand.ts +0 -105
  81. package/src/commands/GetDocumentAnalysisCommand.ts +0 -139
  82. package/src/commands/GetDocumentTextDetectionCommand.ts +0 -119
  83. package/src/commands/StartDocumentAnalysisCommand.ts +0 -112
  84. package/src/commands/StartDocumentTextDetectionCommand.ts +0 -114
  85. package/src/endpoints.ts +0 -57
  86. package/src/index.ts +0 -10
  87. package/src/models/index.ts +0 -1
  88. package/src/models/models_0.ts +0 -1627
  89. package/src/protocols/Aws_json1_1.ts +0 -2061
  90. package/src/runtimeConfig.browser.ts +0 -41
  91. package/src/runtimeConfig.native.ts +0 -17
  92. package/src/runtimeConfig.shared.ts +0 -17
  93. package/src/runtimeConfig.ts +0 -46
  94. package/tsconfig.es.json +0 -10
  95. package/tsconfig.json +0 -33
  96. package/tsconfig.types.json +0 -9
@@ -1,139 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { GetDocumentAnalysisRequest, GetDocumentAnalysisResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1GetDocumentAnalysisCommand,
17
- serializeAws_json1_1GetDocumentAnalysisCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
20
-
21
- export interface GetDocumentAnalysisCommandInput extends GetDocumentAnalysisRequest {}
22
- export interface GetDocumentAnalysisCommandOutput extends GetDocumentAnalysisResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.</p>
26
- * <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>, which returns a job identifier
27
- * (<code>JobId</code>). When the text analysis 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>StartDocumentAnalysis</code>. To get the results of the text-detection operation,
30
- * first check that the status value published to the Amazon SNS topic is <code>SUCCEEDED</code>.
31
- * If so, call <code>GetDocumentAnalysis</code>, and pass the job identifier
32
- * (<code>JobId</code>) from the initial call to <code>StartDocumentAnalysis</code>.</p>
33
- * <p>
34
- * <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects. The following
35
- * types of information are returned: </p>
36
- * <ul>
37
- * <li>
38
- * <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
39
- * <code>Block</code> object and a VALUE <code>Block</code> object. For example,
40
- * <i>Name: Ana Silva Carolina</i> contains a key and value.
41
- * <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
42
- * the value.</p>
43
- * </li>
44
- * <li>
45
- * <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
46
- * <code>Block</code> object is returned for each cell in a table.</p>
47
- * </li>
48
- * <li>
49
- * <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
50
- * All lines and words that are detected in the document are returned (including text that doesn't have a
51
- * relationship with the value of the <code>StartDocumentAnalysis</code>
52
- * <code>FeatureTypes</code> input parameter). </p>
53
- * </li>
54
- * </ul>
55
- *
56
- * <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
57
- * A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
58
- * including the selection status.</p>
59
- *
60
- *
61
- *
62
- * <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
63
- * returned. If there are more results than specified in <code>MaxResults</code>, the value of
64
- * <code>NextToken</code> in the operation response contains a pagination token for getting
65
- * the next set of results. To get the next page of results, call
66
- * <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
67
- * parameter with the token value that's returned from the previous call to
68
- * <code>GetDocumentAnalysis</code>.</p>
69
- * <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>
70
- * @example
71
- * Use a bare-bones client and the command you need to make an API call.
72
- * ```javascript
73
- * import { TextractClient, GetDocumentAnalysisCommand } from "@aws-sdk/client-textract"; // ES Modules import
74
- * // const { TextractClient, GetDocumentAnalysisCommand } = require("@aws-sdk/client-textract"); // CommonJS import
75
- * const client = new TextractClient(config);
76
- * const command = new GetDocumentAnalysisCommand(input);
77
- * const response = await client.send(command);
78
- * ```
79
- *
80
- * @see {@link GetDocumentAnalysisCommandInput} for command's `input` shape.
81
- * @see {@link GetDocumentAnalysisCommandOutput} for command's `response` shape.
82
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
83
- *
84
- */
85
- export class GetDocumentAnalysisCommand extends $Command<
86
- GetDocumentAnalysisCommandInput,
87
- GetDocumentAnalysisCommandOutput,
88
- TextractClientResolvedConfig
89
- > {
90
- // Start section: command_properties
91
- // End section: command_properties
92
-
93
- constructor(readonly input: GetDocumentAnalysisCommandInput) {
94
- // Start section: command_constructor
95
- super();
96
- // End section: command_constructor
97
- }
98
-
99
- /**
100
- * @internal
101
- */
102
- resolveMiddleware(
103
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
104
- configuration: TextractClientResolvedConfig,
105
- options?: __HttpHandlerOptions
106
- ): Handler<GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput> {
107
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
108
-
109
- const stack = clientStack.concat(this.middlewareStack);
110
-
111
- const { logger } = configuration;
112
- const clientName = "TextractClient";
113
- const commandName = "GetDocumentAnalysisCommand";
114
- const handlerExecutionContext: HandlerExecutionContext = {
115
- logger,
116
- clientName,
117
- commandName,
118
- inputFilterSensitiveLog: GetDocumentAnalysisRequest.filterSensitiveLog,
119
- outputFilterSensitiveLog: GetDocumentAnalysisResponse.filterSensitiveLog,
120
- };
121
- const { requestHandler } = configuration;
122
- return stack.resolve(
123
- (request: FinalizeHandlerArguments<any>) =>
124
- requestHandler.handle(request.request as __HttpRequest, options || {}),
125
- handlerExecutionContext
126
- );
127
- }
128
-
129
- private serialize(input: GetDocumentAnalysisCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
130
- return serializeAws_json1_1GetDocumentAnalysisCommand(input, context);
131
- }
132
-
133
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetDocumentAnalysisCommandOutput> {
134
- return deserializeAws_json1_1GetDocumentAnalysisCommand(output, context);
135
- }
136
-
137
- // Start section: command_body_extra
138
- // End section: command_body_extra
139
- }
@@ -1,119 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { GetDocumentTextDetectionRequest, GetDocumentTextDetectionResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1GetDocumentTextDetectionCommand,
17
- serializeAws_json1_1GetDocumentTextDetectionCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
20
-
21
- export interface GetDocumentTextDetectionCommandInput extends GetDocumentTextDetectionRequest {}
22
- export interface GetDocumentTextDetectionCommandOutput extends GetDocumentTextDetectionResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Gets the results for an Amazon Textract asynchronous operation that detects text in a document.
26
- * Amazon Textract can detect lines of text and the words that make up a line of text.</p>
27
- * <p>You start asynchronous text detection by calling <a>StartDocumentTextDetection</a>, which returns a job identifier
28
- * (<code>JobId</code>). When the text detection operation finishes, Amazon Textract publishes a
29
- * completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
30
- * <code>StartDocumentTextDetection</code>. To get the results of the text-detection
31
- * operation, first check that the status value published to the Amazon SNS topic is
32
- * <code>SUCCEEDED</code>. If so, call <code>GetDocumentTextDetection</code>, and pass the
33
- * job identifier (<code>JobId</code>) from the initial call to
34
- * <code>StartDocumentTextDetection</code>.</p>
35
- * <p>
36
- * <code>GetDocumentTextDetection</code> returns an array of <a>Block</a>
37
- * objects. </p>
38
- * <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
39
- * 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
40
- * a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
41
- *
42
- * <p>Use the MaxResults parameter to limit the number of blocks that are returned. If there
43
- * are more results than specified in <code>MaxResults</code>, the value of
44
- * <code>NextToken</code> in the operation response contains a pagination token for getting
45
- * the next set of results. To get the next page of results, call
46
- * <code>GetDocumentTextDetection</code>, and populate the <code>NextToken</code> request
47
- * parameter with the token value that's returned from the previous call to
48
- * <code>GetDocumentTextDetection</code>.</p>
49
- * <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>
50
- * @example
51
- * Use a bare-bones client and the command you need to make an API call.
52
- * ```javascript
53
- * import { TextractClient, GetDocumentTextDetectionCommand } from "@aws-sdk/client-textract"; // ES Modules import
54
- * // const { TextractClient, GetDocumentTextDetectionCommand } = require("@aws-sdk/client-textract"); // CommonJS import
55
- * const client = new TextractClient(config);
56
- * const command = new GetDocumentTextDetectionCommand(input);
57
- * const response = await client.send(command);
58
- * ```
59
- *
60
- * @see {@link GetDocumentTextDetectionCommandInput} for command's `input` shape.
61
- * @see {@link GetDocumentTextDetectionCommandOutput} for command's `response` shape.
62
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
63
- *
64
- */
65
- export class GetDocumentTextDetectionCommand extends $Command<
66
- GetDocumentTextDetectionCommandInput,
67
- GetDocumentTextDetectionCommandOutput,
68
- TextractClientResolvedConfig
69
- > {
70
- // Start section: command_properties
71
- // End section: command_properties
72
-
73
- constructor(readonly input: GetDocumentTextDetectionCommandInput) {
74
- // Start section: command_constructor
75
- super();
76
- // End section: command_constructor
77
- }
78
-
79
- /**
80
- * @internal
81
- */
82
- resolveMiddleware(
83
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
84
- configuration: TextractClientResolvedConfig,
85
- options?: __HttpHandlerOptions
86
- ): Handler<GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput> {
87
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
88
-
89
- const stack = clientStack.concat(this.middlewareStack);
90
-
91
- const { logger } = configuration;
92
- const clientName = "TextractClient";
93
- const commandName = "GetDocumentTextDetectionCommand";
94
- const handlerExecutionContext: HandlerExecutionContext = {
95
- logger,
96
- clientName,
97
- commandName,
98
- inputFilterSensitiveLog: GetDocumentTextDetectionRequest.filterSensitiveLog,
99
- outputFilterSensitiveLog: GetDocumentTextDetectionResponse.filterSensitiveLog,
100
- };
101
- const { requestHandler } = configuration;
102
- return stack.resolve(
103
- (request: FinalizeHandlerArguments<any>) =>
104
- requestHandler.handle(request.request as __HttpRequest, options || {}),
105
- handlerExecutionContext
106
- );
107
- }
108
-
109
- private serialize(input: GetDocumentTextDetectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
110
- return serializeAws_json1_1GetDocumentTextDetectionCommand(input, context);
111
- }
112
-
113
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetDocumentTextDetectionCommandOutput> {
114
- return deserializeAws_json1_1GetDocumentTextDetectionCommand(output, context);
115
- }
116
-
117
- // Start section: command_body_extra
118
- // End section: command_body_extra
119
- }
@@ -1,112 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { StartDocumentAnalysisRequest, StartDocumentAnalysisResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1StartDocumentAnalysisCommand,
17
- serializeAws_json1_1StartDocumentAnalysisCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
20
-
21
- export interface StartDocumentAnalysisCommandInput extends StartDocumentAnalysisRequest {}
22
- export interface StartDocumentAnalysisCommandOutput extends StartDocumentAnalysisResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Starts the asynchronous analysis of an input document for relationships between detected
26
- * items such as key-value pairs, tables, and selection elements.</p>
27
- *
28
- * <p>
29
- * <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
30
- * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
31
- * of the document.
32
- * </p>
33
- * <p>
34
- * <code>StartDocumentAnalysis</code> returns a job identifier
35
- * (<code>JobId</code>) that you use to get the results of the operation. When text
36
- * analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
37
- * topic that you specify in <code>NotificationChannel</code>. To get the results of the text
38
- * analysis operation, first check that the status value published to the Amazon SNS topic is
39
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentAnalysis</a>, and pass
40
- * the job identifier (<code>JobId</code>) from the initial call to
41
- * <code>StartDocumentAnalysis</code>.</p>
42
- * <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>
43
- * @example
44
- * Use a bare-bones client and the command you need to make an API call.
45
- * ```javascript
46
- * import { TextractClient, StartDocumentAnalysisCommand } from "@aws-sdk/client-textract"; // ES Modules import
47
- * // const { TextractClient, StartDocumentAnalysisCommand } = require("@aws-sdk/client-textract"); // CommonJS import
48
- * const client = new TextractClient(config);
49
- * const command = new StartDocumentAnalysisCommand(input);
50
- * const response = await client.send(command);
51
- * ```
52
- *
53
- * @see {@link StartDocumentAnalysisCommandInput} for command's `input` shape.
54
- * @see {@link StartDocumentAnalysisCommandOutput} for command's `response` shape.
55
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
56
- *
57
- */
58
- export class StartDocumentAnalysisCommand extends $Command<
59
- StartDocumentAnalysisCommandInput,
60
- StartDocumentAnalysisCommandOutput,
61
- TextractClientResolvedConfig
62
- > {
63
- // Start section: command_properties
64
- // End section: command_properties
65
-
66
- constructor(readonly input: StartDocumentAnalysisCommandInput) {
67
- // Start section: command_constructor
68
- super();
69
- // End section: command_constructor
70
- }
71
-
72
- /**
73
- * @internal
74
- */
75
- resolveMiddleware(
76
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
77
- configuration: TextractClientResolvedConfig,
78
- options?: __HttpHandlerOptions
79
- ): Handler<StartDocumentAnalysisCommandInput, StartDocumentAnalysisCommandOutput> {
80
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
81
-
82
- const stack = clientStack.concat(this.middlewareStack);
83
-
84
- const { logger } = configuration;
85
- const clientName = "TextractClient";
86
- const commandName = "StartDocumentAnalysisCommand";
87
- const handlerExecutionContext: HandlerExecutionContext = {
88
- logger,
89
- clientName,
90
- commandName,
91
- inputFilterSensitiveLog: StartDocumentAnalysisRequest.filterSensitiveLog,
92
- outputFilterSensitiveLog: StartDocumentAnalysisResponse.filterSensitiveLog,
93
- };
94
- const { requestHandler } = configuration;
95
- return stack.resolve(
96
- (request: FinalizeHandlerArguments<any>) =>
97
- requestHandler.handle(request.request as __HttpRequest, options || {}),
98
- handlerExecutionContext
99
- );
100
- }
101
-
102
- private serialize(input: StartDocumentAnalysisCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
103
- return serializeAws_json1_1StartDocumentAnalysisCommand(input, context);
104
- }
105
-
106
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<StartDocumentAnalysisCommandOutput> {
107
- return deserializeAws_json1_1StartDocumentAnalysisCommand(output, context);
108
- }
109
-
110
- // Start section: command_body_extra
111
- // End section: command_body_extra
112
- }
@@ -1,114 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { StartDocumentTextDetectionRequest, StartDocumentTextDetectionResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1StartDocumentTextDetectionCommand,
17
- serializeAws_json1_1StartDocumentTextDetectionCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
20
-
21
- export interface StartDocumentTextDetectionCommandInput extends StartDocumentTextDetectionRequest {}
22
- export interface StartDocumentTextDetectionCommandOutput extends StartDocumentTextDetectionResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of
26
- * text and the words that make up a line of text.</p>
27
- * <p>
28
- * <code>StartDocumentTextDetection</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>StartTextDetection</code> returns a job identifier
34
- * (<code>JobId</code>) that you use to get the results of the operation. When text
35
- * detection 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
- * detection operation, first check that the status value published to the Amazon SNS topic is
38
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentTextDetection</a>, and
39
- * pass the job identifier (<code>JobId</code>) from the initial call to
40
- * <code>StartDocumentTextDetection</code>.</p>
41
- * <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>
42
- * @example
43
- * Use a bare-bones client and the command you need to make an API call.
44
- * ```javascript
45
- * import { TextractClient, StartDocumentTextDetectionCommand } from "@aws-sdk/client-textract"; // ES Modules import
46
- * // const { TextractClient, StartDocumentTextDetectionCommand } = require("@aws-sdk/client-textract"); // CommonJS import
47
- * const client = new TextractClient(config);
48
- * const command = new StartDocumentTextDetectionCommand(input);
49
- * const response = await client.send(command);
50
- * ```
51
- *
52
- * @see {@link StartDocumentTextDetectionCommandInput} for command's `input` shape.
53
- * @see {@link StartDocumentTextDetectionCommandOutput} for command's `response` shape.
54
- * @see {@link TextractClientResolvedConfig | config} for command's `input` shape.
55
- *
56
- */
57
- export class StartDocumentTextDetectionCommand extends $Command<
58
- StartDocumentTextDetectionCommandInput,
59
- StartDocumentTextDetectionCommandOutput,
60
- TextractClientResolvedConfig
61
- > {
62
- // Start section: command_properties
63
- // End section: command_properties
64
-
65
- constructor(readonly input: StartDocumentTextDetectionCommandInput) {
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<StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionCommandOutput> {
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 = "StartDocumentTextDetectionCommand";
86
- const handlerExecutionContext: HandlerExecutionContext = {
87
- logger,
88
- clientName,
89
- commandName,
90
- inputFilterSensitiveLog: StartDocumentTextDetectionRequest.filterSensitiveLog,
91
- outputFilterSensitiveLog: StartDocumentTextDetectionResponse.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: StartDocumentTextDetectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
102
- return serializeAws_json1_1StartDocumentTextDetectionCommand(input, context);
103
- }
104
-
105
- private deserialize(
106
- output: __HttpResponse,
107
- context: __SerdeContext
108
- ): Promise<StartDocumentTextDetectionCommandOutput> {
109
- return deserializeAws_json1_1StartDocumentTextDetectionCommand(output, context);
110
- }
111
-
112
- // Start section: command_body_extra
113
- // End section: command_body_extra
114
- }
package/src/endpoints.ts DELETED
@@ -1,57 +0,0 @@
1
- import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver";
2
- import { RegionInfoProvider } from "@aws-sdk/types";
3
-
4
- const regionHash: RegionHash = {};
5
-
6
- const partitionHash: PartitionHash = {
7
- aws: {
8
- regions: [
9
- "af-south-1",
10
- "ap-east-1",
11
- "ap-northeast-1",
12
- "ap-northeast-2",
13
- "ap-northeast-3",
14
- "ap-south-1",
15
- "ap-southeast-1",
16
- "ap-southeast-2",
17
- "ca-central-1",
18
- "eu-central-1",
19
- "eu-north-1",
20
- "eu-south-1",
21
- "eu-west-1",
22
- "eu-west-2",
23
- "eu-west-3",
24
- "me-south-1",
25
- "sa-east-1",
26
- "us-east-1",
27
- "us-east-2",
28
- "us-west-1",
29
- "us-west-2",
30
- ],
31
- hostname: "textract.{region}.amazonaws.com",
32
- },
33
- "aws-cn": {
34
- regions: ["cn-north-1", "cn-northwest-1"],
35
- hostname: "textract.{region}.amazonaws.com.cn",
36
- },
37
- "aws-iso": {
38
- regions: ["us-iso-east-1"],
39
- hostname: "textract.{region}.c2s.ic.gov",
40
- },
41
- "aws-iso-b": {
42
- regions: ["us-isob-east-1"],
43
- hostname: "textract.{region}.sc2s.sgov.gov",
44
- },
45
- "aws-us-gov": {
46
- regions: ["us-gov-east-1", "us-gov-west-1"],
47
- hostname: "textract.{region}.amazonaws.com",
48
- },
49
- };
50
-
51
- export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) =>
52
- getRegionInfo(region, {
53
- ...options,
54
- signingService: "textract",
55
- regionHash,
56
- partitionHash,
57
- });
package/src/index.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from "./TextractClient";
2
- 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";
@@ -1 +0,0 @@
1
- export * from "./models_0";