@googleapis/merchantapi 1.1.0 → 4.1.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/accounts_v1beta.ts +675 -87
  3. package/build/accounts_v1beta.d.ts +344 -85
  4. package/build/accounts_v1beta.js +138 -1
  5. package/build/accounts_v1beta.js.map +1 -1
  6. package/build/conversions_v1beta.d.ts +15 -10
  7. package/build/conversions_v1beta.js.map +1 -1
  8. package/build/datasources_v1beta.d.ts +187 -19
  9. package/build/datasources_v1beta.js +39 -0
  10. package/build/datasources_v1beta.js.map +1 -1
  11. package/build/index.d.ts +5 -0
  12. package/build/index.js +4 -1
  13. package/build/index.js.map +1 -1
  14. package/build/inventories_v1beta.d.ts +13 -5
  15. package/build/inventories_v1beta.js.map +1 -1
  16. package/build/lfp_v1beta.d.ts +13 -5
  17. package/build/lfp_v1beta.js.map +1 -1
  18. package/build/notifications_v1beta.d.ts +14 -6
  19. package/build/notifications_v1beta.js.map +1 -1
  20. package/build/products_v1beta.d.ts +81 -16
  21. package/build/products_v1beta.js +32 -0
  22. package/build/products_v1beta.js.map +1 -1
  23. package/build/promotions_v1beta.d.ts +14 -6
  24. package/build/promotions_v1beta.js.map +1 -1
  25. package/build/quota_v1beta.d.ts +14 -6
  26. package/build/quota_v1beta.js.map +1 -1
  27. package/build/reports_v1beta.d.ts +13 -5
  28. package/build/reports_v1beta.js.map +1 -1
  29. package/build/reviews_v1beta.d.ts +786 -0
  30. package/build/reviews_v1beta.js +322 -0
  31. package/build/reviews_v1beta.js.map +1 -0
  32. package/conversions_v1beta.ts +15 -10
  33. package/datasources_v1beta.ts +267 -19
  34. package/index.ts +13 -1
  35. package/inventories_v1beta.ts +13 -5
  36. package/lfp_v1beta.ts +13 -5
  37. package/notifications_v1beta.ts +14 -6
  38. package/package.json +1 -1
  39. package/products_v1beta.ts +157 -16
  40. package/promotions_v1beta.ts +14 -6
  41. package/quota_v1beta.ts +14 -6
  42. package/reports_v1beta.ts +13 -5
  43. package/reviews_v1beta.ts +1465 -0
@@ -145,30 +145,77 @@ export namespace merchantapi_datasources_v1beta {
145
145
  */
146
146
  input?: string | null;
147
147
  /**
148
- * Required. The [local inventory](https://support.google.com/merchants/answer/7023001) data source.
148
+ * The [local inventory](https://support.google.com/merchants/answer/7023001) data source.
149
149
  */
150
150
  localInventoryDataSource?: Schema$LocalInventoryDataSource;
151
+ /**
152
+ * The [merchant review](https://support.google.com/merchants/answer/7045996) data source.
153
+ */
154
+ merchantReviewDataSource?: Schema$MerchantReviewDataSource;
151
155
  /**
152
156
  * Identifier. The name of the data source. Format: `{datasource.name=accounts/{account\}/dataSources/{datasource\}\}`
153
157
  */
154
158
  name?: string | null;
155
159
  /**
156
- * Required. The [primary data source](https://support.google.com/merchants/answer/7439058) for local and online products.
160
+ * The [primary data source](https://support.google.com/merchants/answer/7439058) for local and online products.
157
161
  */
158
162
  primaryProductDataSource?: Schema$PrimaryProductDataSource;
159
163
  /**
160
- * Required. The [promotion](https://support.google.com/merchants/answer/2906014) data source.
164
+ * The [product review](https://support.google.com/merchants/answer/7045996) data source.
165
+ */
166
+ productReviewDataSource?: Schema$ProductReviewDataSource;
167
+ /**
168
+ * The [promotion](https://support.google.com/merchants/answer/2906014) data source.
161
169
  */
162
170
  promotionDataSource?: Schema$PromotionDataSource;
163
171
  /**
164
- * Required. The [regional inventory](https://support.google.com/merchants/answer/7439058) data source.
172
+ * The [regional inventory](https://support.google.com/merchants/answer/7439058) data source.
165
173
  */
166
174
  regionalInventoryDataSource?: Schema$RegionalInventoryDataSource;
167
175
  /**
168
- * Required. The [supplemental data source](https://support.google.com/merchants/answer/7439058) for local and online products.
176
+ * The [supplemental data source](https://support.google.com/merchants/answer/7439058) for local and online products.
169
177
  */
170
178
  supplementalProductDataSource?: Schema$SupplementalProductDataSource;
171
179
  }
