@googleapis/merchantapi 3.0.0 → 5.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 (38) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/accounts_v1beta.ts +1518 -170
  3. package/build/accounts_v1beta.d.ts +593 -58
  4. package/build/accounts_v1beta.js +344 -1
  5. package/build/accounts_v1beta.js.map +1 -1
  6. package/build/conversions_v1beta.d.ts +25 -18
  7. package/build/conversions_v1beta.js.map +1 -1
  8. package/build/datasources_v1beta.d.ts +31 -10
  9. package/build/datasources_v1beta.js.map +1 -1
  10. package/build/inventories_v1beta.d.ts +11 -7
  11. package/build/inventories_v1beta.js.map +1 -1
  12. package/build/lfp_v1beta.d.ts +131 -6
  13. package/build/lfp_v1beta.js +39 -0
  14. package/build/lfp_v1beta.js.map +1 -1
  15. package/build/notifications_v1beta.d.ts +10 -6
  16. package/build/notifications_v1beta.js.map +1 -1
  17. package/build/products_v1beta.d.ts +76 -19
  18. package/build/products_v1beta.js +32 -0
  19. package/build/products_v1beta.js.map +1 -1
  20. package/build/promotions_v1beta.d.ts +10 -6
  21. package/build/promotions_v1beta.js.map +1 -1
  22. package/build/quota_v1beta.d.ts +10 -6
  23. package/build/quota_v1beta.js.map +1 -1
  24. package/build/reports_v1beta.d.ts +11 -7
  25. package/build/reports_v1beta.js.map +1 -1
  26. package/build/reviews_v1beta.d.ts +12 -8
  27. package/build/reviews_v1beta.js.map +1 -1
  28. package/conversions_v1beta.ts +25 -18
  29. package/datasources_v1beta.ts +31 -10
  30. package/inventories_v1beta.ts +11 -7
  31. package/lfp_v1beta.ts +213 -6
  32. package/notifications_v1beta.ts +10 -6
  33. package/package.json +1 -1
  34. package/products_v1beta.ts +152 -19
  35. package/promotions_v1beta.ts +10 -6
  36. package/quota_v1beta.ts +10 -6
  37. package/reports_v1beta.ts +11 -7
  38. package/reviews_v1beta.ts +12 -8
package/lfp_v1beta.ts CHANGED
@@ -124,10 +124,64 @@ export namespace merchantapi_lfp_v1beta {
124
124
  }
125
125
  }
126
126
 
127
+ /**
128
+ * Country-specific settings for the merchant.
129
+ */
130
+ export interface Schema$CountrySettings {
131
+ /**
132
+ * True if this merchant has enabled free local listings in MC.
133
+ */
134
+ freeLocalListingsEnabled?: boolean | null;
135
+ /**
136
+ * Output only. The verification state of this merchant's instock serving feature.
137
+ */
138
+ instockServingVerificationState?: string | null;
139
+ /**
140
+ * Output only. The verification state of this merchant's inventory check.
141
+ */
142
+ inventoryVerificationState?: string | null;
143
+ /**
144
+ * True if this merchant has enabled local inventory ads in MC.
145
+ */
146
+ localInventoryAdsEnabled?: boolean | null;
147
+ /**
148
+ * Output only. The verification state of this merchant's pickup serving feature.
149
+ */
150
+ pickupServingVerificationState?: string | null;
151
+ /**
152
+ * Output only. The product page type selected by this merchant.
153
+ */
154
+ productPageType?: string | null;
155
+ /**
156
+ * Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the country for which these settings are defined.
157
+ */
158
+ regionCode?: string | null;
159
+ }
127
160
  /**
128
161
  * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
129
162
  */
130
163
  export interface Schema$Empty {}
