@getlatedev/node 0.2.1786 → 0.2.1788

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.
@@ -22139,6 +22139,101 @@ export type platform18 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'link
22139
22139
  */
22140
22140
  export type tiktokAccountType = 'business' | 'personal' | 'unknown';
22141
22141
 
22142
+ /**
22143
+ * An ad write that was validated and stored with `stage: true`, waiting to be confirmed or discarded.
22144
+ */
22145
+ export type StagedAdChange = {
22146
+ /**
22147
+ * The change id, used in /v1/ads/changes/{changeId}.
22148
+ */
22149
+ id: string;
22150
+ /**
22151
+ * Which write was staged.
22152
+ */
22153
+ type: 'campaign_status' | 'ad_set_status' | 'ad_status';
22154
+ /**
22155
+ * The ad platform of the object, as the write route names it.
22156
+ */
22157
+ platform: string;
22158
+ /**
22159
+ * The connected account the write goes through.
22160
+ */
22161
+ accountId: string;
22162
+ /**
22163
+ * The ad account id on the platform.
22164
+ */
22165
+ adAccountId: string;
22166
+ /**
22167
+ * The object the change applies to: the platform campaign id, the platform ad set id, or the Zernio ad id.
22168
+ */
22169
+ targetId: (string) | null;
22170
+ /**
22171
+ * - `staged`: waiting to be confirmed or discarded.
22172
+ * - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
22173
+ * - `confirmed`: applied. `result` holds what the write returned.
22174
+ * - `failed`: not applied. `error` says why.
22175
+ *
22176
+ */
22177
+ status: 'staged' | 'confirming' | 'confirmed' | 'failed';
22178
+ /**
22179
+ * One entry per field of the staged request.
22180
+ */
22181
+ diff: Array<{
22182
+ field: string;
22183
+ /**
22184
+ * The value on the ad network when the change was staged. Null when `beforeAvailable` is false.
22185
+ */
22186
+ before: unknown;
22187
+ /**
22188
+ * The value the change will write.
22189
+ */
22190
+ after: unknown;
22191
+ /**
22192
+ * False when the live read of the object does not return this field, so `before` is unknown.
22193
+ */
22194
+ beforeAvailable: boolean;
22195
+ }>;
22196
+ /**
22197
+ * The user who staged the change.
22198
+ */
22199
+ createdBy: string;
22200
+ createdAt: string;
22201
+ /**
22202
+ * When the confirm ended, as `confirmed` or `failed`. A finished change is deleted 7 days later.
22203
+ */
22204
+ finishedAt: (string) | null;
22205
+ /**
22206
+ * Present once `confirmed`: the response body of the write.
22207
+ */
22208
+ result?: {
22209
+ [key: string]: unknown;
22210
+ };
22211
+ /**
22212
+ * Present once `failed`.
22213
+ */
22214
+ error?: {
22215
+ /**
22216
+ * An error code, or `target_changed` when the object changed on the ad network after staging.
22217
+ */
22218
+ code?: string;
22219
+ message?: (string) | null;
22220
+ };
22221
+ };
22222
+
22223
+ /**
22224
+ * Which write was staged.
22225
+ */
22226
+ export type type32 = 'campaign_status' | 'ad_set_status' | 'ad_status';
22227
+
22228
+ /**
22229
+ * - `staged`: waiting to be confirmed or discarded.
22230
+ * - `confirming`: a confirm is running. A change that stays here has an unknown outcome and is never applied again automatically.
22231
+ * - `confirmed`: applied. `result` holds what the write returned.
22232
+ * - `failed`: not applied. `error` says why.
22233
+ *
22234
+ */
22235
+ export type status60 = 'staged' | 'confirming' | 'confirmed' | 'failed';
22236
+
22142
22237
  export type StoredEvent = {
22143
22238
  eventId?: string;
22144
22239
  /**
@@ -22393,7 +22488,7 @@ export type SupportRun = {
22393
22488
  /**
22394
22489
  * queued and running are in progress. needs_human means the assistant handed the question to a person instead of answering; when `supportTicket` is set, a Zernio teammate has been notified and will follow up by email.
22395
22490
  */
22396
- export type status60 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
22491
+ export type status61 = 'queued' | 'running' | 'completed' | 'needs_human' | 'failed';
22397
22492
 
22398
22493
  /**
22399
22494
  * Why the run stopped. Null while it is in progress.
@@ -23361,14 +23456,14 @@ export type TrackingSite = {
23361
23456
  updatedAt?: string;
23362
23457
  };
23363
23458
 
23364
- export type status61 = 'active' | 'paused' | 'removing';
23459
+ export type status62 = 'active' | 'paused' | 'removing';
23365
23460
 
23366
23461
  /**
23367
23462
  * How the tag is installed. `snippet` means you paste it.
23368
23463
  */
23369
23464
  export type method6 = 'shopify' | 'wordpress' | 'wix' | 'webflow' | 'snippet';
23370
23465
 
23371
- export type type32 = 'CNAME';
23466
+ export type type33 = 'CNAME';
23372
23467
 
23373
23468
  /**
23374
23469
  * How a visitor with no consent signal is treated. `eu_opt_in` (default): no consent in the EU, UK and other countries that require it, consent elsewhere. `opt_in`: no consent anywhere. `opt_out`: consent everywhere.
@@ -23680,7 +23775,7 @@ export type TrackingWindow = {
23680
23775
  } | null;
23681
23776
  };
23682
23777
 
23683
- export type status62 = 'open' | 'completing' | 'completed' | 'cancelled';
23778
+ export type status63 = 'open' | 'completing' | 'completed' | 'cancelled';
23684
23779
 
23685
23780
  /**
23686
23781
  * How the window closed. Null while it is open.
@@ -23774,7 +23869,7 @@ export type purpose = 'balance' | 'payout_batch';
23774
23869
  /**
23775
23870
  * `pending` until the card is charged (or 3D Secure is finished) and credited. `expired` means it ended unpaid: cancelled, or 3D Secure left unfinished for 30 minutes. Only `pending` counts toward pendingTopupCents.
23776
23871
  */
23777
- export type status63 = 'pending' | 'succeeded' | 'failed' | 'expired';
23872
+ export type status64 = 'pending' | 'succeeded' | 'failed' | 'expired';
23778
23873
 
23779
23874
  export type TreasuryTransfer = {
23780
23875
  id?: string;
@@ -23815,7 +23910,7 @@ export type TreasuryTransfer = {
23815
23910
 
23816
23911
  export type destinationType = 'creator' | 'ad_account';
23817
23912
 
23818
- export type status64 = 'pending' | 'paid' | 'failed' | 'reversed';
23913
+ export type status65 = 'pending' | 'paid' | 'failed' | 'reversed';
23819
23914
 
23820
23915
  /**
23821
23916
  * X-specific post options. The article field creates a long-form X Article and is mutually exclusive with tweet media and tweet-only options. Geo-restriction applies at the media level: media is hidden outside the specified countries while tweet text remains visible.
@@ -23997,7 +24092,7 @@ export type UploadedFile = {
23997
24092
  mimeType?: string;
23998
24093
  };
23999
24094
 
24000
- export type type33 = 'image' | 'video' | 'document';
24095
+ export type type34 = 'image' | 'video' | 'document';
24001
24096
 
24002
24097
  export type UploadTokenResponse = {
24003
24098
  token?: string;
@@ -24006,7 +24101,7 @@ export type UploadTokenResponse = {
24006
24101
  status?: 'pending' | 'completed' | 'expired';
24007
24102
  };
24008
24103
 
24009
- export type status65 = 'pending' | 'completed' | 'expired';
24104
+ export type status66 = 'pending' | 'completed' | 'expired';
24010
24105
 
24011
24106
  export type UploadTokenStatusResponse = {
24012
24107
  token?: string;
@@ -24552,7 +24647,7 @@ export type Verification = {
24552
24647
  resend?: boolean;
24553
24648
  };
24554
24649
 
24555
- export type status66 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
24650
+ export type status67 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
24556
24651
 
24557
24652
  export type channel6 = 'sms' | 'whatsapp';
24558
24653
 
@@ -24811,7 +24906,7 @@ export type WebhookLog = {
24811
24906
  /**
24812
24907
  * Delivery outcome
24813
24908
  */
24814
- export type status67 = 'success' | 'failed';
24909
+ export type status68 = 'success' | 'failed';
24815
24910
 
24816
24911
  /**
24817
24912
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -24925,7 +25020,7 @@ export type event = 'account.ads.initial_sync_completed';
24925
25020
  /**
24926
25021
  * Overall outcome of the initial sync.
24927
25022
  */
24928
- export type status68 = 'success' | 'failure';
25023
+ export type status69 = 'success' | 'failure';
24929
25024
 
24930
25025
  /**
24931
25026
  * Stable category for UX branching. New values may be added; existing ones are stable.
@@ -25232,7 +25327,7 @@ export type event7 = 'account.privacy_request';
25232
25327
  *
25233
25328
  * shop_redact: erase the data you hold about the whole shop. Sent 48 hours after the merchant uninstalled the app.
25234
25329
  */
25235
- export type type34 = 'customer_data_request' | 'customer_redact' | 'shop_redact';
25330
+ export type type35 = 'customer_data_request' | 'customer_redact' | 'shop_redact';
25236
25331
 
25237
25332
  /**
25238
25333
  * Webhook payload for account.rate_limited: a mailbox entered a sending cooldown.
@@ -25608,7 +25703,7 @@ export type WebhookPayloadAdReview = {
25608
25703
 
25609
25704
  export type event14 = 'ad.review.approved' | 'ad.review.rejected';
25610
25705
 
25611
- export type status69 = 'approved' | 'rejected';
25706
+ export type status70 = 'approved' | 'rejected';
25612
25707
 
25613
25708
  /**
25614
25709
  * Webhook payload for the `ad_rule.triggered` event.
@@ -26179,7 +26274,7 @@ export type event20 = 'ad.video.processed';
26179
26274
  /**
26180
26275
  * `ready`: usable as `video.id` on the create endpoints. `error`: Meta could not process it; upload again.
26181
26276
  */
26182
- export type status70 = 'ready' | 'error';
26277
+ export type status71 = 'ready' | 'error';
26183
26278
 
26184
26279
  /**
26185
26280
  * Webhook payload for `analytics.synced`. Fired once per connected account each time its analytics sync cycle completes successfully. Poll-driven (roughly hourly per account), not real-time, and never fired for a skipped or failed cycle.
@@ -26320,7 +26415,7 @@ export type WebhookPayloadAutomationAction = {
26320
26415
 
26321
26416
  export type event23 = 'automation.action.applied' | 'automation.action.failed' | 'automation.action.unknown';
26322
26417
 
26323
- export type status71 = 'applied' | 'skipped' | 'failed' | 'unknown';
26418
+ export type status72 = 'applied' | 'skipped' | 'failed' | 'unknown';
26324
26419
 
26325
26420
  /**
26326
26421
  * 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`).
@@ -27733,7 +27828,7 @@ export type WebhookPayloadCommerceOrder = {
27733
27828
 
27734
27829
  export type event48 = 'commerce.order.created' | 'commerce.order.updated' | 'commerce.order.refunded';
27735
27830
 
27736
- export type type35 = 'order';
27831
+ export type type36 = 'order';
27737
27832
 
27738
27833
  export type WebhookPayloadCommerceProduct = {
27739
27834
  /**
@@ -27776,7 +27871,7 @@ export type WebhookPayloadCommerceProduct = {
27776
27871
 
27777
27872
  export type event49 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
27778
27873
 
27779
- export type type36 = 'product';
27874
+ export type type37 = 'product';
27780
27875
 
27781
27876
  /**
27782
27877
  * Webhook payload for contact.updated and contact.deleted, fired after a provider contacts sync (Google Contacts, Outlook) changed a contact. contact.updated also fires after a WhatsApp coexistence address-book change (WhatsApp never fires contact.deleted). Read the contact with `GET /v1/contacts/{id}`.
@@ -28177,7 +28272,7 @@ export type event57 = 'email.bounced';
28177
28272
  /**
28178
28273
  * `hard`: 5.x.x, the address does not take mail. `soft`: 4.x.x, a temporary refusal the sending server gave up on. `undetermined`: the report gave no status.
28179
28274
  */
28180
- export type type37 = 'hard' | 'soft' | 'undetermined';
28275
+ export type type38 = 'hard' | 'soft' | 'undetermined';
28181
28276
 
28182
28277
  export type category2 = 'user_unknown' | 'mailbox_full' | 'domain_not_found' | 'policy_blocked' | 'spam_blocked' | 'blocklisted' | 'message_too_large' | 'content_rejected' | 'auth_failure' | 'rate_limited' | 'other';
28183
28278
 
@@ -28730,7 +28825,7 @@ export type platform25 = 'instagram' | 'facebook' | 'linkedin';
28730
28825
  /**
28731
28826
  * Null on LinkedIn.
28732
28827
  */
28733
- export type type38 = 'caption' | 'post' | 'comment';
28828
+ export type type39 = 'caption' | 'post' | 'comment';
28734
28829
 
28735
28830
  /**
28736
28831
  * Webhook payload for message received events
@@ -29870,7 +29965,7 @@ export type event75 = 'notification.sent';
29870
29965
  */
29871
29966
  export type category3 = 'postFailures' | 'accountIssues' | 'securityAlerts';
29872
29967
 
29873
- export type type39 = 'post_failed' | 'account_disconnected' | 'conversions_failing' | 'api_key_handed_over' | 'whatsapp_inbound_lost';
29968
+ export type type40 = 'post_failed' | 'account_disconnected' | 'conversions_failing' | 'api_key_handed_over' | 'whatsapp_inbound_lost';
29874
29969
 
29875
29970
  /**
29876
29971
  * Webhook payload for phone_number.stock_available events
@@ -30165,7 +30260,7 @@ export type event79 = 'post.platform.published' | 'post.platform.failed' | 'post
30165
30260
  /**
30166
30261
  * Terminal status this event fires on. Matches the event suffix.
30167
30262
  */
30168
- export type status72 = 'published' | 'failed' | 'deleted';
30263
+ export type status73 = 'published' | 'failed' | 'deleted';
30169
30264
 
30170
30265
  /**
30171
30266
  * Webhook payload for `post.tracking_completed`. Fired once when a post's tracking window ends and its final analytics read has run.
@@ -30755,7 +30850,7 @@ export type event92 = 'whatsapp.account.name_status_updated';
30755
30850
  /**
30756
30851
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
30757
30852
  */
30758
- export type status73 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
30853
+ export type status74 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
30759
30854
 
30760
30855
  /**
30761
30856
  * Webhook payload for `whatsapp.account.quality_updated`. Fired when a connected
@@ -30889,7 +30984,7 @@ export type event94 = 'whatsapp.account.status_updated';
30889
30984
  /**
30890
30985
  * `active` only on a reinstatement (DISABLED_UPDATE with ban state REINSTATE).
30891
30986
  */
30892
- export type status74 = 'restricted' | 'active';
30987
+ export type status75 = 'restricted' | 'active';
30893
30988
 
30894
30989
  /**
30895
30990
  * Webhook payload for the `whatsapp.contact.identity_changed` event. Fired when
@@ -31105,7 +31200,7 @@ export type event97 = 'whatsapp.template.status_updated';
31105
31200
  * request before the template is actually removed.
31106
31201
  *
31107
31202
  */
31108
- export type status75 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
31203
+ export type status76 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
31109
31204
 
31110
31205
  export type WebhookPayloadWorkflowRun = {
31111
31206
  /**
@@ -31169,7 +31264,7 @@ export type event98 = 'workflow.run.started' | 'workflow.run.completed' | 'workf
31169
31264
  /**
31170
31265
  * 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.
31171
31266
  */
31172
- export type status76 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
31267
+ export type status77 = 'running' | 'waiting' | 'completed' | 'exited' | 'failed';
31173
31268
 
31174
31269
  /**
31175
31270
  * The profiles this event belongs to, each with the externalId you set on it (null when none is set). Use it to route the event to your tenant without storing Zernio profile ids.
@@ -31445,7 +31540,7 @@ export type WhatsAppTemplateButton = {
31445
31540
  navigate_screen?: string;
31446
31541
  };
31447
31542
 
31448
- export type type40 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
31543
+ export type type41 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
31449
31544
 
31450
31545
  /**
31451
31546
  * Required when type is otp
@@ -31487,7 +31582,7 @@ export type WhatsAppTemplateLookupError = {
31487
31582
  };
31488
31583
  };
31489
31584
 
31490
- export type type41 = 'platform_error';
31585
+ export type type42 = 'platform_error';
31491
31586
 
31492
31587
  export type code5 = 'platform_api_error';
31493
31588
 
@@ -31517,6 +31612,7 @@ export type WorkflowEdge = {
31517
31612
  * - **gohighlevel_upsert_contact**: `'success'` | `'error'` (not connected / HighLevel refused)
31518
31613
  * - **crm_upsert_deal**, **crm_add_note**, **crm_create_task**: `'success'` | `'error'` (not connected / the CRM refused)
31519
31614
  * - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
31615
+ * - **agent**: `'complete'` | `'handoff'` (only with `handoffPolicy: follow_edge`) | `'timeout'` | `'error'`
31520
31616
  * - **start_call**: `'success'` | `'permission_required'` | `'failed'`
31521
31617
  * - **a_b_split**: `'a'` | `'b'`
31522
31618
  * - **enroll_sequence**: `'success'` | `'error'`
@@ -31572,7 +31668,7 @@ export type WorkflowExecutionEvent = {
31572
31668
 
31573
31669
  export type action3 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
31574
31670
 
31575
- export type status77 = 'success' | 'failed' | 'pending';
31671
+ export type status78 = 'success' | 'failed' | 'pending';
31576
31672
 
31577
31673
  /**
31578
31674
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -31583,14 +31679,14 @@ export type WorkflowNode = {
31583
31679
  */
31584
31680
  id: string;
31585
31681
  /**
31586
- * Node kind. The 22 supported types break into four groups:
31682
+ * Node kind. The 23 supported types break into four groups:
31587
31683
  * messaging (send_message),
31588
31684
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
31589
31685
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
31590
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
31686
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, agent, handoff, start_call).
31591
31687
  *
31592
31688
  */
31593
- type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'crm_upsert_deal' | 'crm_add_note' | 'crm_create_task' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
31689
+ type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'crm_upsert_deal' | 'crm_add_note' | 'crm_create_task' | 'ai' | 'agent' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
31594
31690
  /**
31595
31691
  * Type-specific settings. Every string field supports `{{variable}}` interpolation against the run's variable bag, resolved at execution time.
31596
31692
  *
@@ -31726,6 +31822,16 @@ export type WorkflowNode = {
31726
31822
  *
31727
31823
  * **ai**: `{ provider: anthropic|openai|google|mistral|groq|openrouter, model, preset: smart|tools|cheap, systemPrompt, userPromptTemplate, saveAs, temperature, maxTokens, outputType: text|json, tools:[{ name, description, parameters }] }`. Set `provider` + `model` for BYOK (uses your stored API key); omit `provider` for the legacy Telnyx path. Edges: `'success'`, `'tool:<name>'` (model picked a tool), `'error'`.
31728
31824
  *
31825
+ * **agent**: `{ provider, model, instructions, allowedTools:[lookup_order|add_tag|remove_tag|set_field|handoff_to_human], writableFields:[string], maxTurns:int (1-20, default 6), timeoutMinutes:int (max 43200, default 1440), outputSchema:[{ name, type: string|number|boolean, description, required }], handoffPolicy: end_run|follow_edge, saveAs }`. An AI agent that holds a conversation with the contact using your stored provider key (BYOK, as `ai`).
31826
+ *
31827
+ * - Each answer is sent to the contact, then the run waits for their reply (up to `timeoutMinutes`) and the agent continues with it.
31828
+ * - `instructions` is the system prompt and supports `{{variable}}`. The agent is offered only `allowedTools` plus `complete`; `set_field` writes only the fields in `writableFields`.
31829
+ * - `lookup_order` reads the connected store: an order found by number is returned only when it belongs to the contact (email or phone).
31830
+ * - `complete` writes the `outputSchema` fields to `vars[saveAs]` (default `agent`). `handoff_to_human` flags the conversation for a person and ends the run (`end_run`) or follows the `'handoff'` edge (`follow_edge`).
31831
+ * - After `maxTurns` answers the agent hands off when it can (`handoff_to_human` allowed with `end_run`, or a `'handoff'` edge with `follow_edge`), else it exits on `'error'`. 150,000 tokens also end it on `'error'`.
31832
+ * - Run variables starting with `__` (the agent's transcript while it is active) are never sent by a webhook or filled into another step's text. For teams that keep no message content, the run history records tool names and outcomes only.
31833
+ * - Edges: `'complete'`, `'handoff'`, `'timeout'` (no reply in time), `'error'` (`vars[saveAs + '_error']` says why, such as `max_turns`).
31834
+ *
31729
31835
  * **handoff**: `{ note, assignTo }`. Terminates the run as `exited` and flags the conversation for a human operator.
31730
31836
  *
31731
31837
  * **start_call**: `{ to, forwardTo, requirePermissionFirst, recordingEnabled, saveAs }`. WhatsApp-only. `forwardTo` can be `tel:+E164`, `sip:user@host`, or `wss://…` (AI voice agent). Edges: `'success'`, `'permission_required'`, `'failed'`.
@@ -31758,14 +31864,14 @@ export type WorkflowNode = {
31758
31864
  };
31759
31865
 
31760
31866
  /**
31761
- * Node kind. The 22 supported types break into four groups:
31867
+ * Node kind. The 23 supported types break into four groups:
31762
31868
  * messaging (send_message),
31763
31869
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
31764
31870
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
31765
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
31871
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, agent, handoff, start_call).
31766
31872
  *
31767
31873
  */
31768
- export type type42 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'crm_upsert_deal' | 'crm_add_note' | 'crm_create_task' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
31874
+ export type type43 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'crm_upsert_deal' | 'crm_add_note' | 'crm_create_task' | 'ai' | 'agent' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
31769
31875
 
31770
31876
  export type Workspace = {
31771
31877
  id?: string;
@@ -31940,7 +32046,7 @@ export type XArticleBlock = {
31940
32046
  entity_ranges?: Array<XArticleEntityRange>;
31941
32047
  };
31942
32048
 
31943
- export type type43 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
32049
+ export type type44 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
31944
32050
 
31945
32051
  /**
31946
32052
  * X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
@@ -32019,7 +32125,7 @@ export type XArticleEntity = {
32019
32125
 
32020
32126
  export type mutability = 'immutable' | 'mutable' | 'segmented';
32021
32127
 
32022
- export type type44 = 'divider' | 'latex';
32128
+ export type type45 = 'divider' | 'latex';
32023
32129
 
32024
32130
  /**
32025
32131
  * The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
@@ -68423,6 +68529,55 @@ export type UndoAdRuleActivityResponse = ({
68423
68529
 
68424
68530
  export type UndoAdRuleActivityError = (ErrorResponse);
68425
68531
 
68532
+ export type GetAdChangeData = {
68533
+ path: {
68534
+ /**
68535
+ * The id of the staged change.
68536
+ */
68537
+ changeId: string;
68538
+ };
68539
+ };
68540
+
68541
+ export type GetAdChangeResponse = ({
68542
+ change: StagedAdChange;
68543
+ });
68544
+
68545
+ export type GetAdChangeError = (ErrorResponse | {
68546
+ error?: string;
68547
+ });
68548
+
68549
+ export type DiscardAdChangeData = {
68550
+ path: {
68551
+ /**
68552
+ * The id of the staged change.
68553
+ */
68554
+ changeId: string;
68555
+ };
68556
+ };
68557
+
68558
+ export type DiscardAdChangeResponse = (void);
68559
+
68560
+ export type DiscardAdChangeError = (ErrorResponse | {
68561
+ error?: string;
68562
+ });
68563
+
68564
+ export type ConfirmAdChangeData = {
68565
+ path: {
68566
+ /**
68567
+ * The id of the staged change.
68568
+ */
68569
+ changeId: string;
68570
+ };
68571
+ };
68572
+
68573
+ export type ConfirmAdChangeResponse = ({
68574
+ [key: string]: unknown;
68575
+ });
68576
+
68577
+ export type ConfirmAdChangeError = (ErrorResponse | {
68578
+ error?: string;
68579
+ });
68580
+
68426
68581
  export type GetAdRuleData = {
68427
68582
  path: {
68428
68583
  ruleId: string;
@@ -69102,6 +69257,10 @@ export type UpdateAdCampaignStatusData = {
69102
69257
  body: {
69103
69258
  status: 'active' | 'paused';
69104
69259
  platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
69260
+ /**
69261
+ * Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
69262
+ */
69263
+ stage?: boolean;
69105
69264
  };
69106
69265
  headers?: {
69107
69266
  /**
@@ -69153,6 +69312,8 @@ export type UpdateAdCampaignStatusResponse = ({
69153
69312
  * Why the write was skipped, for example "Campaign already switched off".
69154
69313
  */
69155
69314
  skippedReasons?: Array<(string)>;
69315
+ } | {
69316
+ change: StagedAdChange;
69156
69317
  });
69157
69318
 
69158
69319
  export type UpdateAdCampaignStatusError = (unknown);
@@ -70945,6 +71106,10 @@ export type UpdateAdSetStatusData = {
70945
71106
  body: {
70946
71107
  status: 'active' | 'paused';
70947
71108
  platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
71109
+ /**
71110
+ * Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
71111
+ */
71112
+ stage?: boolean;
70948
71113
  };
70949
71114
  headers?: {
70950
71115
  /**
@@ -71005,6 +71170,8 @@ export type UpdateAdSetStatusResponse = ({
71005
71170
  * Why the write was skipped, for example "Ad set already switched off".
71006
71171
  */
71007
71172
  skippedReasons?: Array<(string)>;
71173
+ } | {
71174
+ change: StagedAdChange;
71008
71175
  });
71009
71176
 
71010
71177
  export type UpdateAdSetStatusError = (unknown | ErrorResponse);
@@ -71660,6 +71827,10 @@ export type DeleteAdError = (ErrorResponse);
71660
71827
  export type UpdateAdStatusData = {
71661
71828
  body: {
71662
71829
  status: 'active' | 'paused';
71830
+ /**
71831
+ * Send true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta and Google only; cannot be combined with `validateOnly` or `dryRun`.
71832
+ */
71833
+ stage?: boolean;
71663
71834
  };
71664
71835
  headers?: {
71665
71836
  /**
@@ -71705,6 +71876,8 @@ export type UpdateAdStatusResponse = ({
71705
71876
  * Human-readable summary (present only when skipped), e.g. "No change: the ad's own switch is already off"
71706
71877
  */
71707
71878
  message?: string;
71879
+ } | {
71880
+ change: StagedAdChange;
71708
71881
  });
71709
71882
 
71710
71883
  export type UpdateAdStatusError = (unknown | ErrorResponse);