@aws-sdk/client-textract 3.199.0 → 3.201.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.
@@ -125,7 +125,8 @@ export interface Query {
125
125
  */
126
126
  Alias?: string;
127
127
  /**
128
- * <p>List of pages associated with the query. The following is a list of rules for using this parameter.</p>
128
+ * <p>Pages is a parameter that the user inputs to specify which pages to apply a query to. The following is a
129
+ * list of rules for using this parameter.</p>
129
130
  * <ul>
130
131
  * <li>
131
132
  * <p>If a page is not specified, it is set to <code>["1"]</code> by default.</p>
@@ -135,8 +136,7 @@ export interface Query {
135
136
  * <code>0 1 2 3 4 5 6 7 8 9 - *</code>. No whitespace is allowed.</p>
136
137
  * </li>
137
138
  * <li>
138
- * <p>When using <code>*</code> to indicate all pages, it must be the only element
139
- * in the string.</p>
139
+ * <p>When using * to indicate all pages, it must be the only element in the list.</p>
140
140
  * </li>
141
141
  * <li>
142
142
  * <p>You can use page intervals, such as <code>[“1-3”, “1-1”, “4-*”]</code>. Where <code>*</code> indicates last page of
@@ -160,23 +160,24 @@ export interface QueriesConfig {
160
160
  }
161
161
  export interface AnalyzeDocumentRequest {
162
162
  /**
163
- * <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI
164
- * to call Amazon Textract operations, you can't pass image bytes. The document must be an image
165
- * in JPEG, PNG, PDF, or TIFF format.</p>
163
+ * <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS
164
+ * CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an
165
+ * image in JPEG, PNG, PDF, or TIFF format.</p>
166
166
  * <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode
167
167
  * image bytes that are passed using the <code>Bytes</code> field. </p>
168
168
  */
169
169
  Document: Document | undefined;
170
170
  /**
171
171
  * <p>A list of the types of analysis to perform. Add TABLES to the list to return information
172
- * about the tables that are detected in the input document. Add FORMS to return detected form data.
173
- * To perform both types of analysis, add TABLES and FORMS to
174
- * <code>FeatureTypes</code>. All lines and words detected in the document are included in
175
- * the response (including text that isn't related to the value of <code>FeatureTypes</code>). </p>
172
+ * about the tables that are detected in the input document. Add FORMS to return detected form
173
+ * data. To perform both types of analysis, add TABLES and FORMS to <code>FeatureTypes</code>.
174
+ * All lines and words detected in the document are included in the response (including text
175
+ * that isn't related to the value of <code>FeatureTypes</code>). </p>
176
176
  */
177
177
  FeatureTypes: (FeatureType | string)[] | undefined;
178
178
  /**
179
- * <p>Sets the configuration for the human in the loop workflow for analyzing documents.</p>
179
+ * <p>Sets the configuration for the human in the loop workflow for analyzing
180
+ * documents.</p>
180
181
  */
181
182
  HumanLoopConfig?: HumanLoopConfig;
182
183
  /**
@@ -394,7 +395,7 @@ export interface Block {
394
395
  * <li>
395
396
  * <p>
396
397
  * <i>QUERY</i> - A question asked during the call of AnalyzeDocument. Contains an
397
- * alias and an ID that attachs it to its answer.</p>
398
+ * alias and an ID that attaches it to its answer.</p>
398
399
  * </li>
399
400
  * <li>
400
401
  * <p>
@@ -492,12 +493,13 @@ export interface Block {
492
493
  */
493
494
  SelectionStatus?: SelectionStatus | string;
494
495
  /**
495
- * <p>The page on which a block was detected. <code>Page</code> is returned by asynchronous
496
- * operations. Page values greater than 1 are only returned for multipage documents that are
497
- * in PDF or TIFF format. A scanned image (JPEG/PNG), even if it contains multiple document pages, is
498
- * considered to be a single-page document. The value of <code>Page</code> is always 1.
499
- * Synchronous operations don't return <code>Page</code> because every input document is
500
- * considered to be a single-page document.</p>
496
+ * <p>The page on which a block was detected. <code>Page</code> is returned by synchronous and
497
+ * asynchronous operations. Page values greater than 1 are only returned for multipage
498
+ * documents that are in PDF or TIFF format. A scanned image (JPEG/PNG) provided to an
499
+ * asynchronous operation, even if it contains multiple document pages, is considered a
500
+ * single-page document. This means that for scanned images the value of <code>Page</code> is
501
+ * always 1. Synchronous operations operations will also return a <code>Page</code> value of 1
502
+ * because every input document is considered to be a single-page document.</p>
501
503
  */
502
504
  Page?: number;
503
505
  /**
@@ -714,6 +716,72 @@ export interface AnalyzeExpenseRequest {
714
716
  */
715
717
  Document: Document | undefined;
716
718
  }
