Skip to content

Commit 0b08176

Browse files
author
awstools
committed
feat(client-textract): Add ocr results in AnalyzeIDResponse as blocks
1 parent 80634b7 commit 0b08176

File tree

3 files changed

+58
-7
lines changed

3 files changed

+58
-7
lines changed

clients/client-textract/src/models/models_0.ts

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,45 @@ export interface AnalyzeExpenseRequest {
891891
*/
892892
export interface ExpenseCurrency {
893893
/**
894-
* <p>Currency code for detected currency.</p>
894+
* <p>Currency code for detected currency. the current supported codes are:</p>
895+
* <ul>
896+
* <li>
897+
* <p>USD</p>
898+
* </li>
899+
* <li>
900+
* <p>EUR</p>
901+
* </li>
902+
* <li>
903+
* <p>GBP</p>
904+
* </li>
905+
* <li>
906+
* <p>CAD</p>
907+
* </li>
908+
* <li>
909+
* <p>INR</p>
910+
* </li>
911+
* <li>
912+
* <p>JPY</p>
913+
* </li>
914+
* <li>
915+
* <p>CHF</p>
916+
* </li>
917+
* <li>
918+
* <p>AUD</p>
919+
* </li>
920+
* <li>
921+
* <p>CNY</p>
922+
* </li>
923+
* <li>
924+
* <p>BZR</p>
925+
* </li>
926+
* <li>
927+
* <p>SEK</p>
928+
* </li>
929+
* <li>
930+
* <p>HKD</p>
931+
* </li>
932+
* </ul>
895933
*/
896934
Code?: string;
897935

@@ -902,12 +940,13 @@ export interface ExpenseCurrency {
902940
}
903941

904942
/**
905-
* <p>Shows the group that a certain key belongs to. This helps differentiate responses
906-
* like addresses that can appear similar in response JSON.</p>
943+
* <p>Shows the group that a certain key belongs to. This helps differentiate between
944+
* names and addresses for different organizations, that can be hard to determine
945+
* via JSON response.</p>
907946
*/
908947
export interface ExpenseGroupProperty {
909948
/**
910-
* <p>Informs you on the kind of label associated with the group</p>
949+
* <p>Informs you on whether the expense group is a name or an address.</p>
911950
*/
912951
Types?: string[];
913952

@@ -1134,6 +1173,11 @@ export interface IdentityDocument {
11341173
* Contains both normalized field and value of the extracted text.</p>
11351174
*/
11361175
IdentityDocumentFields?: IdentityDocumentField[];
1176+
1177+
/**
1178+
* <p>Individual word recognition, as returned by document detection.</p>
1179+
*/
1180+
Blocks?: Block[];
11371181
}
11381182

11391183
export interface AnalyzeIDResponse {

clients/client-textract/src/protocols/Aws_json1_1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,7 @@ const deserializeAws_json1_1IdempotentParameterMismatchException = (
17051705

17061706
const deserializeAws_json1_1IdentityDocument = (output: any, context: __SerdeContext): IdentityDocument => {
17071707
return {
1708+
Blocks: output.Blocks != null ? deserializeAws_json1_1BlockList(output.Blocks, context) : undefined,
17081709
DocumentIndex: __expectInt32(output.DocumentIndex),
17091710
IdentityDocumentFields:
17101711
output.IdentityDocumentFields != null

codegen/sdk-codegen/aws-models/textract.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@
768768
"Code": {
769769
"target": "com.amazonaws.textract#String",
770770
"traits": {
771-
"smithy.api#documentation": "<p>Currency code for detected currency.</p>"
771+
"smithy.api#documentation": "<p>Currency code for detected currency. the current supported codes are:</p>\n <ul>\n <li>\n <p>USD</p>\n </li>\n <li>\n <p>EUR</p>\n </li>\n <li>\n <p>GBP</p>\n </li>\n <li>\n <p>CAD</p>\n </li>\n <li>\n <p>INR</p>\n </li>\n <li>\n <p>JPY</p>\n </li>\n <li>\n <p>CHF</p>\n </li>\n <li>\n <p>AUD</p>\n </li>\n <li>\n <p>CNY</p>\n </li>\n <li>\n <p>BZR</p>\n </li>\n <li>\n <p>SEK</p>\n </li>\n <li>\n <p>HKD</p>\n </li>\n </ul>"
772772
}
773773
},
774774
"Confidence": {
@@ -899,7 +899,7 @@
899899
"Types": {
900900
"target": "com.amazonaws.textract#StringList",
901901
"traits": {
902-
"smithy.api#documentation": "<p>Informs you on the kind of label associated with the group</p>"
902+
"smithy.api#documentation": "<p>Informs you on whether the expense group is a name or an address.</p>"
903903
}
904904
},
905905
"Id": {
@@ -910,7 +910,7 @@
910910
}
911911
},
912912
"traits": {
913-
"smithy.api#documentation": "<p>Shows the group that a certain key belongs to. This helps differentiate responses\n like addresses that can appear similar in response JSON.</p>"
913+
"smithy.api#documentation": "<p>Shows the group that a certain key belongs to. This helps differentiate between\n names and addresses for different organizations, that can be hard to determine\n via JSON response.</p>"
914914
}
915915
},
916916
"com.amazonaws.textract#ExpenseGroupPropertyList": {
@@ -1500,6 +1500,12 @@
15001500
"traits": {
15011501
"smithy.api#documentation": "<p>The structure used to record information extracted from identity documents.\n Contains both normalized field and value of the extracted text.</p>"
15021502
}
1503+
},
1504+
"Blocks": {
1505+
"target": "com.amazonaws.textract#BlockList",
1506+
"traits": {
1507+
"smithy.api#documentation": "<p>Individual word recognition, as returned by document detection.</p>"
1508+
}
15031509
}
15041510
},
15051511
"traits": {

0 commit comments

Comments
 (0)