Skip to content

Commit

Permalink
feat: update ReviewDocumentRequest to allow set priority and enable v…
Browse files Browse the repository at this point in the history
…alidation (#238)

PiperOrigin-RevId: 380732771
  • Loading branch information
gcf-owl-bot[bot] authored Jun 23, 2021
1 parent b88562a commit 6cc2664
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ message Document {
// - "unfilled_checkbox"
// - "filled_checkbox"
string value_type = 5;

// The history of this annotation.
Provenance provenance = 8;
}

// Detected language for a structural component.
Expand Down Expand Up @@ -385,6 +388,9 @@ message Document {

// A list of visually detected form fields on the page.
repeated FormField form_fields = 11;

// The history of this page.
Provenance provenance = 16;
}

// A phrase in the text that is a known entity type, such as a person, an
Expand Down Expand Up @@ -536,6 +542,8 @@ message Document {

// Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
// [Document.pages][page_refs.page] to locate the related page element.
// This field is skipped when its value is the default 0. See
// https://developers.google.com/protocol-buffers/docs/proto3#json.
int64 page = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The type of the layout element that is being referenced if any.
Expand Down Expand Up @@ -568,8 +576,12 @@ message Document {
// The index of the [Document.revisions] identifying the parent revision.
int32 revision = 1;

// The index of the parent revisions corresponding collection of items
// (eg. list of entities, properties within entities, etc.)
int32 index = 3;

// The id of the parent provenance.
int32 id = 2;
int32 id = 2 [deprecated = true];
}

// If a processor or agent does an explicit operation on existing elements.
Expand Down Expand Up @@ -602,7 +614,7 @@ message Document {

// The Id of this operation. Needs to be unique within the scope of the
// revision.
int32 id = 2;
int32 id = 2 [deprecated = true];

// References to the original elements that are replaced.
repeated Parent parents = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,18 @@ message BatchProcessMetadata {

// Request message for review document method.
message ReviewDocumentRequest {
reserved 2;

// The priority level of the human review task.
enum Priority {
// The default priority level.
DEFAULT = 0;

// The urgent priority level. The labeling manager should allocate labeler
// resource to the urgent task queue to respect this priority level.
URGENT = 1;
}

// The document payload.
oneof source {
// An inline document proto.
Expand All @@ -268,6 +280,12 @@ message ReviewDocumentRequest {
type: "documentai.googleapis.com/HumanReviewConfig"
}
];

// Whether the validation should be performed on the ad-hoc review request.
bool enable_schema_validation = 3;

// The priority of the human review task.
Priority priority = 5;
}

// Response message for review document method.
Expand Down
39 changes: 39 additions & 0 deletions packages/google-cloud-documentai/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6cc2664

Please sign in to comment.