180
+ /**
181
+ * Data source reference can be used to manage related data sources within the data source service.
182
+ */
183
+ export interface Schema$DataSourceReference {
184
+ /**
185
+ * Optional. The name of the primary data source. Format: `accounts/{account\}/dataSources/{datasource\}`
186
+ */
187
+ primaryDataSourceName?: string | null;
188
+ /**
189
+ * Self should be used to reference the primary data source itself.
190
+ */
191
+ self?: boolean | null;
192
+ /**
193
+ * Optional. The name of the supplemental data source. Format: `accounts/{account\}/dataSources/{datasource\}`
194
+ */
195
+ supplementalDataSourceName?: string | null;
196
+ }
197
+ /**
198
+ * Default rule management of the data source.
199
+ */
200
+ export interface Schema$DefaultRule {
201
+ /**
202
+ * Required. The list of data sources linked in the [default rule](https://support.google.com/merchants/answer/7450276). This list is ordered by the default rule priority of joining the data. It might include none or multiple references to `self` and supplemental data sources. The list must not be empty. To link the data source to the default rule, you need to add a new reference to this list (in sequential order). To unlink the data source from the default rule, you need to remove the given reference from this list. Changing the order of this list will result in changing the priority of data sources in the default rule. For example, providing the following list: [`1001`, `self`] will take attribute values from supplemental data source `1001`, and fallback to `self` if the attribute is not set in `1001`.
203
+ */
204
+ takeFromDataSources?: Schema$DataSourceReference[];
205
+ }
206
+ /**
207
+ * Destinations also known as [Marketing methods](https://support.google.com/merchants/answer/15130232) selections.
208
+ */
209
+ export interface Schema$Destination {
210
+ /**
211
+ * [Marketing methods](https://support.google.com/merchants/answer/15130232) (also known as destination) selections.
212
+ */
213
+ destination?: string | null;
214
+ /**
215
+ * The state of the destination.
216
+ */
217
+ state?: string | null;
218
+ }
172
219
  /**
173
220
  * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
174
221
  */
@@ -202,7 +249,7 @@ export namespace merchantapi_datasources_v1beta {
202
249
  */
203
250
  frequency?: string | null;
204
251
  /**
205
- * Optional. An optional password for fetch url. Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117).
252
+ * Optional. An optional password for fetch_uri. Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117).
206
253
  */
207
254
  password?: string | null;
208
255
  /**
@@ -214,7 +261,7 @@ export namespace merchantapi_datasources_v1beta {
214
261
  */
215
262
  timeZone?: string | null;
216
263
  /**
217
- * Optional. An optional user name for fetch url. Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117).
264
+ * Optional. An optional user name for fetch_uri. Used for [submitting data sources through SFTP](https://support.google.com/merchants/answer/13813117).
218
265
  */
219
266
  username?: string | null;
220
267
  }
@@ -235,6 +282,72 @@ export namespace merchantapi_datasources_v1beta {
235
282
  */
236
283
  fileName?: string | null;
237
284
  }