719
+ /**
720
+ * <p>Returns the kind of currency detected.</p>
721
+ */
722
+ export interface ExpenseCurrency {
723
+ /**
724
+ * <p>Currency code for detected currency. the current supported codes are:</p>
725
+ * <ul>
726
+ * <li>
727
+ * <p>USD</p>
728
+ * </li>
729
+ * <li>
730
+ * <p>EUR</p>
731
+ * </li>
732
+ * <li>
733
+ * <p>GBP</p>
734
+ * </li>
735
+ * <li>
736
+ * <p>CAD</p>
737
+ * </li>
738
+ * <li>
739
+ * <p>INR</p>
740
+ * </li>
741
+ * <li>
742
+ * <p>JPY</p>
743
+ * </li>
744
+ * <li>
745
+ * <p>CHF</p>
746
+ * </li>
747
+ * <li>
748
+ * <p>AUD</p>
749
+ * </li>
750
+ * <li>
751
+ * <p>CNY</p>
752
+ * </li>
753
+ * <li>
754
+ * <p>BZR</p>
755
+ * </li>
756
+ * <li>
757
+ * <p>SEK</p>
758
+ * </li>
759
+ * <li>
760
+ * <p>HKD</p>
761
+ * </li>
762
+ * </ul>
763
+ */
764
+ Code?: string;
765
+ /**
766
+ * <p>Percentage confideence in the detected currency.</p>
767
+ */
768
+ Confidence?: number;
769
+ }
770
+ /**
771
+ * <p>Shows the group that a certain key belongs to. This helps differentiate between
772
+ * names and addresses for different organizations, that can be hard to determine
773
+ * via JSON response.</p>
774
+ */
775
+ export interface ExpenseGroupProperty {
776
+ /**
777
+ * <p>Informs you on whether the expense group is a name or an address.</p>
778
+ */
779
+ Types?: string[];
780
+ /**
781
+ * <p>Provides a group Id number, which will be the same for each in the group.</p>
782
+ */
783
+ Id?: string;
784
+ }
717
785
  /**
718
786
  * <p>An object used to store information about the Value or Label detected by Amazon Textract.</p>
719
787
  */
@@ -766,6 +834,16 @@ export interface ExpenseField {
766
834
  * <p>The page number the value was detected on.</p>
767
835
  */
768
836
  PageNumber?: number;
837
+ /**
838
+ * <p>Shows the kind of currency, both the code and confidence associated with any monatary value
839
+ * detected.</p>
840
+ */
841
+ Currency?: ExpenseCurrency;
842
+ /**
843
+ * <p>Shows which group a response object belongs to, such as whether an address line
844
+ * belongs to the vendor's address or the recipent's address.</p>
845
+ */
846
+ GroupProperties?: ExpenseGroupProperty[];
769
847
  }
770
848
  /**
771
849
  * <p>A structure that holds information about the different lines found in a document's tables.</p>
@@ -806,6 +884,11 @@ export interface ExpenseDocument {
806
884
  * <p>Information detected on each table of a document, seperated into <code>LineItems</code>.</p>
807
885
  */
808
886
  LineItemGroups?: LineItemGroup[];
