@getlatedev/node 0.2.1246 → 0.2.1248

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.
@@ -4343,6 +4343,18 @@ export type ConnectedApp = {
4343
4343
  tokenCount?: number;
4344
4344
  };
4345
4345
 
4346
+ export type ConnectWelcomeScreen = {
4347
+ showByDefault?: boolean;
4348
+ brandName?: (string) | null;
4349
+ logoUrl?: (string) | null;
4350
+ /**
4351
+ * Same keys as the `welcomeTheme` parameter of `GET /v1/connect/{platform}`.
4352
+ */
4353
+ theme?: {
4354
+ [key: string]: unknown;
4355
+ } | null;
4356
+ };
4357
+
4346
4358
  /**
4347
4359
  * A Google Ads conversion action, e.g. a WEBPAGE conversion created via
4348
4360
  * `createConversionAction`. Returned by `listConversionActions` and
@@ -16779,6 +16791,7 @@ export type WorkflowEdge = {
16779
16791
  * - **condition**: a rule's `id`, or `'default'` (no rule matched)
16780
16792
  * - **wait_for_reply**: `'reply'` (contact replied) | `'timeout'` (no reply in window)
16781
16793
  * - **webhook**: `'success'` (2xx) | `'error'` (non-2xx / fetch failed)
16794
+ * - **hubspot_upsert_contact**: `'success'` | `'error'` (not connected / HubSpot refused)
16782
16795
  * - **ai**: `'success'` (text/JSON response) | `'tool:<toolName>'` (model invoked
16783
16796
  * that tool) | `'error'` (upstream failure / non-JSON in JSON mode)
16784
16797
  * - **start_call**: `'success'` | `'permission_required'` | `'failed'`
@@ -16847,14 +16860,14 @@ export type WorkflowNode = {
16847
16860
  */
16848
16861
  id: string;
16849
16862
  /**
16850
- * Node kind. The 16 supported types break into four groups:
16863
+ * Node kind. The 17 supported types break into four groups:
16851
16864
  * messaging (send_message),
16852
16865
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
16853
16866
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
16854
- * integrations (webhook, ai, handoff, start_call).
16867
+ * integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
16855
16868
  *
16856
16869
  */
16857
- type: 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
16870
+ 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';
16858
16871
  /**
16859
16872
  * Type-specific settings. All string fields support `{{variable}}` interpolation against the run's variable bag (resolved at execution time).
16860
16873
  *
@@ -16875,6 +16888,8 @@ export type WorkflowNode = {
16875
16888
  *
16876
16889
  * **webhook**: `{ url, method: GET|POST|PUT|PATCH|DELETE, headers, bodyTemplate, saveAs }`. SSRF-guarded (private/loopback/metadata IPs rejected). Response saved as `{ status, ok, body }` to `vars[saveAs]`. Edge: `'success'` on 2xx, `'error'` otherwise.
16877
16890
  *
16891
+ * **hubspot_upsert_contact**: `{ email, phone, firstName, lastName, properties, saveAs }`. Creates or updates the run contact in the profile's connected HubSpot portal: the contact already linked by inbox sync, else one matching by email, then phone, is updated; otherwise one is created. An existing contact gets only the fields the node sets (a value that resolves to an empty string is skipped); a new one also takes the Zernio contact's name, email and phone for anything left out. `properties` maps HubSpot internal property names to values (at most 50). Saves `{ id, created }` (or `{ error }`) to `vars[saveAs]` (default `hubspotContact`). Edges: `'success'` | `'error'` (HubSpot not connected, or HubSpot refused the write).
16892
+ *
16878
16893
  * **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'`.
16879
16894
  *
16880
16895
  * **handoff**: `{ note, assignTo }`. Terminates the run as `exited`, flags the conversation for a human operator.
@@ -16909,14 +16924,14 @@ export type WorkflowNode = {
16909
16924
  };
16910
16925
 
16911
16926
  /**
16912
- * Node kind. The 16 supported types break into four groups:
16927
+ * Node kind. The 17 supported types break into four groups:
16913
16928
  * messaging (send_message),
16914
16929
  * control flow (trigger, condition, delay, wait_for_reply, a_b_split, end),
16915
16930
  * data ops (set_variable, set_field, add_tag, remove_tag, enroll_sequence),
16916
- * integrations (webhook, ai, handoff, start_call).
16931
+ * integrations (webhook, hubspot_upsert_contact, ai, handoff, start_call).
16917
16932
  *
16918
16933
  */
16919
- export type type21 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
16934
+ export type type21 = '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';
16920
16935
 
16921
16936
  /**
16922
16937
  * A single X API operation with its per-call price and the Zernio platform methods that trigger it.
@@ -21457,7 +21472,7 @@ export type GetConnectUrlData = {
21457
21472
  */
21458
21473
  loginMethod?: 'instagram_login' | 'facebook_login';
21459
21474
  /**
21460
- * Welcome screen only (`welcome=true`): https URL of your logo, shown in a square tile, so use a square image. Without it the tile shows the first letter of `brandName`, or the Zernio mark when there is no `brandName` either. Rejected with 400 `INVALID_FIELD_VALUE` without `welcome=true`.
21475
+ * Welcome screen only (`welcome=true`): https URL of your logo, shown in a square tile, so use a square image. Without it the tile shows the first letter of `brandName`, or the Zernio mark when there is no `brandName` either. Rejected with 400 `INVALID_FIELD_VALUE` when the welcome screen is not shown.
21461
21476
  */