285
+ /**
286
+ * The file upload of a specific data source, that is, the result of the retrieval of the data source at a certain timestamp computed asynchronously when the data source processing is finished. Only applicable to file data sources.
287
+ */
288
+ export interface Schema$FileUpload {
289
+ /**
290
+ * Output only. The data source id.
291
+ */
292
+ dataSourceId?: string | null;
293
+ /**
294
+ * Output only. The list of issues occurring in the data source.
295
+ */
296
+ issues?: Schema$Issue[];
297
+ /**
298
+ * Output only. The number of items in the data source that were created.
299
+ */
300
+ itemsCreated?: string | null;
301
+ /**
302
+ * Output only. The number of items in the data source that were processed.
303
+ */
304
+ itemsTotal?: string | null;
305
+ /**
306
+ * Output only. The number of items in the data source that were updated.
307
+ */
308
+ itemsUpdated?: string | null;
309
+ /**
310
+ * Identifier. The name of the data source file upload. Format: `{datasource.name=accounts/{account\}/dataSources/{datasource\}/fileUploads/{fileupload\}\}`
311
+ */
312
+ name?: string | null;
313
+ /**
314
+ * Output only. The processing state of the data source.
315
+ */
316
+ processingState?: string | null;
317
+ /**
318
+ * Output only. The date at which the file of the data source was uploaded.
319
+ */
320
+ uploadTime?: string | null;
321
+ }
322
+ /**
323
+ * An error occurring in the data source, like "invalid price".
324
+ */
325
+ export interface Schema$Issue {
326
+ /**
327
+ * Output only. The code of the error, for example, "validation/invalid_value". Returns "?" if the code is unknown.
328
+ */
329
+ code?: string | null;
330
+ /**
331
+ * Output only. The number of occurrences of the error in the file upload.
332
+ */
333
+ count?: string | null;
334
+ /**
335
+ * Output only. The error description, for example, "Your data source contains items which have too many attributes, or are too big. These items will be dropped".
336
+ */
337
+ description?: string | null;
338
+ /**
339
+ * Output only. Link to the documentation explaining the issue in more details, if available.
340
+ */
341
+ documentationUri?: string | null;
342
+ /**
343
+ * Output only. The severity of the issue.
344
+ */
345
+ severity?: string | null;
346
+ /**
347
+ * Output only. The title of the issue, for example, "Item too big".
348
+ */
349
+ title?: string | null;
350
+ }
238
351
  /**
239
352
  * Response message for the ListDataSources method.
240
353
  */
@@ -261,12 +374,16 @@ export namespace merchantapi_datasources_v1beta {
261
374
  */
262
375
  feedLabel?: string | null;
263
376
  }
377
+ /**
378
+ * The merchant review data source.
379
+ */
380
+ export interface Schema$MerchantReviewDataSource {}
264
381
  /**
265
382
  * The primary data source for local and online products.
266
383
  */
