@googleapis/merchantapi 11.0.0 → 12.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 (100) hide show
  1. package/CHANGELOG.md +216 -0
  2. package/accounts_v1.ts +13566 -0
  3. package/accounts_v1beta.ts +4 -4
  4. package/build/accounts_v1.d.ts +7784 -0
  5. package/build/accounts_v1.js +2504 -0
  6. package/build/accounts_v1.js.map +1 -0
  7. package/build/accounts_v1beta.d.ts +4 -5
  8. package/build/accounts_v1beta.js +46 -1
  9. package/build/accounts_v1beta.js.map +1 -1
  10. package/build/conversions_v1.d.ts +748 -0
  11. package/build/conversions_v1.js +256 -0
  12. package/build/conversions_v1.js.map +1 -0
  13. package/build/conversions_v1beta.d.ts +0 -1
  14. package/build/conversions_v1beta.js +6 -1
  15. package/build/conversions_v1beta.js.map +1 -1
  16. package/build/datasources_v1.d.ts +1075 -0
  17. package/build/datasources_v1.js +297 -0
  18. package/build/datasources_v1.js.map +1 -0
  19. package/build/datasources_v1beta.d.ts +0 -1
  20. package/build/datasources_v1beta.js +8 -1
  21. package/build/datasources_v1beta.js.map +1 -1
  22. package/build/index.d.ts +60 -0
  23. package/build/index.js +38 -2
  24. package/build/index.js.map +1 -1
  25. package/build/inventories_v1.d.ts +766 -0
  26. package/build/inventories_v1.js +280 -0
  27. package/build/inventories_v1.js.map +1 -0
  28. package/build/inventories_v1beta.d.ts +0 -1
  29. package/build/inventories_v1beta.js +10 -1
  30. package/build/inventories_v1beta.js.map +1 -1
  31. package/build/issueresolution_v1.d.ts +1026 -0
  32. package/build/issueresolution_v1.js +202 -0
  33. package/build/issueresolution_v1.js.map +1 -0
  34. package/build/issueresolution_v1beta.d.ts +0 -1
  35. package/build/issueresolution_v1beta.js +8 -1
  36. package/build/issueresolution_v1beta.js.map +1 -1
  37. package/build/lfp_v1.d.ts +1047 -0
  38. package/build/lfp_v1.js +315 -0
  39. package/build/lfp_v1.js.map +1 -0
  40. package/build/lfp_v1beta.d.ts +1 -2
  41. package/build/lfp_v1beta.js +12 -1
  42. package/build/lfp_v1beta.js.map +1 -1
  43. package/build/notifications_v1.d.ts +579 -0
  44. package/build/notifications_v1.js +227 -0
  45. package/build/notifications_v1.js.map +1 -0
  46. package/build/notifications_v1beta.d.ts +0 -1
  47. package/build/notifications_v1beta.js +6 -1
  48. package/build/notifications_v1beta.js.map +1 -1
  49. package/build/ordertracking_v1.d.ts +458 -0
  50. package/build/ordertracking_v1.js +96 -0
  51. package/build/ordertracking_v1.js.map +1 -0
  52. package/build/ordertracking_v1beta.d.ts +4 -1
  53. package/build/ordertracking_v1beta.js +6 -1
  54. package/build/ordertracking_v1beta.js.map +1 -1
  55. package/build/products_v1.d.ts +1555 -0
  56. package/build/products_v1.js +233 -0
  57. package/build/products_v1.js.map +1 -0
  58. package/build/products_v1beta.d.ts +3 -4
  59. package/build/products_v1beta.js +8 -1
  60. package/build/products_v1beta.js.map +1 -1
  61. package/build/promotions_v1.d.ts +698 -0
  62. package/build/promotions_v1.js +160 -0
  63. package/build/promotions_v1.js.map +1 -0
  64. package/build/promotions_v1beta.d.ts +4 -5
  65. package/build/promotions_v1beta.js +6 -1
  66. package/build/promotions_v1beta.js.map +1 -1
  67. package/build/quota_v1.d.ts +283 -0
  68. package/build/quota_v1.js +96 -0
  69. package/build/quota_v1.js.map +1 -0
  70. package/build/quota_v1beta.d.ts +0 -1
  71. package/build/quota_v1beta.js +6 -1
  72. package/build/quota_v1beta.js.map +1 -1
  73. package/build/reports_v1.d.ts +1065 -0
  74. package/build/reports_v1.js +96 -0
  75. package/build/reports_v1.js.map +1 -0
  76. package/build/reports_v1beta.d.ts +1 -2
  77. package/build/reports_v1beta.js +6 -1
  78. package/build/reports_v1beta.js.map +1 -1
  79. package/build/reviews_v1beta.d.ts +0 -1
  80. package/build/reviews_v1beta.js +8 -1
  81. package/build/reviews_v1beta.js.map +1 -1
  82. package/build/tsconfig.tsbuildinfo +1 -0
  83. package/conversions_v1.ts +1284 -0
  84. package/datasources_v1.ts +1690 -0
  85. package/index.ts +142 -0
  86. package/inventories_v1.ts +1321 -0
  87. package/issueresolution_v1.ts +1425 -0
  88. package/lfp_v1.ts +1666 -0
  89. package/lfp_v1beta.ts +1 -1
  90. package/notifications_v1.ts +1052 -0
  91. package/ordertracking_v1.ts +599 -0
  92. package/ordertracking_v1beta.ts +4 -0
  93. package/package.json +4 -4
  94. package/products_v1.ts +2013 -0
  95. package/products_v1beta.ts +3 -3
  96. package/promotions_v1.ts +995 -0
  97. package/promotions_v1beta.ts +4 -4
  98. package/quota_v1.ts +424 -0
  99. package/reports_v1.ts +1205 -0
  100. package/reports_v1beta.ts +1 -1
