@getlatedev/node 0.2.1468 → 0.2.1469

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.
@@ -1676,6 +1676,10 @@ export type AdRule = {
1676
1676
  */
1677
1677
  campaignIds: Array<(string)> | null;
1678
1678
  filters: AdRuleFilters;
1679
+ /**
1680
+ * Null when every matching run acts and notifies.
1681
+ */
1682
+ lifecycle: (AdRuleLifecycle | null);
1679
1683
  conditions: AdRuleConditions;
1680
1684
  actions: AdRuleActions;
1681
1685
  schedule: AdRuleSchedule;
@@ -1755,6 +1759,28 @@ export type AdRuleAction = {
1755
1759
  * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
1756
1760
  */
1757
1761
  maxChangesPerDay?: number;
1762
+ } | {
1763
+ /**
1764
+ * Move the bid cap or cost cap of a Meta ad set, in the ad account currency. Ad set rules on Meta only. An ad set without a cap is skipped with `no_bid_cap`.
1765
+ */
1766
+ type: 'adjust_bid';
1767
+ /**
1768
+ * The cap to set.
1769
+ */
1770
+ amount?: number;
1771
+ direction?: 'increase' | 'decrease';
1772
+ /**
1773
+ * Step size. A decrease is at most 90.
1774
+ */
1775
+ percent?: number;
1776
+ /**
1777
+ * The cap never goes above this on an increase, or below it on a decrease.
1778
+ */
1779
+ limit?: number;
1780
+ /**
1781
+ * At most this many objects changed in any 24 hours, across runs. Matches over the limit are skipped with `daily_limit_reached` and tried again later.
1782
+ */
1783
+ maxChangesPerDay?: number;
1758
1784
  } | {
1759
1785
  /**
1760
1786
  * Tag the object by its name. Meta, Google and LinkedIn campaigns and ad sets, and TikTok campaigns, ad groups and ads. An object whose name already has the tag (or lacks it, for `remove`) is skipped with `name_unchanged`.
@@ -1814,15 +1840,15 @@ export type AdRuleAction = {
1814
1840
  */
1815
1841
  export type type2 = 'notify';
1816
1842
 
1843
+ export type direction = 'increase' | 'decrease';
1844
+
1817
1845
  /**
1818
1846
  * Where `add` goes. Defaults to `start`.
1819
1847
  */
1820
1848
  export type at = 'start' | 'end';
1821
1849
 
1822
- export type direction = 'increase' | 'decrease';
1823
-
1824
1850
  /**
1825
- * Each type at most once, and at most one of `pause`, `activate`, `adjust_budget`, `duplicate` and `edit_name`.
1851
+ * Each type at most once, and at most one of `pause`, `activate`, `adjust_budget`, `adjust_bid`, `duplicate` and `edit_name`.
1826
1852
  */
1827
1853
  export type AdRuleActions = Array<AdRuleAction>;
1828
1854
 
@@ -1852,7 +1878,7 @@ export type AdRuleActivityEntry = {
1852
1878
  * Its name when the rule acted.
1853
1879
  */
1854
1880
  objectName: (string) | null;
1855
- type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate' | 'edit_name';
1881
+ type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
1856
1882
  status: 'done' | 'skipped' | 'failed';
1857
1883
  /**
1858
1884
  * Why it was skipped or failed, for example `already_paused`.
@@ -1868,12 +1894,20 @@ export type AdRuleActivityEntry = {
1868
1894
  * The name an applied `edit_name` set.
1869
1895
  */
1870
1896
  newName: (string) | null;
1897
+ /**
1898
+ * The bid cap or cost cap before an `adjust_bid`.
1899
+ */
1900
+ previousBidAmount: (number) | null;
1901
+ /**
1902
+ * The cap an applied `adjust_bid` set.
1903
+ */
1904
+ newBidAmount: (number) | null;
1871
1905
  currency: (string) | null;
1872
1906
  };
1873
1907
 
1874
1908
  export type level = 'campaign' | 'adset';
1875
1909
 
1876
- export type type3 = 'pause' | 'activate' | 'adjust_budget' | 'duplicate' | 'edit_name';
1910
+ export type type3 = 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
1877
1911
 
1878
1912
  export type status3 = 'done' | 'skipped' | 'failed';
1879
1913
 
@@ -1969,6 +2003,24 @@ export type AdRuleFilters = Array<{
1969
2003
  */
1970
2004
  export type AdRuleLevel = 'campaign' | 'adset' | 'ad';
1971
2005
 
2006
+ /**
2007
+ * Turns matches into alerts. An object acts and notifies only after `confirmChecks` matching runs in a row; its alert stays open while it matches or `hold` holds, turns critical when `critical` holds, and resolves on its own. Cooldown and caps still decide repeat actions.
2008
+ */
2009
+ export type AdRuleLifecycle = {
2010
+ /**
2011
+ * Matching runs in a row before acting. Defaults to 1.
2012
+ */
2013
+ confirmChecks?: number;
2014
+ /**
2015
+ * Keeps an open alert open after the conditions stop matching.
2016
+ */
2017
+ hold?: (AdRuleConditions);
2018
+ /**
2019
+ * Marks an open alert critical.
2020
+ */
2021
+ critical?: (AdRuleConditions);
2022
+ };
2023
+
1972
2024
  export type AdRuleObjectEvaluation = {
1973
2025
  /**
1974
2026
  * Platform ID of the campaign or ad set.
@@ -2026,7 +2078,7 @@ export type AdRuleRun = {
2026
2078
  matched?: Array<AdRuleObjectEvaluation>;
2027
2079
  actions?: Array<{
2028
2080
  objectId: string;
2029
- type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate' | 'edit_name';
2081
+ type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
2030
2082
  status: 'done' | 'skipped' | 'failed';
2031
2083
  /**
2032
2084
  * Why it was skipped or failed, for example `already_paused`.
@@ -2036,6 +2088,8 @@ export type AdRuleRun = {
2036
2088
  newDailyBudget?: number;
2037
2089
  previousName?: string;
2038
2090
  newName?: string;
2091
+ previousBidAmount?: number;
2092
+ newBidAmount?: number;
2039
2093
  }>;
2040
2094
  /**
2041
2095
  * Set when a run of a rule with a `notify` action matched objects and tried to send the webhook. A notify-only rule whose webhook fails ends with outcome `failed`.
@@ -16903,7 +16957,7 @@ export type Webhook = {
16903
16957
  /**
16904
16958
  * Events subscribed to
16905
16959
  */
16906
- 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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | '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' | 'review.deleted' | 'review.restored' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | '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' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted')>;
16960
+ 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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | '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' | 'review.deleted' | 'review.restored' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | 'automation.alert.opened' | 'automation.alert.escalated' | 'automation.alert.resolved' | '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' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted')>;
16907
16961
  /**
16908
16962
  * Whether webhook delivery is enabled
16909
16963
  */
@@ -17742,7 +17796,7 @@ export type WebhookPayloadAdRuleTriggered = {
17742
17796
  * What the rule did to the object. Empty on a rule that only notifies.
17743
17797
  */
17744
17798
  actions: Array<{
17745
- type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate' | 'edit_name';
17799
+ type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
17746
17800
  /**
17747
17801
  * Action result.
17748
17802
  *
@@ -17770,6 +17824,14 @@ export type WebhookPayloadAdRuleTriggered = {
17770
17824
  * On `edit_name`, the name after the change. Null when nothing changed.
17771
17825
  */
17772
17826
  newName: (string) | null;
17827
+ /**
17828
+ * On `adjust_bid`, the cap before the change. Null otherwise.
17829
+ */
17830
+ previousBidAmount: (number) | null;
17831
+ /**
17832
+ * On `adjust_bid`, the cap after the change. Null when nothing changed.
17833
+ */
17834
+ newBidAmount: (number) | null;
17773
17835
  }>;
17774
17836
  }>;
17775
17837
  /**
@@ -18129,6 +18191,56 @@ export type event16 = 'automation.action.applied' | 'automation.action.failed' |
18129
18191
 
18130
18192
  export type status54 = 'applied' | 'skipped' | 'failed' | 'unknown';
18131
18193
 
18194
+ /**
18195
+ * Webhook payload for `automation.alert.opened`, `automation.alert.escalated` and `automation.alert.resolved`: an alert episode of an automation with a lifecycle (an ad rule's `lifecycle`).
18196
+ *
18197
+ * Sent as soon as the check records the change; a resolve that a pause or reactivation causes is sent once it applies. A streak that never opened sends nothing. Alerts closed outside a check (the rule turned off, deleted or its `lifecycle` removed between checks, or the daily cleanup) are not announced.
18198
+ *
18199
+ */
18200
+ export type WebhookPayloadAutomationAlert = {
18201
+ /**
18202
+ * Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery.
18203
+ */
18204
+ id: string;
18205
+ profiles?: WebhookProfiles;
18206
+ /**
18207
+ * Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
18208
+ */
18209
+ test?: boolean;
18210
+ event: 'automation.alert.opened' | 'automation.alert.escalated' | 'automation.alert.resolved';
18211
+ automation: WebhookAutomationRef;
18212
+ /**
18213
+ * The connected account the automation acts on.
18214
+ */
18215
+ accountId: string;
18216
+ /**
18217
+ * The check that moved the alert.
18218
+ */
18219
+ checkId: string;
18220
+ alert: {
18221
+ id: string;
18222
+ /**
18223
+ * The platform's id of the object: an ad, ad set or campaign for ad rules.
18224
+ */
18225
+ subjectId: string;
18226
+ severity: ('warning' | 'critical') | null;
18227
+ /**
18228
+ * Why it resolved, on `automation.alert.resolved` only.
18229
+ */
18230
+ reason: ('condition_cleared' | 'action_applied' | 'not_evaluated' | 'automation_changed' | 'automation_off') | null;
18231
+ };
18232
+ timestamp: string;
18233
+ };
18234
+
18235
+ export type event17 = 'automation.alert.opened' | 'automation.alert.escalated' | 'automation.alert.resolved';
18236
+
18237
+ export type severity2 = 'warning' | 'critical';
18238
+
18239
+ /**
18240
+ * Why it resolved, on `automation.alert.resolved` only.
18241
+ */
18242
+ export type reason2 = 'condition_cleared' | 'action_applied' | 'not_evaluated' | 'automation_changed' | 'automation_off';
18243
+
18132
18244
  /**
18133
18245
  * Webhook payload for the `automation.check.completed` event: one scheduled check of an automation finished.
18134
18246
  *
@@ -18171,7 +18283,7 @@ export type WebhookPayloadAutomationCheckCompleted = {
18171
18283
  timestamp: string;
18172
18284
  };
18173
18285
 
18174
- export type event17 = 'automation.check.completed';
18286
+ export type event18 = 'automation.check.completed';
18175
18287
 
18176
18288
  export type outcome2 = 'triggered' | 'no_match' | 'cooldown' | 'daily_limit' | 'failed';
18177
18289
 
@@ -18200,7 +18312,7 @@ export type WebhookPayloadCalendarEvent = {
18200
18312
  timestamp: string;
18201
18313
  };
18202
18314
 
18203
- export type event18 = 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted';
18315
+ export type event19 = 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted';
18204
18316
 
18205
18317
  export type changeType = 'created' | 'updated' | 'deleted';
18206
18318
 
@@ -18283,7 +18395,7 @@ export type WebhookPayloadCallEnded = {
18283
18395
  timestamp: string;
18284
18396
  };
18285
18397
 
18286
- export type event19 = 'call.ended';
18398
+ export type event20 = 'call.ended';
18287
18399
 
18288
18400
  /**
18289
18401
  * Webhook payload for the `call.failed` event. Fired when a call
@@ -18322,7 +18434,7 @@ export type WebhookPayloadCallFailed = {
18322
18434
  timestamp: string;
18323
18435
  };
18324
18436
 
18325
- export type event20 = 'call.failed';
18437
+ export type event21 = 'call.failed';
18326
18438
 
18327
18439
  /**
18328
18440
  * Webhook payload for the `call.permission_request` event. Fires
@@ -18364,7 +18476,7 @@ export type WebhookPayloadCallPermissionRequest = {
18364
18476
  timestamp: string;
18365
18477
  };
18366
18478
 
18367
- export type event21 = 'call.permission_request';
18479
+ export type event22 = 'call.permission_request';
18368
18480
 
18369
18481
  export type response = 'accept' | 'reject';
18370
18482
 
@@ -18423,7 +18535,7 @@ export type WebhookPayloadCallReceived = {
18423
18535
  timestamp: string;
18424
18536
  };
18425
18537
 
18426
- export type event22 = 'call.received';
18538
+ export type event23 = 'call.received';
18427
18539
 
18428
18540
  /**
18429
18541
  * Webhook payload for the `campaign.budget.depleted` event. Fires when a campaign
@@ -18474,7 +18586,7 @@ export type WebhookPayloadCampaignBudgetDepleted = {
18474
18586
  timestamp: string;
18475
18587
  };
18476
18588
 
18477
- export type event23 = 'campaign.budget.depleted';
18589
+ export type event24 = 'campaign.budget.depleted';
18478
18590
 
18479
18591
  /**
18480
18592
  * Always `CAMPAIGN`.
@@ -18517,7 +18629,7 @@ export type WebhookPayloadCampaignParticipant = {
18517
18629
  timestamp: string;
18518
18630
  };
18519
18631
 
18520
- export type event24 = 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed';
18632
+ export type event25 = 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed';
18521
18633
 
18522
18634
  /**
18523
18635
  * Webhook payload for `campaign_payout.payable` and `campaign_payout.settled`.
@@ -18606,12 +18718,12 @@ export type WebhookPayloadCampaignPayout = {
18606
18718
  timestamp: string;
18607
18719
  };
18608
18720
 
18609
- export type event25 = 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed';
18721
+ export type event26 = 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed';
18610
18722
 
18611
18723
  /**
18612
18724
  * returned: Stripe refused the transfer. stale: it could not be confirmed with Stripe within 24 hours. reversed: Stripe reversed it after it was sent; the settlement is undone.
18613
18725
  */
18614
- export type reason2 = 'returned' | 'stale' | 'reversed';
18726
+ export type reason3 = 'returned' | 'stale' | 'reversed';
18615
18727
 
18616
18728
  /**
18617
18729
  * Webhook payload for campaign submission events:
@@ -18674,7 +18786,7 @@ export type WebhookPayloadCampaignSubmission = {
18674
18786
  timestamp: string;
18675
18787
  };
18676
18788
 
18677
- export type event26 = 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected';
18789
+ export type event27 = 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected';
18678
18790
 
18679
18791
  /**
18680
18792
  * 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.
@@ -18841,7 +18953,7 @@ export type WebhookPayloadComment = {
18841
18953
  timestamp: string;
18842
18954
  };
18843
18955
 
18844
- export type event27 = 'comment.received';
18956
+ export type event28 = 'comment.received';
18845
18957
 
18846
18958
  export type platform16 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
18847
18959
 
@@ -18887,7 +18999,7 @@ export type WebhookPayloadCommerceOrder = {
18887
18999
  };
18888
19000
  };
18889
19001
 
18890
- export type event28 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
19002
+ export type event29 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
18891
19003
 
18892
19004
  export type type21 = 'order';
18893
19005
 
@@ -18930,7 +19042,7 @@ export type WebhookPayloadCommerceProduct = {
18930
19042
  };
18931
19043
  };
18932
19044
 
18933
- export type event29 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
19045
+ export type event30 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
18934
19046
 
18935
19047
  export type type22 = 'product';
18936
19048
 
@@ -18959,7 +19071,7 @@ export type WebhookPayloadContact = {
18959
19071
  timestamp: string;
18960
19072
  };
18961
19073
 
18962
- export type event30 = 'contact.updated' | 'contact.deleted';
19074
+ export type event31 = 'contact.updated' | 'contact.deleted';
18963
19075
 
18964
19076
  export type changeType2 = 'updated' | 'deleted';
18965
19077
 
@@ -18999,7 +19111,7 @@ export type WebhookPayloadContactFieldChanged = {
18999
19111
  source: 'api' | 'workflow' | 'automation';
19000
19112
  };
19001
19113
 
19002
- export type event31 = 'contact.field_changed';
19114
+ export type event32 = 'contact.field_changed';
19003
19115
 
19004
19116
  /**
19005
19117
  * Who wrote the field: the API or dashboard, a workflow set_field node, or an automation.
@@ -19031,7 +19143,7 @@ export type WebhookPayloadContactTag = {
19031
19143
  source: 'api' | 'workflow' | 'automation';
19032
19144
  };
19033
19145
 
19034
- export type event32 = 'contact.tag_added' | 'contact.tag_removed';
19146
+ export type event33 = 'contact.tag_added' | 'contact.tag_removed';
19035
19147
 
19036
19148
  /**
19037
19149
  * Who answers a conversation changed under Meta's handover protocol. WhatsApp: Meta
@@ -19077,7 +19189,7 @@ export type WebhookPayloadConversationControlChanged = {
19077
19189
  timestamp: string;
19078
19190
  };
19079
19191
 
19080
- export type event33 = 'conversation.control_changed';
19192
+ export type event34 = 'conversation.control_changed';
19081
19193
 
19082
19194
  /**
19083
19195
  * Who answers now. ai_agent: Meta Business Agent (WhatsApp); app: you; other: another app (a WhatsApp partner, or a Messenger / Instagram receiver such as Page Inbox).
@@ -19126,7 +19238,7 @@ export type WebhookPayloadConversationStarted = {
19126
19238
  timestamp: string;
19127
19239
  };
19128
19240
 
19129
- export type event34 = 'conversation.started';
19241
+ export type event35 = 'conversation.started';
19130
19242
 
19131
19243
  /**
19132
19244
  * Webhook payload for `creator_campaign.budget_exhausted` and `creator_campaign.closed`.
@@ -19165,7 +19277,7 @@ export type WebhookPayloadCreatorCampaign = {
19165
19277
  timestamp: string;
19166
19278
  };
19167
19279
 
19168
- export type event35 = 'creator_campaign.budget_exhausted' | 'creator_campaign.closed';
19280
+ export type event36 = 'creator_campaign.budget_exhausted' | 'creator_campaign.closed';
19169
19281
 
19170
19282
  /**
19171
19283
  * Webhook payload for post.external.created / post.external.updated /
@@ -19202,7 +19314,7 @@ export type WebhookPayloadExternalPost = {
19202
19314
  timestamp: string;
19203
19315
  };
19204
19316
 
19205
- export type event36 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
19317
+ export type event37 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
19206
19318
 
19207
19319
  /**
19208
19320
  * Webhook payload for file.created, file.updated and file.deleted. Carries the provider file id and the change only; read the file with `GET /v1/files/{id}`.
@@ -19229,7 +19341,7 @@ export type WebhookPayloadFile = {
19229
19341
  timestamp: string;
19230
19342
  };
19231
19343
 
19232
- export type event37 = 'file.created' | 'file.updated' | 'file.deleted';
19344
+ export type event38 = 'file.created' | 'file.updated' | 'file.deleted';
19233
19345
 
19234
19346
  /**
19235
19347
  * Webhook payload for file.picked: the user picked files on a hosted picker page (`POST /v1/files/picker-sessions`), so the app may now open them. Every id was checked against Drive before the event fired.
@@ -19264,7 +19376,7 @@ export type WebhookPayloadFilePicked = {
19264
19376
  timestamp: string;
19265
19377
  };
19266
19378
 
19267
- export type event38 = 'file.picked';
19379
+ export type event39 = 'file.picked';
19268
19380
 
19269
19381
  /**
19270
19382
  * Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
@@ -19344,7 +19456,7 @@ export type WebhookPayloadLead = {
19344
19456
  timestamp: string;
19345
19457
  };
19346
19458
 
19347
- export type event39 = 'lead.received';
19459
+ export type event40 = 'lead.received';
19348
19460
 
19349
19461
  export type platform17 = 'facebook';
19350
19462
 
@@ -19924,7 +20036,7 @@ export type WebhookPayloadMessage = {
19924
20036
  timestamp: string;
19925
20037
  };
19926
20038
 
19927
- export type event40 = 'message.received';
20039
+ export type event41 = 'message.received';
19928
20040
 
19929
20041
  /**
19930
20042
  * Which Zernio surface produced the message. Always present and
@@ -19983,7 +20095,7 @@ export type WebhookPayloadMessageDeleted = {
19983
20095
  timestamp: string;
19984
20096
  };
19985
20097
 
19986
- export type event41 = 'message.deleted';
20098
+ export type event42 = 'message.deleted';
19987
20099
 
19988
20100
  /**
19989
20101
  * Shared payload for message.delivered, message.read, message.played and message.failed events. Fires when the platform reports a new delivery state for an outgoing message.
@@ -20047,7 +20159,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
20047
20159
  timestamp: string;
20048
20160
  };
20049
20161
 
20050
- export type event42 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
20162
+ export type event43 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
20051
20163
 
20052
20164
  /**
20053
20165
  * Webhook payload for message.edited events. Fires when the sender
@@ -20090,7 +20202,7 @@ export type WebhookPayloadMessageEdited = {
20090
20202
  timestamp: string;
20091
20203
  };
20092
20204
 
20093
- export type event43 = 'message.edited';
20205
+ export type event44 = 'message.edited';
20094
20206
 
20095
20207
  /**
20096
20208
  * Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
@@ -20336,7 +20448,7 @@ export type WebhookPayloadMessageSent = {
20336
20448
  timestamp: string;
20337
20449
  };
20338
20450
 
20339
- export type event44 = 'message.sent';
20451
+ export type event45 = 'message.sent';
20340
20452
 
20341
20453
  /**
20342
20454
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
@@ -20401,7 +20513,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
20401
20513
  timestamp: string;
20402
20514
  };
20403
20515
 
20404
- export type event45 = 'phone_number.stock_available';
20516
+ export type event46 = 'phone_number.stock_available';
20405
20517
 
20406
20518
  /**
20407
20519
  * Webhook payload for post events
@@ -20456,7 +20568,7 @@ export type WebhookPayloadPost = {
20456
20568
  timestamp: string;
20457
20569
  };
20458
20570
 
20459
- export type event46 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
20571
+ export type event47 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
20460
20572
 
20461
20573
  /**
20462
20574
  * Webhook payload for `post.authenticity_changed`. Fired when a tracked post's
@@ -20520,7 +20632,7 @@ export type WebhookPayloadPostAuthenticityChanged = {
20520
20632
  timestamp: string;
20521
20633
  };
20522
20634
 
20523
- export type event47 = 'post.authenticity_changed';
20635
+ export type event48 = 'post.authenticity_changed';
20524
20636
 
20525
20637
  /**
20526
20638
  * Webhook payload for these per-platform events:
@@ -20636,7 +20748,7 @@ export type WebhookPayloadPostPlatform = {
20636
20748
  timestamp: string;
20637
20749
  };
20638
20750
 
20639
- export type event48 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
20751
+ export type event49 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
20640
20752
 
20641
20753
  /**
20642
20754
  * Terminal status this event fires on. Matches the event suffix.
@@ -20709,7 +20821,7 @@ export type WebhookPayloadPostTrackingCompleted = {
20709
20821
  timestamp: string;
20710
20822
  };
20711
20823
 
20712
- export type event49 = 'post.tracking_completed';
20824
+ export type event50 = 'post.tracking_completed';
20713
20825
 
20714
20826
  export type completionReason2 = 'final_read' | 'unreachable' | 'post_deleted';
20715
20827
 
@@ -20771,7 +20883,7 @@ export type WebhookPayloadReaction = {
20771
20883
  timestamp: string;
20772
20884
  };
20773
20885
 
20774
- export type event50 = 'reaction.received';
20886
+ export type event51 = 'reaction.received';
20775
20887
 
20776
20888
  export type action = 'added' | 'removed';
20777
20889
 
@@ -20850,7 +20962,7 @@ export type WebhookPayloadReferral = {
20850
20962
  timestamp: string;
20851
20963
  };
20852
20964
 
20853
- export type event51 = 'referral.received';
20965
+ export type event52 = 'referral.received';
20854
20966
 
20855
20967
  /**
20856
20968
  * Webhook payload for the review.deleted event.
@@ -20908,7 +21020,7 @@ export type WebhookPayloadReviewDeleted = {
20908
21020
  timestamp: string;
20909
21021
  };
20910
21022
 
20911
- export type event52 = 'review.deleted';
21023
+ export type event53 = 'review.deleted';
20912
21024
 
20913
21025
  /**
20914
21026
  * Webhook payload for the review.new event (new review posted on a connected account).
@@ -20940,7 +21052,7 @@ export type WebhookPayloadReviewNew = {
20940
21052
  timestamp: string;
20941
21053
  };
20942
21054
 
20943
- export type event53 = 'review.new';
21055
+ export type event54 = 'review.new';
20944
21056
 
20945
21057
  /**
20946
21058
  * Webhook payload for the review.restored event. Same shape as review.new.
@@ -20975,7 +21087,7 @@ export type WebhookPayloadReviewRestored = {
20975
21087
  timestamp: string;
20976
21088
  };
20977
21089
 
20978
- export type event54 = 'review.restored';
21090
+ export type event55 = 'review.restored';
20979
21091
 
20980
21092
  /**
20981
21093
  * Webhook payload for the review.updated event. Same shape as review.new.
@@ -21023,7 +21135,7 @@ export type WebhookPayloadReviewUpdated = {
21023
21135
  timestamp: string;
21024
21136
  };
21025
21137
 
21026
- export type event55 = 'review.updated';
21138
+ export type event56 = 'review.updated';
21027
21139
 
21028
21140
  export type WebhookPayloadSequenceEnrollment = {
21029
21141
  /**
@@ -21056,7 +21168,7 @@ export type WebhookPayloadSequenceEnrollment = {
21056
21168
  exitReason?: 'completed' | 'replied' | 'manual' | 'failed' | 'unsubscribed';
21057
21169
  };
21058
21170
 
21059
- export type event56 = 'sequence.enrolled' | 'sequence.exited';
21171
+ export type event57 = 'sequence.enrolled' | 'sequence.exited';
21060
21172
 
21061
21173
  /**
21062
21174
  * sequence.exited only. completed: the last step was sent; replied: the contact replied and the sequence exits on reply; manual: unenrolled through the API; failed: the step kept failing to send; unsubscribed: the contact opted out.
@@ -21077,7 +21189,7 @@ export type WebhookPayloadSupportRun = {
21077
21189
  run: SupportRun;
21078
21190
  };
21079
21191
 
21080
- export type event57 = 'support.run.completed' | 'support.run.failed';
21192
+ export type event58 = 'support.run.completed' | 'support.run.failed';
21081
21193
 
21082
21194
  /**
21083
21195
  * Webhook payload for test deliveries
@@ -21098,7 +21210,7 @@ export type WebhookPayloadTest = {
21098
21210
  timestamp: string;
21099
21211
  };
21100
21212
 
21101
- export type event58 = 'webhook.test';
21213
+ export type event59 = 'webhook.test';
21102
21214
 
21103
21215
  /**
21104
21216
  * Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
@@ -21150,7 +21262,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
21150
21262
  timestamp: string;
21151
21263
  };
21152
21264
 
21153
- export type event59 = 'whatsapp.account.alert_received';
21265
+ export type event60 = 'whatsapp.account.alert_received';
21154
21266
 
21155
21267
  export type platform19 = 'whatsapp';
21156
21268
 
@@ -21202,7 +21314,7 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
21202
21314
  timestamp: string;
21203
21315
  };
21204
21316
 
21205
- export type event60 = 'whatsapp.account.name_status_updated';
21317
+ export type event61 = 'whatsapp.account.name_status_updated';
21206
21318
 
21207
21319
  /**
21208
21320
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
@@ -21260,7 +21372,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
21260
21372
  timestamp: string;
21261
21373
  };
21262
21374
 
21263
- export type event61 = 'whatsapp.account.quality_updated';
21375
+ export type event62 = 'whatsapp.account.quality_updated';
21264
21376
 
21265
21377
  /**
21266
21378
  * The Meta webhook field that reported the change.
@@ -21336,7 +21448,7 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
21336
21448
  timestamp: string;
21337
21449
  };
21338
21450
 
21339
- export type event62 = 'whatsapp.account.status_updated';
21451
+ export type event63 = 'whatsapp.account.status_updated';
21340
21452
 
21341
21453
  /**
21342
21454
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
@@ -21393,12 +21505,12 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
21393
21505
  timestamp: string;
21394
21506
  };
21395
21507
 
21396
- export type event63 = 'whatsapp.contact.identity_changed';
21508
+ export type event64 = 'whatsapp.contact.identity_changed';
21397
21509
 
21398
21510
  /**
21399
21511
  * Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
21400
21512
  */
21401
- export type reason3 = 'user_changed_number' | 'user_changed_user_id' | 'user_identity_changed' | 'user_id_update';
21513
+ export type reason4 = 'user_changed_number' | 'user_changed_user_id' | 'user_identity_changed' | 'user_id_update';
21402
21514
 
21403
21515
  /**
21404
21516
  * Webhook payload for the `whatsapp.template.category_updated` event.
@@ -21467,7 +21579,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
21467
21579
  timestamp: string;
21468
21580
  };
21469
21581
 
21470
- export type event64 = 'whatsapp.template.category_updated';
21582
+ export type event65 = 'whatsapp.template.category_updated';
21471
21583
 
21472
21584
  /**
21473
21585
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -21549,7 +21661,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
21549
21661
  timestamp: string;
21550
21662
  };
21551
21663
 
21552
- export type event65 = 'whatsapp.template.status_updated';
21664
+ export type event66 = 'whatsapp.template.status_updated';
21553
21665
 
21554
21666
  /**
21555
21667
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -21616,7 +21728,7 @@ export type WebhookPayloadWorkflowRun = {
21616
21728
  error?: string;
21617
21729
  };
21618
21730
 
21619
- export type event66 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
21731
+ export type event67 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
21620
21732
 
21621
21733
  /**
21622
21734
  * running on workflow.run.started; completed or exited (ended on purpose before the last node, e.g. a handoff) on workflow.run.completed; failed on workflow.run.failed.
@@ -35750,7 +35862,7 @@ export type CreateWebhookSettingsData = {
35750
35862
  /**
35751
35863
  * Events to subscribe to (at least one required)
35752
35864
  */
35753
- 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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | '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' | 'review.deleted' | 'review.restored' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | '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' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed')>;
35865
+ 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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | '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' | 'review.deleted' | 'review.restored' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | 'automation.alert.opened' | 'automation.alert.escalated' | 'automation.alert.resolved' | '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' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed')>;
35754
35866
  /**
35755
35867
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
35756
35868
  */
@@ -35822,7 +35934,7 @@ export type UpdateWebhookSettingsData = {
35822
35934
  /**
35823
35935
  * Events to subscribe to. Must contain at least one event if provided.
35824
35936
  */
35825
- 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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | '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' | 'review.deleted' | 'review.restored' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | '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' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed')>;
35937
+ 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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | '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' | 'review.deleted' | 'review.restored' | 'lead.received' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | 'automation.alert.opened' | 'automation.alert.escalated' | 'automation.alert.resolved' | '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' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed')>;
35826
35938
  /**
35827
35939
  * Enable or disable webhook delivery
35828
35940
  */
@@ -36011,7 +36123,7 @@ export type TestWebhookData = {
36011
36123
  /**
36012
36124
  * Send a sample payload of this event instead of `webhook.test`. The sample is marked with `test: true`.
36013
36125
  */
36014
- event?: '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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'review.deleted' | 'review.restored' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | 'lead.received' | '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.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | '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' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'api.changelog.published';
36126
+ event?: '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.permissions_changed' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'account.rate_limited' | 'calendar.event.created' | 'calendar.event.updated' | 'calendar.event.deleted' | 'file.created' | 'file.updated' | 'file.deleted' | 'file.picked' | 'contact.updated' | 'contact.deleted' | 'analytics.synced' | 'post.tracking_completed' | 'post.authenticity_changed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'conversation.started' | 'conversation.control_changed' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed' | 'support.run.completed' | 'support.run.failed' | 'campaign_submission.received' | 'campaign_submission.flagged' | 'campaign_submission.pending_review' | 'campaign_submission.approved' | 'campaign_submission.rejected' | 'creator_campaign.budget_exhausted' | 'creator_campaign.closed' | 'campaign_payout.payable' | 'campaign_payout.settled' | 'campaign_payout.failed' | 'campaign_participant.joined' | 'campaign_participant.suspended' | 'campaign_participant.removed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'comment.received' | 'review.new' | 'review.updated' | 'review.deleted' | 'review.restored' | 'ad.status_changed' | 'ad.review.approved' | 'ad.review.rejected' | 'ad.delivery_issue' | 'campaign.budget.depleted' | 'ad_account.status_changed' | 'ad.video.processed' | 'ad_rule.triggered' | 'automation.check.completed' | 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown' | 'automation.alert.opened' | 'automation.alert.escalated' | 'automation.alert.resolved' | 'lead.received' | '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.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.automatic_event' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | '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' | 'verification.approved' | 'verification.failed' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded' | 'api.changelog.published';
36015
36127
  };
36016
36128
  };
36017
36129
 
@@ -51260,6 +51372,7 @@ export type CreateAdRuleData = {
51260
51372
  */
51261
51373
  campaignIds?: Array<(string)>;
51262
51374
  filters?: AdRuleFilters;
51375
+ lifecycle?: AdRuleLifecycle;
51263
51376
  conditions: AdRuleConditions;
51264
51377
  actions: AdRuleActions;
51265
51378
  /**
@@ -51320,7 +51433,7 @@ export type ListAdRuleActivityData = {
51320
51433
  * ISO 8601 date-time, inclusive.
51321
51434
  */
51322
51435
  to?: string;
51323
- type?: 'pause' | 'activate' | 'adjust_budget' | 'duplicate' | 'edit_name';
51436
+ type?: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
51324
51437
  };
51325
51438
  };
51326
51439
 
@@ -51376,6 +51489,10 @@ export type UpdateAdRuleData = {
51376
51489
  level?: AdRuleLevel;
51377
51490
  campaignIds?: Array<(string)> | null;
51378
51491
  filters?: AdRuleFilters;
51492
+ /**
51493
+ * Null removes it; every matching run then acts and notifies again.
51494
+ */
51495
+ lifecycle?: (AdRuleLifecycle | null);
51379
51496
  conditions?: AdRuleConditions;
51380
51497
  actions?: AdRuleActions;
51381
51498
  schedule?: AdRuleSchedule;
@@ -51421,6 +51538,40 @@ export type PreviewAdRuleError = (ErrorResponse | {
51421
51538
  error?: string;
51422
51539
  });
51423
51540
 
51541
+ export type ListAdRuleAlertsData = {
51542
+ path: {
51543
+ ruleId: string;
51544
+ };
51545
+ query?: {
51546
+ /**
51547
+ * `nextCursor` from the previous page.
51548
+ */
51549
+ cursor?: string;
51550
+ limit?: number;
51551
+ state?: 'pending' | 'open' | 'resolved';
51552
+ };
51553
+ };
51554
+
51555
+ export type ListAdRuleAlertsResponse = ({
51556
+ alerts: Array<{
51557
+ id: string;
51558
+ /**
51559
+ * Platform campaign, ad set or ad ID.
51560
+ */
51561
+ objectId: string;
51562
+ state: 'pending' | 'open' | 'resolved';
51563
+ severity: ('warning' | 'critical') | null;
51564
+ consecutiveMatches: number;
51565
+ openedAt: (string) | null;
51566
+ lastMatchedAt: string;
51567
+ resolvedAt: (string) | null;
51568
+ resolvedReason: ('condition_cleared' | 'action_applied' | 'not_evaluated' | 'automation_changed' | 'automation_off') | null;
51569
+ }>;
51570
+ nextCursor: (string) | null;
51571
+ });
51572
+
51573
+ export type ListAdRuleAlertsError = (ErrorResponse);
51574
+
51424
51575
  export type ListAdRuleRunsData = {
51425
51576
  path: {
51426
51577
  ruleId: string;