Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 88d2f46

Browse files
committedApr 18, 2023
feat(retail): update the api
#### retail:v2 The following keys were deleted: - resources.projects.resources.locations.resources.catalogs.methods.completeQuery.parameters.banner (Total Keys: 2) - schemas.GoogleCloudRetailV2ExperimentInfo.properties.experimentName.type (Total Keys: 1) - schemas.GoogleCloudRetailV2SearchRequest.properties.banner.type (Total Keys: 1) - schemas.GoogleCloudRetailV2UserEvent.properties.banner.type (Total Keys: 1) The following keys were added: - resources.projects.resources.locations.resources.catalogs.methods.completeQuery.parameters.entity (Total Keys: 2) - schemas.GoogleCloudRetailV2ExperimentInfo.properties.experiment.type (Total Keys: 1) - schemas.GoogleCloudRetailV2SearchRequest.properties.entity.type (Total Keys: 1) - schemas.GoogleCloudRetailV2UserEvent.properties.entity.type (Total Keys: 1) #### retail:v2alpha The following keys were deleted: - resources.projects.resources.locations.resources.catalogs.resources.branches.resources.products.methods.delete.parameters.cascadeDelete (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaExperimentInfo.properties.experimentName.type (Total Keys: 1) The following keys were added: - resources.projects.resources.locations.resources.catalogs.resources.branches.resources.products.methods.delete.parameters.force (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaExperimentInfo.properties.experiment.type (Total Keys: 1) #### retail:v2beta The following keys were deleted: - schemas.GoogleCloudRetailV2betaExperimentInfo.properties.experimentName.type (Total Keys: 1) The following keys were added: - schemas.GoogleCloudRetailV2betaExperimentInfo.properties.experiment.type (Total Keys: 1)
1 parent d659b03 commit 88d2f46

19 files changed

+114
-114
lines changed
 