164
+ /**
165
+ * The inventory statistics for a merchant.
166
+ */
167
+ export interface Schema$InventoryStats {
168
+ /**
169
+ * Number of entries (understanding entry as a pair of product and store) that were built based on provided inventories/sales and submitted to Google.
170
+ */
171
+ submittedEntries?: string | null;
172
+ /**
173
+ * Number of submitted in stock entries.
174
+ */
175
+ submittedInStockEntries?: string | null;
176
+ /**
177
+ * Number of products from provided inventories/sales that were created from matches to existing online products provided by the merchant or to the Google catalog.
178
+ */
179
+ submittedProducts?: string | null;
180
+ /**
181
+ * Number of entries that were built based on provided inventories/sales and couldn't be submitted to Google due to errors like missing product.
182
+ */
183
+ unsubmittedEntries?: string | null;
184
+ }
131
185
  /**
132
186
  * Local Inventory for the merchant.
133
187
  */
@@ -189,6 +243,31 @@ export namespace merchantapi_lfp_v1beta {
189
243
  */
190
244
  targetAccount?: string | null;
191
245
  }
246
+ /**
247
+ * The LFP state of a merchant.
248
+ */
249
+ export interface Schema$LfpMerchantState {
250
+ /**
251
+ * Country-specific settings for the merchant.
252
+ */
253
+ countrySettings?: Schema$CountrySettings[];
254
+ /**
255
+ * The inventory statistics for the merchant. The field will be absent if the merchant has no inventory submitted through LFP.
256
+ */
257
+ inventoryStats?: Schema$InventoryStats;
258
+ /**
259
+ * Number of [GBPs](https://www.google.com/business/) this merchant has access to.
260
+ */
261
+ linkedGbps?: string | null;
262
+ /**
263
+ * Identifier. The name of the `LfpMerchantState` resource. Format: `accounts/{account\}/lfpMerchantStates/{target_merchant\}`
264
+ */
265
+ name?: string | null;
266
+ /**
267
+ * Output only. The state per store from the specified merchant. The field will be absent if the merchant has no stores submitted through LFP.
268
+ */
269
+ storeStates?: Schema$LfpStoreState[];
270
+ }
192
271
  /**
193
272
  * A sale for the merchant.
194
273
  */
@@ -291,6 +370,23 @@ export namespace merchantapi_lfp_v1beta {
291
370
  */
292
371
  websiteUri?: string | null;
293
372
  }
373
+ /**
374
+ * The state of a specific merchant's store.
375
+ */
376
+ export interface Schema$LfpStoreState {
377
+ /**
378
+ * Output only. The store matching state.
379
+ */
380
+ matchingState?: string | null;
381
+ /**
382
+ * The hint of why the matching has failed (only set if matching_state is FAILED).
383
+ */
384
+ matchingStateHint?: string | null;
385
+ /**
386
+ * Required. Immutable. The identifier of this store.
387
+ */
388
+ storeCode?: string | null;
389
+ }
294
390
  /**
295
391
  * Response message for the ListLfpStores method.
296
392
  */
