@getlatedev/node 0.2.1701 → 0.2.1703
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 +45 -11
- package/dist/index.d.ts +45 -11
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +1 -1
- package/src/generated/types.gen.ts +45 -11
package/dist/index.d.mts
CHANGED
|
@@ -14371,7 +14371,7 @@ type ForwardingRule = {
|
|
|
14371
14371
|
/**
|
|
14372
14372
|
* Event sources forwarded to this destination; null forwards events from every source.
|
|
14373
14373
|
*/
|
|
14374
|
-
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web')> | null;
|
|
14374
|
+
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce')> | null;
|
|
14375
14375
|
/**
|
|
14376
14376
|
* Only when an `apiSecret` was saved by this request. Google Analytics never confirms a Measurement Protocol API secret, so it is `false` there: the first events in GA4 Realtime prove the secret is right.
|
|
14377
14377
|
*/
|
|
@@ -20078,6 +20078,14 @@ type SalesforceSettings = {
|
|
|
20078
20078
|
message: string;
|
|
20079
20079
|
at: string;
|
|
20080
20080
|
} | null;
|
|
20081
|
+
/**
|
|
20082
|
+
* Whether closed-won Opportunities count as sales (Amount, in the Opportunity's or the org's currency) on the ad campaign named by their Primary Campaign Source, in campaign results and ad rules. Lost or reopened Opportunities stop counting.
|
|
20083
|
+
*/
|
|
20084
|
+
useOpportunitiesInResults: boolean;
|
|
20085
|
+
/**
|
|
20086
|
+
* Whether Zernio sends newly closed-won Opportunities as Purchase events (source `salesforce`) to the profile's event destinations.
|
|
20087
|
+
*/
|
|
20088
|
+
reportOpportunitiesToAds: boolean;
|
|
20081
20089
|
};
|
|
20082
20090
|
type platform16 = 'salesforce';
|
|
20083
20091
|
/**
|
|
@@ -20513,7 +20521,7 @@ type StoredEvent = {
|
|
|
20513
20521
|
*/
|
|
20514
20522
|
profileId?: string;
|
|
20515
20523
|
/**
|
|
20516
|
-
* Where the event came from: `api`, `relay`, `web`, `shopify`, `woocommerce`, `hubspot`, `meta_leads`, `google_leads`, `linkedin_leads` or `tiktok_leads`.
|
|
20524
|
+
* Where the event came from: `api`, `relay`, `web`, `shopify`, `woocommerce`, `stripe`, `hubspot`, `salesforce`, `meta_leads`, `google_leads`, `linkedin_leads` or `tiktok_leads`.
|
|
20517
20525
|
*/
|
|
20518
20526
|
source?: string;
|
|
20519
20527
|
eventName?: string;
|
|
@@ -25718,7 +25726,7 @@ type WebhookPayloadConversion = {
|
|
|
25718
25726
|
eventTime: string;
|
|
25719
25727
|
receivedAt: string;
|
|
25720
25728
|
/**
|
|
25721
|
-
* Who sent it: `api`, `relay`, a lead form (`meta_leads`, `google_leads`, `linkedin_leads`, `tiktok_leads`), a store (`shopify`, `woocommerce`), `stripe` or `
|
|
25729
|
+
* Who sent it: `api`, `relay`, a lead form (`meta_leads`, `google_leads`, `linkedin_leads`, `tiktok_leads`), a store (`shopify`, `woocommerce`), `stripe`, `hubspot` or `salesforce`.
|
|
25722
25730
|
*/
|
|
25723
25731
|
source: string;
|
|
25724
25732
|
actionSource?: (string) | null;
|
|
@@ -29045,6 +29053,7 @@ type WorkflowEdge = {
|
|
|
29045
29053
|
* - **wait_for_reply**: `'reply'` (contact replied) | `'timeout'` (no reply in window)
|
|
29046
29054
|
* - **webhook**: `'success'` (2xx) | `'error'` (non-2xx / fetch failed)
|
|
29047
29055
|
* - **hubspot_upsert_contact**: `'success'` | `'error'` (not connected / HubSpot refused)
|
|
29056
|
+
* - **salesforce_upsert_contact**: `'success'` | `'error'` (not connected / Salesforce refused)
|
|
29048
29057
|
* - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
|
|
29049
29058
|
* - **start_call**: `'success'` | `'permission_required'` | `'failed'`
|
|
29050
29059
|
* - **a_b_split**: `'a'` | `'b'`
|
|
@@ -29108,14 +29117,14 @@ type WorkflowNode = {
|
|
|
29108
29117
|
*/
|
|
29109
29118
|
id: string;
|
|
29110
29119
|
/**
|
|
29111
|
-
* Node kind. The
|
|
29120
|
+
* Node kind. The 18 supported types break into four groups:
|
|
29112
29121
|
* messaging (send_message),
|
|
29113
29122
|
* control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
|
|
29114
29123
|
* data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
|
|
29115
|
-
* integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
|
|
29124
|
+
* integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, ai, handoff, start_call).
|
|
29116
29125
|
*
|
|
29117
29126
|
*/
|
|
29118
|
-
type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29127
|
+
type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29119
29128
|
/**
|
|
29120
29129
|
* Type-specific settings. Every string field supports `{{variable}}` interpolation against the run's variable bag, resolved at execution time.
|
|
29121
29130
|
*
|
|
@@ -29203,6 +29212,16 @@ type WorkflowNode = {
|
|
|
29203
29212
|
* - Saves `{ id, created }` (or `{ error }`) to `vars[saveAs]` (default `hubspotContact`).
|
|
29204
29213
|
* - Edges: `'success'` | `'error'` (HubSpot not connected, or HubSpot refused the write).
|
|
29205
29214
|
*
|
|
29215
|
+
* **salesforce_upsert_contact**: `{ email, phone, firstName, lastName, properties, createAs, saveAs }`. Creates or updates the run contact as a Lead or Contact in the profile's connected Salesforce org.
|
|
29216
|
+
*
|
|
29217
|
+
* - Updates the record already linked by inbox sync, else one matching by email, then phone (any phone field; Contacts before open Leads); otherwise creates one.
|
|
29218
|
+
* - An existing record gets only the fields the node sets (a value that resolves to an empty string is skipped).
|
|
29219
|
+
* - A new one also takes the Zernio contact's name, email and phone for anything left out. A missing LastName falls back to the email or phone, and a new Lead gets Company `[not provided]` unless `properties` sets it.
|
|
29220
|
+
* - `phone` is written to `MobilePhone`. `properties` maps Salesforce field API names (`LeadSource`, `Title`, `Custom__c`) to values (at most 50).
|
|
29221
|
+
* - `createAs`: `lead` | `contact`, what a person new to Salesforce becomes (default: the connection's `createAs` setting).
|
|
29222
|
+
* - Saves `{ id, type, created }` (`type` is `Lead` or `Contact`), or `{ error }`, to `vars[saveAs]` (default `salesforceContact`).
|
|
29223
|
+
* - Edges: `'success'` | `'error'` (Salesforce not connected, or Salesforce refused the write, such as a validation rule or a required field).
|
|
29224
|
+
*
|
|
29206
29225
|
* **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'`.
|
|
29207
29226
|
*
|
|
29208
29227
|
* **handoff**: `{ note, assignTo }`. Terminates the run as `exited` and flags the conversation for a human operator.
|
|
@@ -29236,14 +29255,14 @@ type WorkflowNode = {
|
|
|
29236
29255
|
label?: string;
|
|
29237
29256
|
};
|
|
29238
29257
|
/**
|
|
29239
|
-
* Node kind. The
|
|
29258
|
+
* Node kind. The 18 supported types break into four groups:
|
|
29240
29259
|
* messaging (send_message),
|
|
29241
29260
|
* control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
|
|
29242
29261
|
* data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
|
|
29243
|
-
* integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
|
|
29262
|
+
* integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, ai, handoff, start_call).
|
|
29244
29263
|
*
|
|
29245
29264
|
*/
|
|
29246
|
-
type type40 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29265
|
+
type type40 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29247
29266
|
/**
|
|
29248
29267
|
* A single X API operation with its per-call price and the Zernio platform methods that trigger it.
|
|
29249
29268
|
*/
|
|
@@ -36174,6 +36193,13 @@ type GetConnectUrlData = {
|
|
|
36174
36193
|
*
|
|
36175
36194
|
*/
|
|
36176
36195
|
brandName?: string;
|
|
36196
|
+
/**
|
|
36197
|
+
* WhatsApp with `signup=hosted` only; ignored on other flows. The number (E.164) the user must connect. If they pick a different number in Meta's popup, the hosted page ends with a 409 `NUMBER_MISMATCH` naming the number they picked, and nothing is saved.
|
|
36198
|
+
*
|
|
36199
|
+
* Use it to reconnect a known number safely. For a number bought from Zernio, the hosted page already expects that number and this value is ignored.
|
|
36200
|
+
*
|
|
36201
|
+
*/
|
|
36202
|
+
expectedPhoneNumber?: string;
|
|
36177
36203
|
/**
|
|
36178
36204
|
* Only connect if the login lands on this platform account. Any other account ends the flow with `error=account_mismatch` (a 409 `account_mismatch` on POST /v1/connect/instagram/select-account) and nothing is written.
|
|
36179
36205
|
*
|
|
@@ -42854,6 +42880,14 @@ type UpdateSalesforceSettingsData = {
|
|
|
42854
42880
|
* Mark sent messages in the transcript as delivered, read or failed.
|
|
42855
42881
|
*/
|
|
42856
42882
|
logDeliveryStatus?: boolean;
|
|
42883
|
+
/**
|
|
42884
|
+
* Count closed-won Opportunities as sales on the ad campaign named by their Primary Campaign Source, in campaign results and ad rules. Turning it on also fills in the Opportunities won in the last 90 days. Lost or reopened Opportunities stop counting.
|
|
42885
|
+
*/
|
|
42886
|
+
useOpportunitiesInResults?: boolean;
|
|
42887
|
+
/**
|
|
42888
|
+
* Send each newly closed-won Opportunity once as a Purchase event (source `salesforce`, event id `salesforce_opp_{orgId}_{opportunityId}`) to the profile's event destinations, with the email and phone of its primary contact role, else the first Contact of its Account. Opportunities won before it was turned on are not sent.
|
|
42889
|
+
*/
|
|
42890
|
+
reportOpportunitiesToAds?: boolean;
|
|
42857
42891
|
};
|
|
42858
42892
|
path: {
|
|
42859
42893
|
accountId: string;
|
|
@@ -72325,7 +72359,7 @@ type ListEventsData = {
|
|
|
72325
72359
|
/**
|
|
72326
72360
|
* Only events from this source, such as `stripe` for the payments of a connected Stripe account.
|
|
72327
72361
|
*/
|
|
72328
|
-
source?: 'api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web';
|
|
72362
|
+
source?: 'api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce';
|
|
72329
72363
|
/**
|
|
72330
72364
|
* Only events before this time (ISO 8601, on the event time).
|
|
72331
72365
|
*/
|
|
@@ -72884,7 +72918,7 @@ type CreateForwardingRuleData = {
|
|
|
72884
72918
|
/**
|
|
72885
72919
|
* Forward only events from these sources, such as only `web` for a tracked website. Leave it out to forward events from every source.
|
|
72886
72920
|
*/
|
|
72887
|
-
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web')>;
|
|
72921
|
+
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce')>;
|
|
72888
72922
|
/**
|
|
72889
72923
|
* Google Analytics streams only: the stream's Measurement Protocol API secret (GA4 Admin › Data streams). Optional when the connection has edit access, since Zernio then creates it. Checked against Google's validation server, stored encrypted, never returned. Change it with `PATCH /v1/events/forwarding-rules/{ruleId}`.
|
|
72890
72924
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -14371,7 +14371,7 @@ type ForwardingRule = {
|
|
|
14371
14371
|
/**
|
|
14372
14372
|
* Event sources forwarded to this destination; null forwards events from every source.
|
|
14373
14373
|
*/
|
|
14374
|
-
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web')> | null;
|
|
14374
|
+
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce')> | null;
|
|
14375
14375
|
/**
|
|
14376
14376
|
* Only when an `apiSecret` was saved by this request. Google Analytics never confirms a Measurement Protocol API secret, so it is `false` there: the first events in GA4 Realtime prove the secret is right.
|
|
14377
14377
|
*/
|
|
@@ -20078,6 +20078,14 @@ type SalesforceSettings = {
|
|
|
20078
20078
|
message: string;
|
|
20079
20079
|
at: string;
|
|
20080
20080
|
} | null;
|
|
20081
|
+
/**
|
|
20082
|
+
* Whether closed-won Opportunities count as sales (Amount, in the Opportunity's or the org's currency) on the ad campaign named by their Primary Campaign Source, in campaign results and ad rules. Lost or reopened Opportunities stop counting.
|
|
20083
|
+
*/
|
|
20084
|
+
useOpportunitiesInResults: boolean;
|
|
20085
|
+
/**
|
|
20086
|
+
* Whether Zernio sends newly closed-won Opportunities as Purchase events (source `salesforce`) to the profile's event destinations.
|
|
20087
|
+
*/
|
|
20088
|
+
reportOpportunitiesToAds: boolean;
|
|
20081
20089
|
};
|
|
20082
20090
|
type platform16 = 'salesforce';
|
|
20083
20091
|
/**
|
|
@@ -20513,7 +20521,7 @@ type StoredEvent = {
|
|
|
20513
20521
|
*/
|
|
20514
20522
|
profileId?: string;
|
|
20515
20523
|
/**
|
|
20516
|
-
* Where the event came from: `api`, `relay`, `web`, `shopify`, `woocommerce`, `hubspot`, `meta_leads`, `google_leads`, `linkedin_leads` or `tiktok_leads`.
|
|
20524
|
+
* Where the event came from: `api`, `relay`, `web`, `shopify`, `woocommerce`, `stripe`, `hubspot`, `salesforce`, `meta_leads`, `google_leads`, `linkedin_leads` or `tiktok_leads`.
|
|
20517
20525
|
*/
|
|
20518
20526
|
source?: string;
|
|
20519
20527
|
eventName?: string;
|
|
@@ -25718,7 +25726,7 @@ type WebhookPayloadConversion = {
|
|
|
25718
25726
|
eventTime: string;
|
|
25719
25727
|
receivedAt: string;
|
|
25720
25728
|
/**
|
|
25721
|
-
* Who sent it: `api`, `relay`, a lead form (`meta_leads`, `google_leads`, `linkedin_leads`, `tiktok_leads`), a store (`shopify`, `woocommerce`), `stripe` or `
|
|
25729
|
+
* Who sent it: `api`, `relay`, a lead form (`meta_leads`, `google_leads`, `linkedin_leads`, `tiktok_leads`), a store (`shopify`, `woocommerce`), `stripe`, `hubspot` or `salesforce`.
|
|
25722
25730
|
*/
|
|
25723
25731
|
source: string;
|
|
25724
25732
|
actionSource?: (string) | null;
|
|
@@ -29045,6 +29053,7 @@ type WorkflowEdge = {
|
|
|
29045
29053
|
* - **wait_for_reply**: `'reply'` (contact replied) | `'timeout'` (no reply in window)
|
|
29046
29054
|
* - **webhook**: `'success'` (2xx) | `'error'` (non-2xx / fetch failed)
|
|
29047
29055
|
* - **hubspot_upsert_contact**: `'success'` | `'error'` (not connected / HubSpot refused)
|
|
29056
|
+
* - **salesforce_upsert_contact**: `'success'` | `'error'` (not connected / Salesforce refused)
|
|
29048
29057
|
* - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
|
|
29049
29058
|
* - **start_call**: `'success'` | `'permission_required'` | `'failed'`
|
|
29050
29059
|
* - **a_b_split**: `'a'` | `'b'`
|
|
@@ -29108,14 +29117,14 @@ type WorkflowNode = {
|
|
|
29108
29117
|
*/
|
|
29109
29118
|
id: string;
|
|
29110
29119
|
/**
|
|
29111
|
-
* Node kind. The
|
|
29120
|
+
* Node kind. The 18 supported types break into four groups:
|
|
29112
29121
|
* messaging (send_message),
|
|
29113
29122
|
* control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
|
|
29114
29123
|
* data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
|
|
29115
|
-
* integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
|
|
29124
|
+
* integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, ai, handoff, start_call).
|
|
29116
29125
|
*
|
|
29117
29126
|
*/
|
|
29118
|
-
type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29127
|
+
type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29119
29128
|
/**
|
|
29120
29129
|
* Type-specific settings. Every string field supports `{{variable}}` interpolation against the run's variable bag, resolved at execution time.
|
|
29121
29130
|
*
|
|
@@ -29203,6 +29212,16 @@ type WorkflowNode = {
|
|
|
29203
29212
|
* - Saves `{ id, created }` (or `{ error }`) to `vars[saveAs]` (default `hubspotContact`).
|
|
29204
29213
|
* - Edges: `'success'` | `'error'` (HubSpot not connected, or HubSpot refused the write).
|
|
29205
29214
|
*
|
|
29215
|
+
* **salesforce_upsert_contact**: `{ email, phone, firstName, lastName, properties, createAs, saveAs }`. Creates or updates the run contact as a Lead or Contact in the profile's connected Salesforce org.
|
|
29216
|
+
*
|
|
29217
|
+
* - Updates the record already linked by inbox sync, else one matching by email, then phone (any phone field; Contacts before open Leads); otherwise creates one.
|
|
29218
|
+
* - An existing record gets only the fields the node sets (a value that resolves to an empty string is skipped).
|
|
29219
|
+
* - A new one also takes the Zernio contact's name, email and phone for anything left out. A missing LastName falls back to the email or phone, and a new Lead gets Company `[not provided]` unless `properties` sets it.
|
|
29220
|
+
* - `phone` is written to `MobilePhone`. `properties` maps Salesforce field API names (`LeadSource`, `Title`, `Custom__c`) to values (at most 50).
|
|
29221
|
+
* - `createAs`: `lead` | `contact`, what a person new to Salesforce becomes (default: the connection's `createAs` setting).
|
|
29222
|
+
* - Saves `{ id, type, created }` (`type` is `Lead` or `Contact`), or `{ error }`, to `vars[saveAs]` (default `salesforceContact`).
|
|
29223
|
+
* - Edges: `'success'` | `'error'` (Salesforce not connected, or Salesforce refused the write, such as a validation rule or a required field).
|
|
29224
|
+
*
|
|
29206
29225
|
* **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'`.
|
|
29207
29226
|
*
|
|
29208
29227
|
* **handoff**: `{ note, assignTo }`. Terminates the run as `exited` and flags the conversation for a human operator.
|
|
@@ -29236,14 +29255,14 @@ type WorkflowNode = {
|
|
|
29236
29255
|
label?: string;
|
|
29237
29256
|
};
|
|
29238
29257
|
/**
|
|
29239
|
-
* Node kind. The
|
|
29258
|
+
* Node kind. The 18 supported types break into four groups:
|
|
29240
29259
|
* messaging (send_message),
|
|
29241
29260
|
* control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
|
|
29242
29261
|
* data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
|
|
29243
|
-
* integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
|
|
29262
|
+
* integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, ai, handoff, start_call).
|
|
29244
29263
|
*
|
|
29245
29264
|
*/
|
|
29246
|
-
type type40 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29265
|
+
type type40 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
29247
29266
|
/**
|
|
29248
29267
|
* A single X API operation with its per-call price and the Zernio platform methods that trigger it.
|
|
29249
29268
|
*/
|
|
@@ -36174,6 +36193,13 @@ type GetConnectUrlData = {
|
|
|
36174
36193
|
*
|
|
36175
36194
|
*/
|
|
36176
36195
|
brandName?: string;
|
|
36196
|
+
/**
|
|
36197
|
+
* WhatsApp with `signup=hosted` only; ignored on other flows. The number (E.164) the user must connect. If they pick a different number in Meta's popup, the hosted page ends with a 409 `NUMBER_MISMATCH` naming the number they picked, and nothing is saved.
|
|
36198
|
+
*
|
|
36199
|
+
* Use it to reconnect a known number safely. For a number bought from Zernio, the hosted page already expects that number and this value is ignored.
|
|
36200
|
+
*
|
|
36201
|
+
*/
|
|
36202
|
+
expectedPhoneNumber?: string;
|
|
36177
36203
|
/**
|
|
36178
36204
|
* Only connect if the login lands on this platform account. Any other account ends the flow with `error=account_mismatch` (a 409 `account_mismatch` on POST /v1/connect/instagram/select-account) and nothing is written.
|
|
36179
36205
|
*
|
|
@@ -42854,6 +42880,14 @@ type UpdateSalesforceSettingsData = {
|
|
|
42854
42880
|
* Mark sent messages in the transcript as delivered, read or failed.
|
|
42855
42881
|
*/
|
|
42856
42882
|
logDeliveryStatus?: boolean;
|
|
42883
|
+
/**
|
|
42884
|
+
* Count closed-won Opportunities as sales on the ad campaign named by their Primary Campaign Source, in campaign results and ad rules. Turning it on also fills in the Opportunities won in the last 90 days. Lost or reopened Opportunities stop counting.
|
|
42885
|
+
*/
|
|
42886
|
+
useOpportunitiesInResults?: boolean;
|
|
42887
|
+
/**
|
|
42888
|
+
* Send each newly closed-won Opportunity once as a Purchase event (source `salesforce`, event id `salesforce_opp_{orgId}_{opportunityId}`) to the profile's event destinations, with the email and phone of its primary contact role, else the first Contact of its Account. Opportunities won before it was turned on are not sent.
|
|
42889
|
+
*/
|
|
42890
|
+
reportOpportunitiesToAds?: boolean;
|
|
42857
42891
|
};
|
|
42858
42892
|
path: {
|
|
42859
42893
|
accountId: string;
|
|
@@ -72325,7 +72359,7 @@ type ListEventsData = {
|
|
|
72325
72359
|
/**
|
|
72326
72360
|
* Only events from this source, such as `stripe` for the payments of a connected Stripe account.
|
|
72327
72361
|
*/
|
|
72328
|
-
source?: 'api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web';
|
|
72362
|
+
source?: 'api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce';
|
|
72329
72363
|
/**
|
|
72330
72364
|
* Only events before this time (ISO 8601, on the event time).
|
|
72331
72365
|
*/
|
|
@@ -72884,7 +72918,7 @@ type CreateForwardingRuleData = {
|
|
|
72884
72918
|
/**
|
|
72885
72919
|
* Forward only events from these sources, such as only `web` for a tracked website. Leave it out to forward events from every source.
|
|
72886
72920
|
*/
|
|
72887
|
-
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web')>;
|
|
72921
|
+
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce')>;
|
|
72888
72922
|
/**
|
|
72889
72923
|
* Google Analytics streams only: the stream's Measurement Protocol API secret (GA4 Admin › Data streams). Optional when the connection has edit access, since Zernio then creates it. Checked against Google's validation server, stored encrypted, never returned. Change it with `PATCH /v1/events/forwarding-rules/{ruleId}`.
|
|
72890
72924
|
*/
|
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.
|
|
39
|
+
version: "0.2.1703",
|
|
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.
|
|
8
|
+
version: "0.2.1703",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -5465,7 +5465,7 @@ export const getSalesforceSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
5465
5465
|
|
|
5466
5466
|
/**
|
|
5467
5467
|
* Update Salesforce account settings
|
|
5468
|
-
* Turn person creation, conversation logging
|
|
5468
|
+
* Turn person creation, conversation logging, delivery marks or closed-won Opportunities (in ad results, to ad platforms) on or off for a connected Salesforce org, or choose whether new people become Leads or Contacts. Send at least one field; omitted fields keep their value. Settings survive reconnecting the same org.
|
|
5469
5469
|
*/
|
|
5470
5470
|
export const updateSalesforceSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateSalesforceSettingsData, ThrowOnError>) => {
|
|
5471
5471
|
return (options?.client ?? client).patch<UpdateSalesforceSettingsResponse, UpdateSalesforceSettingsError, ThrowOnError>({
|
|
@@ -12384,7 +12384,7 @@ export type ForwardingRule = {
|
|
|
12384
12384
|
/**
|
|
12385
12385
|
* Event sources forwarded to this destination; null forwards events from every source.
|
|
12386
12386
|
*/
|
|
12387
|
-
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web')> | null;
|
|
12387
|
+
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce')> | null;
|
|
12388
12388
|
/**
|
|
12389
12389
|
* Only when an `apiSecret` was saved by this request. Google Analytics never confirms a Measurement Protocol API secret, so it is `false` there: the first events in GA4 Realtime prove the secret is right.
|
|
12390
12390
|
*/
|
|
@@ -18380,6 +18380,14 @@ export type SalesforceSettings = {
|
|
|
18380
18380
|
message: string;
|
|
18381
18381
|
at: string;
|
|
18382
18382
|
} | null;
|
|
18383
|
+
/**
|
|
18384
|
+
* Whether closed-won Opportunities count as sales (Amount, in the Opportunity's or the org's currency) on the ad campaign named by their Primary Campaign Source, in campaign results and ad rules. Lost or reopened Opportunities stop counting.
|
|
18385
|
+
*/
|
|
18386
|
+
useOpportunitiesInResults: boolean;
|
|
18387
|
+
/**
|
|
18388
|
+
* Whether Zernio sends newly closed-won Opportunities as Purchase events (source `salesforce`) to the profile's event destinations.
|
|
18389
|
+
*/
|
|
18390
|
+
reportOpportunitiesToAds: boolean;
|
|
18383
18391
|
};
|
|
18384
18392
|
|
|
18385
18393
|
export type platform16 = 'salesforce';
|
|
@@ -18833,7 +18841,7 @@ export type StoredEvent = {
|
|
|
18833
18841
|
*/
|
|
18834
18842
|
profileId?: string;
|
|
18835
18843
|
/**
|
|
18836
|
-
* Where the event came from: `api`, `relay`, `web`, `shopify`, `woocommerce`, `hubspot`, `meta_leads`, `google_leads`, `linkedin_leads` or `tiktok_leads`.
|
|
18844
|
+
* Where the event came from: `api`, `relay`, `web`, `shopify`, `woocommerce`, `stripe`, `hubspot`, `salesforce`, `meta_leads`, `google_leads`, `linkedin_leads` or `tiktok_leads`.
|
|
18837
18845
|
*/
|
|
18838
18846
|
source?: string;
|
|
18839
18847
|
eventName?: string;
|
|
@@ -24267,7 +24275,7 @@ export type WebhookPayloadConversion = {
|
|
|
24267
24275
|
eventTime: string;
|
|
24268
24276
|
receivedAt: string;
|
|
24269
24277
|
/**
|
|
24270
|
-
* Who sent it: `api`, `relay`, a lead form (`meta_leads`, `google_leads`, `linkedin_leads`, `tiktok_leads`), a store (`shopify`, `woocommerce`), `stripe` or `
|
|
24278
|
+
* Who sent it: `api`, `relay`, a lead form (`meta_leads`, `google_leads`, `linkedin_leads`, `tiktok_leads`), a store (`shopify`, `woocommerce`), `stripe`, `hubspot` or `salesforce`.
|
|
24271
24279
|
*/
|
|
24272
24280
|
source: string;
|
|
24273
24281
|
actionSource?: (string) | null;
|
|
@@ -27733,6 +27741,7 @@ export type WorkflowEdge = {
|
|
|
27733
27741
|
* - **wait_for_reply**: `'reply'` (contact replied) | `'timeout'` (no reply in window)
|
|
27734
27742
|
* - **webhook**: `'success'` (2xx) | `'error'` (non-2xx / fetch failed)
|
|
27735
27743
|
* - **hubspot_upsert_contact**: `'success'` | `'error'` (not connected / HubSpot refused)
|
|
27744
|
+
* - **salesforce_upsert_contact**: `'success'` | `'error'` (not connected / Salesforce refused)
|
|
27736
27745
|
* - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
|
|
27737
27746
|
* - **start_call**: `'success'` | `'permission_required'` | `'failed'`
|
|
27738
27747
|
* - **a_b_split**: `'a'` | `'b'`
|
|
@@ -27800,14 +27809,14 @@ export type WorkflowNode = {
|
|
|
27800
27809
|
*/
|
|
27801
27810
|
id: string;
|
|
27802
27811
|
/**
|
|
27803
|
-
* Node kind. The
|
|
27812
|
+
* Node kind. The 18 supported types break into four groups:
|
|
27804
27813
|
* messaging (send_message),
|
|
27805
27814
|
* control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
|
|
27806
27815
|
* data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
|
|
27807
|
-
* integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
|
|
27816
|
+
* integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, ai, handoff, start_call).
|
|
27808
27817
|
*
|
|
27809
27818
|
*/
|
|
27810
|
-
type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
27819
|
+
type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
27811
27820
|
/**
|
|
27812
27821
|
* Type-specific settings. Every string field supports `{{variable}}` interpolation against the run's variable bag, resolved at execution time.
|
|
27813
27822
|
*
|
|
@@ -27895,6 +27904,16 @@ export type WorkflowNode = {
|
|
|
27895
27904
|
* - Saves `{ id, created }` (or `{ error }`) to `vars[saveAs]` (default `hubspotContact`).
|
|
27896
27905
|
* - Edges: `'success'` | `'error'` (HubSpot not connected, or HubSpot refused the write).
|
|
27897
27906
|
*
|
|
27907
|
+
* **salesforce_upsert_contact**: `{ email, phone, firstName, lastName, properties, createAs, saveAs }`. Creates or updates the run contact as a Lead or Contact in the profile's connected Salesforce org.
|
|
27908
|
+
*
|
|
27909
|
+
* - Updates the record already linked by inbox sync, else one matching by email, then phone (any phone field; Contacts before open Leads); otherwise creates one.
|
|
27910
|
+
* - An existing record gets only the fields the node sets (a value that resolves to an empty string is skipped).
|
|
27911
|
+
* - A new one also takes the Zernio contact's name, email and phone for anything left out. A missing LastName falls back to the email or phone, and a new Lead gets Company `[not provided]` unless `properties` sets it.
|
|
27912
|
+
* - `phone` is written to `MobilePhone`. `properties` maps Salesforce field API names (`LeadSource`, `Title`, `Custom__c`) to values (at most 50).
|
|
27913
|
+
* - `createAs`: `lead` | `contact`, what a person new to Salesforce becomes (default: the connection's `createAs` setting).
|
|
27914
|
+
* - Saves `{ id, type, created }` (`type` is `Lead` or `Contact`), or `{ error }`, to `vars[saveAs]` (default `salesforceContact`).
|
|
27915
|
+
* - Edges: `'success'` | `'error'` (Salesforce not connected, or Salesforce refused the write, such as a validation rule or a required field).
|
|
27916
|
+
*
|
|
27898
27917
|
* **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'`.
|
|
27899
27918
|
*
|
|
27900
27919
|
* **handoff**: `{ note, assignTo }`. Terminates the run as `exited` and flags the conversation for a human operator.
|
|
@@ -27929,14 +27948,14 @@ export type WorkflowNode = {
|
|
|
27929
27948
|
};
|
|
27930
27949
|
|
|
27931
27950
|
/**
|
|
27932
|
-
* Node kind. The
|
|
27951
|
+
* Node kind. The 18 supported types break into four groups:
|
|
27933
27952
|
* messaging (send_message),
|
|
27934
27953
|
* control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
|
|
27935
27954
|
* data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
|
|
27936
|
-
* integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
|
|
27955
|
+
* integrations (webhook, hubspot_upsert_contact, salesforce_upsert_contact, ai, handoff, start_call).
|
|
27937
27956
|
*
|
|
27938
27957
|
*/
|
|
27939
|
-
export type type40 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
27958
|
+
export type type40 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'hubspot_upsert_contact' | 'salesforce_upsert_contact' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
27940
27959
|
|
|
27941
27960
|
/**
|
|
27942
27961
|
* A single X API operation with its per-call price and the Zernio platform methods that trigger it.
|
|
@@ -35306,6 +35325,13 @@ export type GetConnectUrlData = {
|
|
|
35306
35325
|
*
|
|
35307
35326
|
*/
|
|
35308
35327
|
brandName?: string;
|
|
35328
|
+
/**
|
|
35329
|
+
* WhatsApp with `signup=hosted` only; ignored on other flows. The number (E.164) the user must connect. If they pick a different number in Meta's popup, the hosted page ends with a 409 `NUMBER_MISMATCH` naming the number they picked, and nothing is saved.
|
|
35330
|
+
*
|
|
35331
|
+
* Use it to reconnect a known number safely. For a number bought from Zernio, the hosted page already expects that number and this value is ignored.
|
|
35332
|
+
*
|
|
35333
|
+
*/
|
|
35334
|
+
expectedPhoneNumber?: string;
|
|
35309
35335
|
/**
|
|
35310
35336
|
* Only connect if the login lands on this platform account. Any other account ends the flow with `error=account_mismatch` (a 409 `account_mismatch` on POST /v1/connect/instagram/select-account) and nothing is written.
|
|
35311
35337
|
*
|
|
@@ -42387,6 +42413,14 @@ export type UpdateSalesforceSettingsData = {
|
|
|
42387
42413
|
* Mark sent messages in the transcript as delivered, read or failed.
|
|
42388
42414
|
*/
|
|
42389
42415
|
logDeliveryStatus?: boolean;
|
|
42416
|
+
/**
|
|
42417
|
+
* Count closed-won Opportunities as sales on the ad campaign named by their Primary Campaign Source, in campaign results and ad rules. Turning it on also fills in the Opportunities won in the last 90 days. Lost or reopened Opportunities stop counting.
|
|
42418
|
+
*/
|
|
42419
|
+
useOpportunitiesInResults?: boolean;
|
|
42420
|
+
/**
|
|
42421
|
+
* Send each newly closed-won Opportunity once as a Purchase event (source `salesforce`, event id `salesforce_opp_{orgId}_{opportunityId}`) to the profile's event destinations, with the email and phone of its primary contact role, else the first Contact of its Account. Opportunities won before it was turned on are not sent.
|
|
42422
|
+
*/
|
|
42423
|
+
reportOpportunitiesToAds?: boolean;
|
|
42390
42424
|
};
|
|
42391
42425
|
path: {
|
|
42392
42426
|
accountId: string;
|
|
@@ -74055,7 +74089,7 @@ export type ListEventsData = {
|
|
|
74055
74089
|
/**
|
|
74056
74090
|
* Only events from this source, such as `stripe` for the payments of a connected Stripe account.
|
|
74057
74091
|
*/
|
|
74058
|
-
source?: 'api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web';
|
|
74092
|
+
source?: 'api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce';
|
|
74059
74093
|
/**
|
|
74060
74094
|
* Only events before this time (ISO 8601, on the event time).
|
|
74061
74095
|
*/
|
|
@@ -74650,7 +74684,7 @@ export type CreateForwardingRuleData = {
|
|
|
74650
74684
|
/**
|
|
74651
74685
|
* Forward only events from these sources, such as only `web` for a tracked website. Leave it out to forward events from every source.
|
|
74652
74686
|
*/
|
|
74653
|
-
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web')>;
|
|
74687
|
+
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce')>;
|
|
74654
74688
|
/**
|
|
74655
74689
|
* Google Analytics streams only: the stream's Measurement Protocol API secret (GA4 Admin › Data streams). Optional when the connection has edit access, since Zernio then creates it. Checked against Google's validation server, stored encrypted, never returned. Change it with `PATCH /v1/events/forwarding-rules/{ruleId}`.
|
|
74656
74690
|
*/
|