@google-shopping/reviews 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -103
- package/build/protos/google/shopping/type/types.proto +39 -3
- package/build/protos/protos.d.ts +18 -521
- package/build/protos/protos.js +154 -1705
- package/build/protos/protos.json +35 -195
- package/build/src/v1beta/index.js +1 -1
- package/build/src/v1beta/merchant_reviews_service_client.js +1 -1
- package/build/src/v1beta/product_reviews_service_client.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
|
2
|
-
[//]: # "
|
|
2
|
+
[//]: # "The comments you see below are used to generate those parts of the template in later states."
|
|
3
3
|
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
|
4
4
|
|
|
5
|
-
# [Merchant API:
|
|
6
|
-
|
|
7
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
|
-
[](https://www.npmjs.org/package/@google-shopping/reviews)
|
|
9
|
-
|
|
5
|
+
# [Merchant API: Nodejs Client][homepage]
|
|
10
6
|
|
|
7
|
+
This library is considered to be in **preview**. This means it is still a
|
|
8
|
+
work-in-progress and under active development. Any release is subject to
|
|
9
|
+
backwards-incompatible changes at any time.
|
|
11
10
|
|
|
11
|
+
[](https://www.npmjs.org/package/@google-shopping/reviews)
|
|
12
12
|
|
|
13
13
|
Merchant API client for Node.js
|
|
14
14
|
|
|
15
|
+
[//]: # "partials.introduction"
|
|
15
16
|
|
|
16
17
|
A comprehensive list of changes in each version may be found in
|
|
17
|
-
[the CHANGELOG]
|
|
18
|
+
[the CHANGELOG][homepage_changelog].
|
|
18
19
|
|
|
19
|
-
* [Merchant API
|
|
20
|
-
* [Merchant API Documentation]
|
|
21
|
-
* [github.com/googleapis/google-cloud-node/packages/google-shopping-merchant-reviews](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-reviews)
|
|
20
|
+
* [Merchant API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/reviews/latest)
|
|
21
|
+
* [Merchant API Documentation](https://developers.google.com/merchant/api)
|
|
22
22
|
|
|
23
23
|
Read more about the client libraries for Cloud APIs, including the older
|
|
24
24
|
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
@@ -27,18 +27,15 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
27
27
|
|
|
28
28
|
**Table of contents:**
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
* [Quickstart](#quickstart)
|
|
32
31
|
* [Before you begin](#before-you-begin)
|
|
33
32
|
* [Installing the client library](#installing-the-client-library)
|
|
34
|
-
|
|
35
|
-
* [Samples](#samples)
|
|
33
|
+
|
|
36
34
|
* [Versioning](#versioning)
|
|
37
35
|
* [Contributing](#contributing)
|
|
38
36
|
* [License](#license)
|
|
39
37
|
|
|
40
38
|
## Quickstart
|
|
41
|
-
|
|
42
39
|
### Before you begin
|
|
43
40
|
|
|
44
41
|
1. [Select or create a Cloud Platform project][projects].
|
|
@@ -46,88 +43,31 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
46
43
|
1. [Enable the Merchant API API][enable_api].
|
|
47
44
|
1. [Set up authentication][auth] so you can access the
|
|
48
45
|
API from your local workstation.
|
|
49
|
-
|
|
50
46
|
### Installing the client library
|
|
51
47
|
|
|
52
48
|
```bash
|
|
53
49
|
npm install @google-shopping/reviews
|
|
54
50
|
```
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
### Using the client library
|
|
58
|
-
|
|
59
|
-
```javascript
|
|
60
|
-
/**
|
|
61
|
-
* This snippet has been automatically generated and should be regarded as a code template only.
|
|
62
|
-
* It will require modifications to work.
|
|
63
|
-
* It may require correct/in-range values for request initialization.
|
|
64
|
-
* TODO(developer): Uncomment these variables before running the sample.
|
|
65
|
-
*/
|
|
66
|
-
/**
|
|
67
|
-
* Required. The account to list product reviews for.
|
|
68
|
-
* Format: accounts/{account}
|
|
69
|
-
*/
|
|
70
|
-
// const parent = 'abc123'
|
|
71
|
-
/**
|
|
72
|
-
* Optional. The maximum number of products to return. The service may return
|
|
73
|
-
* fewer than this value.
|
|
74
|
-
*/
|
|
75
|
-
// const pageSize = 1234
|
|
76
|
-
/**
|
|
77
|
-
* Optional. A page token, received from a previous `ListProductReviews` call.
|
|
78
|
-
* Provide this to retrieve the subsequent page.
|
|
79
|
-
* When paginating, all other parameters provided to `ListProductReviews`
|
|
80
|
-
* must match the call that provided the page token.
|
|
81
|
-
*/
|
|
82
|
-
// const pageToken = 'abc123'
|
|
83
|
-
|
|
84
|
-
// Imports the Reviews library
|
|
85
|
-
const {ProductReviewsServiceClient} =
|
|
86
|
-
require('@google-shopping/reviews').v1beta;
|
|
87
|
-
|
|
88
|
-
// Instantiates a client
|
|
89
|
-
const reviewsClient = new ProductReviewsServiceClient();
|
|
90
|
-
|
|
91
|
-
async function callListProductReviews() {
|
|
92
|
-
// Construct request
|
|
93
|
-
const request = {
|
|
94
|
-
parent,
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
// Run request
|
|
98
|
-
const iterable = reviewsClient.listProductReviewsAsync(request);
|
|
99
|
-
for await (const response of iterable) {
|
|
100
|
-
console.log(response);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
callListProductReviews();
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
|
|
52
|
+
[//]: # "partials.body"
|
|
109
53
|
|
|
110
54
|
## Samples
|
|
111
55
|
|
|
112
|
-
Samples are in the [`samples/`]
|
|
113
|
-
|
|
114
|
-
| Sample | Source Code | Try it |
|
|
115
|
-
| --------------------------- | --------------------------------- | ------ |
|
|
116
|
-
| Merchant_reviews_service.delete_merchant_review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.delete_merchant_review.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-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.delete_merchant_review.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
117
|
-
| Merchant_reviews_service.get_merchant_review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.get_merchant_review.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-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.get_merchant_review.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
118
|
-
| Merchant_reviews_service.insert_merchant_review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.insert_merchant_review.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-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.insert_merchant_review.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
119
|
-
| Merchant_reviews_service.list_merchant_reviews | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.list_merchant_reviews.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-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.list_merchant_reviews.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
120
|
-
| Product_reviews_service.delete_product_review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.delete_product_review.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-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.delete_product_review.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
121
|
-
| Product_reviews_service.get_product_review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.get_product_review.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-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.get_product_review.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
122
|
-
| Product_reviews_service.insert_product_review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.insert_product_review.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-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.insert_product_review.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
123
|
-
| Product_reviews_service.list_product_reviews | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.list_product_reviews.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-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.list_product_reviews.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
124
|
-
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/quickstart.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-shopping-merchant-reviews/samples/quickstart.js,packages/google-shopping-merchant-reviews/samples/README.md) |
|
|
56
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
125
57
|
|
|
58
|
+
| Sample | Source Code |
|
|
59
|
+
| --------------------------- | --------------------------------- |
|
|
60
|
+
| delete merchant review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.delete_merchant_review.js) |
|
|
61
|
+
| get merchant review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.get_merchant_review.js) |
|
|
62
|
+
| insert merchant review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.insert_merchant_review.js) |
|
|
63
|
+
| list merchant reviews | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/merchant_reviews_service.list_merchant_reviews.js) |
|
|
64
|
+
| delete product review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.delete_product_review.js) |
|
|
65
|
+
| get product review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.get_product_review.js) |
|
|
66
|
+
| insert product review | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.insert_product_review.js) |
|
|
67
|
+
| list product reviews | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/product_reviews_service.list_product_reviews.js) |
|
|
68
|
+
| shopping | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.reviews.v1beta.json) |
|
|
126
69
|
|
|
127
70
|
|
|
128
|
-
The [Merchant API Node.js Client API Reference][client-docs] documentation
|
|
129
|
-
also contains samples.
|
|
130
|
-
|
|
131
71
|
## Supported Node.js Versions
|
|
132
72
|
|
|
133
73
|
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
|
|
@@ -153,41 +93,29 @@ for versions compatible with Node.js 8.
|
|
|
153
93
|
|
|
154
94
|
This library follows [Semantic Versioning](http://semver.org/).
|
|
155
95
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
This library is considered to be in **preview**. This means it is still a
|
|
163
|
-
work-in-progress and under active development. Any release is subject to
|
|
164
|
-
backwards-incompatible changes at any time.
|
|
165
|
-
|
|
166
|
-
|
|
167
96
|
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
168
97
|
|
|
169
98
|
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
170
99
|
|
|
171
100
|
## Contributing
|
|
172
101
|
|
|
173
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
102
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/CONTRIBUTING.md).
|
|
174
103
|
|
|
175
|
-
Please note that this `README.md
|
|
104
|
+
Please note that this `README.md`
|
|
176
105
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
177
|
-
are generated from a central template.
|
|
178
|
-
to its templates in
|
|
179
|
-
[directory](https://github.com/googleapis/synthtool).
|
|
106
|
+
are generated from a central template.
|
|
180
107
|
|
|
181
108
|
## License
|
|
182
109
|
|
|
183
110
|
Apache Version 2.0
|
|
184
111
|
|
|
185
|
-
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
112
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/LICENSE)
|
|
186
113
|
|
|
187
|
-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/merchantapi/latest
|
|
188
|
-
[product-docs]: https://developers.google.com/merchant/api
|
|
189
114
|
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
190
115
|
[projects]: https://console.cloud.google.com/project
|
|
191
116
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
192
117
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=merchantapi.googleapis.com
|
|
193
118
|
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
119
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/samples
|
|
120
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews/CHANGELOG.md
|
|
121
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-shopping-merchant-reviews
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -79,7 +79,6 @@ message CustomAttribute {
|
|
|
79
79
|
//
|
|
80
80
|
// Destinations are used in Merchant Center to allow you to control where the
|
|
81
81
|
// products from your data feed should be displayed.
|
|
82
|
-
//
|
|
83
82
|
message Destination {
|
|
84
83
|
// Destination values.
|
|
85
84
|
enum DestinationEnum {
|
|
@@ -105,6 +104,25 @@ message Destination {
|
|
|
105
104
|
|
|
106
105
|
// [YouTube Shopping](https://support.google.com/merchants/answer/12362804).
|
|
107
106
|
YOUTUBE_SHOPPING = 6;
|
|
107
|
+
|
|
108
|
+
// Youtube shopping checkout.
|
|
109
|
+
YOUTUBE_SHOPPING_CHECKOUT = 7;
|
|
110
|
+
|
|
111
|
+
// [Youtube Affiliate](https://support.google.com/youtube/answer/13376398).
|
|
112
|
+
YOUTUBE_AFFILIATE = 8;
|
|
113
|
+
|
|
114
|
+
// [Free vehicle
|
|
115
|
+
// listings](https://support.google.com/merchants/answer/11189169).
|
|
116
|
+
FREE_VEHICLE_LISTINGS = 9;
|
|
117
|
+
|
|
118
|
+
// [Vehicle ads](https://support.google.com/merchants/answer/11189169).
|
|
119
|
+
VEHICLE_ADS = 10;
|
|
120
|
+
|
|
121
|
+
// [Cloud retail](https://cloud.google.com/solutions/retail).
|
|
122
|
+
CLOUD_RETAIL = 11;
|
|
123
|
+
|
|
124
|
+
// [Local cloud retail](https://cloud.google.com/solutions/retail).
|
|
125
|
+
LOCAL_CLOUD_RETAIL = 12;
|
|
108
126
|
}
|
|
109
127
|
}
|
|
110
128
|
|
|
@@ -115,7 +133,6 @@ message Destination {
|
|
|
115
133
|
// ads](https://support.google.com/merchants/answer/6149970)) or a subset of
|
|
116
134
|
// formats within a destination (for example, [Demand Gen
|
|
117
135
|
// ads](https://support.google.com/merchants/answer/13389785)).
|
|
118
|
-
//
|
|
119
136
|
message ReportingContext {
|
|
120
137
|
// Reporting context values.
|
|
121
138
|
enum ReportingContextEnum {
|
|
@@ -155,6 +172,10 @@ message ReportingContext {
|
|
|
155
172
|
// listings](https://support.google.com/merchants/answer/9199328).
|
|
156
173
|
FREE_LISTINGS = 7;
|
|
157
174
|
|
|
175
|
+
// [Free product listings on UCP
|
|
176
|
+
// checkout](https://developers.google.com/merchant/ucp).
|
|
177
|
+
FREE_LISTINGS_UCP_CHECKOUT = 19;
|
|
178
|
+
|
|
158
179
|
// [Free local product
|
|
159
180
|
// listings](https://support.google.com/merchants/answer/9825611).
|
|
160
181
|
FREE_LOCAL_LISTINGS = 8;
|
|
@@ -163,6 +184,9 @@ message ReportingContext {
|
|
|
163
184
|
// listings](https://support.google.com/merchants/answer/11544533).
|
|
164
185
|
FREE_LOCAL_VEHICLE_LISTINGS = 9;
|
|
165
186
|
|
|
187
|
+
// [Youtube Affiliate](https://support.google.com/youtube/answer/13376398).
|
|
188
|
+
YOUTUBE_AFFILIATE = 18;
|
|
189
|
+
|
|
166
190
|
// [YouTube
|
|
167
191
|
// Shopping](https://support.google.com/merchants/answer/13478370).
|
|
168
192
|
YOUTUBE_SHOPPING = 10;
|
|
@@ -172,6 +196,18 @@ message ReportingContext {
|
|
|
172
196
|
|
|
173
197
|
// [Local cloud retail](https://cloud.google.com/solutions/retail).
|
|
174
198
|
LOCAL_CLOUD_RETAIL = 12;
|
|
199
|
+
|
|
200
|
+
// [Product
|
|
201
|
+
// Reviews](https://support.google.com/merchants/answer/14620732).
|
|
202
|
+
PRODUCT_REVIEWS = 15;
|
|
203
|
+
|
|
204
|
+
// [Merchant
|
|
205
|
+
// Reviews](https://developers.google.com/merchant-review-feeds).
|
|
206
|
+
MERCHANT_REVIEWS = 16;
|
|
207
|
+
|
|
208
|
+
// YouTube Checkout
|
|
209
|
+
// .
|
|
210
|
+
YOUTUBE_CHECKOUT = 17;
|
|
175
211
|
}
|
|
176
212
|
}
|
|
177
213
|
|