@@ -322,19 +418,19 @@ export namespace merchantapi_lfp_v1beta {
322
418
  */
323
419
  export interface Schema$ProductChange {
324
420
  /**
325
- * The new value of the changed resource or attribute.
421
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
326
422
  */
327
423
  newValue?: string | null;
328
424
  /**
329
- * The old value of the changed resource or attribute.
425
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
330
426
  */
331
427
  oldValue?: string | null;
332
428
  /**
333
- * Countries that have the change (if applicable)
429
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
334
430
  */
335
431
  regionCode?: string | null;
336
432
  /**
337
- * Reporting contexts that have the change (if applicable)
433
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
338
434
  */
339
435
  reportingContext?: string | null;
340
436
  }
@@ -355,7 +451,11 @@ export namespace merchantapi_lfp_v1beta {
355
451
  */
356
452
  changes?: Schema$ProductChange[];
357
453
  /**
358
- * The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
454
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
455
+ */
456
+ eventTime?: string | null;
457
+ /**
458
+ * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
359
459
  */
360
460
  expirationTime?: string | null;
361
461
  /**
@@ -363,7 +463,7 @@ export namespace merchantapi_lfp_v1beta {
363
463
  */
364
464
  managingAccount?: string | null;
365
465
  /**
366
- * The product name. Format: `{product.name=accounts/{account\}/products/{product\}\}`
466
+ * The product name. Format: `accounts/{account\}/products/{product\}`
367
467
  */
368
468
  resource?: string | null;
369
469
  /**
@@ -379,11 +479,15 @@ export namespace merchantapi_lfp_v1beta {
379
479
  export class Resource$Accounts {
380
480
  context: APIRequestContext;
381
481
  lfpInventories: Resource$Accounts$Lfpinventories;
482
+ lfpMerchantStates: Resource$Accounts$Lfpmerchantstates;
382
483
  lfpSales: Resource$Accounts$Lfpsales;
383
484
  lfpStores: Resource$Accounts$Lfpstores;
384
485
  constructor(context: APIRequestContext) {
385
486
  this.context = context;
386
487
  this.lfpInventories = new Resource$Accounts$Lfpinventories(this.context);
488
+ this.lfpMerchantStates = new Resource$Accounts$Lfpmerchantstates(
489
+ this.context
490
+ );
387
491
  this.lfpSales = new Resource$Accounts$Lfpsales(this.context);
388
492
  this.lfpStores = new Resource$Accounts$Lfpstores(this.context);
389
493
  }
@@ -496,6 +600,109 @@ export namespace merchantapi_lfp_v1beta {
496
600
  requestBody?: Schema$LfpInventory;
497
601
  }
498
602
 
603
+ export class Resource$Accounts$Lfpmerchantstates {
604
+ context: APIRequestContext;
605
+ constructor(context: APIRequestContext) {
606
+ this.context = context;
607
+ }
608
+
609
+ /**
610
+ * Gets the LFP state of a merchant
611
+ *
612
+ * @param params - Parameters for request
613
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
614
+ * @param callback - Optional callback that handles the response.
615
+ * @returns A promise if used with async/await, or void if used with a callback.
616
+ */
617
+ get(
618
+ params: Params$Resource$Accounts$Lfpmerchantstates$Get,
619
+ options: StreamMethodOptions
620
+ ): GaxiosPromise<Readable>;
621
+ get(
622
+ params?: Params$Resource$Accounts$Lfpmerchantstates$Get,
623
+ options?: MethodOptions
624
+ ): GaxiosPromise<Schema$LfpMerchantState>;
625
+ get(
626
+ params: Params$Resource$Accounts$Lfpmerchantstates$Get,
627
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
628
+ callback: BodyResponseCallback<Readable>
629
+ ): void;
630
+ get(
631
+ params: Params$Resource$Accounts$Lfpmerchantstates$Get,
632
+ options: MethodOptions | BodyResponseCallback<Schema$LfpMerchantState>,
633
+ callback: BodyResponseCallback<Schema$LfpMerchantState>
634
+ ): void;
635
+ get(
636
+ params: Params$Resource$Accounts$Lfpmerchantstates$Get,
637
+ callback: BodyResponseCallback<Schema$LfpMerchantState>
638
+ ): void;
639
+ get(callback: BodyResponseCallback<Schema$LfpMerchantState>): void;
640
+ get(
641
+ paramsOrCallback?:
642
+ | Params$Resource$Accounts$Lfpmerchantstates$Get
643
+ | BodyResponseCallback<Schema$LfpMerchantState>
644
+ | BodyResponseCallback<Readable>,
645
+ optionsOrCallback?:
646
+ | MethodOptions
647
+ | StreamMethodOptions
648
+ | BodyResponseCallback<Schema$LfpMerchantState>
649
+ | BodyResponseCallback<Readable>,
650
+ callback?:
651
+ | BodyResponseCallback<Schema$LfpMerchantState>
652
+ | BodyResponseCallback<Readable>
653
+ ): void | GaxiosPromise<Schema$LfpMerchantState> | GaxiosPromise<Readable> {
654
+ let params = (paramsOrCallback ||
655
+ {}) as Params$Resource$Accounts$Lfpmerchantstates$Get;
656
+ let options = (optionsOrCallback || {}) as MethodOptions;
657
+
658
+ if (typeof paramsOrCallback === 'function') {
659
+ callback = paramsOrCallback;
660
+ params = {} as Params$Resource$Accounts$Lfpmerchantstates$Get;
661
+ options = {};
662
+ }
663
+
664
+ if (typeof optionsOrCallback === 'function') {
665
+ callback = optionsOrCallback;
666
+ options = {};
667
+ }
668
+
669
+ const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
670
+ const parameters = {
671
+ options: Object.assign(
672
+ {
673
+ url: (rootUrl + '/lfp/v1beta/{+name}').replace(
674
+ /([^:]\/)\/+/g,
675
+ '$1'
676
+ ),
677
+ method: 'GET',
678
+ apiVersion: '',
679
+ },
680
+ options
681
+ ),
682
+ params,
683
+ requiredParams: ['name'],
684
+ pathParams: ['name'],
685
+ context: this.context,
686
+ };
687
+ if (callback) {
688
+ createAPIRequest<Schema$LfpMerchantState>(
689
+ parameters,
690
+ callback as BodyResponseCallback<unknown>
691
+ );
692
+ } else {
693
+ return createAPIRequest<Schema$LfpMerchantState>(parameters);
694
+ }
695
+ }
696
+ }
697
+
698
+ export interface Params$Resource$Accounts$Lfpmerchantstates$Get
699
+ extends StandardParameters {
700
+ /**
701
+ * Required. The name of the state to retrieve. Format: `accounts/{account\}/lfpMerchantStates/{target_merchant\}`
702
+ */
703
+ name?: string;
704
+ }
705
+
499
706
  export class Resource$Accounts$Lfpsales {
500
707
  context: APIRequestContext;
501
708
  constructor(context: APIRequestContext) {
@@ -171,19 +171,19 @@ export namespace merchantapi_notifications_v1beta {
171
171
  */
172
172
  export interface Schema$ProductChange {
173
173
  /**
174
- * The new value of the changed resource or attribute.
174
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
175
175
  */
176
176
  newValue?: string | null;
177
177
  /**
178
- * The old value of the changed resource or attribute.
178
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
179
179
  */
180
180
  oldValue?: string | null;
181
181
  /**
182
- * Countries that have the change (if applicable)
182
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
183
183
  */
184
184
  regionCode?: string | null;
185
185
  /**
186
- * Reporting contexts that have the change (if applicable)
186
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
187
187
  */
188
188
  reportingContext?: string | null;
189
189
  }
@@ -204,7 +204,11 @@ export namespace merchantapi_notifications_v1beta {
204
204
  */
205
205
  changes?: Schema$ProductChange[];
206
206
  /**
207
- * The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
207
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
208
+ */
209
+ eventTime?: string | null;
210
+ /**
211
+ * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
208
212
  */
209
213
  expirationTime?: string | null;
210
214
  /**
@@ -212,7 +216,7 @@ export namespace merchantapi_notifications_v1beta {
212
216
  */
213
217
  managingAccount?: string | null;
214
218
  /**
215
- * The product name. Format: `{product.name=accounts/{account\}/products/{product\}\}`
219
+ * The product name. Format: `accounts/{account\}/products/{product\}`
216
220
  */
217
221
  resource?: string | null;
218
222
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/merchantapi",
3
- "version": "3.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "merchantapi",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -501,6 +501,23 @@ export namespace merchantapi_products_v1beta {
501
501
  */
502
502
  virtualModelLink?: string | null;
503
503
  }
504
+ /**
505
+ * Information regarding Automated Discounts.
506
+ */
507
+ export interface Schema$AutomatedDiscounts {
508
+ /**
509
+ * The current sale price for products with a price optimized using Google Automated Discounts (GAD). Absent if the information about the GAD_price of the product is not available.
510
+ */
511
+ gadPrice?: Schema$Price;
512
+ /**
513
+ * The price prior to the application of the first price reduction. Absent if the information about the prior price of the product is not available.
514
+ */
515
+ priorPrice?: Schema$Price;
516
+ /**
517
+ * The price prior to the application of consecutive price reductions. Absent if the information about the prior price of the product is not available.
518
+ */
519
+ priorPriceProgressive?: Schema$Price;
520
+ }
504
521
  /**
505
522
  * Product [certification](https://support.google.com/merchants/answer/13528839), initially introduced for EU energy efficiency labeling compliance using the EU EPREL database.
506
523
  */
@@ -766,13 +783,17 @@ export namespace merchantapi_products_v1beta {
766
783
  currencyCode?: string | null;
767
784
  }
768
785
  /**
769
- * The processed product, built from multiple product inputs after applying rules and supplemental data sources. This processed product matches what is shown in your Merchant Center account and in Shopping ads and other surfaces across Google. Each product is built from exactly one primary data source product input, and multiple supplemental data source inputs. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved. All fields in the processed product and its sub-messages match the name of their corresponding attribute in the [Product data specification](https://support.google.com/merchants/answer/7052112) with some exceptions.
786
+ * The processed product, built from multiple product inputs after applying rules and supplemental data sources. This processed product matches what is shown in your Merchant Center account. Each product is built from exactly one primary data source product input, and multiple supplemental data source inputs. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved. All fields in the processed product and its sub-messages match the name of their corresponding attribute in the [Product data specification](https://support.google.com/merchants/answer/7052112) with some exceptions.
770
787
  */
771
788
  export interface Schema$Product {
772
789
  /**
773
790
  * Output only. A list of product attributes.
774
791
  */
775
792
  attributes?: Schema$Attributes;
793
+ /**
794
+ * Output only. The automated discounts information for the product.
795
+ */
796
+ automatedDiscounts?: Schema$AutomatedDiscounts;
776
797
  /**
777
798
  * Output only. The [channel](https://support.google.com/merchants/answer/7361332) of the product.
778
799
  */
@@ -794,7 +815,7 @@ export namespace merchantapi_products_v1beta {
794
815
  */
795
816
  feedLabel?: string | null;
796
817
  /**
797
- * The name of the product. Format: `"{product.name=accounts/{account\}/products/{product\}\}"` where the last section `product` consists of 4 parts: channel~content_language~feed_label~offer_id example for product name is "accounts/123/products/online~en~US~sku123"
818
+ * The name of the product. Format: `accounts/{account\}/products/{product\}` where the last section `product` consists of 4 parts: `channel~content_language~feed_label~offer_id` example for product name is `accounts/123/products/online~en~US~sku123`
798
819
  */
799
820
  name?: string | null;
800
821
  /**
@@ -815,19 +836,19 @@ export namespace merchantapi_products_v1beta {
815
836
  */
816
837
  export interface Schema$ProductChange {
817
838
  /**
818
- * The new value of the changed resource or attribute.
839
+ * The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
819
840
  */
820
841
  newValue?: string | null;
821
842
  /**
822
- * The old value of the changed resource or attribute.
843
+ * The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)
823
844
  */
824
845
  oldValue?: string | null;
825
846
  /**
826
- * Countries that have the change (if applicable)
847
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
827
848
  */
828
849
  regionCode?: string | null;
829
850
  /**
830
- * Reporting contexts that have the change (if applicable)
851
+ * Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)
831
852
  */
832
853
  reportingContext?: string | null;
833
854
  }
@@ -862,7 +883,7 @@ export namespace merchantapi_products_v1beta {
862
883
  value?: number | null;
863
884
  }
864
885
  /**
865
- * This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed Product. Required product input attributes to pass data validation checks are primarily defined in the [Products Data Specification](https://support.google.com/merchants/answer/188494). The following attributes are required: feedLabel, contentLanguage and offerId. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. All fields in the product input and its sub-messages match the English name of their corresponding attribute in the vertical spec with [some exceptions](https://support.google.com/merchants/answer/7052112).
886
+ * This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed Product. Required product input attributes to pass data validation checks are primarily defined in the [Products Data Specification](https://support.google.com/merchants/answer/188494). The following attributes are required: feedLabel, contentLanguage and offerId. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. All fields in the product input and its sub-messages match the English name of their corresponding attribute in the [Products Data Specification](https://support.google.com/merchants/answer/188494) with [some exceptions](https://support.google.com/merchants/answer/7052112). The following reference documentation lists the field names in the **camelCase** casing style while the Products Data Specification lists the names in the **snake_case** casing style.
866
887
  */
867
888
  export interface Schema$ProductInput {
868
889
  /**
@@ -878,7 +899,7 @@ export namespace merchantapi_products_v1beta {
878
899
  */
879
900
  contentLanguage?: string | null;
880
901
  /**
881
- * Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, `{ "name": "size type", "value": "regular" \}`). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.
902
+ * Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, `{ "name": "size type", "value": "regular" \}`). This is useful for submitting attributes not explicitly exposed by the API. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion.
882
903
  */
883
904
  customAttributes?: Schema$CustomAttribute[];
884
905
  /**
@@ -886,7 +907,7 @@ export namespace merchantapi_products_v1beta {
886
907
  */
887
908
  feedLabel?: string | null;
888
909
  /**
889
- * Identifier. The name of the product input. Format: `"{productinput.name=accounts/{account\}/productInputs/{productinput\}\}"` where the last section `productinput` consists of 4 parts: channel~content_language~feed_label~offer_id example for product input name is "accounts/123/productInputs/online~en~US~sku123"
910
+ * Identifier. The name of the product input. Format: `accounts/{account\}/productInputs/{productinput\}` where the last section `productinput` consists of 4 parts: `channel~content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/online~en~US~sku123`
890
911
  */
891
912
  name?: string | null;
892
913
  /**
@@ -894,11 +915,11 @@ export namespace merchantapi_products_v1beta {
894
915
  */
895
916
  offerId?: string | null;
896
917
  /**
897
- * Output only. The name of the processed product. Format: `"{product.name=accounts/{account\}/products/{product\}\}"`
918
+ * Output only. The name of the processed product. Format: `accounts/{account\}/products/{product\}`
898
919
  */
899
920
  product?: string | null;
900
921
  /**
901
- * Optional. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time. If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current `version_number`. Only supported for insertions into primary data sources. If the operation is prevented, the aborted exception will be thrown.
922
+ * Optional. Immutable. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time. If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current `version_number`. Only supported for insertions into primary data sources. Do not set this field for updates. Do not set this field for insertions into supplemental data sources. If the operation is prevented, the aborted exception will be thrown.
902
923
  */
903
924
  versionNumber?: string | null;
904
925
  }
@@ -944,7 +965,11 @@ export namespace merchantapi_products_v1beta {
944
965
  */
945
966
  changes?: Schema$ProductChange[];
946
967
  /**
947
- * The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
968
+ * The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.
969
+ */
970
+ eventTime?: string | null;
971
+ /**
972
+ * Optional. The product expiration time. This field will not bet set if the notification is sent for a product deletion event.
948
973
  */
949
974
  expirationTime?: string | null;
950
975
  /**
@@ -952,7 +977,7 @@ export namespace merchantapi_products_v1beta {
952
977
  */
953
978
  managingAccount?: string | null;
954
979
  /**
955
- * The product name. Format: `{product.name=accounts/{account\}/products/{product\}\}`
980
+ * The product name. Format: `accounts/{account\}/products/{product\}`
956
981
  */
957
982
  resource?: string | null;
958
983
  /**
@@ -1359,6 +1384,94 @@ export namespace merchantapi_products_v1beta {
1359
1384
  return createAPIRequest<Schema$ProductInput>(parameters);
1360
1385
  }
1361
1386
  }
1387
+
1388
+ /**
1389
+ * Updates the existing product input in your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
1390
+ *
1391
+ * @param params - Parameters for request
1392
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1393
+ * @param callback - Optional callback that handles the response.
1394
+ * @returns A promise if used with async/await, or void if used with a callback.
1395
+ */
1396
+ patch(
1397
+ params: Params$Resource$Accounts$Productinputs$Patch,
1398
+ options: StreamMethodOptions
1399
+ ): GaxiosPromise<Readable>;
1400
+ patch(
1401
+ params?: Params$Resource$Accounts$Productinputs$Patch,
1402
+ options?: MethodOptions
1403
+ ): GaxiosPromise<Schema$ProductInput>;
1404
+ patch(
1405
+ params: Params$Resource$Accounts$Productinputs$Patch,
1406
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1407
+ callback: BodyResponseCallback<Readable>
1408
+ ): void;
1409
+ patch(
1410
+ params: Params$Resource$Accounts$Productinputs$Patch,
1411
+ options: MethodOptions | BodyResponseCallback<Schema$ProductInput>,
1412
+ callback: BodyResponseCallback<Schema$ProductInput>
1413
+ ): void;
1414
+ patch(
1415
+ params: Params$Resource$Accounts$Productinputs$Patch,
1416
+ callback: BodyResponseCallback<Schema$ProductInput>
1417
+ ): void;
1418
+ patch(callback: BodyResponseCallback<Schema$ProductInput>): void;
1419
+ patch(
1420
+ paramsOrCallback?:
1421
+ | Params$Resource$Accounts$Productinputs$Patch
1422
+ | BodyResponseCallback<Schema$ProductInput>
1423
+ | BodyResponseCallback<Readable>,
1424
+ optionsOrCallback?:
1425
+ | MethodOptions
1426
+ | StreamMethodOptions
1427
+ | BodyResponseCallback<Schema$ProductInput>
1428
+ | BodyResponseCallback<Readable>,
1429
+ callback?:
1430
+ | BodyResponseCallback<Schema$ProductInput>
1431
+ | BodyResponseCallback<Readable>
1432
+ ): void | GaxiosPromise<Schema$ProductInput> | GaxiosPromise<Readable> {
1433
+ let params = (paramsOrCallback ||
1434
+ {}) as Params$Resource$Accounts$Productinputs$Patch;
1435
+ let options = (optionsOrCallback || {}) as MethodOptions;
1436
+
1437
+ if (typeof paramsOrCallback === 'function') {
1438
+ callback = paramsOrCallback;
1439
+ params = {} as Params$Resource$Accounts$Productinputs$Patch;
1440
+ options = {};
1441
+ }
1442
+
1443
+ if (typeof optionsOrCallback === 'function') {
1444
+ callback = optionsOrCallback;
1445
+ options = {};
1446
+ }
1447
+
1448
+ const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
1449
+ const parameters = {
1450
+ options: Object.assign(
1451
+ {
1452
+ url: (rootUrl + '/products/v1beta/{+name}').replace(
1453
+ /([^:]\/)\/+/g,
1454
+ '$1'
1455
+ ),
1456
+ method: 'PATCH',
1457
+ apiVersion: '',
1458
+ },
1459
+ options
1460
+ ),
1461
+ params,
1462
+ requiredParams: ['name'],
1463
+ pathParams: ['name'],
1464
+ context: this.context,
1465
+ };
1466
+ if (callback) {
1467
+ createAPIRequest<Schema$ProductInput>(
1468
+ parameters,
1469
+ callback as BodyResponseCallback<unknown>
1470
+ );
1471
+ } else {
1472
+ return createAPIRequest<Schema$ProductInput>(parameters);
1473
+ }
1474
+ }
1362
1475
  }
1363
1476
 
1364
1477
  export interface Params$Resource$Accounts$Productinputs$Delete
@@ -1368,18 +1481,18 @@ export namespace merchantapi_products_v1beta {
1368
1481
  */
1369
1482
  dataSource?: string;
1370
1483
  /**
1371
- * Required. The name of the product input resource to delete. Format: accounts/{account\}/productInputs/{product\} where the last section `product` consists of 4 parts: channel~content_language~feed_label~offer_id example for product name is "accounts/123/productInputs/online~en~US~sku123"
1484
+ * Required. The name of the product input resource to delete. Format: `accounts/{account\}/productInputs/{product\}` where the last section `product` consists of 4 parts: `channel~content_language~feed_label~offer_id` example for product name is `accounts/123/productInputs/online~en~US~sku123`.
1372
1485
  */
1373
1486
  name?: string;
1374
1487
  }
1375
1488
  export interface Params$Resource$Accounts$Productinputs$Insert
1376
1489
  extends StandardParameters {
1377
1490
  /**
1378
- * Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. Format: `accounts/{account\}/dataSources/{datasource\}`.
1491
+ * Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`.
1379
1492
  */
1380
1493
  dataSource?: string;
1381
1494
  /**
1382
- * Required. The account where this product will be inserted. Format: accounts/{account\}
1495
+ * Required. The account where this product will be inserted. Format: `accounts/{account\}`
1383
1496
  */
1384
1497
  parent?: string;
1385
1498
 
@@ -1388,6 +1501,26 @@ export namespace merchantapi_products_v1beta {
1388
1501
  */
1389
1502
  requestBody?: Schema$ProductInput;
1390
1503
  }
1504
+ export interface Params$Resource$Accounts$Productinputs$Patch
1505
+ extends StandardParameters {
1506
+ /**
1507
+ * Required. The primary or supplemental product data source where `data_source` name identifies the product input to be updated. Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`.
1508
+ */
1509
+ dataSource?: string;
1510
+ /**
1511
+ * Identifier. The name of the product input. Format: `accounts/{account\}/productInputs/{productinput\}` where the last section `productinput` consists of 4 parts: `channel~content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/online~en~US~sku123`
1512
+ */
1513
+ name?: string;
1514
+ /**
1515
+ * Optional. The list of product attributes to be updated. If the update mask is omitted, then it is treated as implied field mask equivalent to all fields that are populated (have a non-empty value). Attributes specified in the update mask without a value specified in the body will be deleted from the product. Update mask can only be specified for top level fields in attributes and custom attributes. To specify the update mask for custom attributes you need to add the `custom_attribute.` prefix. Providing special "*" value for full product replacement is not supported.
1516
+ */
1517
+ updateMask?: string;
1518
+
1519
+ /**
1520
+ * Request body metadata
1521
+ */
1522
+ requestBody?: Schema$ProductInput;
1523
+ }
1391
1524
 
1392
1525
  export class Resource$Accounts$Products {
1393
1526
  context: APIRequestContext;
@@ -1484,7 +1617,7 @@ export namespace merchantapi_products_v1beta {
1484
1617
  }
1485
1618
 
1486
1619
  /**
1487
- * Lists the processed products in your Merchant Center account. The response might contain fewer items than specified by pageSize. Rely on pageToken to determine if there are more items to be requested. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved.
1620
+ * Lists the processed products in your Merchant Center account. The response might contain fewer items than specified by `pageSize`. Rely on `pageToken` to determine if there are more items to be requested. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved.
1488
1621
  *
1489
1622
  * @param params - Parameters for request
1490
1623
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1580,7 +1713,7 @@ export namespace merchantapi_products_v1beta {
1580
1713
  export interface Params$Resource$Accounts$Products$Get
1581
1714
  extends StandardParameters {
1582
1715
  /**
1583
- * Required. The name of the product to retrieve. Format: `accounts/{account\}/products/{product\}` where the last section `product` consists of 4 parts: channel~content_language~feed_label~offer_id example for product name is "accounts/123/products/online~en~US~sku123"
1716
+ * Required. The name of the product to retrieve. Format: `accounts/{account\}/products/{product\}` where the last section `product` consists of 4 parts: `channel~content_language~feed_label~offer_id` example for product name is `accounts/123/products/online~en~US~sku123`
1584
1717
  */
1585
1718
  name?: string;
1586
1719
  }
@@ -1595,7 +1728,7 @@ export namespace merchantapi_products_v1beta {
1595
1728
  */
1596
1729
  pageToken?: string;
1597
1730
  /**
1598
- * Required. The account to list processed products for. Format: accounts/{account\}
1731
+ * Required. The account to list processed products for. Format: `accounts/{account\}`
1599
1732
  */
1600
1733
  parent?: string;
1601
1734
  }