Skip to content

Commit 174cf75

Browse files
yoshi-automationleahecole
authored andcommitted
feat(documentai): update the API
#### documentai:v1beta3 The following keys were added: - schemas.GoogleCloudDocumentaiV1beta3Document.properties.validationOutputs.description - schemas.GoogleCloudDocumentaiV1beta3Document.properties.validationOutputs.items.$ref - schemas.GoogleCloudDocumentaiV1beta3Document.properties.validationOutputs.type - schemas.GoogleCloudDocumentaiV1beta3DocumentEntity.properties.method.description - schemas.GoogleCloudDocumentaiV1beta3DocumentEntity.properties.method.enum - schemas.GoogleCloudDocumentaiV1beta3DocumentEntity.properties.method.enumDescriptions - schemas.GoogleCloudDocumentaiV1beta3DocumentEntity.properties.method.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.id - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.properties.passAllRules.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.properties.passAllRules.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.properties.validationResults.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.properties.validationResults.items.$ref - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.properties.validationResults.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutput.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.id - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.ruleDescription.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.ruleDescription.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.ruleName.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.ruleName.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.validationDetails.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.validationDetails.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.validationResultType.description - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.validationResultType.enum - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.validationResultType.enumDescriptions - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.properties.validationResultType.type - schemas.GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult.type #### documentai:v1 The following keys were added: - schemas.GoogleCloudDocumentaiV1Document.properties.validationOutputs.description - schemas.GoogleCloudDocumentaiV1Document.properties.validationOutputs.items.$ref - schemas.GoogleCloudDocumentaiV1Document.properties.validationOutputs.type - schemas.GoogleCloudDocumentaiV1DocumentEntity.properties.method.description - schemas.GoogleCloudDocumentaiV1DocumentEntity.properties.method.enum - schemas.GoogleCloudDocumentaiV1DocumentEntity.properties.method.enumDescriptions - schemas.GoogleCloudDocumentaiV1DocumentEntity.properties.method.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.id - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.properties.passAllRules.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.properties.passAllRules.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.properties.validationResults.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.properties.validationResults.items.$ref - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.properties.validationResults.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutput.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.id - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.ruleDescription.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.ruleDescription.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.ruleName.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.ruleName.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.validationDetails.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.validationDetails.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.validationResultType.description - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.validationResultType.enum - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.validationResultType.enumDescriptions - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.properties.validationResultType.type - schemas.GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult.type
1 parent 4b5cb4b commit 174cf75

File tree

4 files changed

+238
-2
lines changed

4 files changed

+238
-2
lines changed