887
+ /**
888
+ * <p>This is a block object, the same as reported when DetectDocumentText is run on a document.
889
+ * It provides word level recognition of text.</p>
890
+ */
891
+ Blocks?: Block[];
809
892
  }
810
893
  export interface AnalyzeExpenseResponse {
811
894
  /**
@@ -886,11 +969,15 @@ export interface IdentityDocument {
886
969
  * Contains both normalized field and value of the extracted text.</p>
887
970
  */
888
971
  IdentityDocumentFields?: IdentityDocumentField[];
972
+ /**
973
+ * <p>Individual word recognition, as returned by document detection.</p>
974
+ */
975
+ Blocks?: Block[];
889
976
  }
890
977
  export interface AnalyzeIDResponse {
891
978
  /**
892
- * <p>The list of documents processed by AnalyzeID. Includes a number denoting their
893
- * place in the list and the response structure for the document.</p>
979
+ * <p>The list of documents processed by AnalyzeID. Includes a number denoting their place in
980
+ * the list and the response structure for the document.</p>
894
981
  */
895
982
  IdentityDocuments?: IdentityDocument[];
896
983
  /**
@@ -943,7 +1030,8 @@ export interface DocumentLocation {
943
1030
  export interface GetDocumentAnalysisRequest {
944
1031
  /**
945
1032
  * <p>A unique identifier for the text-detection job. The <code>JobId</code> is returned from
946
- * <code>StartDocumentAnalysis</code>. A <code>JobId</code> value is only valid for 7 days.</p>
1033
+ * <code>StartDocumentAnalysis</code>. A <code>JobId</code> value is only valid for 7
1034
+ * days.</p>
947
1035
  */
948
1036
  JobId: string | undefined;
949
1037
  /**
@@ -953,8 +1041,9 @@ export interface GetDocumentAnalysisRequest {
953
1041
  */
954
1042
  MaxResults?: number;
955
1043
  /**
956
- * <p>If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination
957
- * token in the response. You can use this pagination token to retrieve the next set of blocks.</p>
1044
+ * <p>If the previous response was incomplete (because there are more blocks to retrieve),
1045
+ * Amazon Textract returns a pagination token in the response. You can use this pagination
1046
+ * token to retrieve the next set of blocks.</p>
958
1047
  */
959
1048
  NextToken?: string;
960
1049
  }
@@ -979,8 +1068,9 @@ export interface Warning {
979
1068
  }
