googleapis
Version:
Google APIs Client Library for Node.js
815 lines • 732 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 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;
}
/**
* Vertex AI Search for commerce API
*
* Vertex AI Search for commerce API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.
*
* @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 {
}
/**
* Project level alert config.
*/
export interface Schema$GoogleCloudRetailV2alphaAlertConfig {
/**
* Alert policies for a customer. They must be unique by [AlertPolicy.alert_group]
*/
alertPolicies?: Schema$GoogleCloudRetailV2alphaAlertConfigAlertPolicy[];
/**
* Required. Immutable. The name of the AlertConfig singleton resource. Format: projects/x/alertConfig
*/
name?: string | null;
}
/**
* Alert policy for a customer.
*/
export interface Schema$GoogleCloudRetailV2alphaAlertConfigAlertPolicy {
/**
* The feature that provides alerting capability. Supported value: - `search-data-quality` for retail search customers. - `conv-data-quality` for retail conversation customers.
*/
alertGroup?: string | null;
/**
* The enrollment status of a customer.
*/
enrollStatus?: string | null;
/**
* Recipients for the alert policy. One alert policy should not exceed 20 recipients.
*/
recipients?: Schema$GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient[];
}
/**
* Recipient contact information.
*/
export interface Schema$GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient {
/**
* Email address of the recipient.
*/
emailAddress?: string | null;
}
/**
* 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;
}
/**
* Request for BatchUpdateGenerativeQuestionConfig method.
*/
export interface Schema$GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsRequest {
/**
* Required. The updates question configs.
*/
requests?: Schema$GoogleCloudRetailV2alphaUpdateGenerativeQuestionConfigRequest[];
}
/**
* Aggregated response for UpdateGenerativeQuestionConfig method.
*/
export interface Schema$GoogleCloudRetailV2alphaBatchUpdateGenerativeQuestionConfigsResponse {
/**
* Optional. The updates question configs.
*/
generativeQuestionConfigs?: Schema$GoogleCloudRetailV2alphaGenerativeQuestionConfig[];
}
/**
* 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.
*/
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;
}
/**
* A data branch that stores all instances of Products.
*/
export interface Schema$GoogleCloudRetailV2alphaBranch {
/**
* Output only. Human readable name of the branch to display in the UI.
*/
displayName?: string | null;
/**
* Output only. Indicates whether this branch is set as the default branch of its parent catalog.
*/
isDefault?: boolean | null;
/**
* Output only. Timestamp of last import through ProductService.ImportProducts. Empty value means no import has been made to this branch.
*/
lastProductImportTime?: string | null;
/**
* Immutable. Full resource name of the branch, such as `projects/x/locations/global/catalogs/default_catalog/branches/branch_id`.
*/
name?: string | null;
/**
* Output only. Statistics for number of products in the branch, provided for different scopes. This field is not populated in BranchView.BRANCH_VIEW_BASIC view.
*/
productCountStats?: Schema$GoogleCloudRetailV2alphaBranchProductCountStatistic[];
/**
* Output only. The quality metrics measured among products of this branch. See QualityMetric.requirement_key for supported metrics. Metrics could be missing if failed to retrieve. This field is not populated in BranchView.BRANCH_VIEW_BASIC view.
*/
qualityMetrics?: Schema$GoogleCloudRetailV2alphaBranchQualityMetric[];
}
/**
* A statistic about the number of products in a branch.
*/
export interface Schema$GoogleCloudRetailV2alphaBranchProductCountStatistic {
/**
* The number of products in scope broken down into different groups. The key is a group representing a set of products, and the value is the number of products in that group. Note: keys in this map may change over time. Possible keys: * "primary-in-stock", products have Product.Type.PRIMARY type and Product.Availability.IN_STOCK availability. * "primary-out-of-stock", products have Product.Type.PRIMARY type and Product.Availability.OUT_OF_STOCK availability. * "primary-preorder", products have Product.Type.PRIMARY type and Product.Availability.PREORDER availability. * "primary-backorder", products have Product.Type.PRIMARY type and Product.Availability.BACKORDER availability. * "variant-in-stock", products have Product.Type.VARIANT type and Product.Availability.IN_STOCK availability. * "variant-out-of-stock", products have Product.Type.VARIANT type and Product.Availability.OUT_OF_STOCK availability. * "variant-preorder", products have Product.Type.VARIANT type and Product.Availability.PREORDER availability. * "variant-backorder", products have Product.Type.VARIANT type and Product.Availability.BACKORDER availability. * "price-discounted", products have [Product.price_info.price] < [Product.price_info.original_price].
*/
counts?: {
[key: string]: string;
} | null;
/**
* [ProductCountScope] of the [counts].
*/
scope?: string | null;
}
/**
* Metric measured on a group of Products against a certain quality requirement. Contains the number of products that pass the check and the number of products that don't.
*/
export interface Schema$GoogleCloudRetailV2alphaBranchQualityMetric {
/**
* Number of products passing the quality requirement check. We only check searchable products.
*/
qualifiedProductCount?: number | null;
/**
* The key that represents a quality requirement rule. Supported keys: * "has-valid-uri": product has a valid and accessible uri. * "available-expire-time-conformance": Product.available_time is early than "now", and Product.expire_time is greater than "now". * "has-searchable-attributes": product has at least one attribute set to searchable. * "has-description": product has non-empty description. * "has-at-least-bigram-title": Product title has at least two words. A comprehensive title helps to improve search quality. * "variant-has-image": the variant products has at least one image. You may ignore this metric if all your products are at primary level. * "variant-has-price-info": the variant products has price_info set. You may ignore this metric if all your products are at primary level. * "has-publish-time": product has non-empty publish_time.
*/
requirementKey?: string | null;
/**
* Value from 0 to 100 representing the suggested percentage of products that meet the quality requirements to get good search and recommendation performance. 100 * (qualified_product_count) / (qualified_product_count + unqualified_product_count) should be greater or equal to this suggestion.
*/
suggestedQualityPercentThreshold?: number | null;
/**
* Number of products failing the quality requirement check. We only check searchable products.
*/
unqualifiedProductCount?: number | null;
/**
* A list of a maximum of 100 sample products that do not qualify for this requirement. This field is only populated in the response to BranchService.GetBranch API, and is always empty for BranchService.ListBranches. Only the following fields are set in the Product. * Product.name * Product.id * Product.title
*/
unqualifiedSampleProducts?: Schema$GoogleCloudRetailV2alphaProduct[];
}
/**
* 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;
/**
* Contains facet options.
*/
facetConfig?: Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfig;
/**
* 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 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;
}
/**
* Possible options for the facet that corresponds to the current attribute config.
*/
export interface Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfig {
/**
* If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.
*/
facetIntervals?: Schema$GoogleCloudRetailV2alphaInterval[];
/**
* Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.
*/
ignoredFacetValues?: Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues[];
/**
* Use this field only if you want to merge a facet key into another facet key.
*/
mergedFacet?: Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacet;
/**
* Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.
*/
mergedFacetValues?: Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue[];
/**
* Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.
*/
rerankConfig?: Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigRerankConfig;
}
/**
* Facet values to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.
*/
export interface Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues {
/**
* If start time is empty and end time is not empty, then ignore these facet values before end time.
*/
endTime?: string | null;
/**
* Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time.
*/
startTime?: string | null;
/**
* List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 128 characters.
*/
values?: string[] | null;
}
/**
* The current facet key (i.e. attribute config) maps into the merged_facet_key. A facet key can have at most one child. The current facet key and the merged facet key need both to be textual custom attributes or both numerical custom attributes (same type).
*/
export interface Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacet {
/**
* The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute.
*/
mergedFacetKey?: string | null;
}
/**
* Replaces a set of textual facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute. This feature is available only for textual custom attributes.
*/
export interface Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue {
/**
* All the previous values are replaced by this merged facet value. This merged_value must be non-empty and can have up to 128 characters.
*/
mergedValue?: string | null;
/**
* All the facet values that are replaces by the same merged_value that follows. The maximum number of values per MergedFacetValue is 25. Each value can have up to 128 characters.
*/
values?: string[] | null;
}
/**
* Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable. To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).
*/
export interface Schema$GoogleCloudRetailV2alphaCatalogAttributeFacetConfigRerankConfig {
/**
* If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only.
*/
facetValues?: string[] | null;
/**
* If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.
*/
rerankFacet?: boolean | null;
}
/**
* Request message for CollectUserEvent method.
*/
export interface Schema$GoogleCloudRetailV2alphaCollectUserEventRequest {
/**
* The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
*/
ets?: string | null;
/**
* The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule for the GA4 user event schema.
*/
prebuiltRule?: string | null;
/**
* An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.
*/
rawJson?: string | null;
/**
* The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.
*/
uri?: string | null;
/**
* Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
*/
userEvent?: 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). The colorFamilies field as a system attribute is not a required field but strongly recommended to be specified. Google Search models treat this field as more important than a custom product attribute when specified.
*/
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;
}
/**
* Deprecated: 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;
/**
* Outpu