discovery/documentai-v1.json

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@
10481048
}
10491049
}
10501050
},
1051-
"revision": "20250716",
1051+
"revision": "20250811",
10521052
"rootUrl": "https://documentai.googleapis.com/",
10531053
"schemas": {
10541054
"GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": {
@@ -2302,6 +2302,13 @@
23022302
"uri": {
23032303
"description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).",
23042304
"type": "string"
2305+
},
2306+
"validationOutputs": {
2307+
"description": "The output of the validation given the document and the validation rules. The output is appended to the document in the processing order.",
2308+
"items": {
2309+
"$ref": "GoogleCloudDocumentaiV1DocumentValidationOutput"
2310+
},
2311+
"type": "array"
23052312
}
23062313
},
23072314
"type": "object"
@@ -2607,6 +2614,20 @@
26072614
"description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.",
26082615
"type": "string"
26092616
},
2617+
"method": {
2618+
"description": "Optional. Specifies how the entity's value is obtained.",
2619+
"enum": [
2620+
"METHOD_UNSPECIFIED",
2621+
"EXTRACT",
2622+
"DERIVE"
2623+
],
2624+
"enumDescriptions": [
2625+
"When the method is not specified, it should be treated as `EXTRACT`.",
2626+
"The entity's value is directly extracted as-is from the document text.",
2627+
"The entity's value is derived through inference and is not necessarily an exact text extraction from the document."
2628+
],
2629+
"type": "string"
2630+
},
26102631
"normalizedValue": {
26112632
"$ref": "GoogleCloudDocumentaiV1DocumentEntityNormalizedValue",
26122633
"description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types."
@@ -3886,6 +3907,61 @@
38863907
},
38873908
"type": "object"
38883909
},
3910+
"GoogleCloudDocumentaiV1DocumentValidationOutput": {
3911+
"description": "The output of the validation given the document and the validation rules.",
3912+
"id": "GoogleCloudDocumentaiV1DocumentValidationOutput",
3913+
"properties": {
3914+
"passAllRules": {
3915+
"description": "The overall result of the validation, true if all applicable rules are valid.",
3916+
"type": "boolean"
3917+
},
3918+
"validationResults": {
3919+
"description": "The result of each validation rule.",
3920+
"items": {
3921+
"$ref": "GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult"
3922+
},
3923+
"type": "array"
3924+
}
3925+
},
3926+
"type": "object"
3927+
},
3928+
"GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult": {
3929+
"description": "Validation result for a single validation rule.",
3930+
"id": "GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult",
3931+
"properties": {
3932+
"ruleDescription": {
3933+
"description": "The description of the validation rule.",
3934+
"type": "string"
3935+
},
3936+
"ruleName": {
3937+
"description": "The name of the validation rule.",
3938+
"type": "string"
3939+
},
3940+
"validationDetails": {
3941+
"description": "The detailed information of the running the validation process using the entity from the document based on the validation rule.",
3942+
"type": "string"
3943+
},
3944+
"validationResultType": {
3945+
"description": "The result of the validation rule.",
3946+
"enum": [
3947+
"VALIDATION_RESULT_TYPE_UNSPECIFIED",
3948+
"VALIDATION_RESULT_TYPE_VALID",
3949+
"VALIDATION_RESULT_TYPE_INVALID",
3950+
"VALIDATION_RESULT_TYPE_SKIPPED",
3951+
"VALIDATION_RESULT_TYPE_NOT_APPLICABLE"
3952+
],
3953+
"enumDescriptions": [
3954+
"The validation result type is unspecified.",
3955+
"The validation is valid.",
3956+
"The validation is invalid.",
3957+
"The validation is skipped.",
3958+
"The validation is not applicable."
3959+
],
3960+
"type": "string"
3961+
}
3962+
},
3963+
"type": "object"
3964+
},
38893965
"GoogleCloudDocumentaiV1EnableProcessorMetadata": {
38903966
"description": "The long-running operation metadata for the EnableProcessor method.",
38913967
"id": "GoogleCloudDocumentaiV1EnableProcessorMetadata",

discovery/documentai-v1beta3.json

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@
12901290
}
12911291
}
12921292
},
1293-
"revision": "20250716",
1293+
"revision": "20250811",
12941294
"rootUrl": "https://documentai.googleapis.com/",
12951295
"schemas": {
12961296
"GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": {
@@ -3194,6 +3194,13 @@
31943194
"uri": {
31953195
"description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).",
31963196
"type": "string"
3197+
},
3198+
"validationOutputs": {
3199+
"description": "The output of the validation given the document and the validation rules. The output is appended to the document in the processing order.",
3200+
"items": {
3201+
"$ref": "GoogleCloudDocumentaiV1beta3DocumentValidationOutput"
3202+
},
3203+
"type": "array"
31973204
}
31983205
},
31993206
"type": "object"
@@ -3625,6 +3632,20 @@
36253632
"description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.",
36263633
"type": "string"
36273634
},
3635+
"method": {
3636+
"description": "Optional. Specifies how the entity's value is obtained.",
3637+
"enum": [
3638+
"METHOD_UNSPECIFIED",
3639+
"EXTRACT",
3640+
"DERIVE"
3641+
],
3642+
"enumDescriptions": [
3643+
"When the method is not specified, it should be treated as `EXTRACT`.",
3644+
"The entity's value is directly extracted as-is from the document text.",
3645+
"The entity's value is derived through inference and is not necessarily an exact text extraction from the document."
3646+
],
3647+
"type": "string"
3648+
},
36283649
"normalizedValue": {
36293650
"$ref": "GoogleCloudDocumentaiV1beta3DocumentEntityNormalizedValue",
36303651
"description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types."
@@ -5018,6 +5039,61 @@
50185039
},
50195040
"type": "object"
50205041
},
5042+
"GoogleCloudDocumentaiV1beta3DocumentValidationOutput": {
5043+
"description": "The output of the validation given the document and the validation rules.",
5044+
"id": "GoogleCloudDocumentaiV1beta3DocumentValidationOutput",
5045+
"properties": {
5046+
"passAllRules": {
5047+
"description": "The overall result of the validation, true if all applicable rules are valid.",
5048+
"type": "boolean"
5049+
},
5050+
"validationResults": {
5051+
"description": "The result of each validation rule.",
5052+
"items": {
5053+
"$ref": "GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult"
5054+
},
5055+
"type": "array"
5056+
}
5057+
},
5058+
"type": "object"
5059+
},
5060+
"GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult": {
5061+
"description": "Validation result for a single validation rule.",
5062+
"id": "GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult",
5063+
"properties": {
5064+
"ruleDescription": {
5065+
"description": "The description of the validation rule.",
5066+
"type": "string"
5067+
},
5068+
"ruleName": {
5069+
"description": "The name of the validation rule.",
5070+
"type": "string"
5071+
},
5072+
"validationDetails": {
5073+
"description": "The detailed information of the running the validation process using the entity from the document based on the validation rule.",
5074+
"type": "string"
5075+
},
5076+
"validationResultType": {
5077+
"description": "The result of the validation rule.",
5078+
"enum": [
5079+
"VALIDATION_RESULT_TYPE_UNSPECIFIED",
5080+
"VALIDATION_RESULT_TYPE_VALID",
5081+
"VALIDATION_RESULT_TYPE_INVALID",
5082+
"VALIDATION_RESULT_TYPE_SKIPPED",
5083+
"VALIDATION_RESULT_TYPE_NOT_APPLICABLE"
5084+
],
5085+
"enumDescriptions": [
5086+
"The validation result type is unspecified.",
5087+
"The validation is valid.",
5088+
"The validation is invalid.",
5089+
"The validation is skipped.",
5090+
"The validation is not applicable."
5091+
],
5092+
"type": "string"
5093+
}
5094+
},
5095+
"type": "object"
5096+
},
50215097
"GoogleCloudDocumentaiV1beta3EnableProcessorMetadata": {
50225098
"description": "The long-running operation metadata for the EnableProcessor method.",
50235099
"id": "GoogleCloudDocumentaiV1beta3EnableProcessorMetadata",

src/apis/documentai/v1.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,6 +1552,10 @@ export namespace documentai_v1 {
15521552
* Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
15531553
*/
15541554
uri?: string | null;
1555+
/**
1556+
* The output of the validation given the document and the validation rules. The output is appended to the document in the processing order.
1557+
*/
1558+
validationOutputs?: Schema$GoogleCloudDocumentaiV1DocumentValidationOutput[];
15551559
}
15561560
/**
15571561
* Represents the chunks that the document is divided into.
@@ -1783,6 +1787,10 @@ export namespace documentai_v1 {
17831787
* Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
17841788
*/
17851789
mentionText?: string | null;
1790+
/**
1791+
* Optional. Specifies how the entity's value is obtained.
1792+
*/
1793+
method?: string | null;
17861794
/**
17871795
* Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
17881796
*/
@@ -2712,6 +2720,40 @@ export namespace documentai_v1 {
27122720
*/
27132721
textAnchor?: Schema$GoogleCloudDocumentaiV1DocumentTextAnchor;
27142722
}
2723+
/**
2724+
* The output of the validation given the document and the validation rules.
2725+
*/
2726+
export interface Schema$GoogleCloudDocumentaiV1DocumentValidationOutput {
2727+
/**
2728+
* The overall result of the validation, true if all applicable rules are valid.
2729+
*/
2730+
passAllRules?: boolean | null;
2731+
/**
2732+
* The result of each validation rule.
2733+
*/
2734+
validationResults?: Schema$GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult[];
2735+
}
2736+
/**
2737+
* Validation result for a single validation rule.
2738+
*/
2739+
export interface Schema$GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult {
2740+
/**
2741+
* The description of the validation rule.
2742+
*/
2743+
ruleDescription?: string | null;
2744+
/**
2745+
* The name of the validation rule.
2746+
*/
2747+
ruleName?: string | null;
2748+
/**
2749+
* The detailed information of the running the validation process using the entity from the document based on the validation rule.
2750+
*/
2751+
validationDetails?: string | null;
2752+
/**
2753+
* The result of the validation rule.
2754+
*/
2755+
validationResultType?: string | null;
2756+
}
27152757
/**
27162758
* The long-running operation metadata for the EnableProcessor method.
27172759
*/

src/apis/documentai/v1beta3.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,10 @@ export namespace documentai_v1beta3 {
12531253
* Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
12541254
*/
12551255
uri?: string | null;
1256+
/**
1257+
* The output of the validation given the document and the validation rules. The output is appended to the document in the processing order.
1258+
*/
1259+
validationOutputs?: Schema$GoogleCloudDocumentaiV1beta3DocumentValidationOutput[];
12561260
}
12571261
/**
12581262
* Represents the annotation of a block or a chunk.
@@ -1594,6 +1598,10 @@ export namespace documentai_v1beta3 {
15941598
* Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
15951599
*/
15961600
mentionText?: string | null;
1601+
/**
1602+
* Optional. Specifies how the entity's value is obtained.
1603+
*/
1604+
method?: string | null;
15971605
/**
15981606
* Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
15991607
*/
@@ -2603,6 +2611,40 @@ export namespace documentai_v1beta3 {
26032611
*/
26042612
textAnchor?: Schema$GoogleCloudDocumentaiV1beta3DocumentTextAnchor;
26052613
}
2614+
/**
2615+
* The output of the validation given the document and the validation rules.
2616+
*/
2617+
export interface Schema$GoogleCloudDocumentaiV1beta3DocumentValidationOutput {
2618+
/**
2619+
* The overall result of the validation, true if all applicable rules are valid.
2620+
*/
2621+
passAllRules?: boolean | null;
2622+
/**
2623+
* The result of each validation rule.
2624+
*/
2625+
validationResults?: Schema$GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult[];
2626+
}
2627+
/**
2628+
* Validation result for a single validation rule.
2629+
*/
2630+
export interface Schema$GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult {
2631+
/**
2632+
* The description of the validation rule.
2633+
*/
2634+
ruleDescription?: string | null;
2635+
/**
2636+
* The name of the validation rule.
2637+
*/
2638+
ruleName?: string | null;
2639+
/**
2640+
* The detailed information of the running the validation process using the entity from the document based on the validation rule.
2641+
*/
2642+
validationDetails?: string | null;
2643+
/**
2644+
* The result of the validation rule.
2645+
*/
2646+
validationResultType?: string | null;
2647+
}
26062648
/**
26072649
* The long-running operation metadata for the EnableProcessor method.
26082650
*/

0 commit comments

Comments
 (0)