@googleapis/merchantapi 6.0.1 → 8.0.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 (44) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +9 -0
  3. package/accounts_v1beta.ts +6214 -358
  4. package/build/accounts_v1beta.d.ts +4685 -141
  5. package/build/accounts_v1beta.js +560 -12
  6. package/build/accounts_v1beta.js.map +1 -1
  7. package/build/conversions_v1beta.d.ts +336 -1
  8. package/build/conversions_v1beta.js.map +1 -1
  9. package/build/datasources_v1beta.d.ts +411 -2
  10. package/build/datasources_v1beta.js.map +1 -1
  11. package/build/inventories_v1beta.d.ts +336 -2
  12. package/build/inventories_v1beta.js.map +1 -1
  13. package/build/issueresolution_v1beta.d.ts +367 -1
  14. package/build/issueresolution_v1beta.js +48 -0
  15. package/build/issueresolution_v1beta.js.map +1 -1
  16. package/build/lfp_v1beta.d.ts +436 -3
  17. package/build/lfp_v1beta.js.map +1 -1
  18. package/build/notifications_v1beta.d.ts +272 -1
  19. package/build/notifications_v1beta.js.map +1 -1
  20. package/build/ordertracking_v1beta.d.ts +75 -1
  21. package/build/ordertracking_v1beta.js.map +1 -1
  22. package/build/products_v1beta.d.ts +347 -44
  23. package/build/products_v1beta.js.map +1 -1
  24. package/build/promotions_v1beta.d.ts +171 -4
  25. package/build/promotions_v1beta.js.map +1 -1
  26. package/build/quota_v1beta.d.ts +52 -1
  27. package/build/quota_v1beta.js.map +1 -1
  28. package/build/reports_v1beta.d.ts +58 -1
  29. package/build/reports_v1beta.js.map +1 -1
  30. package/build/reviews_v1beta.d.ts +426 -2
  31. package/build/reviews_v1beta.js.map +1 -1
  32. package/conversions_v1beta.ts +336 -1
  33. package/datasources_v1beta.ts +411 -2
  34. package/inventories_v1beta.ts +336 -2
  35. package/issueresolution_v1beta.ts +465 -1
  36. package/lfp_v1beta.ts +436 -3
  37. package/notifications_v1beta.ts +272 -1
  38. package/ordertracking_v1beta.ts +75 -1
  39. package/package.json +1 -1
  40. package/products_v1beta.ts +347 -44
  41. package/promotions_v1beta.ts +171 -4
  42. package/quota_v1beta.ts +52 -1
  43. package/reports_v1beta.ts +58 -1
  44. package/reviews_v1beta.ts +426 -2