@@ -0,0 +1,766 @@
1
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { Readable } from 'stream';
3
+ export declare namespace merchantapi_inventories_v1 {
4
+ export interface Options extends GlobalOptions {
5
+ version: 'inventories_v1';
6
+ }
7
+ interface StandardParameters {
8
+ /**
9
+ * Auth client or API Key for the request
10
+ */
11
+ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
12
+ /**
13
+ * V1 error format.
14
+ */
15
+ '$.xgafv'?: string;
16
+ /**
17
+ * OAuth access token.
18
+ */
19
+ access_token?: string;
20
+ /**
21
+ * Data format for response.
22
+ */
23
+ alt?: string;
24
+ /**
25
+ * JSONP
26
+ */
27
+ callback?: string;
28
+ /**
29
+ * Selector specifying which fields to include in a partial response.
30
+ */
31
+ fields?: string;
32
+ /**
33
+ * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
34
+ */
35
+ key?: string;
36
+ /**
37
+ * OAuth 2.0 token for the current user.
38
+ */
39
+ oauth_token?: string;
40
+ /**
41
+ * Returns response with indentations and line breaks.
42
+ */
43
+ prettyPrint?: boolean;
44
+ /**
45
+ * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46
+ */
47
+ quotaUser?: string;
48
+ /**
49
+ * Legacy upload protocol for media (e.g. "media", "multipart").
50
+ */
51
+ uploadType?: string;
52
+ /**
53
+ * Upload protocol for media (e.g. "raw", "multipart").
54
+ */
55
+ upload_protocol?: string;
56
+ }
57
+ /**
58
+ * Merchant API
59
+ *
60
+ * Programmatically manage your Merchant Center Accounts.
61
+ *
62
+ * @example
63
+ * ```js
64
+ * const {google} = require('googleapis');
65
+ * const merchantapi = google.merchantapi('inventories_v1');
66
+ * ```
67
+ */
68
+ export class Merchantapi {
69
+ context: APIRequestContext;
70
+ accounts: Resource$Accounts;
71
+ constructor(options: GlobalOptions, google?: GoogleConfigurable);
72
+ }
73
+ /**
74
+ * 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); \}
75
+ */
76
+ export interface Schema$Empty {
77
+ }
78
+ /**
79
+ * Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
80
+ */
81
+ export interface Schema$Interval {
82
+ /**
83
+ * Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
84
+ */
85
+ endTime?: string | null;
86
+ /**
87
+ * Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
88
+ */
89
+ startTime?: string | null;
90
+ }
91
+ /**
92
+ * Response message for the `ListLocalInventories` method.
93
+ */
94
+ export interface Schema$ListLocalInventoriesResponse {
95
+ /**
96
+ * The `LocalInventory` resources for the given product from the specified account.
97
+ */
98
+ localInventories?: Schema$LocalInventory[];
99
+ /**
100
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages.
101
+ */
102
+ nextPageToken?: string | null;
103
+ }
104
+ /**
105
+ * Response message for the `ListRegionalInventories` method.
106
+ */
107
+ export interface Schema$ListRegionalInventoriesResponse {
108
+ /**
109
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages.
110
+ */
111
+ nextPageToken?: string | null;
112
+ /**
113
+ * The `RegionalInventory` resources for the given product from the specified account.
114
+ */
115
+ regionalInventories?: Schema$RegionalInventory[];
116
+ }
117
+ /**
118
+ * Local inventory information for the product. Represents in-store information for a specific product at the store specified by `storeCode`. For a list of all accepted attribute values, see the [local product inventory data specification](https://support.google.com/merchants/answer/3061342).
119
+ */
120
+ export interface Schema$LocalInventory {
121
+ /**
122
+ * Output only. The account that owns the product. This field will be ignored if set by the client.
123
+ */
124
+ account?: string | null;
125
+ /**
126
+ * Optional. A list of local inventory attributes.
127
+ */
128
+ localInventoryAttributes?: Schema$LocalInventoryAttributes;
129
+ /**
130
+ * Output only. The name of the `LocalInventory` resource. Format: `accounts/{account\}/products/{product\}/localInventories/{store_code\}`
131
+ */
132
+ name?: string | null;
133
+ /**
134
+ * Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the [Local product inventory data specification](https://support.google.com/merchants/answer/3061342) for more information.
135
+ */
136
+ storeCode?: string | null;
137
+ }
138
+ /**
139
+ * Local inventory attributes.
140
+ */
141
+ export interface Schema$LocalInventoryAttributes {
142
+ /**
143
+ * [Availability](https://support.google.com/merchants/answer/3061342) of the product at this store.
144
+ */
145
+ availability?: string | null;
146
+ /**
147
+ * Optional. Location of the product inside the store. Maximum length is 20 bytes.
148
+ */
149
+ instoreProductLocation?: string | null;
150
+ /**
151
+ * Optional. Supported [pickup method](https://support.google.com/merchants/answer/3061342) for this product. Unless the value is `"not supported"`, this field must be submitted together with `pickupSla`.
152
+ */
153
+ pickupMethod?: string | null;
154
+ /**
155
+ * Optional. Relative time period from the order date for an order for this product, from this store, to be ready for pickup. Must be submitted with `pickupMethod`. See more details [here](https://support.google.com/merchants/answer/3061342).
156
+ */
157
+ pickupSla?: string | null;
158
+ /**
159
+ * Optional. Price of the product at this store.
160
+ */
161
+ price?: Schema$Price;
162
+ /**
163
+ * Optional. Quantity of the product available at this store. Must be greater than or equal to zero.
164
+ */
165
+ quantity?: string | null;
166
+ /**
167
+ * Optional. Sale price of the product at this store. Mandatory if `salePriceEffectiveDate` is defined.
168
+ */
169
+ salePrice?: Schema$Price;
170
+ /**
171
+ * Optional. The `TimePeriod` of the sale at this store.
172
+ */
173
+ salePriceEffectiveDate?: Schema$Interval;
174
+ }
175
+ /**
176
+ * The price represented as a number and currency.
177
+ */
178
+ export interface Schema$Price {
179
+ /**
180
+ * The price represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 USD = 1000000 micros).
181
+ */
182
+ amountMicros?: string | null;
183
+ /**
184
+ * The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217).
185
+ */
186
+ currencyCode?: string | null;
187
+ }
188
+ /**
189
+ * The change that happened to the product including old value, new value, country code as the region code and reporting context.
190
+ */
191
+ export interface Schema$ProductChange {
192
+ /**
193
+ * 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`, ``)
194
+ */
195
+ newValue?: string | null;
196
+ /**
197
+ * 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`, ``)
198
+ */
199
+ oldValue?: string | null;
200
+ /**
201
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
202
+ */
203
+ regionCode?: string | null;
204
+ /**
205
+ * 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)
206
+ */
207
+ reportingContext?: string | null;
208
+ }
209
+ /**
210
+ * The message that the merchant will receive to notify about product status change event
211
+ */
212
+ export interface Schema$ProductStatusChangeMessage {
213
+ /**
214
+ * The target account that owns the entity that changed. Format : `accounts/{merchant_id\}`
215
+ */
216
+ account?: string | null;
217
+ /**
218
+ * The attribute in the resource that changed, in this case it will be always `Status`.
219
+ */
220
+ attribute?: string | null;
221
+ /**
222
+ * A message to describe the change that happened to the product
223
+ */
224
+ changes?: Schema$ProductChange[];
225
+ /**
226
+ * 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.
227
+ */
228
+ eventTime?: string | null;
229
+ /**
230
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
231
+ */
232
+ expirationTime?: string | null;
233
+ /**
234
+ * The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : `accounts/{service_provider_id\}`
235
+ */
236
+ managingAccount?: string | null;
237
+ /**
238
+ * The product name. Format: `accounts/{account\}/products/{product\}`
239
+ */
240
+ resource?: string | null;
241
+ /**
242
+ * The product id.
243
+ */
244
+ resourceId?: string | null;
245
+ /**
246
+ * The resource that changed, in this case it will always be `Product`.
247
+ */
248
+ resourceType?: string | null;
249
+ }
250
+ /**
251
+ * Regional inventory information for the product. Represents specific information like price and availability for a given product in a specific `region`. For a list of all accepted attribute values, see the [regional product inventory data specification](https://support.google.com/merchants/answer/9698880).
252
+ */
253
+ export interface Schema$RegionalInventory {
254
+ /**
255
+ * Output only. The account that owns the product. This field will be ignored if set by the client.
256
+ */
257
+ account?: string | null;
258
+ /**
259
+ * Output only. The name of the `RegionalInventory` resource. Format: `{regional_inventory.name=accounts/{account\}/products/{product\}/regionalInventories/{region\}`
260
+ */
261
+ name?: string | null;
262
+ /**
263
+ * Required. Immutable. ID of the region for this `RegionalInventory` resource. See the [Regional availability and pricing](https://support.google.com/merchants/answer/9698880) for more details.
264
+ */
265
+ region?: string | null;
266
+ /**
267
+ * Optional. A list of regional inventory attributes.
268
+ */
269
+ regionalInventoryAttributes?: Schema$RegionalInventoryAttributes;
270
+ }
271
+ /**
272
+ * Regional inventory attributes.
273
+ */
274
+ export interface Schema$RegionalInventoryAttributes {
275
+ /**
276
+ * Optional. [Availability](https://support.google.com/merchants/answer/14644124) of the product in this region.
277
+ */
278
+ availability?: string | null;
279
+ /**
280
+ * Optional. Price of the product in this region.
281
+ */
282
+ price?: Schema$Price;
283
+ /**
284
+ * Optional. Sale price of the product in this region. Mandatory if `salePriceEffectiveDate` is defined.
285
+ */
286
+ salePrice?: Schema$Price;
287
+ /**
288
+ * Optional. The `TimePeriod` of the sale price in this region.
289
+ */
290
+ salePriceEffectiveDate?: Schema$Interval;
291
+ }
292
+ export class Resource$Accounts {
293
+ context: APIRequestContext;
294
+ products: Resource$Accounts$Products;
295
+ constructor(context: APIRequestContext);
296
+ }
297
+ export class Resource$Accounts$Products {
298
+ context: APIRequestContext;
299
+ localInventories: Resource$Accounts$Products$Localinventories;
300
+ regionalInventories: Resource$Accounts$Products$Regionalinventories;
301
+ constructor(context: APIRequestContext);
302
+ }
303
+ export class Resource$Accounts$Products$Localinventories {
304
+ context: APIRequestContext;
305
+ constructor(context: APIRequestContext);
306
+ /**
307
+ * Deletes the specified `LocalInventory` from the given product in your merchant account. It might take a up to an hour for the `LocalInventory` to be deleted from the specific product. Once you have received a successful delete response, wait for that period before attempting a delete again.
308
+ * @example
309
+ * ```js
310
+ * // Before running the sample:
311
+ * // - Enable the API at:
312
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
313
+ * // - Login into gcloud by running:
314
+ * // ```sh
315
+ * // $ gcloud auth application-default login
316
+ * // ```
317
+ * // - Install the npm module by running:
318
+ * // ```sh
319
+ * // $ npm install googleapis
320
+ * // ```
321
+ *
322
+ * const {google} = require('googleapis');
323
+ * const merchantapi = google.merchantapi('inventories_v1');
324
+ *
325
+ * async function main() {
326
+ * const auth = new google.auth.GoogleAuth({
327
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
328
+ * scopes: ['https://www.googleapis.com/auth/content'],
329
+ * });
330
+ *
331
+ * // Acquire an auth client, and bind it to all future calls
332
+ * const authClient = await auth.getClient();
333
+ * google.options({auth: authClient});
334
+ *
335
+ * // Do the magic
336
+ * const res = await merchantapi.accounts.products.localInventories.delete({
337
+ * // Required. The name of the local inventory for the given product to delete. Format: `accounts/{account\}/products/{product\}/localInventories/{store_code\}`
338
+ * name: 'accounts/my-account/products/my-product/localInventories/my-localInventorie',
339
+ * });
340
+ * console.log(res.data);
341
+ *
342
+ * // Example response
343
+ * // {}
344
+ * }
345
+ *
346
+ * main().catch(e => {
347
+ * console.error(e);
348
+ * throw e;
349
+ * });
350
+ *
351
+ * ```
352
+ *
353
+ * @param params - Parameters for request
354
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
355
+ * @param callback - Optional callback that handles the response.
356
+ * @returns A promise if used with async/await, or void if used with a callback.
357
+ */
358
+ delete(params: Params$Resource$Accounts$Products$Localinventories$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
359
+ delete(params?: Params$Resource$Accounts$Products$Localinventories$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
360
+ delete(params: Params$Resource$Accounts$Products$Localinventories$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
361
+ delete(params: Params$Resource$Accounts$Products$Localinventories$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
362
+ delete(params: Params$Resource$Accounts$Products$Localinventories$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
363
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
364
+ /**
365
+ * Inserts a `LocalInventory` resource to a product in your merchant account. Replaces the full `LocalInventory` resource if an entry with the same `storeCode` already exists for the product. It might take up to 30 minutes for the new or updated `LocalInventory` resource to appear in products.
366
+ * @example
367
+ * ```js
368
+ * // Before running the sample:
369
+ * // - Enable the API at:
370
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
371
+ * // - Login into gcloud by running:
372
+ * // ```sh
373
+ * // $ gcloud auth application-default login
374
+ * // ```
375
+ * // - Install the npm module by running:
376
+ * // ```sh
377
+ * // $ npm install googleapis
378
+ * // ```
379
+ *
380
+ * const {google} = require('googleapis');
381
+ * const merchantapi = google.merchantapi('inventories_v1');
382
+ *
383
+ * async function main() {
384
+ * const auth = new google.auth.GoogleAuth({
385
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
386
+ * scopes: ['https://www.googleapis.com/auth/content'],
387
+ * });
388
+ *
389
+ * // Acquire an auth client, and bind it to all future calls
390
+ * const authClient = await auth.getClient();
391
+ * google.options({auth: authClient});
392
+ *
393
+ * // Do the magic
394
+ * const res = await merchantapi.accounts.products.localInventories.insert({
395
+ * // Required. The account and product where this inventory will be inserted. Format: `accounts/{account\}/products/{product\}`
396
+ * parent: 'accounts/my-account/products/my-product',
397
+ *
398
+ * // Request body metadata
399
+ * requestBody: {
400
+ * // request body parameters
401
+ * // {
402
+ * // "account": "my_account",
403
+ * // "localInventoryAttributes": {},
404
+ * // "name": "my_name",
405
+ * // "storeCode": "my_storeCode"
406
+ * // }
407
+ * },
408
+ * });
409
+ * console.log(res.data);
410
+ *
411
+ * // Example response
412
+ * // {
413
+ * // "account": "my_account",
414
+ * // "localInventoryAttributes": {},
415
+ * // "name": "my_name",
416
+ * // "storeCode": "my_storeCode"
417
+ * // }
418
+ * }
419
+ *
420
+ * main().catch(e => {
421
+ * console.error(e);
422
+ * throw e;
423
+ * });
424
+ *
425
+ * ```
426
+ *
427
+ * @param params - Parameters for request
428
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
429
+ * @param callback - Optional callback that handles the response.
430
+ * @returns A promise if used with async/await, or void if used with a callback.
431
+ */
432
+ insert(params: Params$Resource$Accounts$Products$Localinventories$Insert, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
433
+ insert(params?: Params$Resource$Accounts$Products$Localinventories$Insert, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$LocalInventory>>;
434
+ insert(params: Params$Resource$Accounts$Products$Localinventories$Insert, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
435
+ insert(params: Params$Resource$Accounts$Products$Localinventories$Insert, options: MethodOptions | BodyResponseCallback<Schema$LocalInventory>, callback: BodyResponseCallback<Schema$LocalInventory>): void;
436
+ insert(params: Params$Resource$Accounts$Products$Localinventories$Insert, callback: BodyResponseCallback<Schema$LocalInventory>): void;
437
+ insert(callback: BodyResponseCallback<Schema$LocalInventory>): void;
438
+ /**
439
+ * Lists the `LocalInventory` resources for the given product in your merchant account. The response might contain fewer items than specified by `pageSize`. If `pageToken` was returned in previous request, it can be used to obtain additional results. `LocalInventory` resources are listed per product for a given account.
440
+ * @example
441
+ * ```js
442
+ * // Before running the sample:
443
+ * // - Enable the API at:
444
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
445
+ * // - Login into gcloud by running:
446
+ * // ```sh
447
+ * // $ gcloud auth application-default login
448
+ * // ```
449
+ * // - Install the npm module by running:
450
+ * // ```sh
451
+ * // $ npm install googleapis
452
+ * // ```
453
+ *
454
+ * const {google} = require('googleapis');
455
+ * const merchantapi = google.merchantapi('inventories_v1');
456
+ *
457
+ * async function main() {
458
+ * const auth = new google.auth.GoogleAuth({
459
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
460
+ * scopes: ['https://www.googleapis.com/auth/content'],
461
+ * });
462
+ *
463
+ * // Acquire an auth client, and bind it to all future calls
464
+ * const authClient = await auth.getClient();
465
+ * google.options({auth: authClient});
466
+ *
467
+ * // Do the magic
468
+ * const res = await merchantapi.accounts.products.localInventories.list({
469
+ * // The maximum number of `LocalInventory` resources for the given product to return. The service returns fewer than this value if the number of inventories for the given product is less that than the `pageSize`. The default value is 25000. The maximum value is 25000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum
470
+ * pageSize: 'placeholder-value',
471
+ * // A page token, received from a previous `ListLocalInventories` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListLocalInventories` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
472
+ * pageToken: 'placeholder-value',
473
+ * // Required. The `name` of the parent product to list local inventories for. Format: `accounts/{account\}/products/{product\}`
474
+ * parent: 'accounts/my-account/products/my-product',
475
+ * });
476
+ * console.log(res.data);
477
+ *
478
+ * // Example response
479
+ * // {
480
+ * // "localInventories": [],
481
+ * // "nextPageToken": "my_nextPageToken"
482
+ * // }
483
+ * }
484
+ *
485
+ * main().catch(e => {
486
+ * console.error(e);
487
+ * throw e;
488
+ * });
489
+ *
490
+ * ```
491
+ *
492
+ * @param params - Parameters for request
493
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
494
+ * @param callback - Optional callback that handles the response.
495
+ * @returns A promise if used with async/await, or void if used with a callback.
496
+ */
497
+ list(params: Params$Resource$Accounts$Products$Localinventories$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
498
+ list(params?: Params$Resource$Accounts$Products$Localinventories$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListLocalInventoriesResponse>>;
499
+ list(params: Params$Resource$Accounts$Products$Localinventories$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
500
+ list(params: Params$Resource$Accounts$Products$Localinventories$List, options: MethodOptions | BodyResponseCallback<Schema$ListLocalInventoriesResponse>, callback: BodyResponseCallback<Schema$ListLocalInventoriesResponse>): void;
501
+ list(params: Params$Resource$Accounts$Products$Localinventories$List, callback: BodyResponseCallback<Schema$ListLocalInventoriesResponse>): void;
502
+ list(callback: BodyResponseCallback<Schema$ListLocalInventoriesResponse>): void;
503
+ }
504
+ export interface Params$Resource$Accounts$Products$Localinventories$Delete extends StandardParameters {
505
+ /**
506
+ * Required. The name of the local inventory for the given product to delete. Format: `accounts/{account\}/products/{product\}/localInventories/{store_code\}`
507
+ */
508
+ name?: string;
509
+ }
510
+ export interface Params$Resource$Accounts$Products$Localinventories$Insert extends StandardParameters {
511
+ /**
512
+ * Required. The account and product where this inventory will be inserted. Format: `accounts/{account\}/products/{product\}`
513
+ */
514
+ parent?: string;
515
+ /**
516
+ * Request body metadata
517
+ */
518
+ requestBody?: Schema$LocalInventory;
519
+ }
520
+ export interface Params$Resource$Accounts$Products$Localinventories$List extends StandardParameters {
521
+ /**
522
+ * The maximum number of `LocalInventory` resources for the given product to return. The service returns fewer than this value if the number of inventories for the given product is less that than the `pageSize`. The default value is 25000. The maximum value is 25000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum
523
+ */
524
+ pageSize?: number;
525
+ /**
526
+ * A page token, received from a previous `ListLocalInventories` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListLocalInventories` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
527
+ */
528
+ pageToken?: string;
529
+ /**
530
+ * Required. The `name` of the parent product to list local inventories for. Format: `accounts/{account\}/products/{product\}`
531
+ */
532
+ parent?: string;
533
+ }
534
+ export class Resource$Accounts$Products$Regionalinventories {
535
+ context: APIRequestContext;
536
+ constructor(context: APIRequestContext);
537
+ /**
538
+ * Deletes the specified `RegionalInventory` resource from the given product in your merchant account. It might take up to an hour for the `RegionalInventory` to be deleted from the specific product. Once you have received a successful delete response, wait for that period before attempting a delete again.
539
+ * @example
540
+ * ```js
541
+ * // Before running the sample:
542
+ * // - Enable the API at:
543
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
544
+ * // - Login into gcloud by running:
545
+ * // ```sh
546
+ * // $ gcloud auth application-default login
547
+ * // ```
548
+ * // - Install the npm module by running:
549
+ * // ```sh
550
+ * // $ npm install googleapis
551
+ * // ```
552
+ *
553
+ * const {google} = require('googleapis');
554
+ * const merchantapi = google.merchantapi('inventories_v1');
555
+ *
556
+ * async function main() {
557
+ * const auth = new google.auth.GoogleAuth({
558
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
559
+ * scopes: ['https://www.googleapis.com/auth/content'],
560
+ * });
561
+ *
562
+ * // Acquire an auth client, and bind it to all future calls
563
+ * const authClient = await auth.getClient();
564
+ * google.options({auth: authClient});
565
+ *
566
+ * // Do the magic
567
+ * const res = await merchantapi.accounts.products.regionalInventories.delete({
568
+ * // Required. The name of the `RegionalInventory` resource to delete. Format: `accounts/{account\}/products/{product\}/regionalInventories/{region\}`
569
+ * name: 'accounts/my-account/products/my-product/regionalInventories/my-regionalInventorie',
570
+ * });
571
+ * console.log(res.data);
572
+ *
573
+ * // Example response
574
+ * // {}
575
+ * }
576
+ *
577
+ * main().catch(e => {
578
+ * console.error(e);
579
+ * throw e;
580
+ * });
581
+ *
582
+ * ```
583
+ *
584
+ * @param params - Parameters for request
585
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
586
+ * @param callback - Optional callback that handles the response.
587
+ * @returns A promise if used with async/await, or void if used with a callback.
588
+ */
589
+ delete(params: Params$Resource$Accounts$Products$Regionalinventories$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
590
+ delete(params?: Params$Resource$Accounts$Products$Regionalinventories$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
591
+ delete(params: Params$Resource$Accounts$Products$Regionalinventories$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
592
+ delete(params: Params$Resource$Accounts$Products$Regionalinventories$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
593
+ delete(params: Params$Resource$Accounts$Products$Regionalinventories$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
594
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
595
+ /**
596
+ * Inserts a `RegionalInventory` to a given product in your merchant account. Replaces the full `RegionalInventory` resource if an entry with the same `region` already exists for the product. It might take up to 30 minutes for the new or updated `RegionalInventory` resource to appear in products.
597
+ * @example
598
+ * ```js
599
+ * // Before running the sample:
600
+ * // - Enable the API at:
601
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
602
+ * // - Login into gcloud by running:
603
+ * // ```sh
604
+ * // $ gcloud auth application-default login
605
+ * // ```
606
+ * // - Install the npm module by running:
607
+ * // ```sh
608
+ * // $ npm install googleapis
609
+ * // ```
610
+ *
611
+ * const {google} = require('googleapis');
612
+ * const merchantapi = google.merchantapi('inventories_v1');
613
+ *
614
+ * async function main() {
615
+ * const auth = new google.auth.GoogleAuth({
616
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
617
+ * scopes: ['https://www.googleapis.com/auth/content'],
618
+ * });
619
+ *
620
+ * // Acquire an auth client, and bind it to all future calls
621
+ * const authClient = await auth.getClient();
622
+ * google.options({auth: authClient});
623
+ *
624
+ * // Do the magic
625
+ * const res = await merchantapi.accounts.products.regionalInventories.insert({
626
+ * // Required. The account and product where this inventory will be inserted. Format: `accounts/{account\}/products/{product\}`
627
+ * parent: 'accounts/my-account/products/my-product',
628
+ *
629
+ * // Request body metadata
630
+ * requestBody: {
631
+ * // request body parameters
632
+ * // {
633
+ * // "account": "my_account",
634
+ * // "name": "my_name",
635
+ * // "region": "my_region",
636
+ * // "regionalInventoryAttributes": {}
637
+ * // }
638
+ * },
639
+ * });
640
+ * console.log(res.data);
641
+ *
642
+ * // Example response
643
+ * // {
644
+ * // "account": "my_account",
645
+ * // "name": "my_name",
646
+ * // "region": "my_region",
647
+ * // "regionalInventoryAttributes": {}
648
+ * // }
649
+ * }
650
+ *
651
+ * main().catch(e => {
652
+ * console.error(e);
653
+ * throw e;
654
+ * });
655
+ *
656
+ * ```
657
+ *
658
+ * @param params - Parameters for request
659
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
660
+ * @param callback - Optional callback that handles the response.
661
+ * @returns A promise if used with async/await, or void if used with a callback.
662
+ */
663
+ insert(params: Params$Resource$Accounts$Products$Regionalinventories$Insert, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
664
+ insert(params?: Params$Resource$Accounts$Products$Regionalinventories$Insert, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$RegionalInventory>>;
665
+ insert(params: Params$Resource$Accounts$Products$Regionalinventories$Insert, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
666
+ insert(params: Params$Resource$Accounts$Products$Regionalinventories$Insert, options: MethodOptions | BodyResponseCallback<Schema$RegionalInventory>, callback: BodyResponseCallback<Schema$RegionalInventory>): void;
667
+ insert(params: Params$Resource$Accounts$Products$Regionalinventories$Insert, callback: BodyResponseCallback<Schema$RegionalInventory>): void;
668
+ insert(callback: BodyResponseCallback<Schema$RegionalInventory>): void;
669
+ /**
670
+ * Lists the `RegionalInventory` resources for the given product in your merchant account. The response might contain fewer items than specified by `pageSize`. If `pageToken` was returned in previous request, it can be used to obtain additional results. `RegionalInventory` resources are listed per product for a given account.
671
+ * @example
672
+ * ```js
673
+ * // Before running the sample:
674
+ * // - Enable the API at:
675
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
676
+ * // - Login into gcloud by running:
677
+ * // ```sh
678
+ * // $ gcloud auth application-default login
679
+ * // ```
680
+ * // - Install the npm module by running:
681
+ * // ```sh
682
+ * // $ npm install googleapis
683
+ * // ```
684
+ *
685
+ * const {google} = require('googleapis');
686
+ * const merchantapi = google.merchantapi('inventories_v1');
687
+ *
688
+ * async function main() {
689
+ * const auth = new google.auth.GoogleAuth({
690
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
691
+ * scopes: ['https://www.googleapis.com/auth/content'],
692
+ * });
693
+ *
694
+ * // Acquire an auth client, and bind it to all future calls
695
+ * const authClient = await auth.getClient();
696
+ * google.options({auth: authClient});
697
+ *
698
+ * // Do the magic
699
+ * const res = await merchantapi.accounts.products.regionalInventories.list({
700
+ * // The maximum number of `RegionalInventory` resources for the given product to return. The service returns fewer than this value if the number of inventories for the given product is less that than the `pageSize`. The default value is 25000. The maximum value is 100000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum.
701
+ * pageSize: 'placeholder-value',
702
+ * // A page token, received from a previous `ListRegionalInventories` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListRegionalInventories` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
703
+ * pageToken: 'placeholder-value',
704
+ * // Required. The `name` of the parent product to list `RegionalInventory` resources for. Format: `accounts/{account\}/products/{product\}`
705
+ * parent: 'accounts/my-account/products/my-product',
706
+ * });
707
+ * console.log(res.data);
708
+ *
709
+ * // Example response
710
+ * // {
711
+ * // "nextPageToken": "my_nextPageToken",
712
+ * // "regionalInventories": []
713
+ * // }
714
+ * }
715
+ *
716
+ * main().catch(e => {
717
+ * console.error(e);
718
+ * throw e;
719
+ * });
720
+ *
721
+ * ```
722
+ *
723
+ * @param params - Parameters for request
724
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
725
+ * @param callback - Optional callback that handles the response.
726
+ * @returns A promise if used with async/await, or void if used with a callback.
727
+ */
728
+ list(params: Params$Resource$Accounts$Products$Regionalinventories$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
729
+ list(params?: Params$Resource$Accounts$Products$Regionalinventories$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListRegionalInventoriesResponse>>;
730
+ list(params: Params$Resource$Accounts$Products$Regionalinventories$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
731
+ list(params: Params$Resource$Accounts$Products$Regionalinventories$List, options: MethodOptions | BodyResponseCallback<Schema$ListRegionalInventoriesResponse>, callback: BodyResponseCallback<Schema$ListRegionalInventoriesResponse>): void;
732
+ list(params: Params$Resource$Accounts$Products$Regionalinventories$List, callback: BodyResponseCallback<Schema$ListRegionalInventoriesResponse>): void;
733
+ list(callback: BodyResponseCallback<Schema$ListRegionalInventoriesResponse>): void;
734
+ }
735
+ export interface Params$Resource$Accounts$Products$Regionalinventories$Delete extends StandardParameters {
736
+ /**
737
+ * Required. The name of the `RegionalInventory` resource to delete. Format: `accounts/{account\}/products/{product\}/regionalInventories/{region\}`
738
+ */
739
+ name?: string;
740
+ }
741
+ export interface Params$Resource$Accounts$Products$Regionalinventories$Insert extends StandardParameters {
742
+ /**
743
+ * Required. The account and product where this inventory will be inserted. Format: `accounts/{account\}/products/{product\}`
744
+ */
745
+ parent?: string;
746
+ /**
747
+ * Request body metadata
748
+ */
749
+ requestBody?: Schema$RegionalInventory;
750
+ }
751
+ export interface Params$Resource$Accounts$Products$Regionalinventories$List extends StandardParameters {
752
+ /**
753
+ * The maximum number of `RegionalInventory` resources for the given product to return. The service returns fewer than this value if the number of inventories for the given product is less that than the `pageSize`. The default value is 25000. The maximum value is 100000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum.
754
+ */
755
+ pageSize?: number;
756
+ /**
757
+ * A page token, received from a previous `ListRegionalInventories` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListRegionalInventories` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request.
758
+ */
759
+ pageToken?: string;
760
+ /**
761
+ * Required. The `name` of the parent product to list `RegionalInventory` resources for. Format: `accounts/{account\}/products/{product\}`
762
+ */
763
+ parent?: string;
764
+ }
765
+ export {};
766
+ }