googleapis
Version:
Google APIs Client Library for Node.js
1,243 lines • 195 kB
TypeScript
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace documentai_v1beta2 {
export interface Options extends GlobalOptions {
version: 'v1beta2';
}
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('v1beta2');
* ```
*/
export class Documentai {
context: APIRequestContext;
projects: Resource$Projects;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Metadata of the auto-labeling documents operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
/**
* The list of individual auto-labeling statuses of the dataset documents.
*/
individualAutoLabelStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus[];
/**
* Total number of the auto-labeling documents.
*/
totalDocumentCount?: number | null;
}
/**
* The status of individual documents in the auto-labeling process.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus {
/**
* The document id of the auto-labeled document. This will replace the gcs_uri.
*/
documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId;
/**
* The status of the document auto-labeling.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* The response proto of AutoLabelDocuments method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsResponse {
}
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
/**
* Total number of documents that failed to be deleted in storage.
*/
errorDocumentCount?: number | null;
/**
* The list of response details of each document.
*/
individualBatchDeleteStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus[];
/**
* Total number of documents deleting from dataset.
*/
totalDocumentCount?: number | null;
}
/**
* The status of each individual document in the batch delete process.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus {
/**
* The document id of the document.
*/
documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId;
/**
* The status of deleting the document in storage.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* Response of the delete documents operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse {
}
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
/**
* The destination dataset split type.
*/
destDatasetType?: string | null;
/**
* The destination dataset split type.
*/
destSplitType?: string | null;
/**
* The list of response details of each document.
*/
individualBatchMoveStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus[];
}
/**
* The status of each individual document in the batch move process.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus {
/**
* The document id of the document.
*/
documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId;
/**
* The status of moving the document.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* Response of the batch move documents operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsResponse {
}
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
/**
* The list of response details of each document.
*/
individualBatchUpdateStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadataIndividualBatchUpdateStatus[];
}
/**
* The status of each individual document in the batch update process.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadataIndividualBatchUpdateStatus {
/**
* The document id of the document.
*/
documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId;
/**
* The status of updating the document in storage.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* Response of the batch update documents operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsResponse {
}
/**
* The common metadata for long running operations.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata {
/**
* The creation time of the operation.
*/
createTime?: string | null;
/**
* A related resource to this operation.
*/
resource?: 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 the CreateLabelerPool method.
*/
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 the DeleteProcessor method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* The long-running operation metadata for the DeleteProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* The long-running operation metadata for the DeployProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* Response message for the DeployProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionResponse {
}
/**
* The long-running operation metadata for the DisableProcessor method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* Response message for the DisableProcessor method. Intentionally empty proto for adding fields in future.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse {
}
/**
* Document Identifier.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DocumentId {
/**
* A document id within user-managed Cloud Storage.
*/
gcsManagedDocId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId;
/**
* Points to a specific revision of the document if set.
*/
revisionRef?: Schema$GoogleCloudDocumentaiUiv1beta3RevisionRef;
/**
* A document id within unmanaged dataset.
*/
unmanagedDocId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId;
}
/**
* Identifies a document uniquely within the scope of a dataset in the user-managed Cloud Storage option.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId {
/**
* Id of the document (indexed) managed by Content Warehouse.
*/
cwDocId?: string | null;
/**
* Required. The Cloud Storage URI where the actual document is stored.
*/
gcsUri?: string | null;
}
/**
* Identifies a document uniquely within the scope of a dataset in unmanaged option.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId {
/**
* Required. The id of the document.
*/
docId?: string | null;
}
/**
* The long-running operation metadata for the EnableProcessor method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* Response message for the EnableProcessor 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;
}
/**
* Response of the EvaluateProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse {
/**
* The resource name of the created evaluation.
*/
evaluation?: string | null;
}
/**
* Metadata of the batch export documents operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
/**
* The list of response details of each document.
*/
individualExportStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus[];
/**
* The list of statistics for each dataset split type.
*/
splitExportStats?: Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat[];
}
/**
* The status of each individual document in the export process.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus {
/**
* The path to source docproto of the document.
*/
documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId;
/**
* The output_gcs_destination of the exported document if it was successful, otherwise empty.
*/
outputGcsDestination?: string | null;
/**
* The status of the exporting of the document.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* The statistic representing a dataset split type for this export.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat {
/**
* The dataset split type.
*/
splitType?: string | null;
/**
* Total number of documents with the given dataset split type to be exported.
*/
totalDocumentCount?: number | null;
}
/**
* The response proto of ExportDocuments method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportDocumentsResponse {
}
/**
* Metadata message associated with the ExportProcessorVersion operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionMetadata {
/**
* The common metadata about the operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* Response message associated with the ExportProcessorVersion operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse {
/**
* The Cloud Storage URI containing the output artifacts.
*/
gcsUri?: string | null;
}
/**
* Metadata of the import document operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
/**
* Validation statuses of the batch documents import config.
*/
importConfigValidationResults?: Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult[];
/**
* The list of response details of each document.
*/
individualImportStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus[];
/**
* Total number of the documents that are qualified for importing.
*/
totalDocumentCount?: number | null;
}
/**
* The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult {
/**
* The source Cloud Storage URI specified in the import config.
*/
inputGcsSource?: string | null;
/**
* The validation status of import config.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* The status of each individual document in the import process.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus {
/**
* The source Cloud Storage URI of the document.
*/
inputGcsSource?: string | null;
/**
* The document id of imported document if it was successful, otherwise empty.
*/
outputDocumentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId;
/**
* The output_gcs_destination of the processed document if it was successful, otherwise empty.
*/
outputGcsDestination?: string | null;
/**
* The status of the importing of the document.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* Response of the import document operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse {
}
/**
* The long-running operation metadata for the ImportProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionMetadata {
/**
* The basic metadata for the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* The response message for the ImportProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse {
/**
* The destination processor version name.
*/
processorVersion?: string | null;
}
/**
* The metadata proto of `ResyncDataset` method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
/**
* The list of dataset resync statuses. Not checked when ResyncDatasetRequest.dataset_documents is specified.
*/
datasetResyncStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus[];
/**
* The list of document resync statuses. The same document could have multiple `individual_document_resync_statuses` if it has multiple inconsistencies.
*/
individualDocumentResyncStatuses?: Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus[];
}
/**
* Resync status against inconsistency types on the dataset level.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus {
/**
* The type of the inconsistency of the dataset.
*/
datasetInconsistencyType?: string | null;
/**
* The status of resyncing the dataset with regards to the detected inconsistency. Empty if ResyncDatasetRequest.validate_only is `true`.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* Resync status for each document per inconsistency type.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus {
/**
* The document identifier.
*/
documentId?: Schema$GoogleCloudDocumentaiUiv1beta3DocumentId;
/**
* The type of document inconsistency.
*/
documentInconsistencyType?: string | null;
/**
* The status of resyncing the document with regards to the detected inconsistency. Empty if ResyncDatasetRequest.validate_only is `true`.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* The response proto of ResyncDataset method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse {
}
/**
* The revision reference specifies which revision on the document to read.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3RevisionRef {
/**
* Reads the revision generated by the processor version. The format takes the full resource name of processor version. `projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\}`
*/
latestProcessorVersion?: string | null;
/**
* Reads the revision by the predefined case.
*/
revisionCase?: string | null;
/**
* Reads the revision given by the id.
*/
revisionId?: string | null;
}
/**
* Metadata of the sample documents operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* Response of the sample documents operation.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponse {
/**
* The status of sampling documents in test split.
*/
sampleTestStatus?: Schema$GoogleRpcStatus;
/**
* The status of sampling documents in training split.
*/
sampleTrainingStatus?: Schema$GoogleRpcStatus;
/**
* The result of the sampling process.
*/
selectedDocuments?: Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument[];
}
export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument {
/**
* An internal identifier for document.
*/
documentId?: string | null;
}
/**
* The long-running operation metadata for the SetDefaultProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* Response message for the SetDefaultProcessorVersion 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 {
/**
* The total number of dataset errors.
*/
datasetErrorCount?: number | null;
/**
* 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[];
/**
* The total number of document errors.
*/
documentErrorCount?: number | null;
/**
* 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 TrainProcessorVersion.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse {
/**
* The resource name of the processor version produced by training.
*/
processorVersion?: string | null;
}
/**
* The long-running operation metadata for the UndeployProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* Response message for the UndeployProcessorVersion method.
*/
export interface Schema$GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse {
}
export interface Schema$GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata {
/**
* The basic metadata of the long-running operation.
*/
commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
}
/**
* 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 BatchProcessDocuments.
*/
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.
*/
inputGcsSource?: string | null;
/**
* The Cloud Storage output destination (in the request as DocumentOutputConfig.GcsOutputConfig.gcs_uri) of the processed document if it was successful, otherwise empty.
*/
outputGcsDestination?: string | null;
/**
* The status processing the document.
*/
status?: Schema$GoogleRpcStatus;
}
/**
* Response message for BatchProcessDocuments.
*/
export interface Schema$GoogleCloudDocumentaiV1BatchProcessResponse {
}
/**
* Encodes the detailed information of a barcode.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1Barcode {
/**
* Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
*/
format?: string | null;
/**
* Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`.
*/
rawValue?: string | null;
/**
* Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.
*/
valueFormat?: string | null;
}
/**
* 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 AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1Document {
/**
* Document chunked based on chunking config.
*/
chunkedDocument?: Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocument;
/**
* 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;
/**
* Parsed layout of the document.
*/
documentLayout?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayout;
/**
* A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
*/
entities?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntity[];
/**
* Placeholder. Relationship among Document.entities.
*/
entityRelations?: Schema$GoogleCloudDocumentaiV1beta1DocumentEntityRelation[];
/**
* Any error that occurred while processing this document.
*/
error?: Schema$GoogleRpcStatus;
/**
* An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
*/
mimeType?: string | null;
/**
* Visual page layout for the Document.
*/
pages?: Schema$GoogleCloudDocumentaiV1beta1DocumentPage[];
/**
* Placeholder. 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;
/**
* Placeholder. 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. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
*/
uri?: string | null;
}
/**
* Represents the chunks that the document is divided into.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocument {
/**
* List of chunks.
*/
chunks?: Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk[];
}
/**
* Represents a chunk.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk {
/**
* ID of the chunk.
*/
chunkId?: string | null;
/**
* Text content of the chunk.
*/
content?: string | null;
/**
* Page footers associated with the chunk.
*/
pageFooters?: Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter[];
/**
* Page headers associated with the chunk.
*/
pageHeaders?: Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader[];
/**
* Page span of the chunk.
*/
pageSpan?: Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan;
/**
* Unused.
*/
sourceBlockIds?: string[] | null;
}
/**
* Represents the page footer associated with the chunk.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter {
/**
* Page span of the footer.
*/
pageSpan?: Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan;
/**
* Footer in text format.
*/
text?: string | null;
}
/**
* Represents the page header associated with the chunk.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader {
/**
* Page span of the header.
*/
pageSpan?: Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan;
/**
* Header in text format.
*/
text?: string | null;
}
/**
* Represents where the chunk starts and ends in the document.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan {
/**
* Page where chunk ends in the document.
*/
pageEnd?: number | null;
/**
* Page where chunk starts in the document.
*/
pageStart?: number | null;
}
/**
* Represents the parsed layout of a document as a collection of blocks that the document is divided into.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayout {
/**
* List of blocks in the document.
*/
blocks?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock[];
}
/**
* Represents a block. A block could be one of the various types (text, table, list) supported.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock {
/**
* ID of the block.
*/
blockId?: string | null;
/**
* Block consisting of list content/structure.
*/
listBlock?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock;
/**
* Page span of the block.
*/
pageSpan?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan;
/**
* Block consisting of table content/structure.
*/
tableBlock?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock;
/**
* Block consisting of text content.
*/
textBlock?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock;
}
/**
* Represents a list type block.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock {
/**
* List entries that constitute a list block.
*/
listEntries?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry[];
/**
* Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
*/
type?: string | null;
}
/**
* Represents an entry in the list.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry {
/**
* A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
*/
blocks?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock[];
}
/**
* Represents where the block starts and ends in the document.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan {
/**
* Page where block ends in the document.
*/
pageEnd?: number | null;
/**
* Page where block starts in the document.
*/
pageStart?: number | null;
}
/**
* Represents a table type block.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock {
/**
* Body rows containing main table content.
*/
bodyRows?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow[];
/**
* Table caption/title.
*/
caption?: string | null;
/**
* Header rows at the top of the table.
*/
headerRows?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow[];
}
/**
* Represents a cell in a table row.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell {
/**
* A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
*/
blocks?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock[];
/**
* How many columns this cell spans.
*/
colSpan?: number | null;
/**
* How many rows this cell spans.
*/
rowSpan?: number | null;
}
/**
* Represents a row in a table.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow {
/**
* A table row is a list of table cells.
*/
cells?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell[];
}
/**
* Represents a text type block.
*/
export interface Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock {
/**
* A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
*/
blocks?: Schema$GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock[];
/**
* Text content stored in the block.
*/
text?: string | null;
/**
* Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
*/
type?: string | null;
}
/**
* An entity that could be a phrase in the text or a property that belongs to the document. It 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 of the entity 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;
/**
* Required. 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;
/**
* Float value.
*/
floatValue?: number | null;
/**
* Integer value.
*/
integerValue?: number | null;
/**
* Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
*/
moneyValue?: Schema$GoogleTypeMoney;
/**
* Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - 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 barcodes.
*/
detectedBarcodes?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode[];
/**
* 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;
/**
* Image quality scores.
*/
imageQualityScores?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores;
/**
* 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[];
/**
* The history of this page.
*/
provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance;
/**
* A list of visually detected symbols on the page.
*/
symbols?: Schema$GoogleCloudDocumentaiV1beta1DocumentPageSymbol[];
/**
* 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$GoogleCloudDocumentaiV1beta1DocumentPageMatr