@getlatedev/node 0.2.1768 → 0.2.1770

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.
package/dist/index.d.mts CHANGED
@@ -32634,6 +32634,7 @@ type WorkflowEdge = {
32634
32634
  * - **hubspot_upsert_contact**: `'success'` | `'error'` (not connected / HubSpot refused)
32635
32635
  * - **salesforce_upsert_contact**: `'success'` | `'error'` (not connected / Salesforce refused)
32636
32636
  * - **gohighlevel_upsert_contact**: `'success'` | `'error'` (not connected / HighLevel refused)
32637
+ * - **crm_upsert_deal**, **crm_add_note**, **crm_create_task**: `'success'` | `'error'` (not connected / the CRM refused)
32637
32638
  * - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
32638
32639
  * - **start_call**: `'success'` | `'permission_required'` | `'failed'`
32639
32640
  * - **a_b_split**: `'a'` | `'b'`
@@ -32697,14 +32698,14 @@ type WorkflowNode = {
32697
32698
  */
32698
32699
  id: string;
32699
32700
  /**
32700
- * Node kind. The 19 supported types break into four groups:
32701
+ * Node kind. The 22 supported types break into four groups:
32701
32702
  * messaging (send_message),
32702
32703
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
32703
32704
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
32704
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, ai, handoff, start_call).
32705
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
32705
32706
  *
32706
32707
  */
32707
- type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
32708
+ 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';
32708
32709
  /**
32709
32710
  * Type-specific settings. Every string field supports `{{variable}}` interpolation against the run's variable bag, resolved at execution time.
32710
32711
  *
@@ -32811,6 +32812,33 @@ type WorkflowNode = {
32811
32812
  * - Saves `{ id, created }`, or `{ error }`, to `vars[saveAs]` (default `gohighlevelContact`).
32812
32813
  * - Edges: `'success'` | `'error'` (HighLevel not connected, or HighLevel refused the write).
32813
32814
  *
32815
+ * **CRM record steps** (`crm_upsert_deal`, `crm_add_note`, `crm_create_task`) take `crm` (`hubspot` | `salesforce` | `gohighlevel`) and write to the profile's connected CRM.
32816
+ *
32817
+ * - `contactId` is the CRM record id (such as `{{hubspotContact.id}}`). Empty means the run contact's record, found the way that CRM's contact step finds it (linked, email, phone) and created when missing.
32818
+ * - A value that resolves to an empty string is left out.
32819
+ * - Edges: `'success'` | `'error'` (CRM not connected, a value it refused, its rate limit, or a reconnect it needs). The error is saved as `{ error }` to `vars[saveAs]`.
32820
+ *
32821
+ * **crm_upsert_deal**: `{ crm, contactId, dealId, name, stage, pipeline, amount, closeDate, ownerId, properties, saveAs }`. HubSpot and Salesforce only.
32822
+ *
32823
+ * - Without `dealId` it creates a HubSpot deal (in `pipeline`, default `default`) or a Salesforce Opportunity, associated with the contact. `name` and `stage` are required, and Salesforce also needs `closeDate`.
32824
+ * - A Salesforce Opportunity goes on the Contact's Account with the Contact as its primary contact role. A Lead cannot hold one.
32825
+ * - With `dealId` it updates that deal with the fields set.
32826
+ * - `amount` is a number and `closeDate` is `YYYY-MM-DD`, both after interpolation. `stage` and `pipeline` are the CRM's ids, and `ownerId` is a CRM user id. `properties` maps native field names to values (at most 50).
32827
+ * - Saves `{ id, created, stage, url }` to `vars[saveAs]` (default `crmDeal`).
32828
+ *
32829
+ * **crm_add_note**: `{ crm, contactId, dealId, subject, body, includeTranscript, transcriptMessages, saveAs }`. Logs a note on the contact, or on `dealId` (HubSpot and Salesforce).
32830
+ *
32831
+ * - HubSpot logs a note. Salesforce logs a completed Task, and HighLevel a contact note.
32832
+ * - `includeTranscript` appends the last `transcriptMessages` (1 to 50, default 20) messages of the run's conversation.
32833
+ * - A profile that keeps no message content gets the note without them, and a note that would be empty is not written (`vars[saveAs]` is `{ skipped }`).
32834
+ * - Needs `body` or `includeTranscript`. Saves `{ id, contactId }` or `{ id, dealId }` to `vars[saveAs]` (default `crmNote`).
32835
+ *
32836
+ * **crm_create_task**: `{ crm, contactId, subject, body, dueInDays, ownerId, priority, saveAs }`. Creates an open task on the contact.
32837
+ *
32838
+ * - The task is due `dueInDays` (0 to 365, default 0) after the step runs and is assigned to `ownerId` (a CRM user id) when set.
32839
+ * - `priority` is `low` | `medium` | `high`.
32840
+ * - Saves `{ id, contactId, dueAt }` to `vars[saveAs]` (default `crmTask`).
32841
+ *
32814
32842
  * **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'`.
32815
32843
  *
32816
32844
  * **handoff**: `{ note, assignTo }`. Terminates the run as `exited` and flags the conversation for a human operator.
@@ -32844,14 +32872,14 @@ type WorkflowNode = {
32844
32872
  label?: string;
32845
32873
  };
32846
32874
  /**
32847
- * Node kind. The 19 supported types break into four groups:
32875
+ * Node kind. The 22 supported types break into four groups:
32848
32876
  * messaging (send_message),
32849
32877
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
32850
32878
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
32851
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, ai, handoff, start_call).
32879
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
32852
32880
  *
32853
32881
  */
32854
- type type42 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
32882
+ 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';
32855
32883
  type Workspace = {
32856
32884
  id?: string;
32857
32885
  name?: string;
@@ -63347,9 +63375,21 @@ type ListBroadcastsResponse = ({
63347
63375
  startedAt?: string;
63348
63376
  completedAt?: string;
63349
63377
  recipientCount?: number;
63378
+ /**
63379
+ * Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
63380
+ */
63350
63381
  sentCount?: number;
63382
+ /**
63383
+ * Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
63384
+ */
63351
63385
  deliveredCount?: number;
63386
+ /**
63387
+ * Recipients whose latest status is `read`.
63388
+ */
63352
63389
  readCount?: number;
63390
+ /**
63391
+ * Recipients whose send failed.
63392
+ */
63353
63393
  failedCount?: number;
63354
63394
  createdAt?: string;
63355
63395
  }>;
@@ -63465,9 +63505,21 @@ type GetBroadcastResponse = ({
63465
63505
  startedAt?: string;
63466
63506
  completedAt?: string;
63467
63507
  recipientCount?: number;
63508
+ /**
63509
+ * Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
63510
+ */
63468
63511
  sentCount?: number;
63512
+ /**
63513
+ * Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
63514
+ */
63469
63515
  deliveredCount?: number;
63516
+ /**
63517
+ * Recipients whose latest status is `read`.
63518
+ */
63470
63519
  readCount?: number;
63520
+ /**
63521
+ * Recipients whose send failed.
63522
+ */
63471
63523
  failedCount?: number;
63472
63524
  createdAt?: string;
63473
63525
  updatedAt?: string;
@@ -63652,7 +63704,7 @@ type ListBroadcastRecipientsResponse = ({
63652
63704
  hasMore?: boolean;
63653
63705
  };
63654
63706
  /**
63655
- * Delivery totals across all recipients in the broadcast, independent of pagination and status filtering.
63707
+ * Delivery totals across all recipients in the broadcast, independent of pagination and status filtering. Each recipient counts once, under its latest status, so `sent + delivered + read` is everyone the broadcast went out to.
63656
63708
  */
63657
63709
  summary?: {
63658
63710
  total?: number;
package/dist/index.d.ts CHANGED
@@ -32634,6 +32634,7 @@ type WorkflowEdge = {
32634
32634
  * - **hubspot_upsert_contact**: `'success'` | `'error'` (not connected / HubSpot refused)
32635
32635
  * - **salesforce_upsert_contact**: `'success'` | `'error'` (not connected / Salesforce refused)
32636
32636
  * - **gohighlevel_upsert_contact**: `'success'` | `'error'` (not connected / HighLevel refused)
32637
+ * - **crm_upsert_deal**, **crm_add_note**, **crm_create_task**: `'success'` | `'error'` (not connected / the CRM refused)
32637
32638
  * - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
32638
32639
  * - **start_call**: `'success'` | `'permission_required'` | `'failed'`
32639
32640
  * - **a_b_split**: `'a'` | `'b'`
@@ -32697,14 +32698,14 @@ type WorkflowNode = {
32697
32698
  */
32698
32699
  id: string;
32699
32700
  /**
32700
- * Node kind. The 19 supported types break into four groups:
32701
+ * Node kind. The 22 supported types break into four groups:
32701
32702
  * messaging (send_message),
32702
32703
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
32703
32704
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
32704
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, ai, handoff, start_call).
32705
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
32705
32706
  *
32706
32707
  */
32707
- type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
32708
+ 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';
32708
32709
  /**
32709
32710
  * Type-specific settings. Every string field supports `{{variable}}` interpolation against the run's variable bag, resolved at execution time.
32710
32711
  *
@@ -32811,6 +32812,33 @@ type WorkflowNode = {
32811
32812
  * - Saves `{ id, created }`, or `{ error }`, to `vars[saveAs]` (default `gohighlevelContact`).
32812
32813
  * - Edges: `'success'` | `'error'` (HighLevel not connected, or HighLevel refused the write).
32813
32814
  *
32815
+ * **CRM record steps** (`crm_upsert_deal`, `crm_add_note`, `crm_create_task`) take `crm` (`hubspot` | `salesforce` | `gohighlevel`) and write to the profile's connected CRM.
32816
+ *
32817
+ * - `contactId` is the CRM record id (such as `{{hubspotContact.id}}`). Empty means the run contact's record, found the way that CRM's contact step finds it (linked, email, phone) and created when missing.
32818
+ * - A value that resolves to an empty string is left out.
32819
+ * - Edges: `'success'` | `'error'` (CRM not connected, a value it refused, its rate limit, or a reconnect it needs). The error is saved as `{ error }` to `vars[saveAs]`.
32820
+ *
32821
+ * **crm_upsert_deal**: `{ crm, contactId, dealId, name, stage, pipeline, amount, closeDate, ownerId, properties, saveAs }`. HubSpot and Salesforce only.
32822
+ *
32823
+ * - Without `dealId` it creates a HubSpot deal (in `pipeline`, default `default`) or a Salesforce Opportunity, associated with the contact. `name` and `stage` are required, and Salesforce also needs `closeDate`.
32824
+ * - A Salesforce Opportunity goes on the Contact's Account with the Contact as its primary contact role. A Lead cannot hold one.
32825
+ * - With `dealId` it updates that deal with the fields set.
32826
+ * - `amount` is a number and `closeDate` is `YYYY-MM-DD`, both after interpolation. `stage` and `pipeline` are the CRM's ids, and `ownerId` is a CRM user id. `properties` maps native field names to values (at most 50).
32827
+ * - Saves `{ id, created, stage, url }` to `vars[saveAs]` (default `crmDeal`).
32828
+ *
32829
+ * **crm_add_note**: `{ crm, contactId, dealId, subject, body, includeTranscript, transcriptMessages, saveAs }`. Logs a note on the contact, or on `dealId` (HubSpot and Salesforce).
32830
+ *
32831
+ * - HubSpot logs a note. Salesforce logs a completed Task, and HighLevel a contact note.
32832
+ * - `includeTranscript` appends the last `transcriptMessages` (1 to 50, default 20) messages of the run's conversation.
32833
+ * - A profile that keeps no message content gets the note without them, and a note that would be empty is not written (`vars[saveAs]` is `{ skipped }`).
32834
+ * - Needs `body` or `includeTranscript`. Saves `{ id, contactId }` or `{ id, dealId }` to `vars[saveAs]` (default `crmNote`).
32835
+ *
32836
+ * **crm_create_task**: `{ crm, contactId, subject, body, dueInDays, ownerId, priority, saveAs }`. Creates an open task on the contact.
32837
+ *
32838
+ * - The task is due `dueInDays` (0 to 365, default 0) after the step runs and is assigned to `ownerId` (a CRM user id) when set.
32839
+ * - `priority` is `low` | `medium` | `high`.
32840
+ * - Saves `{ id, contactId, dueAt }` to `vars[saveAs]` (default `crmTask`).
32841
+ *
32814
32842
  * **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'`.
32815
32843
  *
32816
32844
  * **handoff**: `{ note, assignTo }`. Terminates the run as `exited` and flags the conversation for a human operator.
@@ -32844,14 +32872,14 @@ type WorkflowNode = {
32844
32872
  label?: string;
32845
32873
  };
32846
32874
  /**
32847
- * Node kind. The 19 supported types break into four groups:
32875
+ * Node kind. The 22 supported types break into four groups:
32848
32876
  * messaging (send_message),
32849
32877
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
32850
32878
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
32851
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, ai, handoff, start_call).
32879
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
32852
32880
  *
32853
32881
  */
32854
- type type42 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
32882
+ 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';
32855
32883
  type Workspace = {
32856
32884
  id?: string;
32857
32885
  name?: string;
@@ -63347,9 +63375,21 @@ type ListBroadcastsResponse = ({
63347
63375
  startedAt?: string;
63348
63376
  completedAt?: string;
63349
63377
  recipientCount?: number;
63378
+ /**
63379
+ * Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
63380
+ */
63350
63381
  sentCount?: number;
63382
+ /**
63383
+ * Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
63384
+ */
63351
63385
  deliveredCount?: number;
63386
+ /**
63387
+ * Recipients whose latest status is `read`.
63388
+ */
63352
63389
  readCount?: number;
63390
+ /**
63391
+ * Recipients whose send failed.
63392
+ */
63353
63393
  failedCount?: number;
63354
63394
  createdAt?: string;
63355
63395
  }>;
@@ -63465,9 +63505,21 @@ type GetBroadcastResponse = ({
63465
63505
  startedAt?: string;
63466
63506
  completedAt?: string;
63467
63507
  recipientCount?: number;
63508
+ /**
63509
+ * Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
63510
+ */
63468
63511
  sentCount?: number;
63512
+ /**
63513
+ * Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
63514
+ */
63469
63515
  deliveredCount?: number;
63516
+ /**
63517
+ * Recipients whose latest status is `read`.
63518
+ */
63470
63519
  readCount?: number;
63520
+ /**
63521
+ * Recipients whose send failed.
63522
+ */
63471
63523
  failedCount?: number;
63472
63524
  createdAt?: string;
63473
63525
  updatedAt?: string;
@@ -63652,7 +63704,7 @@ type ListBroadcastRecipientsResponse = ({
63652
63704
  hasMore?: boolean;
63653
63705
  };
63654
63706
  /**
63655
- * Delivery totals across all recipients in the broadcast, independent of pagination and status filtering.
63707
+ * Delivery totals across all recipients in the broadcast, independent of pagination and status filtering. Each recipient counts once, under its latest status, so `sent + delivered + read` is everyone the broadcast went out to.
63656
63708
  */
63657
63709
  summary?: {
63658
63710
  total?: number;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.1768",
39
+ version: "0.2.1770",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@getlatedev/node",
8
- version: "0.2.1768",
8
+ version: "0.2.1770",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1768",
3
+ "version": "0.2.1770",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31354,6 +31354,7 @@ export type WorkflowEdge = {
31354
31354
  * - **hubspot_upsert_contact**: `'success'` | `'error'` (not connected / HubSpot refused)
31355
31355
  * - **salesforce_upsert_contact**: `'success'` | `'error'` (not connected / Salesforce refused)
31356
31356
  * - **gohighlevel_upsert_contact**: `'success'` | `'error'` (not connected / HighLevel refused)
31357
+ * - **crm_upsert_deal**, **crm_add_note**, **crm_create_task**: `'success'` | `'error'` (not connected / the CRM refused)
31357
31358
  * - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
31358
31359
  * - **start_call**: `'success'` | `'permission_required'` | `'failed'`
31359
31360
  * - **a_b_split**: `'a'` | `'b'`
@@ -31421,14 +31422,14 @@ export type WorkflowNode = {
31421
31422
  */
31422
31423
  id: string;
31423
31424
  /**
31424
- * Node kind. The 19 supported types break into four groups:
31425
+ * Node kind. The 22 supported types break into four groups:
31425
31426
  * messaging (send_message),
31426
31427
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
31427
31428
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
31428
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, ai, handoff, start_call).
31429
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
31429
31430
  *
31430
31431
  */
31431
- type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
31432
+ 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';
31432
31433
  /**
31433
31434
  * Type-specific settings. Every string field supports `{{variable}}` interpolation against the run's variable bag, resolved at execution time.
31434
31435
  *
@@ -31535,6 +31536,33 @@ export type WorkflowNode = {
31535
31536
  * - Saves `{ id, created }`, or `{ error }`, to `vars[saveAs]` (default `gohighlevelContact`).
31536
31537
  * - Edges: `'success'` | `'error'` (HighLevel not connected, or HighLevel refused the write).
31537
31538
  *
31539
+ * **CRM record steps** (`crm_upsert_deal`, `crm_add_note`, `crm_create_task`) take `crm` (`hubspot` | `salesforce` | `gohighlevel`) and write to the profile's connected CRM.
31540
+ *
31541
+ * - `contactId` is the CRM record id (such as `{{hubspotContact.id}}`). Empty means the run contact's record, found the way that CRM's contact step finds it (linked, email, phone) and created when missing.
31542
+ * - A value that resolves to an empty string is left out.
31543
+ * - Edges: `'success'` | `'error'` (CRM not connected, a value it refused, its rate limit, or a reconnect it needs). The error is saved as `{ error }` to `vars[saveAs]`.
31544
+ *
31545
+ * **crm_upsert_deal**: `{ crm, contactId, dealId, name, stage, pipeline, amount, closeDate, ownerId, properties, saveAs }`. HubSpot and Salesforce only.
31546
+ *
31547
+ * - Without `dealId` it creates a HubSpot deal (in `pipeline`, default `default`) or a Salesforce Opportunity, associated with the contact. `name` and `stage` are required, and Salesforce also needs `closeDate`.
31548
+ * - A Salesforce Opportunity goes on the Contact's Account with the Contact as its primary contact role. A Lead cannot hold one.
31549
+ * - With `dealId` it updates that deal with the fields set.
31550
+ * - `amount` is a number and `closeDate` is `YYYY-MM-DD`, both after interpolation. `stage` and `pipeline` are the CRM's ids, and `ownerId` is a CRM user id. `properties` maps native field names to values (at most 50).
31551
+ * - Saves `{ id, created, stage, url }` to `vars[saveAs]` (default `crmDeal`).
31552
+ *
31553
+ * **crm_add_note**: `{ crm, contactId, dealId, subject, body, includeTranscript, transcriptMessages, saveAs }`. Logs a note on the contact, or on `dealId` (HubSpot and Salesforce).
31554
+ *
31555
+ * - HubSpot logs a note. Salesforce logs a completed Task, and HighLevel a contact note.
31556
+ * - `includeTranscript` appends the last `transcriptMessages` (1 to 50, default 20) messages of the run's conversation.
31557
+ * - A profile that keeps no message content gets the note without them, and a note that would be empty is not written (`vars[saveAs]` is `{ skipped }`).
31558
+ * - Needs `body` or `includeTranscript`. Saves `{ id, contactId }` or `{ id, dealId }` to `vars[saveAs]` (default `crmNote`).
31559
+ *
31560
+ * **crm_create_task**: `{ crm, contactId, subject, body, dueInDays, ownerId, priority, saveAs }`. Creates an open task on the contact.
31561
+ *
31562
+ * - The task is due `dueInDays` (0 to 365, default 0) after the step runs and is assigned to `ownerId` (a CRM user id) when set.
31563
+ * - `priority` is `low` | `medium` | `high`.
31564
+ * - Saves `{ id, contactId, dueAt }` to `vars[saveAs]` (default `crmTask`).
31565
+ *
31538
31566
  * **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'`.
31539
31567
  *
31540
31568
  * **handoff**: `{ note, assignTo }`. Terminates the run as `exited` and flags the conversation for a human operator.
@@ -31569,14 +31597,14 @@ export type WorkflowNode = {
31569
31597
  };
31570
31598
 
31571
31599
  /**
31572
- * Node kind. The 19 supported types break into four groups:
31600
+ * Node kind. The 22 supported types break into four groups:
31573
31601
  * messaging (send_message),
31574
31602
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
31575
31603
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
31576
- * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, ai, handoff, start_call).
31604
+ * integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, gohighlevel_upsert_contact, crm_upsert_deal, crm_add_note, crm_create_task, ai, handoff, start_call).
31577
31605
  *
31578
31606
  */
31579
- export type type42 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'gohighlevel_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
31607
+ 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';
31580
31608
 
31581
31609
  export type Workspace = {
31582
31610
  id?: string;
@@ -64339,9 +64367,21 @@ export type ListBroadcastsResponse = ({
64339
64367
  startedAt?: string;
64340
64368
  completedAt?: string;
64341
64369
  recipientCount?: number;
64370
+ /**
64371
+ * Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
64372
+ */
64342
64373
  sentCount?: number;
64374
+ /**
64375
+ * Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
64376
+ */
64343
64377
  deliveredCount?: number;
64378
+ /**
64379
+ * Recipients whose latest status is `read`.
64380
+ */
64344
64381
  readCount?: number;
64382
+ /**
64383
+ * Recipients whose send failed.
64384
+ */
64345
64385
  failedCount?: number;
64346
64386
  createdAt?: string;
64347
64387
  }>;
@@ -64463,9 +64503,21 @@ export type GetBroadcastResponse = ({
64463
64503
  startedAt?: string;
64464
64504
  completedAt?: string;
64465
64505
  recipientCount?: number;
64506
+ /**
64507
+ * Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
64508
+ */
64466
64509
  sentCount?: number;
64510
+ /**
64511
+ * Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
64512
+ */
64467
64513
  deliveredCount?: number;
64514
+ /**
64515
+ * Recipients whose latest status is `read`.
64516
+ */
64468
64517
  readCount?: number;
64518
+ /**
64519
+ * Recipients whose send failed.
64520
+ */
64469
64521
  failedCount?: number;
64470
64522
  createdAt?: string;
64471
64523
  updatedAt?: string;
@@ -64668,7 +64720,7 @@ export type ListBroadcastRecipientsResponse = ({
64668
64720
  hasMore?: boolean;
64669
64721
  };
64670
64722
  /**
64671
- * Delivery totals across all recipients in the broadcast, independent of pagination and status filtering.
64723
+ * Delivery totals across all recipients in the broadcast, independent of pagination and status filtering. Each recipient counts once, under its latest status, so `sent + delivered + read` is everyone the broadcast went out to.
64672
64724
  */
64673
64725
  summary?: {
64674
64726
  total?: number;