21462
21477
  logoUrl?: string;
21463
21478
  /**
@@ -21658,11 +21673,11 @@ export type GetConnectUrlData = {
21658
21673
  */
21659
21674
  signup?: 'hosted';
21660
21675
  /**
21661
- * Any platform. When `true`, `authUrl` points to a Zernio-hosted welcome screen that shows your brand next to the platform ("<brandName> wants to connect to your <platform>") with a Continue button; Continue sends the user to the platform's own authorization screen and the rest of the flow is unchanged. `brandName`, `logoUrl`, `primaryColor` and `welcomeTheme` are optional and default to Zernio's own name, mark and look. The link is valid for 30 minutes, after which the page asks the user to start again. The brand also carries to the account and channel pickers Zernio shows after authorization, and when you pass no `redirect_url` the flow ends on a branded Zernio-hosted page saying whether the account connected, instead of the Zernio dashboard. Cannot be combined with `headless=true` or `signup=hosted` (400 `INVALID_FIELD_VALUE`). The platform's authorization screen still names the Zernio app.
21676
+ * Any platform. When `true`, `authUrl` points to a Zernio-hosted welcome screen that shows your brand next to the platform ("<brandName> wants to connect to your <platform>") whose button fills for about a second and then sends the user on to the platform's own authorization screen, with no click; the rest of the flow is unchanged. `brandName`, `logoUrl`, `primaryColor` and `welcomeTheme` are optional and default to Zernio's own name, mark and look. The link is valid for 30 minutes, after which the page asks the user to start again. The brand also carries to the account and channel pickers Zernio shows after authorization, and when you pass no `redirect_url` the flow ends on a branded Zernio-hosted page saying whether the account connected, instead of the Zernio dashboard. Cannot be combined with `headless=true` or `signup=hosted` (400 `INVALID_FIELD_VALUE`). The platform's authorization screen still names the Zernio app. Recommended. When left out, the screen is shown if the workspace saved it as on by default (`PUT /v1/connect/welcome-screen`), except with `headless=true` or `signup=hosted`; pass `false` to skip it. Branding you leave out of the call comes from those saved settings, and a `welcomeTheme` you send is merged key by key over the saved theme.
21662
21677
  */
21663
21678
  welcome?: boolean;
21664
21679
  /**
21665
- * Welcome screen only (`welcome=true`): a URL-encoded JSON object that restyles and rewords the screen. All keys are optional. Copy: `heading` (up to 120 characters), `trustLine` and `consentLine` (up to 200 each), `buttonLabel` (up to 30); each may contain the placeholders `{brand}` and `{platform}`. Style: `primaryColor`, `pageColor`, `cardColor` and `textColor` as `#RRGGBB`, `cornerRadius` as an integer from 0 to 24 (pixels), `font` as `sans`, `serif` or `mono`. A `primaryColor` here wins over the `primaryColor` parameter. Unknown keys, invalid JSON or an invalid value are a 400 `INVALID_FIELD_VALUE`. Rejected without `welcome=true`. Example: `{"heading":"Link your {platform} to {brand}","cardColor":"#FFF7ED","cornerRadius":12}`.
21680
+ * Welcome screen only (`welcome=true`): a URL-encoded JSON object that restyles and rewords the screen. All keys are optional. Copy: `heading` (up to 120 characters), `trustLine` and `consentLine` (up to 200 each), `buttonLabel` (up to 30, the label on that button); each may contain the placeholders `{brand}` and `{platform}`. Style: `primaryColor`, `pageColor`, `cardColor` and `textColor` as `#RRGGBB`, `cornerRadius` as an integer from 0 to 24 (pixels), `font` as `sans`, `serif` or `mono`. A `primaryColor` here wins over the `primaryColor` parameter. Unknown keys, invalid JSON or an invalid value are a 400 `INVALID_FIELD_VALUE`. Rejected when the welcome screen is not shown. Example: `{"heading":"Link your {platform} to {brand}","cardColor":"#FFF7ED","cornerRadius":12}`.
21666
21681
  */
21667
21682
  welcomeTheme?: string;
21668
21683
  };
@@ -24302,6 +24317,34 @@ export type DeleteGoogleBusinessReviewReplyError = (ErrorResponse | {
24302
24317
  error?: string;
24303
24318
  });
24304
24319
 
24320
+ export type GetConnectWelcomeScreenResponse = (ConnectWelcomeScreen);
24321
+
24322
+ export type GetConnectWelcomeScreenError = (ErrorResponse);
24323
+
24324
+ export type UpdateConnectWelcomeScreenData = {
24325
+ body: {
24326
+ /**
24327
+ * Show the welcome screen on connect calls that do not pass `welcome`.
24328
+ */
24329
+ showByDefault: boolean;
24330
+ brandName?: string;
24331
+ /**
24332
+ * https URL of a square logo.
24333
+ */
24334
+ logoUrl?: string;
24335
+ /**
24336
+ * Same keys as the `welcomeTheme` parameter of `GET /v1/connect/{platform}`, as a JSON object.
24337
+ */
24338
+ theme?: {
24339
+ [key: string]: unknown;
24340
+ };
24341
+ };
24342
+ };
24343
+
24344
+ export type UpdateConnectWelcomeScreenResponse = (ConnectWelcomeScreen);
24345
+
24346
+ export type UpdateConnectWelcomeScreenError = (ErrorResponse | unknown);
24347
+
24305
24348
  export type GetPendingOAuthDataData = {
24306
24349
  query: {
24307
24350
  /**