@googleapis/merchantapi 5.0.0 → 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 (49) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +9 -0
  3. package/accounts_v1beta.ts +6487 -518
  4. package/build/accounts_v1beta.d.ts +4773 -229
  5. package/build/accounts_v1beta.js +560 -12
  6. package/build/accounts_v1beta.js.map +1 -1
  7. package/build/conversions_v1beta.d.ts +349 -14
  8. package/build/conversions_v1beta.js.map +1 -1
  9. package/build/datasources_v1beta.d.ts +427 -18
  10. package/build/datasources_v1beta.js.map +1 -1
  11. package/build/index.d.ts +11 -1
  12. package/build/index.js +7 -1
  13. package/build/index.js.map +1 -1
  14. package/build/inventories_v1beta.d.ts +349 -15
  15. package/build/inventories_v1beta.js.map +1 -1
  16. package/build/issueresolution_v1beta.d.ts +1027 -0
  17. package/build/issueresolution_v1beta.js +196 -0
  18. package/build/issueresolution_v1beta.js.map +1 -0
  19. package/build/lfp_v1beta.d.ts +451 -18
  20. package/build/lfp_v1beta.js.map +1 -1
  21. package/build/notifications_v1beta.d.ts +283 -12
  22. package/build/notifications_v1beta.js.map +1 -1
  23. package/build/ordertracking_v1beta.d.ts +459 -0
  24. package/build/ordertracking_v1beta.js +91 -0
  25. package/build/ordertracking_v1beta.js.map +1 -0
  26. package/build/products_v1beta.d.ts +358 -55
  27. package/build/products_v1beta.js.map +1 -1
  28. package/build/promotions_v1beta.d.ts +178 -11
  29. package/build/promotions_v1beta.js.map +1 -1
  30. package/build/quota_v1beta.d.ts +55 -4
  31. package/build/quota_v1beta.js.map +1 -1
  32. package/build/reports_v1beta.d.ts +61 -4
  33. package/build/reports_v1beta.js.map +1 -1
  34. package/build/reviews_v1beta.d.ts +443 -19
  35. package/build/reviews_v1beta.js.map +1 -1
  36. package/conversions_v1beta.ts +371 -21
  37. package/datasources_v1beta.ts +453 -26
  38. package/index.ts +24 -1
  39. package/inventories_v1beta.ts +367 -24
  40. package/issueresolution_v1beta.ts +1426 -0
  41. package/lfp_v1beta.ts +477 -26
  42. package/notifications_v1beta.ts +299 -21
  43. package/ordertracking_v1beta.ts +599 -0
  44. package/package.json +2 -2
  45. package/products_v1beta.ts +376 -61
  46. package/promotions_v1beta.ts +188 -15
  47. package/quota_v1beta.ts +57 -6
  48. package/reports_v1beta.ts +65 -5
  49. package/reviews_v1beta.ts +471 -29
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -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`.
@@ -256,11 +318,11 @@ export namespace merchantapi_notifications_v1beta {
256
318
  create(
257
319
  params: Params$Resource$Accounts$Notificationsubscriptions$Create,
258
320
  options: StreamMethodOptions
259
- ): GaxiosPromise<Readable>;
321
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
260
322
  create(
261
323
  params?: Params$Resource$Accounts$Notificationsubscriptions$Create,
262
324
  options?: MethodOptions
263
- ): GaxiosPromise<Schema$NotificationSubscription>;
325
+ ): Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>;
264
326
  create(
265
327
  params: Params$Resource$Accounts$Notificationsubscriptions$Create,
266
328
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -295,8 +357,8 @@ export namespace merchantapi_notifications_v1beta {
295
357
  | BodyResponseCallback<Readable>
296
358
  ):
297
359
  | void
298
- | GaxiosPromise<Schema$NotificationSubscription>
299
- | GaxiosPromise<Readable> {
360
+ | Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>
361
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
300
362
  let params = (paramsOrCallback ||
301
363
  {}) as Params$Resource$Accounts$Notificationsubscriptions$Create;
302
364
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -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`.
@@ -352,11 +458,11 @@ export namespace merchantapi_notifications_v1beta {
352
458
  delete(
353
459
  params: Params$Resource$Accounts$Notificationsubscriptions$Delete,
354
460
  options: StreamMethodOptions
355
- ): GaxiosPromise<Readable>;
461
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
356
462
  delete(
357
463
  params?: Params$Resource$Accounts$Notificationsubscriptions$Delete,
358
464
  options?: MethodOptions
359
- ): GaxiosPromise<Schema$Empty>;
465
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
360
466
  delete(
361
467
  params: Params$Resource$Accounts$Notificationsubscriptions$Delete,
362
468
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -385,7 +491,10 @@ export namespace merchantapi_notifications_v1beta {
385
491
  callback?:
386
492
  | BodyResponseCallback<Schema$Empty>
387
493
  | BodyResponseCallback<Readable>
388
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
494
+ ):
495
+ | void
496
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
497
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
389
498
  let params = (paramsOrCallback ||
390
499
  {}) as Params$Resource$Accounts$Notificationsubscriptions$Delete;
391
500
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -432,6 +541,56 @@ export namespace merchantapi_notifications_v1beta {
432
541
 
433
542
  /**
434
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
+ * ```
435
594
  *
436
595
  * @param params - Parameters for request
437
596
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -441,11 +600,11 @@ export namespace merchantapi_notifications_v1beta {
441
600
  get(
442
601
  params: Params$Resource$Accounts$Notificationsubscriptions$Get,
443
602
  options: StreamMethodOptions
444
- ): GaxiosPromise<Readable>;
603
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
445
604
  get(
446
605
  params?: Params$Resource$Accounts$Notificationsubscriptions$Get,
447
606
  options?: MethodOptions
448
- ): GaxiosPromise<Schema$NotificationSubscription>;
607
+ ): Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>;
449
608
  get(
450
609
  params: Params$Resource$Accounts$Notificationsubscriptions$Get,
451
610
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -478,8 +637,8 @@ export namespace merchantapi_notifications_v1beta {
478
637
  | BodyResponseCallback<Readable>
479
638
  ):
480
639
  | void
481
- | GaxiosPromise<Schema$NotificationSubscription>
482
- | GaxiosPromise<Readable> {
640
+ | Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>
641
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
483
642
  let params = (paramsOrCallback ||
484
643
  {}) as Params$Resource$Accounts$Notificationsubscriptions$Get;
485
644
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -525,6 +684,57 @@ export namespace merchantapi_notifications_v1beta {
525
684
 
526
685
  /**
527
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
+ * ```
528
738
  *
529
739
  * @param params - Parameters for request
530
740
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -534,11 +744,13 @@ export namespace merchantapi_notifications_v1beta {
534
744
  list(
535
745
  params: Params$Resource$Accounts$Notificationsubscriptions$List,
536
746
  options: StreamMethodOptions
537
- ): GaxiosPromise<Readable>;
747
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
538
748
  list(
539
749
  params?: Params$Resource$Accounts$Notificationsubscriptions$List,
540
750
  options?: MethodOptions
541
- ): GaxiosPromise<Schema$ListNotificationSubscriptionsResponse>;
751
+ ): Promise<
752
+ GaxiosResponseWithHTTP2<Schema$ListNotificationSubscriptionsResponse>
753
+ >;
542
754
  list(
543
755
  params: Params$Resource$Accounts$Notificationsubscriptions$List,
544
756
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -573,8 +785,10 @@ export namespace merchantapi_notifications_v1beta {
573
785
  | BodyResponseCallback<Readable>
574
786
  ):
575
787
  | void
576
- | GaxiosPromise<Schema$ListNotificationSubscriptionsResponse>
577
- | GaxiosPromise<Readable> {
788
+ | Promise<
789
+ GaxiosResponseWithHTTP2<Schema$ListNotificationSubscriptionsResponse>
790
+ >
791
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
578
792
  let params = (paramsOrCallback ||
579
793
  {}) as Params$Resource$Accounts$Notificationsubscriptions$List;
580
794
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -622,6 +836,70 @@ export namespace merchantapi_notifications_v1beta {
622
836
 
623
837
  /**
624
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
+ * ```
625
903
  *
626
904
  * @param params - Parameters for request
627
905
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -631,11 +909,11 @@ export namespace merchantapi_notifications_v1beta {
631
909
  patch(
632
910
  params: Params$Resource$Accounts$Notificationsubscriptions$Patch,
633
911
  options: StreamMethodOptions
634
- ): GaxiosPromise<Readable>;
912
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
635
913
  patch(
636
914
  params?: Params$Resource$Accounts$Notificationsubscriptions$Patch,
637
915
  options?: MethodOptions
638
- ): GaxiosPromise<Schema$NotificationSubscription>;
916
+ ): Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>;
639
917
  patch(
640
918
  params: Params$Resource$Accounts$Notificationsubscriptions$Patch,
641
919
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -670,8 +948,8 @@ export namespace merchantapi_notifications_v1beta {
670
948
  | BodyResponseCallback<Readable>
671
949
  ):
672
950
  | void
673
- | GaxiosPromise<Schema$NotificationSubscription>
674
- | GaxiosPromise<Readable> {
951
+ | Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>
952
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
675
953
  let params = (paramsOrCallback ||
676
954
  {}) as Params$Resource$Accounts$Notificationsubscriptions$Patch;
677
955
  let options = (optionsOrCallback || {}) as MethodOptions;