@googleapis/merchantapi 5.0.0 → 8.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.
- package/CHANGELOG.md +50 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6487 -518
- package/build/accounts_v1beta.d.ts +4773 -229
- package/build/accounts_v1beta.js +560 -12
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +349 -14
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +427 -18
- package/build/datasources_v1beta.js.map +1 -1
- package/build/index.d.ts +11 -1
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/inventories_v1beta.d.ts +349 -15
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +1027 -0
- package/build/issueresolution_v1beta.js +196 -0
- package/build/issueresolution_v1beta.js.map +1 -0
- package/build/lfp_v1beta.d.ts +451 -18
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +283 -12
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +459 -0
- package/build/ordertracking_v1beta.js +91 -0
- package/build/ordertracking_v1beta.js.map +1 -0
- package/build/products_v1beta.d.ts +358 -55
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +178 -11
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +55 -4
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +61 -4
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +443 -19
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +371 -21
- package/datasources_v1beta.ts +453 -26
- package/index.ts +24 -1
- package/inventories_v1beta.ts +367 -24
- package/issueresolution_v1beta.ts +1426 -0
- package/lfp_v1beta.ts +477 -26
- package/notifications_v1beta.ts +299 -21
- package/ordertracking_v1beta.ts +599 -0
- package/package.json +2 -2
- package/products_v1beta.ts +376 -61
- package/promotions_v1beta.ts +188 -15
- package/quota_v1beta.ts +57 -6
- package/reports_v1beta.ts +65 -5
- package/reviews_v1beta.ts +471 -29
package/conversions_v1beta.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -280,7 +280,7 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
280
280
|
*/
|
|
281
281
|
eventTime?: string | null;
|
|
282
282
|
/**
|
|
283
|
-
* Optional. The product expiration time. This field will not
|
|
283
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
284
284
|
*/
|
|
285
285
|
expirationTime?: string | null;
|
|
286
286
|
/**
|
|
@@ -324,6 +324,70 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
326
|
* Creates a new conversion source.
|
|
327
|
+
* @example
|
|
328
|
+
* ```js
|
|
329
|
+
* // Before running the sample:
|
|
330
|
+
* // - Enable the API at:
|
|
331
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
332
|
+
* // - Login into gcloud by running:
|
|
333
|
+
* // ```sh
|
|
334
|
+
* // $ gcloud auth application-default login
|
|
335
|
+
* // ```
|
|
336
|
+
* // - Install the npm module by running:
|
|
337
|
+
* // ```sh
|
|
338
|
+
* // $ npm install googleapis
|
|
339
|
+
* // ```
|
|
340
|
+
*
|
|
341
|
+
* const {google} = require('googleapis');
|
|
342
|
+
* const merchantapi = google.merchantapi('conversions_v1beta');
|
|
343
|
+
*
|
|
344
|
+
* async function main() {
|
|
345
|
+
* const auth = new google.auth.GoogleAuth({
|
|
346
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
347
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
348
|
+
* });
|
|
349
|
+
*
|
|
350
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
351
|
+
* const authClient = await auth.getClient();
|
|
352
|
+
* google.options({auth: authClient});
|
|
353
|
+
*
|
|
354
|
+
* // Do the magic
|
|
355
|
+
* const res = await merchantapi.accounts.conversionSources.create({
|
|
356
|
+
* // Required. The merchant account that will own the new conversion source. Format: `accounts/{account\}`
|
|
357
|
+
* parent: 'accounts/my-account',
|
|
358
|
+
*
|
|
359
|
+
* // Request body metadata
|
|
360
|
+
* requestBody: {
|
|
361
|
+
* // request body parameters
|
|
362
|
+
* // {
|
|
363
|
+
* // "controller": "my_controller",
|
|
364
|
+
* // "expireTime": "my_expireTime",
|
|
365
|
+
* // "googleAnalyticsLink": {},
|
|
366
|
+
* // "merchantCenterDestination": {},
|
|
367
|
+
* // "name": "my_name",
|
|
368
|
+
* // "state": "my_state"
|
|
369
|
+
* // }
|
|
370
|
+
* },
|
|
371
|
+
* });
|
|
372
|
+
* console.log(res.data);
|
|
373
|
+
*
|
|
374
|
+
* // Example response
|
|
375
|
+
* // {
|
|
376
|
+
* // "controller": "my_controller",
|
|
377
|
+
* // "expireTime": "my_expireTime",
|
|
378
|
+
* // "googleAnalyticsLink": {},
|
|
379
|
+
* // "merchantCenterDestination": {},
|
|
380
|
+
* // "name": "my_name",
|
|
381
|
+
* // "state": "my_state"
|
|
382
|
+
* // }
|
|
383
|
+
* }
|
|
384
|
+
*
|
|
385
|
+
* main().catch(e => {
|
|
386
|
+
* console.error(e);
|
|
387
|
+
* throw e;
|
|
388
|
+
* });
|
|
389
|
+
*
|
|
390
|
+
* ```
|
|
327
391
|
*
|
|
328
392
|
* @param params - Parameters for request
|
|
329
393
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -333,11 +397,11 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
333
397
|
create(
|
|
334
398
|
params: Params$Resource$Accounts$Conversionsources$Create,
|
|
335
399
|
options: StreamMethodOptions
|
|
336
|
-
):
|
|
400
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
337
401
|
create(
|
|
338
402
|
params?: Params$Resource$Accounts$Conversionsources$Create,
|
|
339
403
|
options?: MethodOptions
|
|
340
|
-
):
|
|
404
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
|
|
341
405
|
create(
|
|
342
406
|
params: Params$Resource$Accounts$Conversionsources$Create,
|
|
343
407
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -366,7 +430,10 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
366
430
|
callback?:
|
|
367
431
|
| BodyResponseCallback<Schema$ConversionSource>
|
|
368
432
|
| BodyResponseCallback<Readable>
|
|
369
|
-
):
|
|
433
|
+
):
|
|
434
|
+
| void
|
|
435
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>
|
|
436
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
370
437
|
let params = (paramsOrCallback ||
|
|
371
438
|
{}) as Params$Resource$Accounts$Conversionsources$Create;
|
|
372
439
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -411,6 +478,50 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
411
478
|
|
|
412
479
|
/**
|
|
413
480
|
* 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.
|
|
481
|
+
* @example
|
|
482
|
+
* ```js
|
|
483
|
+
* // Before running the sample:
|
|
484
|
+
* // - Enable the API at:
|
|
485
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
486
|
+
* // - Login into gcloud by running:
|
|
487
|
+
* // ```sh
|
|
488
|
+
* // $ gcloud auth application-default login
|
|
489
|
+
* // ```
|
|
490
|
+
* // - Install the npm module by running:
|
|
491
|
+
* // ```sh
|
|
492
|
+
* // $ npm install googleapis
|
|
493
|
+
* // ```
|
|
494
|
+
*
|
|
495
|
+
* const {google} = require('googleapis');
|
|
496
|
+
* const merchantapi = google.merchantapi('conversions_v1beta');
|
|
497
|
+
*
|
|
498
|
+
* async function main() {
|
|
499
|
+
* const auth = new google.auth.GoogleAuth({
|
|
500
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
501
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
502
|
+
* });
|
|
503
|
+
*
|
|
504
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
505
|
+
* const authClient = await auth.getClient();
|
|
506
|
+
* google.options({auth: authClient});
|
|
507
|
+
*
|
|
508
|
+
* // Do the magic
|
|
509
|
+
* const res = await merchantapi.accounts.conversionSources.delete({
|
|
510
|
+
* // Required. The name of the conversion source to be deleted. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
|
|
511
|
+
* name: 'accounts/my-account/conversionSources/my-conversionSource',
|
|
512
|
+
* });
|
|
513
|
+
* console.log(res.data);
|
|
514
|
+
*
|
|
515
|
+
* // Example response
|
|
516
|
+
* // {}
|
|
517
|
+
* }
|
|
518
|
+
*
|
|
519
|
+
* main().catch(e => {
|
|
520
|
+
* console.error(e);
|
|
521
|
+
* throw e;
|
|
522
|
+
* });
|
|
523
|
+
*
|
|
524
|
+
* ```
|
|
414
525
|
*
|
|
415
526
|
* @param params - Parameters for request
|
|
416
527
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -420,11 +531,11 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
420
531
|
delete(
|
|
421
532
|
params: Params$Resource$Accounts$Conversionsources$Delete,
|
|
422
533
|
options: StreamMethodOptions
|
|
423
|
-
):
|
|
534
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
424
535
|
delete(
|
|
425
536
|
params?: Params$Resource$Accounts$Conversionsources$Delete,
|
|
426
537
|
options?: MethodOptions
|
|
427
|
-
):
|
|
538
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
428
539
|
delete(
|
|
429
540
|
params: Params$Resource$Accounts$Conversionsources$Delete,
|
|
430
541
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -453,7 +564,10 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
453
564
|
callback?:
|
|
454
565
|
| BodyResponseCallback<Schema$Empty>
|
|
455
566
|
| BodyResponseCallback<Readable>
|
|
456
|
-
):
|
|
567
|
+
):
|
|
568
|
+
| void
|
|
569
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
570
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
457
571
|
let params = (paramsOrCallback ||
|
|
458
572
|
{}) as Params$Resource$Accounts$Conversionsources$Delete;
|
|
459
573
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -499,6 +613,57 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
499
613
|
|
|
500
614
|
/**
|
|
501
615
|
* Fetches a conversion source.
|
|
616
|
+
* @example
|
|
617
|
+
* ```js
|
|
618
|
+
* // Before running the sample:
|
|
619
|
+
* // - Enable the API at:
|
|
620
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
621
|
+
* // - Login into gcloud by running:
|
|
622
|
+
* // ```sh
|
|
623
|
+
* // $ gcloud auth application-default login
|
|
624
|
+
* // ```
|
|
625
|
+
* // - Install the npm module by running:
|
|
626
|
+
* // ```sh
|
|
627
|
+
* // $ npm install googleapis
|
|
628
|
+
* // ```
|
|
629
|
+
*
|
|
630
|
+
* const {google} = require('googleapis');
|
|
631
|
+
* const merchantapi = google.merchantapi('conversions_v1beta');
|
|
632
|
+
*
|
|
633
|
+
* async function main() {
|
|
634
|
+
* const auth = new google.auth.GoogleAuth({
|
|
635
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
636
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
637
|
+
* });
|
|
638
|
+
*
|
|
639
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
640
|
+
* const authClient = await auth.getClient();
|
|
641
|
+
* google.options({auth: authClient});
|
|
642
|
+
*
|
|
643
|
+
* // Do the magic
|
|
644
|
+
* const res = await merchantapi.accounts.conversionSources.get({
|
|
645
|
+
* // Required. The name of the conversion source to be fetched. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
|
|
646
|
+
* name: 'accounts/my-account/conversionSources/my-conversionSource',
|
|
647
|
+
* });
|
|
648
|
+
* console.log(res.data);
|
|
649
|
+
*
|
|
650
|
+
* // Example response
|
|
651
|
+
* // {
|
|
652
|
+
* // "controller": "my_controller",
|
|
653
|
+
* // "expireTime": "my_expireTime",
|
|
654
|
+
* // "googleAnalyticsLink": {},
|
|
655
|
+
* // "merchantCenterDestination": {},
|
|
656
|
+
* // "name": "my_name",
|
|
657
|
+
* // "state": "my_state"
|
|
658
|
+
* // }
|
|
659
|
+
* }
|
|
660
|
+
*
|
|
661
|
+
* main().catch(e => {
|
|
662
|
+
* console.error(e);
|
|
663
|
+
* throw e;
|
|
664
|
+
* });
|
|
665
|
+
*
|
|
666
|
+
* ```
|
|
502
667
|
*
|
|
503
668
|
* @param params - Parameters for request
|
|
504
669
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -508,11 +673,11 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
508
673
|
get(
|
|
509
674
|
params: Params$Resource$Accounts$Conversionsources$Get,
|
|
510
675
|
options: StreamMethodOptions
|
|
511
|
-
):
|
|
676
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
512
677
|
get(
|
|
513
678
|
params?: Params$Resource$Accounts$Conversionsources$Get,
|
|
514
679
|
options?: MethodOptions
|
|
515
|
-
):
|
|
680
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
|
|
516
681
|
get(
|
|
517
682
|
params: Params$Resource$Accounts$Conversionsources$Get,
|
|
518
683
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -541,7 +706,10 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
541
706
|
callback?:
|
|
542
707
|
| BodyResponseCallback<Schema$ConversionSource>
|
|
543
708
|
| BodyResponseCallback<Readable>
|
|
544
|
-
):
|
|
709
|
+
):
|
|
710
|
+
| void
|
|
711
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>
|
|
712
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
545
713
|
let params = (paramsOrCallback ||
|
|
546
714
|
{}) as Params$Resource$Accounts$Conversionsources$Get;
|
|
547
715
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -587,6 +755,59 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
587
755
|
|
|
588
756
|
/**
|
|
589
757
|
* Retrieves the list of conversion sources the caller has access to.
|
|
758
|
+
* @example
|
|
759
|
+
* ```js
|
|
760
|
+
* // Before running the sample:
|
|
761
|
+
* // - Enable the API at:
|
|
762
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
763
|
+
* // - Login into gcloud by running:
|
|
764
|
+
* // ```sh
|
|
765
|
+
* // $ gcloud auth application-default login
|
|
766
|
+
* // ```
|
|
767
|
+
* // - Install the npm module by running:
|
|
768
|
+
* // ```sh
|
|
769
|
+
* // $ npm install googleapis
|
|
770
|
+
* // ```
|
|
771
|
+
*
|
|
772
|
+
* const {google} = require('googleapis');
|
|
773
|
+
* const merchantapi = google.merchantapi('conversions_v1beta');
|
|
774
|
+
*
|
|
775
|
+
* async function main() {
|
|
776
|
+
* const auth = new google.auth.GoogleAuth({
|
|
777
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
778
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
779
|
+
* });
|
|
780
|
+
*
|
|
781
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
782
|
+
* const authClient = await auth.getClient();
|
|
783
|
+
* google.options({auth: authClient});
|
|
784
|
+
*
|
|
785
|
+
* // Do the magic
|
|
786
|
+
* const res = await merchantapi.accounts.conversionSources.list({
|
|
787
|
+
* // 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.
|
|
788
|
+
* pageSize: 'placeholder-value',
|
|
789
|
+
* // Optional. Page token.
|
|
790
|
+
* pageToken: 'placeholder-value',
|
|
791
|
+
* // Required. The merchant account who owns the collection of conversion sources. Format: `accounts/{account\}`
|
|
792
|
+
* parent: 'accounts/my-account',
|
|
793
|
+
* // Optional. Show deleted (archived) conversion sources. By default, deleted conversion sources are not returned.
|
|
794
|
+
* showDeleted: 'placeholder-value',
|
|
795
|
+
* });
|
|
796
|
+
* console.log(res.data);
|
|
797
|
+
*
|
|
798
|
+
* // Example response
|
|
799
|
+
* // {
|
|
800
|
+
* // "conversionSources": [],
|
|
801
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
802
|
+
* // }
|
|
803
|
+
* }
|
|
804
|
+
*
|
|
805
|
+
* main().catch(e => {
|
|
806
|
+
* console.error(e);
|
|
807
|
+
* throw e;
|
|
808
|
+
* });
|
|
809
|
+
*
|
|
810
|
+
* ```
|
|
590
811
|
*
|
|
591
812
|
* @param params - Parameters for request
|
|
592
813
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -596,11 +817,11 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
596
817
|
list(
|
|
597
818
|
params: Params$Resource$Accounts$Conversionsources$List,
|
|
598
819
|
options: StreamMethodOptions
|
|
599
|
-
):
|
|
820
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
600
821
|
list(
|
|
601
822
|
params?: Params$Resource$Accounts$Conversionsources$List,
|
|
602
823
|
options?: MethodOptions
|
|
603
|
-
):
|
|
824
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListConversionSourcesResponse>>;
|
|
604
825
|
list(
|
|
605
826
|
params: Params$Resource$Accounts$Conversionsources$List,
|
|
606
827
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -635,8 +856,8 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
635
856
|
| BodyResponseCallback<Readable>
|
|
636
857
|
):
|
|
637
858
|
| void
|
|
638
|
-
|
|
|
639
|
-
|
|
|
859
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListConversionSourcesResponse>>
|
|
860
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
640
861
|
let params = (paramsOrCallback ||
|
|
641
862
|
{}) as Params$Resource$Accounts$Conversionsources$List;
|
|
642
863
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -683,6 +904,72 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
683
904
|
|
|
684
905
|
/**
|
|
685
906
|
* Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
|
|
907
|
+
* @example
|
|
908
|
+
* ```js
|
|
909
|
+
* // Before running the sample:
|
|
910
|
+
* // - Enable the API at:
|
|
911
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
912
|
+
* // - Login into gcloud by running:
|
|
913
|
+
* // ```sh
|
|
914
|
+
* // $ gcloud auth application-default login
|
|
915
|
+
* // ```
|
|
916
|
+
* // - Install the npm module by running:
|
|
917
|
+
* // ```sh
|
|
918
|
+
* // $ npm install googleapis
|
|
919
|
+
* // ```
|
|
920
|
+
*
|
|
921
|
+
* const {google} = require('googleapis');
|
|
922
|
+
* const merchantapi = google.merchantapi('conversions_v1beta');
|
|
923
|
+
*
|
|
924
|
+
* async function main() {
|
|
925
|
+
* const auth = new google.auth.GoogleAuth({
|
|
926
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
927
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
928
|
+
* });
|
|
929
|
+
*
|
|
930
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
931
|
+
* const authClient = await auth.getClient();
|
|
932
|
+
* google.options({auth: authClient});
|
|
933
|
+
*
|
|
934
|
+
* // Do the magic
|
|
935
|
+
* const res = await merchantapi.accounts.conversionSources.patch({
|
|
936
|
+
* // 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.
|
|
937
|
+
* name: 'accounts/my-account/conversionSources/my-conversionSource',
|
|
938
|
+
* // Optional. List of fields being updated.
|
|
939
|
+
* updateMask: 'placeholder-value',
|
|
940
|
+
*
|
|
941
|
+
* // Request body metadata
|
|
942
|
+
* requestBody: {
|
|
943
|
+
* // request body parameters
|
|
944
|
+
* // {
|
|
945
|
+
* // "controller": "my_controller",
|
|
946
|
+
* // "expireTime": "my_expireTime",
|
|
947
|
+
* // "googleAnalyticsLink": {},
|
|
948
|
+
* // "merchantCenterDestination": {},
|
|
949
|
+
* // "name": "my_name",
|
|
950
|
+
* // "state": "my_state"
|
|
951
|
+
* // }
|
|
952
|
+
* },
|
|
953
|
+
* });
|
|
954
|
+
* console.log(res.data);
|
|
955
|
+
*
|
|
956
|
+
* // Example response
|
|
957
|
+
* // {
|
|
958
|
+
* // "controller": "my_controller",
|
|
959
|
+
* // "expireTime": "my_expireTime",
|
|
960
|
+
* // "googleAnalyticsLink": {},
|
|
961
|
+
* // "merchantCenterDestination": {},
|
|
962
|
+
* // "name": "my_name",
|
|
963
|
+
* // "state": "my_state"
|
|
964
|
+
* // }
|
|
965
|
+
* }
|
|
966
|
+
*
|
|
967
|
+
* main().catch(e => {
|
|
968
|
+
* console.error(e);
|
|
969
|
+
* throw e;
|
|
970
|
+
* });
|
|
971
|
+
*
|
|
972
|
+
* ```
|
|
686
973
|
*
|
|
687
974
|
* @param params - Parameters for request
|
|
688
975
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -692,11 +979,11 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
692
979
|
patch(
|
|
693
980
|
params: Params$Resource$Accounts$Conversionsources$Patch,
|
|
694
981
|
options: StreamMethodOptions
|
|
695
|
-
):
|
|
982
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
696
983
|
patch(
|
|
697
984
|
params?: Params$Resource$Accounts$Conversionsources$Patch,
|
|
698
985
|
options?: MethodOptions
|
|
699
|
-
):
|
|
986
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
|
|
700
987
|
patch(
|
|
701
988
|
params: Params$Resource$Accounts$Conversionsources$Patch,
|
|
702
989
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -725,7 +1012,10 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
725
1012
|
callback?:
|
|
726
1013
|
| BodyResponseCallback<Schema$ConversionSource>
|
|
727
1014
|
| BodyResponseCallback<Readable>
|
|
728
|
-
):
|
|
1015
|
+
):
|
|
1016
|
+
| void
|
|
1017
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>
|
|
1018
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
729
1019
|
let params = (paramsOrCallback ||
|
|
730
1020
|
{}) as Params$Resource$Accounts$Conversionsources$Patch;
|
|
731
1021
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -771,6 +1061,63 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
771
1061
|
|
|
772
1062
|
/**
|
|
773
1063
|
* Re-enables an archived conversion source. Only Available for Merchant Center Destination conversion sources.
|
|
1064
|
+
* @example
|
|
1065
|
+
* ```js
|
|
1066
|
+
* // Before running the sample:
|
|
1067
|
+
* // - Enable the API at:
|
|
1068
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1069
|
+
* // - Login into gcloud by running:
|
|
1070
|
+
* // ```sh
|
|
1071
|
+
* // $ gcloud auth application-default login
|
|
1072
|
+
* // ```
|
|
1073
|
+
* // - Install the npm module by running:
|
|
1074
|
+
* // ```sh
|
|
1075
|
+
* // $ npm install googleapis
|
|
1076
|
+
* // ```
|
|
1077
|
+
*
|
|
1078
|
+
* const {google} = require('googleapis');
|
|
1079
|
+
* const merchantapi = google.merchantapi('conversions_v1beta');
|
|
1080
|
+
*
|
|
1081
|
+
* async function main() {
|
|
1082
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1083
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1084
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1085
|
+
* });
|
|
1086
|
+
*
|
|
1087
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1088
|
+
* const authClient = await auth.getClient();
|
|
1089
|
+
* google.options({auth: authClient});
|
|
1090
|
+
*
|
|
1091
|
+
* // Do the magic
|
|
1092
|
+
* const res = await merchantapi.accounts.conversionSources.undelete({
|
|
1093
|
+
* // Required. The name of the conversion source to be undeleted. Format: `accounts/{account\}/conversionSources/{conversion_source\}`
|
|
1094
|
+
* name: 'accounts/my-account/conversionSources/my-conversionSource',
|
|
1095
|
+
*
|
|
1096
|
+
* // Request body metadata
|
|
1097
|
+
* requestBody: {
|
|
1098
|
+
* // request body parameters
|
|
1099
|
+
* // {}
|
|
1100
|
+
* },
|
|
1101
|
+
* });
|
|
1102
|
+
* console.log(res.data);
|
|
1103
|
+
*
|
|
1104
|
+
* // Example response
|
|
1105
|
+
* // {
|
|
1106
|
+
* // "controller": "my_controller",
|
|
1107
|
+
* // "expireTime": "my_expireTime",
|
|
1108
|
+
* // "googleAnalyticsLink": {},
|
|
1109
|
+
* // "merchantCenterDestination": {},
|
|
1110
|
+
* // "name": "my_name",
|
|
1111
|
+
* // "state": "my_state"
|
|
1112
|
+
* // }
|
|
1113
|
+
* }
|
|
1114
|
+
*
|
|
1115
|
+
* main().catch(e => {
|
|
1116
|
+
* console.error(e);
|
|
1117
|
+
* throw e;
|
|
1118
|
+
* });
|
|
1119
|
+
*
|
|
1120
|
+
* ```
|
|
774
1121
|
*
|
|
775
1122
|
* @param params - Parameters for request
|
|
776
1123
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -780,11 +1127,11 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
780
1127
|
undelete(
|
|
781
1128
|
params: Params$Resource$Accounts$Conversionsources$Undelete,
|
|
782
1129
|
options: StreamMethodOptions
|
|
783
|
-
):
|
|
1130
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
784
1131
|
undelete(
|
|
785
1132
|
params?: Params$Resource$Accounts$Conversionsources$Undelete,
|
|
786
1133
|
options?: MethodOptions
|
|
787
|
-
):
|
|
1134
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>;
|
|
788
1135
|
undelete(
|
|
789
1136
|
params: Params$Resource$Accounts$Conversionsources$Undelete,
|
|
790
1137
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -813,7 +1160,10 @@ export namespace merchantapi_conversions_v1beta {
|
|
|
813
1160
|
callback?:
|
|
814
1161
|
| BodyResponseCallback<Schema$ConversionSource>
|
|
815
1162
|
| BodyResponseCallback<Readable>
|
|
816
|
-
):
|
|
1163
|
+
):
|
|
1164
|
+
| void
|
|
1165
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ConversionSource>>
|
|
1166
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
817
1167
|
let params = (paramsOrCallback ||
|
|
818
1168
|
{}) as Params$Resource$Accounts$Conversionsources$Undelete;
|
|
819
1169
|
let options = (optionsOrCallback || {}) as MethodOptions;
|