google-cloud-retail-v2 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/retail/v2/catalog_pb.rb +0 -3
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
- data/lib/google/cloud/retail/v2/common_pb.rb +6 -4
- data/lib/google/cloud/retail/v2/completion_service/client.rb +18 -18
- data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
- data/lib/google/cloud/retail/v2/import_config_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +6 -3
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/product_service/client.rb +320 -18
- data/lib/google/cloud/retail/v2/product_service_pb.rb +27 -1
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +45 -7
- data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/search_service/client.rb +28 -15
- data/lib/google/cloud/retail/v2/search_service.rb +1 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -2
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
- data/lib/google/cloud/retail/v2/user_event_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +6 -4
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +9 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +88 -25
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +18 -15
- data/proto_docs/google/cloud/retail/v2/import_config.rb +29 -21
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +6 -3
- data/proto_docs/google/cloud/retail/v2/product.rb +48 -39
- data/proto_docs/google/cloud/retail/v2/product_service.rb +134 -2
- data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
- data/proto_docs/google/cloud/retail/v2/search_service.rb +69 -10
- data/proto_docs/google/cloud/retail/v2/user_event.rb +25 -12
- metadata +5 -3
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @!attribute [rw] placement
|
27
27
|
# @return [::String]
|
28
28
|
# Required. The resource name of the search engine placement, such as
|
29
|
-
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search
|
29
|
+
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
|
30
30
|
# This field is used to identify the serving configuration name and the set
|
31
31
|
# of models that will be used to make the search.
|
32
32
|
# @!attribute [rw] branch
|
@@ -46,6 +46,9 @@ module Google
|
|
46
46
|
# identify a visitor on a single device. This unique identifier should not
|
47
47
|
# change if the visitor logs in or out of the website.
|
48
48
|
#
|
49
|
+
# This should be the same identifier as
|
50
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id}.
|
51
|
+
#
|
49
52
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
50
53
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
51
54
|
# @!attribute [rw] user_info
|
@@ -89,6 +92,9 @@ module Google
|
|
89
92
|
# If this field is unrecognizable, an INVALID_ARGUMENT is returned.
|
90
93
|
# @!attribute [rw] canonical_filter
|
91
94
|
# @return [::String]
|
95
|
+
# The default filter that is applied when a user performs a search without
|
96
|
+
# checking any filters on the search page.
|
97
|
+
#
|
92
98
|
# The filter applied to every search request when quality improvement such as
|
93
99
|
# query expansion is needed. For example, if a query does not have enough
|
94
100
|
# results, an expanded query with
|
@@ -115,11 +121,11 @@ module Google
|
|
115
121
|
# is returned.
|
116
122
|
# @!attribute [rw] dynamic_facet_spec
|
117
123
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec]
|
124
|
+
# Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic
|
125
|
+
# to enable dynamic facets. Do not set this field.
|
126
|
+
#
|
118
127
|
# The specification for dynamically generated facets. Notice that only
|
119
128
|
# textual facets can be dynamically generated.
|
120
|
-
#
|
121
|
-
# This feature requires additional allowlisting. Contact Retail Search
|
122
|
-
# support team if you are interested in using dynamic facet feature.
|
123
129
|
# @!attribute [rw] boost_spec
|
124
130
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec]
|
125
131
|
# Boost specification to boost certain products. See more details at this
|
@@ -139,12 +145,15 @@ module Google
|
|
139
145
|
# @return [::Array<::String>]
|
140
146
|
# The keys to fetch and rollup the matching
|
141
147
|
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
142
|
-
# {::Google::Cloud::Retail::V2::Product Product}s attributes
|
143
|
-
#
|
144
|
-
# {::Google::Cloud::Retail::V2::
|
145
|
-
#
|
146
|
-
# {::Google::Cloud::Retail::V2::Product
|
147
|
-
#
|
148
|
+
# {::Google::Cloud::Retail::V2::Product Product}s attributes,
|
149
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo} or
|
150
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s attributes. The
|
151
|
+
# attributes from all the matching
|
152
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
153
|
+
# {::Google::Cloud::Retail::V2::Product Product}s or
|
154
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s are merged and
|
155
|
+
# de-duplicated. Notice that rollup attributes will lead to extra query
|
156
|
+
# latency. Maximum number of keys is 30.
|
148
157
|
#
|
149
158
|
# For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
|
150
159
|
# fulfillment type and a fulfillment ID must be provided in the format of
|
@@ -157,7 +166,11 @@ module Google
|
|
157
166
|
# * price
|
158
167
|
# * originalPrice
|
159
168
|
# * discount
|
169
|
+
# * variantId
|
160
170
|
# * inventory(place_id,price)
|
171
|
+
# * inventory(place_id,original_price)
|
172
|
+
# * inventory(place_id,attributes.key), where key is any key in the
|
173
|
+
# [Product.inventories.attributes][] map.
|
161
174
|
# * attributes.key, where key is any key in the
|
162
175
|
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
|
163
176
|
# * pickupInStore.id, where id is any
|
@@ -217,6 +230,9 @@ module Google
|
|
217
230
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::SearchMode]
|
218
231
|
# The search mode of the search request. If not specified, a single search
|
219
232
|
# request triggers both product search and faceted search.
|
233
|
+
# @!attribute [rw] personalization_spec
|
234
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
|
235
|
+
# The specification for personalization.
|
220
236
|
class SearchRequest
|
221
237
|
include ::Google::Protobuf::MessageExts
|
222
238
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -319,6 +335,7 @@ module Google
|
|
319
335
|
# * "customFulfillment3"
|
320
336
|
# * "customFulfillment4"
|
321
337
|
# * "customFulfillment5"
|
338
|
+
# * "inventory(place_id,attributes.key)"
|
322
339
|
#
|
323
340
|
# * numerical_field =
|
324
341
|
# * "price"
|
@@ -327,6 +344,8 @@ module Google
|
|
327
344
|
# * "ratingCount"
|
328
345
|
# * "attributes.key"
|
329
346
|
# * "inventory(place_id,price)"
|
347
|
+
# * "inventory(place_id,original_price)"
|
348
|
+
# * "inventory(place_id,attributes.key)"
|
330
349
|
# @!attribute [rw] intervals
|
331
350
|
# @return [::Array<::Google::Cloud::Retail::V2::Interval>]
|
332
351
|
# Set only if values should be bucketized into intervals. Must be set
|
@@ -452,6 +471,14 @@ module Google
|
|
452
471
|
# in the specifictions, boost scores from these specifications are all
|
453
472
|
# applied and combined in a non-linear way. Maximum number of
|
454
473
|
# specifications is 10.
|
474
|
+
# @!attribute [rw] skip_boost_spec_validation
|
475
|
+
# @return [::Boolean]
|
476
|
+
# Whether to skip boostspec validation. If this field is set to true,
|
477
|
+
# invalid
|
478
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs BoostSpec.condition_boost_specs}
|
479
|
+
# will be ignored and valid
|
480
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs BoostSpec.condition_boost_specs}
|
481
|
+
# will still be applied.
|
455
482
|
class BoostSpec
|
456
483
|
include ::Google::Protobuf::MessageExts
|
457
484
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -527,6 +554,29 @@ module Google
|
|
527
554
|
end
|
528
555
|
end
|
529
556
|
|
557
|
+
# The specification for personalization.
|
558
|
+
# @!attribute [rw] mode
|
559
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode]
|
560
|
+
# Defaults to
|
561
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
|
562
|
+
class PersonalizationSpec
|
563
|
+
include ::Google::Protobuf::MessageExts
|
564
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
565
|
+
|
566
|
+
# The personalization mode of each search request.
|
567
|
+
module Mode
|
568
|
+
# Default value. Defaults to
|
569
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
|
570
|
+
MODE_UNSPECIFIED = 0
|
571
|
+
|
572
|
+
# Let CRS decide whether to use personalization.
|
573
|
+
AUTO = 1
|
574
|
+
|
575
|
+
# Disable personalization.
|
576
|
+
DISABLED = 2
|
577
|
+
end
|
578
|
+
end
|
579
|
+
|
530
580
|
# The search mode of each search request.
|
531
581
|
module SearchMode
|
532
582
|
# Default value. In this case both product search and faceted search will
|
@@ -596,6 +646,15 @@ module Google
|
|
596
646
|
# {::Google::Cloud::Retail::V2::SearchResponse#redirect_uri redirect_uri} and
|
597
647
|
# {::Google::Cloud::Retail::V2::SearchResponse#attribution_token attribution_token}
|
598
648
|
# will be set in the response.
|
649
|
+
# @!attribute [rw] applied_controls
|
650
|
+
# @return [::Array<::String>]
|
651
|
+
# The fully qualified resource name of applied
|
652
|
+
# [controls](https://cloud.google.com/retail/docs/serving-control-rules).
|
653
|
+
# @!attribute [rw] invalid_condition_boost_specs
|
654
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>]
|
655
|
+
# The invalid
|
656
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs SearchRequest.BoostSpec.condition_boost_specs}
|
657
|
+
# that are not applied during serving.
|
599
658
|
class SearchResponse
|
600
659
|
include ::Google::Protobuf::MessageExts
|
601
660
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -30,7 +30,6 @@ module Google
|
|
30
30
|
# * `add-to-cart`: Products being added to cart.
|
31
31
|
# * `category-page-view`: Special pages such as sale or promotion pages
|
32
32
|
# viewed.
|
33
|
-
# * `completion`: Completion query result showed/clicked.
|
34
33
|
# * `detail-page-view`: Products detail page viewed.
|
35
34
|
# * `home-page-view`: Homepage viewed.
|
36
35
|
# * `promotion-offered`: Promotion is offered to a user.
|
@@ -108,6 +107,7 @@ module Google
|
|
108
107
|
# * `add-to-cart`
|
109
108
|
# * `detail-page-view`
|
110
109
|
# * `purchase-complete`
|
110
|
+
# * `search`
|
111
111
|
#
|
112
112
|
# In a `search` event, this field represents the products returned to the end
|
113
113
|
# user on the current page (the end user may have not finished browsing the
|
@@ -118,22 +118,35 @@ module Google
|
|
118
118
|
# desired. The end user may have not finished browsing the whole page yet.
|
119
119
|
# @!attribute [rw] completion_detail
|
120
120
|
# @return [::Google::Cloud::Retail::V2::CompletionDetail]
|
121
|
-
# The main completion details related to the event.
|
121
|
+
# The main auto-completion details related to the event.
|
122
122
|
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
# event, it represents the search event happens after clicking completion.
|
123
|
+
# This field should be set for `search` event when autocomplete function is
|
124
|
+
# enabled and the user clicks a suggestion for search.
|
126
125
|
# @!attribute [rw] attributes
|
127
126
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
|
128
127
|
# Extra user event features to include in the recommendation model.
|
129
128
|
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
129
|
+
# If you provide custom attributes for ingested user events, also include
|
130
|
+
# them in the user events that you associate with prediction requests. Custom
|
131
|
+
# attribute formatting must be consistent between imported events and events
|
132
|
+
# provided with prediction requests. This lets the Retail API use
|
133
|
+
# those custom attributes when training models and serving predictions, which
|
134
|
+
# helps improve recommendation quality.
|
135
|
+
#
|
136
|
+
# This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
|
137
|
+
# error is returned:
|
138
|
+
#
|
139
|
+
# * The key must be a UTF-8 encoded string with a length limit of 5,000
|
140
|
+
# characters.
|
141
|
+
# * For text attributes, at most 400 values are allowed. Empty values are not
|
142
|
+
# allowed. Each value must be a UTF-8 encoded string with a length limit of
|
143
|
+
# 256 characters.
|
144
|
+
# * For number attributes, at most 400 values are allowed.
|
145
|
+
#
|
146
|
+
# For product recommendations, an example of extra user information is
|
147
|
+
# traffic_channel, which is how a user arrives at the site. Users can arrive
|
148
|
+
# at the site by coming to the site directly, coming through Google
|
149
|
+
# search, or in other ways.
|
137
150
|
# @!attribute [rw] cart_id
|
138
151
|
# @return [::String]
|
139
152
|
# The ID or name of the associated shopping cart. This ID is used
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-retail-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- lib/google/cloud/retail/v2/product_service/paths.rb
|
203
203
|
- lib/google/cloud/retail/v2/product_service_pb.rb
|
204
204
|
- lib/google/cloud/retail/v2/product_service_services_pb.rb
|
205
|
+
- lib/google/cloud/retail/v2/promotion_pb.rb
|
205
206
|
- lib/google/cloud/retail/v2/purge_config_pb.rb
|
206
207
|
- lib/google/cloud/retail/v2/search_service.rb
|
207
208
|
- lib/google/cloud/retail/v2/search_service/client.rb
|
@@ -230,6 +231,7 @@ files:
|
|
230
231
|
- proto_docs/google/cloud/retail/v2/prediction_service.rb
|
231
232
|
- proto_docs/google/cloud/retail/v2/product.rb
|
232
233
|
- proto_docs/google/cloud/retail/v2/product_service.rb
|
234
|
+
- proto_docs/google/cloud/retail/v2/promotion.rb
|
233
235
|
- proto_docs/google/cloud/retail/v2/purge_config.rb
|
234
236
|
- proto_docs/google/cloud/retail/v2/search_service.rb
|
235
237
|
- proto_docs/google/cloud/retail/v2/user_event.rb
|
@@ -263,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
265
|
- !ruby/object:Gem::Version
|
264
266
|
version: '0'
|
265
267
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
268
|
+
rubygems_version: 3.3.5
|
267
269
|
signing_key:
|
268
270
|
specification_version: 4
|
269
271
|
summary: API Client library for the Retail V2 API
|