@getlatedev/node 0.2.1135 → 0.2.1137

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.
@@ -771,10 +771,12 @@ export type AdEngagementCounts = {
771
771
  * priority order backs `conversions`, so a purchase-optimised campaign
772
772
  * reports the identical number in `conversions` and `funnel.purchases`.
773
773
  *
774
- * Every field is 0 when that step never fired. Populated for Meta ads;
775
- * other platforms report a different action taxonomy and generally leave
776
- * these at 0 (read `actions` for those). At ad-set and campaign level each
777
- * step is summed from its per-ad values.
774
+ * Every field is 0 when that step never fired. Populated for Meta ads and,
775
+ * from 2026-10-08, TikTok (contentViews, cartAdds, checkoutsInitiated,
776
+ * purchases = app purchases, else website complete payments, leads; the
777
+ * other steps stay 0). Other platforms report a different action taxonomy
778
+ * and generally leave these at 0 (read `actions` for those). At ad-set and
779
+ * campaign level each step is summed from its per-ad values.
778
780
  *
779
781
  */
780
782
  export type AdFunnelCounts = {
@@ -977,19 +979,19 @@ export type AdMetrics = {
977
979
  */
978
980
  costPerConversion?: number;
979
981
  /**
980
- * Per-action-type counts summed over the date range, keyed by the platform's action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...), covering both engagement and conversion events. TikTok: pixel conversions (purchase, add_to_cart, initiate_checkout, view_content, complete_payment, lead) plus the paid-engagement family (follow, post_reaction for paid likes, comment, share). Follow is how FOLLOWERS-goal campaigns report their result. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen) plus `video_view`, which carries LinkedIn's `videoViews` under the same key every other platform uses, so it feeds `engagementBreakdown.videoViews` too; it is an engagement, NOT a conversion, and is excluded from `conversions`. Google returns {} (its per-action names aren't synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad's platform when interpreting them.
982
+ * Per-action-type counts summed over the date range, keyed by the platform's action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...), covering both engagement and conversion events. TikTok: conversion events plus the paid-engagement family (follow, post_reaction for paid likes, comment, share). Website (pixel) events: complete_payment (TikTok's website purchase, the event a SHOPPING-optimised campaign counts in `conversions`), initiate_checkout, add_to_cart, view_content, lead (website form submissions plus TikTok instant-form leads). App events: purchase, view_content (added to the website count). Follow is how FOLLOWERS-goal campaigns report their result. TikTok history note: website add_to_cart, initiate_checkout, complete_payment and lead counts were missing before 2026-10-08 (TikTok rejected the metric names we requested), and each sync re-fetches only the last 7 days, so older days keep them absent until the ad is re-synced from scratch. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen) plus `video_view`, which carries LinkedIn's `videoViews` under the same key every other platform uses, so it feeds `engagementBreakdown.videoViews` too; it is an engagement, NOT a conversion, and is excluded from `conversions`. Google returns {} (its per-action names aren't synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad's platform when interpreting them.
981
983
  */
982
984
  actions?: {
983
985
  [key: string]: (number);
984
986
  };
985
987
  /**
986
- * Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying: values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}.
988
+ * Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying: values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta and TikTok; other platforms return {}. TikTok: the value TikTok attributes to each key of `actions` (purchase and view_content from app events, complete_payment, initiate_checkout, add_to_cart, view_content and lead from the website pixel), present only when the advertiser sends a value with the event. initiate_checkout and add_to_cart values are basket values, not revenue; revenue is complete_payment (website) and purchase (app). Same history note as `actions`.
987
989
  */
988
990
  actionValues?: {
989
991
  [key: string]: (number);
990
992
  };
991
993
  /**
992
- * Convenience sum of purchase-type action values, picked from `actionValues` for the ad set promoted_object event (custom conversion, custom_event_type, else PURCHASE). It matches `conversions` for conversion-optimized ad sets; when the optimization goal reports a different result (LINK_CLICKS, LANDING_PAGE_VIEWS, ...) it stays on the promoted event so ROAS keeps its purchase basis. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only.
994
+ * Convenience sum of purchase-type action values, picked from `actionValues` for the ad set promoted_object event (custom conversion, custom_event_type, else PURCHASE). It matches `conversions` for conversion-optimized ad sets; when the optimization goal reports a different result (LINK_CLICKS, LANDING_PAGE_VIEWS, ...) it stays on the promoted event so ROAS keeps its purchase basis. In ad-account native currency. 0 when the campaign has no purchase event configured. TikTok: app purchase value plus website complete-payment value (from 2026-10-08; older days carry the app value only). Other platforms report 0.
993
995
  */
994
996
  purchaseValue?: number;
995
997
  /**
@@ -10650,6 +10652,62 @@ export type StorePixelInstall = {
10650
10652
  */
10651
10653
  export type method2 = 'wordpress_widget';
10652
10654
 
10655
+ export type SupportRun = {
10656
+ /**
10657
+ * Run id, a 24-character hex string.
10658
+ */
10659
+ runId: string;
10660
+ /**
10661
+ * Conversation thread id. Send it back as `threadId` to ask a follow-up in the same thread.
10662
+ */
10663
+ threadId: string;
10664
+ /**
10665
+ * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
10666
+ */
10667
+ status: 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
10668
+ /**
10669
+ * Why the run stopped. Null while it is in progress.
10670
+ */
10671
+ stopReason: ('answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired') | null;
10672
+ /**
10673
+ * Ana's answer. Null while the run is in progress or when it failed.
10674
+ */
10675
+ answer: (string) | null;
10676
+ usage: SupportRunUsage;
10677
+ /**
10678
+ * The amount billed for the run, in USD: the model cost plus 20%, never above `maxCostUsd`. 0 for a failed run.
10679
+ */
10680
+ costUsd: number;
10681
+ /**
10682
+ * The cost cap this run was started with, in USD.
10683
+ */
10684
+ maxCostUsd: number;
10685
+ createdAt: string;
10686
+ startedAt: (string) | null;
10687
+ finishedAt: (string) | null;
10688
+ /**
10689
+ * Seconds to wait before polling again. Present only while the run is queued or running.
10690
+ */
10691
+ pollAfterSeconds?: number;
10692
+ };
10693
+
10694
+ /**
10695
+ * queued and running are in progress. needs_human means Ana handed the question to a person instead of answering.
10696
+ */
10697
+ export type status29 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
10698
+
10699
+ /**
10700
+ * Why the run stopped. Null while it is in progress.
10701
+ */
10702
+ export type stopReason = 'answered' | 'human_review' | 'cost_cap' | 'deadline' | 'max_iterations' | 'error' | 'expired';
10703
+
10704
+ export type SupportRunUsage = {
10705
+ inputTokens: number;
10706
+ outputTokens: number;
10707
+ cacheReadTokens: number;
10708
+ cacheWriteTokens: number;
10709
+ };
10710
+
10653
10711
  /**
10654
10712
  * Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
10655
10713
  * empty object targets the platform's default broadest audience. Field names are
@@ -11449,7 +11507,7 @@ export type UploadTokenResponse = {
11449
11507
  status?: 'pending' | 'completed' | 'expired';
11450
11508
  };
11451
11509
 
11452
- export type status29 = 'pending' | 'completed' | 'expired';
11510
+ export type status30 = 'pending' | 'completed' | 'expired';
11453
11511
 
11454
11512
  export type UploadTokenStatusResponse = {
11455
11513
  token?: string;
@@ -11956,7 +12014,7 @@ export type Verification = {
11956
12014
  resend?: boolean;
11957
12015
  };
11958
12016
 
11959
- export type status30 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
12017
+ export type status31 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
11960
12018
 
11961
12019
  export type channel4 = 'sms' | 'whatsapp';
11962
12020
 
@@ -11988,7 +12046,7 @@ export type Webhook = {
11988
12046
  /**
11989
12047
  * Events subscribed to
11990
12048
  */
11991
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed')>;
12049
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | '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')>;
11992
12050
  /**
11993
12051
  * Whether webhook delivery is enabled
11994
12052
  */
@@ -12110,7 +12168,7 @@ export type WebhookLog = {
12110
12168
  /**
12111
12169
  * Delivery outcome
12112
12170
  */
12113
- export type status31 = 'success' | 'failed';
12171
+ export type status32 = 'success' | 'failed';
12114
12172
 
12115
12173
  /**
12116
12174
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -12222,7 +12280,7 @@ export type event = 'account.ads.initial_sync_completed';
12222
12280
  /**
12223
12281
  * Overall outcome of the initial sync.
12224
12282
  */
12225
- export type status32 = 'success' | 'failure';
12283
+ export type status33 = 'success' | 'failure';
12226
12284
 
12227
12285
  /**
12228
12286
  * Stable category for UX branching. New values may be added; existing ones are
@@ -12583,7 +12641,7 @@ export type event7 = 'ad.video.processed';
12583
12641
  /**
12584
12642
  * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
12585
12643
  */
12586
- export type status33 = 'ready' | 'error';
12644
+ export type status34 = 'ready' | 'error';
12587
12645
 
12588
12646
  /**
12589
12647
  * Webhook payload for `analytics.synced`. Fired once per connected account each
@@ -14526,7 +14584,7 @@ export type event29 = 'post.platform.published' | 'post.platform.failed' | 'post
14526
14584
  /**
14527
14585
  * Terminal status this event fires on. Matches the event suffix.
14528
14586
  */
14529
- export type status34 = 'published' | 'failed' | 'deleted';
14587
+ export type status35 = 'published' | 'failed' | 'deleted';
14530
14588
 
14531
14589
  /**
14532
14590
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
@@ -14750,6 +14808,18 @@ export type event34 = 'sequence.enrolled' | 'sequence.exited';
14750
14808
  */
14751
14809
  export type exitReason = 'completed' | 'replied' | 'manual' | 'failed' | 'unsubscribed';
14752
14810
 
14811
+ export type WebhookPayloadSupportRun = {
14812
+ /**
14813
+ * Event id, the dedupe key.
14814
+ */
14815
+ id: string;
14816
+ event: 'support.run.completed' | 'support.run.failed';
14817
+ timestamp: string;
14818
+ run: SupportRun;
14819
+ };
14820
+
14821
+ export type event35 = 'support.run.completed' | 'support.run.failed';
14822
+
14753
14823
  /**
14754
14824
  * Webhook payload for test deliveries
14755
14825
  */
@@ -14769,7 +14839,7 @@ export type WebhookPayloadTest = {
14769
14839
  timestamp: string;
14770
14840
  };
14771
14841
 
14772
- export type event35 = 'webhook.test';
14842
+ export type event36 = 'webhook.test';
14773
14843
 
14774
14844
  /**
14775
14845
  * Webhook payload for `whatsapp.account.alert_received`, forwarded from Meta's
@@ -14816,7 +14886,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
14816
14886
  timestamp: string;
14817
14887
  };
14818
14888
 
14819
- export type event36 = 'whatsapp.account.alert_received';
14889
+ export type event37 = 'whatsapp.account.alert_received';
14820
14890
 
14821
14891
  export type platform16 = 'whatsapp';
14822
14892
 
@@ -14867,12 +14937,12 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
14867
14937
  timestamp: string;
14868
14938
  };
14869
14939
 
14870
- export type event37 = 'whatsapp.account.name_status_updated';
14940
+ export type event38 = 'whatsapp.account.name_status_updated';
14871
14941
 
14872
14942
  /**
14873
14943
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
14874
14944
  */
14875
- export type status35 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
14945
+ export type status36 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
14876
14946
 
14877
14947
  /**
14878
14948
  * Webhook payload for `whatsapp.account.quality_updated`. Fired when a connected
@@ -14920,7 +14990,7 @@ export type WebhookPayloadWhatsAppAccountQualityUpdated = {
14920
14990
  timestamp: string;
14921
14991
  };
14922
14992
 
14923
- export type event38 = 'whatsapp.account.quality_updated';
14993
+ export type event39 = 'whatsapp.account.quality_updated';
14924
14994
 
14925
14995
  /**
14926
14996
  * The Meta webhook field that reported the change.
@@ -14991,12 +15061,12 @@ export type WebhookPayloadWhatsAppAccountStatusUpdated = {
14991
15061
  timestamp: string;
14992
15062
  };
14993
15063
 
14994
- export type event39 = 'whatsapp.account.status_updated';
15064
+ export type event40 = 'whatsapp.account.status_updated';
14995
15065
 
14996
15066
  /**
14997
15067
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
14998
15068
  */
14999
- export type status36 = 'restricted' | 'active';
15069
+ export type status37 = 'restricted' | 'active';
15000
15070
 
15001
15071
  /**
15002
15072
  * Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
@@ -15043,7 +15113,7 @@ export type WebhookPayloadWhatsAppContactIdentityChanged = {
15043
15113
  timestamp: string;
15044
15114
  };
15045
15115
 
15046
- export type event40 = 'whatsapp.contact.identity_changed';
15116
+ export type event41 = 'whatsapp.contact.identity_changed';
15047
15117
 
15048
15118
  /**
15049
15119
  * Which Meta signal reported the change. `user_changed_number`: new phone number. `user_changed_user_id` and `user_id_update`: new BSUID.
@@ -15112,7 +15182,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
15112
15182
  timestamp: string;
15113
15183
  };
15114
15184
 
15115
- export type event41 = 'whatsapp.template.category_updated';
15185
+ export type event42 = 'whatsapp.template.category_updated';
15116
15186
 
15117
15187
  /**
15118
15188
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -15189,7 +15259,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
15189
15259
  timestamp: string;
15190
15260
  };
15191
15261
 
15192
- export type event42 = 'whatsapp.template.status_updated';
15262
+ export type event43 = 'whatsapp.template.status_updated';
15193
15263
 
15194
15264
  /**
15195
15265
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -15197,7 +15267,7 @@ export type event42 = 'whatsapp.template.status_updated';
15197
15267
  * request before the template is actually removed.
15198
15268
  *
15199
15269
  */
15200
- export type status37 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
15270
+ export type status38 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
15201
15271
 
15202
15272
  export type WebhookPayloadWorkflowRun = {
15203
15273
  /**
@@ -15251,12 +15321,12 @@ export type WebhookPayloadWorkflowRun = {
15251
15321
  error?: string;
15252
15322
  };
15253
15323
 
15254
- export type event43 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
15324
+ export type event44 = 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed';
15255
15325
 
15256
15326
  /**
15257
15327
  * 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.
15258
15328
  */
15259
- export type status38 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
15329
+ export type status39 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
15260
15330
 
15261
15331
  /**
15262
15332
  * WhatsApp only. Meta's `conversation` object from the status webhook (the billing
@@ -15645,7 +15715,7 @@ export type WorkflowExecutionEvent = {
15645
15715
 
15646
15716
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
15647
15717
 
15648
- export type status39 = 'success' | 'failed' | 'pending';
15718
+ export type status40 = 'success' | 'failed' | 'pending';
15649
15719
 
15650
15720
  /**
15651
15721
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -26321,7 +26391,7 @@ export type CreateWebhookSettingsData = {
26321
26391
  /**
26322
26392
  * Events to subscribe to (at least one required)
26323
26393
  */
26324
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed')>;
26394
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | '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')>;
26325
26395
  /**
26326
26396
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
26327
26397
  */
@@ -26387,7 +26457,7 @@ export type UpdateWebhookSettingsData = {
26387
26457
  /**
26388
26458
  * Events to subscribe to. Must contain at least one event if provided.
26389
26459
  */
26390
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | 'contact.tag_added' | 'contact.tag_removed' | 'contact.field_changed' | 'sequence.enrolled' | 'sequence.exited' | 'workflow.run.started' | 'workflow.run.completed' | 'workflow.run.failed')>;
26460
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.played' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'ad.video.processed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.account.quality_updated' | 'whatsapp.account.status_updated' | 'whatsapp.account.alert_received' | 'whatsapp.contact.identity_changed' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'api.changelog.published' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted' | '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')>;
26391
26461
  /**
26392
26462
  * Enable or disable webhook delivery
26393
26463
  */
@@ -38383,6 +38453,59 @@ export type AddBroadcastRecipientsError = (unknown | ErrorResponse | {
38383
38453
  error?: string;
38384
38454
  });
38385
38455
 
38456
+ export type CreateSupportRunData = {
38457
+ body: {
38458
+ /**
38459
+ * The question. Leading and trailing whitespace is trimmed.
38460
+ */
38461
+ message: string;
38462
+ /**
38463
+ * Continue this thread. The thread must have a run started by your team, and no run in progress.
38464
+ */
38465
+ threadId?: string;
38466
+ /**
38467
+ * Ids Ana should look at. Each must belong to your workspace.
38468
+ */
38469
+ context?: {
38470
+ postId?: string;
38471
+ accountId?: string;
38472
+ profileId?: string;
38473
+ };
38474
+ /**
38475
+ * Cost cap for this run, in USD. The run stops at the cap and bills at most this amount.
38476
+ */
38477
+ maxCostUsd?: number;
38478
+ };
38479
+ headers?: {
38480
+ /**
38481
+ * Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
38482
+ */
38483
+ 'Idempotency-Key'?: string;
38484
+ };
38485
+ };
38486
+
38487
+ export type CreateSupportRunResponse = ({
38488
+ runId: string;
38489
+ threadId: string;
38490
+ status: 'queued';
38491
+ /**
38492
+ * Seconds to wait before the first poll.
38493
+ */
38494
+ pollAfterSeconds: number;
38495
+ });
38496
+
38497
+ export type CreateSupportRunError = (ErrorResponse);
38498
+
38499
+ export type GetSupportRunData = {
38500
+ path: {
38501
+ runId: string;
38502
+ };
38503
+ };
38504
+
38505
+ export type GetSupportRunResponse = (SupportRun);
38506
+
38507
+ export type GetSupportRunError = (ErrorResponse);
38508
+
38386
38509
  export type ListWorkflowsData = {
38387
38510
  query?: {
38388
38511
  limit?: number;