@getlatedev/node 0.2.1088 → 0.2.1089

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
  */
@@ -47144,6 +47210,10 @@ export type UploadAdVideoData = {
47144
47210
  * Optional filename shown alongside the upload session. Applied only when uploading via videoBase64.
47145
47211
  */
47146
47212
  filename?: string;
47213
+ /**
47214
+ * 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.
47215
+ */
47216
+ async?: boolean;
47147
47217
  };
47148
47218
  };
47149
47219
 
@@ -47154,11 +47224,25 @@ export type UploadAdVideoResponse = ({
47154
47224
  * Meta video id, reusable as video.id on POST /v1/ads/create and inside POST /v1/ads/preview creativeSpec.
47155
47225
  */
47156
47226
  id?: string;
47227
+ status?: 'ready';
47157
47228
  /**
47158
47229
  * Meta-hosted poster URL if available; null when Meta has not produced a poster yet.
47159
47230
  */
47160
47231
  thumbnailUrl?: (string) | null;
47161
47232
  };
47233
+ } | {
47234
+ adAccountId?: string;
47235
+ video?: {
47236
+ /**
47237
+ * Meta video id. Usable as video.id once GET /v1/ads/videos/{videoId} reports ready.
47238
+ */
47239
+ id?: string;
47240
+ status?: 'processing';
47241
+ /**
47242
+ * Always null on 202; read it from GET /v1/ads/videos/{videoId} once ready.
47243
+ */
47244
+ thumbnailUrl?: (string) | null;
47245
+ };
47162
47246
  });
47163
47247
 
47164
47248
  export type UploadAdVideoError = (unknown | ErrorResponse);
@@ -47203,6 +47287,51 @@ export type ListAdVideosResponse = ({
47203
47287
 
47204
47288
  export type ListAdVideosError = (ErrorResponse | unknown);
47205
47289
 
47290
+ export type GetAdVideoStatusData = {
47291
+ path: {
47292
+ /**
47293
+ * Meta ad video id (numeric).
47294
+ */
47295
+ videoId: string;
47296
+ };
47297
+ query: {
47298
+ /**
47299
+ * Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
47300
+ */
47301
+ accountId: string;
47302
+ /**
47303
+ * Meta ad account id (act_<n>) the video was uploaded to.
47304
+ */
47305
+ adAccountId: string;
47306
+ };
47307
+ };
47308
+
47309
+ export type GetAdVideoStatusResponse = ({
47310
+ adAccountId?: string;
47311
+ video?: {
47312
+ id: string;
47313
+ status: 'processing' | 'ready' | 'error';
47314
+ /**
47315
+ * Meta's raw status.video_status, forwarded verbatim.
47316
+ */
47317
+ platformStatus: (string) | null;
47318
+ /**
47319
+ * Meta's processing percentage when reported.
47320
+ */
47321
+ processingProgress: (number) | null;
47322
+ /**
47323
+ * Meta's processing error when status is error.
47324
+ */
47325
+ error: (string) | null;
47326
+ /**
47327
+ * Meta's auto-generated poster once ready, when Meta produced one.
47328
+ */
47329
+ thumbnailUrl: (string) | null;
47330
+ };
47331
+ });
47332
+
47333
+ export type GetAdVideoStatusError = (ErrorResponse | unknown);
47334
+
47206
47335
  export type DeleteAdVideoData = {
47207
47336
  path: {
47208
47337
  /**