‎docs/dyn/retail_v2.projects.locations.catalogs.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h2>Instance Methods</h2>
123123
<code><a href="#close">close()</a></code></p>
124124
<p class="firstline">Close httplib2 connections.</p>
125125
<p class="toc_element">
126-
<code><a href="#completeQuery">completeQuery(catalog, banner=None, dataset=None, deviceType=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</a></code></p>
126+
<code><a href="#completeQuery">completeQuery(catalog, dataset=None, deviceType=None, entity=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</a></code></p>
127127
<p class="firstline">Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.</p>
128128
<p class="toc_element">
129129
<code><a href="#getAttributesConfig">getAttributesConfig(name, x__xgafv=None)</a></code></p>
@@ -159,14 +159,14 @@ <h3>Method Details</h3>
159159
</div>
160160

161161
<div class="method">
162-
<code class="details" id="completeQuery">completeQuery(catalog, banner=None, dataset=None, deviceType=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</code>
162+
<code class="details" id="completeQuery">completeQuery(catalog, dataset=None, deviceType=None, entity=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</code>
163163
<pre>Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.
164164

165165
Args:
166166
catalog: string, Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
167-
banner: string, The banner context for completion suggestions.
168167
dataset: string, Determines which dataset to use for fetching completion. &quot;user-data&quot; will use the imported dataset through CompletionService.ImportCompletionData. &quot;cloud-retail&quot; will use the dataset generated by cloud retail based on user events. If leave empty, it will use the &quot;user-data&quot;. Current supported values: * user-data * cloud-retail: This option requires enabling auto-learning function first. See [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
169168
deviceType: string, The device type context for completion suggestions. We recommend that you leave this field empty. It can apply different suggestions on different device types, e.g. `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device types. Supported formats: * `UNKNOWN_DEVICE_TYPE` * `DESKTOP` * `MOBILE` * A customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`.
169+
entity: string, The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.
170170
languageCodes: string, Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3. (repeated)
171171
maxSuggestions: integer, Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.
172172
query: string, Required. The query used to generate suggestions. The maximum number of allowed characters is 255.

‎docs/dyn/retail_v2.projects.locations.catalogs.placements.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ <h3>Method Details</h3>
125125
},
126126
},
127127
&quot;attributionToken&quot;: &quot;A String&quot;, # Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K&#x27;s page. When recording events on product K&#x27;s page, log the PredictResponse.attribution_token to this field.
128-
&quot;banner&quot;: &quot;A String&quot;, # Represents the banner of the user event, for projects that combine banners. For example: retailer can have events from multiple banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.
129128
&quot;cartId&quot;: &quot;A String&quot;, # The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.
130129
&quot;completionDetail&quot;: { # Detailed completion information including completion attribution token and clicked completion info. # The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
131130
&quot;completionAttributionToken&quot;: &quot;A String&quot;, # Completion attribution token in CompleteQueryResponse.attribution_token.
132131
&quot;selectedPosition&quot;: 42, # End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.
133132
&quot;selectedSuggestion&quot;: &quot;A String&quot;, # End user selected CompleteQueryResponse.CompletionResult.suggestion.
134133
},
134+
&quot;entity&quot;: &quot;A String&quot;, # The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. It is recommended to set this field to get better per-entity search, completion and prediction results.
135135
&quot;eventTime&quot;: &quot;A String&quot;, # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.
136136
&quot;eventType&quot;: &quot;A String&quot;, # Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
137137
&quot;experimentIds&quot;: [ # A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
@@ -370,7 +370,6 @@ <h3>Method Details</h3>
370370
The object takes the form of:
371371

372372
{ # Request message for SearchService.Search method.
373-
&quot;banner&quot;: &quot;A String&quot;, # Represents the banner in request, for projects that combine banners. For example: a retailer can sell products under different banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.
374373
&quot;boostSpec&quot;: { # Boost specification to boost certain items. # Boost specification to boost certain products. See more details at this [user guide](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions.
375374
&quot;conditionBoostSpecs&quot;: [ # Condition boost specifications. If a product matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
376375
{ # Boost applies to products which match a condition.
@@ -385,7 +384,8 @@ <h3>Method Details</h3>
385384
&quot;dynamicFacetSpec&quot;: { # The specifications of dynamically generated facets. # Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated.
386385
&quot;mode&quot;: &quot;A String&quot;, # Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it&#x27;s unset.
387386
},
388-
&quot;facetSpecs&quot;: [ # Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.
387+
&quot;entity&quot;: &quot;A String&quot;, # The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.
388+
&quot;facetSpecs&quot;: [ # Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.
389389
{ # A facet specification to perform faceted search.
390390
&quot;enableDynamicPosition&quot;: True or False, # Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined by Google Retail Search. It will be ordered together with dynamic facets if dynamic facets is enabled. If set to false, the position of this facet in the response will be the same as in the request, and it will be ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it&#x27;s not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response will be determined by Google Retail Search. Another example, assuming you have the following facets in the request: * &quot;rating&quot;, enable_dynamic_position = true * &quot;price&quot;, enable_dynamic_position = false * &quot;brands&quot;, enable_dynamic_position = false And also you have a dynamic facets enable, which will generate a facet &#x27;gender&#x27;. Then the final order of the facets in the response can be (&quot;price&quot;, &quot;brands&quot;, &quot;rating&quot;, &quot;gender&quot;) or (&quot;price&quot;, &quot;brands&quot;, &quot;gender&quot;, &quot;rating&quot;) depends on how Google Retail Search orders &quot;gender&quot; and &quot;rating&quot; facets. However, notice that &quot;price&quot; and &quot;brands&quot; will always be ranked at 1st and 2nd position since their enable_dynamic_position are false.
391391
&quot;excludedFilterKeys&quot;: [ # List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 products with the color facet &quot;Red&quot; and 200 products with the color facet &quot;Blue&quot;. A query containing the filter &quot;colorFamilies:ANY(&quot;Red&quot;)&quot; and having &quot;colorFamilies&quot; as FacetKey.key would by default return only &quot;Red&quot; products in the search results, and also return &quot;Red&quot; with count 100 as the only color facet. Although there are also blue products available, &quot;Blue&quot; would not be shown as an available facet value. If &quot;colorFamilies&quot; is listed in &quot;excludedFilterKeys&quot;, then the query returns the facet values &quot;Red&quot; with count 100 and &quot;Blue&quot; with count 200, because the &quot;colorFamilies&quot; key is now excluded from the filter. Because this field doesn&#x27;t affect search results, the search results are still correctly filtered to return only &quot;Red&quot; products. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -396,7 +396,7 @@ <h3>Method Details</h3>
396396
&quot;contains&quot;: [ # Only get facet values that contains the given strings. For example, suppose &quot;categories&quot; has three values &quot;Women &gt; Shoe&quot;, &quot;Women &gt; Dress&quot; and &quot;Men &gt; Shoe&quot;. If set &quot;contains&quot; to &quot;Shoe&quot;, the &quot;categories&quot; facet will give only &quot;Women &gt; Shoe&quot; and &quot;Men &gt; Shoe&quot;. Only supported on textual fields. Maximum is 10.
397397
&quot;A String&quot;,
398398
],
399-
&quot;intervals&quot;: [ # For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles will become the bounds for its intervals and will be returned in the response. If the facet key intervals are specified in the request, then the specified intervals will be returned instead.
399+
&quot;intervals&quot;: [ # Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles will become the bounds for its intervals and will be returned in the response. If the facet key intervals are specified in the request, then the specified intervals will be returned instead.
400400
{ # A floating point interval.
401401
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
402402
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
@@ -424,7 +424,7 @@ <h3>Method Details</h3>
424424
},
425425
&quot;offset&quot;: 42, # A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Products deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an INVALID_ARGUMENT is returned.
426426
&quot;orderBy&quot;: &quot;A String&quot;, # The order in which products are returned. Products can be ordered by a field in an Product object. Leave it unset if ordered by relevance. OrderBy expression is case-sensitive. See more details at this [user guide](https://cloud.google.com/retail/docs/filter-and-order#order). If this field is unrecognizable, an INVALID_ARGUMENT is returned.
427-
&quot;pageCategories&quot;: [ # The categories associated with a category page. Required for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, 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: &quot;pageCategories&quot; : [&quot;Sales &gt; 2017 Black Friday Deals&quot;].
427+
&quot;pageCategories&quot;: [ # The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, 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: &quot;pageCategories&quot; : [&quot;Sales &gt; 2017 Black Friday Deals&quot;].
428428
&quot;A String&quot;,
429429
],
430430
&quot;pageSize&quot;: 42, # Maximum number of Products to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 120. Values above 120 will be coerced to 120. If this field is negative, an INVALID_ARGUMENT is returned.
@@ -469,7 +469,7 @@ <h3>Method Details</h3>
469469
&quot;correctedQuery&quot;: &quot;A String&quot;, # Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.
470470
&quot;experimentInfo&quot;: [ # Metadata related to A/B testing Experiment associated with this response. Only exists when an experiment is triggered.
471471
{ # Metadata for active A/B testing Experiments.
472-
&quot;experimentName&quot;: &quot;A String&quot;, # The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`
472+
&quot;experiment&quot;: &quot;A String&quot;, # The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`
473473
&quot;servingConfigExperiment&quot;: { # Metadata for active serving config A/B tests. # A/B test between existing Cloud Retail Search ServingConfigs.
474474
&quot;experimentServingConfig&quot;: &quot;A String&quot;, # The fully qualified resource name of the serving config VariantArm.serving_config_id responsible for generating the search response. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.
475475
&quot;originalServingConfig&quot;: &quot;A String&quot;, # The fully qualified resource name of the original SearchRequest.placement in the search request prior to reassignment by experiment API. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.

0 commit comments

Comments
 (0)
Please sign in to comment.