@googleapis/merchantapi 18.0.0 → 20.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 (69) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/accounts_v1.ts +41 -81
  3. package/accounts_v1beta.ts +38 -75
  4. package/build/accounts_v1.d.ts +1 -1
  5. package/build/accounts_v1.js.map +1 -1
  6. package/build/accounts_v1beta.d.ts +1 -1
  7. package/build/accounts_v1beta.js.map +1 -1
  8. package/build/conversions_v1.js.map +1 -1
  9. package/build/conversions_v1beta.js.map +1 -1
  10. package/build/datasources_v1.d.ts +3 -3
  11. package/build/datasources_v1.js.map +1 -1
  12. package/build/datasources_v1beta.d.ts +3 -3
  13. package/build/datasources_v1beta.js.map +1 -1
  14. package/build/index.d.ts +5 -0
  15. package/build/index.js +4 -1
  16. package/build/index.js.map +1 -1
  17. package/build/inventories_v1.d.ts +25 -0
  18. package/build/inventories_v1.js.map +1 -1
  19. package/build/inventories_v1beta.js.map +1 -1
  20. package/build/issueresolution_v1.d.ts +4 -4
  21. package/build/issueresolution_v1.js.map +1 -1
  22. package/build/issueresolution_v1beta.d.ts +4 -4
  23. package/build/issueresolution_v1beta.js.map +1 -1
  24. package/build/lfp_v1.js.map +1 -1
  25. package/build/lfp_v1beta.js.map +1 -1
  26. package/build/loyaltycustomers_v1.d.ts +304 -0
  27. package/build/loyaltycustomers_v1.js +96 -0
  28. package/build/loyaltycustomers_v1.js.map +1 -0
  29. package/build/notifications_v1.d.ts +4 -4
  30. package/build/notifications_v1.js.map +1 -1
  31. package/build/notifications_v1beta.d.ts +4 -4
  32. package/build/notifications_v1beta.js.map +1 -1
  33. package/build/products_v1.d.ts +203 -1
  34. package/build/products_v1.js.map +1 -1
  35. package/build/products_v1beta.js.map +1 -1
  36. package/build/promotions_v1.js.map +1 -1
  37. package/build/promotions_v1beta.js.map +1 -1
  38. package/build/quota_v1.d.ts +1 -1
  39. package/build/quota_v1.js.map +1 -1
  40. package/build/quota_v1beta.d.ts +1 -1
  41. package/build/quota_v1beta.js.map +1 -1
  42. package/build/reports_v1.d.ts +6 -6
  43. package/build/reports_v1beta.d.ts +6 -6
  44. package/build/reviews_v1beta.js.map +1 -1
  45. package/build/tsconfig.tsbuildinfo +1 -1
  46. package/conversions_v1.ts +1 -2
  47. package/conversions_v1beta.ts +1 -2
  48. package/datasources_v1.ts +10 -17
  49. package/datasources_v1beta.ts +10 -17
  50. package/index.ts +12 -0
  51. package/inventories_v1.ts +27 -4
  52. package/inventories_v1beta.ts +2 -4
  53. package/issueresolution_v1.ts +5 -6
  54. package/issueresolution_v1beta.ts +5 -6
  55. package/lfp_v1.ts +5 -10
  56. package/lfp_v1beta.ts +5 -10
  57. package/loyaltycustomers_v1.ts +454 -0
  58. package/notifications_v1.ts +8 -12
  59. package/notifications_v1beta.ts +8 -12
  60. package/package.json +1 -1
  61. package/products_v1.ts +206 -7
  62. package/products_v1beta.ts +3 -6
  63. package/promotions_v1.ts +3 -6
  64. package/promotions_v1beta.ts +3 -6
  65. package/quota_v1.ts +3 -5
  66. package/quota_v1beta.ts +2 -3
  67. package/reports_v1.ts +6 -6
  68. package/reports_v1beta.ts +6 -6
  69. package/reviews_v1beta.ts +3 -6
