@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.
- package/CHANGELOG.md +32 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6214 -358
- package/build/accounts_v1beta.d.ts +4685 -141
- package/build/accounts_v1beta.js +560 -12
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +336 -1
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +411 -2
- package/build/datasources_v1beta.js.map +1 -1
- package/build/inventories_v1beta.d.ts +336 -2
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +367 -1
- package/build/issueresolution_v1beta.js +48 -0
- package/build/issueresolution_v1beta.js.map +1 -1
- package/build/lfp_v1beta.d.ts +436 -3
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +272 -1
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +75 -1
- package/build/ordertracking_v1beta.js.map +1 -1
- package/build/products_v1beta.d.ts +347 -44
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +171 -4
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +52 -1
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +58 -1
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +426 -2
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +336 -1
- package/datasources_v1beta.ts +411 -2
- package/inventories_v1beta.ts +336 -2
- package/issueresolution_v1beta.ts +465 -1
- package/lfp_v1beta.ts +436 -3
- package/notifications_v1beta.ts +272 -1
- package/ordertracking_v1beta.ts +75 -1
- package/package.json +1 -1
- package/products_v1beta.ts +347 -44
- package/promotions_v1beta.ts +171 -4
- package/quota_v1beta.ts +52 -1
- package/reports_v1beta.ts +58 -1
- package/reviews_v1beta.ts +426 -2
package/datasources_v1beta.ts
CHANGED
|
@@ -453,7 +453,7 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
453
453
|
*/
|
|
454
454
|
eventTime?: string | null;
|
|
455
455
|
/**
|
|
456
|
-
* Optional. The product expiration time. This field will not
|
|
456
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
457
457
|
*/
|
|
458
458
|
expirationTime?: string | null;
|
|
459
459
|
/**
|
|
@@ -559,6 +559,82 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
559
559
|
|
|
560
560
|
/**
|
|
561
561
|
* Creates the new data source configuration for the given account. This method always creates a new data source.
|
|
562
|
+
* @example
|
|
563
|
+
* ```js
|
|
564
|
+
* // Before running the sample:
|
|
565
|
+
* // - Enable the API at:
|
|
566
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
567
|
+
* // - Login into gcloud by running:
|
|
568
|
+
* // ```sh
|
|
569
|
+
* // $ gcloud auth application-default login
|
|
570
|
+
* // ```
|
|
571
|
+
* // - Install the npm module by running:
|
|
572
|
+
* // ```sh
|
|
573
|
+
* // $ npm install googleapis
|
|
574
|
+
* // ```
|
|
575
|
+
*
|
|
576
|
+
* const {google} = require('googleapis');
|
|
577
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
578
|
+
*
|
|
579
|
+
* async function main() {
|
|
580
|
+
* const auth = new google.auth.GoogleAuth({
|
|
581
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
582
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
583
|
+
* });
|
|
584
|
+
*
|
|
585
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
586
|
+
* const authClient = await auth.getClient();
|
|
587
|
+
* google.options({auth: authClient});
|
|
588
|
+
*
|
|
589
|
+
* // Do the magic
|
|
590
|
+
* const res = await merchantapi.accounts.dataSources.create({
|
|
591
|
+
* // Required. The account where this data source will be created. Format: `accounts/{account\}`
|
|
592
|
+
* parent: 'accounts/my-account',
|
|
593
|
+
*
|
|
594
|
+
* // Request body metadata
|
|
595
|
+
* requestBody: {
|
|
596
|
+
* // request body parameters
|
|
597
|
+
* // {
|
|
598
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
599
|
+
* // "displayName": "my_displayName",
|
|
600
|
+
* // "fileInput": {},
|
|
601
|
+
* // "input": "my_input",
|
|
602
|
+
* // "localInventoryDataSource": {},
|
|
603
|
+
* // "merchantReviewDataSource": {},
|
|
604
|
+
* // "name": "my_name",
|
|
605
|
+
* // "primaryProductDataSource": {},
|
|
606
|
+
* // "productReviewDataSource": {},
|
|
607
|
+
* // "promotionDataSource": {},
|
|
608
|
+
* // "regionalInventoryDataSource": {},
|
|
609
|
+
* // "supplementalProductDataSource": {}
|
|
610
|
+
* // }
|
|
611
|
+
* },
|
|
612
|
+
* });
|
|
613
|
+
* console.log(res.data);
|
|
614
|
+
*
|
|
615
|
+
* // Example response
|
|
616
|
+
* // {
|
|
617
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
618
|
+
* // "displayName": "my_displayName",
|
|
619
|
+
* // "fileInput": {},
|
|
620
|
+
* // "input": "my_input",
|
|
621
|
+
* // "localInventoryDataSource": {},
|
|
622
|
+
* // "merchantReviewDataSource": {},
|
|
623
|
+
* // "name": "my_name",
|
|
624
|
+
* // "primaryProductDataSource": {},
|
|
625
|
+
* // "productReviewDataSource": {},
|
|
626
|
+
* // "promotionDataSource": {},
|
|
627
|
+
* // "regionalInventoryDataSource": {},
|
|
628
|
+
* // "supplementalProductDataSource": {}
|
|
629
|
+
* // }
|
|
630
|
+
* }
|
|
631
|
+
*
|
|
632
|
+
* main().catch(e => {
|
|
633
|
+
* console.error(e);
|
|
634
|
+
* throw e;
|
|
635
|
+
* });
|
|
636
|
+
*
|
|
637
|
+
* ```
|
|
562
638
|
*
|
|
563
639
|
* @param params - Parameters for request
|
|
564
640
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -649,6 +725,50 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
649
725
|
|
|
650
726
|
/**
|
|
651
727
|
* Deletes a data source from your Merchant Center account.
|
|
728
|
+
* @example
|
|
729
|
+
* ```js
|
|
730
|
+
* // Before running the sample:
|
|
731
|
+
* // - Enable the API at:
|
|
732
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
733
|
+
* // - Login into gcloud by running:
|
|
734
|
+
* // ```sh
|
|
735
|
+
* // $ gcloud auth application-default login
|
|
736
|
+
* // ```
|
|
737
|
+
* // - Install the npm module by running:
|
|
738
|
+
* // ```sh
|
|
739
|
+
* // $ npm install googleapis
|
|
740
|
+
* // ```
|
|
741
|
+
*
|
|
742
|
+
* const {google} = require('googleapis');
|
|
743
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
744
|
+
*
|
|
745
|
+
* async function main() {
|
|
746
|
+
* const auth = new google.auth.GoogleAuth({
|
|
747
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
748
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
749
|
+
* });
|
|
750
|
+
*
|
|
751
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
752
|
+
* const authClient = await auth.getClient();
|
|
753
|
+
* google.options({auth: authClient});
|
|
754
|
+
*
|
|
755
|
+
* // Do the magic
|
|
756
|
+
* const res = await merchantapi.accounts.dataSources.delete({
|
|
757
|
+
* // Required. The name of the data source to delete. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
758
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
759
|
+
* });
|
|
760
|
+
* console.log(res.data);
|
|
761
|
+
*
|
|
762
|
+
* // Example response
|
|
763
|
+
* // {}
|
|
764
|
+
* }
|
|
765
|
+
*
|
|
766
|
+
* main().catch(e => {
|
|
767
|
+
* console.error(e);
|
|
768
|
+
* throw e;
|
|
769
|
+
* });
|
|
770
|
+
*
|
|
771
|
+
* ```
|
|
652
772
|
*
|
|
653
773
|
* @param params - Parameters for request
|
|
654
774
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -740,6 +860,56 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
740
860
|
|
|
741
861
|
/**
|
|
742
862
|
* Performs the data fetch immediately (even outside fetch schedule) on a data source from your Merchant Center Account. If you need to call this method more than once per day, you should use the Products service to update your product data instead. This method only works on data sources with a file input set.
|
|
863
|
+
* @example
|
|
864
|
+
* ```js
|
|
865
|
+
* // Before running the sample:
|
|
866
|
+
* // - Enable the API at:
|
|
867
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
868
|
+
* // - Login into gcloud by running:
|
|
869
|
+
* // ```sh
|
|
870
|
+
* // $ gcloud auth application-default login
|
|
871
|
+
* // ```
|
|
872
|
+
* // - Install the npm module by running:
|
|
873
|
+
* // ```sh
|
|
874
|
+
* // $ npm install googleapis
|
|
875
|
+
* // ```
|
|
876
|
+
*
|
|
877
|
+
* const {google} = require('googleapis');
|
|
878
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
879
|
+
*
|
|
880
|
+
* async function main() {
|
|
881
|
+
* const auth = new google.auth.GoogleAuth({
|
|
882
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
883
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
884
|
+
* });
|
|
885
|
+
*
|
|
886
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
887
|
+
* const authClient = await auth.getClient();
|
|
888
|
+
* google.options({auth: authClient});
|
|
889
|
+
*
|
|
890
|
+
* // Do the magic
|
|
891
|
+
* const res = await merchantapi.accounts.dataSources.fetch({
|
|
892
|
+
* // Required. The name of the data source resource to fetch. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
893
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
894
|
+
*
|
|
895
|
+
* // Request body metadata
|
|
896
|
+
* requestBody: {
|
|
897
|
+
* // request body parameters
|
|
898
|
+
* // {}
|
|
899
|
+
* },
|
|
900
|
+
* });
|
|
901
|
+
* console.log(res.data);
|
|
902
|
+
*
|
|
903
|
+
* // Example response
|
|
904
|
+
* // {}
|
|
905
|
+
* }
|
|
906
|
+
*
|
|
907
|
+
* main().catch(e => {
|
|
908
|
+
* console.error(e);
|
|
909
|
+
* throw e;
|
|
910
|
+
* });
|
|
911
|
+
*
|
|
912
|
+
* ```
|
|
743
913
|
*
|
|
744
914
|
* @param params - Parameters for request
|
|
745
915
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -831,6 +1001,63 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
831
1001
|
|
|
832
1002
|
/**
|
|
833
1003
|
* Retrieves the data source configuration for the given account.
|
|
1004
|
+
* @example
|
|
1005
|
+
* ```js
|
|
1006
|
+
* // Before running the sample:
|
|
1007
|
+
* // - Enable the API at:
|
|
1008
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1009
|
+
* // - Login into gcloud by running:
|
|
1010
|
+
* // ```sh
|
|
1011
|
+
* // $ gcloud auth application-default login
|
|
1012
|
+
* // ```
|
|
1013
|
+
* // - Install the npm module by running:
|
|
1014
|
+
* // ```sh
|
|
1015
|
+
* // $ npm install googleapis
|
|
1016
|
+
* // ```
|
|
1017
|
+
*
|
|
1018
|
+
* const {google} = require('googleapis');
|
|
1019
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1020
|
+
*
|
|
1021
|
+
* async function main() {
|
|
1022
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1023
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1024
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1025
|
+
* });
|
|
1026
|
+
*
|
|
1027
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1028
|
+
* const authClient = await auth.getClient();
|
|
1029
|
+
* google.options({auth: authClient});
|
|
1030
|
+
*
|
|
1031
|
+
* // Do the magic
|
|
1032
|
+
* const res = await merchantapi.accounts.dataSources.get({
|
|
1033
|
+
* // Required. The name of the data source to retrieve. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
1034
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
1035
|
+
* });
|
|
1036
|
+
* console.log(res.data);
|
|
1037
|
+
*
|
|
1038
|
+
* // Example response
|
|
1039
|
+
* // {
|
|
1040
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1041
|
+
* // "displayName": "my_displayName",
|
|
1042
|
+
* // "fileInput": {},
|
|
1043
|
+
* // "input": "my_input",
|
|
1044
|
+
* // "localInventoryDataSource": {},
|
|
1045
|
+
* // "merchantReviewDataSource": {},
|
|
1046
|
+
* // "name": "my_name",
|
|
1047
|
+
* // "primaryProductDataSource": {},
|
|
1048
|
+
* // "productReviewDataSource": {},
|
|
1049
|
+
* // "promotionDataSource": {},
|
|
1050
|
+
* // "regionalInventoryDataSource": {},
|
|
1051
|
+
* // "supplementalProductDataSource": {}
|
|
1052
|
+
* // }
|
|
1053
|
+
* }
|
|
1054
|
+
*
|
|
1055
|
+
* main().catch(e => {
|
|
1056
|
+
* console.error(e);
|
|
1057
|
+
* throw e;
|
|
1058
|
+
* });
|
|
1059
|
+
*
|
|
1060
|
+
* ```
|
|
834
1061
|
*
|
|
835
1062
|
* @param params - Parameters for request
|
|
836
1063
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -922,6 +1149,57 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
922
1149
|
|
|
923
1150
|
/**
|
|
924
1151
|
* Lists the configurations for data sources for the given account.
|
|
1152
|
+
* @example
|
|
1153
|
+
* ```js
|
|
1154
|
+
* // Before running the sample:
|
|
1155
|
+
* // - Enable the API at:
|
|
1156
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1157
|
+
* // - Login into gcloud by running:
|
|
1158
|
+
* // ```sh
|
|
1159
|
+
* // $ gcloud auth application-default login
|
|
1160
|
+
* // ```
|
|
1161
|
+
* // - Install the npm module by running:
|
|
1162
|
+
* // ```sh
|
|
1163
|
+
* // $ npm install googleapis
|
|
1164
|
+
* // ```
|
|
1165
|
+
*
|
|
1166
|
+
* const {google} = require('googleapis');
|
|
1167
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1168
|
+
*
|
|
1169
|
+
* async function main() {
|
|
1170
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1171
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1172
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1173
|
+
* });
|
|
1174
|
+
*
|
|
1175
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1176
|
+
* const authClient = await auth.getClient();
|
|
1177
|
+
* google.options({auth: authClient});
|
|
1178
|
+
*
|
|
1179
|
+
* // Do the magic
|
|
1180
|
+
* const res = await merchantapi.accounts.dataSources.list({
|
|
1181
|
+
* // Optional. The maximum number of data sources to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of data sources will be returned.
|
|
1182
|
+
* pageSize: 'placeholder-value',
|
|
1183
|
+
* // Optional. A page token, received from a previous `ListDataSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDataSources` must match the call that provided the page token.
|
|
1184
|
+
* pageToken: 'placeholder-value',
|
|
1185
|
+
* // Required. The account to list data sources for. Format: `accounts/{account\}`
|
|
1186
|
+
* parent: 'accounts/my-account',
|
|
1187
|
+
* });
|
|
1188
|
+
* console.log(res.data);
|
|
1189
|
+
*
|
|
1190
|
+
* // Example response
|
|
1191
|
+
* // {
|
|
1192
|
+
* // "dataSources": [],
|
|
1193
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1194
|
+
* // }
|
|
1195
|
+
* }
|
|
1196
|
+
*
|
|
1197
|
+
* main().catch(e => {
|
|
1198
|
+
* console.error(e);
|
|
1199
|
+
* throw e;
|
|
1200
|
+
* });
|
|
1201
|
+
*
|
|
1202
|
+
* ```
|
|
925
1203
|
*
|
|
926
1204
|
* @param params - Parameters for request
|
|
927
1205
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1014,6 +1292,84 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
1014
1292
|
|
|
1015
1293
|
/**
|
|
1016
1294
|
* Updates the existing data source configuration. The fields that are set in the update mask but not provided in the resource will be deleted.
|
|
1295
|
+
* @example
|
|
1296
|
+
* ```js
|
|
1297
|
+
* // Before running the sample:
|
|
1298
|
+
* // - Enable the API at:
|
|
1299
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1300
|
+
* // - Login into gcloud by running:
|
|
1301
|
+
* // ```sh
|
|
1302
|
+
* // $ gcloud auth application-default login
|
|
1303
|
+
* // ```
|
|
1304
|
+
* // - Install the npm module by running:
|
|
1305
|
+
* // ```sh
|
|
1306
|
+
* // $ npm install googleapis
|
|
1307
|
+
* // ```
|
|
1308
|
+
*
|
|
1309
|
+
* const {google} = require('googleapis');
|
|
1310
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1311
|
+
*
|
|
1312
|
+
* async function main() {
|
|
1313
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1314
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1315
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1316
|
+
* });
|
|
1317
|
+
*
|
|
1318
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1319
|
+
* const authClient = await auth.getClient();
|
|
1320
|
+
* google.options({auth: authClient});
|
|
1321
|
+
*
|
|
1322
|
+
* // Do the magic
|
|
1323
|
+
* const res = await merchantapi.accounts.dataSources.patch({
|
|
1324
|
+
* // Required. Identifier. The name of the data source. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
1325
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
1326
|
+
* // Required. The list of data source fields to be updated. Fields specified in the update mask without a value specified in the body will be deleted from the data source. Providing special "*" value for full data source replacement is not supported. For example, If you insert `updateMask=displayName` in the request, it will only update the `displayName` leaving all other fields untouched.
|
|
1327
|
+
* updateMask: 'placeholder-value',
|
|
1328
|
+
*
|
|
1329
|
+
* // Request body metadata
|
|
1330
|
+
* requestBody: {
|
|
1331
|
+
* // request body parameters
|
|
1332
|
+
* // {
|
|
1333
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1334
|
+
* // "displayName": "my_displayName",
|
|
1335
|
+
* // "fileInput": {},
|
|
1336
|
+
* // "input": "my_input",
|
|
1337
|
+
* // "localInventoryDataSource": {},
|
|
1338
|
+
* // "merchantReviewDataSource": {},
|
|
1339
|
+
* // "name": "my_name",
|
|
1340
|
+
* // "primaryProductDataSource": {},
|
|
1341
|
+
* // "productReviewDataSource": {},
|
|
1342
|
+
* // "promotionDataSource": {},
|
|
1343
|
+
* // "regionalInventoryDataSource": {},
|
|
1344
|
+
* // "supplementalProductDataSource": {}
|
|
1345
|
+
* // }
|
|
1346
|
+
* },
|
|
1347
|
+
* });
|
|
1348
|
+
* console.log(res.data);
|
|
1349
|
+
*
|
|
1350
|
+
* // Example response
|
|
1351
|
+
* // {
|
|
1352
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1353
|
+
* // "displayName": "my_displayName",
|
|
1354
|
+
* // "fileInput": {},
|
|
1355
|
+
* // "input": "my_input",
|
|
1356
|
+
* // "localInventoryDataSource": {},
|
|
1357
|
+
* // "merchantReviewDataSource": {},
|
|
1358
|
+
* // "name": "my_name",
|
|
1359
|
+
* // "primaryProductDataSource": {},
|
|
1360
|
+
* // "productReviewDataSource": {},
|
|
1361
|
+
* // "promotionDataSource": {},
|
|
1362
|
+
* // "regionalInventoryDataSource": {},
|
|
1363
|
+
* // "supplementalProductDataSource": {}
|
|
1364
|
+
* // }
|
|
1365
|
+
* }
|
|
1366
|
+
*
|
|
1367
|
+
* main().catch(e => {
|
|
1368
|
+
* console.error(e);
|
|
1369
|
+
* throw e;
|
|
1370
|
+
* });
|
|
1371
|
+
*
|
|
1372
|
+
* ```
|
|
1017
1373
|
*
|
|
1018
1374
|
* @param params - Parameters for request
|
|
1019
1375
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1164,7 +1520,7 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
1164
1520
|
*/
|
|
1165
1521
|
name?: string;
|
|
1166
1522
|
/**
|
|
1167
|
-
* Required. The list of data source fields to be updated. Fields specified in the update mask without a value specified in the body will be deleted from the data source. Providing special "*" value for full data source replacement is not supported.
|
|
1523
|
+
* Required. The list of data source fields to be updated. Fields specified in the update mask without a value specified in the body will be deleted from the data source. Providing special "*" value for full data source replacement is not supported. For example, If you insert `updateMask=displayName` in the request, it will only update the `displayName` leaving all other fields untouched.
|
|
1168
1524
|
*/
|
|
1169
1525
|
updateMask?: string;
|
|
1170
1526
|
|
|
@@ -1182,6 +1538,59 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
1182
1538
|
|
|
1183
1539
|
/**
|
|
1184
1540
|
* Gets the latest data source file upload. Only the `latest` alias is accepted for a file upload.
|
|
1541
|
+
* @example
|
|
1542
|
+
* ```js
|
|
1543
|
+
* // Before running the sample:
|
|
1544
|
+
* // - Enable the API at:
|
|
1545
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1546
|
+
* // - Login into gcloud by running:
|
|
1547
|
+
* // ```sh
|
|
1548
|
+
* // $ gcloud auth application-default login
|
|
1549
|
+
* // ```
|
|
1550
|
+
* // - Install the npm module by running:
|
|
1551
|
+
* // ```sh
|
|
1552
|
+
* // $ npm install googleapis
|
|
1553
|
+
* // ```
|
|
1554
|
+
*
|
|
1555
|
+
* const {google} = require('googleapis');
|
|
1556
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1557
|
+
*
|
|
1558
|
+
* async function main() {
|
|
1559
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1560
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1561
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1562
|
+
* });
|
|
1563
|
+
*
|
|
1564
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1565
|
+
* const authClient = await auth.getClient();
|
|
1566
|
+
* google.options({auth: authClient});
|
|
1567
|
+
*
|
|
1568
|
+
* // Do the magic
|
|
1569
|
+
* const res = await merchantapi.accounts.dataSources.fileUploads.get({
|
|
1570
|
+
* // Required. The name of the data source file upload to retrieve. Format: `accounts/{account\}/dataSources/{datasource\}/fileUploads/latest`
|
|
1571
|
+
* name: 'accounts/my-account/dataSources/my-dataSource/fileUploads/my-fileUpload',
|
|
1572
|
+
* });
|
|
1573
|
+
* console.log(res.data);
|
|
1574
|
+
*
|
|
1575
|
+
* // Example response
|
|
1576
|
+
* // {
|
|
1577
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1578
|
+
* // "issues": [],
|
|
1579
|
+
* // "itemsCreated": "my_itemsCreated",
|
|
1580
|
+
* // "itemsTotal": "my_itemsTotal",
|
|
1581
|
+
* // "itemsUpdated": "my_itemsUpdated",
|
|
1582
|
+
* // "name": "my_name",
|
|
1583
|
+
* // "processingState": "my_processingState",
|
|
1584
|
+
* // "uploadTime": "my_uploadTime"
|
|
1585
|
+
* // }
|
|
1586
|
+
* }
|
|
1587
|
+
*
|
|
1588
|
+
* main().catch(e => {
|
|
1589
|
+
* console.error(e);
|
|
1590
|
+
* throw e;
|
|
1591
|
+
* });
|
|
1592
|
+
*
|
|
1593
|
+
* ```
|
|
1185
1594
|
*
|
|
1186
1595
|
* @param params - Parameters for request
|
|
1187
1596
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|