@getlatedev/node 0.2.1467 → 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,49 @@ 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;
1784
+ } | {
1785
+ /**
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`.
1787
+ */
1788
+ type: 'edit_name';
1789
+ /**
1790
+ * Text to add, like `[WINNER]`. Compared without case.
1791
+ */
1792
+ add?: string;
1793
+ /**
1794
+ * Where `add` goes. Defaults to `start`.
1795
+ */
1796
+ at?: 'start' | 'end';
1797
+ /**
1798
+ * Text to take out of the name, every copy of it.
1799
+ */
1800
+ remove?: string;
1801
+ /**
1802
+ * 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.
1803
+ */
1804
+ maxChangesPerDay?: number;
1758
1805
  } | {
1759
1806
  /**
1760
1807
  * Set the daily budget to an exact amount, such as a reset every midnight. Same level rules as the percent change.
@@ -1796,7 +1843,12 @@ export type type2 = 'notify';
1796
1843
  export type direction = 'increase' | 'decrease';
1797
1844
 
1798
1845
  /**
1799
- * Each type at most once, and at most one of `pause`, `activate`, `adjust_budget` and `duplicate`.
1846
+ * Where `add` goes. Defaults to `start`.
1847
+ */
1848
+ export type at = 'start' | 'end';
1849
+
1850
+ /**
1851
+ * Each type at most once, and at most one of `pause`, `activate`, `adjust_budget`, `adjust_bid`, `duplicate` and `edit_name`.
1800
1852
  */
1801
1853
  export type AdRuleActions = Array<AdRuleAction>;
1802
1854
 
@@ -1826,7 +1878,7 @@ export type AdRuleActivityEntry = {
1826
1878
  * Its name when the rule acted.
1827
1879
  */
1828
1880
  objectName: (string) | null;
1829
- type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
1881
+ type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
1830
1882
  status: 'done' | 'skipped' | 'failed';
1831
1883
  /**
1832
1884
  * Why it was skipped or failed, for example `already_paused`.
@@ -1834,12 +1886,28 @@ export type AdRuleActivityEntry = {
1834
1886
  reason: (string) | null;
1835
1887
  previousDailyBudget: (number) | null;
1836
1888
  newDailyBudget: (number) | null;
1889
+ /**
1890
+ * The name before an `edit_name`.
1891
+ */
1892
+ previousName: (string) | null;
1893
+ /**
1894
+ * The name an applied `edit_name` set.
1895
+ */
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;
1837
1905
  currency: (string) | null;
1838
1906
  };
1839
1907
 
1840
1908
  export type level = 'campaign' | 'adset';
1841
1909
 
1842
- export type type3 = 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
1910
+ export type type3 = 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
1843
1911
 
1844
1912
  export type status3 = 'done' | 'skipped' | 'failed';
1845
1913
 
@@ -1935,6 +2003,24 @@ export type AdRuleFilters = Array<{
1935
2003
  */
1936
2004
  export type AdRuleLevel = 'campaign' | 'adset' | 'ad';
1937
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
+
1938
2024
  export type AdRuleObjectEvaluation = {
1939
2025
  /**
1940
2026
  * Platform ID of the campaign or ad set.
@@ -1992,7 +2078,7 @@ export type AdRuleRun = {
1992
2078
  matched?: Array<AdRuleObjectEvaluation>;
1993
2079
  actions?: Array<{
1994
2080
  objectId: string;
1995
- type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
2081
+ type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
1996
2082
  status: 'done' | 'skipped' | 'failed';
1997
2083
  /**
1998
2084
  * Why it was skipped or failed, for example `already_paused`.
@@ -2000,6 +2086,10 @@ export type AdRuleRun = {
2000
2086
  reason?: string;
2001
2087
  previousDailyBudget?: number;
2002
2088
  newDailyBudget?: number;
2089
+ previousName?: string;
2090
+ newName?: string;
2091
+ previousBidAmount?: number;
2092
+ newBidAmount?: number;
2003
2093
  }>;
2004
2094
  /**
2005
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`.
@@ -16867,7 +16957,7 @@ export type Webhook = {
16867
16957
  /**
16868
16958
  * Events subscribed to
16869
16959
  */
16870
- 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')>;
16871
16961
  /**
16872
16962
  * Whether webhook delivery is enabled
16873
16963
  */
@@ -17706,7 +17796,7 @@ export type WebhookPayloadAdRuleTriggered = {
17706
17796
  * What the rule did to the object. Empty on a rule that only notifies.
17707
17797
  */
17708
17798
  actions: Array<{
17709
- type: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
17799
+ type: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
17710
17800
  /**
17711
17801
  * Action result.
17712
17802
  *
@@ -17726,6 +17816,22 @@ export type WebhookPayloadAdRuleTriggered = {
17726
17816
  * On `adjust_budget`, the daily budget after the change. Null when nothing changed.
17727
17817
  */
17728
17818
  newDailyBudget: (number) | null;
17819
+ /**
17820
+ * On `edit_name`, the object's name before the change. Null otherwise.
17821
+ */
17822
+ previousName: (string) | null;
17823
+ /**
17824
+ * On `edit_name`, the name after the change. Null when nothing changed.
17825
+ */
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;
17729
17835
  }>;
17730
17836
  }>;
17731
17837
  /**
@@ -18085,6 +18191,56 @@ export type event16 = 'automation.action.applied' | 'automation.action.failed' |
18085
18191
 
18086
18192
  export type status54 = 'applied' | 'skipped' | 'failed' | 'unknown';
18087
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
+
18088
18244
  /**
18089
18245
  * Webhook payload for the `automation.check.completed` event: one scheduled check of an automation finished.
18090
18246
  *
@@ -18127,7 +18283,7 @@ export type WebhookPayloadAutomationCheckCompleted = {
18127
18283
  timestamp: string;
18128
18284
  };
18129
18285
 
18130
- export type event17 = 'automation.check.completed';
18286
+ export type event18 = 'automation.check.completed';
18131
18287
 
18132
18288
  export type outcome2 = 'triggered' | 'no_match' | 'cooldown' | 'daily_limit' | 'failed';
18133
18289
 
@@ -18156,7 +18312,7 @@ export type WebhookPayloadCalendarEvent = {
18156
18312
  timestamp: string;
18157
18313
  };
18158
18314
 
18159
- 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';
18160
18316
 
18161
18317
  export type changeType = 'created' | 'updated' | 'deleted';
18162
18318
 
@@ -18239,7 +18395,7 @@ export type WebhookPayloadCallEnded = {
18239
18395
  timestamp: string;
18240
18396
  };
18241
18397
 
18242
- export type event19 = 'call.ended';
18398
+ export type event20 = 'call.ended';
18243
18399
 
18244
18400
  /**
18245
18401
  * Webhook payload for the `call.failed` event. Fired when a call
@@ -18278,7 +18434,7 @@ export type WebhookPayloadCallFailed = {
18278
18434
  timestamp: string;
18279
18435
  };
18280
18436
 
18281
- export type event20 = 'call.failed';
18437
+ export type event21 = 'call.failed';
18282
18438
 
18283
18439
  /**
18284
18440
  * Webhook payload for the `call.permission_request` event. Fires
@@ -18320,7 +18476,7 @@ export type WebhookPayloadCallPermissionRequest = {
18320
18476
  timestamp: string;
18321
18477
  };
18322
18478
 
18323
- export type event21 = 'call.permission_request';
18479
+ export type event22 = 'call.permission_request';
18324
18480
 
18325
18481
  export type response = 'accept' | 'reject';
18326
18482
 
@@ -18379,7 +18535,7 @@ export type WebhookPayloadCallReceived = {
18379
18535
  timestamp: string;
18380
18536
  };
18381
18537
 
18382
- export type event22 = 'call.received';
18538
+ export type event23 = 'call.received';
18383
18539
 
18384
18540
  /**
18385
18541
  * Webhook payload for the `campaign.budget.depleted` event. Fires when a campaign
@@ -18430,7 +18586,7 @@ export type WebhookPayloadCampaignBudgetDepleted = {
18430
18586
  timestamp: string;
18431
18587
  };
18432
18588
 
18433
- export type event23 = 'campaign.budget.depleted';
18589
+ export type event24 = 'campaign.budget.depleted';
18434
18590
 
18435
18591
  /**
18436
18592
  * Always `CAMPAIGN`.
@@ -18473,7 +18629,7 @@ export type WebhookPayloadCampaignParticipant = {
18473
18629
  timestamp: string;
18474
18630
  };
18475
18631
 
18476
- 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';
18477
18633
 
18478
18634
  /**
18479
18635
  * Webhook payload for `campaign_payout.payable` and `campaign_payout.settled`.
@@ -18562,12 +18718,12 @@ export type WebhookPayloadCampaignPayout = {
18562
18718
  timestamp: string;
18563
18719
  };
18564
18720
 
18565
- 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';
18566
18722
 
18567
18723
  /**
18568
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.
18569
18725
  */
18570
- export type reason2 = 'returned' | 'stale' | 'reversed';
18726
+ export type reason3 = 'returned' | 'stale' | 'reversed';
18571
18727
 
18572
18728
  /**
18573
18729
  * Webhook payload for campaign submission events:
@@ -18630,7 +18786,7 @@ export type WebhookPayloadCampaignSubmission = {
18630
18786
  timestamp: string;
18631
18787
  };
18632
18788
 
18633
- 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';
18634
18790
 
18635
18791
  /**
18636
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.
@@ -18797,7 +18953,7 @@ export type WebhookPayloadComment = {
18797
18953
  timestamp: string;
18798
18954
  };
18799
18955
 
18800
- export type event27 = 'comment.received';
18956
+ export type event28 = 'comment.received';
18801
18957
 
18802
18958
  export type platform16 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
18803
18959
 
@@ -18843,7 +18999,7 @@ export type WebhookPayloadCommerceOrder = {
18843
18999
  };
18844
19000
  };
18845
19001
 
18846
- 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';
18847
19003
 
18848
19004
  export type type21 = 'order';
18849
19005
 
@@ -18886,7 +19042,7 @@ export type WebhookPayloadCommerceProduct = {
18886
19042
  };
18887
19043
  };
18888
19044
 
18889
- 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';
18890
19046
 
18891
19047
  export type type22 = 'product';
18892
19048
 
@@ -18915,7 +19071,7 @@ export type WebhookPayloadContact = {
18915
19071
  timestamp: string;
18916
19072
  };
18917
19073
 
18918
- export type event30 = 'contact.updated' | 'contact.deleted';
19074
+ export type event31 = 'contact.updated' | 'contact.deleted';
18919
19075
 
18920
19076
  export type changeType2 = 'updated' | 'deleted';
18921
19077
 
@@ -18955,7 +19111,7 @@ export type WebhookPayloadContactFieldChanged = {
18955
19111
  source: 'api' | 'workflow' | 'automation';
18956
19112
  };
18957
19113
 
18958
- export type event31 = 'contact.field_changed';
19114
+ export type event32 = 'contact.field_changed';
18959
19115
 
18960
19116
  /**
18961
19117
  * Who wrote the field: the API or dashboard, a workflow set_field node, or an automation.
@@ -18987,7 +19143,7 @@ export type WebhookPayloadContactTag = {
18987
19143
  source: 'api' | 'workflow' | 'automation';
18988
19144
  };
18989
19145
 
18990
- export type event32 = 'contact.tag_added' | 'contact.tag_removed';
19146
+ export type event33 = 'contact.tag_added' | 'contact.tag_removed';
18991
19147
 
18992
19148
  /**
18993
19149
  * Who answers a conversation changed under Meta's handover protocol. WhatsApp: Meta
@@ -19033,7 +19189,7 @@ export type WebhookPayloadConversationControlChanged = {
19033
19189
  timestamp: string;
19034
19190
  };
19035
19191
 
19036
- export type event33 = 'conversation.control_changed';
19192
+ export type event34 = 'conversation.control_changed';
19037
19193
 
19038
19194
  /**
19039
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).
@@ -19082,7 +19238,7 @@ export type WebhookPayloadConversationStarted = {
19082
19238
  timestamp: string;
19083
19239
  };
19084
19240
 
19085
- export type event34 = 'conversation.started';
19241
+ export type event35 = 'conversation.started';
19086
19242
 
19087
19243
  /**
19088
19244
  * Webhook payload for `creator_campaign.budget_exhausted` and `creator_campaign.closed`.
@@ -19121,7 +19277,7 @@ export type WebhookPayloadCreatorCampaign = {
19121
19277
  timestamp: string;
19122
19278
  };
19123
19279
 
19124
- export type event35 = 'creator_campaign.budget_exhausted' | 'creator_campaign.closed';
19280
+ export type event36 = 'creator_campaign.budget_exhausted' | 'creator_campaign.closed';
19125
19281
 
19126
19282
  /**
19127
19283
  * Webhook payload for post.external.created / post.external.updated /
@@ -19158,7 +19314,7 @@ export type WebhookPayloadExternalPost = {
19158
19314
  timestamp: string;
19159
19315
  };
19160
19316
 
19161
- 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';
19162
19318
 
19163
19319
  /**
19164
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}`.
@@ -19185,7 +19341,7 @@ export type WebhookPayloadFile = {
19185
19341
  timestamp: string;
19186
19342
  };
19187
19343
 
19188
- export type event37 = 'file.created' | 'file.updated' | 'file.deleted';
19344
+ export type event38 = 'file.created' | 'file.updated' | 'file.deleted';
19189
19345
 
19190
19346
  /**
19191
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.
@@ -19220,7 +19376,7 @@ export type WebhookPayloadFilePicked = {
19220
19376
  timestamp: string;
19221
19377
  };
19222
19378
 
19223
- export type event38 = 'file.picked';
19379
+ export type event39 = 'file.picked';
19224
19380
 
19225
19381
  /**
19226
19382
  * Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
@@ -19300,7 +19456,7 @@ export type WebhookPayloadLead = {
19300
19456
  timestamp: string;
19301
19457
  };
19302
19458
 
19303
- export type event39 = 'lead.received';
19459
+ export type event40 = 'lead.received';
19304
19460
 
19305
19461
  export type platform17 = 'facebook';
19306
19462
 
@@ -19880,7 +20036,7 @@ export type WebhookPayloadMessage = {
19880
20036
  timestamp: string;
19881
20037
  };
19882
20038
 
19883
- export type event40 = 'message.received';
20039
+ export type event41 = 'message.received';
19884
20040
 
19885
20041
  /**
19886
20042
  * Which Zernio surface produced the message. Always present and
@@ -19939,7 +20095,7 @@ export type WebhookPayloadMessageDeleted = {
19939
20095
  timestamp: string;
19940
20096
  };
19941
20097
 
19942
- export type event41 = 'message.deleted';
20098
+ export type event42 = 'message.deleted';
19943
20099
 
19944
20100
  /**
19945
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.
@@ -20003,7 +20159,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
20003
20159
  timestamp: string;
20004
20160
  };
20005
20161
 
20006
- export type event42 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
20162
+ export type event43 = 'message.delivered' | 'message.read' | 'message.played' | 'message.failed';
20007
20163
 
20008
20164
  /**
20009
20165
  * Webhook payload for message.edited events. Fires when the sender
@@ -20046,7 +20202,7 @@ export type WebhookPayloadMessageEdited = {
20046
20202
  timestamp: string;
20047
20203
  };
20048
20204
 
20049
- export type event43 = 'message.edited';
20205
+ export type event44 = 'message.edited';
20050
20206
 
20051
20207
  /**
20052
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)
@@ -20292,7 +20448,7 @@ export type WebhookPayloadMessageSent = {
20292
20448
  timestamp: string;
20293
20449
  };
20294
20450
 
20295
- export type event44 = 'message.sent';
20451
+ export type event45 = 'message.sent';
20296
20452
 
20297
20453
  /**
20298
20454
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
@@ -20357,7 +20513,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
20357
20513
  timestamp: string;
20358
20514
  };
20359
20515
 
20360
- export type event45 = 'phone_number.stock_available';
20516
+ export type event46 = 'phone_number.stock_available';
20361
20517
 
20362
20518
  /**
20363
20519
  * Webhook payload for post events
@@ -20412,7 +20568,7 @@ export type WebhookPayloadPost = {
20412
20568
  timestamp: string;
20413
20569
  };
20414
20570
 
20415
- 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';
20416
20572
 
20417
20573
  /**
20418
20574
  * Webhook payload for `post.authenticity_changed`. Fired when a tracked post's
@@ -20476,7 +20632,7 @@ export type WebhookPayloadPostAuthenticityChanged = {
20476
20632
  timestamp: string;
20477
20633
  };
20478
20634
 
20479
- export type event47 = 'post.authenticity_changed';
20635
+ export type event48 = 'post.authenticity_changed';
20480
20636
 
20481
20637
  /**
20482
20638
  * Webhook payload for these per-platform events:
@@ -20592,7 +20748,7 @@ export type WebhookPayloadPostPlatform = {
20592
20748
  timestamp: string;
20593
20749
  };
20594
20750
 
20595
- 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';
20596
20752
 
20597
20753
  /**
20598
20754
  * Terminal status this event fires on. Matches the event suffix.
@@ -20665,7 +20821,7 @@ export type WebhookPayloadPostTrackingCompleted = {
20665
20821
  timestamp: string;
20666
20822
  };
20667
20823
 
20668
- export type event49 = 'post.tracking_completed';
20824
+ export type event50 = 'post.tracking_completed';
20669
20825
 
20670
20826
  export type completionReason2 = 'final_read' | 'unreachable' | 'post_deleted';
20671
20827
 
@@ -20727,7 +20883,7 @@ export type WebhookPayloadReaction = {
20727
20883
  timestamp: string;
20728
20884
  };
20729
20885
 
20730
- export type event50 = 'reaction.received';
20886
+ export type event51 = 'reaction.received';
20731
20887
 
20732
20888
  export type action = 'added' | 'removed';
20733
20889
 
@@ -20806,7 +20962,7 @@ export type WebhookPayloadReferral = {
20806
20962
  timestamp: string;
20807
20963
  };
20808
20964
 
20809
- export type event51 = 'referral.received';
20965
+ export type event52 = 'referral.received';
20810
20966
 
20811
20967
  /**
20812
20968
  * Webhook payload for the review.deleted event.
@@ -20864,7 +21020,7 @@ export type WebhookPayloadReviewDeleted = {
20864
21020
  timestamp: string;
20865
21021
  };
20866
21022
 
20867
- export type event52 = 'review.deleted';
21023
+ export type event53 = 'review.deleted';
20868
21024
 
20869
21025
  /**
20870
21026
  * Webhook payload for the review.new event (new review posted on a connected account).
@@ -20896,7 +21052,7 @@ export type WebhookPayloadReviewNew = {
20896
21052
  timestamp: string;
20897
21053
  };
20898
21054
 
20899
- export type event53 = 'review.new';
21055
+ export type event54 = 'review.new';
20900
21056
 
20901
21057
  /**
20902
21058
  * Webhook payload for the review.restored event. Same shape as review.new.
@@ -20931,7 +21087,7 @@ export type WebhookPayloadReviewRestored = {
20931
21087
  timestamp: string;
20932
21088
  };
20933
21089
 
20934
- export type event54 = 'review.restored';
21090
+ export type event55 = 'review.restored';
20935
21091
 
20936
21092
  /**
20937
21093
  * Webhook payload for the review.updated event. Same shape as review.new.
@@ -20979,7 +21135,7 @@ export type WebhookPayloadReviewUpdated = {
20979
21135
  timestamp: string;
20980
21136
  };
20981
21137
 
20982
- export type event55 = 'review.updated';
21138
+ export type event56 = 'review.updated';
20983
21139
 
20984
21140
  export type WebhookPayloadSequenceEnrollment = {
20985
21141
  /**
@@ -21012,7 +21168,7 @@ export type WebhookPayloadSequenceEnrollment = {
21012
21168
  exitReason?: 'completed' | 'replied' | 'manual' | 'failed' | 'unsubscribed';
21013
21169
  };
21014
21170
 
21015
- export type event56 = 'sequence.enrolled' | 'sequence.exited';
21171
+ export type event57 = 'sequence.enrolled' | 'sequence.exited';
21016
21172
 
21017
21173
  /**
21018
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.
@@ -21033,7 +21189,7 @@ export type WebhookPayloadSupportRun = {
21033
21189
  run: SupportRun;
21034
21190
  };
21035
21191
 
21036
- export type event57 = 'support.run.completed' | 'support.run.failed';
21192
+ export type event58 = 'support.run.completed' | 'support.run.failed';
21037
21193
 
21038
21194
  /**
21039
21195
  * Webhook payload for test deliveries
@@ -21054,7 +21210,7 @@ export type WebhookPayloadTest = {
21054
21210
  timestamp: string;
21055
21211
  };
21056
21212
 
21057
- export type event58 = 'webhook.test';
21213
+ export type event59 = 'webhook.test';
21058
21214
 
21059
21215
  /**
21060
21216
  * Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
@@ -21106,7 +21262,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
21106
21262
  timestamp: string;
21107
21263
  };
21108
21264
 
21109
- export type event59 = 'whatsapp.account.alert_received';
21265
+ export type event60 = 'whatsapp.account.alert_received';
21110
21266
 
21111
21267
  export type platform19 = 'whatsapp';
21112
21268
 
@@ -21158,7 +21314,7 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
21158
21314
  timestamp: string;
21159
21315
  };
21160
21316
 
21161
- export type event60 = 'whatsapp.account.name_status_updated';
21317
+ export type event61 = 'whatsapp.account.name_status_updated';
21162
21318
 
21163
21319
  /**
21164
21320
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
@@ -21216,7 +21372,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
21216
21372
  timestamp: string;
21217
21373
  };
21218
21374
 
21219
- export type event61 = 'whatsapp.account.quality_updated';
21375
+ export type event62 = 'whatsapp.account.quality_updated';
21220
21376
 
21221
21377
  /**
21222
21378
  * The Meta webhook field that reported the change.
@@ -21292,7 +21448,7 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
21292
21448
  timestamp: string;
21293
21449
  };
21294
21450
 
21295
- export type event62 = 'whatsapp.account.status_updated';
21451
+ export type event63 = 'whatsapp.account.status_updated';
21296
21452
 
21297
21453
  /**
21298
21454
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
@@ -21349,12 +21505,12 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
21349
21505
  timestamp: string;
21350
21506
  };
21351
21507
 
21352
- export type event63 = 'whatsapp.contact.identity_changed';
21508
+ export type event64 = 'whatsapp.contact.identity_changed';
21353
21509
 
21354
21510
  /**
21355
21511
  * Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
21356
21512
  */
21357
- 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';
21358
21514
 
21359
21515
  /**
21360
21516
  * Webhook payload for the `whatsapp.template.category_updated` event.
@@ -21423,7 +21579,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
21423
21579
  timestamp: string;
21424
21580
  };
21425
21581
 
21426
- export type event64 = 'whatsapp.template.category_updated';
21582
+ export type event65 = 'whatsapp.template.category_updated';
21427
21583
 
21428
21584
  /**
21429
21585
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -21505,7 +21661,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
21505
21661
  timestamp: string;
21506
21662
  };
21507
21663
 
21508
- export type event65 = 'whatsapp.template.status_updated';
21664
+ export type event66 = 'whatsapp.template.status_updated';
21509
21665
 
21510
21666
  /**
21511
21667
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -21572,7 +21728,7 @@ export type WebhookPayloadWorkflowRun = {
21572
21728
  error?: string;
21573
21729
  };
21574
21730
 
21575
- 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';
21576
21732
 
21577
21733
  /**
21578
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.
@@ -35706,7 +35862,7 @@ export type CreateWebhookSettingsData = {
35706
35862
  /**
35707
35863
  * Events to subscribe to (at least one required)
35708
35864
  */
35709
- 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')>;
35710
35866
  /**
35711
35867
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
35712
35868
  */
@@ -35778,7 +35934,7 @@ export type UpdateWebhookSettingsData = {
35778
35934
  /**
35779
35935
  * Events to subscribe to. Must contain at least one event if provided.
35780
35936
  */
35781
- 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')>;
35782
35938
  /**
35783
35939
  * Enable or disable webhook delivery
35784
35940
  */
@@ -35967,7 +36123,7 @@ export type TestWebhookData = {
35967
36123
  /**
35968
36124
  * Send a sample payload of this event instead of `webhook.test`. The sample is marked with `test: true`.
35969
36125
  */
35970
- 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';
35971
36127
  };
35972
36128
  };
35973
36129
 
@@ -51216,6 +51372,7 @@ export type CreateAdRuleData = {
51216
51372
  */
51217
51373
  campaignIds?: Array<(string)>;
51218
51374
  filters?: AdRuleFilters;
51375
+ lifecycle?: AdRuleLifecycle;
51219
51376
  conditions: AdRuleConditions;
51220
51377
  actions: AdRuleActions;
51221
51378
  /**
@@ -51276,7 +51433,7 @@ export type ListAdRuleActivityData = {
51276
51433
  * ISO 8601 date-time, inclusive.
51277
51434
  */
51278
51435
  to?: string;
51279
- type?: 'pause' | 'activate' | 'adjust_budget' | 'duplicate';
51436
+ type?: 'pause' | 'activate' | 'adjust_budget' | 'adjust_bid' | 'duplicate' | 'edit_name';
51280
51437
  };
51281
51438
  };
51282
51439
 
@@ -51332,6 +51489,10 @@ export type UpdateAdRuleData = {
51332
51489
  level?: AdRuleLevel;
51333
51490
  campaignIds?: Array<(string)> | null;
51334
51491
  filters?: AdRuleFilters;
51492
+ /**
51493
+ * Null removes it; every matching run then acts and notifies again.
51494
+ */
51495
+ lifecycle?: (AdRuleLifecycle | null);
51335
51496
  conditions?: AdRuleConditions;
51336
51497
  actions?: AdRuleActions;
51337
51498
  schedule?: AdRuleSchedule;
@@ -51377,6 +51538,40 @@ export type PreviewAdRuleError = (ErrorResponse | {
51377
51538
  error?: string;
51378
51539
  });
51379
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
+
51380
51575
  export type ListAdRuleRunsData = {
51381
51576
  path: {
51382
51577
  ruleId: string;