@maxim_mazurok/gapi.client.merchantapi-reviews_v1beta 0.0.20241015

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.
Files changed (3) hide show
  1. package/index.d.ts +575 -0
  2. package/package.json +20 -0
  3. package/readme.md +73 -0
package/index.d.ts ADDED
@@ -0,0 +1,575 @@
1
+ /* Type definitions for non-npm package Merchant API reviews_v1beta 0.0 */
2
+ // Project: https://developers.devsite.corp.google.com/merchant/api
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+
8
+ // IMPORTANT
9
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
+ // Generated from: https://merchantapi.googleapis.com/$discovery/rest?version=reviews_v1beta
12
+ // Revision: 20241015
13
+
14
+ /// <reference types="gapi.client" />
15
+
16
+ declare namespace gapi.client {
17
+ /** Load Merchant API reviews_v1beta */
18
+ function load(
19
+ urlOrObject: 'https://merchantapi.googleapis.com/$discovery/rest?version=reviews_v1beta'
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'merchantapi', version: 'reviews_v1beta'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(
25
+ name: 'merchantapi',
26
+ version: 'reviews_v1beta',
27
+ callback: () => any
28
+ ): void;
29
+
30
+ namespace merchantapi {
31
+ interface CustomAttribute {
32
+ /** Subattributes within this attribute group. If `group_values` is not empty, `value` must be empty. */
33
+ groupValues?: CustomAttribute[];
34
+ /** The name of the attribute. */
35
+ name?: string;
36
+ /** The value of the attribute. If `value` is not empty, `group_values` must be empty. */
37
+ value?: string;
38
+ }
39
+ interface Empty {}
40
+ interface ListMerchantReviewsResponse {
41
+ /** The merchant review. */
42
+ merchantReviews?: MerchantReview[];
43
+ /** The token to retrieve the next page of results. */
44
+ nextPageToken?: string;
45
+ }
46
+ interface ListProductReviewsResponse {
47
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
48
+ nextPageToken?: string;
49
+ /** The product review. */
50
+ productReviews?: ProductReview[];
51
+ }
52
+ interface MerchantReview {
53
+ /** Optional. A list of merchant review attributes. */
54
+ attributes?: MerchantReviewAttributes;
55
+ /** Required. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, `{ "name": "size type", "value": "regular" }`). This is useful for submitting attributes not explicitly exposed by the API, such as experimental attributes. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion. */
56
+ customAttributes?: CustomAttribute[];
57
+ /** Output only. The primary data source of the merchant review. */
58
+ dataSource?: string;
59
+ /** Required. The user provided merchant review ID to uniquely identify the merchant review. */
60
+ merchantReviewId?: string;
61
+ /** Output only. The status of a merchant review, data validation issues, that is, information about a merchant review computed asynchronously. */
62
+ merchantReviewStatus?: MerchantReviewStatus;
63
+ /** Identifier. The name of the merchant review. Format: `"{merchantreview.name=accounts/{account}/merchantReviews/{merchantReview}}"` */
64
+ name?: string;
65
+ }
66
+ interface MerchantReviewAttributes {
67
+ /** Optional. The method used to collect the review. */
68
+ collectionMethod?: string;
69
+ /** Required. This should be any freeform text provided by the user and should not be truncated. If multiple responses to different questions are provided, all responses should be included, with the minimal context for the responses to make sense. Context should not be provided if questions were left unanswered. */
70
+ content?: string;
71
+ /** Optional. Set to true if the reviewer should remain anonymous. */
72
+ isAnonymous?: boolean;
73
+ /** Optional. The maximum possible number for the rating. The value of the max rating must be greater than the value of the min rating. */
74
+ maxRating?: string;
75
+ /** Optional. Human-readable display name for the merchant. */
76
+ merchantDisplayName?: string;
77
+ /** Required. Must be unique and stable across all requests. In other words, if a request today and another 90 days ago refer to the same merchant, they must have the same id. */
78
+ merchantId?: string;
79
+ /** Optional. URL to the merchant's main website. Do not use a redirect URL for this value. In other words, the value should point directly to the merchant's site. */
80
+ merchantLink?: string;
81
+ /** Optional. URL to the landing page that hosts the reviews for this merchant. Do not use a redirect URL. */
82
+ merchantRatingLink?: string;
83
+ /** Optional. The minimum possible number for the rating. This should be the worst possible rating and should not be a value for no rating. */
84
+ minRating?: string;
85
+ /** Optional. The reviewer's overall rating of the merchant. */
86
+ rating?: number;
87
+ /** Optional. The country where the reviewer made the order defined by ISO 3166-1 Alpha-2 Country Code. */
88
+ reviewCountry?: string;
89
+ /** Optional. A permanent, unique identifier for the author of the review in the publisher's system. */
90
+ reviewerId?: string;
91
+ /** Optional. Display name of the review author. */
92
+ reviewerUsername?: string;
93
+ /** Required. The language of the review defined by BCP-47 language code. */
94
+ reviewLanguage?: string;
95
+ /** Required. The timestamp indicating when the review was written. */
96
+ reviewTime?: string;
97
+ /** Optional. The title of the review. */
98
+ title?: string;
99
+ }
100
+ interface MerchantReviewDestinationStatus {
101
+ /** Output only. The name of the reporting context. */
102
+ reportingContext?: string;
103
+ }
104
+ interface MerchantReviewItemLevelIssue {
105
+ /** Output only. The attribute's name, if the issue is caused by a single attribute. */
106
+ attribute?: string;
107
+ /** Output only. The error code of the issue. */
108
+ code?: string;
109
+ /** Output only. A short issue description in English. */
110
+ description?: string;
111
+ /** Output only. A detailed issue description in English. */
112
+ detail?: string;
113
+ /** Output only. The URL of a web page to help with resolving this issue. */
114
+ documentation?: string;
115
+ /** Output only. The reporting context the issue applies to. */
116
+ reportingContext?: string;
117
+ /** Output only. Whether the issue can be resolved by the merchant. */
118
+ resolution?: string;
119
+ /** Output only. How this issue affects serving of the merchant review. */
120
+ severity?: string;
121
+ }
122
+ interface MerchantReviewStatus {
123
+ /** Output only. Date on which the item has been created, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
124
+ createTime?: string;
125
+ /** Output only. The intended destinations for the merchant review. */
126
+ destinationStatuses?: MerchantReviewDestinationStatus[];
127
+ /** Output only. A list of all issues associated with the merchant review. */
128
+ itemLevelIssues?: MerchantReviewItemLevelIssue[];
129
+ /** Output only. Date on which the item has been last updated, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
130
+ lastUpdateTime?: string;
131
+ }
132
+ interface ProductChange {
133
+ /** The new value of the changed resource or attribute. */
134
+ newValue?: string;
135
+ /** The old value of the changed resource or attribute. */
136
+ oldValue?: string;
137
+ /** Countries that have the change (if applicable) */
138
+ regionCode?: string;
139
+ /** Reporting contexts that have the change (if applicable) */
140
+ reportingContext?: string;
141
+ }
142
+ interface ProductReview {
143
+ /** Optional. A list of product review attributes. */
144
+ attributes?: ProductReviewAttributes;
145
+ /** Optional. A list of custom (merchant-provided) attributes. */
146
+ customAttributes?: CustomAttribute[];
147
+ /** Output only. The primary data source of the product review. */
148
+ dataSource?: string;
149
+ /** Identifier. The name of the product review. Format: `"{productreview.name=accounts/{account}/productReviews/{productReview}}"` */
150
+ name?: string;
151
+ /** Required. The permanent, unique identifier for the product review in the publisher’s system. */
152
+ productReviewId?: string;
153
+ /** Output only. The status of a product review, data validation issues, that is, information about a product review computed asynchronously. */
154
+ productReviewStatus?: ProductReviewStatus;
155
+ }
156
+ interface ProductReviewAttributes {
157
+ /** Optional. The name of the aggregator of the product reviews. A publisher may use a reviews aggregator to manage reviews and provide the feeds. This element indicates the use of an aggregator and contains information about the aggregator. */
158
+ aggregatorName?: string;
159
+ /** Optional. Contains ASINs (Amazon Standard Identification Numbers) associated with a product. */
160
+ asins?: string[];
161
+ /** Optional. Contains brand names associated with a product. */
162
+ brands?: string[];
163
+ /** Optional. The method used to collect the review. */
164
+ collectionMethod?: string;
165
+ /** Optional. Contains the disadvantages based on the opinion of the reviewer. Omit boilerplate text like "con:" unless it was written by the reviewer. */
166
+ cons?: string[];
167
+ /** Required. The content of the review. */
168
+ content?: string;
169
+ /** Optional. Contains GTINs (global trade item numbers) associated with a product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported. */
170
+ gtins?: string[];
171
+ /** Optional. Indicates whether the review is marked as spam in the publisher's system. */
172
+ isSpam?: boolean;
173
+ /** Optional. The maximum possible number for the rating. The value of the max rating must be greater than the value of the min attribute. */
174
+ maxRating?: string;
175
+ /** Optional. Contains the ratings associated with the review. The minimum possible number for the rating. This should be the worst possible rating and should not be a value for no rating. */
176
+ minRating?: string;
177
+ /** Optional. Contains MPNs (manufacturer part numbers) associated with a product. */
178
+ mpns?: string[];
179
+ /** Optional. The URI of the product. This URI can have the same value as the `review_link` element, if the review URI and the product URI are the same. */
180
+ productLinks?: string[];
181
+ /** Optional. Descriptive name of a product. */
182
+ productNames?: string[];
183
+ /** Optional. Contains the advantages based on the opinion of the reviewer. Omit boilerplate text like "pro:" unless it was written by the reviewer. */
184
+ pros?: string[];
185
+ /** Optional. A link to the company favicon of the publisher. The image dimensions should be favicon size: 16x16 pixels. The image format should be GIF, JPG or PNG. */
186
+ publisherFavicon?: string;
187
+ /** Optional. The name of the publisher of the product reviews. The information about the publisher, which may be a retailer, manufacturer, reviews service company, or any entity that publishes product reviews. */
188
+ publisherName?: string;
189
+ /** Optional. The reviewer's overall rating of the product. */
190
+ rating?: number;
191
+ /** Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country Code. */
192
+ reviewCountry?: string;
193
+ /** Optional. The author of the product review. A permanent, unique identifier for the author of the review in the publisher's system. */
194
+ reviewerId?: string;
195
+ /** Optional. A URI to an image of the reviewed product created by the review author. The URI does not have to end with an image file extension. */
196
+ reviewerImageLinks?: string[];
197
+ /** Optional. Set to true if the reviewer should remain anonymous. */
198
+ reviewerIsAnonymous?: boolean;
199
+ /** Optional. The name of the reviewer of the product review. */
200
+ reviewerUsername?: string;
201
+ /** Optional. The language of the review defined by BCP-47 language code. */
202
+ reviewLanguage?: string;
203
+ /** Optional. The URI of the review landing page. */
204
+ reviewLink?: ReviewLink;
205
+ /** Required. The timestamp indicating when the review was written. */
206
+ reviewTime?: string;
207
+ /** Optional. Contains SKUs (stock keeping units) associated with a product. Often this matches the product Offer Id in the product feed. */
208
+ skus?: string[];
209
+ /** Optional. The name of the subclient of the product reviews. The subclient is an identifier of the product review source. It should be equivalent to the directory provided in the file data source path. */
210
+ subclientName?: string;
211
+ /** Optional. The title of the review. */
212
+ title?: string;
213
+ /** Optional. A permanent, unique identifier for the transaction associated with the review in the publisher's system. This ID can be used to indicate that multiple reviews are associated with the same transaction. */
214
+ transactionId?: string;
215
+ }
216
+ interface ProductReviewDestinationStatus {
217
+ /** Output only. The name of the reporting context. */
218
+ reportingContext?: string;
219
+ }
220
+ interface ProductReviewItemLevelIssue {
221
+ /** Output only. The attribute's name, if the issue is caused by a single attribute. */
222
+ attribute?: string;
223
+ /** Output only. The error code of the issue. */
224
+ code?: string;
225
+ /** Output only. A short issue description in English. */
226
+ description?: string;
227
+ /** Output only. A detailed issue description in English. */
228
+ detail?: string;
229
+ /** Output only. The URL of a web page to help with resolving this issue. */
230
+ documentation?: string;
231
+ /** Output only. The reporting context the issue applies to. */
232
+ reportingContext?: string;
233
+ /** Output only. Whether the issue can be resolved by the merchant. */
234
+ resolution?: string;
235
+ /** Output only. How this issue affects serving of the product review. */
236
+ severity?: string;
237
+ }
238
+ interface ProductReviewStatus {
239
+ /** Output only. Date on which the item has been created, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
240
+ createTime?: string;
241
+ /** Output only. The intended destinations for the product review. */
242
+ destinationStatuses?: ProductReviewDestinationStatus[];
243
+ /** Output only. A list of all issues associated with the product review. */
244
+ itemLevelIssues?: ProductReviewItemLevelIssue[];
245
+ /** Output only. Date on which the item has been last updated, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
246
+ lastUpdateTime?: string;
247
+ }
248
+ interface ProductStatusChangeMessage {
249
+ /** The target account that owns the entity that changed. Format : `accounts/{merchant_id}` */
250
+ account?: string;
251
+ /** The attribute in the resource that changed, in this case it will be always `Status`. */
252
+ attribute?: string;
253
+ /** A message to describe the change that happened to the product */
254
+ changes?: ProductChange[];
255
+ /** The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : `accounts/{service_provider_id}` */
256
+ managingAccount?: string;
257
+ /** The product name. Format: `{product.name=accounts/{account}/products/{product}}` */
258
+ resource?: string;
259
+ /** The product id. */
260
+ resourceId?: string;
261
+ /** The resource that changed, in this case it will always be `Product`. */
262
+ resourceType?: string;
263
+ }
264
+ interface ReviewLink {
265
+ /** Optional. The URI of the review landing page. For example: `http://www.example.com/review_5.html`. */
266
+ link?: string;
267
+ /** Optional. Type of the review URI. */
268
+ type?: string;
269
+ }
270
+ interface MerchantReviewsResource {
271
+ /** Deletes merchant review. */
272
+ delete(request?: {
273
+ /** V1 error format. */
274
+ '$.xgafv'?: string;
275
+ /** OAuth access token. */
276
+ access_token?: string;
277
+ /** Data format for response. */
278
+ alt?: string;
279
+ /** JSONP */
280
+ callback?: string;
281
+ /** Selector specifying which fields to include in a partial response. */
282
+ fields?: string;
283
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
284
+ key?: string;
285
+ /** Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview} */
286
+ name: string;
287
+ /** OAuth 2.0 token for the current user. */
288
+ oauth_token?: string;
289
+ /** Returns response with indentations and line breaks. */
290
+ prettyPrint?: boolean;
291
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
292
+ quotaUser?: string;
293
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
294
+ upload_protocol?: string;
295
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
296
+ uploadType?: string;
297
+ }): Request<{}>;
298
+ /** Gets a merchant review. */
299
+ get(request?: {
300
+ /** V1 error format. */
301
+ '$.xgafv'?: string;
302
+ /** OAuth access token. */
303
+ access_token?: string;
304
+ /** Data format for response. */
305
+ alt?: string;
306
+ /** JSONP */
307
+ callback?: string;
308
+ /** Selector specifying which fields to include in a partial response. */
309
+ fields?: string;
310
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
311
+ key?: string;
312
+ /** Required. The ID of the merchant review. Format: accounts/{account}/merchantReviews/{merchantReview} */
313
+ name: string;
314
+ /** OAuth 2.0 token for the current user. */
315
+ oauth_token?: string;
316
+ /** Returns response with indentations and line breaks. */
317
+ prettyPrint?: boolean;
318
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
319
+ quotaUser?: string;
320
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
321
+ upload_protocol?: string;
322
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
323
+ uploadType?: string;
324
+ }): Request<MerchantReview>;
325
+ /** Inserts a review for your Merchant Center account. If the review already exists, then the review is replaced with the new instance. */
326
+ insert(request: {
327
+ /** V1 error format. */
328
+ '$.xgafv'?: string;
329
+ /** OAuth access token. */
330
+ access_token?: string;
331
+ /** Data format for response. */
332
+ alt?: string;
333
+ /** JSONP */
334
+ callback?: string;
335
+ /** Required. The data source of the [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) Format: `accounts/{account}/dataSources/{datasource}`. */
336
+ dataSource?: string;
337
+ /** Selector specifying which fields to include in a partial response. */
338
+ fields?: string;
339
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
340
+ key?: string;
341
+ /** OAuth 2.0 token for the current user. */
342
+ oauth_token?: string;
343
+ /** Required. The account where the merchant review will be inserted. Format: accounts/{account} */
344
+ parent: string;
345
+ /** Returns response with indentations and line breaks. */
346
+ prettyPrint?: boolean;
347
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
348
+ quotaUser?: string;
349
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
350
+ upload_protocol?: string;
351
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
352
+ uploadType?: string;
353
+ /** Request body */
354
+ resource: MerchantReview;
355
+ }): Request<MerchantReview>;
356
+ insert(
357
+ request: {
358
+ /** V1 error format. */
359
+ '$.xgafv'?: string;
360
+ /** OAuth access token. */
361
+ access_token?: string;
362
+ /** Data format for response. */
363
+ alt?: string;
364
+ /** JSONP */
365
+ callback?: string;
366
+ /** Required. The data source of the [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) Format: `accounts/{account}/dataSources/{datasource}`. */
367
+ dataSource?: string;
368
+ /** Selector specifying which fields to include in a partial response. */
369
+ fields?: string;
370
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
371
+ key?: string;
372
+ /** OAuth 2.0 token for the current user. */
373
+ oauth_token?: string;
374
+ /** Required. The account where the merchant review will be inserted. Format: accounts/{account} */
375
+ parent: string;
376
+ /** Returns response with indentations and line breaks. */
377
+ prettyPrint?: boolean;
378
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
379
+ quotaUser?: string;
380
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
381
+ upload_protocol?: string;
382
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
383
+ uploadType?: string;
384
+ },
385
+ body: MerchantReview
386
+ ): Request<MerchantReview>;
387
+ /** Lists merchant reviews. */
388
+ list(request?: {
389
+ /** V1 error format. */
390
+ '$.xgafv'?: string;
391
+ /** OAuth access token. */
392
+ access_token?: string;
393
+ /** Data format for response. */
394
+ alt?: string;
395
+ /** JSONP */
396
+ callback?: string;
397
+ /** Selector specifying which fields to include in a partial response. */
398
+ fields?: string;
399
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
400
+ key?: string;
401
+ /** OAuth 2.0 token for the current user. */
402
+ oauth_token?: string;
403
+ /** Optional. The maximum number of merchant reviews to return. The service can return fewer than this value. The maximum value is 1000; values above 1000 are coerced to 1000. If unspecified, the maximum number of reviews is returned. */
404
+ pageSize?: number;
405
+ /** Optional. A page token, received from a previous `ListMerchantReviews` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMerchantReviews` must match the call that provided the page token. */
406
+ pageToken?: string;
407
+ /** Required. The account to list merchant reviews for. Format: accounts/{account} */
408
+ parent: string;
409
+ /** Returns response with indentations and line breaks. */
410
+ prettyPrint?: boolean;
411
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
412
+ quotaUser?: string;
413
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
414
+ upload_protocol?: string;
415
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
416
+ uploadType?: string;
417
+ }): Request<ListMerchantReviewsResponse>;
418
+ }
419
+ interface ProductReviewsResource {
420
+ /** Deletes a product review. */
421
+ delete(request?: {
422
+ /** V1 error format. */
423
+ '$.xgafv'?: string;
424
+ /** OAuth access token. */
425
+ access_token?: string;
426
+ /** Data format for response. */
427
+ alt?: string;
428
+ /** JSONP */
429
+ callback?: string;
430
+ /** Selector specifying which fields to include in a partial response. */
431
+ fields?: string;
432
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
433
+ key?: string;
434
+ /** Required. The ID of the Product review. Format: accounts/{account}/productReviews/{productReview} */
435
+ name: string;
436
+ /** OAuth 2.0 token for the current user. */
437
+ oauth_token?: string;
438
+ /** Returns response with indentations and line breaks. */
439
+ prettyPrint?: boolean;
440
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
441
+ quotaUser?: string;
442
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
443
+ upload_protocol?: string;
444
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
445
+ uploadType?: string;
446
+ }): Request<{}>;
447
+ /** Gets a product review. */
448
+ get(request?: {
449
+ /** V1 error format. */
450
+ '$.xgafv'?: string;
451
+ /** OAuth access token. */
452
+ access_token?: string;
453
+ /** Data format for response. */
454
+ alt?: string;
455
+ /** JSONP */
456
+ callback?: string;
457
+ /** Selector specifying which fields to include in a partial response. */
458
+ fields?: string;
459
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
460
+ key?: string;
461
+ /** Required. The ID of the merchant review. Format: accounts/{account}/productReviews/{productReview} */
462
+ name: string;
463
+ /** OAuth 2.0 token for the current user. */
464
+ oauth_token?: string;
465
+ /** Returns response with indentations and line breaks. */
466
+ prettyPrint?: boolean;
467
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
468
+ quotaUser?: string;
469
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
470
+ upload_protocol?: string;
471
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
472
+ uploadType?: string;
473
+ }): Request<ProductReview>;
474
+ /** Inserts a product review. */
475
+ insert(request: {
476
+ /** V1 error format. */
477
+ '$.xgafv'?: string;
478
+ /** OAuth access token. */
479
+ access_token?: string;
480
+ /** Data format for response. */
481
+ alt?: string;
482
+ /** JSONP */
483
+ callback?: string;
484
+ /** Required. Format: `accounts/{account}/dataSources/{datasource}`. */
485
+ dataSource?: string;
486
+ /** Selector specifying which fields to include in a partial response. */
487
+ fields?: string;
488
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
489
+ key?: string;
490
+ /** OAuth 2.0 token for the current user. */
491
+ oauth_token?: string;
492
+ /** Required. The account where the product review will be inserted. Format: accounts/{account} */
493
+ parent: string;
494
+ /** Returns response with indentations and line breaks. */
495
+ prettyPrint?: boolean;
496
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
497
+ quotaUser?: string;
498
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
499
+ upload_protocol?: string;
500
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
501
+ uploadType?: string;
502
+ /** Request body */
503
+ resource: ProductReview;
504
+ }): Request<ProductReview>;
505
+ insert(
506
+ request: {
507
+ /** V1 error format. */
508
+ '$.xgafv'?: string;
509
+ /** OAuth access token. */
510
+ access_token?: string;
511
+ /** Data format for response. */
512
+ alt?: string;
513
+ /** JSONP */
514
+ callback?: string;
515
+ /** Required. Format: `accounts/{account}/dataSources/{datasource}`. */
516
+ dataSource?: string;
517
+ /** Selector specifying which fields to include in a partial response. */
518
+ fields?: string;
519
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
520
+ key?: string;
521
+ /** OAuth 2.0 token for the current user. */
522
+ oauth_token?: string;
523
+ /** Required. The account where the product review will be inserted. Format: accounts/{account} */
524
+ parent: string;
525
+ /** Returns response with indentations and line breaks. */
526
+ prettyPrint?: boolean;
527
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
528
+ quotaUser?: string;
529
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
530
+ upload_protocol?: string;
531
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
532
+ uploadType?: string;
533
+ },
534
+ body: ProductReview
535
+ ): Request<ProductReview>;
536
+ /** Lists product reviews. */
537
+ list(request?: {
538
+ /** V1 error format. */
539
+ '$.xgafv'?: string;
540
+ /** OAuth access token. */
541
+ access_token?: string;
542
+ /** Data format for response. */
543
+ alt?: string;
544
+ /** JSONP */
545
+ callback?: string;
546
+ /** Selector specifying which fields to include in a partial response. */
547
+ fields?: string;
548
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
549
+ key?: string;
550
+ /** OAuth 2.0 token for the current user. */
551
+ oauth_token?: string;
552
+ /** Optional. The maximum number of products to return. The service may return fewer than this value. */
553
+ pageSize?: number;
554
+ /** Optional. A page token, received from a previous `ListProductReviews` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProductReviews` must match the call that provided the page token. */
555
+ pageToken?: string;
556
+ /** Required. The account to list product reviews for. Format: accounts/{account} */
557
+ parent: string;
558
+ /** Returns response with indentations and line breaks. */
559
+ prettyPrint?: boolean;
560
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
561
+ quotaUser?: string;
562
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
563
+ upload_protocol?: string;
564
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
565
+ uploadType?: string;
566
+ }): Request<ListProductReviewsResponse>;
567
+ }
568
+ interface AccountsResource {
569
+ merchantReviews: MerchantReviewsResource;
570
+ productReviews: ProductReviewsResource;
571
+ }
572
+
573
+ const accounts: AccountsResource;
574
+ }
575
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.merchantapi-reviews_v1beta",
3
+ "version": "0.0.20241015",
4
+ "description": "TypeScript typings for Merchant API reviews_v1beta",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
9
+ "license": "MIT",
10
+ "author": {
11
+ "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
13
+ "url": "https://maxim.mazurok.com"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery-v1": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,73 @@
1
+ # TypeScript typings for Merchant API reviews_v1beta
2
+
3
+ Programmatically manage your Merchant Center Accounts.
4
+ For detailed description please check [documentation](https://developers.devsite.corp.google.com/merchant/api).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Merchant API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.merchantapi-reviews_v1beta --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load(
29
+ 'https://merchantapi.googleapis.com/$discovery/rest?version=reviews_v1beta',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.merchantapi
33
+ }
34
+ );
35
+ ```
36
+
37
+ ```typescript
38
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
39
+ gapi.client.load('merchantapi', 'reviews_v1beta', () => {
40
+ // now we can use:
41
+ // gapi.client.merchantapi
42
+ });
43
+ ```
44
+
45
+ Don't forget to authenticate your client before sending any request to resources:
46
+
47
+ ```typescript
48
+ // declare client_id registered in Google Developers Console
49
+ var client_id = '',
50
+ scope = [
51
+ // Manage your product listings and accounts for Google Shopping
52
+ 'https://www.googleapis.com/auth/content',
53
+ ],
54
+ immediate = true;
55
+ // ...
56
+
57
+ gapi.auth.authorize(
58
+ {client_id: client_id, scope: scope, immediate: immediate},
59
+ authResult => {
60
+ if (authResult && !authResult.error) {
61
+ /* handle successful authorization */
62
+ } else {
63
+ /* handle authorization error */
64
+ }
65
+ }
66
+ );
67
+ ```
68
+
69
+ After that you can use Merchant API resources: <!-- TODO: make this work for multiple namespaces -->
70
+
71
+ ```typescript
72
+
73
+ ```