@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.
Files changed (155) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/{dist/cjs → dist-cjs}/Textract.js +1 -7
  3. package/{dist/cjs → dist-cjs}/TextractClient.js +8 -19
  4. package/dist-cjs/commands/AnalyzeDocumentCommand.js +36 -0
  5. package/dist-cjs/commands/AnalyzeExpenseCommand.js +36 -0
  6. package/dist-cjs/commands/DetectDocumentTextCommand.js +36 -0
  7. package/dist-cjs/commands/GetDocumentAnalysisCommand.js +36 -0
  8. package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +36 -0
  9. package/dist-cjs/commands/StartDocumentAnalysisCommand.js +36 -0
  10. package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +36 -0
  11. package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
  12. package/{dist/cjs → dist-cjs}/index.js +0 -1
  13. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  14. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -148
  15. package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
  16. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
  17. package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
  18. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
  19. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
  20. package/{dist/es → dist-es}/Textract.js +2 -8
  21. package/{dist/es → dist-es}/TextractClient.js +2 -13
  22. package/dist-es/commands/AnalyzeDocumentCommand.js +39 -0
  23. package/{dist/es → dist-es}/commands/AnalyzeExpenseCommand.js +4 -43
  24. package/dist-es/commands/DetectDocumentTextCommand.js +39 -0
  25. package/dist-es/commands/GetDocumentAnalysisCommand.js +39 -0
  26. package/dist-es/commands/GetDocumentTextDetectionCommand.js +39 -0
  27. package/dist-es/commands/StartDocumentAnalysisCommand.js +39 -0
  28. package/dist-es/commands/StartDocumentTextDetectionCommand.js +39 -0
  29. package/{dist/es → dist-es}/endpoints.js +1 -2
  30. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  31. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  32. package/{dist/es → dist-es}/models/models_0.js +0 -148
  33. package/{dist/es → dist-es}/protocols/Aws_json1_1.js +338 -344
  34. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
  35. package/{dist/es → dist-es}/runtimeConfig.js +1 -5
  36. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
  37. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
  38. package/{dist/types → dist-types}/Textract.d.ts +2 -2
  39. package/{dist/types → dist-types}/TextractClient.d.ts +8 -8
  40. package/{dist/types → dist-types}/commands/AnalyzeDocumentCommand.d.ts +3 -3
  41. package/{dist/types → dist-types}/commands/AnalyzeExpenseCommand.d.ts +3 -3
  42. package/{dist/types → dist-types}/commands/DetectDocumentTextCommand.d.ts +3 -3
  43. package/{dist/types → dist-types}/commands/GetDocumentAnalysisCommand.d.ts +3 -3
  44. package/{dist/types → dist-types}/commands/GetDocumentTextDetectionCommand.d.ts +3 -3
  45. package/{dist/types → dist-types}/commands/StartDocumentAnalysisCommand.d.ts +3 -3
  46. package/{dist/types → dist-types}/commands/StartDocumentTextDetectionCommand.d.ts +3 -3
  47. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  48. package/{index.ts → dist-types/index.d.ts} +0 -0
  49. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  50. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  51. package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
  52. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
  53. package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
  54. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
  55. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  56. package/dist-types/ts3.4/Textract.d.ts +40 -0
  57. package/{dist/types → dist-types}/ts3.4/TextractClient.d.ts +32 -99
  58. package/dist-types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +17 -0
  59. package/dist-types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +17 -0
  60. package/dist-types/ts3.4/commands/DetectDocumentTextCommand.d.ts +17 -0
  61. package/dist-types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +17 -0
  62. package/dist-types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +17 -0
  63. package/dist-types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +17 -0
  64. package/dist-types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +17 -0
  65. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  66. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  67. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  68. package/dist-types/ts3.4/models/models_0.d.ts +649 -0
  69. package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
  70. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
  71. package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
  72. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
  73. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
  74. package/package.json +52 -49
  75. package/Textract.ts +0 -422
  76. package/TextractClient.ts +0 -270
  77. package/commands/AnalyzeDocumentCommand.ts +0 -124
  78. package/commands/AnalyzeExpenseCommand.ts +0 -107
  79. package/commands/DetectDocumentTextCommand.ts +0 -104
  80. package/commands/GetDocumentAnalysisCommand.ts +0 -138
  81. package/commands/GetDocumentTextDetectionCommand.ts +0 -118
  82. package/commands/StartDocumentAnalysisCommand.ts +0 -111
  83. package/commands/StartDocumentTextDetectionCommand.ts +0 -113
  84. package/dist/cjs/Textract.js.map +0 -1
  85. package/dist/cjs/TextractClient.js.map +0 -1
  86. package/dist/cjs/commands/AnalyzeDocumentCommand.js +0 -91
  87. package/dist/cjs/commands/AnalyzeDocumentCommand.js.map +0 -1
  88. package/dist/cjs/commands/AnalyzeExpenseCommand.js +0 -74
  89. package/dist/cjs/commands/AnalyzeExpenseCommand.js.map +0 -1
  90. package/dist/cjs/commands/DetectDocumentTextCommand.js +0 -71
  91. package/dist/cjs/commands/DetectDocumentTextCommand.js.map +0 -1
  92. package/dist/cjs/commands/GetDocumentAnalysisCommand.js +0 -105
  93. package/dist/cjs/commands/GetDocumentAnalysisCommand.js.map +0 -1
  94. package/dist/cjs/commands/GetDocumentTextDetectionCommand.js +0 -85
  95. package/dist/cjs/commands/GetDocumentTextDetectionCommand.js.map +0 -1
  96. package/dist/cjs/commands/StartDocumentAnalysisCommand.js +0 -78
  97. package/dist/cjs/commands/StartDocumentAnalysisCommand.js.map +0 -1
  98. package/dist/cjs/commands/StartDocumentTextDetectionCommand.js +0 -77
  99. package/dist/cjs/commands/StartDocumentTextDetectionCommand.js.map +0 -1
  100. package/dist/cjs/endpoints.js.map +0 -1
  101. package/dist/cjs/index.js.map +0 -1
  102. package/dist/cjs/models/index.js.map +0 -1
  103. package/dist/cjs/models/models_0.js.map +0 -1
  104. package/dist/cjs/package.json +0 -91
  105. package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
  106. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  107. package/dist/cjs/runtimeConfig.js.map +0 -1
  108. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  109. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  110. package/dist/es/Textract.js.map +0 -1
  111. package/dist/es/TextractClient.js.map +0 -1
  112. package/dist/es/commands/AnalyzeDocumentCommand.js +0 -95
  113. package/dist/es/commands/AnalyzeDocumentCommand.js.map +0 -1
  114. package/dist/es/commands/AnalyzeExpenseCommand.js.map +0 -1
  115. package/dist/es/commands/DetectDocumentTextCommand.js +0 -75
  116. package/dist/es/commands/DetectDocumentTextCommand.js.map +0 -1
  117. package/dist/es/commands/GetDocumentAnalysisCommand.js +0 -109
  118. package/dist/es/commands/GetDocumentAnalysisCommand.js.map +0 -1
  119. package/dist/es/commands/GetDocumentTextDetectionCommand.js +0 -89
  120. package/dist/es/commands/GetDocumentTextDetectionCommand.js.map +0 -1
  121. package/dist/es/commands/StartDocumentAnalysisCommand.js +0 -82
  122. package/dist/es/commands/StartDocumentAnalysisCommand.js.map +0 -1
  123. package/dist/es/commands/StartDocumentTextDetectionCommand.js +0 -81
  124. package/dist/es/commands/StartDocumentTextDetectionCommand.js.map +0 -1
  125. package/dist/es/endpoints.js.map +0 -1
  126. package/dist/es/index.js +0 -11
  127. package/dist/es/index.js.map +0 -1
  128. package/dist/es/models/index.js +0 -2
  129. package/dist/es/models/index.js.map +0 -1
  130. package/dist/es/models/models_0.js.map +0 -1
  131. package/dist/es/package.json +0 -91
  132. package/dist/es/protocols/Aws_json1_1.js.map +0 -1
  133. package/dist/es/runtimeConfig.browser.js.map +0 -1
  134. package/dist/es/runtimeConfig.js.map +0 -1
  135. package/dist/es/runtimeConfig.native.js.map +0 -1
  136. package/dist/es/runtimeConfig.shared.js.map +0 -1
  137. package/dist/types/ts3.4/Textract.d.ts +0 -212
  138. package/dist/types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +0 -65
  139. package/dist/types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +0 -48
  140. package/dist/types/ts3.4/commands/DetectDocumentTextCommand.d.ts +0 -45
  141. package/dist/types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +0 -79
  142. package/dist/types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +0 -59
  143. package/dist/types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +0 -52
  144. package/dist/types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +0 -51
  145. package/dist/types/ts3.4/models/models_0.d.ts +0 -1347
  146. package/endpoints.ts +0 -57
  147. package/jest.config.js +0 -4
  148. package/models/models_0.ts +0 -1627
  149. package/protocols/Aws_json1_1.ts +0 -2060
  150. package/runtimeConfig.browser.ts +0 -40
  151. package/runtimeConfig.native.ts +0 -16
  152. package/runtimeConfig.shared.ts +0 -16
  153. package/runtimeConfig.ts +0 -45
  154. package/tsconfig.es.json +0 -12
  155. package/tsconfig.json +0 -32
