@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,579 @@
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_notifications_v1 {
4
+ export interface Options extends GlobalOptions {
5
+ version: 'notifications_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('notifications_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
+ * Response message for the ListNotificationSubscription method.
80
+ */
81
+ export interface Schema$ListNotificationSubscriptionsResponse {
82
+ /**
83
+ * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
84
+ */
85
+ nextPageToken?: string | null;
86
+ /**
87
+ * The list of notification subscriptions requested by the merchant.
88
+ */
89
+ notificationSubscriptions?: Schema$NotificationSubscription[];
90
+ }
91
+ /**
92
+ * Represents a notification subscription owned by a Merchant account.
93
+ */
94
+ export interface Schema$NotificationSubscription {
95
+ /**
96
+ * If this value is true, the requesting account is notified of the specified event for all managed accounts (can be subaccounts or other linked accounts) including newly added accounts on a daily basis.
97
+ */
98
+ allManagedAccounts?: boolean | null;
99
+ /**
100
+ * URL to be used to push the notification to the merchant.
101
+ */
102
+ callBackUri?: string | null;
103
+ /**
104
+ * Output only. The `name` of the notification configuration. Generated by the Content API upon creation of a new `NotificationSubscription`. The `account` represents the merchant ID of the merchant that owns the configuration. Format: `accounts/{account\}/notificationsubscriptions/{notification_subscription\}`
105
+ */
106
+ name?: string | null;
107
+ /**
108
+ * The event that the merchant wants to be notified about.
109
+ */
110
+ registeredEvent?: string | null;
111
+ /**
112
+ * The `name` of the account you want to receive notifications for. Format: `accounts/{account\}`
113
+ */
114
+ targetAccount?: string | null;
115
+ }
116
+ /**
117
+ * The change that happened to the product including old value, new value, country code as the region code and reporting context.
118
+ */
119
+ export interface Schema$ProductChange {
120
+ /**
121
+ * 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`, ``)
122
+ */
123
+ newValue?: string | null;
124
+ /**
125
+ * 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`, ``)
126
+ */
127
+ oldValue?: string | null;
128
+ /**
129
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
130
+ */
131
+ regionCode?: string | null;
132
+ /**
133
+ * 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)
134
+ */
135
+ reportingContext?: string | null;
136
+ }
137
+ /**
138
+ * The message that the merchant will receive to notify about product status change event
139
+ */
140
+ export interface Schema$ProductStatusChangeMessage {
141
+ /**
142
+ * The target account that owns the entity that changed. Format : `accounts/{merchant_id\}`
143
+ */
144
+ account?: string | null;
145
+ /**
146
+ * The attribute in the resource that changed, in this case it will be always `Status`.
147
+ */
148
+ attribute?: string | null;
149
+ /**
150
+ * A message to describe the change that happened to the product
151
+ */
152
+ changes?: Schema$ProductChange[];
153
+ /**
154
+ * 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.
155
+ */
156
+ eventTime?: string | null;
157
+ /**
158
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
159
+ */
160
+ expirationTime?: string | null;
161
+ /**
162
+ * 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\}`
163
+ */
164
+ managingAccount?: string | null;
165
+ /**
166
+ * The product name. Format: `accounts/{account\}/products/{product\}`
167
+ */
168
+ resource?: string | null;
169
+ /**
170
+ * The product id.
171
+ */
172
+ resourceId?: string | null;
173
+ /**
174
+ * The resource that changed, in this case it will always be `Product`.
175
+ */
176
+ resourceType?: string | null;
177
+ }
178
+ export class Resource$Accounts {
179
+ context: APIRequestContext;
180
+ notificationsubscriptions: Resource$Accounts$Notificationsubscriptions;
181
+ constructor(context: APIRequestContext);
182
+ }
183
+ export class Resource$Accounts$Notificationsubscriptions {
184
+ context: APIRequestContext;
185
+ constructor(context: APIRequestContext);
186
+ /**
187
+ * Creates a notification subscription for a business. For standalone or subaccounts accounts, the business can create a subscription for self. For MCAs, the business can create a subscription for all managed accounts or for a specific subaccount. We will allow the following types of notification subscriptions to exist together (per business as a subscriber per event type): 1. Subscription for all managed accounts + subscription for self. 2. Multiple "partial" subscriptions for managed accounts + subscription for self. we will not allow (per business as a subscriber per event type): 1. Multiple self subscriptions. 2. Multiple "all managed accounts" subscriptions. 3. "All managed accounts" subscription and partial subscriptions at the same time. 4. Multiple partial subscriptions for the same target account.
188
+ * @example
189
+ * ```js
190
+ * // Before running the sample:
191
+ * // - Enable the API at:
192
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
193
+ * // - Login into gcloud by running:
194
+ * // ```sh
195
+ * // $ gcloud auth application-default login
196
+ * // ```
197
+ * // - Install the npm module by running:
198
+ * // ```sh
199
+ * // $ npm install googleapis
200
+ * // ```
201
+ *
202
+ * const {google} = require('googleapis');
203
+ * const merchantapi = google.merchantapi('notifications_v1');
204
+ *
205
+ * async function main() {
206
+ * const auth = new google.auth.GoogleAuth({
207
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
208
+ * scopes: ['https://www.googleapis.com/auth/content'],
209
+ * });
210
+ *
211
+ * // Acquire an auth client, and bind it to all future calls
212
+ * const authClient = await auth.getClient();
213
+ * google.options({auth: authClient});
214
+ *
215
+ * // Do the magic
216
+ * const res = await merchantapi.accounts.notificationsubscriptions.create({
217
+ * // Required. The merchant account that owns the new notification subscription. Format: `accounts/{account\}`
218
+ * parent: 'accounts/my-account',
219
+ *
220
+ * // Request body metadata
221
+ * requestBody: {
222
+ * // request body parameters
223
+ * // {
224
+ * // "allManagedAccounts": false,
225
+ * // "callBackUri": "my_callBackUri",
226
+ * // "name": "my_name",
227
+ * // "registeredEvent": "my_registeredEvent",
228
+ * // "targetAccount": "my_targetAccount"
229
+ * // }
230
+ * },
231
+ * });
232
+ * console.log(res.data);
233
+ *
234
+ * // Example response
235
+ * // {
236
+ * // "allManagedAccounts": false,
237
+ * // "callBackUri": "my_callBackUri",
238
+ * // "name": "my_name",
239
+ * // "registeredEvent": "my_registeredEvent",
240
+ * // "targetAccount": "my_targetAccount"
241
+ * // }
242
+ * }
243
+ *
244
+ * main().catch(e => {
245
+ * console.error(e);
246
+ * throw e;
247
+ * });
248
+ *
249
+ * ```
250
+ *
251
+ * @param params - Parameters for request
252
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
253
+ * @param callback - Optional callback that handles the response.
254
+ * @returns A promise if used with async/await, or void if used with a callback.
255
+ */
256
+ create(params: Params$Resource$Accounts$Notificationsubscriptions$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
257
+ create(params?: Params$Resource$Accounts$Notificationsubscriptions$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>;
258
+ create(params: Params$Resource$Accounts$Notificationsubscriptions$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
259
+ create(params: Params$Resource$Accounts$Notificationsubscriptions$Create, options: MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>, callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
260
+ create(params: Params$Resource$Accounts$Notificationsubscriptions$Create, callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
261
+ create(callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
262
+ /**
263
+ * Deletes a notification subscription for a merchant.
264
+ * @example
265
+ * ```js
266
+ * // Before running the sample:
267
+ * // - Enable the API at:
268
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
269
+ * // - Login into gcloud by running:
270
+ * // ```sh
271
+ * // $ gcloud auth application-default login
272
+ * // ```
273
+ * // - Install the npm module by running:
274
+ * // ```sh
275
+ * // $ npm install googleapis
276
+ * // ```
277
+ *
278
+ * const {google} = require('googleapis');
279
+ * const merchantapi = google.merchantapi('notifications_v1');
280
+ *
281
+ * async function main() {
282
+ * const auth = new google.auth.GoogleAuth({
283
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
284
+ * scopes: ['https://www.googleapis.com/auth/content'],
285
+ * });
286
+ *
287
+ * // Acquire an auth client, and bind it to all future calls
288
+ * const authClient = await auth.getClient();
289
+ * google.options({auth: authClient});
290
+ *
291
+ * // Do the magic
292
+ * const res = await merchantapi.accounts.notificationsubscriptions.delete({
293
+ * // Required. The name of the notification subscription to be deleted.
294
+ * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
295
+ * });
296
+ * console.log(res.data);
297
+ *
298
+ * // Example response
299
+ * // {}
300
+ * }
301
+ *
302
+ * main().catch(e => {
303
+ * console.error(e);
304
+ * throw e;
305
+ * });
306
+ *
307
+ * ```
308
+ *
309
+ * @param params - Parameters for request
310
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
311
+ * @param callback - Optional callback that handles the response.
312
+ * @returns A promise if used with async/await, or void if used with a callback.
313
+ */
314
+ delete(params: Params$Resource$Accounts$Notificationsubscriptions$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
315
+ delete(params?: Params$Resource$Accounts$Notificationsubscriptions$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
316
+ delete(params: Params$Resource$Accounts$Notificationsubscriptions$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
317
+ delete(params: Params$Resource$Accounts$Notificationsubscriptions$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
318
+ delete(params: Params$Resource$Accounts$Notificationsubscriptions$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
319
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
320
+ /**
321
+ * Gets notification subscriptions for an account.
322
+ * @example
323
+ * ```js
324
+ * // Before running the sample:
325
+ * // - Enable the API at:
326
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
327
+ * // - Login into gcloud by running:
328
+ * // ```sh
329
+ * // $ gcloud auth application-default login
330
+ * // ```
331
+ * // - Install the npm module by running:
332
+ * // ```sh
333
+ * // $ npm install googleapis
334
+ * // ```
335
+ *
336
+ * const {google} = require('googleapis');
337
+ * const merchantapi = google.merchantapi('notifications_v1');
338
+ *
339
+ * async function main() {
340
+ * const auth = new google.auth.GoogleAuth({
341
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
342
+ * scopes: ['https://www.googleapis.com/auth/content'],
343
+ * });
344
+ *
345
+ * // Acquire an auth client, and bind it to all future calls
346
+ * const authClient = await auth.getClient();
347
+ * google.options({auth: authClient});
348
+ *
349
+ * // Do the magic
350
+ * const res = await merchantapi.accounts.notificationsubscriptions.get({
351
+ * // Required. The `name` of the notification subscription.
352
+ * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
353
+ * });
354
+ * console.log(res.data);
355
+ *
356
+ * // Example response
357
+ * // {
358
+ * // "allManagedAccounts": false,
359
+ * // "callBackUri": "my_callBackUri",
360
+ * // "name": "my_name",
361
+ * // "registeredEvent": "my_registeredEvent",
362
+ * // "targetAccount": "my_targetAccount"
363
+ * // }
364
+ * }
365
+ *
366
+ * main().catch(e => {
367
+ * console.error(e);
368
+ * throw e;
369
+ * });
370
+ *
371
+ * ```
372
+ *
373
+ * @param params - Parameters for request
374
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
375
+ * @param callback - Optional callback that handles the response.
376
+ * @returns A promise if used with async/await, or void if used with a callback.
377
+ */
378
+ get(params: Params$Resource$Accounts$Notificationsubscriptions$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
379
+ get(params?: Params$Resource$Accounts$Notificationsubscriptions$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>;
380
+ get(params: Params$Resource$Accounts$Notificationsubscriptions$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
381
+ get(params: Params$Resource$Accounts$Notificationsubscriptions$Get, options: MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>, callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
382
+ get(params: Params$Resource$Accounts$Notificationsubscriptions$Get, callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
383
+ get(callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
384
+ /**
385
+ * Gets all the notification subscriptions for a merchant.
386
+ * @example
387
+ * ```js
388
+ * // Before running the sample:
389
+ * // - Enable the API at:
390
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
391
+ * // - Login into gcloud by running:
392
+ * // ```sh
393
+ * // $ gcloud auth application-default login
394
+ * // ```
395
+ * // - Install the npm module by running:
396
+ * // ```sh
397
+ * // $ npm install googleapis
398
+ * // ```
399
+ *
400
+ * const {google} = require('googleapis');
401
+ * const merchantapi = google.merchantapi('notifications_v1');
402
+ *
403
+ * async function main() {
404
+ * const auth = new google.auth.GoogleAuth({
405
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
406
+ * scopes: ['https://www.googleapis.com/auth/content'],
407
+ * });
408
+ *
409
+ * // Acquire an auth client, and bind it to all future calls
410
+ * const authClient = await auth.getClient();
411
+ * google.options({auth: authClient});
412
+ *
413
+ * // Do the magic
414
+ * const res = await merchantapi.accounts.notificationsubscriptions.list({
415
+ * // The maximum number of notification subscriptions to return in a page. The default value for `page_size` is 100. The maximum value is `200`. Values above `200` will be coerced to `200`.
416
+ * pageSize: 'placeholder-value',
417
+ * // Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.
418
+ * pageToken: 'placeholder-value',
419
+ * // Required. The merchant account who owns the notification subscriptions. Format: `accounts/{account\}`
420
+ * parent: 'accounts/my-account',
421
+ * });
422
+ * console.log(res.data);
423
+ *
424
+ * // Example response
425
+ * // {
426
+ * // "nextPageToken": "my_nextPageToken",
427
+ * // "notificationSubscriptions": []
428
+ * // }
429
+ * }
430
+ *
431
+ * main().catch(e => {
432
+ * console.error(e);
433
+ * throw e;
434
+ * });
435
+ *
436
+ * ```
437
+ *
438
+ * @param params - Parameters for request
439
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
440
+ * @param callback - Optional callback that handles the response.
441
+ * @returns A promise if used with async/await, or void if used with a callback.
442
+ */
443
+ list(params: Params$Resource$Accounts$Notificationsubscriptions$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
444
+ list(params?: Params$Resource$Accounts$Notificationsubscriptions$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListNotificationSubscriptionsResponse>>;
445
+ list(params: Params$Resource$Accounts$Notificationsubscriptions$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
446
+ list(params: Params$Resource$Accounts$Notificationsubscriptions$List, options: MethodOptions | BodyResponseCallback<Schema$ListNotificationSubscriptionsResponse>, callback: BodyResponseCallback<Schema$ListNotificationSubscriptionsResponse>): void;
447
+ list(params: Params$Resource$Accounts$Notificationsubscriptions$List, callback: BodyResponseCallback<Schema$ListNotificationSubscriptionsResponse>): void;
448
+ list(callback: BodyResponseCallback<Schema$ListNotificationSubscriptionsResponse>): void;
449
+ /**
450
+ * Updates an existing notification subscription for a merchant.
451
+ * @example
452
+ * ```js
453
+ * // Before running the sample:
454
+ * // - Enable the API at:
455
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
456
+ * // - Login into gcloud by running:
457
+ * // ```sh
458
+ * // $ gcloud auth application-default login
459
+ * // ```
460
+ * // - Install the npm module by running:
461
+ * // ```sh
462
+ * // $ npm install googleapis
463
+ * // ```
464
+ *
465
+ * const {google} = require('googleapis');
466
+ * const merchantapi = google.merchantapi('notifications_v1');
467
+ *
468
+ * async function main() {
469
+ * const auth = new google.auth.GoogleAuth({
470
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
471
+ * scopes: ['https://www.googleapis.com/auth/content'],
472
+ * });
473
+ *
474
+ * // Acquire an auth client, and bind it to all future calls
475
+ * const authClient = await auth.getClient();
476
+ * google.options({auth: authClient});
477
+ *
478
+ * // Do the magic
479
+ * const res = await merchantapi.accounts.notificationsubscriptions.patch({
480
+ * // Output only. The `name` of the notification configuration. Generated by the Content API upon creation of a new `NotificationSubscription`. The `account` represents the merchant ID of the merchant that owns the configuration. Format: `accounts/{account\}/notificationsubscriptions/{notification_subscription\}`
481
+ * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
482
+ * // List of fields being updated.
483
+ * updateMask: 'placeholder-value',
484
+ *
485
+ * // Request body metadata
486
+ * requestBody: {
487
+ * // request body parameters
488
+ * // {
489
+ * // "allManagedAccounts": false,
490
+ * // "callBackUri": "my_callBackUri",
491
+ * // "name": "my_name",
492
+ * // "registeredEvent": "my_registeredEvent",
493
+ * // "targetAccount": "my_targetAccount"
494
+ * // }
495
+ * },
496
+ * });
497
+ * console.log(res.data);
498
+ *
499
+ * // Example response
500
+ * // {
501
+ * // "allManagedAccounts": false,
502
+ * // "callBackUri": "my_callBackUri",
503
+ * // "name": "my_name",
504
+ * // "registeredEvent": "my_registeredEvent",
505
+ * // "targetAccount": "my_targetAccount"
506
+ * // }
507
+ * }
508
+ *
509
+ * main().catch(e => {
510
+ * console.error(e);
511
+ * throw e;
512
+ * });
513
+ *
514
+ * ```
515
+ *
516
+ * @param params - Parameters for request
517
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
518
+ * @param callback - Optional callback that handles the response.
519
+ * @returns A promise if used with async/await, or void if used with a callback.
520
+ */
521
+ patch(params: Params$Resource$Accounts$Notificationsubscriptions$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
522
+ patch(params?: Params$Resource$Accounts$Notificationsubscriptions$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$NotificationSubscription>>;
523
+ patch(params: Params$Resource$Accounts$Notificationsubscriptions$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
524
+ patch(params: Params$Resource$Accounts$Notificationsubscriptions$Patch, options: MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>, callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
525
+ patch(params: Params$Resource$Accounts$Notificationsubscriptions$Patch, callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
526
+ patch(callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
527
+ }
528
+ export interface Params$Resource$Accounts$Notificationsubscriptions$Create extends StandardParameters {
529
+ /**
530
+ * Required. The merchant account that owns the new notification subscription. Format: `accounts/{account\}`
531
+ */
532
+ parent?: string;
533
+ /**
534
+ * Request body metadata
535
+ */
536
+ requestBody?: Schema$NotificationSubscription;
537
+ }
538
+ export interface Params$Resource$Accounts$Notificationsubscriptions$Delete extends StandardParameters {
539
+ /**
540
+ * Required. The name of the notification subscription to be deleted.
541
+ */
542
+ name?: string;
543
+ }
544
+ export interface Params$Resource$Accounts$Notificationsubscriptions$Get extends StandardParameters {
545
+ /**
546
+ * Required. The `name` of the notification subscription.
547
+ */
548
+ name?: string;
549
+ }
550
+ export interface Params$Resource$Accounts$Notificationsubscriptions$List extends StandardParameters {
551
+ /**
552
+ * The maximum number of notification subscriptions to return in a page. The default value for `page_size` is 100. The maximum value is `200`. Values above `200` will be coerced to `200`.
553
+ */
554
+ pageSize?: number;
555
+ /**
556
+ * Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.
557
+ */
558
+ pageToken?: string;
559
+ /**
560
+ * Required. The merchant account who owns the notification subscriptions. Format: `accounts/{account\}`
561
+ */
562
+ parent?: string;
563
+ }
564
+ export interface Params$Resource$Accounts$Notificationsubscriptions$Patch extends StandardParameters {
565
+ /**
566
+ * Output only. The `name` of the notification configuration. Generated by the Content API upon creation of a new `NotificationSubscription`. The `account` represents the merchant ID of the merchant that owns the configuration. Format: `accounts/{account\}/notificationsubscriptions/{notification_subscription\}`
567
+ */
568
+ name?: string;
569
+ /**
570
+ * List of fields being updated.
571
+ */
572
+ updateMask?: string;
573
+ /**
574
+ * Request body metadata
575
+ */
576
+ requestBody?: Schema$NotificationSubscription;
577
+ }
578
+ export {};
579
+ }