@@ -0,0 +1,454 @@
1
+ // Copyright 2020 Google LLC
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15
+ /* eslint-disable @typescript-eslint/no-unused-vars */
16
+ /* eslint-disable @typescript-eslint/no-empty-interface */
17
+ /* eslint-disable @typescript-eslint/no-namespace */
18
+ /* eslint-disable no-irregular-whitespace */
19
+
20
+ import {
21
+ OAuth2Client,
22
+ JWT,
23
+ Compute,
24
+ UserRefreshClient,
25
+ BaseExternalAccountClient,
26
+ GaxiosResponseWithHTTP2,
27
+ GoogleConfigurable,
28
+ createAPIRequest,
29
+ MethodOptions,
30
+ StreamMethodOptions,
31
+ GlobalOptions,
32
+ GoogleAuth,
33
+ BodyResponseCallback,
34
+ APIRequestContext,
35
+ } from 'googleapis-common';
36
+ import {Readable} from 'stream';
37
+
38
+ export namespace merchantapi_loyaltycustomers_v1 {
39
+ export interface Options extends GlobalOptions {
40
+ version: 'loyaltycustomers_v1';
41
+ }
42
+
43
+ interface StandardParameters {
44
+ /**
45
+ * Auth client or API Key for the request
46
+ */
47
+ auth?:
48
+ | string
49
+ | OAuth2Client
50
+ | JWT
51
+ | Compute
52
+ | UserRefreshClient
53
+ | BaseExternalAccountClient
54
+ | GoogleAuth;
55
+
56
+ /**
57
+ * V1 error format.
58
+ */
59
+ '$.xgafv'?: string;
60
+ /**
61
+ * OAuth access token.
62
+ */
63
+ access_token?: string;
64
+ /**
65
+ * Data format for response.
66
+ */
67
+ alt?: string;
68
+ /**
69
+ * JSONP
70
+ */
71
+ callback?: string;
72
+ /**
73
+ * Selector specifying which fields to include in a partial response.
74
+ */
75
+ fields?: string;
76
+ /**
77
+ * 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.
78
+ */
79
+ key?: string;
80
+ /**
81
+ * OAuth 2.0 token for the current user.
82
+ */
83
+ oauth_token?: string;
84
+ /**
85
+ * Returns response with indentations and line breaks.
86
+ */
87
+ prettyPrint?: boolean;
88
+ /**
89
+ * 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.
90
+ */
91
+ quotaUser?: string;
92
+ /**
93
+ * Legacy upload protocol for media (e.g. "media", "multipart").
94
+ */
95
+ uploadType?: string;
96
+ /**
97
+ * Upload protocol for media (e.g. "raw", "multipart").
98
+ */
99
+ upload_protocol?: string;
100
+ }
101
+
102
+ /**
103
+ * Merchant API
104
+ *
105
+ * Programmatically manage your Merchant Center Accounts.
106
+ *
107
+ * @example
108
+ * ```js
109
+ * const {google} = require('googleapis');
110
+ * const merchantapi = google.merchantapi('loyaltycustomers_v1');
111
+ * ```
112
+ */
113
+ export class Merchantapi {
114
+ context: APIRequestContext;
115
+ accounts: Resource$Accounts;
116
+
117
+ constructor(options: GlobalOptions, google?: GoogleConfigurable) {
118
+ this.context = {
119
+ _options: options || {},
120
+ google,
121
+ };
122
+
123
+ this.accounts = new Resource$Accounts(this.context);
124
+ }
125
+ }
126
+
127
+ /**
128
+ * Represents a customer’s physical address.
129
+ */
130
+ export interface Schema$AddressInfo {
131
+ /**
132
+ * Optional. The city of the customer.
133
+ */
134
+ city?: string | null;
135
+ /**
136
+ * Optional. The family name of the customer.
137
+ */
138
+ familyName?: string | null;
139
+ /**
140
+ * Optional. The given name of the customer.
141
+ */
142
+ givenName?: string | null;
143
+ /**
144
+ * Optional. The postal code (zip code) of the customer. **Format Rules:** * **United States:** 5-digit zip codes (e.g., "94108").
145
+ */
146
+ postalCode?: string | null;
147
+ /**
148
+ * Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This field is case-insensitive. For more information, see https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.
149
+ */
150
+ regionCode?: string | null;
151
+ /**
152
+ * Optional. The state or province of the customer.
153
+ */
154
+ state?: string | null;
155
+ }
156
+ /**
157
+ * Represents a customer’s loyalty information. Represents loyalty customer data in `ManageLoyaltyCustomerMatch` API, but is not a resource that can be retrieved or listed by other methods.
158
+ */
159
+ export interface Schema$LoyaltyCustomer {
160
+ /**
161
+ * Required. The tier label of the loyalty tier the customer belongs to.
162
+ */
163
+ loyaltyTier?: string | null;
164
+ /**
165
+ * Optional. The point balance of the loyalty customer.
166
+ */
167
+ pointBalance?: string | null;
168
+ /**
169
+ * Required. The identifiers for the customer.
170
+ */
171
+ userIdentifier?: Schema$UserIdentifier;
172
+ }
173
+ /**
174
+ * Request message for the ManageLoyaltyCustomerMatch method.
175
+ */
176
+ export interface Schema$ManageLoyaltyCustomerMatchRequest {
177
+ /**
178
+ * Required. The loyalty customer to insert, update, or remove.
179
+ */
180
+ loyaltyCustomer?: Schema$LoyaltyCustomer;
181
+ }
182
+ /**
183
+ * Response message for the ManageLoyaltyCustomerMatch method.
184
+ */
185
+ export interface Schema$ManageLoyaltyCustomerMatchResponse {
186
+ /**
187
+ * The loyalty customer that was inserted, updated, or removed. If the customer's identifier cannot be matched to a Google account or if the user has not opted into loyalty personalization, this field will contain a default `LoyaltyCustomer` instance.
188
+ */
189
+ loyaltyCustomer?: Schema$LoyaltyCustomer;
190
+ }
191
+ /**
192
+ * The change that happened to the product including old value, new value, country code as the region code and reporting context.
193
+ */
194
+ export interface Schema$ProductChange {
195
+ /**
196
+ * 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`, ``)
197
+ */
198
+ newValue?: string | null;
199
+ /**
200
+ * 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`, ``)
201
+ */
202
+ oldValue?: string | null;
203
+ /**
204
+ * Countries that have the change (if applicable). Represented in the ISO 3166 format.
205
+ */
206
+ regionCode?: string | null;
207
+ /**
208
+ * 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)
209
+ */
210
+ reportingContext?: string | null;
211
+ }
212
+ /**
213
+ * The message that the merchant will receive to notify about product status change event
214
+ */
215
+ export interface Schema$ProductStatusChangeMessage {
216
+ /**
217
+ * The target account that owns the entity that changed. Format : `accounts/{merchant_id\}`
218
+ */
219
+ account?: string | null;
220
+ /**
221
+ * The attribute in the resource that changed, in this case it will be always `Status`.
222
+ */
223
+ attribute?: string | null;
224
+ /**
225
+ * A message to describe the change that happened to the product
226
+ */
227
+ changes?: Schema$ProductChange[];
228
+ /**
229
+ * 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.
230
+ */
231
+ eventTime?: string | null;
232
+ /**
233
+ * Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
234
+ */
235
+ expirationTime?: string | null;
236
+ /**
237
+ * 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\}`
238
+ */
239
+ managingAccount?: string | null;
240
+ /**
241
+ * The product name. Format: `accounts/{account\}/products/{product\}`
242
+ */
243
+ resource?: string | null;
244
+ /**
245
+ * The product id.
246
+ */
247
+ resourceId?: string | null;
248
+ /**
249
+ * The resource that changed, in this case it will always be `Product`.
250
+ */
251
+ resourceType?: string | null;
252
+ }
253
+ /**
254
+ * The user identifiers associated with the customer. At least one of the fields within this message must be provided.
255
+ */
256
+ export interface Schema$UserIdentifier {
257
+ /**
258
+ * Optional. The customer’s physical address.
259
+ */
260
+ address?: Schema$AddressInfo;
261
+ /**
262
+ * Optional. The customer’s email address.
263
+ */
264
+ emailAddress?: string | null;
265
+ /**
266
+ * Optional. The customer's phone number, in [E.164 format](https://support.google.com/google-ads/answer/16355235) (e.g., "+16502530000").
267
+ */
268
+ phoneNumber?: string | null;
269
+ }
270
+
271
+ export class Resource$Accounts {
272
+ context: APIRequestContext;
273
+ loyaltyCustomers: Resource$Accounts$Loyaltycustomers;
274
+ constructor(context: APIRequestContext) {
275
+ this.context = context;
276
+ this.loyaltyCustomers = new Resource$Accounts$Loyaltycustomers(
277
+ this.context
278
+ );
279
+ }
280
+ }
281
+
282
+ export class Resource$Accounts$Loyaltycustomers {
283
+ context: APIRequestContext;
284
+ constructor(context: APIRequestContext) {
285
+ this.context = context;
286
+ }
287
+
288
+ /**
289
+ * Manages (inserts, updates, or removes) a customer's loyalty tier information. This method serves as a single interface for all changes to a customer's loyalty status. The specific action (insert, update, or remove) is determined by the current state of the merchant-to-customer association and the `loyalty_tier` value provided in the request. **Operation Logic:** * **Upsert (Insert/Update):** Providing any valid tier other than `NON_MEMBER` will associate the customer with that tier. If an association already exists, it will be updated; otherwise, a new one will be created. * **Removal:** Setting `loyalty_tier` to `NON_MEMBER` will remove any existing loyalty association for the customer. **Privacy Note:** To protect user privacy, this method consistently returns a `200 OK` status with a default `LoyaltyCustomer` response if the customer's identifier cannot be matched to a Google account or if the user has not opted into loyalty personalization.
290
+ * @example
291
+ * ```js
292
+ * // Before running the sample:
293
+ * // - Enable the API at:
294
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
295
+ * // - Login into gcloud by running:
296
+ * // ```sh
297
+ * // $ gcloud auth application-default login
298
+ * // ```
299
+ * // - Install the npm module by running:
300
+ * // ```sh
301
+ * // $ npm install googleapis
302
+ * // ```
303
+ *
304
+ * const {google} = require('googleapis');
305
+ * const merchantapi = google.merchantapi('loyaltycustomers_v1');
306
+ *
307
+ * async function main() {
308
+ * const auth = new google.auth.GoogleAuth({
309
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
310
+ * scopes: ['https://www.googleapis.com/auth/content'],
311
+ * });
312
+ *
313
+ * // Acquire an auth client, and bind it to all future calls
314
+ * const authClient = await auth.getClient();
315
+ * google.options({auth: authClient});
316
+ *
317
+ * // Do the magic
318
+ * const res = await merchantapi.accounts.loyaltyCustomers.manage({
319
+ * // Required. The parent account where this loyalty customer will be handled. Format: `accounts/{account\}`
320
+ * parent: 'accounts/my-account',
321
+ *
322
+ * // Request body metadata
323
+ * requestBody: {
324
+ * // request body parameters
325
+ * // {
326
+ * // "loyaltyCustomer": {}
327
+ * // }
328
+ * },
329
+ * });
330
+ * console.log(res.data);
331
+ *
332
+ * // Example response
333
+ * // {
334
+ * // "loyaltyCustomer": {}
335
+ * // }
336
+ * }
337
+ *
338
+ * main().catch(e => {
339
+ * console.error(e);
340
+ * throw e;
341
+ * });
342
+ *
343
+ * ```
344
+ *
345
+ * @param params - Parameters for request
346
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
347
+ * @param callback - Optional callback that handles the response.
348
+ * @returns A promise if used with async/await, or void if used with a callback.
349
+ */
350
+ manage(
351
+ params: Params$Resource$Accounts$Loyaltycustomers$Manage,
352
+ options: StreamMethodOptions
353
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
354
+ manage(
355
+ params?: Params$Resource$Accounts$Loyaltycustomers$Manage,
356
+ options?: MethodOptions
357
+ ): Promise<
358
+ GaxiosResponseWithHTTP2<Schema$ManageLoyaltyCustomerMatchResponse>
359
+ >;
360
+ manage(
361
+ params: Params$Resource$Accounts$Loyaltycustomers$Manage,
362
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
363
+ callback: BodyResponseCallback<Readable>
364
+ ): void;
365
+ manage(
366
+ params: Params$Resource$Accounts$Loyaltycustomers$Manage,
367
+ options:
368
+ | MethodOptions
369
+ | BodyResponseCallback<Schema$ManageLoyaltyCustomerMatchResponse>,
370
+ callback: BodyResponseCallback<Schema$ManageLoyaltyCustomerMatchResponse>
371
+ ): void;
372
+ manage(
373
+ params: Params$Resource$Accounts$Loyaltycustomers$Manage,
374
+ callback: BodyResponseCallback<Schema$ManageLoyaltyCustomerMatchResponse>
375
+ ): void;
376
+ manage(
377
+ callback: BodyResponseCallback<Schema$ManageLoyaltyCustomerMatchResponse>
378
+ ): void;
379
+ manage(
380
+ paramsOrCallback?:
381
+ | Params$Resource$Accounts$Loyaltycustomers$Manage
382
+ | BodyResponseCallback<Schema$ManageLoyaltyCustomerMatchResponse>
383
+ | BodyResponseCallback<Readable>,
384
+ optionsOrCallback?:
385
+ | MethodOptions
386
+ | StreamMethodOptions
387
+ | BodyResponseCallback<Schema$ManageLoyaltyCustomerMatchResponse>
388
+ | BodyResponseCallback<Readable>,
389
+ callback?:
390
+ | BodyResponseCallback<Schema$ManageLoyaltyCustomerMatchResponse>
391
+ | BodyResponseCallback<Readable>
392
+ ):
393
+ | void
394
+ | Promise<
395
+ GaxiosResponseWithHTTP2<Schema$ManageLoyaltyCustomerMatchResponse>
396
+ >
397
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
398
+ let params = (paramsOrCallback ||
399
+ {}) as Params$Resource$Accounts$Loyaltycustomers$Manage;
400
+ let options = (optionsOrCallback || {}) as MethodOptions;
401
+
402
+ if (typeof paramsOrCallback === 'function') {
403
+ callback = paramsOrCallback;
404
+ params = {} as Params$Resource$Accounts$Loyaltycustomers$Manage;
405
+ options = {};
406
+ }
407
+
408
+ if (typeof optionsOrCallback === 'function') {
409
+ callback = optionsOrCallback;
410
+ options = {};
411
+ }
412
+
413
+ const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
414
+ const parameters = {
415
+ options: Object.assign(
416
+ {
417
+ url: (
418
+ rootUrl + '/loyaltyCustomers/v1/{+parent}/loyaltyCustomers:manage'
419
+ ).replace(/([^:]\/)\/+/g, '$1'),
420
+ method: 'POST',
421
+ apiVersion: '',
422
+ },
423
+ options
424
+ ),
425
+ params,
426
+ requiredParams: ['parent'],
427
+ pathParams: ['parent'],
428
+ context: this.context,
429
+ };
430
+ if (callback) {
431
+ createAPIRequest<Schema$ManageLoyaltyCustomerMatchResponse>(
432
+ parameters,
433
+ callback as BodyResponseCallback<unknown>
434
+ );
435
+ } else {
436
+ return createAPIRequest<Schema$ManageLoyaltyCustomerMatchResponse>(
437
+ parameters
438
+ );
439
+ }
440
+ }
441
+ }
442
+
443
+ export interface Params$Resource$Accounts$Loyaltycustomers$Manage extends StandardParameters {
444
+ /**
445
+ * Required. The parent account where this loyalty customer will be handled. Format: `accounts/{account\}`
446
+ */
447
+ parent?: string;
448
+
449
+ /**
450
+ * Request body metadata
451
+ */
452
+ requestBody?: Schema$ManageLoyaltyCustomerMatchRequest;
453
+ }
454
+ }
@@ -154,7 +154,7 @@ export namespace merchantapi_notifications_v1 {
154
154
  */
155
155
  callBackUri?: string | null;
156
156
  /**
157
- * 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\}`
157
+ * Output only. The `name` of the notification configuration. Generated by the Merchant 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\}`
158
158
  */
159
159
  name?: string | null;
160
160
  /**
@@ -246,7 +246,7 @@ export namespace merchantapi_notifications_v1 {
246
246
  }
247
247
 
248
248
  /**
249
- * 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. See [Decode notifications](/merchant/api/guides/accounts/notifications#decode_notifications) for information on how to decode the notification payload and how to interpret its contents. 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.
249
+ * Creates a notification subscription for a business. For standalone or sub-accounts, the business can create a subscription for self. For advanced accounts, the business can create a subscription for all managed accounts or for a specific subaccount. See [Decode notifications](/merchant/api/guides/accounts/notifications#decode_notifications) for information on how to decode the notification payload and how to interpret its contents. 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.
250
250
  * @example
251
251
  * ```js
252
252
  * // Before running the sample:
@@ -331,8 +331,7 @@ export namespace merchantapi_notifications_v1 {
331
331
  create(
332
332
  params: Params$Resource$Accounts$Notificationsubscriptions$Create,
333
333
  options:
334
- | MethodOptions
335
- | BodyResponseCallback<Schema$NotificationSubscription>,
334
+ MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>,
336
335
  callback: BodyResponseCallback<Schema$NotificationSubscription>
337
336
  ): void;
338
337
  create(
@@ -488,8 +487,7 @@ export namespace merchantapi_notifications_v1 {
488
487
  | BodyResponseCallback<Schema$Empty>
489
488
  | BodyResponseCallback<Readable>,
490
489
  callback?:
491
- | BodyResponseCallback<Schema$Empty>
492
- | BodyResponseCallback<Readable>
490
+ BodyResponseCallback<Schema$Empty> | BodyResponseCallback<Readable>
493
491
  ):
494
492
  | void
495
493
  | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
@@ -612,8 +610,7 @@ export namespace merchantapi_notifications_v1 {
612
610
  get(
613
611
  params: Params$Resource$Accounts$Notificationsubscriptions$Get,
614
612
  options:
615
- | MethodOptions
616
- | BodyResponseCallback<Schema$NotificationSubscription>,
613
+ MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>,
617
614
  callback: BodyResponseCallback<Schema$NotificationSubscription>
618
615
  ): void;
619
616
  get(
@@ -863,7 +860,7 @@ export namespace merchantapi_notifications_v1 {
863
860
  *
864
861
  * // Do the magic
865
862
  * const res = await merchantapi.accounts.notificationsubscriptions.patch({
866
- * // 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\}`
863
+ * // Output only. The `name` of the notification configuration. Generated by the Merchant 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\}`
867
864
  * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
868
865
  * // List of fields being updated.
869
866
  * updateMask: 'placeholder-value',
@@ -920,8 +917,7 @@ export namespace merchantapi_notifications_v1 {
920
917
  patch(
921
918
  params: Params$Resource$Accounts$Notificationsubscriptions$Patch,
922
919
  options:
923
- | MethodOptions
924
- | BodyResponseCallback<Schema$NotificationSubscription>,
920
+ MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>,
925
921
  callback: BodyResponseCallback<Schema$NotificationSubscription>
926
922
  ): void;
927
923
  patch(
@@ -1031,7 +1027,7 @@ export namespace merchantapi_notifications_v1 {
1031
1027
  }
1032
1028
  export interface Params$Resource$Accounts$Notificationsubscriptions$Patch extends StandardParameters {
1033
1029
  /**
1034
- * 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\}`
1030
+ * Output only. The `name` of the notification configuration. Generated by the Merchant 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\}`
1035
1031
  */
1036
1032
  name?: string;
1037
1033
  /**
@@ -154,7 +154,7 @@ export namespace merchantapi_notifications_v1beta {
154
154
  */
155
155
  callBackUri?: string | null;
156
156
  /**
157
- * 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\}`
157
+ * Output only. The `name` of the notification configuration. Generated by the Merchant 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\}`
158
158
  */
159
159
  name?: string | null;
160
160
  /**
@@ -246,7 +246,7 @@ export namespace merchantapi_notifications_v1beta {
246
246
  }
247
247
 
248
248
  /**
249
- * 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. See [Decode notifications](/merchant/api/guides/accounts/notifications#decode_notifications) for information on how to decode the notification payload and how to interpret its contents. 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.
249
+ * Creates a notification subscription for a business. For standalone or sub-accounts, the business can create a subscription for self. For advanced accounts, the business can create a subscription for all managed accounts or for a specific subaccount. See [Decode notifications](/merchant/api/guides/accounts/notifications#decode_notifications) for information on how to decode the notification payload and how to interpret its contents. 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.
250
250
  * @example
251
251
  * ```js
252
252
  * // Before running the sample:
@@ -331,8 +331,7 @@ export namespace merchantapi_notifications_v1beta {
331
331
  create(
332
332
  params: Params$Resource$Accounts$Notificationsubscriptions$Create,
333
333
  options:
334
- | MethodOptions
335
- | BodyResponseCallback<Schema$NotificationSubscription>,
334
+ MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>,
336
335
  callback: BodyResponseCallback<Schema$NotificationSubscription>
337
336
  ): void;
338
337
  create(
@@ -489,8 +488,7 @@ export namespace merchantapi_notifications_v1beta {
489
488
  | BodyResponseCallback<Schema$Empty>
490
489
  | BodyResponseCallback<Readable>,
491
490
  callback?:
492
- | BodyResponseCallback<Schema$Empty>
493
- | BodyResponseCallback<Readable>
491
+ BodyResponseCallback<Schema$Empty> | BodyResponseCallback<Readable>
494
492
  ):
495
493
  | void
496
494
  | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
@@ -613,8 +611,7 @@ export namespace merchantapi_notifications_v1beta {
613
611
  get(
614
612
  params: Params$Resource$Accounts$Notificationsubscriptions$Get,
615
613
  options:
616
- | MethodOptions
617
- | BodyResponseCallback<Schema$NotificationSubscription>,
614
+ MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>,
618
615
  callback: BodyResponseCallback<Schema$NotificationSubscription>
619
616
  ): void;
620
617
  get(
@@ -865,7 +862,7 @@ export namespace merchantapi_notifications_v1beta {
865
862
  *
866
863
  * // Do the magic
867
864
  * const res = await merchantapi.accounts.notificationsubscriptions.patch({
868
- * // 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\}`
865
+ * // Output only. The `name` of the notification configuration. Generated by the Merchant 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\}`
869
866
  * name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
870
867
  * // List of fields being updated.
871
868
  * updateMask: 'placeholder-value',
@@ -922,8 +919,7 @@ export namespace merchantapi_notifications_v1beta {
922
919
  patch(
923
920
  params: Params$Resource$Accounts$Notificationsubscriptions$Patch,
924
921
  options:
925
- | MethodOptions
926
- | BodyResponseCallback<Schema$NotificationSubscription>,
922
+ MethodOptions | BodyResponseCallback<Schema$NotificationSubscription>,
927
923
  callback: BodyResponseCallback<Schema$NotificationSubscription>
928
924
  ): void;
929
925
  patch(
@@ -1033,7 +1029,7 @@ export namespace merchantapi_notifications_v1beta {
1033
1029
  }
1034
1030
  export interface Params$Resource$Accounts$Notificationsubscriptions$Patch extends StandardParameters {
1035
1031
  /**
1036
- * 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\}`
1032
+ * Output only. The `name` of the notification configuration. Generated by the Merchant 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\}`
1037
1033
  */
1038
1034
  name?: string;
1039
1035
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/merchantapi",
3
- "version": "18.0.0",
3
+ "version": "20.0.0",
4
4
  "description": "merchantapi",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",