@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
package/src/Textract.ts DELETED
@@ -1,423 +0,0 @@
1
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
-
3
- import {
4
- AnalyzeDocumentCommand,
5
- AnalyzeDocumentCommandInput,
6
- AnalyzeDocumentCommandOutput,
7
- } from "./commands/AnalyzeDocumentCommand";
8
- import {
9
- AnalyzeExpenseCommand,
10
- AnalyzeExpenseCommandInput,
11
- AnalyzeExpenseCommandOutput,
12
- } from "./commands/AnalyzeExpenseCommand";
13
- import {
14
- DetectDocumentTextCommand,
15
- DetectDocumentTextCommandInput,
16
- DetectDocumentTextCommandOutput,
17
- } from "./commands/DetectDocumentTextCommand";
18
- import {
19
- GetDocumentAnalysisCommand,
20
- GetDocumentAnalysisCommandInput,
21
- GetDocumentAnalysisCommandOutput,
22
- } from "./commands/GetDocumentAnalysisCommand";
23
- import {
24
- GetDocumentTextDetectionCommand,
25
- GetDocumentTextDetectionCommandInput,
26
- GetDocumentTextDetectionCommandOutput,
27
- } from "./commands/GetDocumentTextDetectionCommand";
28
- import {
29
- StartDocumentAnalysisCommand,
30
- StartDocumentAnalysisCommandInput,
31
- StartDocumentAnalysisCommandOutput,
32
- } from "./commands/StartDocumentAnalysisCommand";
33
- import {
34
- StartDocumentTextDetectionCommand,
35
- StartDocumentTextDetectionCommandInput,
36
- StartDocumentTextDetectionCommandOutput,
37
- } from "./commands/StartDocumentTextDetectionCommand";
38
- import { TextractClient } from "./TextractClient";
39
-
40
- /**
41
- * <p>Amazon Textract detects and analyzes text in documents and converts it
42
- * into machine-readable text. This is the API reference documentation for
43
- * Amazon Textract.</p>
44
- */
45
- export class Textract extends TextractClient {
46
- /**
47
- * <p>Analyzes an input document for relationships between detected items. </p>
48
- * <p>The types of information returned are as follows: </p>
49
- * <ul>
50
- * <li>
51
- * <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
52
- * <code>Block</code> object and a VALUE <code>Block</code> object. For example,
53
- * <i>Name: Ana Silva Carolina</i> contains a key and value.
54
- * <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
55
- * the value.</p>
56
- * </li>
57
- * <li>
58
- * <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
59
- * <code>Block</code> object is returned for each cell in a table.</p>
60
- * </li>
61
- * <li>
62
- * <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
63
- * All lines and words that are detected in the document are returned (including text that doesn't have a
64
- * relationship with the value of <code>FeatureTypes</code>). </p>
65
- * </li>
66
- * </ul>
67
- *
68
- * <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
69
- * A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
70
- * including the selection status.</p>
71
- * <p>You can choose which type of analysis to perform by specifying the <code>FeatureTypes</code> list.
72
- * </p>
73
- * <p>The output is returned in a list of <code>Block</code> objects.</p>
74
- * <p>
75
- * <code>AnalyzeDocument</code> is a synchronous operation. To analyze documents
76
- * asynchronously, use <a>StartDocumentAnalysis</a>.</p>
77
- * <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>
78
- */
79
- public analyzeDocument(
80
- args: AnalyzeDocumentCommandInput,
81
- options?: __HttpHandlerOptions
82
- ): Promise<AnalyzeDocumentCommandOutput>;
83
- public analyzeDocument(
84
- args: AnalyzeDocumentCommandInput,
85
- cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void
86
- ): void;
87
- public analyzeDocument(
88
- args: AnalyzeDocumentCommandInput,
89
- options: __HttpHandlerOptions,
90
- cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void
91
- ): void;
92
- public analyzeDocument(
93
- args: AnalyzeDocumentCommandInput,
94
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AnalyzeDocumentCommandOutput) => void),
95
- cb?: (err: any, data?: AnalyzeDocumentCommandOutput) => void
96
- ): Promise<AnalyzeDocumentCommandOutput> | void {
97
- const command = new AnalyzeDocumentCommand(args);
98
- if (typeof optionsOrCb === "function") {
99
- this.send(command, optionsOrCb);
100
- } else if (typeof cb === "function") {
101
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
102
- this.send(command, optionsOrCb || {}, cb);
103
- } else {
104
- return this.send(command, optionsOrCb);
105
- }
106
- }
107
-
108
- /**
109
- * <p>Analyzes an input document for financially related relationships between text.</p>
110
- * <p>Information is returned as <code>ExpenseDocuments</code> and seperated as follows.</p>
111
- * <ul>
112
- * <li>
113
- * <p>
114
- * <code>LineItemGroups</code>- A data set containing <code>LineItems</code> which
115
- * store information about the lines of text, such as an item purchased and its price on a receipt.</p>
116
- * </li>
117
- * <li>
118
- * <p>
119
- * <code>SummaryFields</code>- Contains all other information a receipt, such as header information
120
- * or the vendors name.</p>
121
- * </li>
122
- * </ul>
123
- */
124
- public analyzeExpense(
125
- args: AnalyzeExpenseCommandInput,
126
- options?: __HttpHandlerOptions
127
- ): Promise<AnalyzeExpenseCommandOutput>;
128
- public analyzeExpense(
129
- args: AnalyzeExpenseCommandInput,
130
- cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void
131
- ): void;
132
- public analyzeExpense(
133
- args: AnalyzeExpenseCommandInput,
134
- options: __HttpHandlerOptions,
135
- cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void
136
- ): void;
137
- public analyzeExpense(
138
- args: AnalyzeExpenseCommandInput,
139
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AnalyzeExpenseCommandOutput) => void),
140
- cb?: (err: any, data?: AnalyzeExpenseCommandOutput) => void
141
- ): Promise<AnalyzeExpenseCommandOutput> | void {
142
- const command = new AnalyzeExpenseCommand(args);
143
- if (typeof optionsOrCb === "function") {
144
- this.send(command, optionsOrCb);
145
- } else if (typeof cb === "function") {
146
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
147
- this.send(command, optionsOrCb || {}, cb);
148
- } else {
149
- return this.send(command, optionsOrCb);
150
- }
151
- }
152
-
153
- /**
154
- * <p>Detects text in the input document. Amazon Textract can detect lines of text and the
155
- * words that make up a line of text. The input document must be an image in JPEG or PNG
156
- * format. <code>DetectDocumentText</code> returns the detected text in an array of <a>Block</a> objects. </p>
157
- * <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
158
- * 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
159
- * a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
160
- *
161
- * <p>
162
- * <code>DetectDocumentText</code> is a synchronous operation. To analyze documents
163
- * asynchronously, use <a>StartDocumentTextDetection</a>.</p>
164
- * <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>
165
- */
166
- public detectDocumentText(
167
- args: DetectDocumentTextCommandInput,
168
- options?: __HttpHandlerOptions
169
- ): Promise<DetectDocumentTextCommandOutput>;
170
- public detectDocumentText(
171
- args: DetectDocumentTextCommandInput,
172
- cb: (err: any, data?: DetectDocumentTextCommandOutput) => void
173
- ): void;
174
- public detectDocumentText(
175
- args: DetectDocumentTextCommandInput,
176
- options: __HttpHandlerOptions,
177
- cb: (err: any, data?: DetectDocumentTextCommandOutput) => void
178
- ): void;
179
- public detectDocumentText(
180
- args: DetectDocumentTextCommandInput,
181
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DetectDocumentTextCommandOutput) => void),
182
- cb?: (err: any, data?: DetectDocumentTextCommandOutput) => void
183
- ): Promise<DetectDocumentTextCommandOutput> | void {
184
- const command = new DetectDocumentTextCommand(args);
185
- if (typeof optionsOrCb === "function") {
186
- this.send(command, optionsOrCb);
187
- } else if (typeof cb === "function") {
188
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
189
- this.send(command, optionsOrCb || {}, cb);
190
- } else {
191
- return this.send(command, optionsOrCb);
192
- }
193
- }
194
-
195
- /**
196
- * <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.</p>
197
- * <p>You start asynchronous text analysis by calling <a>StartDocumentAnalysis</a>, which returns a job identifier
198
- * (<code>JobId</code>). When the text analysis operation finishes, Amazon Textract publishes a
199
- * completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
200
- * <code>StartDocumentAnalysis</code>. To get the results of the text-detection operation,
201
- * first check that the status value published to the Amazon SNS topic is <code>SUCCEEDED</code>.
202
- * If so, call <code>GetDocumentAnalysis</code>, and pass the job identifier
203
- * (<code>JobId</code>) from the initial call to <code>StartDocumentAnalysis</code>.</p>
204
- * <p>
205
- * <code>GetDocumentAnalysis</code> returns an array of <a>Block</a> objects. The following
206
- * types of information are returned: </p>
207
- * <ul>
208
- * <li>
209
- * <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
210
- * <code>Block</code> object and a VALUE <code>Block</code> object. For example,
211
- * <i>Name: Ana Silva Carolina</i> contains a key and value.
212
- * <i>Name:</i> is the key. <i>Ana Silva Carolina</i> is
213
- * the value.</p>
214
- * </li>
215
- * <li>
216
- * <p>Table and table cell data. A TABLE <code>Block</code> object contains information about a detected table. A CELL
217
- * <code>Block</code> object is returned for each cell in a table.</p>
218
- * </li>
219
- * <li>
220
- * <p>Lines and words of text. A LINE <code>Block</code> object contains one or more WORD <code>Block</code> objects.
221
- * All lines and words that are detected in the document are returned (including text that doesn't have a
222
- * relationship with the value of the <code>StartDocumentAnalysis</code>
223
- * <code>FeatureTypes</code> input parameter). </p>
224
- * </li>
225
- * </ul>
226
- *
227
- * <p>Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables.
228
- * A SELECTION_ELEMENT <code>Block</code> object contains information about a selection element,
229
- * including the selection status.</p>
230
- *
231
- *
232
- *
233
- * <p>Use the <code>MaxResults</code> parameter to limit the number of blocks that are
234
- * returned. If there are more results than specified in <code>MaxResults</code>, the value of
235
- * <code>NextToken</code> in the operation response contains a pagination token for getting
236
- * the next set of results. To get the next page of results, call
237
- * <code>GetDocumentAnalysis</code>, and populate the <code>NextToken</code> request
238
- * parameter with the token value that's returned from the previous call to
239
- * <code>GetDocumentAnalysis</code>.</p>
240
- * <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>
241
- */
242
- public getDocumentAnalysis(
243
- args: GetDocumentAnalysisCommandInput,
244
- options?: __HttpHandlerOptions
245
- ): Promise<GetDocumentAnalysisCommandOutput>;
246
- public getDocumentAnalysis(
247
- args: GetDocumentAnalysisCommandInput,
248
- cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void
249
- ): void;
250
- public getDocumentAnalysis(
251
- args: GetDocumentAnalysisCommandInput,
252
- options: __HttpHandlerOptions,
253
- cb: (err: any, data?: GetDocumentAnalysisCommandOutput) => void
254
- ): void;
255
- public getDocumentAnalysis(
256
- args: GetDocumentAnalysisCommandInput,
257
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDocumentAnalysisCommandOutput) => void),
258
- cb?: (err: any, data?: GetDocumentAnalysisCommandOutput) => void
259
- ): Promise<GetDocumentAnalysisCommandOutput> | void {
260
- const command = new GetDocumentAnalysisCommand(args);
261
- if (typeof optionsOrCb === "function") {
262
- this.send(command, optionsOrCb);
263
- } else if (typeof cb === "function") {
264
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
265
- this.send(command, optionsOrCb || {}, cb);
266
- } else {
267
- return this.send(command, optionsOrCb);
268
- }
269
- }
270
-
271
- /**
272
- * <p>Gets the results for an Amazon Textract asynchronous operation that detects text in a document.
273
- * Amazon Textract can detect lines of text and the words that make up a line of text.</p>
274
- * <p>You start asynchronous text detection by calling <a>StartDocumentTextDetection</a>, which returns a job identifier
275
- * (<code>JobId</code>). When the text detection operation finishes, Amazon Textract publishes a
276
- * completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to
277
- * <code>StartDocumentTextDetection</code>. To get the results of the text-detection
278
- * operation, first check that the status value published to the Amazon SNS topic is
279
- * <code>SUCCEEDED</code>. If so, call <code>GetDocumentTextDetection</code>, and pass the
280
- * job identifier (<code>JobId</code>) from the initial call to
281
- * <code>StartDocumentTextDetection</code>.</p>
282
- * <p>
283
- * <code>GetDocumentTextDetection</code> returns an array of <a>Block</a>
284
- * objects. </p>
285
- * <p>Each document page has as an associated <code>Block</code> of type PAGE. Each PAGE <code>Block</code> object
286
- * 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
287
- * a parent for each word that makes up the line. Words are represented by <code>Block</code> objects of type WORD.</p>
288
- *
289
- * <p>Use the MaxResults parameter to limit the number of blocks that are returned. If there
290
- * are more results than specified in <code>MaxResults</code>, the value of
291
- * <code>NextToken</code> in the operation response contains a pagination token for getting
292
- * the next set of results. To get the next page of results, call
293
- * <code>GetDocumentTextDetection</code>, and populate the <code>NextToken</code> request
294
- * parameter with the token value that's returned from the previous call to
295
- * <code>GetDocumentTextDetection</code>.</p>
296
- * <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>
297
- */
298
- public getDocumentTextDetection(
299
- args: GetDocumentTextDetectionCommandInput,
300
- options?: __HttpHandlerOptions
301
- ): Promise<GetDocumentTextDetectionCommandOutput>;
302
- public getDocumentTextDetection(
303
- args: GetDocumentTextDetectionCommandInput,
304
- cb: (err: any, data?: GetDocumentTextDetectionCommandOutput) => void
305
- ): void;
306
- public getDocumentTextDetection(
307
- args: GetDocumentTextDetectionCommandInput,
308
- options: __HttpHandlerOptions,
309
- cb: (err: any, data?: GetDocumentTextDetectionCommandOutput) => void
310
- ): void;
311
- public getDocumentTextDetection(
312
- args: GetDocumentTextDetectionCommandInput,
313
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetDocumentTextDetectionCommandOutput) => void),
314
- cb?: (err: any, data?: GetDocumentTextDetectionCommandOutput) => void
315
- ): Promise<GetDocumentTextDetectionCommandOutput> | void {
316
- const command = new GetDocumentTextDetectionCommand(args);
317
- if (typeof optionsOrCb === "function") {
318
- this.send(command, optionsOrCb);
319
- } else if (typeof cb === "function") {
320
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
321
- this.send(command, optionsOrCb || {}, cb);
322
- } else {
323
- return this.send(command, optionsOrCb);
324
- }
325
- }
326
-
327
- /**
328
- * <p>Starts the asynchronous analysis of an input document for relationships between detected
329
- * items such as key-value pairs, tables, and selection elements.</p>
330
- *
331
- * <p>
332
- * <code>StartDocumentAnalysis</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
333
- * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
334
- * of the document.
335
- * </p>
336
- * <p>
337
- * <code>StartDocumentAnalysis</code> returns a job identifier
338
- * (<code>JobId</code>) that you use to get the results of the operation. When text
339
- * analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
340
- * topic that you specify in <code>NotificationChannel</code>. To get the results of the text
341
- * analysis operation, first check that the status value published to the Amazon SNS topic is
342
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentAnalysis</a>, and pass
343
- * the job identifier (<code>JobId</code>) from the initial call to
344
- * <code>StartDocumentAnalysis</code>.</p>
345
- * <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>
346
- */
347
- public startDocumentAnalysis(
348
- args: StartDocumentAnalysisCommandInput,
349
- options?: __HttpHandlerOptions
350
- ): Promise<StartDocumentAnalysisCommandOutput>;
351
- public startDocumentAnalysis(
352
- args: StartDocumentAnalysisCommandInput,
353
- cb: (err: any, data?: StartDocumentAnalysisCommandOutput) => void
354
- ): void;
355
- public startDocumentAnalysis(
356
- args: StartDocumentAnalysisCommandInput,
357
- options: __HttpHandlerOptions,
358
- cb: (err: any, data?: StartDocumentAnalysisCommandOutput) => void
359
- ): void;
360
- public startDocumentAnalysis(
361
- args: StartDocumentAnalysisCommandInput,
362
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartDocumentAnalysisCommandOutput) => void),
363
- cb?: (err: any, data?: StartDocumentAnalysisCommandOutput) => void
364
- ): Promise<StartDocumentAnalysisCommandOutput> | void {
365
- const command = new StartDocumentAnalysisCommand(args);
366
- if (typeof optionsOrCb === "function") {
367
- this.send(command, optionsOrCb);
368
- } else if (typeof cb === "function") {
369
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
370
- this.send(command, optionsOrCb || {}, cb);
371
- } else {
372
- return this.send(command, optionsOrCb);
373
- }
374
- }
375
-
376
- /**
377
- * <p>Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of
378
- * text and the words that make up a line of text.</p>
379
- * <p>
380
- * <code>StartDocumentTextDetection</code> can analyze text in documents that are in JPEG, PNG, and PDF format. The
381
- * documents are stored in an Amazon S3 bucket. Use <a>DocumentLocation</a> to specify the bucket name and file name
382
- * of the document.
383
- * </p>
384
- * <p>
385
- * <code>StartTextDetection</code> returns a job identifier
386
- * (<code>JobId</code>) that you use to get the results of the operation. When text
387
- * detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
388
- * topic that you specify in <code>NotificationChannel</code>. To get the results of the text
389
- * detection operation, first check that the status value published to the Amazon SNS topic is
390
- * <code>SUCCEEDED</code>. If so, call <a>GetDocumentTextDetection</a>, and
391
- * pass the job identifier (<code>JobId</code>) from the initial call to
392
- * <code>StartDocumentTextDetection</code>.</p>
393
- * <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>
394
- */
395
- public startDocumentTextDetection(
396
- args: StartDocumentTextDetectionCommandInput,
397
- options?: __HttpHandlerOptions
398
- ): Promise<StartDocumentTextDetectionCommandOutput>;
399
- public startDocumentTextDetection(
400
- args: StartDocumentTextDetectionCommandInput,
401
- cb: (err: any, data?: StartDocumentTextDetectionCommandOutput) => void
402
- ): void;
403
- public startDocumentTextDetection(
404
- args: StartDocumentTextDetectionCommandInput,
405
- options: __HttpHandlerOptions,
406
- cb: (err: any, data?: StartDocumentTextDetectionCommandOutput) => void
407
- ): void;
408
- public startDocumentTextDetection(
409
- args: StartDocumentTextDetectionCommandInput,
410
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartDocumentTextDetectionCommandOutput) => void),
411
- cb?: (err: any, data?: StartDocumentTextDetectionCommandOutput) => void
412
- ): Promise<StartDocumentTextDetectionCommandOutput> | void {
413
- const command = new StartDocumentTextDetectionCommand(args);
414
- if (typeof optionsOrCb === "function") {
415
- this.send(command, optionsOrCb);
416
- } else if (typeof cb === "function") {
417
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
418
- this.send(command, optionsOrCb || {}, cb);
419
- } else {
420
- return this.send(command, optionsOrCb);
421
- }
422
- }
423
- }