980
1069
  export interface GetDocumentAnalysisResponse {
981
1070
  /**
982
- * <p>Information about a document that Amazon Textract processed. <code>DocumentMetadata</code> is
983
- * returned in every page of paginated responses from an Amazon Textract video operation.</p>
1071
+ * <p>Information about a document that Amazon Textract processed.
1072
+ * <code>DocumentMetadata</code> is returned in every page of paginated responses from an
1073
+ * Amazon Textract video operation.</p>
984
1074
  */
985
1075
  DocumentMetadata?: DocumentMetadata;
986
1076
  /**
@@ -988,8 +1078,8 @@ export interface GetDocumentAnalysisResponse {
988
1078
  */
989
1079
  JobStatus?: JobStatus | string;
990
1080
  /**
991
- * <p>If the response is truncated, Amazon Textract returns this token. You can use this token in
992
- * the subsequent request to retrieve the next set of text detection results.</p>
1081
+ * <p>If the response is truncated, Amazon Textract returns this token. You can use this token
1082
+ * in the subsequent request to retrieve the next set of text detection results.</p>
993
1083
  */
994
1084
  NextToken?: string;
995
1085
  /**
@@ -1001,7 +1091,8 @@ export interface GetDocumentAnalysisResponse {
1001
1091
  */
1002
1092
  Warnings?: Warning[];
1003
1093
  /**
1004
- * <p>Returns if the detection job could not be completed. Contains explanation for what error occured.</p>
1094
+ * <p>Returns if the detection job could not be completed. Contains explanation for what error
1095
+ * occured.</p>
1005
1096
  */
1006
1097
  StatusMessage?: string;
1007
1098
  /**
@@ -1431,6 +1522,14 @@ export declare const AnalyzeDocumentResponseFilterSensitiveLog: (obj: AnalyzeDoc
1431
1522
  * @internal
1432
1523
  */
1433
1524
  export declare const AnalyzeExpenseRequestFilterSensitiveLog: (obj: AnalyzeExpenseRequest) => any;
1525
+ /**
1526
+ * @internal
1527
+ */
1528
+ export declare const ExpenseCurrencyFilterSensitiveLog: (obj: ExpenseCurrency) => any;
1529
+ /**
1530
+ * @internal
1531
+ */
1532
+ export declare const ExpenseGroupPropertyFilterSensitiveLog: (obj: ExpenseGroupProperty) => any;
1434
1533
  /**
1435
1534
  * @internal
1436
1535
  */
@@ -228,6 +228,14 @@ export declare class UnsupportedDocumentException extends __BaseException {
228
228
  export interface AnalyzeExpenseRequest {
229
229
  Document: Document | undefined;
230
230
  }
231
+ export interface ExpenseCurrency {
232
+ Code?: string;
233
+ Confidence?: number;
234
+ }
235
+ export interface ExpenseGroupProperty {
236
+ Types?: string[];
237
+ Id?: string;
238
+ }
231
239
  export interface ExpenseDetection {
232
240
  Text?: string;
233
241
  Geometry?: Geometry;
@@ -242,6 +250,8 @@ export interface ExpenseField {
242
250
  LabelDetection?: ExpenseDetection;
243
251
  ValueDetection?: ExpenseDetection;
244
252
  PageNumber?: number;
253
+ Currency?: ExpenseCurrency;
254
+ GroupProperties?: ExpenseGroupProperty[];
245
255
  }
246
256
  export interface LineItemFields {
247
257
  LineItemExpenseFields?: ExpenseField[];
@@ -254,6 +264,7 @@ export interface ExpenseDocument {
254
264
  ExpenseIndex?: number;
255
265
  SummaryFields?: ExpenseField[];
256
266
  LineItemGroups?: LineItemGroup[];
267
+ Blocks?: Block[];
257
268
  }
258
269
  export interface AnalyzeExpenseResponse {
259
270
  DocumentMetadata?: DocumentMetadata;
@@ -281,6 +292,7 @@ export interface IdentityDocumentField {
281
292
  export interface IdentityDocument {
282
293
  DocumentIndex?: number;
283
294
  IdentityDocumentFields?: IdentityDocumentField[];
295
+ Blocks?: Block[];
284
296
  }
285
297
  export interface AnalyzeIDResponse {
286
298
  IdentityDocuments?: IdentityDocument[];
@@ -464,6 +476,12 @@ export declare const AnalyzeDocumentResponseFilterSensitiveLog: (
464
476
  export declare const AnalyzeExpenseRequestFilterSensitiveLog: (
465
477
  obj: AnalyzeExpenseRequest
466
478
  ) => any;
479
+ export declare const ExpenseCurrencyFilterSensitiveLog: (
480
+ obj: ExpenseCurrency
481
+ ) => any;
482
+ export declare const ExpenseGroupPropertyFilterSensitiveLog: (
483
+ obj: ExpenseGroupProperty
484
+ ) => any;
467
485
  export declare const ExpenseDetectionFilterSensitiveLog: (
468
486
  obj: ExpenseDetection
469
487
  ) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-textract",
3
3
  "description": "AWS SDK for JavaScript Textract Client for Node.js, Browser and React Native",
4
- "version": "3.199.0",
4
+ "version": "3.201.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,44 +19,44 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.199.0",
23
- "@aws-sdk/config-resolver": "3.198.0",
24
- "@aws-sdk/credential-provider-node": "3.199.0",
25
- "@aws-sdk/fetch-http-handler": "3.199.0",
26
- "@aws-sdk/hash-node": "3.198.0",
27
- "@aws-sdk/invalid-dependency": "3.198.0",
28
- "@aws-sdk/middleware-content-length": "3.199.0",
29
- "@aws-sdk/middleware-endpoint": "3.198.0",
30
- "@aws-sdk/middleware-host-header": "3.198.0",
31
- "@aws-sdk/middleware-logger": "3.198.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.198.0",
33
- "@aws-sdk/middleware-retry": "3.198.0",
34
- "@aws-sdk/middleware-serde": "3.198.0",
35
- "@aws-sdk/middleware-signing": "3.198.0",
36
- "@aws-sdk/middleware-stack": "3.198.0",
37
- "@aws-sdk/middleware-user-agent": "3.198.0",
38
- "@aws-sdk/node-config-provider": "3.198.0",
39
- "@aws-sdk/node-http-handler": "3.199.0",
40
- "@aws-sdk/protocol-http": "3.198.0",
41
- "@aws-sdk/smithy-client": "3.198.0",
42
- "@aws-sdk/types": "3.198.0",
43
- "@aws-sdk/url-parser": "3.198.0",
22
+ "@aws-sdk/client-sts": "3.201.0",
23
+ "@aws-sdk/config-resolver": "3.201.0",
24
+ "@aws-sdk/credential-provider-node": "3.201.0",
25
+ "@aws-sdk/fetch-http-handler": "3.201.0",
26
+ "@aws-sdk/hash-node": "3.201.0",
27
+ "@aws-sdk/invalid-dependency": "3.201.0",
28
+ "@aws-sdk/middleware-content-length": "3.201.0",
29
+ "@aws-sdk/middleware-endpoint": "3.201.0",
30
+ "@aws-sdk/middleware-host-header": "3.201.0",
31
+ "@aws-sdk/middleware-logger": "3.201.0",
32
+ "@aws-sdk/middleware-recursion-detection": "3.201.0",
33
+ "@aws-sdk/middleware-retry": "3.201.0",
34
+ "@aws-sdk/middleware-serde": "3.201.0",
35
+ "@aws-sdk/middleware-signing": "3.201.0",
36
+ "@aws-sdk/middleware-stack": "3.201.0",
37
+ "@aws-sdk/middleware-user-agent": "3.201.0",
38
+ "@aws-sdk/node-config-provider": "3.201.0",
39
+ "@aws-sdk/node-http-handler": "3.201.0",
40
+ "@aws-sdk/protocol-http": "3.201.0",
41
+ "@aws-sdk/smithy-client": "3.201.0",
42
+ "@aws-sdk/types": "3.201.0",
43
+ "@aws-sdk/url-parser": "3.201.0",
44
44
  "@aws-sdk/util-base64-browser": "3.188.0",
45
- "@aws-sdk/util-base64-node": "3.188.0",
45
+ "@aws-sdk/util-base64-node": "3.201.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
- "@aws-sdk/util-body-length-node": "3.188.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.198.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.198.0",
50
- "@aws-sdk/util-endpoints": "3.198.0",
51
- "@aws-sdk/util-user-agent-browser": "3.198.0",
52
- "@aws-sdk/util-user-agent-node": "3.198.0",
47
+ "@aws-sdk/util-body-length-node": "3.201.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.201.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.201.0",
50
+ "@aws-sdk/util-endpoints": "3.201.0",
51
+ "@aws-sdk/util-user-agent-browser": "3.201.0",
52
+ "@aws-sdk/util-user-agent-node": "3.201.0",
53
53
  "@aws-sdk/util-utf8-browser": "3.188.0",
54
- "@aws-sdk/util-utf8-node": "3.199.0",
54
+ "@aws-sdk/util-utf8-node": "3.201.0",
55
55
  "tslib": "^2.3.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@aws-sdk/service-client-documentation-generator": "3.188.0",
59
- "@tsconfig/recommended": "1.0.1",
59
+ "@tsconfig/node14": "1.0.3",
60
60
  "@types/node": "^12.7.5",
61
61
  "concurrently": "7.0.0",
62
62
  "downlevel-dts": "0.10.1",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "engines": {
73
- "node": ">=12.0.0"
73
+ "node": ">=14.0.0"
74
74
  },
75
75
  "typesVersions": {
76
76
  "<4.0": {