@@ -208,7 +208,7 @@ export namespace merchantapi_notifications_v1beta {
208
208
  */
209
209
  eventTime?: string | null;
210
210
  /**
211
- * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
211
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
212
212
  */
213
213
  expirationTime?: string | null;
214
214
  /**
@@ -247,6 +247,68 @@ export namespace merchantapi_notifications_v1beta {
247
247
 
248
248
  /**
249
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.
250
+ * @example
251
+ * ```js
252
+ * // Before running the sample:
253
+ * // - Enable the API at:
254
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
255
+ * // - Login into gcloud by running:
256
+ * // ```sh
257
+ * // $ gcloud auth application-default login
258
+ * // ```
259
+ * // - Install the npm module by running:
260
+ * // ```sh
261
+ * // $ npm install googleapis
262
+ * // ```
263
+ *
264
+ * const {google} = require('googleapis');
265
+ * const merchantapi = google.merchantapi('notifications_v1beta');
266
+ *
267
+ * async function main() {
268
+ * const auth = new google.auth.GoogleAuth({
269
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
270
+ * scopes: ['https://www.googleapis.com/auth/content'],
271
+ * });
272
+ *
273
+ * // Acquire an auth client, and bind it to all future calls
274
+ * const authClient = await auth.getClient();
275
+ * google.options({auth: authClient});
276
+ *
277
+ * // Do the magic
278
+ * const res = await merchantapi.accounts.notificationsubscriptions.create({
279
+ * // Required. The merchant account that owns the new notification subscription. Format: `accounts/{account\}`
280
+ * parent: 'accounts/my-account',
281
+ *
282
+ * // Request body metadata
283
+ * requestBody: {
284
+ * // request body parameters
285
+ * // {
286
+ * // "allManagedAccounts": false,
287
+ * // "callBackUri": "my_callBackUri",
288
+ * // "name": "my_name",
289
+ * // "registeredEvent": "my_registeredEvent",
290
+ * // "targetAccount": "my_targetAccount"
291
+ * // }
292
+ * },
293
+ * });
294
+ * console.log(res.data);
295
+ *
296
+ * // Example response
297
+ * // {
298
+ * // "allManagedAccounts": false,
299
+ * // "callBackUri": "my_callBackUri",
300
+ * // "name": "my_name",
301
+ * // "registeredEvent": "my_registeredEvent",
302
+ * // "targetAccount": "my_targetAccount"
303
+ * // }
304
+ * }
305
+ *
306
+ * main().catch(e => {
307
+ * console.error(e);
308
+ * throw e;
309
+ * });
310
+ *
311
+ * ```
250
312
  *
251
313
  * @param params - Parameters for request
252
314
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -343,6 +405,50 @@ export namespace merchantapi_notifications_v1beta {
343
405
 
344
406
  /**
345
407
  * Deletes a notification subscription for a merchant.
408
+ * @example
409
+ * ```js
410
+ * // Before running the sample:
411
+ * // - Enable the API at:
412
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
413
+ * // - Login into gcloud by running:
414
+ * // ```sh
415
+ * // $ gcloud auth application-default login
416
+ * // ```
417
+ * // - Install the npm module by running:
418
+ * // ```sh
419
+ * // $ npm install googleapis
420
+ * // ```
421
+ *
422
+ * const {google} = require('googleapis');
423
+ * const merchantapi = google.merchantapi('notifications_v1beta');
424
+ *
425
+ * async function main() {
426
+ * const auth = new google.auth.GoogleAuth({
427
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
428
+ * scopes: ['https://www.googleapis.com/auth/content'],
429
+ * });
430
+ *
431
+ * // Acquire an auth client, and bind it to all future calls
432
+ * const authClient = await auth.getClient();
433
+ * google.options({auth: authClient});
434
+ *
435
+ * // Do the magic
436
+ * const res = await merchantapi.accounts.notificationsubscriptions.delete({
437
+ * // Required. The name of the notification subscription to be deleted.
438
+ * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
439
+ * });
440
+ * console.log(res.data);
441
+ *
442
+ * // Example response
443
+ * // {}
444
+ * }
445
+ *
446
+ * main().catch(e => {
447
+ * console.error(e);
448
+ * throw e;
449
+ * });
450
+ *
451
+ * ```
346
452
  *
347
453
  * @param params - Parameters for request
348
454
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -435,6 +541,56 @@ export namespace merchantapi_notifications_v1beta {
435
541
 
436
542
  /**
437
543
  * Gets notification subscriptions for an account.
544
+ * @example
545
+ * ```js
546
+ * // Before running the sample:
547
+ * // - Enable the API at:
548
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
549
+ * // - Login into gcloud by running:
550
+ * // ```sh
551
+ * // $ gcloud auth application-default login
552
+ * // ```
553
+ * // - Install the npm module by running:
554
+ * // ```sh
555
+ * // $ npm install googleapis
556
+ * // ```
557
+ *
558
+ * const {google} = require('googleapis');
559
+ * const merchantapi = google.merchantapi('notifications_v1beta');
560
+ *
561
+ * async function main() {
562
+ * const auth = new google.auth.GoogleAuth({
563
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
564
+ * scopes: ['https://www.googleapis.com/auth/content'],
565
+ * });
566
+ *
567
+ * // Acquire an auth client, and bind it to all future calls
568
+ * const authClient = await auth.getClient();
569
+ * google.options({auth: authClient});
570
+ *
571
+ * // Do the magic
572
+ * const res = await merchantapi.accounts.notificationsubscriptions.get({
573
+ * // Required. The `name` of the notification subscription.
574
+ * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
575
+ * });
576
+ * console.log(res.data);
577
+ *
578
+ * // Example response
579
+ * // {
580
+ * // "allManagedAccounts": false,
581
+ * // "callBackUri": "my_callBackUri",
582
+ * // "name": "my_name",
583
+ * // "registeredEvent": "my_registeredEvent",
584
+ * // "targetAccount": "my_targetAccount"
585
+ * // }
586
+ * }
587
+ *
588
+ * main().catch(e => {
589
+ * console.error(e);
590
+ * throw e;
591
+ * });
592
+ *
593
+ * ```
438
594
  *
439
595
  * @param params - Parameters for request
440
596
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -528,6 +684,57 @@ export namespace merchantapi_notifications_v1beta {
528
684
 
529
685
  /**
530
686
  * Gets all the notification subscriptions for a merchant.
687
+ * @example
688
+ * ```js
689
+ * // Before running the sample:
690
+ * // - Enable the API at:
691
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
692
+ * // - Login into gcloud by running:
693
+ * // ```sh
694
+ * // $ gcloud auth application-default login
695
+ * // ```
696
+ * // - Install the npm module by running:
697
+ * // ```sh
698
+ * // $ npm install googleapis
699
+ * // ```
700
+ *
701
+ * const {google} = require('googleapis');
702
+ * const merchantapi = google.merchantapi('notifications_v1beta');
703
+ *
704
+ * async function main() {
705
+ * const auth = new google.auth.GoogleAuth({
706
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
707
+ * scopes: ['https://www.googleapis.com/auth/content'],
708
+ * });
709
+ *
710
+ * // Acquire an auth client, and bind it to all future calls
711
+ * const authClient = await auth.getClient();
712
+ * google.options({auth: authClient});
713
+ *
714
+ * // Do the magic
715
+ * const res = await merchantapi.accounts.notificationsubscriptions.list({
716
+ * // The maximum number of notification subscriptions to return in a page. The default value for `page_size` is 100. The maximum value is `200`. Values above `200` will be coerced to `200`.
717
+ * pageSize: 'placeholder-value',
718
+ * // Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.
719
+ * pageToken: 'placeholder-value',
720
+ * // Required. The merchant account who owns the notification subscriptions. Format: `accounts/{account\}`
721
+ * parent: 'accounts/my-account',
722
+ * });
723
+ * console.log(res.data);
724
+ *
725
+ * // Example response
726
+ * // {
727
+ * // "nextPageToken": "my_nextPageToken",
728
+ * // "notificationSubscriptions": []
729
+ * // }
730
+ * }
731
+ *
732
+ * main().catch(e => {
733
+ * console.error(e);
734
+ * throw e;
735
+ * });
736
+ *
737
+ * ```
531
738
  *
532
739
  * @param params - Parameters for request
533
740
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -629,6 +836,70 @@ export namespace merchantapi_notifications_v1beta {
629
836
 
630
837
  /**
631
838
  * Updates an existing notification subscription for a merchant.
839
+ * @example
840
+ * ```js
841
+ * // Before running the sample:
842
+ * // - Enable the API at:
843
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
844
+ * // - Login into gcloud by running:
845
+ * // ```sh
846
+ * // $ gcloud auth application-default login
847
+ * // ```
848
+ * // - Install the npm module by running:
849
+ * // ```sh
850
+ * // $ npm install googleapis
851
+ * // ```
852
+ *
853
+ * const {google} = require('googleapis');
854
+ * const merchantapi = google.merchantapi('notifications_v1beta');
855
+ *
856
+ * async function main() {
857
+ * const auth = new google.auth.GoogleAuth({
858
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
859
+ * scopes: ['https://www.googleapis.com/auth/content'],
860
+ * });
861
+ *
862
+ * // Acquire an auth client, and bind it to all future calls
863
+ * const authClient = await auth.getClient();
864
+ * google.options({auth: authClient});
865
+ *
866
+ * // Do the magic
867
+ * const res = await merchantapi.accounts.notificationsubscriptions.patch({
868
+ * // Output only. The `name` of the notification configuration. Generated by the Content API upon creation of a new `NotificationSubscription`. The `account` represents the merchant ID of the merchant that owns the configuration. Format: `accounts/{account\}/notificationsubscriptions/{notification_subscription\}`
869
+ * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
870
+ * // List of fields being updated.
871
+ * updateMask: 'placeholder-value',
872
+ *
873
+ * // Request body metadata
874
+ * requestBody: {
875
+ * // request body parameters
876
+ * // {
877
+ * // "allManagedAccounts": false,
878
+ * // "callBackUri": "my_callBackUri",
879
+ * // "name": "my_name",
880
+ * // "registeredEvent": "my_registeredEvent",
881
+ * // "targetAccount": "my_targetAccount"
882
+ * // }
883
+ * },
884
+ * });
885
+ * console.log(res.data);
886
+ *
887
+ * // Example response
888
+ * // {
889
+ * // "allManagedAccounts": false,
890
+ * // "callBackUri": "my_callBackUri",
891
+ * // "name": "my_name",
892
+ * // "registeredEvent": "my_registeredEvent",
893
+ * // "targetAccount": "my_targetAccount"
894
+ * // }
895
+ * }
896
+ *
897
+ * main().catch(e => {
898
+ * console.error(e);
899
+ * throw e;
900
+ * });
901
+ *
902
+ * ```
632
903
  *
633
904
  * @param params - Parameters for request
634
905
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -298,7 +298,7 @@ export namespace merchantapi_ordertracking_v1beta {
298
298
  */
299
299
  eventTime?: string | null;
300
300
  /**
301
- * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
301
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
302
302
  */
303
303
  expirationTime?: string | null;
304
304
  /**
@@ -417,6 +417,80 @@ export namespace merchantapi_ordertracking_v1beta {
417
417
 
418
418
  /**
419
419
  * Creates new order tracking signal.
420
+ * @example
421
+ * ```js
422
+ * // Before running the sample:
423
+ * // - Enable the API at:
424
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
425
+ * // - Login into gcloud by running:
426
+ * // ```sh
427
+ * // $ gcloud auth application-default login
428
+ * // ```
429
+ * // - Install the npm module by running:
430
+ * // ```sh
431
+ * // $ npm install googleapis
432
+ * // ```
433
+ *
434
+ * const {google} = require('googleapis');
435
+ * const merchantapi = google.merchantapi('ordertracking_v1beta');
436
+ *
437
+ * async function main() {
438
+ * const auth = new google.auth.GoogleAuth({
439
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
440
+ * scopes: ['https://www.googleapis.com/auth/content'],
441
+ * });
442
+ *
443
+ * // Acquire an auth client, and bind it to all future calls
444
+ * const authClient = await auth.getClient();
445
+ * google.options({auth: authClient});
446
+ *
447
+ * // Do the magic
448
+ * const res = await merchantapi.accounts.ordertrackingsignals.create({
449
+ * // Output only. The ID that uniquely identifies this order tracking signal.
450
+ * orderTrackingSignalId: 'placeholder-value',
451
+ * // Required. The account of the business for which the order signal is created. Format: accounts/{account\}
452
+ * parent: 'accounts/my-account',
453
+ *
454
+ * // Request body metadata
455
+ * requestBody: {
456
+ * // request body parameters
457
+ * // {
458
+ * // "customerShippingFee": {},
459
+ * // "deliveryPostalCode": "my_deliveryPostalCode",
460
+ * // "deliveryRegionCode": "my_deliveryRegionCode",
461
+ * // "lineItems": [],
462
+ * // "merchantId": "my_merchantId",
463
+ * // "orderCreatedTime": {},
464
+ * // "orderId": "my_orderId",
465
+ * // "orderTrackingSignalId": "my_orderTrackingSignalId",
466
+ * // "shipmentLineItemMapping": [],
467
+ * // "shippingInfo": []
468
+ * // }
469
+ * },
470
+ * });
471
+ * console.log(res.data);
472
+ *
473
+ * // Example response
474
+ * // {
475
+ * // "customerShippingFee": {},
476
+ * // "deliveryPostalCode": "my_deliveryPostalCode",
477
+ * // "deliveryRegionCode": "my_deliveryRegionCode",
478
+ * // "lineItems": [],
479
+ * // "merchantId": "my_merchantId",
480
+ * // "orderCreatedTime": {},
481
+ * // "orderId": "my_orderId",
482
+ * // "orderTrackingSignalId": "my_orderTrackingSignalId",
483
+ * // "shipmentLineItemMapping": [],
484
+ * // "shippingInfo": []
485
+ * // }
486
+ * }
487
+ *
488
+ * main().catch(e => {
489
+ * console.error(e);
490
+ * throw e;
491
+ * });
492
+ *
493
+ * ```
420
494
  *
421
495
  * @param params - Parameters for request
422
496
  * @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": "6.0.1",
3
+ "version": "8.0.0",
4
4
  "description": "merchantapi",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",