Skip to content

Commit ce02f17

Browse files
feat(retail): update the api
#### retail:v2alpha The following keys were deleted: - resources.projects.resources.locations.resources.catalogs.methods.completeQuery.parameters.banner (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaSearchRequest.properties.banner.type (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaUserEvent.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.GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult.properties.facets (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult.properties.totalProductCount (Total Keys: 2) - schemas.GoogleCloudRetailV2alphaSearchRequest.properties.entity.type (Total Keys: 1) - schemas.GoogleCloudRetailV2alphaUserEvent.properties.entity.type (Total Keys: 1) #### retail:v2beta The following keys were deleted: - resources.projects.resources.locations.resources.catalogs.methods.completeQuery.parameters.banner (Total Keys: 2) - schemas.GoogleCloudRetailV2betaSearchRequest.properties.banner.type (Total Keys: 1) - schemas.GoogleCloudRetailV2betaUserEvent.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.GoogleCloudRetailV2betaSearchRequest.properties.entity.type (Total Keys: 1) - schemas.GoogleCloudRetailV2betaUserEvent.properties.entity.type (Total Keys: 1)
1 parent 2ee67ed commit ce02f17

10 files changed

+87
-54
lines changed

docs/dyn/retail_v2alpha.projects.locations.catalogs.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ <h2>Instance Methods</h2>
128128
<code><a href="#close">close()</a></code></p>
129129
<p class="firstline">Close httplib2 connections.</p>
130130
<p class="toc_element">
131-
<code><a href="#completeQuery">completeQuery(catalog, banner=None, dataset=None, deviceType=None, enableAttributeSuggestions=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</a></code></p>
131+
<code><a href="#completeQuery">completeQuery(catalog, dataset=None, deviceType=None, enableAttributeSuggestions=None, entity=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</a></code></p>
132132
<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>
133133
<p class="toc_element">
134134
<code><a href="#getAttributesConfig">getAttributesConfig(name, x__xgafv=None)</a></code></p>
@@ -164,15 +164,15 @@ <h3>Method Details</h3>
164164
</div>
165165

166166
<div class="method">
167-
<code class="details" id="completeQuery">completeQuery(catalog, banner=None, dataset=None, deviceType=None, enableAttributeSuggestions=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</code>
167+
<code class="details" id="completeQuery">completeQuery(catalog, dataset=None, deviceType=None, enableAttributeSuggestions=None, entity=None, languageCodes=None, maxSuggestions=None, query=None, visitorId=None, x__xgafv=None)</code>
168168
<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.
169169

170170
Args:
171171
catalog: string, Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`. (required)
172-
banner: string, The banner context for completion suggestions.
173172
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).
174173
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`.
175174
enableAttributeSuggestions: boolean, If true, attribute suggestions are enabled and provided in response. This field is only available for &quot;cloud-retail&quot; dataset.
175+
entity: string, The entity for customers that may run multiple different entities, domains, sites or regions, for example, &quot;Google US&quot;, &quot;Google Ads&quot;, &quot;Waymo&quot;, &quot;google.com&quot;, &quot;youtube.com&quot;, etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.
176176
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)
177177
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.
178178
query: string, Required. The query used to generate suggestions. The maximum number of allowed characters is 255.
@@ -208,7 +208,28 @@ <h3>Method Details</h3>
208208
],
209209
},
210210
},
211+
&quot;facets&quot;: [ # 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. Please reach out to the support team if you would like to receive this information.
212+
{ # A facet result.
213+
&quot;dynamicFacet&quot;: True or False, # Whether the facet is dynamically generated.
214+
&quot;key&quot;: &quot;A String&quot;, # The key for this facet. E.g., &quot;colorFamilies&quot; or &quot;price&quot; or &quot;attributes.attr1&quot;.
215+
&quot;values&quot;: [ # The facet values for this field.
216+
{ # A facet value which contains value names and their count.
217+
&quot;count&quot;: &quot;A String&quot;, # Number of items that have this facet value.
218+
&quot;interval&quot;: { # A floating point interval. # Interval value for a facet, such as [10, 20) for facet &quot;price&quot;.
219+
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
220+
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
221+
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
222+
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
223+
},
224+
&quot;maxValue&quot;: 3.14, # The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.
225+
&quot;minValue&quot;: 3.14, # The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.
226+
&quot;value&quot;: &quot;A String&quot;, # Text value of a facet, such as &quot;Black&quot; for facet &quot;colorFamilies&quot;.
227+
},
228+
],
229+
},
230+
],
211231
&quot;suggestion&quot;: &quot;A String&quot;, # The suggestion for the query.
232+
&quot;totalProductCount&quot;: 42, # Total number of products associated with a search with this suggestion. This is an experimental feature for limited customers. Please reach out to the support team if you would like to receive this information.
212233
},
213234
],
214235
&quot;recentSearchResults&quot;: [ # Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. Contact Retail Search support team if you are interested in enabling it. 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.

docs/dyn/retail_v2alpha.projects.locations.catalogs.placements.html

Lines changed: 3 additions & 3 deletions
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, &quot;Google US&quot;, &quot;Google Ads&quot;, &quot;Waymo&quot;, &quot;google.com&quot;, &quot;youtube.com&quot;, 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, &quot;Google US&quot;, &quot;Google Ads&quot;, &quot;Waymo&quot;, &quot;google.com&quot;, &quot;youtube.com&quot;, 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.

0 commit comments

Comments
 (0)