@googleapis/merchantapi 5.0.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +9 -0
  3. package/accounts_v1beta.ts +6487 -518
  4. package/build/accounts_v1beta.d.ts +4773 -229
  5. package/build/accounts_v1beta.js +560 -12
  6. package/build/accounts_v1beta.js.map +1 -1
  7. package/build/conversions_v1beta.d.ts +349 -14
  8. package/build/conversions_v1beta.js.map +1 -1
  9. package/build/datasources_v1beta.d.ts +427 -18
  10. package/build/datasources_v1beta.js.map +1 -1
  11. package/build/index.d.ts +11 -1
  12. package/build/index.js +7 -1
  13. package/build/index.js.map +1 -1
  14. package/build/inventories_v1beta.d.ts +349 -15
  15. package/build/inventories_v1beta.js.map +1 -1
  16. package/build/issueresolution_v1beta.d.ts +1027 -0
  17. package/build/issueresolution_v1beta.js +196 -0
  18. package/build/issueresolution_v1beta.js.map +1 -0
  19. package/build/lfp_v1beta.d.ts +451 -18
  20. package/build/lfp_v1beta.js.map +1 -1
  21. package/build/notifications_v1beta.d.ts +283 -12
  22. package/build/notifications_v1beta.js.map +1 -1
  23. package/build/ordertracking_v1beta.d.ts +459 -0
  24. package/build/ordertracking_v1beta.js +91 -0
  25. package/build/ordertracking_v1beta.js.map +1 -0
  26. package/build/products_v1beta.d.ts +358 -55
  27. package/build/products_v1beta.js.map +1 -1
  28. package/build/promotions_v1beta.d.ts +178 -11
  29. package/build/promotions_v1beta.js.map +1 -1
  30. package/build/quota_v1beta.d.ts +55 -4
  31. package/build/quota_v1beta.js.map +1 -1
  32. package/build/reports_v1beta.d.ts +61 -4
  33. package/build/reports_v1beta.js.map +1 -1
  34. package/build/reviews_v1beta.d.ts +443 -19
  35. package/build/reviews_v1beta.js.map +1 -1
  36. package/conversions_v1beta.ts +371 -21
  37. package/datasources_v1beta.ts +453 -26
  38. package/index.ts +24 -1
  39. package/inventories_v1beta.ts +367 -24
  40. package/issueresolution_v1beta.ts +1426 -0
  41. package/lfp_v1beta.ts +477 -26
  42. package/notifications_v1beta.ts +299 -21
  43. package/ordertracking_v1beta.ts +599 -0
  44. package/package.json +2 -2
  45. package/products_v1beta.ts +376 -61
  46. package/promotions_v1beta.ts +188 -15
  47. package/quota_v1beta.ts +57 -6
  48. package/reports_v1beta.ts +65 -5
  49. package/reviews_v1beta.ts +471 -29
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -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 bet set if the notification is sent for a product deletion event.
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
  /**
@@ -558,7 +558,83 @@ export namespace merchantapi_datasources_v1beta {
558
558
  }
559
559
 
560
560
  /**
561
- * Creates the new data source configuration for the given account.
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`.
@@ -568,11 +644,11 @@ export namespace merchantapi_datasources_v1beta {
568
644
  create(
569
645
  params: Params$Resource$Accounts$Datasources$Create,
570
646
  options: StreamMethodOptions
571
- ): GaxiosPromise<Readable>;
647
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
572
648
  create(
573
649
  params?: Params$Resource$Accounts$Datasources$Create,
574
650
  options?: MethodOptions
575
- ): GaxiosPromise<Schema$DataSource>;
651
+ ): Promise<GaxiosResponseWithHTTP2<Schema$DataSource>>;
576
652
  create(
577
653
  params: Params$Resource$Accounts$Datasources$Create,
578
654
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -601,7 +677,10 @@ export namespace merchantapi_datasources_v1beta {
601
677
  callback?:
602
678
  | BodyResponseCallback<Schema$DataSource>
603
679
  | BodyResponseCallback<Readable>
604
- ): void | GaxiosPromise<Schema$DataSource> | GaxiosPromise<Readable> {
680
+ ):
681
+ | void
682
+ | Promise<GaxiosResponseWithHTTP2<Schema$DataSource>>
683
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
605
684
  let params = (paramsOrCallback ||
606
685
  {}) as Params$Resource$Accounts$Datasources$Create;
607
686
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -646,6 +725,50 @@ export namespace merchantapi_datasources_v1beta {
646
725
 
647
726
  /**
648
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
+ * ```
649
772
  *
650
773
  * @param params - Parameters for request
651
774
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -655,11 +778,11 @@ export namespace merchantapi_datasources_v1beta {
655
778
  delete(
656
779
  params: Params$Resource$Accounts$Datasources$Delete,
657
780
  options: StreamMethodOptions
658
- ): GaxiosPromise<Readable>;
781
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
659
782
  delete(
660
783
  params?: Params$Resource$Accounts$Datasources$Delete,
661
784
  options?: MethodOptions
662
- ): GaxiosPromise<Schema$Empty>;
785
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
663
786
  delete(
664
787
  params: Params$Resource$Accounts$Datasources$Delete,
665
788
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -688,7 +811,10 @@ export namespace merchantapi_datasources_v1beta {
688
811
  callback?:
689
812
  | BodyResponseCallback<Schema$Empty>
690
813
  | BodyResponseCallback<Readable>
691
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
814
+ ):
815
+ | void
816
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
817
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
692
818
  let params = (paramsOrCallback ||
693
819
  {}) as Params$Resource$Accounts$Datasources$Delete;
694
820
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -734,6 +860,56 @@ export namespace merchantapi_datasources_v1beta {
734
860
 
735
861
  /**
736
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
+ * ```
737
913
  *
738
914
  * @param params - Parameters for request
739
915
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -743,11 +919,11 @@ export namespace merchantapi_datasources_v1beta {
743
919
  fetch(
744
920
  params: Params$Resource$Accounts$Datasources$Fetch,
745
921
  options: StreamMethodOptions
746
- ): GaxiosPromise<Readable>;
922
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
747
923
  fetch(
748
924
  params?: Params$Resource$Accounts$Datasources$Fetch,
749
925
  options?: MethodOptions
750
- ): GaxiosPromise<Schema$Empty>;
926
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
751
927
  fetch(
752
928
  params: Params$Resource$Accounts$Datasources$Fetch,
753
929
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -776,7 +952,10 @@ export namespace merchantapi_datasources_v1beta {
776
952
  callback?:
777
953
  | BodyResponseCallback<Schema$Empty>
778
954
  | BodyResponseCallback<Readable>
779
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
955
+ ):
956
+ | void
957
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
958
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
780
959
  let params = (paramsOrCallback ||
781
960
  {}) as Params$Resource$Accounts$Datasources$Fetch;
782
961
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -822,6 +1001,63 @@ export namespace merchantapi_datasources_v1beta {
822
1001
 
823
1002
  /**
824
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
+ * ```
825
1061
  *
826
1062
  * @param params - Parameters for request
827
1063
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -831,11 +1067,11 @@ export namespace merchantapi_datasources_v1beta {
831
1067
  get(
832
1068
  params: Params$Resource$Accounts$Datasources$Get,
833
1069
  options: StreamMethodOptions
834
- ): GaxiosPromise<Readable>;
1070
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
835
1071
  get(
836
1072
  params?: Params$Resource$Accounts$Datasources$Get,
837
1073
  options?: MethodOptions
838
- ): GaxiosPromise<Schema$DataSource>;
1074
+ ): Promise<GaxiosResponseWithHTTP2<Schema$DataSource>>;
839
1075
  get(
840
1076
  params: Params$Resource$Accounts$Datasources$Get,
841
1077
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -864,7 +1100,10 @@ export namespace merchantapi_datasources_v1beta {
864
1100
  callback?:
865
1101
  | BodyResponseCallback<Schema$DataSource>
866
1102
  | BodyResponseCallback<Readable>
867
- ): void | GaxiosPromise<Schema$DataSource> | GaxiosPromise<Readable> {
1103
+ ):
1104
+ | void
1105
+ | Promise<GaxiosResponseWithHTTP2<Schema$DataSource>>
1106
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
868
1107
  let params = (paramsOrCallback ||
869
1108
  {}) as Params$Resource$Accounts$Datasources$Get;
870
1109
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -910,6 +1149,57 @@ export namespace merchantapi_datasources_v1beta {
910
1149
 
911
1150
  /**
912
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
+ * ```
913
1203
  *
914
1204
  * @param params - Parameters for request
915
1205
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -919,11 +1209,11 @@ export namespace merchantapi_datasources_v1beta {
919
1209
  list(
920
1210
  params: Params$Resource$Accounts$Datasources$List,
921
1211
  options: StreamMethodOptions
922
- ): GaxiosPromise<Readable>;
1212
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
923
1213
  list(
924
1214
  params?: Params$Resource$Accounts$Datasources$List,
925
1215
  options?: MethodOptions
926
- ): GaxiosPromise<Schema$ListDataSourcesResponse>;
1216
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListDataSourcesResponse>>;
927
1217
  list(
928
1218
  params: Params$Resource$Accounts$Datasources$List,
929
1219
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -956,8 +1246,8 @@ export namespace merchantapi_datasources_v1beta {
956
1246
  | BodyResponseCallback<Readable>
957
1247
  ):
958
1248
  | void
959
- | GaxiosPromise<Schema$ListDataSourcesResponse>
960
- | GaxiosPromise<Readable> {
1249
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListDataSourcesResponse>>
1250
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
961
1251
  let params = (paramsOrCallback ||
962
1252
  {}) as Params$Resource$Accounts$Datasources$List;
963
1253
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1002,6 +1292,84 @@ export namespace merchantapi_datasources_v1beta {
1002
1292
 
1003
1293
  /**
1004
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
+ * ```
1005
1373
  *
1006
1374
  * @param params - Parameters for request
1007
1375
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1011,11 +1379,11 @@ export namespace merchantapi_datasources_v1beta {
1011
1379
  patch(
1012
1380
  params: Params$Resource$Accounts$Datasources$Patch,
1013
1381
  options: StreamMethodOptions
1014
- ): GaxiosPromise<Readable>;
1382
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1015
1383
  patch(
1016
1384
  params?: Params$Resource$Accounts$Datasources$Patch,
1017
1385
  options?: MethodOptions
1018
- ): GaxiosPromise<Schema$DataSource>;
1386
+ ): Promise<GaxiosResponseWithHTTP2<Schema$DataSource>>;
1019
1387
  patch(
1020
1388
  params: Params$Resource$Accounts$Datasources$Patch,
1021
1389
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1044,7 +1412,10 @@ export namespace merchantapi_datasources_v1beta {
1044
1412
  callback?:
1045
1413
  | BodyResponseCallback<Schema$DataSource>
1046
1414
  | BodyResponseCallback<Readable>
1047
- ): void | GaxiosPromise<Schema$DataSource> | GaxiosPromise<Readable> {
1415
+ ):
1416
+ | void
1417
+ | Promise<GaxiosResponseWithHTTP2<Schema$DataSource>>
1418
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1048
1419
  let params = (paramsOrCallback ||
1049
1420
  {}) as Params$Resource$Accounts$Datasources$Patch;
1050
1421
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1149,7 +1520,7 @@ export namespace merchantapi_datasources_v1beta {
1149
1520
  */
