UNPKG

googleapis

Version:
957 lines 178 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 discoveryengine_v1beta { export interface Options extends GlobalOptions { version: 'v1beta'; } 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; } /** * Discovery Engine API * * Discovery Engine API. * * @example * ```js * const {google} = require('googleapis'); * const discoveryengine = google.discoveryengine('v1beta'); * ``` */ export class Discoveryengine { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. */ export interface Schema$GoogleApiHttpBody { /** * The HTTP Content-Type header value specifying the content type of the body. */ contentType?: string | null; /** * The HTTP request/response body as raw binary. */ data?: string | null; /** * Application specific response metadata. Must be set in the first response for streaming APIs. */ extensions?: Array<{ [key: string]: any; }> | null; } /** * A description of the context in which an error occurred. */ export interface Schema$GoogleCloudDiscoveryengineLoggingErrorContext { /** * The HTTP request which was processed when the error was triggered. */ httpRequest?: Schema$GoogleCloudDiscoveryengineLoggingHttpRequestContext; /** * The location in the source code where the decision was made to report the error, usually the place where it was logged. */ reportLocation?: Schema$GoogleCloudDiscoveryengineLoggingSourceLocation; } /** * An error log which is reported to the Error Reporting system. */ export interface Schema$GoogleCloudDiscoveryengineLoggingErrorLog { /** * A description of the context in which the error occurred. */ context?: Schema$GoogleCloudDiscoveryengineLoggingErrorContext; /** * The error payload that is populated on LRO import APIs. */ importPayload?: Schema$GoogleCloudDiscoveryengineLoggingImportErrorContext; /** * A message describing the error. */ message?: string | null; /** * The API request payload, represented as a protocol buffer. Most API request types are supported—for example: * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest` * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest` */ requestPayload?: { [key: string]: any; } | null; /** * The API response payload, represented as a protocol buffer. This is used to log some "soft errors", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported, and no PII is included: * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend` * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent` * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent` */ responsePayload?: { [key: string]: any; } | null; /** * The service context in which this error has occurred. */ serviceContext?: Schema$GoogleCloudDiscoveryengineLoggingServiceContext; /** * The RPC status associated with the error log. */ status?: Schema$GoogleRpcStatus; } /** * HTTP request data that is related to a reported error. */ export interface Schema$GoogleCloudDiscoveryengineLoggingHttpRequestContext { /** * The HTTP response status code for the request. */ responseStatusCode?: number | null; } /** * The error payload that is populated on LRO import APIs, including the following: * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments` * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents` */ export interface Schema$GoogleCloudDiscoveryengineLoggingImportErrorContext { /** * The detailed content which caused the error on importing a document. */ document?: string | null; /** * Google Cloud Storage file path of the import source. Can be set for batch operation error. */ gcsPath?: string | null; /** * Line number of the content in file. Should be empty for permission or batch operation error. */ lineNumber?: string | null; /** * The operation resource name of the LRO. */ operation?: string | null; /** * The detailed content which caused the error on importing a user event. */ userEvent?: string | null; } /** * Describes a running service that sends errors. */ export interface Schema$GoogleCloudDiscoveryengineLoggingServiceContext { /** * An identifier of the service—for example, `discoveryengine.googleapis.com`. */ service?: string | null; } /** * Indicates a location in the source code of the service for which errors are reported. */ export interface Schema$GoogleCloudDiscoveryengineLoggingSourceLocation { /** * Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`. */ functionName?: string | null; } /** * Response message for SiteSearchEngineService.BatchCreateTargetSites method. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse { /** * TargetSites created. */ targetSites?: Schema$GoogleCloudDiscoveryengineV1alphaTargetSite[]; } /** * Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were processed successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: Schema$GoogleCloudDiscoveryengineV1alphaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; } /** * Configuration of destination for Import related errors. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaImportErrorConfig { /** * Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string | null; } /** * Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were processed successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse { /** * Echoes the destination for the complete errors if this field was set in the request. */ errorConfig?: Schema$GoogleCloudDiscoveryengineV1alphaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * Count of user events imported with complete existing Documents. */ joinedEventsCount?: string | null; /** * Count of user events imported, but with Document information not found in the existing Branch. */ unjoinedEventsCount?: string | null; } /** * Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were deleted successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse { /** * The total count of documents purged as a result of the operation. */ purgeCount?: string | null; /** * A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random. */ purgeSample?: string[] | null; } /** * Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were deleted successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse { /** * The total count of events purged as a result of the operation. */ purgeCount?: string | null; } /** * Defines the structure and layout of a type of document data. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaSchema { /** * The JSON representation of the schema. */ jsonSchema?: string | null; /** * Immutable. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ name?: string | null; /** * The structured representation of the schema. */ structSchema?: { [key: string]: any; } | null; } /** * Verification information for target sites in advanced site search. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo { /** * Site verification state indicating the ownership and validity. */ siteVerificationState?: string | null; /** * Latest site verification time. */ verifyTime?: string | null; } /** * A target site for the SiteSearchEngine. */ export interface Schema$GoogleCloudDiscoveryengineV1alphaTargetSite { /** * Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine. */ exactMatch?: boolean | null; /** * Output only. This is system-generated based on the provided_uri_pattern. */ generatedUriPattern?: string | null; /** * Output only. The fully qualified resource name of the target site. `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/siteSearchEngine/targetSites/{target_site\}` The `target_site_id` is system-generated. */ name?: string | null; /** * Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. */ providedUriPattern?: string | null; /** * Output only. Site ownership and validity verification status. */ siteVerificationInfo?: Schema$GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo; /** * The type of the target site, e.g. whether the site is to be included or excluded. */ type?: string | null; /** * Output only. The target site's last updated time. */ updateTime?: string | null; } /** * BigQuery source import data from. */ export interface Schema$GoogleCloudDiscoveryengineV1betaBigQuerySource { /** * The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder. */ dataSchema?: string | null; /** * Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters. */ datasetId?: string | null; /** * Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory. */ gcsStagingDir?: string | null; /** * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. */ partitionDate?: Schema$GoogleTypeDate; /** * The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. */ projectId?: string | null; /** * Required. The BigQuery table to copy the data from with a length limit of 1,024 characters. */ tableId?: string | null; } /** * Detailed completion information including completion attribution token and clicked completion info. */ export interface Schema$GoogleCloudDiscoveryengineV1betaCompletionInfo { /** * End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. */ selectedPosition?: number | null; /** * End user selected CompleteQueryResponse.QuerySuggestion.suggestion. */ selectedSuggestion?: string | null; } /** * A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. */ export interface Schema$GoogleCloudDiscoveryengineV1betaCustomAttribute { /** * The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. */ numbers?: number[] | null; /** * The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. */ text?: string[] | null; } /** * Document captures all raw metadata information of items to be recommended or searched. */ export interface Schema$GoogleCloudDiscoveryengineV1betaDocument { /** * Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. */ id?: string | null; /** * The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. */ jsonData?: string | null; /** * Immutable. The full resource name of the document. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/branches/{branch\}/documents/{document_id\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ name?: string | null; /** * The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. */ parentDocumentId?: string | null; /** * The identifier of the schema located in the same data store. */ schemaId?: string | null; /** * The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. */ structData?: { [key: string]: any; } | null; } /** * Detailed document information associated with a user event. */ export interface Schema$GoogleCloudDiscoveryengineV1betaDocumentInfo { /** * The Document resource ID. */ id?: string | null; /** * The Document resource full name, of the form: `projects/{project_id\}/locations/{location\}/collections/{collection_id\}/dataStores/{data_store_id\}/branches/{branch_id\}/documents/{document_id\}` */ name?: string | null; /** * The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. */ promotionIds?: string[] | null; /** * Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 2 if two quantities of the same Document are involved in a `add-to-cart` event. Required for events of the following event types: * `add-to-cart` * `purchase` */ quantity?: number | null; /** * The Document URI - only allowed for website data stores. */ uri?: string | null; } /** * Cloud Storage location for input content. */ export interface Schema$GoogleCloudDiscoveryengineV1betaGcsSource { /** * The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by Gen App Builder. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line. */ dataSchema?: string | null; /** * Required. Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/x.json`. A request can contain at most 100 files (or 100,000 files if `data_schema` is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is `content`). */ inputUris?: string[] | null; } /** * Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were processed successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Request message for Import methods. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportDocumentsRequest { /** * Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. */ autoGenerateIds?: boolean | null; /** * BigQuery input source. */ bigquerySource?: Schema$GoogleCloudDiscoveryengineV1betaBigQuerySource; /** * The desired location of errors incurred during the Import. */ errorConfig?: Schema$GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * Cloud Storage location for the input content. */ gcsSource?: Schema$GoogleCloudDiscoveryengineV1betaGcsSource; /** * The field in the Cloud Storage and BigQuery sources that indicates the unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"\}`. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored. The values of the JSON field or the BigQuery column are used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom`. And only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. */ idField?: string | null; /** * The Inline source for the input content for documents. */ inlineSource?: Schema$GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource; /** * The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL. */ reconciliationMode?: string | null; } /** * The inline source for the input config for ImportDocuments method. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource { /** * Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items. */ documents?: Schema$GoogleCloudDiscoveryengineV1betaDocument[]; } /** * Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportDocumentsResponse { /** * Echoes the destination for the complete errors in the request if set. */ errorConfig?: Schema$GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; } /** * Configuration of destination for Import related errors. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportErrorConfig { /** * Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string | null; } /** * Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were processed successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Request message for the ImportUserEvents request. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportUserEventsRequest { /** * BigQuery input source. */ bigquerySource?: Schema$GoogleCloudDiscoveryengineV1betaBigQuerySource; /** * The desired location of errors incurred during the Import. Cannot be set for inline user event imports. */ errorConfig?: Schema$GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * Cloud Storage location for the input content. */ gcsSource?: Schema$GoogleCloudDiscoveryengineV1betaGcsSource; /** * The Inline source for the input content for UserEvents. */ inlineSource?: Schema$GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource; } /** * The inline source for the input config for ImportUserEvents method. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource { /** * Required. A list of user events to import. Recommended max of 10k items. */ userEvents?: Schema$GoogleCloudDiscoveryengineV1betaUserEvent[]; } /** * Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. */ export interface Schema$GoogleCloudDiscoveryengineV1betaImportUserEventsResponse { /** * Echoes the destination for the complete errors if this field was set in the request. */ errorConfig?: Schema$GoogleCloudDiscoveryengineV1betaImportErrorConfig; /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * Count of user events imported with complete existing Documents. */ joinedEventsCount?: string | null; /** * Count of user events imported, but with Document information not found in the existing Branch. */ unjoinedEventsCount?: string | null; } /** * Response message for DocumentService.ListDocuments method. */ export interface Schema$GoogleCloudDiscoveryengineV1betaListDocumentsResponse { /** * The Documents. */ documents?: Schema$GoogleCloudDiscoveryengineV1betaDocument[]; /** * A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; } /** * Media-specific user event information. */ export interface Schema$GoogleCloudDiscoveryengineV1betaMediaInfo { /** * The media progress time in seconds, if applicable. For example, if the end user has finished 90 seconds of a playback video, then MediaInfo.media_progress_duration.seconds should be set to 90. */ mediaProgressDuration?: string | null; /** * Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. */ mediaProgressPercentage?: number | null; } /** * Detailed page information. */ export interface Schema$GoogleCloudDiscoveryengineV1betaPageInfo { /** * The most specific category associated with a category page. To represent full path of category, use '\>' sign to separate different hierarchies. If '\>' is part of the category name, please replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales \> 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. */ pageCategory?: string | null; /** * A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageview_id` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. */ pageviewId?: string | null; /** * The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. However, some browser privacy restrictions may cause this field to be empty. */ referrerUri?: string | null; /** * Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters. */ uri?: string | null; } /** * Detailed panel information associated with a user event. */ export interface Schema$GoogleCloudDiscoveryengineV1betaPanelInfo { /** * The display name of the panel. */ displayName?: string | null; /** * Required. The panel ID. */ panelId?: string | null; /** * The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. */ panelPosition?: number | null; /** * The total number of panels, including this one, shown to the user. Must be set if panel_position is set. */ totalPanels?: number | null; } /** * Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata { /** * Operation create time. */ createTime?: string | null; /** * Count of entries that encountered errors while processing. */ failureCount?: string | null; /** * Count of entries that were deleted successfully. */ successCount?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Request message for DocumentService.PurgeDocuments method. */ export interface Schema$GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest { /** * Required. Filter matching documents to purge. Only currently supported value is `*` (all items). */ filter?: string | null; /** * Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any documents. */ force?: boolean | null; } /** * Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. */ export interface Schema$GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse { /** * The total count of documents purged as a result of the operation. */ purgeCount?: string | null; /** * A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random. */ purgeSample?: string[] | null; } /** * Request message for Recommend method. */ export interface Schema$GoogleCloudDiscoveryengineV1betaRecommendRequest { /** * Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` If your filter blocks all results, the API will return generic (unfiltered) popular Documents. If you only want results strictly matching the filters, set `strictFiltering` to True in RecommendRequest.params to receive empty results instead. Note that the API will never return Documents with `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. */ filter?: string | null; /** * Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100. */ pageSize?: number | null; /** * Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to true, the associated Document object will be returned in RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. If set to true, the recommendation 'score' corresponding to each returned Document will be set in RecommendResponse.RecommendationResult.metadata. The given 'score' indicates the probability of a Document conversion given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular Documents instead of empty if your filter blocks all recommendation results. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` This gives request-level control and adjusts recommendation results based on Document category. */ params?: { [key: string]: any; } | null; /** * Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset. */ userEvent?: Schema$GoogleCloudDiscoveryengineV1betaUserEvent; /** * The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. */ userLabels?: { [key: string]: string; } | null; /** * Use validate only mode for this recommendation query. If set to true, a fake model will be used that returns arbitrary Document IDs. Note that the validate only mode should only be used for testing the API, or if the model is not ready. */ validateOnly?: boolean | null; } /** * Response message for Recommend method. */ export interface Schema$GoogleCloudDiscoveryengineV1betaRecommendResponse { /** * A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. */ attributionToken?: string | null; /** * IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. */ missingIds?: string[] | null; /** * A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least). */ results?: Schema$GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult[]; /** * True if RecommendRequest.validate_only was set. */ validateOnly?: boolean | null; } /** * RecommendationResult represents a generic recommendation result with associated metadata. */ export interface Schema$GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult { /** * Set if `returnDocument` is set to true in RecommendRequest.params. */ document?: Schema$GoogleCloudDiscoveryengineV1betaDocument; /** * Resource ID of the recommended Document. */ id?: string | null; /** * Additional Document metadata / annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params. */ metadata?: { [key: string]: any; } | null; } /** * Defines the structure and layout of a type of document data. */ export interface Schema$GoogleCloudDiscoveryengineV1betaSchema { /** * The JSON representation of the schema. */ jsonSchema?: string | null; /** * Immutable. The full resource name of the schema, in the format of `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}/schemas/{schema\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. */ name?: string | null; /** * The structured representation of the schema. */ structSchema?: { [key: string]: any; } | null; } /** * Detailed search information. */ export interface Schema$GoogleCloudDiscoveryengineV1betaSearchInfo { /** * An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. */ offset?: number | null; /** * The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. */ orderBy?: string | null; /** * The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. At least one of search_query or PageInfo.page_category is required for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. */ searchQuery?: string | null; } /** * A transaction represents the entire purchase transaction. */ export interface Schema$GoogleCloudDiscoveryengineV1betaTransactionInfo { /** * All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost */ cost?: number | null; /** * Required. Currency code. Use three-character ISO-4217 code. */ currency?: string | null; /** * The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost */ discountValue?: number | null; /** * All the taxes associated with the transaction. */ tax?: number | null; /** * The transaction ID with a length limit of 128 characters. */ transactionId?: string | null; /** * Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include. */ value?: number | null; } /** * UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. */ export interface Schema$GoogleCloudDiscoveryengineV1betaUserEvent { /** * Extra user event features to include in the recommendation model. These attributes must NOT contain data that needs to be parsed or processed further, e.g. JSON or other encodings. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Discovery Engine API use those custom attributes when training models and serving predictions, whi