UNPKG

googleapis

Version:
865 lines 399 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 retail_v2alpha { export interface Options extends GlobalOptions { version: 'v2alpha'; } 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; } /** * Retail API * * Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud. * * @example * ```js * const {google} = require('googleapis'); * const retail = google.retail('v2alpha'); * ``` */ export class Retail { 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$GoogleCloudRetailLoggingErrorContext { /** * The HTTP request which was processed when the error was triggered. */ httpRequest?: Schema$GoogleCloudRetailLoggingHttpRequestContext; /** * The location in the source code where the decision was made to report the error, usually the place where it was logged. */ reportLocation?: Schema$GoogleCloudRetailLoggingSourceLocation; } /** * An error log which is reported to the Error Reporting system. This proto a superset of google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent. */ export interface Schema$GoogleCloudRetailLoggingErrorLog { /** * A description of the context in which the error occurred. */ context?: Schema$GoogleCloudRetailLoggingErrorContext; /** * The error payload that is populated on LRO import APIs. */ importPayload?: Schema$GoogleCloudRetailLoggingImportErrorContext; /** * 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.retail.v2.ProductService.CreateProductRequest" "type.googleapis.com/google.cloud.retail.v2.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.retail.v2.PredictionService.Predict" "google.cloud.retail.v2.UserEventService.WriteUserEvent" "google.cloud.retail.v2.UserEventService.CollectUserEvent" */ responsePayload?: { [key: string]: any; } | null; /** * The service context in which this error has occurred. */ serviceContext?: Schema$GoogleCloudRetailLoggingServiceContext; /** * The RPC status associated with the error log. */ status?: Schema$GoogleRpcStatus; } /** * HTTP request data that is related to a reported error. */ export interface Schema$GoogleCloudRetailLoggingHttpRequestContext { /** * The HTTP response status code for the request. */ responseStatusCode?: number | null; } /** * The error payload that is populated on LRO import APIs, including "google.cloud.retail.v2.ProductService.ImportProducts" and "google.cloud.retail.v2.EventService.ImportUserEvents". */ export interface Schema$GoogleCloudRetailLoggingImportErrorContext { /** * The detailed content which caused the error on importing a catalog item. */ catalogItem?: string | null; /** * 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. */ operationName?: string | null; /** * The detailed content which caused the error on importing a product. */ product?: 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$GoogleCloudRetailLoggingServiceContext { /** * An identifier of the service. For example, "retail.googleapis.com". */ service?: string | null; } /** * Indicates a location in the source code of the service for which errors are reported. */ export interface Schema$GoogleCloudRetailLoggingSourceLocation { /** * Human-readable name of a function or method. For example, "google.cloud.retail.v2.UserEventService.ImportUserEvents". */ functionName?: string | null; } /** * Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2AddFulfillmentPlacesMetadata { } /** * Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2AddFulfillmentPlacesResponse { } /** * Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2AddLocalInventoriesMetadata { } /** * Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2AddLocalInventoriesResponse { } /** * Request for AcceptTerms method. */ export interface Schema$GoogleCloudRetailV2alphaAcceptTermsRequest { } /** * Request for CatalogService.AddCatalogAttribute method. */ export interface Schema$GoogleCloudRetailV2alphaAddCatalogAttributeRequest { /** * Required. The CatalogAttribute to add. */ catalogAttribute?: Schema$GoogleCloudRetailV2alphaCatalogAttribute; } /** * Request for AddControl method. */ export interface Schema$GoogleCloudRetailV2alphaAddControlRequest { /** * Required. The id of the control to apply. Assumed to be in the same catalog as the serving config - if id is not found a NOT_FOUND error is returned. */ controlId?: string | null; } /** * Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata { } /** * Request message for ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest { /** * The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used. */ addTime?: string | null; /** * If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found. */ allowMissing?: boolean | null; /** * Required. The IDs for this type, such as the store IDs for "pickup-in-store" or the region IDs for "same-day-delivery" to be added for this type. Duplicate IDs will be automatically ignored. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected. */ placeIds?: string[] | null; /** * Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type. */ type?: string | null; } /** * Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method. */ export interface Schema$GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse { } /** * Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2alphaAddLocalInventoriesMetadata { } /** * Request message for ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2alphaAddLocalInventoriesRequest { /** * Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored. */ addMask?: string | null; /** * The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used. */ addTime?: string | null; /** * If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found. */ allowMissing?: boolean | null; /** * Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request. */ localInventories?: Schema$GoogleCloudRetailV2alphaLocalInventory[]; } /** * Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method. */ export interface Schema$GoogleCloudRetailV2alphaAddLocalInventoriesResponse { } /** * Catalog level attribute config. */ export interface Schema$GoogleCloudRetailV2alphaAttributesConfig { /** * Output only. The AttributeConfigLevel used for this catalog. */ attributeConfigLevel?: string | null; /** * Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. The maximum number of catalog attributes allowed in a request is 1000. */ catalogAttributes?: { [key: string]: Schema$GoogleCloudRetailV2alphaCatalogAttribute; } | null; /** * Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/x/locations/x/catalogs/x/attributesConfig` */ name?: string | null; } /** * An intended audience of the Product for whom it's sold. */ export interface Schema$GoogleCloudRetailV2alphaAudience { /** * The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge). */ ageGroups?: string[] | null; /** * The genders of the audience. Strongly encouraged to use the standard values: "male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender). */ genders?: string[] | null; } /** * Request for CatalogService.BatchRemoveCatalogAttributes method. */ export interface Schema$GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest { /** * Required. The attribute name keys of the CatalogAttributes to delete. A maximum of 1000 catalog attributes can be deleted in a batch. */ attributeKeys?: string[] | null; } /** * Response of the CatalogService.BatchRemoveCatalogAttributes. */ export interface Schema$GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse { /** * Catalog attributes that were deleted. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. */ deletedCatalogAttributes?: string[] | null; /** * Catalog attributes that were reset. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. */ resetCatalogAttributes?: string[] | null; } /** * A BigQuery output result. */ export interface Schema$GoogleCloudRetailV2alphaBigQueryOutputResult { /** * The ID of a BigQuery Dataset. */ datasetId?: string | null; /** * The ID of a BigQuery Table. */ tableId?: string | null; } /** * BigQuery source import data from. */ export interface Schema$GoogleCloudRetailV2alphaBigQuerySource { /** * The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for autocomplete imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line. */ 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. Only supported in ImportProductsRequest. */ 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; } /** * The catalog configuration. */ export interface Schema$GoogleCloudRetailV2alphaCatalog { /** * Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. */ displayName?: string | null; /** * The Merchant Center linking configuration. After a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the Merchant Center account in order to make changes to this field. */ merchantCenterLinkingConfig?: Schema$GoogleCloudRetailV2alphaMerchantCenterLinkingConfig; /** * Required. Immutable. The fully qualified resource name of the catalog. */ name?: string | null; /** * Required. The product level configuration. */ productLevelConfig?: Schema$GoogleCloudRetailV2alphaProductLevelConfig; } /** * Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute. */ export interface Schema$GoogleCloudRetailV2alphaCatalogAttribute { /** * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. Must be specified, otherwise throws INVALID_FORMAT error. */ dynamicFacetableOption?: string | null; /** * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to EXACT_SEARCHABLE_DISABLED. */ exactSearchableOption?: string | null; /** * When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search. Must be specified when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. */ indexableOption?: string | null; /** * Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update. */ inUse?: boolean | null; /** * Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed. If the attribute key starts with `attributes.`, then the attribute is a custom attribute. Attributes such as `brands`, `patterns`, and `title` are built-in and called system attributes. */ key?: string | null; /** * When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, attribute values are filterable for recommendations. This option works for categorical features only, does not work for numerical features, inventory filtering. */ recommendationsFilteringOption?: string | null; /** * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to RETRIEVABLE_DISABLED. */ retrievableOption?: string | null; /** * When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes. Must be specified, when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error. */ searchableOption?: string | null; /** * Output only. The type of this attribute. This is derived from the attribute in Product.attributes. */ type?: string | null; } /** * The color information of a Product. */ export interface Schema$GoogleCloudRetailV2alphaColorInfo { /** * The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). */ colorFamilies?: string[] | null; /** * The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). */ colors?: string[] | null; } /** * Response of the autocomplete query. */ export interface Schema$GoogleCloudRetailV2alphaCompleteQueryResponse { /** * A map of matched attribute suggestions. This field is only available for "cloud-retail" dataset. Current supported keys: * `brands` * `categories` */ attributeResults?: { [key: string]: Schema$GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult; } | null; /** * A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance. */ attributionToken?: string | null; /** * Results of the matching suggestions. The result list is ordered and the first result is top suggestion. */ completionResults?: Schema$GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult[]; /** * Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support. This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * They are ordered from latest to oldest. * They are matched with CompleteQueryRequest.query case insensitively. * They are transformed to lower case. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens. */ recentSearchResults?: Schema$GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult[]; } /** * Resource that represents attribute results. */ export interface Schema$GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult { /** * The list of suggestions for the attribute. */ suggestions?: string[] | null; } /** * Resource that represents completion results. */ export interface Schema$GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult { /** * Custom attributes for the suggestion term. * For "user-data", the attributes are additional custom attributes ingested through BigQuery. * For "cloud-retail", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly. */ attributes?: { [key: string]: Schema$GoogleCloudRetailV2alphaCustomAttribute; } | null; /** * Facet information for the suggestion term. Gives the number of items resulting from a search with this suggestion term for each facet. This is an experimental feature for limited customers. If you want to receive this facet information, reach out to the Retail support team. */ facets?: Schema$GoogleCloudRetailV2alphaSearchResponseFacet[]; /** * The suggestion for the query. */ suggestion?: string | null; /** * Total number of products associated with a search with this suggestion. This is an experimental feature for limited customers. If you want to receive this product count information, reach out to the Retail support team. */ totalProductCount?: number | null; } /** * Recent search of this user. */ export interface Schema$GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult { /** * The recent search query. */ recentSearch?: string | null; } /** * Catalog level autocomplete config for customers to customize autocomplete feature's settings. */ export interface Schema$GoogleCloudRetailV2alphaCompletionConfig { /** * Output only. The source data for the latest import of the autocomplete allowlist phrases. */ allowlistInputConfig?: Schema$GoogleCloudRetailV2alphaCompletionDataInputConfig; /** * If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest. */ autoLearning?: boolean | null; /** * Output only. The source data for the latest import of the autocomplete denylist phrases. */ denylistInputConfig?: Schema$GoogleCloudRetailV2alphaCompletionDataInputConfig; /** * Output only. Name of the LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation. */ lastAllowlistImportOperation?: string | null; /** * Output only. Name of the LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation. */ lastDenylistImportOperation?: string | null; /** * Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API method to retrieve the latest state of the Long Running Operation. */ lastSuggestionsImportOperation?: string | null; /** * Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest "women's shoes", whereas a query of 'red s' with 'exact-prefix' specified would suggest "red shoes". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'. */ matchingOrder?: string | null; /** * The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20. */ maxSuggestions?: number | null; /** * The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20. */ minPrefixLength?: number | null; /** * Required. Immutable. Fully qualified name `projects/x/locations/x/catalogs/x/completionConfig` */ name?: string | null; /** * Output only. The source data for the latest import of the autocomplete suggestion phrases. */ suggestionsInputConfig?: Schema$GoogleCloudRetailV2alphaCompletionDataInputConfig; } /** * The input config source for completion data. */ export interface Schema$GoogleCloudRetailV2alphaCompletionDataInputConfig { /** * Required. BigQuery input source. Add the IAM permission "BigQuery Data Viewer" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown. */ bigQuerySource?: Schema$GoogleCloudRetailV2alphaBigQuerySource; } /** * Detailed completion information including completion attribution token and clicked completion info. */ export interface Schema$GoogleCloudRetailV2alphaCompletionDetail { /** * Completion attribution token in CompleteQueryResponse.attribution_token. */ completionAttributionToken?: string | null; /** * End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0. */ selectedPosition?: number | null; /** * End user selected CompleteQueryResponse.CompletionResult.suggestion. */ selectedSuggestion?: string | null; } /** * Metadata that is used to define a condition that triggers an action. A valid condition must specify at least one of 'query_terms' or 'products_filter'. If multiple fields are specified, the condition is met if all the fields are satisfied e.g. if a set of query terms and product_filter are set, then only items matching the product_filter for requests with a query matching the query terms wil get boosted. */ export interface Schema$GoogleCloudRetailV2alphaCondition { /** * Range of time(s) specifying when Condition is active. Condition true if any time range matches. */ activeTimeRange?: Schema$GoogleCloudRetailV2alphaConditionTimeRange[]; /** * A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator). */ queryTerms?: Schema$GoogleCloudRetailV2alphaConditionQueryTerm[]; } /** * Query terms that we want to match on. */ export interface Schema$GoogleCloudRetailV2alphaConditionQueryTerm { /** * Whether this is supposed to be a full or partial match. */ fullMatch?: boolean | null; /** * The value of the term to match on. Value cannot be empty. Value can have at most 3 terms if specified as a partial match. Each space separated string is considered as one term. For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms and not allowed for a partial match. */ value?: string | null; } /** * Used for time-dependent conditions. Example: Want to have rule applied for week long sale. */ export interface Schema$GoogleCloudRetailV2alphaConditionTimeRange { /** * End of time range. Range is inclusive. */ endTime?: string | null; /** * Start of time range. Range is inclusive. */ startTime?: string | null; } /** * Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time. */ export interface Schema$GoogleCloudRetailV2alphaControl { /** * Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view. */ associatedServingConfigIds?: string[] | null; /** * Required. The human readable control display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown. */ displayName?: string | null; /** * A facet specification to perform faceted search. Note that this field is deprecated and will throw NOT_IMPLEMENTED if used for creating a control. */ facetSpec?: Schema$GoogleCloudRetailV2alphaSearchRequestFacetSpec; /** * Immutable. Fully qualified name `projects/x/locations/global/catalogs/x/controls/x` */ name?: string | null; /** * A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost "gShoe" when query full matches "Running Shoes". */ rule?: Schema$GoogleCloudRetailV2alphaRule; /** * Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control. */ searchSolutionUseCase?: string[] | null; /** * Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH. */ solutionTypes?: string[] | null; } /** * Common metadata related to the progress of the operations. */ export interface Schema$GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata { /** * Operation create time. */ createTime?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Metadata associated with a create operation. */ export interface Schema$GoogleCloudRetailV2alphaCreateModelMetadata { /** * The resource name of the model that this create applies to. Format: `projects/{project_number\}/locations/{location_id\}/catalogs/{catalog_id\}/models/{model_id\}` */ model?: string | null; } /** * A custom attribute that is not explicitly modeled in Product. */ export interface Schema$GoogleCloudRetailV2alphaCustomAttribute { /** * This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details. */ indexable?: boolean | null; /** * The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. */ numbers?: number[] | null; /** * This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned. */ searchable?: boolean | 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 text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned. */ text?: string[] | null; } /** * Metadata related to the EnrollSolution method. This will be returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2alphaEnrollSolutionMetadata { } /** * Request for EnrollSolution method. */ export interface Schema$GoogleCloudRetailV2alphaEnrollSolutionRequest { /** * Required. Solution to enroll. */ solution?: string | null; } /** * Response for EnrollSolution method. */ export interface Schema$GoogleCloudRetailV2alphaEnrollSolutionResponse { /** * Retail API solution that the project has enrolled. */ enrolledSolution?: string | null; } /** * Metadata for active A/B testing Experiment. */ export interface Schema$GoogleCloudRetailV2alphaExperimentInfo { /** * The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: `projects/x/locations/global/catalogs/default_catalog/experiments/experiment_id` */ experiment?: string | null; /** * A/B test between existing Cloud Retail Search ServingConfigs. */ servingConfigExperiment?: Schema$GoogleCloudRetailV2alphaExperimentInfoServingConfigExperiment; } /** * Metadata for active serving config A/B tests. */ export interface Schema$GoogleCloudRetailV2alphaExperimentInfoServingConfigExperiment { /** * The fully qualified resource name of the serving config VariantArm.serving_config_id responsible for generating the search response. For example: `projects/x/locations/x/catalogs/x/servingConfigs/x`. */ experimentServingConfig?: string | null; /** * The fully qualified resource name of the original SearchRequest.placement in the search request prior to reassignment by experiment API. For example: `projects/x/locations/x/catalogs/x/servingConfigs/x`. */ originalServingConfig?: string | null; } /** * Configuration of destination for Export related errors. */ export interface Schema$GoogleCloudRetailV2alphaExportErrorsConfig { /** * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. */ gcsPrefix?: string | null; } /** * Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field. */ export interface Schema$GoogleCloudRetailV2alphaExportMetadata { /** * Operation create time. */ createTime?: string | null; /** * Operation last update time. If the operation is done, this is also the finish time. */ updateTime?: string | null; } /** * Response of the ExportProductsRequest. 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$GoogleCloudRetailV2alphaExportProductsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * This field is never set. */ errorsConfig?: Schema$GoogleCloudRetailV2alphaExportErrorsConfig; /** * Output result indicating where the data were exported to. */ outputResult?: Schema$GoogleCloudRetailV2alphaOutputResult; } /** * Response of the ExportUserEventsRequest. 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$GoogleCloudRetailV2alphaExportUserEventsResponse { /** * A sample of errors encountered while processing the request. */ errorSamples?: Schema$GoogleRpcStatus[]; /** * This field is never set. */ errorsConfig?: Schema$GoogleCloudRetailV2alphaExportErrorsConfig; /** * Output result indicating where the data were exported to. */ outputResult?: Schema$GoogleCloudRetailV2alphaOutputResult; } /** * Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. */ export interface Schema$GoogleCloudRetailV2alphaFulfillmentInfo { /** * The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. */ placeIds?: string[] | null; /** * The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. */ type?: string | null; } /** * A Gcs output result. */ export interface Schema$GoogleCloudRetailV2alphaGcsOutputResult { /** * The uri of Gcs output */ outputUri?: string | null; } /** * Google Cloud Storage location for input content. */ export interface Schema$GoogleCloudRetailV2alphaGcsSource { /** * The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719. Supported values for control imports: * `control` (default): One JSON Control per line. Supported values for catalog attribute imports: * `catalog_attribute` (default): One CSV CatalogAttribute per line. */ dataSchema?: string | null; /** * Required. Google 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 requ