267
384
  export interface Schema$PrimaryProductDataSource {
268
385
  /**
269
- * Required. Immutable. Specifies the type of data source channel.
386
+ * Optional. Immutable. Specifies the type of data source channel.
270
387
  */
271
388
  channel?: string | null;
272
389
  /**
@@ -277,6 +394,14 @@ export namespace merchantapi_datasources_v1beta {
277
394
  * Optional. The countries where the items may be displayed. Represented as a [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
278
395
  */
279
396
  countries?: string[] | null;
397
+ /**
398
+ * Optional. Default rule management of the data source. If set, the linked data sources will be replaced.
399
+ */
400
+ defaultRule?: Schema$DefaultRule;
401
+ /**
402
+ * Optional. A list of destinations describing where products of the data source can be shown. When retrieving the data source, the list contains all the destinations that can be used for the data source, including the ones that are disabled for the data source but enabled for the account. Only destinations that are enabled on the account, for example through program participation, can be enabled on the data source. If unset, during creation, the destinations will be inherited based on the account level program participation. If set, during creation or update, the data source will be set only for the specified destinations. Updating this field requires at least one destination.
403
+ */
404
+ destinations?: Schema$Destination[];
280
405
  /**
281
406
  * Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). See also [migration to feed labels](https://developers.google.com/shopping-content/guides/products/feed-labels). `feedLabel` and `contentLanguage` must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
282
407
  */
@@ -287,22 +412,26 @@ export namespace merchantapi_datasources_v1beta {
287
412
  */
288
413
  export interface Schema$ProductChange {
289
414
  /**
290
- * The new value of the changed resource or attribute.
415
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
291
416
  */
292
417
  newValue?: string | null;
293
418
  /**
294
- * The old value of the changed resource or attribute.
419
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
295
420
  */
296
421
  oldValue?: string | null;
297
422
  /**
298
- * Countries that have the change (if applicable)
423
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
299
424
  */
300
425
  regionCode?: string | null;
301
426
  /**
302
- * Reporting contexts that have the change (if applicable)
427
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
303
428
  */
304
429
  reportingContext?: string | null;
305
430
  }
431
+ /**
432
+ * The product review data source.
433
+ */
434
+ export interface Schema$ProductReviewDataSource {}
306
435
  /**
307
436
  * The message that the merchant will receive to notify about product status change event
308
437
  */
@@ -319,12 +448,20 @@ export namespace merchantapi_datasources_v1beta {
319
448
  * A message to describe the change that happened to the product
320
449
  */
321
450
  changes?: Schema$ProductChange[];
451
+ /**
452
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
453
+ */
454
+ eventTime?: string | null;
455
+ /**
456
+ * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
457
+ */
458
+ expirationTime?: string | null;
322
459
  /**
323
460
  * 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\}`
324
461
  */
325
462
  managingAccount?: string | null;
326
463
  /**
327
- * The product name. Format: `{product.name=accounts/{account\}/products/{product\}\}`
464
+ * The product name. Format: `accounts/{account\}/products/{product\}`
328
465
  */
329
466
  resource?: string | null;
330
467
  /**
@@ -363,7 +500,7 @@ export namespace merchantapi_datasources_v1beta {
363
500
  feedLabel?: string | null;
364
501
  }
365
502
  /**
366
- * The supplemental data source for local and online products.
503
+ * The supplemental data source for local and online products. After creation, you should make sure to link the supplemental product data source into one or more primary product data sources.
367
504
  */
368
505
  export interface Schema$SupplementalProductDataSource {
369
506
  /**
@@ -371,28 +508,32 @@ export namespace merchantapi_datasources_v1beta {
371
508
  */
372
509
  contentLanguage?: string | null;
373
510
  /**
374
- * Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). See also [migration to feed labels](https://developers.google.com/shopping-content/guides/products/feed-labels). `feedLabel` and `contentLanguage` must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept produts without that restriction.
511
+ * Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). See also [migration to feed labels](https://developers.google.com/shopping-content/guides/products/feed-labels). `feedLabel` and `contentLanguage` must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. The fields must be unset for data sources without file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept produts without that restriction.
375
512
  */
376
513
  feedLabel?: string | null;
514
+ /**
515
+ * Output only. The (unordered and deduplicated) list of all primary data sources linked to this data source in either default or custom rules. Supplemental data source cannot be deleted before all links are removed.
516
+ */
517
+ referencingPrimaryDataSources?: Schema$DataSourceReference[];
377
518
  }
378
519
  /**
379
520
  * Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
380
521
  */
381
522
  export interface Schema$TimeOfDay {
382
523
  /**
383
- * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
524
+ * Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
384
525
  */
385
526
  hours?: number | null;
386
527
  /**
387
- * Minutes of hour of day. Must be from 0 to 59.
528
+ * Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
388
529
  */
389
530
  minutes?: number | null;
390
531
  /**
391
- * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
532
+ * Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
392
533
  */
393
534
  nanos?: number | null;
394
535
  /**
395
- * Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
536
+ * Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
396
537
  */
397
538
  seconds?: number | null;
398
539
  }
@@ -408,8 +549,12 @@ export namespace merchantapi_datasources_v1beta {
408
549
 
409
550
  export class Resource$Accounts$Datasources {
410
551
  context: APIRequestContext;
552
+ fileUploads: Resource$Accounts$Datasources$Fileuploads;
411
553
  constructor(context: APIRequestContext) {
412
554
  this.context = context;
555
+ this.fileUploads = new Resource$Accounts$Datasources$Fileuploads(
556
+ this.context
557
+ );
413
558
  }
414
559
 
415
560
  /**
@@ -1013,4 +1158,107 @@ export namespace merchantapi_datasources_v1beta {
1013
1158
  */
1014
1159
  requestBody?: Schema$DataSource;
1015
1160
  }
1161
+
1162
+ export class Resource$Accounts$Datasources$Fileuploads {
1163
+ context: APIRequestContext;
1164
+ constructor(context: APIRequestContext) {
1165
+ this.context = context;
1166
+ }
1167
+
1168
+ /**
1169
+ * Gets the latest data source file upload. Only the `latest` alias is accepted for a file upload.
1170
+ *
1171
+ * @param params - Parameters for request
1172
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1173
+ * @param callback - Optional callback that handles the response.
1174
+ * @returns A promise if used with async/await, or void if used with a callback.
1175
+ */
1176
+ get(
1177
+ params: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1178
+ options: StreamMethodOptions
1179
+ ): GaxiosPromise<Readable>;
1180
+ get(
1181
+ params?: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1182
+ options?: MethodOptions
1183
+ ): GaxiosPromise<Schema$FileUpload>;
1184
+ get(
1185
+ params: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1186
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1187
+ callback: BodyResponseCallback<Readable>
1188
+ ): void;
1189
+ get(
1190
+ params: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1191
+ options: MethodOptions | BodyResponseCallback<Schema$FileUpload>,
1192
+ callback: BodyResponseCallback<Schema$FileUpload>
1193
+ ): void;
1194
+ get(
1195
+ params: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1196
+ callback: BodyResponseCallback<Schema$FileUpload>
1197
+ ): void;
1198
+ get(callback: BodyResponseCallback<Schema$FileUpload>): void;
1199
+ get(
1200
+ paramsOrCallback?:
1201
+ | Params$Resource$Accounts$Datasources$Fileuploads$Get
1202
+ | BodyResponseCallback<Schema$FileUpload>
1203
+ | BodyResponseCallback<Readable>,
1204
+ optionsOrCallback?:
1205
+ | MethodOptions
1206
+ | StreamMethodOptions
1207
+ | BodyResponseCallback<Schema$FileUpload>
1208
+ | BodyResponseCallback<Readable>,
1209
+ callback?:
1210
+ | BodyResponseCallback<Schema$FileUpload>
1211
+ | BodyResponseCallback<Readable>
1212
+ ): void | GaxiosPromise<Schema$FileUpload> | GaxiosPromise<Readable> {
1213
+ let params = (paramsOrCallback ||
1214
+ {}) as Params$Resource$Accounts$Datasources$Fileuploads$Get;
1215
+ let options = (optionsOrCallback || {}) as MethodOptions;
1216
+
1217
+ if (typeof paramsOrCallback === 'function') {
1218
+ callback = paramsOrCallback;
1219
+ params = {} as Params$Resource$Accounts$Datasources$Fileuploads$Get;
1220
+ options = {};
1221
+ }
1222
+
1223
+ if (typeof optionsOrCallback === 'function') {
1224
+ callback = optionsOrCallback;
1225
+ options = {};
1226
+ }
1227
+
1228
+ const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
1229
+ const parameters = {
1230
+ options: Object.assign(
1231
+ {
1232
+ url: (rootUrl + '/datasources/v1beta/{+name}').replace(
1233
+ /([^:]\/)\/+/g,
1234
+ '$1'
1235
+ ),
1236
+ method: 'GET',
1237
+ apiVersion: '',
1238
+ },
1239
+ options
1240
+ ),
1241
+ params,
1242
+ requiredParams: ['name'],
1243
+ pathParams: ['name'],
1244
+ context: this.context,
1245
+ };
1246
+ if (callback) {
1247
+ createAPIRequest<Schema$FileUpload>(
1248
+ parameters,
1249
+ callback as BodyResponseCallback<unknown>
1250
+ );
1251
+ } else {
1252
+ return createAPIRequest<Schema$FileUpload>(parameters);
1253
+ }
1254
+ }
1255
+ }
1256
+
1257
+ export interface Params$Resource$Accounts$Datasources$Fileuploads$Get
1258
+ extends StandardParameters {
1259
+ /**
1260
+ * Required. The name of the data source file upload to retrieve. Format: `accounts/{account\}/dataSources/{datasource\}/fileUploads/latest`
1261
+ */
1262
+ name?: string;
1263
+ }
1016
1264
  }
package/index.ts CHANGED
@@ -24,6 +24,7 @@ import {merchantapi_products_v1beta} from './products_v1beta';
24
24
  import {merchantapi_promotions_v1beta} from './promotions_v1beta';
25
25
  import {merchantapi_quota_v1beta} from './quota_v1beta';
26
26
  import {merchantapi_reports_v1beta} from './reports_v1beta';
27
+ import {merchantapi_reviews_v1beta} from './reviews_v1beta';
27
28
 
28
29
  export const VERSIONS = {
29
30
  accounts_v1beta: merchantapi_accounts_v1beta.Merchantapi,
@@ -36,6 +37,7 @@ export const VERSIONS = {
36
37
  promotions_v1beta: merchantapi_promotions_v1beta.Merchantapi,
37
38
  quota_v1beta: merchantapi_quota_v1beta.Merchantapi,
38
39
  reports_v1beta: merchantapi_reports_v1beta.Merchantapi,
40
+ reviews_v1beta: merchantapi_reviews_v1beta.Merchantapi,
39
41
  };
40
42
 
41
43
  export function merchantapi(
@@ -98,6 +100,12 @@ export function merchantapi(
98
100
  export function merchantapi(
99
101
  options: merchantapi_reports_v1beta.Options
100
102
  ): merchantapi_reports_v1beta.Merchantapi;
103
+ export function merchantapi(
104
+ version: 'reviews_v1beta'
105
+ ): merchantapi_reviews_v1beta.Merchantapi;
106
+ export function merchantapi(
107
+ options: merchantapi_reviews_v1beta.Options
108
+ ): merchantapi_reviews_v1beta.Merchantapi;
101
109
  export function merchantapi<
102
110
  T =
103
111
  | merchantapi_accounts_v1beta.Merchantapi
@@ -109,7 +117,8 @@ export function merchantapi<
109
117
  | merchantapi_products_v1beta.Merchantapi
110
118
  | merchantapi_promotions_v1beta.Merchantapi
111
119
  | merchantapi_quota_v1beta.Merchantapi
112
- | merchantapi_reports_v1beta.Merchantapi,
120
+ | merchantapi_reports_v1beta.Merchantapi
121
+ | merchantapi_reviews_v1beta.Merchantapi,
113
122
  >(
114
123
  this: GoogleConfigurable,
115
124
  versionOrOptions:
@@ -133,6 +142,8 @@ export function merchantapi<
133
142
  | merchantapi_quota_v1beta.Options
134
143
  | 'reports_v1beta'
135
144
  | merchantapi_reports_v1beta.Options
145
+ | 'reviews_v1beta'
146
+ | merchantapi_reviews_v1beta.Options
136
147
  ) {
137
148
  return getAPI<T>('merchantapi', versionOrOptions, VERSIONS, this);
138
149
  }
@@ -149,6 +160,7 @@ export {merchantapi_products_v1beta};
149
160
  export {merchantapi_promotions_v1beta};
150
161
  export {merchantapi_quota_v1beta};
151
162
  export {merchantapi_reports_v1beta};
163
+ export {merchantapi_reviews_v1beta};
152
164
  export {
153
165
  AuthPlus,
154
166
  GlobalOptions,
@@ -255,19 +255,19 @@ export namespace merchantapi_inventories_v1beta {
255
255
  */
256
256
  export interface Schema$ProductChange {
257
257
  /**
258
- * The new value of the changed resource or attribute.
258
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
259
259
  */
260
260
  newValue?: string | null;
261
261
  /**
262
- * The old value of the changed resource or attribute.
262
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
263
263
  */
264
264
  oldValue?: string | null;
265
265
  /**
266
- * Countries that have the change (if applicable)
266
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
267
267
  */
268
268
  regionCode?: string | null;
269
269
  /**
270
- * Reporting contexts that have the change (if applicable)
270
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
271
271
  */
272
272
  reportingContext?: string | null;
273
273
  }
@@ -287,12 +287,20 @@ export namespace merchantapi_inventories_v1beta {
287
287
  * A message to describe the change that happened to the product
288
288
  */
289
289
  changes?: Schema$ProductChange[];
290
+ /**
291
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
292
+ */
293
+ eventTime?: string | null;
294
+ /**
295
+ * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
296
+ */
297
+ expirationTime?: string | null;
290
298
  /**
291
299
  * 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\}`
292
300
  */
293
301
  managingAccount?: string | null;
294
302
  /**
295
- * The product name. Format: `{product.name=accounts/{account\}/products/{product\}\}`
303
+ * The product name. Format: `accounts/{account\}/products/{product\}`
296
304
  */
297
305
  resource?: string | null;
298
306
  /**
package/lfp_v1beta.ts CHANGED
@@ -322,19 +322,19 @@ export namespace merchantapi_lfp_v1beta {
322
322
  */
323
323
  export interface Schema$ProductChange {
324
324
  /**
325
- * The new value of the changed resource or attribute.
325
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
326
326
  */
327
327
  newValue?: string | null;
328
328
  /**
329
- * The old value of the changed resource or attribute.
329
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
330
330
  */
331
331
  oldValue?: string | null;
332
332
  /**
333
- * Countries that have the change (if applicable)
333
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
334
334
  */
335
335
  regionCode?: string | null;
336
336
  /**
337
- * Reporting contexts that have the change (if applicable)
337
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
338
338
  */
339
339
  reportingContext?: string | null;
340
340
  }
@@ -354,12 +354,20 @@ export namespace merchantapi_lfp_v1beta {
354
354
  * A message to describe the change that happened to the product
355
355
  */
356
356
  changes?: Schema$ProductChange[];
357
+ /**
358
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
359
+ */
360
+ eventTime?: string | null;
361
+ /**
362
+ * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
363
+ */
364
+ expirationTime?: string | null;
357
365
  /**
358
366
  * 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\}`
359
367
  */
360
368
  managingAccount?: string | null;
361
369
  /**
362
- * The product name. Format: `{product.name=accounts/{account\}/products/{product\}\}`
370
+ * The product name. Format: `accounts/{account\}/products/{product\}`
363
371
  */
364
372
  resource?: string | null;
365
373
  /**
@@ -171,19 +171,19 @@ export namespace merchantapi_notifications_v1beta {
171
171
  */
172
172
  export interface Schema$ProductChange {
173
173
  /**
174
- * The new value of the changed resource or attribute.
174
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
175
175
  */
176
176
  newValue?: string | null;
177
177
  /**
178
- * The old value of the changed resource or attribute.
178
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
179
179
  */
180
180
  oldValue?: string | null;
181
181
  /**
182
- * Countries that have the change (if applicable)
182
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
183
183
  */
184
184
  regionCode?: string | null;
185
185
  /**
186
- * Reporting contexts that have the change (if applicable)
186
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
187
187
  */
188
188
  reportingContext?: string | null;
189
189
  }
@@ -203,12 +203,20 @@ export namespace merchantapi_notifications_v1beta {
203
203
  * A message to describe the change that happened to the product
204
204
  */
205
205
  changes?: Schema$ProductChange[];
206
+ /**
207
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
208
+ */
209
+ eventTime?: string | null;
210
+ /**
211
+ * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
212
+ */
213
+ expirationTime?: string | null;
206
214
  /**
207
215
  * 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\}`
208
216
  */
209
217
  managingAccount?: string | null;
210
218
  /**
211
- * The product name. Format: `{product.name=accounts/{account\}/products/{product\}\}`
219
+ * The product name. Format: `accounts/{account\}/products/{product\}`
212
220
  */
213
221
  resource?: string | null;
214
222
  /**
@@ -238,7 +246,7 @@ export namespace merchantapi_notifications_v1beta {
238
246
  }
239
247
 
240
248
  /**
241
- * Creates a notification subscription for a merchant. We will allow the following types of notification subscriptions to exist together (per merchant as a subscriber per event type): 1. Subscription for all managed accounts + subscription for self 2. Multiple "partial" subscriptions for managed accounts + subscription for self we will not allow (per merchant as a subscriber per event type): 1. multiple self subscriptions. 2. multiple "all managed accounts" subscriptions. 3. all and partial subscriptions at the same time. 4. multiple partial subscriptions for the same target account
249
+ * Creates a notification subscription for a business. For standalone or subaccounts accounts, the business can create a subscription for self. For MCAs, the business can create a subscription for all managed accounts or for a specific subaccount. We will allow the following types of notification subscriptions to exist together (per business as a subscriber per event type): 1. Subscription for all managed accounts + subscription for self. 2. Multiple "partial" subscriptions for managed accounts + subscription for self. we will not allow (per business as a subscriber per event type): 1. Multiple self subscriptions. 2. Multiple "all managed accounts" subscriptions. 3. "All managed accounts" subscription and partial subscriptions at the same time. 4. Multiple partial subscriptions for the same target account.
242
250
  *
243
251
  * @param params - Parameters for request
244
252
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/merchantapi",
3
- "version": "1.1.0",
3
+ "version": "4.1.0",
4
4
  "description": "merchantapi",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",