@googleapis/merchantapi 6.0.1 → 9.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 +43 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6894 -534
- package/build/accounts_v1beta.d.ts +4933 -137
- package/build/accounts_v1beta.js +679 -26
- 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 +412 -6
- 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 +352 -45
- 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 +434 -2
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +336 -1
- package/datasources_v1beta.ts +412 -6
- 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 +352 -45
- package/promotions_v1beta.ts +171 -4
- package/quota_v1beta.ts +52 -1
- package/reports_v1beta.ts +58 -1
- package/reviews_v1beta.ts +434 -2
package/datasources_v1beta.ts
CHANGED
|
@@ -362,7 +362,7 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
362
362
|
nextPageToken?: string | null;
|
|
363
363
|
}
|
|
364
364
|
/**
|
|
365
|
-
* The local inventory data source.
|
|
365
|
+
* The local inventory data source type is only available for file inputs and can't be used to create API local inventory data sources.
|
|
366
366
|
*/
|
|
367
367
|
export interface Schema$LocalInventoryDataSource {
|
|
368
368
|
/**
|
|
@@ -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
|
/**
|
|
@@ -486,9 +486,6 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
486
486
|
*/
|
|
487
487
|
targetCountry?: string | null;
|
|
488
488
|
}
|
|
489
|
-
/**
|
|
490
|
-
* The regional inventory data source.
|
|
491
|
-
*/
|
|
492
489
|
export interface Schema$RegionalInventoryDataSource {
|
|
493
490
|
/**
|
|
494
491
|
* Required. Immutable. The two-letter ISO 639-1 language of the items to which the regional inventory is provided.
|
|
@@ -559,6 +556,82 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
559
556
|
|
|
560
557
|
/**
|
|
561
558
|
* Creates the new data source configuration for the given account. This method always creates a new data source.
|
|
559
|
+
* @example
|
|
560
|
+
* ```js
|
|
561
|
+
* // Before running the sample:
|
|
562
|
+
* // - Enable the API at:
|
|
563
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
564
|
+
* // - Login into gcloud by running:
|
|
565
|
+
* // ```sh
|
|
566
|
+
* // $ gcloud auth application-default login
|
|
567
|
+
* // ```
|
|
568
|
+
* // - Install the npm module by running:
|
|
569
|
+
* // ```sh
|
|
570
|
+
* // $ npm install googleapis
|
|
571
|
+
* // ```
|
|
572
|
+
*
|
|
573
|
+
* const {google} = require('googleapis');
|
|
574
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
575
|
+
*
|
|
576
|
+
* async function main() {
|
|
577
|
+
* const auth = new google.auth.GoogleAuth({
|
|
578
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
579
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
580
|
+
* });
|
|
581
|
+
*
|
|
582
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
583
|
+
* const authClient = await auth.getClient();
|
|
584
|
+
* google.options({auth: authClient});
|
|
585
|
+
*
|
|
586
|
+
* // Do the magic
|
|
587
|
+
* const res = await merchantapi.accounts.dataSources.create({
|
|
588
|
+
* // Required. The account where this data source will be created. Format: `accounts/{account\}`
|
|
589
|
+
* parent: 'accounts/my-account',
|
|
590
|
+
*
|
|
591
|
+
* // Request body metadata
|
|
592
|
+
* requestBody: {
|
|
593
|
+
* // request body parameters
|
|
594
|
+
* // {
|
|
595
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
596
|
+
* // "displayName": "my_displayName",
|
|
597
|
+
* // "fileInput": {},
|
|
598
|
+
* // "input": "my_input",
|
|
599
|
+
* // "localInventoryDataSource": {},
|
|
600
|
+
* // "merchantReviewDataSource": {},
|
|
601
|
+
* // "name": "my_name",
|
|
602
|
+
* // "primaryProductDataSource": {},
|
|
603
|
+
* // "productReviewDataSource": {},
|
|
604
|
+
* // "promotionDataSource": {},
|
|
605
|
+
* // "regionalInventoryDataSource": {},
|
|
606
|
+
* // "supplementalProductDataSource": {}
|
|
607
|
+
* // }
|
|
608
|
+
* },
|
|
609
|
+
* });
|
|
610
|
+
* console.log(res.data);
|
|
611
|
+
*
|
|
612
|
+
* // Example response
|
|
613
|
+
* // {
|
|
614
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
615
|
+
* // "displayName": "my_displayName",
|
|
616
|
+
* // "fileInput": {},
|
|
617
|
+
* // "input": "my_input",
|
|
618
|
+
* // "localInventoryDataSource": {},
|
|
619
|
+
* // "merchantReviewDataSource": {},
|
|
620
|
+
* // "name": "my_name",
|
|
621
|
+
* // "primaryProductDataSource": {},
|
|
622
|
+
* // "productReviewDataSource": {},
|
|
623
|
+
* // "promotionDataSource": {},
|
|
624
|
+
* // "regionalInventoryDataSource": {},
|
|
625
|
+
* // "supplementalProductDataSource": {}
|
|
626
|
+
* // }
|
|
627
|
+
* }
|
|
628
|
+
*
|
|
629
|
+
* main().catch(e => {
|
|
630
|
+
* console.error(e);
|
|
631
|
+
* throw e;
|
|
632
|
+
* });
|
|
633
|
+
*
|
|
634
|
+
* ```
|
|
562
635
|
*
|
|
563
636
|
* @param params - Parameters for request
|
|
564
637
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -649,6 +722,50 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
649
722
|
|
|
650
723
|
/**
|
|
651
724
|
* Deletes a data source from your Merchant Center account.
|
|
725
|
+
* @example
|
|
726
|
+
* ```js
|
|
727
|
+
* // Before running the sample:
|
|
728
|
+
* // - Enable the API at:
|
|
729
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
730
|
+
* // - Login into gcloud by running:
|
|
731
|
+
* // ```sh
|
|
732
|
+
* // $ gcloud auth application-default login
|
|
733
|
+
* // ```
|
|
734
|
+
* // - Install the npm module by running:
|
|
735
|
+
* // ```sh
|
|
736
|
+
* // $ npm install googleapis
|
|
737
|
+
* // ```
|
|
738
|
+
*
|
|
739
|
+
* const {google} = require('googleapis');
|
|
740
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
741
|
+
*
|
|
742
|
+
* async function main() {
|
|
743
|
+
* const auth = new google.auth.GoogleAuth({
|
|
744
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
745
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
746
|
+
* });
|
|
747
|
+
*
|
|
748
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
749
|
+
* const authClient = await auth.getClient();
|
|
750
|
+
* google.options({auth: authClient});
|
|
751
|
+
*
|
|
752
|
+
* // Do the magic
|
|
753
|
+
* const res = await merchantapi.accounts.dataSources.delete({
|
|
754
|
+
* // Required. The name of the data source to delete. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
755
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
756
|
+
* });
|
|
757
|
+
* console.log(res.data);
|
|
758
|
+
*
|
|
759
|
+
* // Example response
|
|
760
|
+
* // {}
|
|
761
|
+
* }
|
|
762
|
+
*
|
|
763
|
+
* main().catch(e => {
|
|
764
|
+
* console.error(e);
|
|
765
|
+
* throw e;
|
|
766
|
+
* });
|
|
767
|
+
*
|
|
768
|
+
* ```
|
|
652
769
|
*
|
|
653
770
|
* @param params - Parameters for request
|
|
654
771
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -740,6 +857,56 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
740
857
|
|
|
741
858
|
/**
|
|
742
859
|
* 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.
|
|
860
|
+
* @example
|
|
861
|
+
* ```js
|
|
862
|
+
* // Before running the sample:
|
|
863
|
+
* // - Enable the API at:
|
|
864
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
865
|
+
* // - Login into gcloud by running:
|
|
866
|
+
* // ```sh
|
|
867
|
+
* // $ gcloud auth application-default login
|
|
868
|
+
* // ```
|
|
869
|
+
* // - Install the npm module by running:
|
|
870
|
+
* // ```sh
|
|
871
|
+
* // $ npm install googleapis
|
|
872
|
+
* // ```
|
|
873
|
+
*
|
|
874
|
+
* const {google} = require('googleapis');
|
|
875
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
876
|
+
*
|
|
877
|
+
* async function main() {
|
|
878
|
+
* const auth = new google.auth.GoogleAuth({
|
|
879
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
880
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
881
|
+
* });
|
|
882
|
+
*
|
|
883
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
884
|
+
* const authClient = await auth.getClient();
|
|
885
|
+
* google.options({auth: authClient});
|
|
886
|
+
*
|
|
887
|
+
* // Do the magic
|
|
888
|
+
* const res = await merchantapi.accounts.dataSources.fetch({
|
|
889
|
+
* // Required. The name of the data source resource to fetch. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
890
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
891
|
+
*
|
|
892
|
+
* // Request body metadata
|
|
893
|
+
* requestBody: {
|
|
894
|
+
* // request body parameters
|
|
895
|
+
* // {}
|
|
896
|
+
* },
|
|
897
|
+
* });
|
|
898
|
+
* console.log(res.data);
|
|
899
|
+
*
|
|
900
|
+
* // Example response
|
|
901
|
+
* // {}
|
|
902
|
+
* }
|
|
903
|
+
*
|
|
904
|
+
* main().catch(e => {
|
|
905
|
+
* console.error(e);
|
|
906
|
+
* throw e;
|
|
907
|
+
* });
|
|
908
|
+
*
|
|
909
|
+
* ```
|
|
743
910
|
*
|
|
744
911
|
* @param params - Parameters for request
|
|
745
912
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -831,6 +998,63 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
831
998
|
|
|
832
999
|
/**
|
|
833
1000
|
* Retrieves the data source configuration for the given account.
|
|
1001
|
+
* @example
|
|
1002
|
+
* ```js
|
|
1003
|
+
* // Before running the sample:
|
|
1004
|
+
* // - Enable the API at:
|
|
1005
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1006
|
+
* // - Login into gcloud by running:
|
|
1007
|
+
* // ```sh
|
|
1008
|
+
* // $ gcloud auth application-default login
|
|
1009
|
+
* // ```
|
|
1010
|
+
* // - Install the npm module by running:
|
|
1011
|
+
* // ```sh
|
|
1012
|
+
* // $ npm install googleapis
|
|
1013
|
+
* // ```
|
|
1014
|
+
*
|
|
1015
|
+
* const {google} = require('googleapis');
|
|
1016
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1017
|
+
*
|
|
1018
|
+
* async function main() {
|
|
1019
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1020
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1021
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1022
|
+
* });
|
|
1023
|
+
*
|
|
1024
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1025
|
+
* const authClient = await auth.getClient();
|
|
1026
|
+
* google.options({auth: authClient});
|
|
1027
|
+
*
|
|
1028
|
+
* // Do the magic
|
|
1029
|
+
* const res = await merchantapi.accounts.dataSources.get({
|
|
1030
|
+
* // Required. The name of the data source to retrieve. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
1031
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
1032
|
+
* });
|
|
1033
|
+
* console.log(res.data);
|
|
1034
|
+
*
|
|
1035
|
+
* // Example response
|
|
1036
|
+
* // {
|
|
1037
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1038
|
+
* // "displayName": "my_displayName",
|
|
1039
|
+
* // "fileInput": {},
|
|
1040
|
+
* // "input": "my_input",
|
|
1041
|
+
* // "localInventoryDataSource": {},
|
|
1042
|
+
* // "merchantReviewDataSource": {},
|
|
1043
|
+
* // "name": "my_name",
|
|
1044
|
+
* // "primaryProductDataSource": {},
|
|
1045
|
+
* // "productReviewDataSource": {},
|
|
1046
|
+
* // "promotionDataSource": {},
|
|
1047
|
+
* // "regionalInventoryDataSource": {},
|
|
1048
|
+
* // "supplementalProductDataSource": {}
|
|
1049
|
+
* // }
|
|
1050
|
+
* }
|
|
1051
|
+
*
|
|
1052
|
+
* main().catch(e => {
|
|
1053
|
+
* console.error(e);
|
|
1054
|
+
* throw e;
|
|
1055
|
+
* });
|
|
1056
|
+
*
|
|
1057
|
+
* ```
|
|
834
1058
|
*
|
|
835
1059
|
* @param params - Parameters for request
|
|
836
1060
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -922,6 +1146,57 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
922
1146
|
|
|
923
1147
|
/**
|
|
924
1148
|
* Lists the configurations for data sources for the given account.
|
|
1149
|
+
* @example
|
|
1150
|
+
* ```js
|
|
1151
|
+
* // Before running the sample:
|
|
1152
|
+
* // - Enable the API at:
|
|
1153
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1154
|
+
* // - Login into gcloud by running:
|
|
1155
|
+
* // ```sh
|
|
1156
|
+
* // $ gcloud auth application-default login
|
|
1157
|
+
* // ```
|
|
1158
|
+
* // - Install the npm module by running:
|
|
1159
|
+
* // ```sh
|
|
1160
|
+
* // $ npm install googleapis
|
|
1161
|
+
* // ```
|
|
1162
|
+
*
|
|
1163
|
+
* const {google} = require('googleapis');
|
|
1164
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1165
|
+
*
|
|
1166
|
+
* async function main() {
|
|
1167
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1168
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1169
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1170
|
+
* });
|
|
1171
|
+
*
|
|
1172
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1173
|
+
* const authClient = await auth.getClient();
|
|
1174
|
+
* google.options({auth: authClient});
|
|
1175
|
+
*
|
|
1176
|
+
* // Do the magic
|
|
1177
|
+
* const res = await merchantapi.accounts.dataSources.list({
|
|
1178
|
+
* // 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.
|
|
1179
|
+
* pageSize: 'placeholder-value',
|
|
1180
|
+
* // 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.
|
|
1181
|
+
* pageToken: 'placeholder-value',
|
|
1182
|
+
* // Required. The account to list data sources for. Format: `accounts/{account\}`
|
|
1183
|
+
* parent: 'accounts/my-account',
|
|
1184
|
+
* });
|
|
1185
|
+
* console.log(res.data);
|
|
1186
|
+
*
|
|
1187
|
+
* // Example response
|
|
1188
|
+
* // {
|
|
1189
|
+
* // "dataSources": [],
|
|
1190
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1191
|
+
* // }
|
|
1192
|
+
* }
|
|
1193
|
+
*
|
|
1194
|
+
* main().catch(e => {
|
|
1195
|
+
* console.error(e);
|
|
1196
|
+
* throw e;
|
|
1197
|
+
* });
|
|
1198
|
+
*
|
|
1199
|
+
* ```
|
|
925
1200
|
*
|
|
926
1201
|
* @param params - Parameters for request
|
|
927
1202
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1014,6 +1289,84 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
1014
1289
|
|
|
1015
1290
|
/**
|
|
1016
1291
|
* Updates the existing data source configuration. The fields that are set in the update mask but not provided in the resource will be deleted.
|
|
1292
|
+
* @example
|
|
1293
|
+
* ```js
|
|
1294
|
+
* // Before running the sample:
|
|
1295
|
+
* // - Enable the API at:
|
|
1296
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1297
|
+
* // - Login into gcloud by running:
|
|
1298
|
+
* // ```sh
|
|
1299
|
+
* // $ gcloud auth application-default login
|
|
1300
|
+
* // ```
|
|
1301
|
+
* // - Install the npm module by running:
|
|
1302
|
+
* // ```sh
|
|
1303
|
+
* // $ npm install googleapis
|
|
1304
|
+
* // ```
|
|
1305
|
+
*
|
|
1306
|
+
* const {google} = require('googleapis');
|
|
1307
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1308
|
+
*
|
|
1309
|
+
* async function main() {
|
|
1310
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1311
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1312
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1313
|
+
* });
|
|
1314
|
+
*
|
|
1315
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1316
|
+
* const authClient = await auth.getClient();
|
|
1317
|
+
* google.options({auth: authClient});
|
|
1318
|
+
*
|
|
1319
|
+
* // Do the magic
|
|
1320
|
+
* const res = await merchantapi.accounts.dataSources.patch({
|
|
1321
|
+
* // Required. Identifier. The name of the data source. Format: `accounts/{account\}/dataSources/{datasource\}`
|
|
1322
|
+
* name: 'accounts/my-account/dataSources/my-dataSource',
|
|
1323
|
+
* // 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.
|
|
1324
|
+
* updateMask: 'placeholder-value',
|
|
1325
|
+
*
|
|
1326
|
+
* // Request body metadata
|
|
1327
|
+
* requestBody: {
|
|
1328
|
+
* // request body parameters
|
|
1329
|
+
* // {
|
|
1330
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1331
|
+
* // "displayName": "my_displayName",
|
|
1332
|
+
* // "fileInput": {},
|
|
1333
|
+
* // "input": "my_input",
|
|
1334
|
+
* // "localInventoryDataSource": {},
|
|
1335
|
+
* // "merchantReviewDataSource": {},
|
|
1336
|
+
* // "name": "my_name",
|
|
1337
|
+
* // "primaryProductDataSource": {},
|
|
1338
|
+
* // "productReviewDataSource": {},
|
|
1339
|
+
* // "promotionDataSource": {},
|
|
1340
|
+
* // "regionalInventoryDataSource": {},
|
|
1341
|
+
* // "supplementalProductDataSource": {}
|
|
1342
|
+
* // }
|
|
1343
|
+
* },
|
|
1344
|
+
* });
|
|
1345
|
+
* console.log(res.data);
|
|
1346
|
+
*
|
|
1347
|
+
* // Example response
|
|
1348
|
+
* // {
|
|
1349
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1350
|
+
* // "displayName": "my_displayName",
|
|
1351
|
+
* // "fileInput": {},
|
|
1352
|
+
* // "input": "my_input",
|
|
1353
|
+
* // "localInventoryDataSource": {},
|
|
1354
|
+
* // "merchantReviewDataSource": {},
|
|
1355
|
+
* // "name": "my_name",
|
|
1356
|
+
* // "primaryProductDataSource": {},
|
|
1357
|
+
* // "productReviewDataSource": {},
|
|
1358
|
+
* // "promotionDataSource": {},
|
|
1359
|
+
* // "regionalInventoryDataSource": {},
|
|
1360
|
+
* // "supplementalProductDataSource": {}
|
|
1361
|
+
* // }
|
|
1362
|
+
* }
|
|
1363
|
+
*
|
|
1364
|
+
* main().catch(e => {
|
|
1365
|
+
* console.error(e);
|
|
1366
|
+
* throw e;
|
|
1367
|
+
* });
|
|
1368
|
+
*
|
|
1369
|
+
* ```
|
|
1017
1370
|
*
|
|
1018
1371
|
* @param params - Parameters for request
|
|
1019
1372
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1164,7 +1517,7 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
1164
1517
|
*/
|
|
1165
1518
|
name?: string;
|
|
1166
1519
|
/**
|
|
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.
|
|
1520
|
+
* 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
1521
|
*/
|
|
1169
1522
|
updateMask?: string;
|
|
1170
1523
|
|
|
@@ -1182,6 +1535,59 @@ export namespace merchantapi_datasources_v1beta {
|
|
|
1182
1535
|
|
|
1183
1536
|
/**
|
|
1184
1537
|
* Gets the latest data source file upload. Only the `latest` alias is accepted for a file upload.
|
|
1538
|
+
* @example
|
|
1539
|
+
* ```js
|
|
1540
|
+
* // Before running the sample:
|
|
1541
|
+
* // - Enable the API at:
|
|
1542
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1543
|
+
* // - Login into gcloud by running:
|
|
1544
|
+
* // ```sh
|
|
1545
|
+
* // $ gcloud auth application-default login
|
|
1546
|
+
* // ```
|
|
1547
|
+
* // - Install the npm module by running:
|
|
1548
|
+
* // ```sh
|
|
1549
|
+
* // $ npm install googleapis
|
|
1550
|
+
* // ```
|
|
1551
|
+
*
|
|
1552
|
+
* const {google} = require('googleapis');
|
|
1553
|
+
* const merchantapi = google.merchantapi('datasources_v1beta');
|
|
1554
|
+
*
|
|
1555
|
+
* async function main() {
|
|
1556
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1557
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1558
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1559
|
+
* });
|
|
1560
|
+
*
|
|
1561
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1562
|
+
* const authClient = await auth.getClient();
|
|
1563
|
+
* google.options({auth: authClient});
|
|
1564
|
+
*
|
|
1565
|
+
* // Do the magic
|
|
1566
|
+
* const res = await merchantapi.accounts.dataSources.fileUploads.get({
|
|
1567
|
+
* // Required. The name of the data source file upload to retrieve. Format: `accounts/{account\}/dataSources/{datasource\}/fileUploads/latest`
|
|
1568
|
+
* name: 'accounts/my-account/dataSources/my-dataSource/fileUploads/my-fileUpload',
|
|
1569
|
+
* });
|
|
1570
|
+
* console.log(res.data);
|
|
1571
|
+
*
|
|
1572
|
+
* // Example response
|
|
1573
|
+
* // {
|
|
1574
|
+
* // "dataSourceId": "my_dataSourceId",
|
|
1575
|
+
* // "issues": [],
|
|
1576
|
+
* // "itemsCreated": "my_itemsCreated",
|
|
1577
|
+
* // "itemsTotal": "my_itemsTotal",
|
|
1578
|
+
* // "itemsUpdated": "my_itemsUpdated",
|
|
1579
|
+
* // "name": "my_name",
|
|
1580
|
+
* // "processingState": "my_processingState",
|
|
1581
|
+
* // "uploadTime": "my_uploadTime"
|
|
1582
|
+
* // }
|
|
1583
|
+
* }
|
|
1584
|
+
*
|
|
1585
|
+
* main().catch(e => {
|
|
1586
|
+
* console.error(e);
|
|
1587
|
+
* throw e;
|
|
1588
|
+
* });
|
|
1589
|
+
*
|
|
1590
|
+
* ```
|
|
1185
1591
|
*
|
|
1186
1592
|
* @param params - Parameters for request
|
|
1187
1593
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|