@zernio/node 0.2.127 → 0.2.129

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.
@@ -1127,6 +1127,35 @@ export type DiscordPlatformData = {
1127
1127
  */
1128
1128
  export type autoArchiveDuration = 60 | 1440 | 4320 | 10080;
1129
1129
 
1130
+ /**
1131
+ * A single inline button rendered inside an auto-DM via Meta's button_template.
1132
+ * Up to 3 buttons per automation. `url` and `postback` work on Instagram and
1133
+ * Facebook; `phone` is Facebook-only. When buttons are set, `dmMessage` becomes
1134
+ * the button_template text and must be 640 characters or less.
1135
+ *
1136
+ */
1137
+ export type DmButton = {
1138
+ type: 'url' | 'postback' | 'phone';
1139
+ /**
1140
+ * Button label (20 chars max)
1141
+ */
1142
+ title: string;
1143
+ /**
1144
+ * Target URL (required when type is url)
1145
+ */
1146
+ url?: string;
1147
+ /**
1148
+ * Postback payload delivered via the messaging_postbacks webhook (required when type is postback)
1149
+ */
1150
+ payload?: string;
1151
+ /**
1152
+ * Phone number, e.g. +14155551234 (required when type is phone; Facebook only)
1153
+ */
1154
+ phone?: string;
1155
+ };
1156
+
1157
+ export type type2 = 'url' | 'postback' | 'phone';
1158
+
1130
1159
  export type ErrorResponse = {
1131
1160
  error?: string;
1132
1161
  details?: {
@@ -1367,7 +1396,7 @@ export type topicType = 'STANDARD' | 'EVENT' | 'OFFER';
1367
1396
  /**
1368
1397
  * Button action type: LEARN_MORE, BOOK, ORDER, SHOP, SIGN_UP, CALL
1369
1398
  */
1370
- export type type2 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
1399
+ export type type3 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
1371
1400
 
1372
1401
  /**
1373
1402
  * Type of offer
@@ -1848,7 +1877,7 @@ export type MediaItem = {
1848
1877
  tiktokProcessed?: boolean;
1849
1878
  };
1850
1879
 
1851
- export type type3 = 'image' | 'video' | 'gif' | 'document';
1880
+ export type type4 = 'image' | 'video' | 'gif' | 'document';
1852
1881
 
1853
1882
  export type MediaUploadResponse = {
1854
1883
  files?: Array<UploadedFile>;
@@ -2425,6 +2454,21 @@ export type ReviewWebhookReview = {
2425
2454
  */
2426
2455
  export type platform4 = 'googlebusiness';
2427
2456
 
2457
+ /**
2458
+ * An ad account a tracking tag is shared with (Meta `shared_accounts` edge).
2459
+ */
2460
+ export type SharedAdAccount = {
2461
+ /**
2462
+ * Ad account id, in `act_<digits>` form.
2463
+ */
2464
+ id: string;
2465
+ name?: string;
2466
+ /**
2467
+ * Business Manager id that owns the ad account
2468
+ */
2469
+ businessId?: string;
2470
+ };
2471
+
2428
2472
  /**
2429
2473
  * Requires a Public Profile. Single media item only. Content types: story (ephemeral 24h), saved_story (permanent, title max 45 chars), spotlight (video, max 160 chars).
2430
2474
  */
@@ -2644,6 +2688,75 @@ export type commercialContentType = 'none' | 'brand_organic' | 'brand_content';
2644
2688
  */
2645
2689
  export type mediaType2 = 'video' | 'photo';
2646
2690
 
2691
+ /**
2692
+ * A platform measurement tag — the thing you create, install on a
2693
+ * website, send events to, and target ads against. On Meta this is a
2694
+ * Pixel (`kind: pixel`). The shape is platform-neutral so other platforms
2695
+ * (Pinterest Tag, LinkedIn Insight Tag, etc.) can be added without
2696
+ * changing the contract; platform-specific fields are simply absent where
2697
+ * a platform has no equivalent. Returned by `listTrackingTags`,
2698
+ * `createTrackingTag`, `getTrackingTag`, and `updateTrackingTag`.
2699
+ *
2700
+ */
2701
+ export type TrackingTag = {
2702
+ /**
2703
+ * Platform-native tag id. Meta: numeric pixel id, as a string.
2704
+ */
2705
+ id: string;
2706
+ name: string;
2707
+ platform: 'metaads';
2708
+ /**
2709
+ * Platform-native flavor of the tag (Meta: `pixel`).
2710
+ */
2711
+ kind: 'pixel' | 'tag' | 'insight_tag';
2712
+ /**
2713
+ * `inactive` when the platform reports the tag as broken/unavailable.
2714
+ */
2715
+ status: 'active' | 'inactive';
2716
+ /**
2717
+ * The base-code `<script>` snippet to install on the site. Meta only;
2718
+ * populated by `getTrackingTag`, omitted from the list view.
2719
+ *
2720
+ */
2721
+ code?: string;
2722
+ /**
2723
+ * Unix seconds of the last event the tag received, or `null` if it
2724
+ * never fired. The practical "is it installed and working" signal.
2725
+ *
2726
+ */
2727
+ lastFiredTime?: (number) | null;
2728
+ /**
2729
+ * Whether the tag is in a broken/unavailable state (Meta `is_unavailable`).
2730
+ */
2731
+ isUnavailable?: boolean;
2732
+ /**
2733
+ * Convenience flag derived from `lastFiredTime` — has the tag ever fired.
2734
+ */
2735
+ installed?: boolean;
2736
+ /**
2737
+ * Unix seconds the tag was created.
2738
+ */
2739
+ creationTime?: number;
2740
+ /**
2741
+ * Business Manager id that owns the tag, or `null` when the tag lives
2742
+ * on a personal (non-BM) ad account — such tags can't be shared with
2743
+ * other ad accounts.
2744
+ *
2745
+ */
2746
+ ownerBusinessId?: (string) | null;
2747
+ /**
2748
+ * Ad account id (`act_...`) that owns the tag, when reported.
2749
+ */
2750
+ ownerAdAccountId?: string;
2751
+ };
2752
+
2753
+ export type platform6 = 'metaads';
2754
+
2755
+ /**
2756
+ * Platform-native flavor of the tag (Meta: `pixel`).
2757
+ */
2758
+ export type kind = 'pixel' | 'tag' | 'insight_tag';
2759
+
2647
2760
  /**
2648
2761
  * X (Twitter) geo-restriction applies at the media level. Media in geo-restricted tweets will be hidden for users outside the specified countries; the tweet text itself remains visible globally. Requires media to be attached (ignored for text-only tweets).
2649
2762
  *
@@ -2698,7 +2811,7 @@ export type UploadedFile = {
2698
2811
  mimeType?: string;
2699
2812
  };
2700
2813
 
2701
- export type type4 = 'image' | 'video' | 'document';
2814
+ export type type5 = 'image' | 'video' | 'document';
2702
2815
 
2703
2816
  export type UploadTokenResponse = {
2704
2817
  token?: string;
@@ -3204,7 +3317,7 @@ export type WebhookPayloadComment = {
3204
3317
 
3205
3318
  export type event4 = 'comment.received';
3206
3319
 
3207
- export type platform6 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit';
3320
+ export type platform7 = 'instagram' | 'facebook' | 'twitter' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit';
3208
3321
 
3209
3322
  /**
3210
3323
  * Webhook payload for message received events
@@ -3854,7 +3967,7 @@ export type WhatsAppTemplateButton = {
3854
3967
  navigate_screen?: string;
3855
3968
  };
3856
3969
 
3857
- export type type5 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'flow' | 'mpm' | 'catalog';
3970
+ export type type6 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'flow' | 'mpm' | 'catalog';
3858
3971
 
3859
3972
  /**
3860
3973
  * Required when type is otp
@@ -13170,6 +13283,10 @@ export type ListCommentAutomationsResponse = ({
13170
13283
  keywords?: Array<(string)>;
13171
13284
  matchMode?: 'exact' | 'contains';
13172
13285
  dmMessage?: string;
13286
+ /**
13287
+ * Inline DM buttons (up to 3). Omitted when none are set.
13288
+ */
13289
+ buttons?: Array<DmButton>;
13173
13290
  commentReply?: string;
13174
13291
  isActive?: boolean;
13175
13292
  stats?: {
@@ -13215,9 +13332,13 @@ export type CreateCommentAutomationData = {
13215
13332
  keywords?: Array<(string)>;
13216
13333
  matchMode?: 'exact' | 'contains';
13217
13334
  /**
13218
- * DM text to send to commenter
13335
+ * DM text to send to commenter. Max 640 chars when buttons are set, otherwise ~1000.
13219
13336
  */
13220
13337
  dmMessage: string;
13338
+ /**
13339
+ * Optional inline DM buttons (1-3). Phone buttons are Facebook-only. Omit or pass [] for a plain-text DM.
13340
+ */
13341
+ buttons?: Array<DmButton>;
13221
13342
  /**
13222
13343
  * Optional public reply to the comment
13223
13344
  */
@@ -13235,6 +13356,10 @@ export type CreateCommentAutomationResponse = ({
13235
13356
  keywords?: Array<(string)>;
13236
13357
  matchMode?: 'exact' | 'contains';
13237
13358
  dmMessage?: string;
13359
+ /**
13360
+ * Inline DM buttons (up to 3). Omitted when none are set.
13361
+ */
13362
+ buttons?: Array<DmButton>;
13238
13363
  commentReply?: string;
13239
13364
  isActive?: boolean;
13240
13365
  stats?: {
@@ -13269,6 +13394,10 @@ export type GetCommentAutomationResponse = ({
13269
13394
  keywords?: Array<(string)>;
13270
13395
  matchMode?: 'exact' | 'contains';
13271
13396
  dmMessage?: string;
13397
+ /**
13398
+ * Inline DM buttons (up to 3). Omitted when none are set.
13399
+ */
13400
+ buttons?: Array<DmButton>;
13272
13401
  commentReply?: string;
13273
13402
  isActive?: boolean;
13274
13403
  stats?: {
@@ -13315,6 +13444,10 @@ export type UpdateCommentAutomationData = {
13315
13444
  keywords?: Array<(string)>;
13316
13445
  matchMode?: 'exact' | 'contains';
13317
13446
  dmMessage?: string;
13447
+ /**
13448
+ * Inline DM buttons (1-3). Pass [] to clear all buttons.
13449
+ */
13450
+ buttons?: Array<DmButton>;
13318
13451
  commentReply?: string;
13319
13452
  isActive?: boolean;
13320
13453
  };
@@ -13331,6 +13464,10 @@ export type UpdateCommentAutomationResponse = ({
13331
13464
  keywords?: Array<(string)>;
13332
13465
  matchMode?: 'exact' | 'contains';
13333
13466
  dmMessage?: string;
13467
+ /**
13468
+ * Inline DM buttons (up to 3). Omitted when none are set.
13469
+ */
13470
+ buttons?: Array<DmButton>;
13334
13471
  commentReply?: string;
13335
13472
  isActive?: boolean;
13336
13473
  updatedAt?: string;
@@ -15385,4 +15522,214 @@ export type CreateCtwaAdResponse = ({
15385
15522
 
15386
15523
  export type CreateCtwaAdError = (unknown | {
15387
15524
  error?: string;
15525
+ });
15526
+
15527
+ export type ListTrackingTagsData = {
15528
+ path: {
15529
+ /**
15530
+ * Meta ads SocialAccount id (platform `metaads`).
15531
+ */
15532
+ accountId: string;
15533
+ };
15534
+ query?: {
15535
+ /**
15536
+ * Optional. Scope to one ad account, e.g. `act_123456789`.
15537
+ */
15538
+ adAccountId?: string;
15539
+ };
15540
+ };
15541
+
15542
+ export type ListTrackingTagsResponse = ({
15543
+ platform?: 'metaads';
15544
+ tags?: Array<TrackingTag>;
15545
+ });
15546
+
15547
+ export type ListTrackingTagsError = (unknown | {
15548
+ error?: string;
15549
+ });
15550
+
15551
+ export type CreateTrackingTagData = {
15552
+ body: {
15553
+ /**
15554
+ * Meta ad account id, e.g. `act_123456789`.
15555
+ */
15556
+ adAccountId: string;
15557
+ name: string;
15558
+ };
15559
+ path: {
15560
+ /**
15561
+ * Meta ads SocialAccount id (platform `metaads`).
15562
+ */
15563
+ accountId: string;
15564
+ };
15565
+ };
15566
+
15567
+ export type CreateTrackingTagResponse = ({
15568
+ platform?: 'metaads';
15569
+ tag?: TrackingTag;
15570
+ });
15571
+
15572
+ export type CreateTrackingTagError = (unknown | {
15573
+ error?: string;
15574
+ });
15575
+
15576
+ export type GetTrackingTagData = {
15577
+ path: {
15578
+ accountId: string;
15579
+ /**
15580
+ * Pixel id.
15581
+ */
15582
+ tagId: string;
15583
+ };
15584
+ };
15585
+
15586
+ export type GetTrackingTagResponse = ({
15587
+ platform?: 'metaads';
15588
+ tag?: TrackingTag;
15589
+ });
15590
+
15591
+ export type GetTrackingTagError = ({
15592
+ error?: string;
15593
+ } | unknown);
15594
+
15595
+ export type UpdateTrackingTagData = {
15596
+ body: {
15597
+ name?: string;
15598
+ /**
15599
+ * Meta Advanced Matching toggle (`enable_automatic_matching`).
15600
+ */
15601
+ enableAutomaticMatching?: boolean;
15602
+ /**
15603
+ * Which user fields Advanced Matching may collect. Meta's
15604
+ * terse codes: em=email, ph=phone, fn=first name, ln=last
15605
+ * name, ge=gender, db=date of birth, ct=city, st=state,
15606
+ * zp=zip.
15607
+ *
15608
+ */
15609
+ automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
15610
+ firstPartyCookieStatus?: 'empty' | 'first_party_cookie_disabled' | 'first_party_cookie_enabled';
15611
+ dataUseSetting?: 'advertising_and_analytics' | 'analytics_only' | 'empty';
15612
+ };
15613
+ path: {
15614
+ accountId: string;
15615
+ /**
15616
+ * Pixel id.
15617
+ */
15618
+ tagId: string;
15619
+ };
15620
+ };
15621
+
15622
+ export type UpdateTrackingTagResponse = ({
15623
+ platform?: 'metaads';
15624
+ tag?: TrackingTag;
15625
+ });
15626
+
15627
+ export type UpdateTrackingTagError = (unknown | {
15628
+ error?: string;
15629
+ });
15630
+
15631
+ export type ListTrackingTagSharedAccountsData = {
15632
+ path: {
15633
+ accountId: string;
15634
+ /**
15635
+ * Pixel id.
15636
+ */
15637
+ tagId: string;
15638
+ };
15639
+ };
15640
+
15641
+ export type ListTrackingTagSharedAccountsResponse = ({
15642
+ platform?: 'metaads';
15643
+ sharedAccounts?: Array<SharedAdAccount>;
15644
+ });
15645
+
15646
+ export type ListTrackingTagSharedAccountsError = ({
15647
+ error?: string;
15648
+ } | unknown);
15649
+
15650
+ export type AddTrackingTagSharedAccountData = {
15651
+ body: {
15652
+ /**
15653
+ * Ad account to share with, e.g. `act_123456789`.
15654
+ */
15655
+ adAccountId: string;
15656
+ };
15657
+ path: {
15658
+ accountId: string;
15659
+ /**
15660
+ * Pixel id.
15661
+ */
15662
+ tagId: string;
15663
+ };
15664
+ };
15665
+
15666
+ export type AddTrackingTagSharedAccountResponse = ({
15667
+ platform?: 'metaads';
15668
+ ok?: boolean;
15669
+ });
15670
+
15671
+ export type AddTrackingTagSharedAccountError = (unknown | {
15672
+ error?: string;
15673
+ });
15674
+
15675
+ export type RemoveTrackingTagSharedAccountData = {
15676
+ path: {
15677
+ accountId: string;
15678
+ /**
15679
+ * Pixel id.
15680
+ */
15681
+ tagId: string;
15682
+ };
15683
+ query?: {
15684
+ /**
15685
+ * Ad account to unshare, e.g. `act_123456789`. May also be sent in the JSON body.
15686
+ */
15687
+ adAccountId?: string;
15688
+ };
15689
+ };
15690
+
15691
+ export type RemoveTrackingTagSharedAccountResponse = (void);
15692
+
15693
+ export type RemoveTrackingTagSharedAccountError = (unknown | {
15694
+ error?: string;
15695
+ });
15696
+
15697
+ export type GetTrackingTagStatsData = {
15698
+ path: {
15699
+ accountId: string;
15700
+ /**
15701
+ * Pixel id.
15702
+ */
15703
+ tagId: string;
15704
+ };
15705
+ query?: {
15706
+ /**
15707
+ * Aggregation dimension. Defaults to `event`.
15708
+ */
15709
+ aggregation?: 'event' | 'host' | 'url' | 'url_by_rule' | 'pixel_fire' | 'device_type' | 'device_os' | 'browser_type' | 'had_pii' | 'custom_data_field' | 'match_keys' | 'event_source' | 'event_detection_method' | 'event_processing_results' | 'event_total_counts' | 'event_value_count';
15710
+ /**
15711
+ * Unix seconds upper bound.
15712
+ */
15713
+ endTime?: number;
15714
+ /**
15715
+ * Unix seconds lower bound.
15716
+ */
15717
+ startTime?: number;
15718
+ };
15719
+ };
15720
+
15721
+ export type GetTrackingTagStatsResponse = ({
15722
+ platform?: 'metaads';
15723
+ stats?: {
15724
+ aggregation?: string;
15725
+ startTime?: number;
15726
+ endTime?: number;
15727
+ rows?: Array<{
15728
+ [key: string]: unknown;
15729
+ }>;
15730
+ };
15731
+ });
15732
+
15733
+ export type GetTrackingTagStatsError = (unknown | {
15734
+ error?: string;
15388
15735
  });