@googleapis/merchantapi 11.0.0 → 13.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 +227 -0
  2. package/accounts_v1.ts +14278 -0
  3. package/accounts_v1beta.ts +160 -6
  4. package/build/accounts_v1.d.ts +8168 -0
  5. package/build/accounts_v1.js +2632 -0
  6. package/build/accounts_v1.js.map +1 -0
  7. package/build/accounts_v1beta.d.ts +74 -7
  8. package/build/accounts_v1beta.js +78 -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,748 @@
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_conversions_v1 {
4
+ export interface Options extends GlobalOptions {
5
+ version: 'conversions_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('conversions_v1');
66
+ * ```
67
+ */
68
+ export class Merchantapi {
69
+ context: APIRequestContext;
70
+ accounts: Resource$Accounts;
71
+ constructor(options: GlobalOptions, google?: GoogleConfigurable);
72
+ }
73
+ /**
74
+ * Represents attribution settings for conversion sources receiving pre-attribution data.
75
+ */
76
+ export interface Schema$AttributionSettings {
77
+ /**
78
+ * Required. Lookback window (in days) used for attribution in this source. Supported values are `7`, `30` & `40`.
79
+ */
80
+ attributionLookbackWindowDays?: number | null;
81
+ /**
82
+ * Required. Attribution model.
83
+ */
84
+ attributionModel?: string | null;
85
+ /**
86
+ * Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
87
+ */
88
+ conversionType?: Schema$ConversionType[];
89
+ }
90
+ /**
91
+ * Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.
92
+ */
93
+ export interface Schema$ConversionSource {
94
+ /**
95
+ * Output only. Controller of the conversion source.
96
+ */
97
+ controller?: string | null;
98
+ /**
99
+ * Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.
100
+ */
101
+ expireTime?: string | null;
102
+ /**
103
+ * Immutable. Conversion Source of type "Link to Google Analytics Property".
104
+ */
105
+ googleAnalyticsLink?: Schema$GoogleAnalyticsLink;
106
+ /**
107
+ * Conversion Source of type "Merchant Center Tag Destination".
108
+ */
109
+ merchantCenterDestination?: Schema$MerchantCenterDestination;
110
+ /**
111
+ * Output only. Identifier. Generated by the Content API upon creation of a new `ConversionSource`. Format: `[a-z]{4\}:.+` The four characters before the colon represent the type of conversion source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: * `galk`: For GoogleAnalyticsLink sources. * `mcdn`: For MerchantCenterDestination sources.
112
+ */
113
+ name?: string | null;
114
+ /**
115
+ * Output only. Current state of this conversion source. Can't be edited through the API.
116
+ */
117
+ state?: string | null;
118
+ }
119
+ /**
120
+ * Message representing the type of a conversion event.
121
+ */
122
+ export interface Schema$ConversionType {
123
+ /**
124
+ * Output only. Conversion event name, as it'll be reported by the client.
125
+ */
126
+ name?: string | null;
127
+ /**
128
+ * Output only. Option indicating if the type should be included in Merchant Center reporting.
129
+ */
130
+ report?: boolean | null;
131
+ }
132
+ /**
133
+ * 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); \}
134
+ */
135
+ export interface Schema$Empty {
136
+ }
137
+ /**
138
+ * "Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account.
139
+ */
140
+ export interface Schema$GoogleAnalyticsLink {
141
+ /**
142
+ * Output only. Attribution settings for the linked Google Analytics property.
143
+ */
144
+ attributionSettings?: Schema$AttributionSettings;
145
+ /**
146
+ * Output only. Name of the Google Analytics property the merchant is linked to.
147
+ */
148
+ property?: string | null;
149
+ /**
150
+ * Required. Immutable. ID of the Google Analytics property the merchant is linked to.
151
+ */
152
+ propertyId?: string | null;
153
+ }
154
+ /**
155
+ * Response message for the ListConversionSources method.
156
+ */
157
+ export interface Schema$ListConversionSourcesResponse {
158
+ /**
159
+ * List of conversion sources.
160
+ */
161
+ conversionSources?: Schema$ConversionSource[];
162
+ /**
163
+ * Token to be used to fetch the next results page.
164
+ */
165
+ nextPageToken?: string | null;
166
+ }
167
+ /**
168
+ * "Merchant Center Destination" sources can be used to send conversion events from an online store using a Google tag directly to a Merchant Center account where the source is created.
169
+ */
170
+ export interface Schema$MerchantCenterDestination {
171
+ /**
172
+ * Required. Attribution settings used for the Merchant Center Destination.
173
+ */
174
+ attributionSettings?: Schema$AttributionSettings;
175
+ /**
176
+ * Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
177
+ */
178
+ currencyCode?: string | null;
179
+ /**
180
+ * Output only. Merchant Center Destination ID.
181
+ */
182
+ destination?: string | null;
183
+ /**
184
+ * Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. The maximum length is 64 characters.
185
+ */
186
+ displayName?: 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
+ * Request message for the UndeleteConversionSource method.
252
+ */
253
+ export interface Schema$UndeleteConversionSourceRequest {
254
+ }
255
+ export class Resource$Accounts {
256
+ context: APIRequestContext;
257
+ conversionSources: Resource$Accounts$Conversionsources;
258
+ constructor(context: APIRequestContext);
259
+ }
260
+ export class Resource$Accounts$Conversionsources {
261
+ context: APIRequestContext;
262
+ constructor(context: APIRequestContext);
263
+ /**
264
+ * Creates a new conversion source.
265
+ * @example
266
+ * ```js
267
+ * // Before running the sample:
268
+ * // - Enable the API at:
269
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
270
+ * // - Login into gcloud by running:
271
+ * // ```sh
272
+ * // $ gcloud auth application-default login
273
+ * // ```
274
+ * // - Install the npm module by running:
275
+ * // ```sh
276
+ * // $ npm install googleapis
277
+ * // ```
278
+ *
279
+ * const {google} = require('googleapis');
280
+ * const merchantapi = google.merchantapi('conversions_v1');
281
+ *
282
+ * async function main() {
283
+ * const auth = new google.auth.GoogleAuth({
284
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
285
+ * scopes: ['https://www.googleapis.com/auth/content'],
286
+ * });
287
+ *
288
+ * // Acquire an auth client, and bind it to all future calls
289
+ * const authClient = await auth.getClient();
290
+ * google.options({auth: authClient});
291
+ *
292
+ * // Do the magic
293
+ * const res = await merchantapi.accounts.conversionSources.create({
294
+ * // Required. The merchant account that will own the new conversion source. Format: `accounts/{account\}`
295
+ * parent: 'accounts/my-account',
296
+ *
297
+ * // Request body metadata
298
+ * requestBody: {
299
+ * // request body parameters
300
+ * // {
301
+ * // "controller": "my_controller",
302
+ * // "expireTime": "my_expireTime",
303
+ * // "googleAnalyticsLink": {},
304
+ * // "merchantCenterDestination": {},
305
+ * // "name": "my_name",
306
+ * // "state": "my_state"
307
+ * // }
308
+ * },
309
+ * });
310
+ * console.log(res.data);
311
+ *
312
+ * // Example response
313
+ * // {
314
+ * // "controller": "my_controller",
315
+ * // "expireTime": "my_expireTime",
316
+ * // "googleAnalyticsLink": {},
317
+ * // "merchantCenterDestination": {},
318
+ * // "name": "my_name",
319
+ * // "state": "my_state"
320
+ * // }
321
+ * }
322
+ *
323
+ * main().catch(e => {
324
+ * console.error(e);
325
+ * throw e;
326
+ * });
327
+ *
328
+ * ```
329
+ *
330
+ * @param params - Parameters for request
331
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
332
+ * @param callback - Optional callback that handles the response.
333
+ * @returns A promise if used with async/await, or void if used with a callback.
334
+ */
335
+ create(params: Params$Resource$Accounts$Conversionsources$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
336
+ create(params?: Params$Resource$Accounts$Conversionsources$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
337
+ create(params: Params$Resource$Accounts$Conversionsources$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
338
+ create(params: Params$Resource$Accounts$Conversionsources$Create, options: MethodOptions | BodyResponseCallback<Schema$ConversionSource>, callback: BodyResponseCallback<Schema$ConversionSource>): void;
339
+ create(params: Params$Resource$Accounts$Conversionsources$Create, callback: BodyResponseCallback<Schema$ConversionSource>): void;
340
+ create(callback: BodyResponseCallback<Schema$ConversionSource>): void;
341
+ /**
342
+ * Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
343
+ * @example
344
+ * ```js
345
+ * // Before running the sample:
346
+ * // - Enable the API at:
347
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
348
+ * // - Login into gcloud by running:
349
+ * // ```sh
350
+ * // $ gcloud auth application-default login
351
+ * // ```
352
+ * // - Install the npm module by running:
353
+ * // ```sh
354
+ * // $ npm install googleapis
355
+ * // ```
356
+ *
357
+ * const {google} = require('googleapis');
358
+ * const merchantapi = google.merchantapi('conversions_v1');
359
+ *
360
+ * async function main() {
361
+ * const auth = new google.auth.GoogleAuth({
362
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
363
+ * scopes: ['https://www.googleapis.com/auth/content'],
364
+ * });
365
+ *
366
+ * // Acquire an auth client, and bind it to all future calls
367
+ * const authClient = await auth.getClient();
368
+ * google.options({auth: authClient});
369
+ *
370
+ * // Do the magic
371
+ * const res = await merchantapi.accounts.conversionSources.delete({
372
+ * // Required. The name of the conversion source to be deleted. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
373
+ * name: 'accounts/my-account/conversionSources/my-conversionSource',
374
+ * });
375
+ * console.log(res.data);
376
+ *
377
+ * // Example response
378
+ * // {}
379
+ * }
380
+ *
381
+ * main().catch(e => {
382
+ * console.error(e);
383
+ * throw e;
384
+ * });
385
+ *
386
+ * ```
387
+ *
388
+ * @param params - Parameters for request
389
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
390
+ * @param callback - Optional callback that handles the response.
391
+ * @returns A promise if used with async/await, or void if used with a callback.
392
+ */
393
+ delete(params: Params$Resource$Accounts$Conversionsources$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
394
+ delete(params?: Params$Resource$Accounts$Conversionsources$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
395
+ delete(params: Params$Resource$Accounts$Conversionsources$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
396
+ delete(params: Params$Resource$Accounts$Conversionsources$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
397
+ delete(params: Params$Resource$Accounts$Conversionsources$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
398
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
399
+ /**
400
+ * Fetches a conversion source.
401
+ * @example
402
+ * ```js
403
+ * // Before running the sample:
404
+ * // - Enable the API at:
405
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
406
+ * // - Login into gcloud by running:
407
+ * // ```sh
408
+ * // $ gcloud auth application-default login
409
+ * // ```
410
+ * // - Install the npm module by running:
411
+ * // ```sh
412
+ * // $ npm install googleapis
413
+ * // ```
414
+ *
415
+ * const {google} = require('googleapis');
416
+ * const merchantapi = google.merchantapi('conversions_v1');
417
+ *
418
+ * async function main() {
419
+ * const auth = new google.auth.GoogleAuth({
420
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
421
+ * scopes: ['https://www.googleapis.com/auth/content'],
422
+ * });
423
+ *
424
+ * // Acquire an auth client, and bind it to all future calls
425
+ * const authClient = await auth.getClient();
426
+ * google.options({auth: authClient});
427
+ *
428
+ * // Do the magic
429
+ * const res = await merchantapi.accounts.conversionSources.get({
430
+ * // Required. The name of the conversion source to be fetched. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
431
+ * name: 'accounts/my-account/conversionSources/my-conversionSource',
432
+ * });
433
+ * console.log(res.data);
434
+ *
435
+ * // Example response
436
+ * // {
437
+ * // "controller": "my_controller",
438
+ * // "expireTime": "my_expireTime",
439
+ * // "googleAnalyticsLink": {},
440
+ * // "merchantCenterDestination": {},
441
+ * // "name": "my_name",
442
+ * // "state": "my_state"
443
+ * // }
444
+ * }
445
+ *
446
+ * main().catch(e => {
447
+ * console.error(e);
448
+ * throw e;
449
+ * });
450
+ *
451
+ * ```
452
+ *
453
+ * @param params - Parameters for request
454
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
455
+ * @param callback - Optional callback that handles the response.
456
+ * @returns A promise if used with async/await, or void if used with a callback.
457
+ */
458
+ get(params: Params$Resource$Accounts$Conversionsources$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
459
+ get(params?: Params$Resource$Accounts$Conversionsources$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
460
+ get(params: Params$Resource$Accounts$Conversionsources$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
461
+ get(params: Params$Resource$Accounts$Conversionsources$Get, options: MethodOptions | BodyResponseCallback<Schema$ConversionSource>, callback: BodyResponseCallback<Schema$ConversionSource>): void;
462
+ get(params: Params$Resource$Accounts$Conversionsources$Get, callback: BodyResponseCallback<Schema$ConversionSource>): void;
463
+ get(callback: BodyResponseCallback<Schema$ConversionSource>): void;
464
+ /**
465
+ * Retrieves the list of conversion sources the caller has access to.
466
+ * @example
467
+ * ```js
468
+ * // Before running the sample:
469
+ * // - Enable the API at:
470
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
471
+ * // - Login into gcloud by running:
472
+ * // ```sh
473
+ * // $ gcloud auth application-default login
474
+ * // ```
475
+ * // - Install the npm module by running:
476
+ * // ```sh
477
+ * // $ npm install googleapis
478
+ * // ```
479
+ *
480
+ * const {google} = require('googleapis');
481
+ * const merchantapi = google.merchantapi('conversions_v1');
482
+ *
483
+ * async function main() {
484
+ * const auth = new google.auth.GoogleAuth({
485
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
486
+ * scopes: ['https://www.googleapis.com/auth/content'],
487
+ * });
488
+ *
489
+ * // Acquire an auth client, and bind it to all future calls
490
+ * const authClient = await auth.getClient();
491
+ * google.options({auth: authClient});
492
+ *
493
+ * // Do the magic
494
+ * const res = await merchantapi.accounts.conversionSources.list({
495
+ * // Optional. The maximum number of conversion sources to return in a page. If no `page_size` is specified, `100` is used as the default value. The maximum value is `200`. Values above `200` will be coerced to `200`. Regardless of pagination, at most `200` conversion sources are returned in total.
496
+ * pageSize: 'placeholder-value',
497
+ * // Optional. Page token.
498
+ * pageToken: 'placeholder-value',
499
+ * // Required. The merchant account who owns the collection of conversion sources. Format: `accounts/{account\}`
500
+ * parent: 'accounts/my-account',
501
+ * // Optional. Show deleted (archived) conversion sources. By default, deleted conversion sources are not returned.
502
+ * showDeleted: 'placeholder-value',
503
+ * });
504
+ * console.log(res.data);
505
+ *
506
+ * // Example response
507
+ * // {
508
+ * // "conversionSources": [],
509
+ * // "nextPageToken": "my_nextPageToken"
510
+ * // }
511
+ * }
512
+ *
513
+ * main().catch(e => {
514
+ * console.error(e);
515
+ * throw e;
516
+ * });
517
+ *
518
+ * ```
519
+ *
520
+ * @param params - Parameters for request
521
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
522
+ * @param callback - Optional callback that handles the response.
523
+ * @returns A promise if used with async/await, or void if used with a callback.
524
+ */
525
+ list(params: Params$Resource$Accounts$Conversionsources$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
526
+ list(params?: Params$Resource$Accounts$Conversionsources$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListConversionSourcesResponse>>;
527
+ list(params: Params$Resource$Accounts$Conversionsources$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
528
+ list(params: Params$Resource$Accounts$Conversionsources$List, options: MethodOptions | BodyResponseCallback<Schema$ListConversionSourcesResponse>, callback: BodyResponseCallback<Schema$ListConversionSourcesResponse>): void;
529
+ list(params: Params$Resource$Accounts$Conversionsources$List, callback: BodyResponseCallback<Schema$ListConversionSourcesResponse>): void;
530
+ list(callback: BodyResponseCallback<Schema$ListConversionSourcesResponse>): void;
531
+ /**
532
+ * Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
533
+ * @example
534
+ * ```js
535
+ * // Before running the sample:
536
+ * // - Enable the API at:
537
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
538
+ * // - Login into gcloud by running:
539
+ * // ```sh
540
+ * // $ gcloud auth application-default login
541
+ * // ```
542
+ * // - Install the npm module by running:
543
+ * // ```sh
544
+ * // $ npm install googleapis
545
+ * // ```
546
+ *
547
+ * const {google} = require('googleapis');
548
+ * const merchantapi = google.merchantapi('conversions_v1');
549
+ *
550
+ * async function main() {
551
+ * const auth = new google.auth.GoogleAuth({
552
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
553
+ * scopes: ['https://www.googleapis.com/auth/content'],
554
+ * });
555
+ *
556
+ * // Acquire an auth client, and bind it to all future calls
557
+ * const authClient = await auth.getClient();
558
+ * google.options({auth: authClient});
559
+ *
560
+ * // Do the magic
561
+ * const res = await merchantapi.accounts.conversionSources.patch({
562
+ * // Output only. Identifier. Generated by the Content API upon creation of a new `ConversionSource`. Format: `[a-z]{4\}:.+` The four characters before the colon represent the type of conversion source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: * `galk`: For GoogleAnalyticsLink sources. * `mcdn`: For MerchantCenterDestination sources.
563
+ * name: 'accounts/my-account/conversionSources/my-conversionSource',
564
+ * // Optional. List of fields being updated.
565
+ * updateMask: 'placeholder-value',
566
+ *
567
+ * // Request body metadata
568
+ * requestBody: {
569
+ * // request body parameters
570
+ * // {
571
+ * // "controller": "my_controller",
572
+ * // "expireTime": "my_expireTime",
573
+ * // "googleAnalyticsLink": {},
574
+ * // "merchantCenterDestination": {},
575
+ * // "name": "my_name",
576
+ * // "state": "my_state"
577
+ * // }
578
+ * },
579
+ * });
580
+ * console.log(res.data);
581
+ *
582
+ * // Example response
583
+ * // {
584
+ * // "controller": "my_controller",
585
+ * // "expireTime": "my_expireTime",
586
+ * // "googleAnalyticsLink": {},
587
+ * // "merchantCenterDestination": {},
588
+ * // "name": "my_name",
589
+ * // "state": "my_state"
590
+ * // }
591
+ * }
592
+ *
593
+ * main().catch(e => {
594
+ * console.error(e);
595
+ * throw e;
596
+ * });
597
+ *
598
+ * ```
599
+ *
600
+ * @param params - Parameters for request
601
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
602
+ * @param callback - Optional callback that handles the response.
603
+ * @returns A promise if used with async/await, or void if used with a callback.
604
+ */
605
+ patch(params: Params$Resource$Accounts$Conversionsources$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
606
+ patch(params?: Params$Resource$Accounts$Conversionsources$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
607
+ patch(params: Params$Resource$Accounts$Conversionsources$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
608
+ patch(params: Params$Resource$Accounts$Conversionsources$Patch, options: MethodOptions | BodyResponseCallback<Schema$ConversionSource>, callback: BodyResponseCallback<Schema$ConversionSource>): void;
609
+ patch(params: Params$Resource$Accounts$Conversionsources$Patch, callback: BodyResponseCallback<Schema$ConversionSource>): void;
610
+ patch(callback: BodyResponseCallback<Schema$ConversionSource>): void;
611
+ /**
612
+ * Re-enables an archived conversion source. Only Available for Merchant Center Destination conversion sources.
613
+ * @example
614
+ * ```js
615
+ * // Before running the sample:
616
+ * // - Enable the API at:
617
+ * // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
618
+ * // - Login into gcloud by running:
619
+ * // ```sh
620
+ * // $ gcloud auth application-default login
621
+ * // ```
622
+ * // - Install the npm module by running:
623
+ * // ```sh
624
+ * // $ npm install googleapis
625
+ * // ```
626
+ *
627
+ * const {google} = require('googleapis');
628
+ * const merchantapi = google.merchantapi('conversions_v1');
629
+ *
630
+ * async function main() {
631
+ * const auth = new google.auth.GoogleAuth({
632
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
633
+ * scopes: ['https://www.googleapis.com/auth/content'],
634
+ * });
635
+ *
636
+ * // Acquire an auth client, and bind it to all future calls
637
+ * const authClient = await auth.getClient();
638
+ * google.options({auth: authClient});
639
+ *
640
+ * // Do the magic
641
+ * const res = await merchantapi.accounts.conversionSources.undelete({
642
+ * // Required. The name of the conversion source to be undeleted. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
643
+ * name: 'accounts/my-account/conversionSources/my-conversionSource',
644
+ *
645
+ * // Request body metadata
646
+ * requestBody: {
647
+ * // request body parameters
648
+ * // {}
649
+ * },
650
+ * });
651
+ * console.log(res.data);
652
+ *
653
+ * // Example response
654
+ * // {
655
+ * // "controller": "my_controller",
656
+ * // "expireTime": "my_expireTime",
657
+ * // "googleAnalyticsLink": {},
658
+ * // "merchantCenterDestination": {},
659
+ * // "name": "my_name",
660
+ * // "state": "my_state"
661
+ * // }
662
+ * }
663
+ *
664
+ * main().catch(e => {
665
+ * console.error(e);
666
+ * throw e;
667
+ * });
668
+ *
669
+ * ```
670
+ *
671
+ * @param params - Parameters for request
672
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
673
+ * @param callback - Optional callback that handles the response.
674
+ * @returns A promise if used with async/await, or void if used with a callback.
675
+ */
676
+ undelete(params: Params$Resource$Accounts$Conversionsources$Undelete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
677
+ undelete(params?: Params$Resource$Accounts$Conversionsources$Undelete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
678
+ undelete(params: Params$Resource$Accounts$Conversionsources$Undelete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
679
+ undelete(params: Params$Resource$Accounts$Conversionsources$Undelete, options: MethodOptions | BodyResponseCallback<Schema$ConversionSource>, callback: BodyResponseCallback<Schema$ConversionSource>): void;
680
+ undelete(params: Params$Resource$Accounts$Conversionsources$Undelete, callback: BodyResponseCallback<Schema$ConversionSource>): void;
681
+ undelete(callback: BodyResponseCallback<Schema$ConversionSource>): void;
682
+ }
683
+ export interface Params$Resource$Accounts$Conversionsources$Create extends StandardParameters {
684
+ /**
685
+ * Required. The merchant account that will own the new conversion source. Format: `accounts/{account\}`
686
+ */
687
+ parent?: string;
688
+ /**
689
+ * Request body metadata
690
+ */
691
+ requestBody?: Schema$ConversionSource;
692
+ }
693
+ export interface Params$Resource$Accounts$Conversionsources$Delete extends StandardParameters {
694
+ /**
695
+ * Required. The name of the conversion source to be deleted. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
696
+ */
697
+ name?: string;
698
+ }
699
+ export interface Params$Resource$Accounts$Conversionsources$Get extends StandardParameters {
700
+ /**
701
+ * Required. The name of the conversion source to be fetched. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
702
+ */
703
+ name?: string;
704
+ }
705
+ export interface Params$Resource$Accounts$Conversionsources$List extends StandardParameters {
706
+ /**
707
+ * Optional. The maximum number of conversion sources to return in a page. If no `page_size` is specified, `100` is used as the default value. The maximum value is `200`. Values above `200` will be coerced to `200`. Regardless of pagination, at most `200` conversion sources are returned in total.
708
+ */
709
+ pageSize?: number;
710
+ /**
711
+ * Optional. Page token.
712
+ */
713
+ pageToken?: string;
714
+ /**
715
+ * Required. The merchant account who owns the collection of conversion sources. Format: `accounts/{account\}`
716
+ */
717
+ parent?: string;
718
+ /**
719
+ * Optional. Show deleted (archived) conversion sources. By default, deleted conversion sources are not returned.
720
+ */
721
+ showDeleted?: boolean;
722
+ }
723
+ export interface Params$Resource$Accounts$Conversionsources$Patch extends StandardParameters {
724
+ /**
725
+ * Output only. Identifier. Generated by the Content API upon creation of a new `ConversionSource`. Format: `[a-z]{4\}:.+` The four characters before the colon represent the type of conversion source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: * `galk`: For GoogleAnalyticsLink sources. * `mcdn`: For MerchantCenterDestination sources.
726
+ */
727
+ name?: string;
728
+ /**
729
+ * Optional. List of fields being updated.
730
+ */
731
+ updateMask?: string;
732
+ /**
733
+ * Request body metadata
734
+ */
735
+ requestBody?: Schema$ConversionSource;
736
+ }
737
+ export interface Params$Resource$Accounts$Conversionsources$Undelete extends StandardParameters {
738
+ /**
739
+ * Required. The name of the conversion source to be undeleted. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
740
+ */
741
+ name?: string;
742
+ /**
743
+ * Request body metadata
744
+ */
745
+ requestBody?: Schema$UndeleteConversionSourceRequest;
746
+ }
747
+ export {};
748
+ }