Skip to content

Commit f5cbc58

Browse files
gcf-owl-bot[bot]sofislfeywind
authored
feat: [retail] add methods from gax to cache proto root and process custom error details (#6286)
* feat: add availability field to Localnventory feat: add new fields including language_code, region_code and place_id to SearchRequest. feat: add pin_control_metadata to SearchResponse. fix!: An existing message `LlmEmbeddingConfig` is removed. fix!: An existing field `llm_embedding_config` is removed from message `.google.cloud.retail.v2alpha.Model` docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 750240703 Source-Link: googleapis/googleapis@1422653 Source-Link: googleapis/googleapis-gen@b6760bc Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiYjY3NjBiY2RhNWYzM2U0ZTI3ZTZlNmE2OGQ5ZTgzZjcwOGI3NTE2YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: upgrade typescript generator to 4.9.0 chore: updated gapic-generator-typescript WORKSPACE section to match the latest from the generator chore: added Required Typecheck Performance Selection section to .bazelrc feat: add protobufjs 2023 edition support feat: selective gapic support for typescript generation fix: catch dangling promises PiperOrigin-RevId: 751558264 Source-Link: googleapis/googleapis@f132131 Source-Link: googleapis/googleapis-gen@7aaa93d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiN2FhYTkzZDlkNGJiZDBjODdhZGMxOGI0ZGMwMzg0Yjc4MzgwMGEzYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add language_code, region_code and place_id to SearchRequest feat: add pin_control_metadata to SearchResponse docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 751590638 Source-Link: googleapis/googleapis@7b29e66 Source-Link: googleapis/googleapis-gen@a7be28d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiYTdiZTI4ZGNhOWNiMGQwNmE0ZGM5MDA1NmRjM2NhYWI3MzRhODI3NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add conversational search API PiperOrigin-RevId: 751643959 Source-Link: googleapis/googleapis@2eec62d Source-Link: googleapis/googleapis-gen@dc04c51 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiZGMwNGM1MWFlMTA4NTg3MmY0Njk0ODc2OGQzYzIxMTcyZjQ4YWYwMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add language_code, region_code and place_id to SearchRequest feat: add pin_control_metadata to SearchResponse docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 752323436 Source-Link: googleapis/googleapis@1ac7dc2 Source-Link: googleapis/googleapis-gen@117bcc0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiMTE3YmNjMGQyZGE5YzEzZmQwN2U2MzA1MTE1YTY4NzliZmE5ODZmZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add a user_attributes field in SearchRequest that can be used for personalization feat: add a model_scores field in SearchResponse.results to expose model quality signals feat: data_source_id replaces primary_feed_id in MerchantCenterFeedFilter PiperOrigin-RevId: 763884353 Source-Link: googleapis/googleapis@6d09280 Source-Link: googleapis/googleapis-gen@6190015 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiNjE5MDAxNTkwMzI0ODhmYzMwOWJmNzQxYTdiZTFkY2Q2YTI0NzM4MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add methods from gax to cache proto root and process custom error details fix: distinguish plural and singular path templates PiperOrigin-RevId: 772168312 Source-Link: googleapis/googleapis@873d84e Source-Link: googleapis/googleapis-gen@f448c1b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiZjQ0OGMxYjRlYWFhNWZkYzcwMjFhNjgyMDY4YzMxM2Q2ZjJmMTA0YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update package.json * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: sofisl <[email protected]> Co-authored-by: Megan Potter <[email protected]>
1 parent 6ffb9e8 commit f5cbc58

147 files changed

Lines changed: 22820 additions & 4260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-retail/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4444
1. [Select or create a Cloud Platform project][projects].
4545
1. [Enable billing for your project][billing].
4646
1. [Enable the Retail API API][enable_api].
47-
1. [Set up authentication with a service account][auth] so you can access the
47+
1. [Set up authentication][auth] so you can access the
4848
API from your local workstation.
4949

5050
### Installing the client library
@@ -166,6 +166,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
166166
| Control_service.get_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.get_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.get_control.js,packages/google-cloud-retail/samples/README.md) |
167167
| Control_service.list_controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.list_controls.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.list_controls.js,packages/google-cloud-retail/samples/README.md) |
168168
| Control_service.update_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.update_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.update_control.js,packages/google-cloud-retail/samples/README.md) |
169+
| Conversational_search_service.conversational_search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/conversational_search_service.conversational_search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/conversational_search_service.conversational_search.js,packages/google-cloud-retail/samples/README.md) |
169170
| Generative_question_service.batch_update_generative_question_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/generative_question_service.batch_update_generative_question_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/generative_question_service.batch_update_generative_question_configs.js,packages/google-cloud-retail/samples/README.md) |
170171
| Generative_question_service.get_generative_questions_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/generative_question_service.get_generative_questions_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/generative_question_service.get_generative_questions_feature_config.js,packages/google-cloud-retail/samples/README.md) |
171172
| Generative_question_service.list_generative_question_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/generative_question_service.list_generative_question_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/generative_question_service.list_generative_question_configs.js,packages/google-cloud-retail/samples/README.md) |
@@ -351,4 +352,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
351352
[projects]: https://console.cloud.google.com/project
352353
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
353354
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=retail.googleapis.com
354-
[auth]: https://cloud.google.com/docs/authentication/getting-started
355+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-cloud-retail/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"test": "c8 mocha build/test"
4949
},
5050
"dependencies": {
51-
"google-gax": "^5.0.1-rc.0"
51+
"google-gax": "^5.0.0"
5252
},
5353
"devDependencies": {
5454
"@types/mocha": "^10.0.10",

packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ message CatalogAttribute {
301301
//
302302
// [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] can be
303303
// pre-loaded by using
304-
// [CatalogService.AddCatalogAttribute][google.cloud.retail.v2.CatalogService.AddCatalogAttribute],
305-
// [CatalogService.ImportCatalogAttributes][], or
304+
// [CatalogService.AddCatalogAttribute][google.cloud.retail.v2.CatalogService.AddCatalogAttribute]
305+
// or
306306
// [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
307307
// APIs. This field is `False` for pre-loaded
308308
// [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s.

packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog_service.proto

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -59,38 +59,39 @@ service CatalogService {
5959
}
6060

6161
// Set a specified branch id as default branch. API methods such as
62-
// [SearchService.Search][google.cloud.retail.v2.SearchService.Search],
63-
// [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct],
64-
// [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]
65-
// will treat requests using "default_branch" to the actual branch id set as
66-
// default.
62+
// [SearchService.Search][google.cloud.retail.v2.SearchService.Search],
63+
// [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct],
64+
// [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]
65+
// will treat requests using "default_branch" to the actual branch id set as
66+
// default.
6767
//
68-
// For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as
69-
// default, setting
70-
// [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
71-
// `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent
72-
// to setting
73-
// [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
74-
// `projects/*/locations/*/catalogs/*/branches/1`.
68+
// For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as
69+
// default, setting
70+
// [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
71+
// `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent
72+
// to setting
73+
// [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
74+
// `projects/*/locations/*/catalogs/*/branches/1`.
7575
//
76-
// Using multiple branches can be useful when developers would like
77-
// to have a staging branch to test and verify for future usage. When it
78-
// becomes ready, developers switch on the staging branch using this API while
79-
// keeping using `projects/*/locations/*/catalogs/*/branches/default_branch`
80-
// as [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
81-
// route the traffic to this staging branch.
76+
// Using multiple branches can be useful when developers would like
77+
// to have a staging branch to test and verify for future usage. When it
78+
// becomes ready, developers switch on the staging branch using this API
79+
// while keeping using
80+
// `projects/*/locations/*/catalogs/*/branches/default_branch` as
81+
// [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to
82+
// route the traffic to this staging branch.
8283
//
83-
// CAUTION: If you have live predict/search traffic, switching the default
84-
// branch could potentially cause outages if the ID space of the new branch is
85-
// very different from the old one.
84+
// CAUTION: If you have live predict/search traffic, switching the default
85+
// branch could potentially cause outages if the ID space of the new branch
86+
// is very different from the old one.
8687
//
87-
// More specifically:
88+
// More specifically:
8889
//
89-
// * PredictionService will only return product IDs from branch {newBranch}.
90-
// * SearchService will only return product IDs from branch {newBranch}
91-
// (if branch is not explicitly set).
92-
// * UserEventService will only join events with products from branch
93-
// {newBranch}.
90+
// * PredictionService will only return product IDs from branch {newBranch}.
91+
// * SearchService will only return product IDs from branch {newBranch}
92+
// (if branch is not explicitly set).
93+
// * UserEventService will only join events with products from branch
94+
// {newBranch}.
9495
rpc SetDefaultBranch(SetDefaultBranchRequest)
9596
returns (google.protobuf.Empty) {
9697
option (google.api.http) = {
@@ -101,8 +102,8 @@ service CatalogService {
101102
}
102103

103104
// Get which branch is currently default branch set by
104-
// [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
105-
// method under a specified parent catalog.
105+
// [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
106+
// method under a specified parent catalog.
106107
rpc GetDefaultBranch(GetDefaultBranchRequest)
107108
returns (GetDefaultBranchResponse) {
108109
option (google.api.http) = {

packages/google-cloud-retail/protos/google/cloud/retail/v2/common.proto

Lines changed: 86 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ enum AttributeConfigLevel {
3939
PRODUCT_LEVEL_ATTRIBUTE_CONFIG = 1;
4040

4141
// At this level, we honor the attribute configurations set in
42-
// [CatalogConfig.attribute_configs][].
42+
// `CatalogConfig.attribute_configs`.
4343
CATALOG_LEVEL_ATTRIBUTE_CONFIG = 2;
4444
}
4545

@@ -367,6 +367,48 @@ message Rule {
367367
repeated string attribute_names = 1;
368368
}
369369

370+
// Pins one or more specified products to a specific position in the
371+
// results.
372+
//
373+
// * Rule Condition:
374+
// Must specify non-empty
375+
// [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms]
376+
// (for search only) or
377+
// [Condition.page_categories][google.cloud.retail.v2.Condition.page_categories]
378+
// (for browse only), but can't specify both.
379+
//
380+
// * Action Input: mapping of `[pin_position, product_id]` pairs (pin position
381+
// uses 1-based indexing).
382+
//
383+
// * Action Result: Will pin products with matching ids to the position
384+
// specified in the final result order.
385+
//
386+
// Example: Suppose the query is `shoes`, the
387+
// [Condition.query_terms][google.cloud.retail.v2.Condition.query_terms] is
388+
// `shoes` and the pin_map has `{1, "pid1"}`, then product with `pid1` will be
389+
// pinned to the top position in the final results.
390+
//
391+
// If multiple PinActions are matched to a single request the actions will
392+
// be processed from most to least recently updated.
393+
//
394+
// Pins to positions larger than the max allowed page size of 120 are not
395+
// allowed.
396+
message PinAction {
397+
// Required. A map of positions to product_ids.
398+
//
399+
// Partial matches per action are allowed, if a certain position in the map
400+
// is already filled that `[position, product_id]` pair will be ignored
401+
// but the rest may still be applied. This case will only occur if multiple
402+
// pin actions are matched to a single request, as the map guarantees that
403+
// pin positions are unique within the same action.
404+
//
405+
// Duplicate product_ids are not permitted within a single pin map.
406+
//
407+
// The max size of this map is 120, equivalent to the max [request page
408+
// size](https://cloud.google.com/retail/docs/reference/rest/v2/projects.locations.catalogs.placements/search#request-body).
409+
map<int64, string> pin_map = 1 [(google.api.field_behavior) = REQUIRED];
410+
}
411+
370412
// An action must be provided.
371413
oneof action {
372414
// A boost action.
@@ -399,6 +441,10 @@ message Rule {
399441

400442
// Remove an attribute as a facet in the request (if present).
401443
RemoveFacetAction remove_facet_action = 13;
444+
445+
// Pins one or more specified products to a specific position in the
446+
// results.
447+
PinAction pin_action = 14;
402448
}
403449

404450
// Required. The condition that triggers the rule.
@@ -443,9 +489,9 @@ message Audience {
443489
message ColorInfo {
444490
// The standard color families. Strongly recommended to use the following
445491
// standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
446-
// "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and
447-
// "Mixed". Normally it is expected to have only 1 color family. May consider
448-
// using single "Mixed" instead of multiple values.
492+
// "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed".
493+
// Normally it is expected to have only 1 color family. May consider using
494+
// single "Mixed" instead of multiple values.
449495
//
450496
// A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
451497
// string with a length limit of 128 characters. Otherwise, an
@@ -454,6 +500,10 @@ message ColorInfo {
454500
// Google Merchant Center property
455501
// [color](https://support.google.com/merchants/answer/6324487). Schema.org
456502
// property [Product.color](https://schema.org/color).
503+
//
504+
// The colorFamilies field as a system attribute is not a required field but
505+
// strongly recommended to be specified. Google Search models treat this field
506+
// as more important than a custom product attribute when specified.
457507
repeated string color_families = 1;
458508

459509
// The color display names, which may be different from standard color family
@@ -565,9 +615,10 @@ message FulfillmentInfo {
565615
}
566616

567617
// [Product][google.cloud.retail.v2.Product] image. Recommendations AI and
568-
// Retail Search do not use product images to improve prediction and search
569-
// results. However, product images can be returned in results, and are shown in
570-
// prediction or search previews in the console.
618+
// Retail Search use product images to improve prediction and search results.
619+
// Product images can be returned in results, and are shown in prediction or
620+
// search previews in the console. Please try to provide correct product images
621+
// and avoid using images with size too small.
571622
message Image {
572623
// Required. URI of the image.
573624
//
@@ -782,9 +833,7 @@ message UserInfo {
782833
// is set.
783834
string ip_address = 2;
784835

785-
// User agent as included in the HTTP header. Required for getting
786-
// [SearchResponse.sponsored_results][google.cloud.retail.v2.SearchResponse.sponsored_results].
787-
//
836+
// User agent as included in the HTTP header.
788837
// The field must be a UTF-8 encoded string with a length limit of 1,000
789838
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
790839
//
@@ -811,17 +860,17 @@ message UserInfo {
811860
// The inventory information at a place (e.g. a store) identified
812861
// by a place ID.
813862
message LocalInventory {
814-
// The place ID for the current set of inventory information.
815-
string place_id = 1;
863+
// Optional. The place ID for the current set of inventory information.
864+
string place_id = 1 [(google.api.field_behavior) = OPTIONAL];
816865

817-
// Product price and cost information.
866+
// Optional. Product price and cost information.
818867
//
819868
// Google Merchant Center property
820869
// [price](https://support.google.com/merchants/answer/6324371).
821-
PriceInfo price_info = 2;
870+
PriceInfo price_info = 2 [(google.api.field_behavior) = OPTIONAL];
822871

823-
// Additional local inventory attributes, for example, store name, promotion
824-
// tags, etc.
872+
// Optional. Additional local inventory attributes, for example, store name,
873+
// promotion tags, etc.
825874
//
826875
// This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
827876
// error is returned:
@@ -838,9 +887,10 @@ message LocalInventory {
838887
// unset or set to false.
839888
// * The max summed total bytes of custom attribute keys and values per
840889
// product is 5MiB.
841-
map<string, CustomAttribute> attributes = 3;
890+
map<string, CustomAttribute> attributes = 3
891+
[(google.api.field_behavior) = OPTIONAL];
842892

843-
// Input only. Supported fulfillment types. Valid fulfillment type values
893+
// Optional. Supported fulfillment types. Valid fulfillment type values
844894
// include commonly used types (such as pickup in store and same day
845895
// delivery), and custom types. Customers have to map custom types to their
846896
// display names before rendering UI.
@@ -863,5 +913,22 @@ message LocalInventory {
863913
// All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is
864914
// returned.
865915
repeated string fulfillment_types = 4
866-
[(google.api.field_behavior) = INPUT_ONLY];
916+
[(google.api.field_behavior) = OPTIONAL];
917+
}
918+
919+
// Metadata for pinning to be returned in the response.
920+
// This is used for distinguishing between applied vs dropped pins.
921+
message PinControlMetadata {
922+
// List of product ids which have associated pins.
923+
message ProductPins {
924+
// List of product ids which have associated pins.
925+
repeated string product_id = 1;
926+
}
927+
928+
// Map of all matched pins, keyed by pin position.
929+
map<int64, ProductPins> all_matched_pins = 1;
930+
931+
// Map of pins that were dropped due to overlap with other matching pins,
932+
// keyed by pin position.
933+
map<int64, ProductPins> dropped_pins = 2;
867934
}

0 commit comments

Comments
 (0)