@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.
- package/CHANGELOG.md +50 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6487 -518
- package/build/accounts_v1beta.d.ts +4773 -229
- package/build/accounts_v1beta.js +560 -12
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +349 -14
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +427 -18
- package/build/datasources_v1beta.js.map +1 -1
- package/build/index.d.ts +11 -1
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/inventories_v1beta.d.ts +349 -15
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +1027 -0
- package/build/issueresolution_v1beta.js +196 -0
- package/build/issueresolution_v1beta.js.map +1 -0
- package/build/lfp_v1beta.d.ts +451 -18
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +283 -12
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +459 -0
- package/build/ordertracking_v1beta.js +91 -0
- package/build/ordertracking_v1beta.js.map +1 -0
- package/build/products_v1beta.d.ts +358 -55
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +178 -11
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +55 -4
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +61 -4
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +443 -19
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +371 -21
- package/datasources_v1beta.ts +453 -26
- package/index.ts +24 -1
- package/inventories_v1beta.ts +367 -24
- package/issueresolution_v1beta.ts +1426 -0
- package/lfp_v1beta.ts +477 -26
- package/notifications_v1beta.ts +299 -21
- package/ordertracking_v1beta.ts +599 -0
- package/package.json +2 -2
- package/products_v1beta.ts +376 -61
- package/promotions_v1beta.ts +188 -15
- package/quota_v1beta.ts +57 -6
- package/reports_v1beta.ts +65 -5
- package/reviews_v1beta.ts +471 -29
package/reviews_v1beta.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -411,7 +411,7 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
411
411
|
*/
|
|
412
412
|
cons?: string[] | null;
|
|
413
413
|
/**
|
|
414
|
-
*
|
|
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
|
|
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`.
|
|
@@ -659,11 +703,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
659
703
|
delete(
|
|
660
704
|
params: Params$Resource$Accounts$Merchantreviews$Delete,
|
|
661
705
|
options: StreamMethodOptions
|
|
662
|
-
):
|
|
706
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
663
707
|
delete(
|
|
664
708
|
params?: Params$Resource$Accounts$Merchantreviews$Delete,
|
|
665
709
|
options?: MethodOptions
|
|
666
|
-
):
|
|
710
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
667
711
|
delete(
|
|
668
712
|
params: Params$Resource$Accounts$Merchantreviews$Delete,
|
|
669
713
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -692,7 +736,10 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
692
736
|
callback?:
|
|
693
737
|
| BodyResponseCallback<Schema$Empty>
|
|
694
738
|
| BodyResponseCallback<Readable>
|
|
695
|
-
):
|
|
739
|
+
):
|
|
740
|
+
| void
|
|
741
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
742
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
696
743
|
let params = (paramsOrCallback ||
|
|
697
744
|
{}) as Params$Resource$Accounts$Merchantreviews$Delete;
|
|
698
745
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -738,6 +785,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
738
785
|
|
|
739
786
|
/**
|
|
740
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
|
+
* ```
|
|
741
839
|
*
|
|
742
840
|
* @param params - Parameters for request
|
|
743
841
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -747,11 +845,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
747
845
|
get(
|
|
748
846
|
params: Params$Resource$Accounts$Merchantreviews$Get,
|
|
749
847
|
options: StreamMethodOptions
|
|
750
|
-
):
|
|
848
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
751
849
|
get(
|
|
752
850
|
params?: Params$Resource$Accounts$Merchantreviews$Get,
|
|
753
851
|
options?: MethodOptions
|
|
754
|
-
):
|
|
852
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$MerchantReview>>;
|
|
755
853
|
get(
|
|
756
854
|
params: Params$Resource$Accounts$Merchantreviews$Get,
|
|
757
855
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -780,7 +878,10 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
780
878
|
callback?:
|
|
781
879
|
| BodyResponseCallback<Schema$MerchantReview>
|
|
782
880
|
| BodyResponseCallback<Readable>
|
|
783
|
-
):
|
|
881
|
+
):
|
|
882
|
+
| void
|
|
883
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$MerchantReview>>
|
|
884
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
784
885
|
let params = (paramsOrCallback ||
|
|
785
886
|
{}) as Params$Resource$Accounts$Merchantreviews$Get;
|
|
786
887
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -826,6 +927,72 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
826
927
|
|
|
827
928
|
/**
|
|
828
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
|
+
* ```
|
|
829
996
|
*
|
|
830
997
|
* @param params - Parameters for request
|
|
831
998
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -835,11 +1002,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
835
1002
|
insert(
|
|
836
1003
|
params: Params$Resource$Accounts$Merchantreviews$Insert,
|
|
837
1004
|
options: StreamMethodOptions
|
|
838
|
-
):
|
|
1005
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
839
1006
|
insert(
|
|
840
1007
|
params?: Params$Resource$Accounts$Merchantreviews$Insert,
|
|
841
1008
|
options?: MethodOptions
|
|
842
|
-
):
|
|
1009
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$MerchantReview>>;
|
|
843
1010
|
insert(
|
|
844
1011
|
params: Params$Resource$Accounts$Merchantreviews$Insert,
|
|
845
1012
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -868,7 +1035,10 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
868
1035
|
callback?:
|
|
869
1036
|
| BodyResponseCallback<Schema$MerchantReview>
|
|
870
1037
|
| BodyResponseCallback<Readable>
|
|
871
|
-
):
|
|
1038
|
+
):
|
|
1039
|
+
| void
|
|
1040
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$MerchantReview>>
|
|
1041
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
872
1042
|
let params = (paramsOrCallback ||
|
|
873
1043
|
{}) as Params$Resource$Accounts$Merchantreviews$Insert;
|
|
874
1044
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -913,6 +1083,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
913
1083
|
|
|
914
1084
|
/**
|
|
915
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
|
+
* ```
|
|
916
1137
|
*
|
|
917
1138
|
* @param params - Parameters for request
|
|
918
1139
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -922,11 +1143,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
922
1143
|
list(
|
|
923
1144
|
params: Params$Resource$Accounts$Merchantreviews$List,
|
|
924
1145
|
options: StreamMethodOptions
|
|
925
|
-
):
|
|
1146
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
926
1147
|
list(
|
|
927
1148
|
params?: Params$Resource$Accounts$Merchantreviews$List,
|
|
928
1149
|
options?: MethodOptions
|
|
929
|
-
):
|
|
1150
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListMerchantReviewsResponse>>;
|
|
930
1151
|
list(
|
|
931
1152
|
params: Params$Resource$Accounts$Merchantreviews$List,
|
|
932
1153
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -961,8 +1182,8 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
961
1182
|
| BodyResponseCallback<Readable>
|
|
962
1183
|
):
|
|
963
1184
|
| void
|
|
964
|
-
|
|
|
965
|
-
|
|
|
1185
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListMerchantReviewsResponse>>
|
|
1186
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
966
1187
|
let params = (paramsOrCallback ||
|
|
967
1188
|
{}) as Params$Resource$Accounts$Merchantreviews$List;
|
|
968
1189
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1060,6 +1281,50 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1060
1281
|
|
|
1061
1282
|
/**
|
|
1062
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
|
+
* ```
|
|
1063
1328
|
*
|
|
1064
1329
|
* @param params - Parameters for request
|
|
1065
1330
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1069,11 +1334,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1069
1334
|
delete(
|
|
1070
1335
|
params: Params$Resource$Accounts$Productreviews$Delete,
|
|
1071
1336
|
options: StreamMethodOptions
|
|
1072
|
-
):
|
|
1337
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1073
1338
|
delete(
|
|
1074
1339
|
params?: Params$Resource$Accounts$Productreviews$Delete,
|
|
1075
1340
|
options?: MethodOptions
|
|
1076
|
-
):
|
|
1341
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1077
1342
|
delete(
|
|
1078
1343
|
params: Params$Resource$Accounts$Productreviews$Delete,
|
|
1079
1344
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1102,7 +1367,10 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1102
1367
|
callback?:
|
|
1103
1368
|
| BodyResponseCallback<Schema$Empty>
|
|
1104
1369
|
| BodyResponseCallback<Readable>
|
|
1105
|
-
):
|
|
1370
|
+
):
|
|
1371
|
+
| void
|
|
1372
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
1373
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1106
1374
|
let params = (paramsOrCallback ||
|
|
1107
1375
|
{}) as Params$Resource$Accounts$Productreviews$Delete;
|
|
1108
1376
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1148,6 +1416,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1148
1416
|
|
|
1149
1417
|
/**
|
|
1150
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
|
+
* ```
|
|
1151
1470
|
*
|
|
1152
1471
|
* @param params - Parameters for request
|
|
1153
1472
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1157,11 +1476,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1157
1476
|
get(
|
|
1158
1477
|
params: Params$Resource$Accounts$Productreviews$Get,
|
|
1159
1478
|
options: StreamMethodOptions
|
|
1160
|
-
):
|
|
1479
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1161
1480
|
get(
|
|
1162
1481
|
params?: Params$Resource$Accounts$Productreviews$Get,
|
|
1163
1482
|
options?: MethodOptions
|
|
1164
|
-
):
|
|
1483
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ProductReview>>;
|
|
1165
1484
|
get(
|
|
1166
1485
|
params: Params$Resource$Accounts$Productreviews$Get,
|
|
1167
1486
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1190,7 +1509,10 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1190
1509
|
callback?:
|
|
1191
1510
|
| BodyResponseCallback<Schema$ProductReview>
|
|
1192
1511
|
| BodyResponseCallback<Readable>
|
|
1193
|
-
):
|
|
1512
|
+
):
|
|
1513
|
+
| void
|
|
1514
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ProductReview>>
|
|
1515
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1194
1516
|
let params = (paramsOrCallback ||
|
|
1195
1517
|
{}) as Params$Resource$Accounts$Productreviews$Get;
|
|
1196
1518
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1236,6 +1558,72 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1236
1558
|
|
|
1237
1559
|
/**
|
|
1238
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
|
+
* ```
|
|
1239
1627
|
*
|
|
1240
1628
|
* @param params - Parameters for request
|
|
1241
1629
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1245,11 +1633,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1245
1633
|
insert(
|
|
1246
1634
|
params: Params$Resource$Accounts$Productreviews$Insert,
|
|
1247
1635
|
options: StreamMethodOptions
|
|
1248
|
-
):
|
|
1636
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1249
1637
|
insert(
|
|
1250
1638
|
params?: Params$Resource$Accounts$Productreviews$Insert,
|
|
1251
1639
|
options?: MethodOptions
|
|
1252
|
-
):
|
|
1640
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ProductReview>>;
|
|
1253
1641
|
insert(
|
|
1254
1642
|
params: Params$Resource$Accounts$Productreviews$Insert,
|
|
1255
1643
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1278,7 +1666,10 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1278
1666
|
callback?:
|
|
1279
1667
|
| BodyResponseCallback<Schema$ProductReview>
|
|
1280
1668
|
| BodyResponseCallback<Readable>
|
|
1281
|
-
):
|
|
1669
|
+
):
|
|
1670
|
+
| void
|
|
1671
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ProductReview>>
|
|
1672
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1282
1673
|
let params = (paramsOrCallback ||
|
|
1283
1674
|
{}) as Params$Resource$Accounts$Productreviews$Insert;
|
|
1284
1675
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1323,6 +1714,57 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1323
1714
|
|
|
1324
1715
|
/**
|
|
1325
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
|
+
* ```
|
|
1326
1768
|
*
|
|
1327
1769
|
* @param params - Parameters for request
|
|
1328
1770
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1332,11 +1774,11 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1332
1774
|
list(
|
|
1333
1775
|
params: Params$Resource$Accounts$Productreviews$List,
|
|
1334
1776
|
options: StreamMethodOptions
|
|
1335
|
-
):
|
|
1777
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1336
1778
|
list(
|
|
1337
1779
|
params?: Params$Resource$Accounts$Productreviews$List,
|
|
1338
1780
|
options?: MethodOptions
|
|
1339
|
-
):
|
|
1781
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListProductReviewsResponse>>;
|
|
1340
1782
|
list(
|
|
1341
1783
|
params: Params$Resource$Accounts$Productreviews$List,
|
|
1342
1784
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1371,8 +1813,8 @@ export namespace merchantapi_reviews_v1beta {
|
|
|
1371
1813
|
| BodyResponseCallback<Readable>
|
|
1372
1814
|
):
|
|
1373
1815
|
| void
|
|
1374
|
-
|
|
|
1375
|
-
|
|
|
1816
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListProductReviewsResponse>>
|
|
1817
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1376
1818
|
let params = (paramsOrCallback ||
|
|
1377
1819
|
{}) as Params$Resource$Accounts$Productreviews$List;
|
|
1378
1820
|
let options = (optionsOrCallback || {}) as MethodOptions;
|