Skip to content

Commit

Permalink
feat: add click potential to Reports sub-API publication
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 623133729
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 9, 2024
1 parent 5db2bbe commit 66ae983
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 41 deletions.
16 changes: 14 additions & 2 deletions google/shopping/merchant/reports/v1beta/BUILD.bazel
Expand Up @@ -9,14 +9,17 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

# buildifier: disable=load-on-top

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
# buildifier: disable=same-origin-load
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "reports_proto",
Expand Down Expand Up @@ -44,6 +47,7 @@ proto_library_with_info(
##############################################################################
# Java
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
Expand Down Expand Up @@ -101,13 +105,13 @@ java_gapic_assembly_gradle_pkg(
":reports_java_grpc",
":reports_java_proto",
":reports_proto",
"//google/shopping/type:type_java_proto", # Added manually
],
)

##############################################################################
# Go
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
Expand Down Expand Up @@ -157,6 +161,7 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
Expand Down Expand Up @@ -209,6 +214,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
Expand Down Expand Up @@ -246,6 +252,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Node.js
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
Expand Down Expand Up @@ -277,6 +284,7 @@ nodejs_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
Expand Down Expand Up @@ -326,6 +334,7 @@ ruby_gapic_assembly_pkg(
##############################################################################
# C#
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
Expand All @@ -336,6 +345,7 @@ load(

csharp_proto_library(
name = "reports_csharp_proto",
extra_opts = [],
deps = [":reports_proto"],
)

Expand All @@ -352,6 +362,7 @@ csharp_gapic_library(
grpc_service_config = "reports_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "merchantapi_v1beta.yaml",
transport = "grpc+rest",
deps = [
":reports_csharp_grpc",
":reports_csharp_proto",
Expand All @@ -371,6 +382,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
Expand Down
38 changes: 0 additions & 38 deletions google/shopping/merchant/reports/v1beta/merchantapi_v1beta.yaml
Expand Up @@ -24,50 +24,12 @@ publishing:
doc_tag_prefix: merchantapi
organization: SHOPPING
library_settings:
- version: google.shopping.merchant.inventories.v1beta
launch_stage: BETA
java_settings:
common:
destinations:
- PACKAGE_MANAGER
cpp_settings:
common:
destinations:
- PACKAGE_MANAGER
php_settings:
common:
destinations:
- PACKAGE_MANAGER
python_settings:
common:
destinations:
- PACKAGE_MANAGER
node_settings:
common:
destinations:
- PACKAGE_MANAGER
dotnet_settings:
common:
destinations:
- PACKAGE_MANAGER
ruby_settings:
common:
destinations:
- PACKAGE_MANAGER
go_settings:
common:
destinations:
- PACKAGE_MANAGER
- version: google.shopping.merchant.reports.v1beta
launch_stage: BETA
java_settings:
common:
destinations:
- PACKAGE_MANAGER
cpp_settings:
common:
destinations:
- PACKAGE_MANAGER
php_settings:
common:
destinations:
Expand Down
34 changes: 33 additions & 1 deletion google/shopping/merchant/reports/v1beta/reports.proto
Expand Up @@ -60,7 +60,7 @@ message SearchRequest {
string query = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
// the maximum of 1000. Values above 1000 are coerced to 1000.
// 1000. Values above 5000 are coerced to 5000.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. Token of the page to retrieve. If not specified, the first page
Expand Down Expand Up @@ -378,6 +378,29 @@ message ProductView {
ELIGIBLE = 4;
}

// A product's [click
// potential](https://support.google.com/merchants/answer/188488) estimates
// its performance potential compared to highest performing products of the
// merchant. Click potential of a product helps merchants to prioritize which
// products to fix and helps them understand how products are performing
// against their potential.
enum ClickPotential {
// Unknown predicted clicks impact.
CLICK_POTENTIAL_UNSPECIFIED = 0;

// Potential to receive a low number of clicks compared to the highest
// performing products of the merchant.
LOW = 1;

// Potential to receive a moderate number of clicks compared to the highest
// performing products of the merchant.
MEDIUM = 2;

// Potential to receive a similar number of clicks as the highest performing
// products of the merchant.
HIGH = 3;
}

// REST ID of the product, in the form of
// `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
// on products take this as their `name` parameter.
Expand Down Expand Up @@ -488,6 +511,15 @@ message ProductView {
// `item_issues.severity.aggregated_severity`) can be used for filtering the
// results.**
repeated ItemIssue item_issues = 27;

// Estimated performance potential compared to highest performing products of
// the merchant.
ClickPotential click_potential = 29;

// Rank of the product based on its click potential. A product with
// `click_potential_rank` 1 has the highest click potential among the
// merchant's products that fulfill the search query conditions.
optional int64 click_potential_rank = 30;
}

// Fields available for query in `price_competitiveness_product_view` table.
Expand Down

0 comments on commit 66ae983

Please sign in to comment.