UNPKG

googleapis

Version:
1,244 lines 175 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace documentai_v1beta3 { export interface Options extends GlobalOptions { version: 'v1beta3'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Cloud Document AI API * * Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML. * * @example * ```js * const {google} = require('googleapis'); * const documentai = google.documentai('v1beta3'); * ``` */ export class Documentai { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * The common metadata for long running operations. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata { /** * The creation time of the operation. */ createTime?: string | null; /** * The state of the operation. */ state?: string | null; /** * A message providing more details about the current state of processing. */ stateMessage?: string | null; /** * The last update time of the operation. */ updateTime?: string | null; } /** * The long running operation metadata for CreateLabelerPool. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long running operation metadata for DeleteLabelerPool. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long running operation metadata for delete processor method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long running operation metadata for delete processor version method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long running operation metadata for deploy processor version method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the deploy processor version method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionResponse { } /** * The long running operation metadata for disable processor method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the disable processor method. Intentionally empty proto for adding fields in future. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse { } /** * The long running operation metadata for enable processor method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the enable processor method. Intentionally empty proto for adding fields in future. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EnableProcessorResponse { } /** * Metadata of the EvaluateProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Metadata of the EvaluateProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse { /** * The resource name of the created evaluation. */ evaluation?: string | null; } /** * The long running operation metadata for SampleDataset. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long running operation metadata for set default processor version method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for set default processor version method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse { } /** * The metadata that represents a processor version being created. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; /** * The test dataset validation information. */ testDatasetValidation?: Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation; /** * The training dataset validation information. */ trainingDatasetValidation?: Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation; } /** * The dataset validation information. This includes any and all errors with documents and the dataset. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation { /** * Error information for the dataset as a whole. A maximum of 10 dataset errors will be returned. A single dataset error is terminal for training. */ datasetErrors?: Schema$GoogleRpcStatus[]; /** * Error information pertaining to specific documents. A maximum of 10 document errors will be returned. Any document with errors will not be used throughout training. */ documentErrors?: Schema$GoogleRpcStatus[]; } /** * The response for the TrainProcessorVersion method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse { /** * The resource name of the processor version produced by training. */ processorVersion?: string | null; } /** * The long running operation metadata for the undeploy processor version method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * Response message for the undeploy processor version method. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse { } /** * The long running operation metadata for updating the human review configuration. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long running operation metadata for UpdateLabelerPool. */ export interface Schema$GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata { /** * The basic metadata of the long running operation. */ commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; } /** * The long running operation metadata for batch process method. */ export interface Schema$GoogleCloudDocumentaiV1BatchProcessMetadata { /** * The creation time of the operation. */ createTime?: string | null; /** * The list of response details of each document. */ individualProcessStatuses?: Schema$GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus[]; /** * The state of the current batch processing. */ state?: string | null; /** * A message providing more details about the current state of processing. For example, the error message if the operation is failed. */ stateMessage?: string | null; /** * The last update time of the operation. */ updateTime?: string | null; } /** * The status of a each individual document in the batch process. */ export interface Schema$GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus { /** * The status of human review on the processed document. */ humanReviewStatus?: Schema$GoogleCloudDocumentaiV1HumanReviewStatus; /** * The source of the document, same as the [input_gcs_source] field in the request when the batch process started. The batch process is started by take snapshot of that document, since a user can move or change that document during the process. */ inputGcsSource?: string | null; /** * The output_gcs_destination (in the request as 'output_gcs_destination') of the processed document if it was successful, otherwise empty. */ outputGcsDestination?: string | null; /** * The status of the processing of the document. */ status?: Schema$GoogleRpcStatus; } /** * Response message for batch process document method. */ export interface Schema$GoogleCloudDocumentaiV1BatchProcessResponse { } /** * Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete. */ export interface Schema$GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse { /** * Responses for each individual document. */ responses?: Schema$GoogleCloudDocumentaiV1beta1ProcessDocumentResponse[]; } /** * A bounding polygon for the detected image annotation. */ export interface Schema$GoogleCloudDocumentaiV1beta1BoundingPoly { /** * The bounding polygon normalized vertices. */ normalizedVertices?: Schema$GoogleCloudDocumentaiV1beta1NormalizedVertex[]; /** * The bounding polygon vertices. */ vertices?: Schema$GoogleCloudDocumentaiV1beta1Vertex[]; } /** * Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality. */ export interface Schema$GoogleCloudDocumentaiV1beta1Document { /** * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** * A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries. */ entities?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntity[]; /** * Relationship among Document.entities. */ entityRelations?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntityRelation[]; /** * Any error that occurred while processing this document. */ error?: Schema$GoogleRpcStatus; /** * An IANA published MIME type (also referred to as media type). For more information, see https://www.iana.org/assignments/media-types/media-types.xhtml. */ mimeType?: string | null; /** * Visual page layout for the Document. */ pages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPage[]; /** * Revision history of this document. */ revisions?: Schema$GoogleCloudDocumentaiV1beta1DocumentRevision[]; /** * Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified. */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta1DocumentShardInfo; /** * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** * A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other. */ textChanges?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextChange[]; /** * Styles for the Document.text. */ textStyles?: Schema$GoogleCloudDocumentaiV1beta1DocumentStyle[]; /** * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. */ uri?: string | null; } /** * A phrase in the text that is a known entity type, such as a person, an organization, or location. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentEntity { /** * Optional. Confidence of detected Schema entity. Range [0, 1]. */ confidence?: number | null; /** * Optional. Canonical id. This will be a unique value in the entity list for this document. */ id?: string | null; /** * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** * Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** * 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. */ normalizedValue?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue; /** * Optional. Represents the provenance of this entity wrt. the location on the page where it was found. */ pageAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchor; /** * Optional. Entities can be nested to form a hierarchical data structure representing the content in the document. */ properties?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntity[]; /** * Optional. The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; /** * Optional. Whether the entity will be redacted for de-identification purposes. */ redacted?: boolean | null; /** * Optional. Provenance of the entity. Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; /** * Entity type from a schema e.g. `Address`. */ type?: string | null; } /** * Parsed and normalized entity value. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue { /** * Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto */ addressValue?: Schema$GoogleTypePostalAddress; /** * Boolean value. Can be used for entities with binary values, or for checkboxes. */ booleanValue?: boolean | null; /** * DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto */ datetimeValue?: Schema$GoogleTypeDateTime; /** * Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto */ dateValue?: Schema$GoogleTypeDate; /** * Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto */ moneyValue?: Schema$GoogleTypeMoney; /** * Required. Normalized entity value stored as a string. This field is populated for supported document type (e.g. Invoice). For some entity types, one of respective 'structured_value' fields may also be populated. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format. */ text?: string | null; } /** * Relationship between Entities. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentEntityRelation { /** * Object entity id. */ objectId?: string | null; /** * Relationship description. */ relation?: string | null; /** * Subject entity id. */ subjectId?: string | null; } /** * A page in a Document. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPage { /** * A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation. */ blocks?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageBlock[]; /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Physical dimension of the page. */ dimension?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDimension; /** * A list of visually detected form fields on the page. */ formFields?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageFormField[]; /** * Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned. */ image?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageImage; /** * Layout for the page. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line. */ lines?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLine[]; /** * 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing. */ pageNumber?: number | null; /** * A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph. */ paragraphs?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageParagraph[]; /** * A list of visually detected tables on the page. */ tables?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageTable[]; /** * A list of visually detected tokens on the page. */ tokens?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageToken[]; /** * Transformation matrices that were applied to the original document image to produce Page.image. */ transforms?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageMatrix[]; /** * A list of detected non-text visual elements e.g. checkbox, signature etc. on the page. */ visualElements?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageVisualElement[]; } /** * Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchor { /** * One or more references to visual page elements */ pageRefs?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef[]; } /** * Represents a weak reference to a page element within a document. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef { /** * Optional. Identifies the bounding polygon of a layout element on the page. */ boundingPoly?: Schema$GoogleCloudDocumentaiV1beta1BoundingPoly; /** * Optional. Deprecated. Use PageRef.bounding_poly instead. */ layoutId?: string | null; /** * Optional. The type of the layout element that is being referenced if any. */ layoutType?: string | null; /** * Required. Index into the Document.pages element, for example using Document.pages to locate the related page element. */ page?: string | null; } /** * A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageBlock { /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for Block. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; } /** * Detected language for a structural component. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage { /** * Confidence of detected language. Range [0, 1]. */ confidence?: number | null; /** * The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */ languageCode?: string | null; } /** * Dimension for the page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageDimension { /** * Page height. */ height?: number | null; /** * Dimension unit. */ unit?: string | null; /** * Page width. */ width?: number | null; } /** * A form field detected on the page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageFormField { /** * Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. */ fieldName?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * Layout for the FormField value. */ fieldValue?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * A list of detected languages for name together with confidence. */ nameDetectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * A list of detected languages for value together with confidence. */ valueDetectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the field_value is normal text) - "unfilled_checkbox" - "filled_checkbox" */ valueType?: string | null; } /** * Rendered image contents for this page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageImage { /** * Raw byte content of the image. */ content?: string | null; /** * Height of the image in pixels. */ height?: number | null; /** * Encoding mime type for the image. */ mimeType?: string | null; /** * Width of the image in pixels. */ width?: number | null; } /** * Visual element describing a layout unit on a page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout { /** * The bounding polygon for the Layout. */ boundingPoly?: Schema$GoogleCloudDocumentaiV1beta1BoundingPoly; /** * Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range [0, 1]. */ confidence?: number | null; /** * Detected orientation for the Layout. */ orientation?: string | null; /** * Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; } /** * A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageLine { /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for Line. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; } /** * Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageMatrix { /** * Number of columns in the matrix. */ cols?: number | null; /** * The matrix data. */ data?: string | null; /** * Number of rows in the matrix. */ rows?: number | null; /** * This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html */ type?: number | null; } /** * A collection of lines that a human would perceive as a paragraph. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageParagraph { /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for Paragraph. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; } /** * A table representation similar to HTML table structure. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageTable { /** * Body rows of the table. */ bodyRows?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow[]; /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Header rows of the table. */ headerRows?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow[]; /** * Layout for Table. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; } /** * A cell representation inside the table. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell { /** * How many columns this cell spans. */ colSpan?: number | null; /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for TableCell. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * How many rows this cell spans. */ rowSpan?: number | null; } /** * A row of table cells. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow { /** * Cells that make up this row. */ cells?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell[]; } /** * A detected token. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageToken { /** * Detected break at the end of a Token. */ detectedBreak?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak; /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for Token. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance; } /** * Detected break at the end of a Token. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak { /** * Detected break type. */ type?: string | null; } /** * Detected non-text visual elements e.g. checkbox, signature etc. on the page. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentPageVisualElement { /** * A list of detected languages together with confidence. */ detectedLanguages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[]; /** * Layout for VisualElement. */ layout?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageLayout; /** * Type of the VisualElement. */ type?: string | null; } /** * Structure to identify provenance relationships between annotations in different revisions. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance { /** * The Id of this operation. Needs to be unique within the scope of the revision. */ id?: number | null; /** * References to the original elements that are replaced. */ parents?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenanceParent[]; /** * The index of the revision that produced this element. */ revision?: number | null; /** * The type of provenance operation. */ type?: string | null; } /** * Structure for referencing parent provenances. When an element replaces one of more other elements parent references identify the elements that are replaced. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentProvenanceParent { /** * The id of the parent provenance. */ id?: number | null; /** * The index of the [Document.revisions] identifying the parent revision. */ revision?: number | null; } /** * Contains past or forward revisions of this document. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentRevision { /** * If the change was made by a person specify the name or id of that person. */ agent?: string | null; /** * The time that the revision was created. */ createTime?: string | null; /** * Human Review information of this revision. */ humanReview?: Schema$GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview; /** * Id of the revision. Unique within the context of the document. */ id?: string | null; /** * The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field. */ parent?: number[] | null; /** * If the annotation was made by processor identify the processor by its resource name. */ processor?: string | null; } /** * Human Review information of the document. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview { /** * Human review state. e.g. `requested`, `succeeded`, `rejected`. */ state?: string | null; /** * A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`. */ stateMessage?: string | null; } /** * For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentShardInfo { /** * Total number of shards. */ shardCount?: string | null; /** * The 0-based index of this shard. */ shardIndex?: string | null; /** * The index of the first character in Document.text in the overall document global text. */ textOffset?: string | null; } /** * Annotation for common text style attributes. This adheres to CSS conventions as much as possible. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentStyle { /** * Text background color. */ backgroundColor?: Schema$GoogleTypeColor; /** * Text color. */ color?: Schema$GoogleTypeColor; /** * Font size. */ fontSize?: Schema$GoogleCloudDocumentaiV1beta1DocumentStyleFontSize; /** * Font weight. Possible values are normal, bold, bolder, and lighter. https://www.w3schools.com/cssref/pr_font_weight.asp */ fontWeight?: string | null; /** * Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; /** * Text decoration. Follows CSS standard. https://www.w3schools.com/cssref/pr_text_text-decoration.asp */ textDecoration?: string | null; /** * Text style. Possible values are normal, italic, and oblique. https://www.w3schools.com/cssref/pr_font_font-style.asp */ textStyle?: string | null; } /** * Font size with unit. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentStyleFontSize { /** * Font size for the text. */ size?: number | null; /** * Unit for the font size. Follows CSS naming (in, px, pt, etc.). */ unit?: string | null; } /** * Text reference indexing into the Document.text. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor { /** * Contains the content of the text span so that users do not have to look it up in the text_segments. */ content?: string | null; /** * The text segments from the Document.text. */ textSegments?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment[]; } /** * A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment { /** * TextSegment half open end UTF-8 char index in the Document.text. */ endIndex?: string | null; /** * TextSegment start UTF-8 char index in the Document.text. */ startIndex?: string | null; } /** * This message is used for text changes aka. OCR corrections. */ export interface Schema$GoogleCloudDocumentaiV1beta1DocumentTextChange { /** * The text that replaces the text identified in the `text_anchor`. */ changedText?: string | null; /** * The history of this annotation. */ provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance[]; /** * Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; } /** * The Google Cloud Storage location where the output file will be written to. */ export interface Schema$GoogleCloudDocumentaiV1beta1GcsDestination { uri?: string | null; } /** * The Google Cloud Storage location where the input file will be read from. */ export interface Schema$GoogleCloudDocumentaiV1beta1GcsSource { uri?: string | null; } /** * The desired input location and metadata. */ export interface Schema$GoogleCloudDocumentaiV1beta1InputConfig { /** * The Google Cloud Storage location to read the input from. This must be a single file. */ gcsSource?: Schema$GoogleCloudDocumentaiV1beta1GcsSource; /** * Required. Mimetype of the input. Current supported mimetypes are application/pdf, image/tiff, and image/gif. In addition, application/json type is supported for requests with ProcessDocumentRequest.automl_params field set. The JSON file needs to be in Document format. */ mimeType?: string | null; } /** * A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1. */ export interface Schema$GoogleCloudDocumentaiV1beta1NormalizedVertex { /** * X coordinate. */ x?: number | null; /** * Y coordinate. */ y?: number | null; } /** * Contains metadata for the BatchProcessDocuments operation. */ export interface Schema$GoogleCloudDocumentaiV1beta1OperationMetadata { /** * The creation time of the operation. */ createTime?: string | null; /** * The state of the current batch processing. */ state?: string | null; /** * A message providing more details about the current state of processing. */ stateMessage?: string | null; /** * The last update time of the operation. */ updateTime?: string | null; } /** * The desired output location and metadata. */ export interface Schema$GoogleCloudDocumentaiV1beta1OutputConfig { /** * The Google Cloud Storage location to write the output to. */ gcsDestination?: Schema$GoogleCloudDocumentaiV1beta1GcsDestination; /** * The max number of pages to include into each output Document shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each containing 20 parsed pages will be written under the prefix OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json */ pagesPerShard?: number | null; } /** * Response to a single document processing request. */ export interface Schema$GoogleCloudDocumentaiV1beta1ProcessDocumentResponse { /** * Information about the input file. This is the same as the corresponding input config in the request. */ inputConfig?: Schema$GoogleCloudDocumentaiV1beta1InputConfig; /** * The output location of the parsed responses. The responses are written to this location as JSON-serialized `Document` objects. */ outputConfig?: Schema$GoogleCloudDocumentaiV1beta1OutputConfig; } /** * A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image. */ export interface Schema$GoogleCloudDocumentaiV1beta1Vertex { /** * X coordinate. */ x?: number | null; /** * Y coordinate. */ y?: number | null; } /** * Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete. */ export interface Schema$GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse { /** * Responses for each individual document. */ responses?: Schema$GoogleCloudDocumentaiV1beta2ProcessDocumentResponse[]; } /** * A bounding polygon for the detected image annotation. */ export interface Schema$GoogleCloudDocumentaiV1beta2BoundingPoly { /** * The bounding polygon normalized vertices. */ normalizedVertices?: Schema$GoogleCloudDocumentaiV1beta2NormalizedVertex[]; /** * The bounding polygon vertices. */ vertices?: Schema$GoogleCloudDocumentaiV1beta2Vertex[]; } /** * Document represents the canonical document resource in Document Understanding AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document Understanding AI to iterate and optimize for quality. */ export interface Schema$GoogleCloudDocumentaiV1beta2Document { /** * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** * A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries. */ entities?: Schema$GoogleCloudDocumentaiV1beta2DocumentEntity[]; /** * Relationship among Document.entities. */ entityRelations?: Schema$GoogleCloudDocumentaiV1beta2DocumentEntityRelation[]; /** * Any error that occurred while processing this document. */ error?: Schema$GoogleRpcStatus; /** * Labels for this document. */ labels?: Schema$GoogleCloudDocumentaiV1beta2DocumentLabel[]; /** * An IANA published MIME type (also referred to as media type). For more information, see https://www.iana.org/assignments/media-types/media-types.xhtml. */ mimeType?: string | null; /** * Visual page layout for the Document. */ pages?: Schema$GoogleCloudDocumentaiV1beta2DocumentPage[]; /** * Revision history of this document. */ revisions?: Schema$GoogleCloudDocumentaiV1beta2DocumentRevision[]; /** * Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified. */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta2DocumentShardInfo; /** * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** * A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other. */ textChanges?: Schema$GoogleCloudDocumentaiV1beta2DocumentTextChange[]; /** * Styles for the Document.text. */ textStyles?: Schema$GoogleCloudDocumentaiV1beta2DocumentStyle[]; /** * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. */ uri?: string | null; } /** * A phrase in the text that is a known entity type, such as a person, an organization, or location. */ export interface Schema$GoogleCloudDocumentaiV1beta2DocumentEntity { /** * Optional. Confidence of detected Schema entity. Range [0, 1]. */ confidence?: number | null; /** * Optional. Canonical id. This will be a unique value in the entity list for this document. */ id?: string | null; /** * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** * Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** * 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. */ normalizedValue?: Schema$GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue; /** * Optional. Represents the provenance of this entity wrt. the locatio