@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
package/reviews_v1beta.ts CHANGED
@@ -411,7 +411,7 @@ export namespace merchantapi_reviews_v1beta {
411
411
  */
412
412
  cons?: string[] | null;
413
413
  /**
414
- * Required. The content of the review.
414
+ * Optional. The content of the review. If empty, the content might still get populated from pros and cons.
415
415
  */
416
416
  content?: string | null;
417
417
  /**
@@ -595,7 +595,7 @@ export namespace merchantapi_reviews_v1beta {
595
595
  */
596
596
  eventTime?: string | null;
597
597
  /**
598
- * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
598
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
599
599
  */
600
600
  expirationTime?: string | null;
601
601
  /**
@@ -650,6 +650,50 @@ export namespace merchantapi_reviews_v1beta {
650
650
 
651
651
  /**
652
652
  * Deletes merchant review.
653
+ * @example
654
+ * ```js
655
+ * // Before running the sample:
656
+ * // - Enable the API at:
657
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
658
+ * // - Login into gcloud by running:
659
+ * // ```sh
660
+ * // $ gcloud auth application-default login
661
+ * // ```
662
+ * // - Install the npm module by running:
663
+ * // ```sh
664
+ * // $ npm install googleapis
665
+ * // ```
666
+ *
667
+ * const {google} = require('googleapis');
668
+ * const merchantapi = google.merchantapi('reviews_v1beta');
669
+ *
670
+ * async function main() {
671
+ * const auth = new google.auth.GoogleAuth({
672
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
673
+ * scopes: ['https://www.googleapis.com/auth/content'],
674
+ * });
675
+ *
676
+ * // Acquire an auth client, and bind it to all future calls
677
+ * const authClient = await auth.getClient();
678
+ * google.options({auth: authClient});
679
+ *
680
+ * // Do the magic
681
+ * const res = await merchantapi.accounts.merchantReviews.delete({
682
+ * // Required. The ID of the merchant review. Format: accounts/{account\}/merchantReviews/{merchantReview\}
683
+ * name: 'accounts/my-account/merchantReviews/my-merchantReview',
684
+ * });
685
+ * console.log(res.data);
686
+ *
687
+ * // Example response
688
+ * // {}
689
+ * }
690
+ *
691
+ * main().catch(e => {
692
+ * console.error(e);
693
+ * throw e;
694
+ * });
695
+ *
696
+ * ```
653
697
  *
654
698
  * @param params - Parameters for request
655
699
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -741,6 +785,57 @@ export namespace merchantapi_reviews_v1beta {
741
785
 
742
786
  /**
743
787
  * Gets a merchant review.
788
+ * @example
789
+ * ```js
790
+ * // Before running the sample:
791
+ * // - Enable the API at:
792
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
793
+ * // - Login into gcloud by running:
794
+ * // ```sh
795
+ * // $ gcloud auth application-default login
796
+ * // ```
797
+ * // - Install the npm module by running:
798
+ * // ```sh
799
+ * // $ npm install googleapis
800
+ * // ```
801
+ *
802
+ * const {google} = require('googleapis');
803
+ * const merchantapi = google.merchantapi('reviews_v1beta');
804
+ *
805
+ * async function main() {
806
+ * const auth = new google.auth.GoogleAuth({
807
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
808
+ * scopes: ['https://www.googleapis.com/auth/content'],
809
+ * });
810
+ *
811
+ * // Acquire an auth client, and bind it to all future calls
812
+ * const authClient = await auth.getClient();
813
+ * google.options({auth: authClient});
814
+ *
815
+ * // Do the magic
816
+ * const res = await merchantapi.accounts.merchantReviews.get({
817
+ * // Required. The ID of the merchant review. Format: accounts/{account\}/merchantReviews/{merchantReview\}
818
+ * name: 'accounts/my-account/merchantReviews/my-merchantReview',
819
+ * });
820
+ * console.log(res.data);
821
+ *
822
+ * // Example response
823
+ * // {
824
+ * // "attributes": {},
825
+ * // "customAttributes": [],
826
+ * // "dataSource": "my_dataSource",
827
+ * // "merchantReviewId": "my_merchantReviewId",
828
+ * // "merchantReviewStatus": {},
829
+ * // "name": "my_name"
830
+ * // }
831
+ * }
832
+ *
833
+ * main().catch(e => {
834
+ * console.error(e);
835
+ * throw e;
836
+ * });
837
+ *
838
+ * ```
744
839
  *
745
840
  * @param params - Parameters for request
746
841
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -832,6 +927,72 @@ export namespace merchantapi_reviews_v1beta {
832
927
 
833
928
  /**
834
929
  * Inserts a review for your Merchant Center account. If the review already exists, then the review is replaced with the new instance.
930
+ * @example
931
+ * ```js
932
+ * // Before running the sample:
933
+ * // - Enable the API at:
934
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
935
+ * // - Login into gcloud by running:
936
+ * // ```sh
937
+ * // $ gcloud auth application-default login
938
+ * // ```
939
+ * // - Install the npm module by running:
940
+ * // ```sh
941
+ * // $ npm install googleapis
942
+ * // ```
943
+ *
944
+ * const {google} = require('googleapis');
945
+ * const merchantapi = google.merchantapi('reviews_v1beta');
946
+ *
947
+ * async function main() {
948
+ * const auth = new google.auth.GoogleAuth({
949
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
950
+ * scopes: ['https://www.googleapis.com/auth/content'],
951
+ * });
952
+ *
953
+ * // Acquire an auth client, and bind it to all future calls
954
+ * const authClient = await auth.getClient();
955
+ * google.options({auth: authClient});
956
+ *
957
+ * // Do the magic
958
+ * const res = await merchantapi.accounts.merchantReviews.insert({
959
+ * // Required. The data source of the [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) Format: `accounts/{account\}/dataSources/{datasource\}`.
960
+ * dataSource: 'placeholder-value',
961
+ * // Required. The account where the merchant review will be inserted. Format: accounts/{account\}
962
+ * parent: 'accounts/my-account',
963
+ *
964
+ * // Request body metadata
965
+ * requestBody: {
966
+ * // request body parameters
967
+ * // {
968
+ * // "attributes": {},
969
+ * // "customAttributes": [],
970
+ * // "dataSource": "my_dataSource",
971
+ * // "merchantReviewId": "my_merchantReviewId",
972
+ * // "merchantReviewStatus": {},
973
+ * // "name": "my_name"
974
+ * // }
975
+ * },
976
+ * });
977
+ * console.log(res.data);
978
+ *
979
+ * // Example response
980
+ * // {
981
+ * // "attributes": {},
982
+ * // "customAttributes": [],
983
+ * // "dataSource": "my_dataSource",
984
+ * // "merchantReviewId": "my_merchantReviewId",
985
+ * // "merchantReviewStatus": {},
986
+ * // "name": "my_name"
987
+ * // }
988
+ * }
989
+ *
990
+ * main().catch(e => {
991
+ * console.error(e);
992
+ * throw e;
993
+ * });
994
+ *
995
+ * ```
835
996
  *
836
997
  * @param params - Parameters for request
837
998
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -922,6 +1083,57 @@ export namespace merchantapi_reviews_v1beta {
922
1083
 
923
1084
  /**
924
1085
  * Lists merchant reviews.
1086
+ * @example
1087
+ * ```js
1088
+ * // Before running the sample:
1089
+ * // - Enable the API at:
1090
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
1091
+ * // - Login into gcloud by running:
1092
+ * // ```sh
1093
+ * // $ gcloud auth application-default login
1094
+ * // ```
1095
+ * // - Install the npm module by running:
1096
+ * // ```sh
1097
+ * // $ npm install googleapis
1098
+ * // ```
1099
+ *
1100
+ * const {google} = require('googleapis');
1101
+ * const merchantapi = google.merchantapi('reviews_v1beta');
1102
+ *
1103
+ * async function main() {
1104
+ * const auth = new google.auth.GoogleAuth({
1105
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1106
+ * scopes: ['https://www.googleapis.com/auth/content'],
1107
+ * });
1108
+ *
1109
+ * // Acquire an auth client, and bind it to all future calls
1110
+ * const authClient = await auth.getClient();
1111
+ * google.options({auth: authClient});
1112
+ *
1113
+ * // Do the magic
1114
+ * const res = await merchantapi.accounts.merchantReviews.list({
1115
+ * // 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.
1116
+ * pageSize: 'placeholder-value',
1117
+ * // 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.
1118
+ * pageToken: 'placeholder-value',
1119
+ * // Required. The account to list merchant reviews for. Format: accounts/{account\}
1120
+ * parent: 'accounts/my-account',
1121
+ * });
1122
+ * console.log(res.data);
1123
+ *
1124
+ * // Example response
1125
+ * // {
1126
+ * // "merchantReviews": [],
1127
+ * // "nextPageToken": "my_nextPageToken"
1128
+ * // }
1129
+ * }
1130
+ *
1131
+ * main().catch(e => {
1132
+ * console.error(e);
1133
+ * throw e;
1134
+ * });
1135
+ *
1136
+ * ```
925
1137
  *
926
1138
  * @param params - Parameters for request
927
1139
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1069,6 +1281,50 @@ export namespace merchantapi_reviews_v1beta {
1069
1281
 
1070
1282
  /**
1071
1283
  * Deletes a product review.
1284
+ * @example
1285
+ * ```js
1286
+ * // Before running the sample:
1287
+ * // - Enable the API at:
1288
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
1289
+ * // - Login into gcloud by running:
1290
+ * // ```sh
1291
+ * // $ gcloud auth application-default login
1292
+ * // ```
1293
+ * // - Install the npm module by running:
1294
+ * // ```sh
1295
+ * // $ npm install googleapis
1296
+ * // ```
1297
+ *
1298
+ * const {google} = require('googleapis');
1299
+ * const merchantapi = google.merchantapi('reviews_v1beta');
1300
+ *
1301
+ * async function main() {
1302
+ * const auth = new google.auth.GoogleAuth({
1303
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1304
+ * scopes: ['https://www.googleapis.com/auth/content'],
1305
+ * });
1306
+ *
1307
+ * // Acquire an auth client, and bind it to all future calls
1308
+ * const authClient = await auth.getClient();
1309
+ * google.options({auth: authClient});
1310
+ *
1311
+ * // Do the magic
1312
+ * const res = await merchantapi.accounts.productReviews.delete({
1313
+ * // Required. The ID of the Product review. Format: accounts/{account\}/productReviews/{productReview\}
1314
+ * name: 'accounts/my-account/productReviews/my-productReview',
1315
+ * });
1316
+ * console.log(res.data);
1317
+ *
1318
+ * // Example response
1319
+ * // {}
1320
+ * }
1321
+ *
1322
+ * main().catch(e => {
1323
+ * console.error(e);
1324
+ * throw e;
1325
+ * });
1326
+ *
1327
+ * ```
1072
1328
  *
1073
1329
  * @param params - Parameters for request
1074
1330
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1160,6 +1416,57 @@ export namespace merchantapi_reviews_v1beta {
1160
1416
 
1161
1417
  /**
1162
1418
  * Gets a product review.
1419
+ * @example
1420
+ * ```js
1421
+ * // Before running the sample:
1422
+ * // - Enable the API at:
1423
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
1424
+ * // - Login into gcloud by running:
1425
+ * // ```sh
1426
+ * // $ gcloud auth application-default login
1427
+ * // ```
1428
+ * // - Install the npm module by running:
1429
+ * // ```sh
1430
+ * // $ npm install googleapis
1431
+ * // ```
1432
+ *
1433
+ * const {google} = require('googleapis');
1434
+ * const merchantapi = google.merchantapi('reviews_v1beta');
1435
+ *
1436
+ * async function main() {
1437
+ * const auth = new google.auth.GoogleAuth({
1438
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1439
+ * scopes: ['https://www.googleapis.com/auth/content'],
1440
+ * });
1441
+ *
1442
+ * // Acquire an auth client, and bind it to all future calls
1443
+ * const authClient = await auth.getClient();
1444
+ * google.options({auth: authClient});
1445
+ *
1446
+ * // Do the magic
1447
+ * const res = await merchantapi.accounts.productReviews.get({
1448
+ * // Required. The ID of the merchant review. Format: accounts/{account\}/productReviews/{productReview\}
1449
+ * name: 'accounts/my-account/productReviews/my-productReview',
1450
+ * });
1451
+ * console.log(res.data);
1452
+ *
1453
+ * // Example response
1454
+ * // {
1455
+ * // "attributes": {},
1456
+ * // "customAttributes": [],
1457
+ * // "dataSource": "my_dataSource",
1458
+ * // "name": "my_name",
1459
+ * // "productReviewId": "my_productReviewId",
1460
+ * // "productReviewStatus": {}
1461
+ * // }
1462
+ * }
1463
+ *
1464
+ * main().catch(e => {
1465
+ * console.error(e);
1466
+ * throw e;
1467
+ * });
1468
+ *
1469
+ * ```
1163
1470
  *
1164
1471
  * @param params - Parameters for request
1165
1472
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1251,6 +1558,72 @@ export namespace merchantapi_reviews_v1beta {
1251
1558
 
1252
1559
  /**
1253
1560
  * Inserts a product review.
1561
+ * @example
1562
+ * ```js
1563
+ * // Before running the sample:
1564
+ * // - Enable the API at:
1565
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
1566
+ * // - Login into gcloud by running:
1567
+ * // ```sh
1568
+ * // $ gcloud auth application-default login
1569
+ * // ```
1570
+ * // - Install the npm module by running:
1571
+ * // ```sh
1572
+ * // $ npm install googleapis
1573
+ * // ```
1574
+ *
1575
+ * const {google} = require('googleapis');
1576
+ * const merchantapi = google.merchantapi('reviews_v1beta');
1577
+ *
1578
+ * async function main() {
1579
+ * const auth = new google.auth.GoogleAuth({
1580
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1581
+ * scopes: ['https://www.googleapis.com/auth/content'],
1582
+ * });
1583
+ *
1584
+ * // Acquire an auth client, and bind it to all future calls
1585
+ * const authClient = await auth.getClient();
1586
+ * google.options({auth: authClient});
1587
+ *
1588
+ * // Do the magic
1589
+ * const res = await merchantapi.accounts.productReviews.insert({
1590
+ * // Required. Format: `accounts/{account\}/dataSources/{datasource\}`.
1591
+ * dataSource: 'placeholder-value',
1592
+ * // Required. The account where the product review will be inserted. Format: accounts/{account\}
1593
+ * parent: 'accounts/my-account',
1594
+ *
1595
+ * // Request body metadata
1596
+ * requestBody: {
1597
+ * // request body parameters
1598
+ * // {
1599
+ * // "attributes": {},
1600
+ * // "customAttributes": [],
1601
+ * // "dataSource": "my_dataSource",
1602
+ * // "name": "my_name",
1603
+ * // "productReviewId": "my_productReviewId",
1604
+ * // "productReviewStatus": {}
1605
+ * // }
1606
+ * },
1607
+ * });
1608
+ * console.log(res.data);
1609
+ *
1610
+ * // Example response
1611
+ * // {
1612
+ * // "attributes": {},
1613
+ * // "customAttributes": [],
1614
+ * // "dataSource": "my_dataSource",
1615
+ * // "name": "my_name",
1616
+ * // "productReviewId": "my_productReviewId",
1617
+ * // "productReviewStatus": {}
1618
+ * // }
1619
+ * }
1620
+ *
1621
+ * main().catch(e => {
1622
+ * console.error(e);
1623
+ * throw e;
1624
+ * });
1625
+ *
1626
+ * ```
1254
1627
  *
1255
1628
  * @param params - Parameters for request
1256
1629
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1341,6 +1714,57 @@ export namespace merchantapi_reviews_v1beta {
1341
1714
 
1342
1715
  /**
1343
1716
  * Lists product reviews.
1717
+ * @example
1718
+ * ```js
1719
+ * // Before running the sample:
1720
+ * // - Enable the API at:
1721
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
1722
+ * // - Login into gcloud by running:
1723
+ * // ```sh
1724
+ * // $ gcloud auth application-default login
1725
+ * // ```
1726
+ * // - Install the npm module by running:
1727
+ * // ```sh
1728
+ * // $ npm install googleapis
1729
+ * // ```
1730
+ *
1731
+ * const {google} = require('googleapis');
1732
+ * const merchantapi = google.merchantapi('reviews_v1beta');
1733
+ *
1734
+ * async function main() {
1735
+ * const auth = new google.auth.GoogleAuth({
1736
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1737
+ * scopes: ['https://www.googleapis.com/auth/content'],
1738
+ * });
1739
+ *
1740
+ * // Acquire an auth client, and bind it to all future calls
1741
+ * const authClient = await auth.getClient();
1742
+ * google.options({auth: authClient});
1743
+ *
1744
+ * // Do the magic
1745
+ * const res = await merchantapi.accounts.productReviews.list({
1746
+ * // Optional. The maximum number of products to return. The service may return fewer than this value.
1747
+ * pageSize: 'placeholder-value',
1748
+ * // 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.
1749
+ * pageToken: 'placeholder-value',
1750
+ * // Required. The account to list product reviews for. Format: accounts/{account\}
1751
+ * parent: 'accounts/my-account',
1752
+ * });
1753
+ * console.log(res.data);
1754
+ *
1755
+ * // Example response
1756
+ * // {
1757
+ * // "nextPageToken": "my_nextPageToken",
1758
+ * // "productReviews": []
1759
+ * // }
1760
+ * }
1761
+ *
1762
+ * main().catch(e => {
1763
+ * console.error(e);
1764
+ * throw e;
1765
+ * });
1766
+ *
1767
+ * ```
1344
1768
  *
1345
1769
  * @param params - Parameters for request
1346
1770
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.