1150
1521
  name?: string;
1151
1522
  /**
1152
- * 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.
1153
1524
  */
1154
1525
  updateMask?: string;
1155
1526
 
@@ -1167,6 +1538,59 @@ export namespace merchantapi_datasources_v1beta {
1167
1538
 
1168
1539
  /**
1169
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
+ * ```
1170
1594
  *
1171
1595
  * @param params - Parameters for request
1172
1596
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1176,11 +1600,11 @@ export namespace merchantapi_datasources_v1beta {
1176
1600
  get(
1177
1601
  params: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1178
1602
  options: StreamMethodOptions
1179
- ): GaxiosPromise<Readable>;
1603
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1180
1604
  get(
1181
1605
  params?: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1182
1606
  options?: MethodOptions
1183
- ): GaxiosPromise<Schema$FileUpload>;
1607
+ ): Promise<GaxiosResponseWithHTTP2<Schema$FileUpload>>;
1184
1608
  get(
1185
1609
  params: Params$Resource$Accounts$Datasources$Fileuploads$Get,
1186
1610
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1209,7 +1633,10 @@ export namespace merchantapi_datasources_v1beta {
1209
1633
  callback?:
1210
1634
  | BodyResponseCallback<Schema$FileUpload>
1211
1635
  | BodyResponseCallback<Readable>
1212
- ): void | GaxiosPromise<Schema$FileUpload> | GaxiosPromise<Readable> {
1636
+ ):
1637
+ | void
1638
+ | Promise<GaxiosResponseWithHTTP2<Schema$FileUpload>>
1639
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1213
1640
  let params = (paramsOrCallback ||
1214
1641
  {}) as Params$Resource$Accounts$Datasources$Fileuploads$Get;
1215
1642
  let options = (optionsOrCallback || {}) as MethodOptions;