@getlatedev/node 0.2.1088 → 0.2.1090

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.
@@ -4118,7 +4118,7 @@ export type CtwaAdRequestBody = {
4118
4118
  */
4119
4119
  url?: string;
4120
4120
  /**
4121
- * Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
4121
+ * Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`. Meta: a video still processing is waited on for up to 30 s, then answered 409 `invalid_resource_state` (poll GET /v1/ads/videos/{videoId}).
4122
4122
  */
4123
4123
  id?: string;
4124
4124
  /**
@@ -4217,7 +4217,7 @@ export type CtwaAdRequestBody = {
4217
4217
  */
4218
4218
  url?: string;
4219
4219
  /**
4220
- * Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
4220
+ * Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`. Meta: a video still processing is waited on for up to 30 s, then answered 409 `invalid_resource_state` (poll GET /v1/ads/videos/{videoId}).
4221
4221
  */
4222
4222
  id?: string;
4223
4223
  /**
@@ -11479,7 +11479,7 @@ export type Webhook = {
11479
11479
  /**
11480
11480
  * Events subscribed to
11481
11481
  */
11482
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
11482
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
11483
11483
  /**
11484
11484
  * Whether webhook delivery is enabled
11485
11485
  */
@@ -12010,6 +12010,72 @@ export type event6 = 'ad.status_changed';
12010
12010
  */
12011
12011
  export type level2 = 'CAMPAIGN' | 'AD_SET' | 'AD';
12012
12012
 
12013
+ /**
12014
+ * Webhook payload for the `ad.video.processed` event. Fires once per
12015
+ * `POST /v1/ads/videos` call made with `async: true`, when Meta finishes
12016
+ * processing the video (Meta only).
12017
+ *
12018
+ */
12019
+ export type WebhookPayloadAdVideoProcessed = {
12020
+ /**
12021
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery.
12022
+ */
12023
+ id: string;
12024
+ event: 'ad.video.processed';
12025
+ /**
12026
+ * The connected ads account the video was uploaded with.
12027
+ */
12028
+ account: {
12029
+ /**
12030
+ * Internal Zernio account ID.
12031
+ */
12032
+ accountId: string;
12033
+ /**
12034
+ * Internal Zernio profile ID this account belongs to.
12035
+ */
12036
+ profileId: string;
12037
+ /**
12038
+ * Ads connection platform. Currently always `metaads`.
12039
+ */
12040
+ platform: string;
12041
+ username: string;
12042
+ displayName?: (string) | null;
12043
+ };
12044
+ video: {
12045
+ /**
12046
+ * Meta video id, as returned by the 202 upload response.
12047
+ */
12048
+ id: string;
12049
+ /**
12050
+ * Meta ad account id (act_<n>) the video was uploaded to.
12051
+ */
12052
+ platformAdAccountId: string;
12053
+ /**
12054
+ * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
12055
+ */
12056
+ status: 'ready' | 'error';
12057
+ /**
12058
+ * Meta's processing error when status is `error`, otherwise null.
12059
+ */
12060
+ error: (string) | null;
12061
+ /**
12062
+ * Meta's auto-generated poster when status is `ready` and Meta produced one, otherwise null.
12063
+ */
12064
+ thumbnailUrl: (string) | null;
12065
+ };
12066
+ /**
12067
+ * UTC time at which Zernio generated this event.
12068
+ */
12069
+ timestamp: string;
12070
+ };
12071
+
12072
+ export type event7 = 'ad.video.processed';
12073
+
12074
+ /**
12075
+ * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
12076
+ */
12077
+ export type status32 = 'ready' | 'error';
12078
+
12013
12079
  /**
12014
12080
  * Webhook payload for `analytics.synced`. Fired once per connected account each
12015
12081
  * time its analytics sync cycle completes successfully. Poll-driven (roughly
@@ -12081,7 +12147,7 @@ export type WebhookPayloadAnalyticsSynced = {
12081
12147
  timestamp: string;
12082
12148
  };
12083
12149
 
12084
- export type event7 = 'analytics.synced';
12150
+ export type event8 = 'analytics.synced';
12085
12151
 
12086
12152
  export type WebhookPayloadApiChangelogPublished = {
12087
12153
  /**
@@ -12096,7 +12162,7 @@ export type WebhookPayloadApiChangelogPublished = {
12096
12162
  timestamp: string;
12097
12163
  };
12098
12164
 
12099
- export type event8 = 'api.changelog.published';
12165
+ export type event9 = 'api.changelog.published';
12100
12166
 
12101
12167
  /**
12102
12168
  * Webhook payload for the `call.ended` event. Fires on call hangup
@@ -12166,7 +12232,7 @@ export type WebhookPayloadCallEnded = {
12166
12232
  timestamp: string;
12167
12233
  };
12168
12234
 
12169
- export type event9 = 'call.ended';
12235
+ export type event10 = 'call.ended';
12170
12236
 
12171
12237
  /**
12172
12238
  * Webhook payload for the `call.failed` event. Fired when a call
@@ -12200,7 +12266,7 @@ export type WebhookPayloadCallFailed = {
12200
12266
  timestamp: string;
12201
12267
  };
12202
12268
 
12203
- export type event10 = 'call.failed';
12269
+ export type event11 = 'call.failed';
12204
12270
 
12205
12271
  /**
12206
12272
  * Webhook payload for the `call.permission_request` event. Fires
@@ -12237,7 +12303,7 @@ export type WebhookPayloadCallPermissionRequest = {
12237
12303
  timestamp: string;
12238
12304
  };
12239
12305
 
12240
- export type event11 = 'call.permission_request';
12306
+ export type event12 = 'call.permission_request';
12241
12307
 
12242
12308
  export type response = 'accept' | 'reject';
12243
12309
 
@@ -12291,7 +12357,7 @@ export type WebhookPayloadCallReceived = {
12291
12357
  timestamp: string;
12292
12358
  };
12293
12359
 
12294
- export type event12 = 'call.received';
12360
+ export type event13 = 'call.received';
12295
12361
 
12296
12362
  /**
12297
12363
  * Webhook payload for comment received events (Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Reddit, TikTok). X/Twitter does NOT fire this event. TikTok events carry only the author id: the comment.update webhook has no username, picture or owner flag.
@@ -12447,7 +12513,7 @@ export type WebhookPayloadComment = {
12447
12513
  timestamp: string;
12448
12514
  };
12449
12515
 
12450
- export type event13 = 'comment.received';
12516
+ export type event14 = 'comment.received';
12451
12517
 
12452
12518
  export type platform13 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
12453
12519
 
@@ -12486,7 +12552,7 @@ export type WebhookPayloadCommerceProduct = {
12486
12552
  };
12487
12553
  };
12488
12554
 
12489
- export type event14 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
12555
+ export type event15 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
12490
12556
 
12491
12557
  export type type16 = 'product';
12492
12558
 
@@ -12524,7 +12590,7 @@ export type WebhookPayloadConversationControlChanged = {
12524
12590
  timestamp: string;
12525
12591
  };
12526
12592
 
12527
- export type event15 = 'conversation.control_changed';
12593
+ export type event16 = 'conversation.control_changed';
12528
12594
 
12529
12595
  /**
12530
12596
  * Who answers now. ai_agent: Meta Business Agent; app: you; other: another partner app on the number.
@@ -12561,7 +12627,7 @@ export type WebhookPayloadConversationStarted = {
12561
12627
  timestamp: string;
12562
12628
  };
12563
12629
 
12564
- export type event16 = 'conversation.started';
12630
+ export type event17 = 'conversation.started';
12565
12631
 
12566
12632
  /**
12567
12633
  * Webhook payload for post.external.created / post.external.updated /
@@ -12593,7 +12659,7 @@ export type WebhookPayloadExternalPost = {
12593
12659
  timestamp: string;
12594
12660
  };
12595
12661
 
12596
- export type event17 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
12662
+ export type event18 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
12597
12663
 
12598
12664
  /**
12599
12665
  * Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
@@ -12664,7 +12730,7 @@ export type WebhookPayloadLead = {
12664
12730
  timestamp: string;
12665
12731
  };
12666
12732
 
12667
- export type event18 = 'lead.received';
12733
+ export type event19 = 'lead.received';
12668
12734
 
12669
12735
  export type platform14 = 'facebook';
12670
12736
 
@@ -13223,7 +13289,7 @@ export type WebhookPayloadMessage = {
13223
13289
  timestamp: string;
13224
13290
  };
13225
13291
 
13226
- export type event19 = 'message.received';
13292
+ export type event20 = 'message.received';
13227
13293
 
13228
13294
  /**
13229
13295
  * Which Zernio surface produced the message. Always present and
@@ -13284,7 +13350,7 @@ export type WebhookPayloadMessageDeleted = {
13284
13350
  timestamp: string;
13285
13351
  };
13286
13352
 
13287
- export type event20 = 'message.deleted';
13353
+ export type event21 = 'message.deleted';
13288
13354
 
13289
13355
  /**
13290
13356
  * Shared payload for message.delivered, message.read, message.played and
@@ -13347,7 +13413,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
13347
13413
  timestamp: string;
13348
13414
  };
13349
13415
 
13350
- export type event21 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
13416
+ export type event22 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
13351
13417
 
13352
13418
  /**
13353
13419
  * Webhook payload for message.edited events. Fires when the sender
@@ -13385,7 +13451,7 @@ export type WebhookPayloadMessageEdited = {
13385
13451
  timestamp: string;
13386
13452
  };
13387
13453
 
13388
- export type event22 = 'message.edited';
13454
+ export type event23 = 'message.edited';
13389
13455
 
13390
13456
  /**
13391
13457
  * Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
@@ -13603,7 +13669,7 @@ export type WebhookPayloadMessageSent = {
13603
13669
  timestamp: string;
13604
13670
  };
13605
13671
 
13606
- export type event23 = 'message.sent';
13672
+ export type event24 = 'message.sent';
13607
13673
 
13608
13674
  /**
13609
13675
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
@@ -13657,7 +13723,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
13657
13723
  timestamp: string;
13658
13724
  };
13659
13725
 
13660
- export type event24 = 'phone_number.stock_available';
13726
+ export type event25 = 'phone_number.stock_available';
13661
13727
 
13662
13728
  /**
13663
13729
  * Webhook payload for post events
@@ -13707,7 +13773,7 @@ export type WebhookPayloadPost = {
13707
13773
  timestamp: string;
13708
13774
  };
13709
13775
 
13710
- export type event25 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
13776
+ export type event26 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
13711
13777
 
13712
13778
  /**
13713
13779
  * Webhook payload for the per-platform terminal events
@@ -13826,12 +13892,12 @@ export type WebhookPayloadPostPlatform = {
13826
13892
  timestamp: string;
13827
13893
  };
13828
13894
 
13829
- export type event26 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
13895
+ export type event27 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
13830
13896
 
13831
13897
  /**
13832
13898
  * Terminal status this event fires on. Matches the event suffix.
13833
13899
  */
13834
- export type status32 = 'published' | 'failed' | 'deleted';
13900
+ export type status33 = 'published' | 'failed' | 'deleted';
13835
13901
 
13836
13902
  /**
13837
13903
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
@@ -13886,7 +13952,7 @@ export type WebhookPayloadReaction = {
13886
13952
  timestamp: string;
13887
13953
  };
13888
13954
 
13889
- export type event27 = 'reaction.received';
13955
+ export type event28 = 'reaction.received';
13890
13956
 
13891
13957
  export type action = 'added' | 'removed';
13892
13958
 
@@ -13960,7 +14026,7 @@ export type WebhookPayloadReferral = {
13960
14026
  timestamp: string;
13961
14027
  };
13962
14028
 
13963
- export type event28 = 'referral.received';
14029
+ export type event29 = 'referral.received';
13964
14030
 
13965
14031
  /**
13966
14032
  * Webhook payload for the review.new event (new review posted on a connected account).
@@ -13987,7 +14053,7 @@ export type WebhookPayloadReviewNew = {
13987
14053
  timestamp: string;
13988
14054
  };
13989
14055
 
13990
- export type event29 = 'review.new';
14056
+ export type event30 = 'review.new';
13991
14057
 
13992
14058
  /**
13993
14059
  * Webhook payload for the review.updated event. Fired when the reviewer edits their
@@ -14020,7 +14086,7 @@ export type WebhookPayloadReviewUpdated = {
14020
14086
  timestamp: string;
14021
14087
  };
14022
14088
 
14023
- export type event30 = 'review.updated';
14089
+ export type event31 = 'review.updated';
14024
14090
 
14025
14091
  /**
14026
14092
  * Webhook payload for test deliveries
@@ -14041,7 +14107,7 @@ export type WebhookPayloadTest = {
14041
14107
  timestamp: string;
14042
14108
  };
14043
14109
 
14044
- export type event31 = 'webhook.test';
14110
+ export type event32 = 'webhook.test';
14045
14111
 
14046
14112
  /**
14047
14113
  * Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
@@ -14088,7 +14154,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
14088
14154
  timestamp: string;
14089
14155
  };
14090
14156
 
14091
- export type event32 = 'whatsapp.account.alert_received';
14157
+ export type event33 = 'whatsapp.account.alert_received';
14092
14158
 
14093
14159
  export type platform16 = 'whatsapp';
14094
14160
 
@@ -14139,12 +14205,12 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
14139
14205
  timestamp: string;
14140
14206
  };
14141
14207
 
14142
- export type event33 = 'whatsapp.account.name_status_updated';
14208
+ export type event34 = 'whatsapp.account.name_status_updated';
14143
14209
 
14144
14210
  /**
14145
14211
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
14146
14212
  */
14147
- export type status33 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
14213
+ export type status34 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
14148
14214
 
14149
14215
  /**
14150
14216
  * Webhook payload for `whatsapp.account.quality_updated`. Fired when a connected
@@ -14192,7 +14258,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
14192
14258
  timestamp: string;
14193
14259
  };
14194
14260
 
14195
- export type event34 = 'whatsapp.account.quality_updated';
14261
+ export type event35 = 'whatsapp.account.quality_updated';
14196
14262
 
14197
14263
  /**
14198
14264
  * The Meta webhook field that reported the change.
@@ -14263,12 +14329,12 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
14263
14329
  timestamp: string;
14264
14330
  };
14265
14331
 
14266
- export type event35 = 'whatsapp.account.status_updated';
14332
+ export type event36 = 'whatsapp.account.status_updated';
14267
14333
 
14268
14334
  /**
14269
14335
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
14270
14336
  */
14271
- export type status34 = 'restricted' | 'active';
14337
+ export type status35 = 'restricted' | 'active';
14272
14338
 
14273
14339
  /**
14274
14340
  * Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
@@ -14315,7 +14381,7 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
14315
14381
  timestamp: string;
14316
14382
  };
14317
14383
 
14318
- export type event36 = 'whatsapp.contact.identity_changed';
14384
+ export type event37 = 'whatsapp.contact.identity_changed';
14319
14385
 
14320
14386
  /**
14321
14387
  * Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
@@ -14384,7 +14450,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
14384
14450
  timestamp: string;
14385
14451
  };
14386
14452
 
14387
- export type event37 = 'whatsapp.template.category_updated';
14453
+ export type event38 = 'whatsapp.template.category_updated';
14388
14454
 
14389
14455
  /**
14390
14456
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -14461,7 +14527,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
14461
14527
  timestamp: string;
14462
14528
  };
14463
14529
 
14464
- export type event38 = 'whatsapp.template.status_updated';
14530
+ export type event39 = 'whatsapp.template.status_updated';
14465
14531
 
14466
14532
  /**
14467
14533
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -14469,7 +14535,7 @@ export type event38 = 'whatsapp.template.status_updated';
14469
14535
  * request before the template is actually removed.
14470
14536
  *
14471
14537
  */
14472
- export type status35 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
14538
+ export type status36 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
14473
14539
 
14474
14540
  /**
14475
14541
  * WhatsApp only. Meta's `conversation` object from the status webhook (the billing
@@ -14840,7 +14906,7 @@ export type WorkflowExecutionEvent = {
14840
14906
 
14841
14907
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
14842
14908
 
14843
- export type status36 = 'success' | 'failed' | 'pending';
14909
+ export type status37 = 'success' | 'failed' | 'pending';
14844
14910
 
14845
14911
  /**
14846
14912
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -25276,7 +25342,7 @@ export type CreateWebhookSettingsData = {
25276
25342
  /**
25277
25343
  * Events to subscribe to (at least one required)
25278
25344
  */
25279
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
25345
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
25280
25346
  /**
25281
25347
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
25282
25348
  */
@@ -25342,7 +25408,7 @@ export type UpdateWebhookSettingsData = {
25342
25408
  /**
25343
25409
  * Events to subscribe to. Must contain at least one event if provided.
25344
25410
  */
25345
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
25411
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
25346
25412
  /**
25347
25413
  * Enable or disable webhook delivery
25348
25414
  */
@@ -39977,6 +40043,10 @@ export type ListAdSetsData = {
39977
40043
  * Account ID
39978
40044
  */
39979
40045
  accountId?: string;
40046
+ /**
40047
+ * Platform ad account id (Meta act_<n>). Lists every synced ad set of that ad account; no campaignId needed.
40048
+ */
40049
+ adAccountId?: string;
39980
40050
  /**
39981
40051
  * Platform ad set ID
39982
40052
  */
@@ -40035,12 +40105,14 @@ export type ListAdSetsResponse = ({
40035
40105
  endDate?: string;
40036
40106
  } | null;
40037
40107
  /**
40038
- * The audience this ad set delivers to, as the platform reports it. LinkedIn only
40039
- * today; null for every other platform and for LinkedIn ad sets not yet re-synced.
40108
+ * The audience this ad set delivers to, as the platform reports it at the last sync.
40109
+ * LinkedIn and Meta; null for every other platform and for ad sets not yet re-synced.
40040
40110
  *
40041
- * `include` and `exclude` are the campaign's `targetingCriteria` verbatim, so they
40042
- * can be read, edited and sent back without reconstructing them from our normalized
40043
- * targeting spec. Exclusions were previously not readable at all.
40111
+ * On Meta it is the ad set's `targeting` verbatim (snake_case: geo_locations,
40112
+ * age_min, custom_audiences, flexible_spec, ...), so it can be read, edited and sent
40113
+ * back as is. On LinkedIn `include` and `exclude` (below) are the campaign's
40114
+ * `targetingCriteria` verbatim, without reconstructing them from our normalized
40115
+ * targeting spec.
40044
40116
  *
40045
40117
  */
40046
40118
  targeting?: {
@@ -40064,6 +40136,7 @@ export type ListAdSetsResponse = ({
40064
40136
  * Whether the campaign may deliver on the LinkedIn Audience Network, off LinkedIn itself.
40065
40137
  */
40066
40138
  offsiteDeliveryEnabled?: boolean;
40139
+ [key: string]: unknown | boolean;
40067
40140
  } | null;
40068
40141
  isExternal?: (boolean) | null;
40069
40142
  platformCreatedAt?: (string) | null;
@@ -40072,13 +40145,27 @@ export type ListAdSetsResponse = ({
40072
40145
  */
40073
40146
  statusReadAt?: (string) | null;
40074
40147
  /**
40075
- * TikTok only, only with `live=true` and only on rows read live. The ad group's `optimization_goal` exactly as TikTok's adgroup/get returns it now (for example ENGAGED_VIEW, ENGAGED_VIEW_FIFTEEN, CLICK, CONVERT). Absent on rows not read live and on other platforms.
40148
+ * The ad set's optimization goal as last synced, in the platform's own enum (Meta `optimization_goal`, for example OFFSITE_CONVERSIONS or LINK_CLICKS). On TikTok with `live=true`, rows read live carry the ad group's `optimization_goal` exactly as TikTok's adgroup/get returns it now (for example ENGAGED_VIEW, ENGAGED_VIEW_FIFTEEN, CLICK, CONVERT).
40076
40149
  */
40077
40150
  optimizationGoal?: (string) | null;
40078
40151
  /**
40079
- * TikTok only, only with `live=true` and only on rows read live. The ad group's `billing_event` exactly as TikTok's adgroup/get returns it now (for example CPV, CPC, OCPM).
40152
+ * The ad set's billing event as last synced, where the platform reports one. On TikTok with `live=true`, rows read live carry the ad group's `billing_event` exactly as TikTok's adgroup/get returns it now (for example CPV, CPC, OCPM).
40080
40153
  */
40081
40154
  billingEvent?: (string) | null;
40155
+ /**
40156
+ * The bid strategy as last synced, in the platform's own enum (Meta `bid_strategy`, for example LOWEST_COST_WITHOUT_CAP, COST_CAP). On Meta under a campaign budget this is the campaign's strategy.
40157
+ */
40158
+ bidStrategy?: (string) | null;
40159
+ /**
40160
+ * Bid cap or cost target in whole units of `currency`, as last synced. Null when the strategy has none.
40161
+ */
40162
+ bidAmount?: (number) | null;
40163
+ /**
40164
+ * Meta only. The ad set's `promoted_object` verbatim (snake_case, for example pixel_id + custom_event_type, page_id, application_id), as last synced from its most recent ad. Null on other platforms and on an ad set with no ad yet; GET /v1/ads/accounts/live reads it live for every ad set.
40165
+ */
40166
+ promotedObject?: {
40167
+ [key: string]: unknown;
40168
+ } | null;
40082
40169
  /**
40083
40170
  * TikTok only, only with `live=true` and only on rows read live. TikTok's adgroup/get record verbatim (snake_case, TikTok's own names and enums): operation_status, optimization_goal, optimization_event, billing_event, bid_type, bid_price, budget, budget_mode, pacing, schedule_type, schedule_start_time, schedule_end_time, dayparting, placement_type, placements, location_ids, age_groups, gender, languages, interest_category_ids, interest_keyword_ids, actions, audience_ids, excluded_audience_ids, operating_systems, frequency, frequency_schedule, smart_audience_enabled, smart_interest_behavior_enabled. schedule_start_time and schedule_end_time are UTC wall clocks (YYYY-MM-DD HH:MM:SS). location_ids holds TikTok's native location ids (GeoNames ids for countries); GET /v1/ads/targeting/search?dimension=geo returns them as `platformId` on country results. Plus advertiser_currency and advertiser_timezone from TikTok's advertiser/info. A field TikTok does not return is absent.
40084
40171
  */
@@ -44400,6 +44487,184 @@ export type GetAdAccountFinanceResponse = ({
44400
44487
 
44401
44488
  export type GetAdAccountFinanceError = (unknown | ErrorResponse);
44402
44489
 
44490
+ export type GetAdAccountLiveEntitiesData = {
44491
+ query: {
44492
+ /**
44493
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
44494
+ */
44495
+ accountId: string;
44496
+ /**
44497
+ * Meta ad account id (act_<n>).
44498
+ */
44499
+ adAccountId: string;
44500
+ /**
44501
+ * Cursor from `paging.campaigns.after` or `paging.adSets.after` of a previous response. Requires `level`.
44502
+ */
44503
+ after?: string;
44504
+ /**
44505
+ * Read only one level. Required with `after`. Both levels are read when omitted.
44506
+ */
44507
+ level?: 'campaign' | 'adSet';
44508
+ /**
44509
+ * Maximum rows per level in this response.
44510
+ */
44511
+ limit?: number;
44512
+ /**
44513
+ * Comma-separated Meta `effective_status` values to keep: ACTIVE, PAUSED, IN_PROCESS,
44514
+ * WITH_ISSUES, DELETED, ARCHIVED, and CAMPAIGN_PAUSED (ad sets only; the campaigns level
44515
+ * ignores it). Defaults to every status except DELETED and ARCHIVED. An unknown value is a 400.
44516
+ */
44517
+ status?: string;
44518
+ };
44519
+ };
44520
+
44521
+ export type GetAdAccountLiveEntitiesResponse = ({
44522
+ accountId?: string;
44523
+ adAccountId?: string;
44524
+ platform?: 'facebook';
44525
+ /**
44526
+ * ISO 4217 code every budget and bid amount is expressed in.
44527
+ */
44528
+ currency?: string;
44529
+ /**
44530
+ * When Meta was read.
44531
+ */
44532
+ readAt?: string;
44533
+ /**
44534
+ * Absent when `level=adSet`.
44535
+ */
44536
+ campaigns?: Array<{
44537
+ platformCampaignId?: string;
44538
+ campaignName?: (string) | null;
44539
+ /**
44540
+ * Meta `effective_status`, for example ACTIVE, PAUSED, WITH_ISSUES.
44541
+ */
44542
+ platformCampaignStatus?: (string) | null;
44543
+ /**
44544
+ * Meta `status`: the campaign's own switch (ACTIVE, PAUSED, DELETED, ARCHIVED).
44545
+ */
44546
+ configuredStatus?: (string) | null;
44547
+ /**
44548
+ * Zernio's normalized status (active, paused, ...), derived from `platformCampaignStatus`.
44549
+ */
44550
+ status?: string;
44551
+ /**
44552
+ * The campaign budget, same shape as the synced rows. Null when the budget lives on the ad sets.
44553
+ */
44554
+ budget?: {
44555
+ amount?: number;
44556
+ type?: 'daily' | 'lifetime';
44557
+ } | null;
44558
+ /**
44559
+ * Meta `daily_budget` in whole units of `currency`.
44560
+ */
44561
+ dailyBudget?: (number) | null;
44562
+ /**
44563
+ * Meta `lifetime_budget` in whole units of `currency`.
44564
+ */
44565
+ lifetimeBudget?: (number) | null;
44566
+ /**
44567
+ * Meta `budget_remaining` in whole units of `currency`. Null when the campaign has no budget of its own.
44568
+ */
44569
+ budgetRemaining?: (number) | null;
44570
+ /**
44571
+ * Campaign spending limit (Meta `spend_cap`) in whole units of `currency`. Null when none is set.
44572
+ */
44573
+ spendCap?: (number) | null;
44574
+ /**
44575
+ * Meta `bid_strategy`, set on campaigns with a campaign budget.
44576
+ */
44577
+ bidStrategy?: (string) | null;
44578
+ }>;
44579
+ /**
44580
+ * Absent when `level=campaign`.
44581
+ */
44582
+ adSets?: Array<{
44583
+ platformAdSetId?: string;
44584
+ adSetName?: (string) | null;
44585
+ platformCampaignId?: (string) | null;
44586
+ /**
44587
+ * Meta `effective_status`, for example ACTIVE, PAUSED, CAMPAIGN_PAUSED.
44588
+ */
44589
+ platformAdSetStatus?: (string) | null;
44590
+ /**
44591
+ * Meta `status`: the ad set's own switch.
44592
+ */
44593
+ configuredStatus?: (string) | null;
44594
+ /**
44595
+ * Zernio's normalized status, derived from `platformAdSetStatus`.
44596
+ */
44597
+ status?: string;
44598
+ /**
44599
+ * The ad set budget, same shape as the synced rows. Null under a campaign budget.
44600
+ */
44601
+ budget?: {
44602
+ amount?: number;
44603
+ type?: 'daily' | 'lifetime';
44604
+ } | null;
44605
+ /**
44606
+ * Meta `daily_budget` in whole units of `currency`.
44607
+ */
44608
+ dailyBudget?: (number) | null;
44609
+ /**
44610
+ * Meta `lifetime_budget` in whole units of `currency`.
44611
+ */
44612
+ lifetimeBudget?: (number) | null;
44613
+ /**
44614
+ * Meta `budget_remaining` in whole units of `currency`. Null when the ad set has no budget of its own.
44615
+ */
44616
+ budgetRemaining?: (number) | null;
44617
+ /**
44618
+ * Meta `bid_strategy`.
44619
+ */
44620
+ bidStrategy?: (string) | null;
44621
+ /**
44622
+ * Meta `bid_amount` (bid cap or cost target) in whole units of `currency`. Null when the strategy has none.
44623
+ */
44624
+ bidAmount?: (number) | null;
44625
+ /**
44626
+ * Meta `optimization_goal`.
44627
+ */
44628
+ optimizationGoal?: (string) | null;
44629
+ /**
44630
+ * Meta `billing_event`.
44631
+ */
44632
+ billingEvent?: (string) | null;
44633
+ /**
44634
+ * Meta `promoted_object` verbatim (snake_case).
44635
+ */
44636
+ promotedObject?: {
44637
+ [key: string]: unknown;
44638
+ } | null;
44639
+ /**
44640
+ * Meta `targeting` verbatim (snake_case), as Meta returns it now.
44641
+ */
44642
+ targeting?: {
44643
+ [key: string]: unknown;
44644
+ } | null;
44645
+ schedule?: {
44646
+ startDate?: string;
44647
+ /**
44648
+ * Absent when the ad set runs until it is stopped.
44649
+ */
44650
+ endDate?: string;
44651
+ } | null;
44652
+ }>;
44653
+ /**
44654
+ * One entry per level read. `after` is null on the last page.
44655
+ */
44656
+ paging?: {
44657
+ campaigns?: {
44658
+ after?: (string) | null;
44659
+ };
44660
+ adSets?: {
44661
+ after?: (string) | null;
44662
+ };
44663
+ };
44664
+ });
44665
+
44666
+ export type GetAdAccountLiveEntitiesError = (ErrorResponse | unknown);
44667
+
44403
44668
  export type CreateAdAccountData = {
44404
44669
  body: {
44405
44670
  /**
@@ -47144,6 +47409,10 @@ export type UploadAdVideoData = {
47144
47409
  * Optional filename shown alongside the upload session. Applied only when uploading via videoBase64.
47145
47410
  */
47146
47411
  filename?: string;
47412
+ /**
47413
+ * true: answer 202 once Meta accepts the upload instead of waiting for processing. Poll GET /v1/ads/videos/{videoId} or subscribe to ad.video.processed.
47414
+ */
47415
+ async?: boolean;
47147
47416
  };
47148
47417
  };
47149
47418
 
@@ -47154,11 +47423,25 @@ export type UploadAdVideoResponse = ({
47154
47423
  * Meta video id, reusable as video.id on POST /v1/ads/create and inside POST /v1/ads/preview creativeSpec.
47155
47424
  */
47156
47425
  id?: string;
47426
+ status?: 'ready';
47157
47427
  /**
47158
47428
  * Meta-hosted poster URL if available; null when Meta has not produced a poster yet.
47159
47429
  */
47160
47430
  thumbnailUrl?: (string) | null;
47161
47431
  };
47432
+ } | {
47433
+ adAccountId?: string;
47434
+ video?: {
47435
+ /**
47436
+ * Meta video id. Usable as video.id once GET /v1/ads/videos/{videoId} reports ready.
47437
+ */
47438
+ id?: string;
47439
+ status?: 'processing';
47440
+ /**
47441
+ * Always null on 202; read it from GET /v1/ads/videos/{videoId} once ready.
47442
+ */
47443
+ thumbnailUrl?: (string) | null;
47444
+ };
47162
47445
  });
47163
47446
 
47164
47447
  export type UploadAdVideoError = (unknown | ErrorResponse);
@@ -47203,6 +47486,51 @@ export type ListAdVideosResponse = ({
47203
47486
 
47204
47487
  export type ListAdVideosError = (ErrorResponse | unknown);
47205
47488
 
47489
+ export type GetAdVideoStatusData = {
47490
+ path: {
47491
+ /**
47492
+ * Meta ad video id (numeric).
47493
+ */
47494
+ videoId: string;
47495
+ };
47496
+ query: {
47497
+ /**
47498
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
47499
+ */
47500
+ accountId: string;
47501
+ /**
47502
+ * Meta ad account id (act_<n>) the video was uploaded to.
47503
+ */
47504
+ adAccountId: string;
47505
+ };
47506
+ };
47507
+
47508
+ export type GetAdVideoStatusResponse = ({
47509
+ adAccountId?: string;
47510
+ video?: {
47511
+ id: string;
47512
+ status: 'processing' | 'ready' | 'error';
47513
+ /**
47514
+ * Meta's raw status.video_status, forwarded verbatim.
47515
+ */
47516
+ platformStatus: (string) | null;
47517
+ /**
47518
+ * Meta's processing percentage when reported.
47519
+ */
47520
+ processingProgress: (number) | null;
47521
+ /**
47522
+ * Meta's processing error when status is error.
47523
+ */
47524
+ error: (string) | null;
47525
+ /**
47526
+ * Meta's auto-generated poster once ready, when Meta produced one.
47527
+ */
47528
+ thumbnailUrl: (string) | null;
47529
+ };
47530
+ });
47531
+
47532
+ export type GetAdVideoStatusError = (ErrorResponse | unknown);
47533
+
47206
47534
  export type DeleteAdVideoData = {
47207
47535
  path: {
47208
47536
  /**