@@ -1,1347 +0,0 @@
1
- import { LazyJsonString as __LazyJsonString } from "@aws-sdk/smithy-client";
2
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
3
- /**
4
- * <p>You aren't authorized to perform the action. Use the Amazon Resource Name (ARN)
5
- * of an authorized user or IAM role to perform the operation.</p>
6
- */
7
- export interface AccessDeniedException extends __SmithyException, $MetadataBearer {
8
- name: "AccessDeniedException";
9
- $fault: "client";
10
- Message?: string;
11
- Code?: string;
12
- }
13
- export declare namespace AccessDeniedException {
14
- /**
15
- * @internal
16
- */
17
- const filterSensitiveLog: (obj: AccessDeniedException) => any;
18
- }
19
- /**
20
- * <p>The S3 bucket name and file name that identifies the document.</p>
21
- * <p>The AWS Region for the S3 bucket that contains the document must match the Region that
22
- * you use for Amazon Textract operations.</p>
23
- *
24
- * <p>For Amazon Textract to process a file in an S3 bucket, the user must have
25
- * permission to access the S3 bucket and file.
26
- *
27
- * </p>
28
- */
29
- export interface S3Object {
30
- /**
31
- * <p>The name of the S3 bucket. Note that the # character is not valid in the file
32
- * name.</p>
33
- */
34
- Bucket?: string;
35
- /**
36
- * <p>The file name of the input document. Synchronous operations can use image files that are
37
- * in JPEG or PNG format. Asynchronous operations also support PDF format files.</p>
38
- */
39
- Name?: string;
40
- /**
41
- * <p>If the bucket has versioning enabled, you can specify the object version. </p>
42
- */
43
- Version?: string;
44
- }
45
- export declare namespace S3Object {
46
- /**
47
- * @internal
48
- */
49
- const filterSensitiveLog: (obj: S3Object) => any;
50
- }
51
- /**
52
- * <p>The input document, either as bytes or as an S3 object.</p>
53
- * <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code>
54
- * property. For example, you would use the <code>Bytes</code> property to pass a document
55
- * loaded from a local file system. Image bytes passed by using the <code>Bytes</code>
56
- * property must be base64 encoded. Your code might not need to encode document file bytes if
57
- * you're using an AWS SDK to call Amazon Textract API operations. </p>
58
- * <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the
59
- * <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64
60
- * encoded.</p>
61
- * <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS
62
- * Region that you use for Amazon Textract operations.</p>
63
- * <p>If you use the AWS CLI to call Amazon Textract operations, passing image bytes using
64
- * the Bytes property isn't supported. You must first upload the document to an Amazon S3
65
- * bucket, and then call the operation using the S3Object property.</p>
66
- *
67
- * <p>For Amazon Textract to process an S3 object, the user must have permission
68
- * to access the S3 object. </p>
69
- */
70
- export interface Document {
71
- /**
72
- * <p>A blob of base64-encoded document bytes. The maximum size of a document that's provided
73
- * in a blob of bytes is 5 MB. The document bytes must be in PNG or JPEG format.</p>
74
- * <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
75
- * image bytes passed using the <code>Bytes</code> field. </p>
76
- */
77
- Bytes?: Uint8Array;
78
- /**
79
- * <p>Identifies an S3 object as the document source. The maximum size of a document that's
80
- * stored in an S3 bucket is 5 MB.</p>
81
- */
82
- S3Object?: S3Object;
83
- }
84
- export declare namespace Document {
85
- /**
86
- * @internal
87
- */
88
- const filterSensitiveLog: (obj: Document) => any;
89
- }
90
- export declare enum FeatureType {
91
- FORMS = "FORMS",
92
- TABLES = "TABLES"
93
- }
94
- export declare enum ContentClassifier {
95
- FREE_OF_ADULT_CONTENT = "FreeOfAdultContent",
96
- FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION = "FreeOfPersonallyIdentifiableInformation"
97
- }
98
- /**
99
- * <p>Allows you to set attributes of the image. Currently, you can declare an image as free
100
- * of personally identifiable information and adult content. </p>
101
- */
102
- export interface HumanLoopDataAttributes {
103
- /**
104
- * <p>Sets whether the input image is free of personally identifiable information or adult
105
- * content.</p>
106
- */
107
- ContentClassifiers?: (ContentClassifier | string)[];
108
- }
109
- export declare namespace HumanLoopDataAttributes {
110
- /**
111
- * @internal
112
- */
113
- const filterSensitiveLog: (obj: HumanLoopDataAttributes) => any;
114
- }
115
- /**
116
- * <p>Sets up the human review workflow the document will be sent to if one of the conditions
117
- * is met. You can also set certain attributes of the image before review. </p>
118
- */
119
- export interface HumanLoopConfig {
120
- /**
121
- * <p>The name of the human workflow used for this image. This should be kept unique within a
122
- * region.</p>
123
- */
124
- HumanLoopName: string | undefined;
125
- /**
126
- * <p>The Amazon Resource Name (ARN) of the flow definition.</p>
127
- */
128
- FlowDefinitionArn: string | undefined;
129
- /**
130
- * <p>Sets attributes of the input data.</p>
131
- */
132
- DataAttributes?: HumanLoopDataAttributes;
133
- }
134
- export declare namespace HumanLoopConfig {
135
- /**
136
- * @internal
137
- */
138
- const filterSensitiveLog: (obj: HumanLoopConfig) => any;
139
- }
140
- export interface AnalyzeDocumentRequest {
141
- /**
142
- * <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI
143
- * to call Amazon Textract operations, you can't pass image bytes. The document must be an image
144
- * in JPEG or PNG format.</p>
145
- * <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
146
- * image bytes that are passed using the <code>Bytes</code> field. </p>
147
- */
148
- Document: Document | undefined;
149
- /**
150
- * <p>A list of the types of analysis to perform. Add TABLES to the list to return information
151
- * about the tables that are detected in the input document. Add FORMS to return detected form data.
152
- * To perform both types of analysis, add TABLES and FORMS to
153
- * <code>FeatureTypes</code>. All lines and words detected in the document are included in
154
- * the response (including text that isn't related to the value of <code>FeatureTypes</code>). </p>
155
- */
156
- FeatureTypes: (FeatureType | string)[] | undefined;
157
- /**
158
- * <p>Sets the configuration for the human in the loop workflow for analyzing documents.</p>
159
- */
160
- HumanLoopConfig?: HumanLoopConfig;
161
- }
162
- export declare namespace AnalyzeDocumentRequest {
163
- /**
164
- * @internal
165
- */
166
- const filterSensitiveLog: (obj: AnalyzeDocumentRequest) => any;
167
- }
168
- export declare enum BlockType {
169
- CELL = "CELL",
170
- KEY_VALUE_SET = "KEY_VALUE_SET",
171
- LINE = "LINE",
172
- PAGE = "PAGE",
173
- SELECTION_ELEMENT = "SELECTION_ELEMENT",
174
- TABLE = "TABLE",
175
- WORD = "WORD"
176
- }
177
- export declare enum EntityType {
178
- KEY = "KEY",
179
- VALUE = "VALUE"
180
- }
181
- /**
182
- * <p>The bounding box around the detected page, text, key-value pair, table, table cell, or
183
- * selection element on a document page. The <code>left</code> (x-coordinate) and
184
- * <code>top</code> (y-coordinate) are coordinates that represent the top and left sides of
185
- * the bounding box. Note that the upper-left corner of the image is the origin (0,0). </p>
186
- * <p>The <code>top</code> and <code>left</code> values returned are ratios of the overall
187
- * document page size. For example, if the input image is 700 x 200 pixels, and the top-left
188
- * coordinate of the bounding box is 350 x 50 pixels, the API returns a <code>left</code>
189
- * value of 0.5 (350/700) and a <code>top</code> value of 0.25 (50/200).</p>
190
- * <p>The <code>width</code> and <code>height</code> values represent the dimensions of the
191
- * bounding box as a ratio of the overall document page dimension. For example, if the
192
- * document page size is 700 x 200 pixels, and the bounding box width is 70 pixels, the width
193
- * returned is 0.1. </p>
194
- */
195
- export interface BoundingBox {
196
- /**
197
- * <p>The width of the bounding box as a ratio of the overall document page
198
- * width.</p>
199
- */
200
- Width?: number;
201
- /**
202
- * <p>The height of the bounding box as a ratio of the overall document page
203
- * height.</p>
204
- */
205
- Height?: number;
206
- /**
207
- * <p>The left coordinate of the bounding box as a ratio of overall document page
208
- * width.</p>
209
- */
210
- Left?: number;
211
- /**
212
- * <p>The top coordinate of the bounding box as a ratio of overall document page
213
- * height.</p>
214
- */
215
- Top?: number;
216
- }
217
- export declare namespace BoundingBox {
218
- /**
219
- * @internal
220
- */
221
- const filterSensitiveLog: (obj: BoundingBox) => any;
222
- }
223
- /**
224
- * <p>The X and Y coordinates of a point on a document page. The X and Y
225
- * values that are returned are ratios of the overall document page size. For example, if the
226
- * input document is 700 x 200 and the operation returns X=0.5 and Y=0.25, then the point is
227
- * at the (350,50) pixel coordinate on the document page.</p>
228
- *
229
- * <p>An array of <code>Point</code> objects, <code>Polygon</code>, is returned
230
- * by <a>DetectDocumentText</a>. <code>Polygon</code> represents a fine-grained
231
- * polygon around detected text. For more information, see Geometry in the Amazon Textract
232
- * Developer Guide. </p>
233
- */
234
- export interface Point {
235
- /**
236
- * <p>The value of the X coordinate for a point on a <code>Polygon</code>.</p>
237
- */
238
- X?: number;
239
- /**
240
- * <p>The value of the Y coordinate for a point on a <code>Polygon</code>.</p>
241
- */
242
- Y?: number;
243
- }
244
- export declare namespace Point {
245
- /**
246
- * @internal
247
- */
248
- const filterSensitiveLog: (obj: Point) => any;
249
- }
250
- /**
251
- * <p>Information about where the following items are located on a document page: detected
252
- * page, text, key-value pairs, tables, table cells, and selection elements.</p>
253
- */
254
- export interface Geometry {
255
- /**
256
- * <p>An axis-aligned coarse representation of the location of the recognized item on the
257
- * document page.</p>
258
- */
259
- BoundingBox?: BoundingBox;
260
- /**
261
- * <p>Within the bounding box, a fine-grained polygon around the recognized item.</p>
262
- */
263
- Polygon?: Point[];
264
- }
265
- export declare namespace Geometry {
266
- /**
267
- * @internal
268
- */
269
- const filterSensitiveLog: (obj: Geometry) => any;
270
- }
271
- export declare enum RelationshipType {
272
- CHILD = "CHILD",
273
- COMPLEX_FEATURES = "COMPLEX_FEATURES",
274
- VALUE = "VALUE"
275
- }
276
- /**
277
- * <p>Information about how blocks are related to each other. A <code>Block</code> object
278
- * contains 0 or more <code>Relation</code> objects in a list, <code>Relationships</code>. For
279
- * more information, see <a>Block</a>.</p>
280
- * <p>The <code>Type</code> element provides the type of the relationship for all blocks in
281
- * the <code>IDs</code> array. </p>
282
- */
283
- export interface Relationship {
284
- /**
285
- * <p>The type of relationship that the blocks in the IDs array have with the current block.
286
- * The relationship can be <code>VALUE</code> or <code>CHILD</code>. A relationship of type
287
- * VALUE is a list that contains the ID of the VALUE block that's associated with the KEY of a
288
- * key-value pair. A relationship of type CHILD is a list of IDs that identify WORD blocks in
289
- * the case of lines Cell blocks in the case of Tables, and WORD blocks in the case of
290
- * Selection Elements.</p>
291
- */
292
- Type?: RelationshipType | string;
293
- /**
294
- * <p>An
295
- * array of IDs for related blocks. You can get the type of the relationship from the
296
- * <code>Type</code> element.</p>
297
- */
298
- Ids?: string[];
299
- }
300
- export declare namespace Relationship {
301
- /**
302
- * @internal
303
- */
304
- const filterSensitiveLog: (obj: Relationship) => any;
305
- }
306
- export declare enum SelectionStatus {
307
- NOT_SELECTED = "NOT_SELECTED",
308
- SELECTED = "SELECTED"
309
- }
310
- export declare enum TextType {
311
- HANDWRITING = "HANDWRITING",
312
- PRINTED = "PRINTED"
313
- }
314
- /**
315
- * <p>A <code>Block</code> represents items that are recognized in a document within a group
316
- * of pixels close to each other. The information returned in a <code>Block</code> object
317
- * depends on the type of operation. In text detection for documents (for example <a>DetectDocumentText</a>), you get information about the detected words and lines
318
- * of text. In text analysis (for example <a>AnalyzeDocument</a>), you can also get
319
- * information about the fields, tables, and selection elements that are detected in the
320
- * document.</p>
321
- * <p>An array of <code>Block</code> objects is returned by both synchronous and asynchronous
322
- * operations. In synchronous operations, such as <a>DetectDocumentText</a>, the
323
- * array of <code>Block</code> objects is the entire set of results. In asynchronous
324
- * operations, such as <a>GetDocumentAnalysis</a>, the array is returned over one
325
- * or more responses.</p>
326
- * <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html">How Amazon Textract Works</a>.</p>
327
- */
328
- export interface Block {
329
- /**
330
- * <p>The type of text item that's recognized. In operations for text detection, the following
331
- * types are returned:</p>
332
- * <ul>
333
- * <li>
334
- * <p>
335
- * <i>PAGE</i> - Contains a list of the LINE <code>Block</code> objects
336
- * that are detected on a document page.</p>
337
- * </li>
338
- * <li>
339
- * <p>
340
- * <i>WORD</i> - A word detected on a document page. A word is one or
341
- * more ISO basic Latin script characters that aren't separated by spaces.</p>
342
- * </li>
343
- * <li>
344
- * <p>
345
- * <i>LINE</i> - A string of tab-delimited, contiguous words that are
346
- * detected on a document page.</p>
347
- * </li>
348
- * </ul>
349
- * <p>In text analysis operations, the following types are returned:</p>
350
- * <ul>
351
- * <li>
352
- * <p>
353
- * <i>PAGE</i> - Contains a list of child <code>Block</code> objects
354
- * that are detected on a document page.</p>
355
- * </li>
356
- * <li>
357
- * <p>
358
- * <i>KEY_VALUE_SET</i> - Stores the KEY and VALUE <code>Block</code>
359
- * objects for linked text that's detected on a document page. Use the
360
- * <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY
361
- * <code>Block</code> object or a VALUE <code>Block</code> object. </p>
362
- * </li>
363
- * <li>
364
- * <p>
365
- * <i>WORD</i> - A word that's detected on a document page. A word is
366
- * one or more ISO basic Latin script characters that aren't separated by spaces.</p>
367
- * </li>
368
- * <li>
369
- * <p>
370
- * <i>LINE</i> - A string of tab-delimited, contiguous words that are
371
- * detected on a document page.</p>
372
- * </li>
373
- * <li>
374
- * <p>
375
- * <i>TABLE</i> - A table that's detected on a document page. A table
376
- * is grid-based information with two or more rows or columns, with a cell span of one
377
- * row and one column each. </p>
378
- * </li>
379
- * <li>
380
- * <p>
381
- * <i>CELL</i> - A cell within a detected table. The cell is the parent
382
- * of the block that contains the text in the cell.</p>
383
- * </li>
384
- * <li>
385
- * <p>
386
- * <i>SELECTION_ELEMENT</i> - A selection element such as an option
387
- * button (radio button) or a check box that's detected on a document page. Use the
388
- * value of <code>SelectionStatus</code> to determine the status of the selection
389
- * element.</p>
390
- * </li>
391
- * </ul>
392
- */
393
- BlockType?: BlockType | string;
394
- /**
395
- * <p>The confidence score that Amazon Textract has in the accuracy of the recognized text and
396
- * the accuracy of the geometry points around the recognized text.</p>
397
- */
398
- Confidence?: number;
399
- /**
400
- * <p>The word or line of text that's recognized by Amazon Textract. </p>
401
- */
402
- Text?: string;
403
- /**
404
- * <p>The kind of text that Amazon Textract has detected. Can check for handwritten text and
405
- * printed text.</p>
406
- */
407
- TextType?: TextType | string;
408
- /**
409
- * <p>The row in which a table cell is located. The first row position is 1.
410
- * <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and
411
- * <code>GetDocumentTextDetection</code>.</p>
412
- */
413
- RowIndex?: number;
414
- /**
415
- * <p>The column in which a table cell appears. The first column position is 1.
416
- * <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and
417
- * <code>GetDocumentTextDetection</code>.</p>
418
- */
419
- ColumnIndex?: number;
420
- /**
421
- * <p>The number of rows that a table cell spans. Currently this value is always 1, even if
422
- * the number of rows spanned is greater than 1. <code>RowSpan</code> isn't returned by
423
- * <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
424
- */
425
- RowSpan?: number;
426
- /**
427
- * <p>The number of columns that a table cell spans. Currently this value is always 1, even if
428
- * the number of columns spanned is greater than 1. <code>ColumnSpan</code> isn't returned by
429
- * <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>. </p>
430
- */
431
- ColumnSpan?: number;
432
- /**
433
- * <p>The location of the recognized text on the image. It includes an axis-aligned, coarse
434
- * bounding box that surrounds the text, and a finer-grain polygon for more accurate spatial
435
- * information. </p>
436
- */
437
- Geometry?: Geometry;
438
- /**
439
- * <p>The identifier for the recognized text. The identifier is only unique for a single
440
- * operation. </p>
441
- */
442
- Id?: string;
443
- /**
444
- * <p>A list of child blocks of the current block. For example, a LINE object has child blocks
445
- * for each WORD block that's part of the line of text. There aren't Relationship objects in
446
- * the list for relationships that don't exist, such as when the current block has no child
447
- * blocks. The list size can be the following:</p>
448
- * <ul>
449
- * <li>
450
- * <p>0 - The block has no child blocks.</p>
451
- * </li>
452
- * <li>
453
- * <p>1 - The block has child blocks.</p>
454
- * </li>
455
- * </ul>
456
- */
457
- Relationships?: Relationship[];
458
- /**
459
- * <p>The type of entity. The following can be returned:</p>
460
- * <ul>
461
- * <li>
462
- * <p>
463
- * <i>KEY</i> - An identifier for a field on the document.</p>
464
- * </li>
465
- * <li>
466
- * <p>
467
- * <i>VALUE</i> - The field text.</p>
468
- * </li>
469
- * </ul>
470
- * <p>
471
- * <code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and
472
- * <code>GetDocumentTextDetection</code>.</p>
473
- */
474
- EntityTypes?: (EntityType | string)[];
475
- /**
476
- * <p>The selection status of a selection element, such as an option button or check box.
477
- * </p>
478
- */
479
- SelectionStatus?: SelectionStatus | string;
480
- /**
481
- * <p>The page on which a block was detected. <code>Page</code> is returned by asynchronous
482
- * operations. Page values greater than 1 are only returned for multipage documents that are
483
- * in PDF format. A scanned image (JPEG/PNG), even if it contains multiple document pages, is
484
- * considered to be a single-page document. The value of <code>Page</code> is always 1.
485
- * Synchronous operations don't return <code>Page</code> because every input document is
486
- * considered to be a single-page document.</p>
487
- */
488
- Page?: number;
489
- }
490
- export declare namespace Block {
491
- /**
492
- * @internal
493
- */
494
- const filterSensitiveLog: (obj: Block) => any;
495
- }
496
- /**
497
- * <p>Information about the input document.</p>
498
- */
499
- export interface DocumentMetadata {
500
- /**
501
- * <p>The number of pages that are detected in the document.</p>
502
- */
503
- Pages?: number;
504
- }
505
- export declare namespace DocumentMetadata {
506
- /**
507
- * @internal
508
- */
509
- const filterSensitiveLog: (obj: DocumentMetadata) => any;
510
- }
511
- /**
512
- * <p>Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, the
513
- * input did not trigger human review.</p>
514
- */
515
- export interface HumanLoopActivationOutput {
516
- /**
517
- * <p>The Amazon Resource Name (ARN) of the HumanLoop created.</p>
518
- */
519
- HumanLoopArn?: string;
520
- /**
521
- * <p>Shows if and why human review was needed.</p>
522
- */
523
- HumanLoopActivationReasons?: string[];
524
- /**
525
- * <p>Shows the result of condition evaluations, including those conditions which activated a
526
- * human review.</p>
527
- */
528
- HumanLoopActivationConditionsEvaluationResults?: __LazyJsonString | string;
529
- }
530
- export declare namespace HumanLoopActivationOutput {
531
- /**
532
- * @internal
533
- */
534
- const filterSensitiveLog: (obj: HumanLoopActivationOutput) => any;
535
- }
536
- export interface AnalyzeDocumentResponse {
537
- /**
538
- * <p>Metadata about the analyzed document. An example is the number of pages.</p>
539
- */
540
- DocumentMetadata?: DocumentMetadata;
541
- /**
542
- * <p>The items that are detected and analyzed by <code>AnalyzeDocument</code>.</p>
543
- */
544
- Blocks?: Block[];
545
- /**
546
- * <p>Shows the results of the human in the loop evaluation.</p>
547
- */
548
- HumanLoopActivationOutput?: HumanLoopActivationOutput;
549
- /**
550
- * <p>The version of the model used to analyze the document.</p>
551
- */
552
- AnalyzeDocumentModelVersion?: string;
553
- }
554
- export declare namespace AnalyzeDocumentResponse {
555
- /**
556
- * @internal
557
- */
558
- const filterSensitiveLog: (obj: AnalyzeDocumentResponse) => any;
559
- }
560
- /**
561
- * <p>Amazon Textract isn't able to read the document. For more information on the document
562
- * limits in Amazon Textract, see <a>limits</a>.</p>
563
- */
564
- export interface BadDocumentException extends __SmithyException, $MetadataBearer {
565
- name: "BadDocumentException";
566
- $fault: "client";
567
- Message?: string;
568
- Code?: string;
569
- }
570
- export declare namespace BadDocumentException {
571
- /**
572
- * @internal
573
- */
574
- const filterSensitiveLog: (obj: BadDocumentException) => any;
575
- }
576
- /**
577
- * <p>The document can't be processed because it's too large. The maximum document size for
578
- * synchronous operations 10 MB. The maximum document size for asynchronous operations is 500
579
- * MB for PDF files.</p>
580
- */
581
- export interface DocumentTooLargeException extends __SmithyException, $MetadataBearer {
582
- name: "DocumentTooLargeException";
583
- $fault: "client";
584
- Message?: string;
585
- Code?: string;
586
- }
587
- export declare namespace DocumentTooLargeException {
588
- /**
589
- * @internal
590
- */
591
- const filterSensitiveLog: (obj: DocumentTooLargeException) => any;
592
- }
593
- /**
594
- * <p>Indicates you have exceeded the maximum number of active human in the loop workflows available</p>
595
- */
596
- export interface HumanLoopQuotaExceededException extends __SmithyException, $MetadataBearer {
597
- name: "HumanLoopQuotaExceededException";
598
- $fault: "client";
599
- /**
600
- * <p>The resource type.</p>
601
- */
602
- ResourceType?: string;
603
- /**
604
- * <p>The quota code.</p>
605
- */
606
- QuotaCode?: string;
607
- /**
608
- * <p>The service code.</p>
609
- */
610
- ServiceCode?: string;
611
- Message?: string;
612
- Code?: string;
613
- }
614
- export declare namespace HumanLoopQuotaExceededException {
615
- /**
616
- * @internal
617
- */
618
- const filterSensitiveLog: (obj: HumanLoopQuotaExceededException) => any;
619
- }
620
- /**
621
- * <p>Amazon Textract experienced a service issue. Try your call again.</p>
622
- */
623
- export interface InternalServerError extends __SmithyException, $MetadataBearer {
624
- name: "InternalServerError";
625
- $fault: "server";
626
- Message?: string;
627
- Code?: string;
628
- }
629
- export declare namespace InternalServerError {
630
- /**
631
- * @internal
632
- */
633
- const filterSensitiveLog: (obj: InternalServerError) => any;
634
- }
635
- /**
636
- * <p>An input parameter violated a constraint. For example, in synchronous operations,
637
- * an <code>InvalidParameterException</code> exception occurs
638
- * when neither of the <code>S3Object</code> or <code>Bytes</code> values are supplied in the <code>Document</code>
639
- * request parameter.
640
- * Validate your parameter before calling the API operation again.</p>
641
- */
642
- export interface InvalidParameterException extends __SmithyException, $MetadataBearer {
643
- name: "InvalidParameterException";
644
- $fault: "client";
645
- Message?: string;
646
- Code?: string;
647
- }
648
- export declare namespace InvalidParameterException {
649
- /**
650
- * @internal
651
- */
652
- const filterSensitiveLog: (obj: InvalidParameterException) => any;
653
- }
654
- /**
655
- * <p>Amazon Textract is unable to access the S3 object that's specified in the request.
656
- * for more information, <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html">Configure Access to Amazon S3</a>
657
- * For troubleshooting information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html">Troubleshooting Amazon S3</a>
658
- * </p>
659
- */
660
- export interface InvalidS3ObjectException extends __SmithyException, $MetadataBearer {
661
- name: "InvalidS3ObjectException";
662
- $fault: "client";
663
- Message?: string;
664
- Code?: string;
665
- }
666
- export declare namespace InvalidS3ObjectException {
667
- /**
668
- * @internal
669
- */
670
- const filterSensitiveLog: (obj: InvalidS3ObjectException) => any;
671
- }
672
- /**
673
- * <p>The number of requests exceeded your throughput limit. If you want to increase this limit,
674
- * contact Amazon Textract.</p>
675
- */
676
- export interface ProvisionedThroughputExceededException extends __SmithyException, $MetadataBearer {
677
- name: "ProvisionedThroughputExceededException";
678
- $fault: "client";
679
- Message?: string;
680
- Code?: string;
681
- }
682
- export declare namespace ProvisionedThroughputExceededException {
683
- /**
684
- * @internal
685
- */
686
- const filterSensitiveLog: (obj: ProvisionedThroughputExceededException) => any;
687
- }
688
- /**
689
- * <p>Amazon Textract is temporarily unable to process the request. Try your call again.</p>
690
- */
691
- export interface ThrottlingException extends __SmithyException, $MetadataBearer {
692
- name: "ThrottlingException";
693
- $fault: "server";
694
- Message?: string;
695
- Code?: string;
696
- }
697
- export declare namespace ThrottlingException {
698
- /**
699
- * @internal
700
- */
701
- const filterSensitiveLog: (obj: ThrottlingException) => any;
702
- }
703
- /**
704
- * <p>The format of the input document isn't supported. Documents for synchronous operations can be in
705
- * PNG or JPEG format. Documents for asynchronous operations can also be in PDF format.</p>
706
- */
707
- export interface UnsupportedDocumentException extends __SmithyException, $MetadataBearer {
708
- name: "UnsupportedDocumentException";
709
- $fault: "client";
710
- Message?: string;
711
- Code?: string;
712
- }
713
- export declare namespace UnsupportedDocumentException {
714
- /**
715
- * @internal
716
- */
717
- const filterSensitiveLog: (obj: UnsupportedDocumentException) => any;
718
- }
719
- export interface AnalyzeExpenseRequest {
720
- /**
721
- * <p>The input document, either as bytes or as an S3 object.</p>
722
- * <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code>
723
- * property. For example, you would use the <code>Bytes</code> property to pass a document
724
- * loaded from a local file system. Image bytes passed by using the <code>Bytes</code>
725
- * property must be base64 encoded. Your code might not need to encode document file bytes if
726
- * you're using an AWS SDK to call Amazon Textract API operations. </p>
727
- * <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the
728
- * <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64
729
- * encoded.</p>
730
- * <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS
731
- * Region that you use for Amazon Textract operations.</p>
732
- * <p>If you use the AWS CLI to call Amazon Textract operations, passing image bytes using
733
- * the Bytes property isn't supported. You must first upload the document to an Amazon S3
734
- * bucket, and then call the operation using the S3Object property.</p>
735
- *
736
- * <p>For Amazon Textract to process an S3 object, the user must have permission
737
- * to access the S3 object. </p>
738
- */
739
- Document: Document | undefined;
740
- }
741
- export declare namespace AnalyzeExpenseRequest {
742
- /**
743
- * @internal
744
- */
745
- const filterSensitiveLog: (obj: AnalyzeExpenseRequest) => any;
746
- }
747
- /**
748
- * <p>An object used to store information about the Value or Label detected by Amazon Textract.</p>
749
- */
750
- export interface ExpenseDetection {
751
- /**
752
- * <p>The word or line of text recognized by Amazon Textract</p>
753
- */
754
- Text?: string;
755
- /**
756
- * <p>Information about where the following items are located on a document page: detected
757
- * page, text, key-value pairs, tables, table cells, and selection elements.</p>
758
- */
759
- Geometry?: Geometry;
760
- /**
761
- * <p>The confidence in detection, as a percentage</p>
762
- */
763
- Confidence?: number;
764
- }
765
- export declare namespace ExpenseDetection {
766
- /**
767
- * @internal
768
- */
769
- const filterSensitiveLog: (obj: ExpenseDetection) => any;
770
- }
771
- /**
772
- * <p>An object used to store information about the Type detected by Amazon Textract.</p>
773
- */
774
- export interface ExpenseType {
775
- /**
776
- * <p>The word or line of text detected by Amazon Textract.</p>
777
- */
778
- Text?: string;
779
- /**
780
- * <p>The confidence of accuracy, as a percentage.</p>
781
- */
782
- Confidence?: number;
783
- }
784
- export declare namespace ExpenseType {
785
- /**
786
- * @internal
787
- */
788
- const filterSensitiveLog: (obj: ExpenseType) => any;
789
- }
790
- /**
791
- * <p>Breakdown of detected information, seperated into
792
- * the catagories Type, LableDetection, and ValueDetection</p>
793
- */
794
- export interface ExpenseField {
795
- /**
796
- * <p>The implied label of a detected element. Present alongside LabelDetection for explicit elements.</p>
797
- */
798
- Type?: ExpenseType;
799
- /**
800
- * <p>The explicitly stated label of a detected element.</p>
801
- */
802
- LabelDetection?: ExpenseDetection;
803
- /**
804
- * <p>The value of a detected element. Present in explicit and implicit elements.</p>
805
- */
806
- ValueDetection?: ExpenseDetection;
807
- /**
808
- * <p>The page number the value was detected on.</p>
809
- */
810
- PageNumber?: number;
811
- }
812
- export declare namespace ExpenseField {
813
- /**
814
- * @internal
815
- */
816
- const filterSensitiveLog: (obj: ExpenseField) => any;
817
- }
818
- /**
819
- * <p>A structure that holds information about the different lines found in a document's tables.</p>
820
- */
821
- export interface LineItemFields {
822
- /**
823
- * <p>ExpenseFields used to show information from detected lines on a table.</p>
824
- */
825
- LineItemExpenseFields?: ExpenseField[];
826
- }
827
- export declare namespace LineItemFields {
828
- /**
829
- * @internal
830
- */
831
- const filterSensitiveLog: (obj: LineItemFields) => any;
832
- }
833
- /**
834
- * <p>A grouping of tables which contain LineItems, with each table identified by the table's <code>LineItemGroupIndex</code>.</p>
835
- */
836
- export interface LineItemGroup {
837
- /**
838
- * <p>The number used to identify a specific table in a document. The first table encountered will have a LineItemGroupIndex of 1, the second 2, etc.</p>
839
- */
840
- LineItemGroupIndex?: number;
841
- /**
842
- * <p>The breakdown of information on a particular line of a table. </p>
843
- */
844
- LineItems?: LineItemFields[];
845
- }
846
- export declare namespace LineItemGroup {
847
- /**
848
- * @internal
849
- */
850
- const filterSensitiveLog: (obj: LineItemGroup) => any;
851
- }
852
- /**
853
- * <p>The structure holding all the information returned by AnalyzeExpense</p>
854
- */
855
- export interface ExpenseDocument {
856
- /**
857
- * <p>Denotes which invoice or receipt in the document the information is coming from.
858
- * First document will be 1, the second 2, and so on.</p>
859
- */
860
- ExpenseIndex?: number;
861
- /**
862
- * <p>Any information found outside of a table by Amazon Textract.</p>
863
- */
864
- SummaryFields?: ExpenseField[];
865
- /**
866
- * <p>Information detected on each table of a document, seperated into <code>LineItems</code>.</p>
867
- */
868
- LineItemGroups?: LineItemGroup[];
869
- }
870
- export declare namespace ExpenseDocument {
871
- /**
872
- * @internal
873
- */
874
- const filterSensitiveLog: (obj: ExpenseDocument) => any;
875
- }
876
- export interface AnalyzeExpenseResponse {
877
- /**
878
- * <p>Information about the input document.</p>
879
- */
880
- DocumentMetadata?: DocumentMetadata;
881
- /**
882
- * <p>The expenses detected by Amazon Textract.</p>
883
- */
884
- ExpenseDocuments?: ExpenseDocument[];
885
- }
886
- export declare namespace AnalyzeExpenseResponse {
887
- /**
888
- * @internal
889
- */
890
- const filterSensitiveLog: (obj: AnalyzeExpenseResponse) => any;
891
- }
892
- export interface DetectDocumentTextRequest {
893
- /**
894
- * <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI
895
- * to call Amazon Textract operations, you can't pass image bytes. The document must be an image
896
- * in JPEG or PNG format.</p>
897
- * <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
898
- * image bytes that are passed using the <code>Bytes</code> field. </p>
899
- */
900
- Document: Document | undefined;
901
- }
902
- export declare namespace DetectDocumentTextRequest {
903
- /**
904
- * @internal
905
- */
906
- const filterSensitiveLog: (obj: DetectDocumentTextRequest) => any;
907
- }
908
- export interface DetectDocumentTextResponse {
909
- /**
910
- * <p>Metadata about the document. It contains the number of pages that are detected in the
911
- * document.</p>
912
- */
913
- DocumentMetadata?: DocumentMetadata;
914
- /**
915
- * <p>An array of <code>Block</code> objects that contain the text that's detected in the
916
- * document.</p>
917
- */
918
- Blocks?: Block[];
919
- /**
920
- * <p></p>
921
- */
922
- DetectDocumentTextModelVersion?: string;
923
- }
924
- export declare namespace DetectDocumentTextResponse {
925
- /**
926
- * @internal
927
- */
928
- const filterSensitiveLog: (obj: DetectDocumentTextResponse) => any;
929
- }
930
- /**
931
- * <p>The Amazon S3 bucket that contains the document to be processed. It's used by asynchronous
932
- * operations such as <a>StartDocumentTextDetection</a>.</p>
933
- * <p>The input document can be an image file in JPEG or PNG format. It can also be a file in
934
- * PDF format.</p>
935
- */
936
- export interface DocumentLocation {
937
- /**
938
- * <p>The Amazon S3 bucket that contains the input document.</p>
939
- */
940
- S3Object?: S3Object;
941
- }
942
- export declare namespace DocumentLocation {
943
- /**
944
- * @internal
945
- */
946
- const filterSensitiveLog: (obj: DocumentLocation) => any;
947
- }
948
- export interface GetDocumentAnalysisRequest {
949
- /**
950
- * <p>A unique identifier for the text-detection job. The <code>JobId</code> is returned from
951
- * <code>StartDocumentAnalysis</code>. A <code>JobId</code> value is only valid for 7 days.</p>
952
- */
953
- JobId: string | undefined;
954
- /**
955
- * <p>The maximum number of results to return per paginated call. The largest value that you
956
- * can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results
957
- * is returned. The default value is 1,000.</p>
958
- */
959
- MaxResults?: number;
960
- /**
961
- * <p>If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination
962
- * token in the response. You can use this pagination token to retrieve the next set of blocks.</p>
963
- */
964
- NextToken?: string;
965
- }
966
- export declare namespace GetDocumentAnalysisRequest {
967
- /**
968
- * @internal
969
- */
970
- const filterSensitiveLog: (obj: GetDocumentAnalysisRequest) => any;
971
- }
972
- export declare enum JobStatus {
973
- FAILED = "FAILED",
974
- IN_PROGRESS = "IN_PROGRESS",
975
- PARTIAL_SUCCESS = "PARTIAL_SUCCESS",
976
- SUCCEEDED = "SUCCEEDED"
977
- }
978
- /**
979
- * <p>A warning about an issue that occurred during asynchronous text analysis (<a>StartDocumentAnalysis</a>) or asynchronous document text detection (<a>StartDocumentTextDetection</a>). </p>
980
- */
981
- export interface Warning {
982
- /**
983
- * <p>The error code for the warning.</p>
984
- */
985
- ErrorCode?: string;
986
- /**
987
- * <p>A list of the pages that the warning applies to.</p>
988
- */
989
- Pages?: number[];
990
- }
991
- export declare namespace Warning {
992
- /**
993
- * @internal
994
- */
995
- const filterSensitiveLog: (obj: Warning) => any;
996
- }
997
- export interface GetDocumentAnalysisResponse {
998
- /**
999
- * <p>Information about a document that Amazon Textract processed. <code>DocumentMetadata</code> is
1000
- * returned in every page of paginated responses from an Amazon Textract video operation.</p>
1001
- */
1002
- DocumentMetadata?: DocumentMetadata;
1003
- /**
1004
- * <p>The current status of the text detection job.</p>
1005
- */
1006
- JobStatus?: JobStatus | string;
1007
- /**
1008
- * <p>If the response is truncated, Amazon Textract returns this token. You can use this token in
1009
- * the subsequent request to retrieve the next set of text detection results.</p>
1010
- */
1011
- NextToken?: string;
1012
- /**
1013
- * <p>The results of the text-analysis operation.</p>
1014
- */
1015
- Blocks?: Block[];
1016
- /**
1017
- * <p>A list of warnings that occurred during the document-analysis operation.</p>
1018
- */
1019
- Warnings?: Warning[];
1020
- /**
1021
- * <p>Returns if the detection job could not be completed. Contains explanation for what error occured.</p>
1022
- */
1023
- StatusMessage?: string;
1024
- /**
1025
- * <p></p>
1026
- */
1027
- AnalyzeDocumentModelVersion?: string;
1028
- }
1029
- export declare namespace GetDocumentAnalysisResponse {
1030
- /**
1031
- * @internal
1032
- */
1033
- const filterSensitiveLog: (obj: GetDocumentAnalysisResponse) => any;
1034
- }
1035
- /**
1036
- * <p>An invalid job identifier was passed to <a>GetDocumentAnalysis</a> or to
1037
- * <a>GetDocumentAnalysis</a>.</p>
1038
- */
1039
- export interface InvalidJobIdException extends __SmithyException, $MetadataBearer {
1040
- name: "InvalidJobIdException";
1041
- $fault: "client";
1042
- Message?: string;
1043
- Code?: string;
1044
- }
1045
- export declare namespace InvalidJobIdException {
1046
- /**
1047
- * @internal
1048
- */
1049
- const filterSensitiveLog: (obj: InvalidJobIdException) => any;
1050
- }
1051
- /**
1052
- * <p> Indicates you do not have decrypt permissions with the KMS key entered, or the KMS key
1053
- * was entered incorrectly. </p>
1054
- */
1055
- export interface InvalidKMSKeyException extends __SmithyException, $MetadataBearer {
1056
- name: "InvalidKMSKeyException";
1057
- $fault: "client";
1058
- Message?: string;
1059
- Code?: string;
1060
- }
1061
- export declare namespace InvalidKMSKeyException {
1062
- /**
1063
- * @internal
1064
- */
1065
- const filterSensitiveLog: (obj: InvalidKMSKeyException) => any;
1066
- }
1067
- export interface GetDocumentTextDetectionRequest {
1068
- /**
1069
- * <p>A unique identifier for the text detection job. The <code>JobId</code> is returned from
1070
- * <code>StartDocumentTextDetection</code>. A <code>JobId</code> value is only valid for 7 days.</p>
1071
- */
1072
- JobId: string | undefined;
1073
- /**
1074
- * <p>The maximum number of results to return per paginated call. The largest value you can
1075
- * specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is
1076
- * returned. The default value is 1,000.</p>
1077
- */
1078
- MaxResults?: number;
1079
- /**
1080
- * <p>If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination
1081
- * token in the response. You can use this pagination token to retrieve the next set of blocks.</p>
1082
- */
1083
- NextToken?: string;
1084
- }
1085
- export declare namespace GetDocumentTextDetectionRequest {
1086
- /**
1087
- * @internal
1088
- */
1089
- const filterSensitiveLog: (obj: GetDocumentTextDetectionRequest) => any;
1090
- }
1091
- export interface GetDocumentTextDetectionResponse {
1092
- /**
1093
- * <p>Information about a document that Amazon Textract processed. <code>DocumentMetadata</code> is
1094
- * returned in every page of paginated responses from an Amazon Textract video operation.</p>
1095
- */
1096
- DocumentMetadata?: DocumentMetadata;
1097
- /**
1098
- * <p>The current status of the text detection job.</p>
1099
- */
1100
- JobStatus?: JobStatus | string;
1101
- /**
1102
- * <p>If the response is truncated, Amazon Textract returns this token. You can use this token in
1103
- * the subsequent request to retrieve the next set of text-detection results.</p>
1104
- */
1105
- NextToken?: string;
1106
- /**
1107
- * <p>The results of the text-detection operation.</p>
1108
- */
1109
- Blocks?: Block[];
1110
- /**
1111
- * <p>A list of warnings that occurred during the text-detection operation for the
1112
- * document.</p>
1113
- */
1114
- Warnings?: Warning[];
1115
- /**
1116
- * <p>Returns if the detection job could not be completed. Contains explanation for what error occured. </p>
1117
- */
1118
- StatusMessage?: string;
1119
- /**
1120
- * <p></p>
1121
- */
1122
- DetectDocumentTextModelVersion?: string;
1123
- }
1124
- export declare namespace GetDocumentTextDetectionResponse {
1125
- /**
1126
- * @internal
1127
- */
1128
- const filterSensitiveLog: (obj: GetDocumentTextDetectionResponse) => any;
1129
- }
1130
- /**
1131
- * <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at
1132
- * least one of the other input parameters is different from the previous call to the
1133
- * operation. </p>
1134
- */
1135
- export interface IdempotentParameterMismatchException extends __SmithyException, $MetadataBearer {
1136
- name: "IdempotentParameterMismatchException";
1137
- $fault: "client";
1138
- Message?: string;
1139
- Code?: string;
1140
- }
1141
- export declare namespace IdempotentParameterMismatchException {
1142
- /**
1143
- * @internal
1144
- */
1145
- const filterSensitiveLog: (obj: IdempotentParameterMismatchException) => any;
1146
- }
1147
- /**
1148
- * <p>An Amazon Textract service limit was exceeded. For example, if you start too many
1149
- * asynchronous jobs concurrently, calls to start operations
1150
- * (<code>StartDocumentTextDetection</code>, for example) raise a LimitExceededException
1151
- * exception (HTTP status code: 400) until the number of concurrently running jobs is below
1152
- * the Amazon Textract service limit. </p>
1153
- */
1154
- export interface LimitExceededException extends __SmithyException, $MetadataBearer {
1155
- name: "LimitExceededException";
1156
- $fault: "client";
1157
- Message?: string;
1158
- Code?: string;
1159
- }
1160
- export declare namespace LimitExceededException {
1161
- /**
1162
- * @internal
1163
- */
1164
- const filterSensitiveLog: (obj: LimitExceededException) => any;
1165
- }
1166
- /**
1167
- * <p>The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon Textract publishes the completion status of
1168
- * an asynchronous document operation, such as <a>StartDocumentTextDetection</a>. </p>
1169
- */
1170
- export interface NotificationChannel {
1171
- /**
1172
- * <p>The Amazon SNS topic that Amazon Textract posts the completion status to.</p>
1173
- */
1174
- SNSTopicArn: string | undefined;
1175
- /**
1176
- * <p>The Amazon Resource Name (ARN) of an IAM role that gives Amazon Textract publishing permissions to the Amazon SNS topic. </p>
1177
- */
1178
- RoleArn: string | undefined;
1179
- }
1180
- export declare namespace NotificationChannel {
1181
- /**
1182
- * @internal
1183
- */
1184
- const filterSensitiveLog: (obj: NotificationChannel) => any;
1185
- }
1186
- /**
1187
- * <p>Sets whether or not your output will go to a user created bucket. Used to set the name
1188
- * of the bucket, and the prefix on the output file.</p>
1189
- * <p>
1190
- * <code>OutputConfig</code> is an optional parameter which lets you adjust where your output will be placed.
1191
- * By default, Amazon Textract will store the results internally and can only be accessed by the Get
1192
- * API operations. With OutputConfig enabled, you can set the name of the bucket the output will be
1193
- * sent to and the file prefix of the results where you can download your results. Additionally, you
1194
- * can set the <code>KMSKeyID</code> parameter to a customer master key (CMK) to encrypt your output. Without this
1195
- * parameter set Amazon Textract will encrypt server-side using the AWS managed CMK for Amazon S3.</p>
1196
- * <p>Decryption of Customer Content is necessary for processing of the documents by Amazon Textract. If your account
1197
- * is opted out under an AI services opt out policy then all unencrypted Customer Content is immediately and permanently deleted after
1198
- * the Customer Content has been processed by the service. No copy of of the output is retained by Amazon Textract. For information about how to opt out, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html"> Managing AI services opt-out policy. </a>
1199
- * </p>
1200
- * <p>For more information on data privacy,
1201
- * see the <a href="https://aws.amazon.com/compliance/data-privacy-faq/">Data Privacy
1202
- * FAQ</a>.</p>
1203
- */
1204
- export interface OutputConfig {
1205
- /**
1206
- * <p>The name of the bucket your output will go to.</p>
1207
- */
1208
- S3Bucket: string | undefined;
1209
- /**
1210
- * <p>The prefix of the object key that the output will be saved to. When not enabled, the
1211
- * prefix will be “textract_output".</p>
1212
- */
1213
- S3Prefix?: string;
1214
- }
1215
- export declare namespace OutputConfig {
1216
- /**
1217
- * @internal
1218
- */
1219
- const filterSensitiveLog: (obj: OutputConfig) => any;
1220
- }
1221
- export interface StartDocumentAnalysisRequest {
1222
- /**
1223
- * <p>The location of the document to be processed.</p>
1224
- */
1225
- DocumentLocation: DocumentLocation | undefined;
1226
- /**
1227
- * <p>A list of the types of analysis to perform. Add TABLES to the list to return information
1228
- * about the tables that are detected in the input document. Add FORMS to return detected
1229
- * form data. To perform both types of analysis, add TABLES
1230
- * and FORMS to <code>FeatureTypes</code>. All lines and words detected in the document are
1231
- * included in the response (including text that isn't related to the value of
1232
- * <code>FeatureTypes</code>). </p>
1233
- */
1234
- FeatureTypes: (FeatureType | string)[] | undefined;
1235
- /**
1236
- * <p>The idempotent token that you use to identify the start request. If you use the same
1237
- * token with multiple <code>StartDocumentAnalysis</code> requests, the same
1238
- * <code>JobId</code> is returned. Use <code>ClientRequestToken</code> to prevent the same
1239
- * job from being accidentally started more than once. For more information, see
1240
- * <a href="https://docs.aws.amazon.com/textract/latest/dg/api-async.html">Calling Amazon Textract Asynchronous Operations</a>.</p>
1241
- */
1242
- ClientRequestToken?: string;
1243
- /**
1244
- * <p>An identifier that you specify that's included in the completion notification published
1245
- * to the Amazon SNS topic. For example, you can use <code>JobTag</code> to identify the type of
1246
- * document that the completion notification corresponds to (such as a tax form or a
1247
- * receipt).</p>
1248
- */
1249
- JobTag?: string;
1250
- /**
1251
- * <p>The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the
1252
- * operation to. </p>
1253
- */
1254
- NotificationChannel?: NotificationChannel;
1255
- /**
1256
- * <p>Sets if the output will go to a customer defined bucket. By default, Amazon Textract will save
1257
- * the results internally to be accessed by the GetDocumentAnalysis operation.</p>
1258
- */
1259
- OutputConfig?: OutputConfig;
1260
- /**
1261
- * <p>The KMS key used to encrypt the inference results. This can be
1262
- * in either Key ID or Key Alias format. When a KMS key is provided, the
1263
- * KMS key will be used for server-side encryption of the objects in the
1264
- * customer bucket. When this parameter is not enabled, the result will
1265
- * be encrypted server side,using SSE-S3.</p>
1266
- */
1267
- KMSKeyId?: string;
1268
- }
1269
- export declare namespace StartDocumentAnalysisRequest {
1270
- /**
1271
- * @internal
1272
- */
1273
- const filterSensitiveLog: (obj: StartDocumentAnalysisRequest) => any;
1274
- }
1275
- export interface StartDocumentAnalysisResponse {
1276
- /**
1277
- * <p>The identifier for the document text detection job. Use <code>JobId</code> to identify
1278
- * the job in a subsequent call to <code>GetDocumentAnalysis</code>. A <code>JobId</code> value
1279
- * is only valid for 7 days.</p>
1280
- */
1281
- JobId?: string;
1282
- }
1283
- export declare namespace StartDocumentAnalysisResponse {
1284
- /**
1285
- * @internal
1286
- */
1287
- const filterSensitiveLog: (obj: StartDocumentAnalysisResponse) => any;
1288
- }
1289
- export interface StartDocumentTextDetectionRequest {
1290
- /**
1291
- * <p>The location of the document to be processed.</p>
1292
- */
1293
- DocumentLocation: DocumentLocation | undefined;
1294
- /**
1295
- * <p>The idempotent token that's used to identify the start request. If you use the same
1296
- * token with multiple <code>StartDocumentTextDetection</code> requests, the same
1297
- * <code>JobId</code> is returned. Use <code>ClientRequestToken</code> to prevent the same
1298
- * job from being accidentally started more than once. For more information, see
1299
- * <a href="https://docs.aws.amazon.com/textract/latest/dg/api-async.html">Calling Amazon Textract Asynchronous Operations</a>.</p>
1300
- */
1301
- ClientRequestToken?: string;
1302
- /**
1303
- * <p>An identifier that you specify that's included in the completion notification published
1304
- * to the Amazon SNS topic. For example, you can use <code>JobTag</code> to identify the type of
1305
- * document that the completion notification corresponds to (such as a tax form or a
1306
- * receipt).</p>
1307
- */
1308
- JobTag?: string;
1309
- /**
1310
- * <p>The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the
1311
- * operation to. </p>
1312
- */
1313
- NotificationChannel?: NotificationChannel;
1314
- /**
1315
- * <p>Sets if the output will go to a customer defined bucket. By default Amazon Textract will
1316
- * save the results internally to be accessed with the GetDocumentTextDetection operation.</p>
1317
- */
1318
- OutputConfig?: OutputConfig;
1319
- /**
1320
- * <p>The KMS key used to encrypt the inference results. This can be
1321
- * in either Key ID or Key Alias format. When a KMS key is provided, the
1322
- * KMS key will be used for server-side encryption of the objects in the
1323
- * customer bucket. When this parameter is not enabled, the result will
1324
- * be encrypted server side,using SSE-S3.</p>
1325
- */
1326
- KMSKeyId?: string;
1327
- }
1328
- export declare namespace StartDocumentTextDetectionRequest {
1329
- /**
1330
- * @internal
1331
- */
1332
- const filterSensitiveLog: (obj: StartDocumentTextDetectionRequest) => any;
1333
- }
1334
- export interface StartDocumentTextDetectionResponse {
1335
- /**
1336
- * <p>The identifier of the text detection job for the document. Use <code>JobId</code> to
1337
- * identify the job in a subsequent call to <code>GetDocumentTextDetection</code>.
1338
- * A <code>JobId</code> value is only valid for 7 days.</p>
1339
- */
1340
- JobId?: string;
1341
- }
1342
- export declare namespace StartDocumentTextDetectionResponse {
1343
- /**
1344
- * @internal
1345
- */
1346
- const filterSensitiveLog: (obj: StartDocumentTextDetectionResponse) => any;
1347
- }