@zernio/node 0.2.513 → 0.2.515
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/dist/index.d.mts +209 -7
- package/dist/index.d.ts +209 -7
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/types.gen.ts +211 -6
|
@@ -100,6 +100,10 @@ export type Ad = {
|
|
|
100
100
|
*/
|
|
101
101
|
reviewStatus?: (AdReviewStatus);
|
|
102
102
|
adType?: 'boost' | 'standalone';
|
|
103
|
+
/**
|
|
104
|
+
* Creative format, classified from the media the creative carries. `null` when the creative carries no media to classify — an unsynced creative and a genuine text-only ad are indistinguishable, so neither is guessed at. Returned by `GET /v1/ads`, `GET /v1/ads/{adId}` and the ad nodes of `GET /v1/ads/tree`.
|
|
105
|
+
*/
|
|
106
|
+
creativeType?: ('carousel' | 'video' | 'document' | 'image') | null;
|
|
103
107
|
/**
|
|
104
108
|
* Available goals vary by platform. Meta (Facebook/Instagram) supports all 9 (incl. `lead_conversion` = website pixel lead optimization and `catalog_sales` = Advantage+ catalog ads). TikTok supports the 7 non-`lead_conversion` goals. LinkedIn supports all except app_promotion / lead_conversion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views.
|
|
105
109
|
*/
|
|
@@ -359,6 +363,11 @@ export type platform = 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinte
|
|
|
359
363
|
|
|
360
364
|
export type adType = 'boost' | 'standalone';
|
|
361
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Creative format, classified from the media the creative carries. `null` when the creative carries no media to classify — an unsynced creative and a genuine text-only ad are indistinguishable, so neither is guessed at. Returned by `GET /v1/ads`, `GET /v1/ads/{adId}` and the ad nodes of `GET /v1/ads/tree`.
|
|
368
|
+
*/
|
|
369
|
+
export type creativeType = 'carousel' | 'video' | 'document' | 'image';
|
|
370
|
+
|
|
362
371
|
/**
|
|
363
372
|
* Available goals vary by platform. Meta (Facebook/Instagram) supports all 9 (incl. `lead_conversion` = website pixel lead optimization and `catalog_sales` = Advantage+ catalog ads). TikTok supports the 7 non-`lead_conversion` goals. LinkedIn supports all except app_promotion / lead_conversion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views.
|
|
364
373
|
*/
|
|
@@ -492,6 +501,130 @@ export type AdDailyMetrics = AdMetrics & {
|
|
|
492
501
|
date?: string;
|
|
493
502
|
};
|
|
494
503
|
|
|
504
|
+
/**
|
|
505
|
+
* The single `engagement` total split into the interactions behind it.
|
|
506
|
+
*
|
|
507
|
+
* Note that `engagement` is not the sum of these: Meta's own
|
|
508
|
+
* `post_engagement` and `page_engagement` totals already contain the
|
|
509
|
+
* individual interactions, and all of them are counted into `engagement`.
|
|
510
|
+
* Use these fields when you need a specific interaction, and `engagement`
|
|
511
|
+
* only as the coarse total it has always been.
|
|
512
|
+
*
|
|
513
|
+
* Meta-only; other platforms leave these at 0.
|
|
514
|
+
*
|
|
515
|
+
*/
|
|
516
|
+
export type AdEngagementCounts = {
|
|
517
|
+
/**
|
|
518
|
+
* Meta's own post-engagement total (`post_engagement`).
|
|
519
|
+
*/
|
|
520
|
+
postEngagement?: number;
|
|
521
|
+
/**
|
|
522
|
+
* Meta's own page-engagement total (`page_engagement`).
|
|
523
|
+
*/
|
|
524
|
+
pageEngagement?: number;
|
|
525
|
+
/**
|
|
526
|
+
* Reactions on the ad's post (`post_reaction`).
|
|
527
|
+
*/
|
|
528
|
+
reactions?: number;
|
|
529
|
+
/**
|
|
530
|
+
* Comments on the ad's post.
|
|
531
|
+
*/
|
|
532
|
+
comments?: number;
|
|
533
|
+
/**
|
|
534
|
+
* Shares of the ad's post. Meta reports these under the action type literally named `post`.
|
|
535
|
+
*/
|
|
536
|
+
shares?: number;
|
|
537
|
+
/**
|
|
538
|
+
* Saves of the ad's post (`onsite_conversion.post_save`).
|
|
539
|
+
*/
|
|
540
|
+
saves?: number;
|
|
541
|
+
/**
|
|
542
|
+
* New Page likes attributed to the ad (`like`).
|
|
543
|
+
*/
|
|
544
|
+
pageLikes?: number;
|
|
545
|
+
/**
|
|
546
|
+
* 3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`.
|
|
547
|
+
*/
|
|
548
|
+
videoViews?: number;
|
|
549
|
+
/**
|
|
550
|
+
* Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session `inline_link_clicks` reported by `GET /v1/ads/{adId}/analytics`.
|
|
551
|
+
*/
|
|
552
|
+
linkClicks?: number;
|
|
553
|
+
};
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Named conversion-funnel steps, resolved from the same data as `actions`
|
|
557
|
+
* so you never have to parse action-type strings yourself.
|
|
558
|
+
*
|
|
559
|
+
* Meta reports one event under several action types at once
|
|
560
|
+
* (`offsite_conversion.fb_pixel_purchase`, `omni_purchase`, `purchase`, …).
|
|
561
|
+
* Each field below takes the FIRST family member present rather than
|
|
562
|
+
* summing them, which is what makes these counts safe to add up — summing
|
|
563
|
+
* the raw `actions` keys yourself double or triple counts. The same
|
|
564
|
+
* priority order backs `conversions`, so a purchase-optimised campaign
|
|
565
|
+
* reports the identical number in `conversions` and `funnel.purchases`.
|
|
566
|
+
*
|
|
567
|
+
* Every field is 0 when that step never fired. Populated for Meta ads;
|
|
568
|
+
* other platforms report a different action taxonomy and generally leave
|
|
569
|
+
* these at 0 (read `actions` for those). At ad-set and campaign level each
|
|
570
|
+
* step is summed from its per-ad values.
|
|
571
|
+
*
|
|
572
|
+
*/
|
|
573
|
+
export type AdFunnelCounts = {
|
|
574
|
+
/**
|
|
575
|
+
* Landing page views — the visitor actually loaded the destination, unlike a link click. Meta `landing_page_view`.
|
|
576
|
+
*/
|
|
577
|
+
landingPageViews?: number;
|
|
578
|
+
/**
|
|
579
|
+
* Content views (Meta `ViewContent` pixel event).
|
|
580
|
+
*/
|
|
581
|
+
contentViews?: number;
|
|
582
|
+
/**
|
|
583
|
+
* On-site searches (Meta `Search` pixel event).
|
|
584
|
+
*/
|
|
585
|
+
searches?: number;
|
|
586
|
+
/**
|
|
587
|
+
* Adds to wishlist (Meta `AddToWishlist` pixel event).
|
|
588
|
+
*/
|
|
589
|
+
wishlistAdds?: number;
|
|
590
|
+
/**
|
|
591
|
+
* Adds to cart (Meta `AddToCart` pixel event).
|
|
592
|
+
*/
|
|
593
|
+
cartAdds?: number;
|
|
594
|
+
/**
|
|
595
|
+
* Checkouts started (Meta `InitiateCheckout` pixel event).
|
|
596
|
+
*/
|
|
597
|
+
checkoutsInitiated?: number;
|
|
598
|
+
/**
|
|
599
|
+
* Payment details added at checkout (Meta `AddPaymentInfo` pixel event).
|
|
600
|
+
*/
|
|
601
|
+
paymentInfoAdds?: number;
|
|
602
|
+
/**
|
|
603
|
+
* Purchases (Meta `Purchase` pixel event). Pair with `purchaseValue` for revenue.
|
|
604
|
+
*/
|
|
605
|
+
purchases?: number;
|
|
606
|
+
/**
|
|
607
|
+
* Leads, from either the website pixel or an instant form — whichever the ad uses.
|
|
608
|
+
*/
|
|
609
|
+
leads?: number;
|
|
610
|
+
/**
|
|
611
|
+
* Completed registrations (Meta `CompleteRegistration` pixel event).
|
|
612
|
+
*/
|
|
613
|
+
registrationsCompleted?: number;
|
|
614
|
+
/**
|
|
615
|
+
* Mobile app installs attributed to the ad.
|
|
616
|
+
*/
|
|
617
|
+
appInstalls?: number;
|
|
618
|
+
/**
|
|
619
|
+
* Messaging conversations started within 7 days — the headline metric for click-to-WhatsApp and click-to-Messenger ads.
|
|
620
|
+
*/
|
|
621
|
+
messagingConversationsStarted?: number;
|
|
622
|
+
/**
|
|
623
|
+
* Messaging threads where the person sent a first reply.
|
|
624
|
+
*/
|
|
625
|
+
messagingFirstReplies?: number;
|
|
626
|
+
};
|
|
627
|
+
|
|
495
628
|
export type AdMetrics = {
|
|
496
629
|
spend?: number;
|
|
497
630
|
impressions?: number;
|
|
@@ -577,6 +710,12 @@ export type AdMetrics = {
|
|
|
577
710
|
* Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages.
|
|
578
711
|
*/
|
|
579
712
|
videoAvgTimeWatchedActions?: number;
|
|
713
|
+
/**
|
|
714
|
+
* Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays.
|
|
715
|
+
*/
|
|
716
|
+
costPerThruplay?: number;
|
|
717
|
+
funnel?: AdFunnelCounts;
|
|
718
|
+
engagementBreakdown?: AdEngagementCounts;
|
|
580
719
|
/**
|
|
581
720
|
* Present on individual ads only, not on campaign aggregations
|
|
582
721
|
*/
|
|
@@ -25195,7 +25334,18 @@ export type ListCommentAutomationsResponse = ({
|
|
|
25195
25334
|
platformPostId?: string;
|
|
25196
25335
|
postTitle?: string;
|
|
25197
25336
|
keywords?: Array<(string)>;
|
|
25198
|
-
|
|
25337
|
+
/**
|
|
25338
|
+
* How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
|
|
25339
|
+
*/
|
|
25340
|
+
matchMode?: 'exact' | 'contains' | 'word';
|
|
25341
|
+
/**
|
|
25342
|
+
* Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
|
|
25343
|
+
*/
|
|
25344
|
+
excludeKeywords?: Array<(string)>;
|
|
25345
|
+
/**
|
|
25346
|
+
* Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
|
|
25347
|
+
*/
|
|
25348
|
+
typoTolerance?: boolean;
|
|
25199
25349
|
dmMessage?: string;
|
|
25200
25350
|
/**
|
|
25201
25351
|
* Inline DM buttons (up to 3). Omitted when none are set.
|
|
@@ -25284,7 +25434,18 @@ export type CreateCommentAutomationData = {
|
|
|
25284
25434
|
* Trigger keywords (empty = any comment triggers)
|
|
25285
25435
|
*/
|
|
25286
25436
|
keywords?: Array<(string)>;
|
|
25287
|
-
|
|
25437
|
+
/**
|
|
25438
|
+
* How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
|
|
25439
|
+
*/
|
|
25440
|
+
matchMode?: 'exact' | 'contains' | 'word';
|
|
25441
|
+
/**
|
|
25442
|
+
* Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
|
|
25443
|
+
*/
|
|
25444
|
+
excludeKeywords?: Array<(string)>;
|
|
25445
|
+
/**
|
|
25446
|
+
* Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
|
|
25447
|
+
*/
|
|
25448
|
+
typoTolerance?: boolean;
|
|
25288
25449
|
/**
|
|
25289
25450
|
* DM text to send to commenter. Max 640 chars when buttons are set, otherwise ~1000.
|
|
25290
25451
|
*/
|
|
@@ -25325,7 +25486,18 @@ export type CreateCommentAutomationResponse = ({
|
|
|
25325
25486
|
trigger?: 'comment' | 'story_reply';
|
|
25326
25487
|
platformPostId?: string;
|
|
25327
25488
|
keywords?: Array<(string)>;
|
|
25328
|
-
|
|
25489
|
+
/**
|
|
25490
|
+
* How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
|
|
25491
|
+
*/
|
|
25492
|
+
matchMode?: 'exact' | 'contains' | 'word';
|
|
25493
|
+
/**
|
|
25494
|
+
* Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
|
|
25495
|
+
*/
|
|
25496
|
+
excludeKeywords?: Array<(string)>;
|
|
25497
|
+
/**
|
|
25498
|
+
* Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
|
|
25499
|
+
*/
|
|
25500
|
+
typoTolerance?: boolean;
|
|
25329
25501
|
dmMessage?: string;
|
|
25330
25502
|
/**
|
|
25331
25503
|
* Inline DM buttons (up to 3). Omitted when none are set.
|
|
@@ -25374,7 +25546,18 @@ export type GetCommentAutomationResponse = ({
|
|
|
25374
25546
|
postId?: string;
|
|
25375
25547
|
postTitle?: string;
|
|
25376
25548
|
keywords?: Array<(string)>;
|
|
25377
|
-
|
|
25549
|
+
/**
|
|
25550
|
+
* How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
|
|
25551
|
+
*/
|
|
25552
|
+
matchMode?: 'exact' | 'contains' | 'word';
|
|
25553
|
+
/**
|
|
25554
|
+
* Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
|
|
25555
|
+
*/
|
|
25556
|
+
excludeKeywords?: Array<(string)>;
|
|
25557
|
+
/**
|
|
25558
|
+
* Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
|
|
25559
|
+
*/
|
|
25560
|
+
typoTolerance?: boolean;
|
|
25378
25561
|
dmMessage?: string;
|
|
25379
25562
|
/**
|
|
25380
25563
|
* Inline DM buttons (up to 3). Omitted when none are set.
|
|
@@ -25434,7 +25617,18 @@ export type UpdateCommentAutomationData = {
|
|
|
25434
25617
|
body?: {
|
|
25435
25618
|
name?: string;
|
|
25436
25619
|
keywords?: Array<(string)>;
|
|
25437
|
-
|
|
25620
|
+
/**
|
|
25621
|
+
* How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
|
|
25622
|
+
*/
|
|
25623
|
+
matchMode?: 'exact' | 'contains' | 'word';
|
|
25624
|
+
/**
|
|
25625
|
+
* Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
|
|
25626
|
+
*/
|
|
25627
|
+
excludeKeywords?: Array<(string)>;
|
|
25628
|
+
/**
|
|
25629
|
+
* Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
|
|
25630
|
+
*/
|
|
25631
|
+
typoTolerance?: boolean;
|
|
25438
25632
|
dmMessage?: string;
|
|
25439
25633
|
/**
|
|
25440
25634
|
* Inline DM buttons (1-3). Pass [] to clear all buttons.
|
|
@@ -25470,7 +25664,18 @@ export type UpdateCommentAutomationResponse = ({
|
|
|
25470
25664
|
id?: string;
|
|
25471
25665
|
name?: string;
|
|
25472
25666
|
keywords?: Array<(string)>;
|
|
25473
|
-
|
|
25667
|
+
/**
|
|
25668
|
+
* How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
|
|
25669
|
+
*/
|
|
25670
|
+
matchMode?: 'exact' | 'contains' | 'word';
|
|
25671
|
+
/**
|
|
25672
|
+
* Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
|
|
25673
|
+
*/
|
|
25674
|
+
excludeKeywords?: Array<(string)>;
|
|
25675
|
+
/**
|
|
25676
|
+
* Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
|
|
25677
|
+
*/
|
|
25678
|
+
typoTolerance?: boolean;
|
|
25474
25679
|
dmMessage?: string;
|
|
25475
25680
|
/**
|
|
25476
25681
|
* Inline DM buttons (up to 3). Omitted when none are set.
|