@getlatedev/node 0.2.1696 → 0.2.1698

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.
@@ -13515,6 +13515,24 @@ export type HubSpotSettings = {
13515
13515
  * Whether Zernio keeps the delivery status (sent, delivered, read, played, failed) of logged outgoing messages up to date on their HubSpot timeline entries. Only applies while `logMessages` is on. Defaults to `true`.
13516
13516
  */
13517
13517
  logDeliveryStatus: boolean;
13518
+ /**
13519
+ * Values Zernio sets on contacts it creates, keyed by HubSpot internal property name, for properties the portal requires on create (for example `lifecyclestage: lead`). The contact's own name, email and phone win. Empty object when none.
13520
+ */
13521
+ contactDefaults: {
13522
+ [key: string]: (string);
13523
+ };
13524
+ /**
13525
+ * Set while the portal refuses to create contacts because it requires properties Zernio does not fill. People already in HubSpot are still matched and their messages logged. Cleared by the next created contact or a change to `contactDefaults`. The account's health shows it too.
13526
+ */
13527
+ syncIssue: {
13528
+ code: 'REQUIRED_CONTACT_PROPERTIES';
13529
+ /**
13530
+ * The required contact properties HubSpot named.
13531
+ */
13532
+ properties: Array<(string)>;
13533
+ message: string;
13534
+ at: string;
13535
+ } | null;
13518
13536
  /**
13519
13537
  * Whether Zernio sends closed-won deals as Purchase events to the profile's event destinations.
13520
13538
  */
@@ -13527,6 +13545,8 @@ export type HubSpotSettings = {
13527
13545
 
13528
13546
  export type platform10 = 'hubspot';
13529
13547
 
13548
+ export type code2 = 'REQUIRED_CONTACT_PROPERTIES';
13549
+
13530
13550
  export type ImapConnectResult = {
13531
13551
  dryRun?: boolean;
13532
13552
  created?: boolean;
@@ -15208,7 +15228,7 @@ export type LinkedInMentionIssue = {
15208
15228
  /**
15209
15229
  * Why it failed.
15210
15230
  */
15211
- export type code2 = 'linkedin_mention_unresolvable' | 'linkedin_mention_requires_page_admin' | 'linkedin_mention_name_unavailable' | 'linkedin_mentions_limit_exceeded' | 'rate_limited' | 'reconnect_required' | 'temporarily_unavailable';
15231
+ export type code3 = 'linkedin_mention_unresolvable' | 'linkedin_mention_requires_page_admin' | 'linkedin_mention_name_unavailable' | 'linkedin_mentions_limit_exceeded' | 'rate_limited' | 'reconnect_required' | 'temporarily_unavailable';
15212
15232
 
15213
15233
  /**
15214
15234
  * LinkedIn post options.
@@ -18301,6 +18321,73 @@ export type RfPrediction = {
18301
18321
  expiresAt?: (string) | null;
18302
18322
  };
18303
18323
 
18324
+ export type SalesforceSettings = {
18325
+ /**
18326
+ * Zernio account ID of the Salesforce connection.
18327
+ */
18328
+ _id: string;
18329
+ platform: 'salesforce';
18330
+ /**
18331
+ * 18-character Salesforce organization ID.
18332
+ */
18333
+ orgId: string;
18334
+ /**
18335
+ * The org's name, when the connected user can read it.
18336
+ */
18337
+ orgName: (string) | null;
18338
+ /**
18339
+ * Whether the org was connected through login.salesforce.com or test.salesforce.com.
18340
+ */
18341
+ environment: 'production' | 'sandbox';
18342
+ /**
18343
+ * The org's API host, for example `https://acme.my.salesforce.com`.
18344
+ */
18345
+ instanceUrl: string;
18346
+ /**
18347
+ * Email or username of the Salesforce user who connected the org.
18348
+ */
18349
+ installedBy: (string) | null;
18350
+ /**
18351
+ * Whether Zernio creates a Lead or Contact (per `createAs`) for an inbox contact that matches nobody by phone or email.
18352
+ */
18353
+ syncContacts: boolean;
18354
+ /**
18355
+ * Whether Zernio logs inbox messages. Each person, channel and UTC day gets one completed Task (subject `WhatsApp conversation · 2026-11-17`) whose Description holds the transcript; a day past 32,000 characters continues in a Task marked "(part 2)".
18356
+ */
18357
+ logMessages: boolean;
18358
+ /**
18359
+ * What a person new to Salesforce is created as.
18360
+ */
18361
+ createAs: 'lead' | 'contact';
18362
+ /**
18363
+ * Whether sent messages in the transcript are marked delivered, read or failed.
18364
+ */
18365
+ logDeliveryStatus: boolean;
18366
+ /**
18367
+ * Set while the org refuses Zernio's writes for a reason only its admin can fix (field-level security, a validation rule, a duplicate rule); cleared by the next accepted write. The account's health shows it too.
18368
+ */
18369
+ syncIssue: {
18370
+ /**
18371
+ * The Salesforce error code, such as `FIELD_CUSTOM_VALIDATION_EXCEPTION`.
18372
+ */
18373
+ code: string;
18374
+ message: string;
18375
+ at: string;
18376
+ } | null;
18377
+ };
18378
+
18379
+ export type platform16 = 'salesforce';
18380
+
18381
+ /**
18382
+ * Whether the org was connected through login.salesforce.com or test.salesforce.com.
18383
+ */
18384
+ export type environment = 'production' | 'sandbox';
18385
+
18386
+ /**
18387
+ * What a person new to Salesforce is created as.
18388
+ */
18389
+ export type createAs = 'lead' | 'contact';
18390
+
18304
18391
  /**
18305
18392
  * One check of a scheduled automation.
18306
18393
  */
@@ -18575,7 +18662,7 @@ export type contentType3 = 'story' | 'saved_story' | 'spotlight';
18575
18662
 
18576
18663
  export type SocialAccount = {
18577
18664
  _id: string;
18578
- platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe';
18665
+ platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'salesforce' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe';
18579
18666
  profileId: (string | Profile);
18580
18667
  username?: string;
18581
18668
  displayName?: string;
@@ -18721,7 +18808,7 @@ export type SocialAccount = {
18721
18808
  };
18722
18809
  };
18723
18810
 
18724
- export type platform16 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe';
18811
+ export type platform17 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'salesforce' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe';
18725
18812
 
18726
18813
  /**
18727
18814
  * TikTok accounts only. The account type TikTok reported when the account was connected.
@@ -18800,7 +18887,7 @@ export type StoredEvent = {
18800
18887
  } | null;
18801
18888
  };
18802
18889
 
18803
- export type platform17 = 'googleads' | 'metaads';
18890
+ export type platform18 = 'googleads' | 'metaads';
18804
18891
 
18805
18892
  /**
18806
18893
  * A tracking tag's install on a connected store: a Shopify web pixel, a Custom HTML widget on a WordPress site, the Zernio embedded script on a Wix site, or the Zernio custom code script on a Webflow site. Fields marked with a platform are present only for it.
@@ -18901,7 +18988,7 @@ export type StripeSettings = {
18901
18988
  forwardSales: boolean;
18902
18989
  };
18903
18990
 
18904
- export type platform18 = 'stripe';
18991
+ export type platform19 = 'stripe';
18905
18992
 
18906
18993
  export type SupportRun = {
18907
18994
  /**
@@ -19847,7 +19934,7 @@ export type TrackingTag = {
19847
19934
  autoTagging?: boolean;
19848
19935
  };
19849
19936
 
19850
- export type platform19 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads' | 'whopads' | 'applovinads';
19937
+ export type platform20 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads' | 'whopads' | 'applovinads';
19851
19938
 
19852
19939
  /**
19853
19940
  * Platform-native flavor of the tag (Meta: `pixel`).
@@ -22751,7 +22838,7 @@ export type event25 = 'balance.empty';
22751
22838
  /**
22752
22839
  * The 402 code pay-per-use calls get until the balance is funded. `usage_limit_reached` when the auto top-up monthly limit is what keeps it at $0.
22753
22840
  */
22754
- export type code3 = 'insufficient_balance' | 'usage_limit_reached';
22841
+ export type code4 = 'insufficient_balance' | 'usage_limit_reached';
22755
22842
 
22756
22843
  export type WebhookPayloadBalanceLow = {
22757
22844
  /**
@@ -23868,7 +23955,7 @@ export type WebhookPayloadComment = {
23868
23955
 
23869
23956
  export type event43 = 'comment.received';
23870
23957
 
23871
- export type platform20 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
23958
+ export type platform21 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
23872
23959
 
23873
23960
  export type WebhookPayloadCommerceOrder = {
23874
23961
  /**
@@ -24902,7 +24989,7 @@ export type WebhookPayloadMention = {
24902
24989
 
24903
24990
  export type event65 = 'mention.received';
24904
24991
 
24905
- export type platform21 = 'instagram' | 'facebook' | 'linkedin';
24992
+ export type platform22 = 'instagram' | 'facebook' | 'linkedin';
24906
24993
 
24907
24994
  /**
24908
24995
  * Null on LinkedIn.
@@ -25907,7 +25994,7 @@ export type event70 = 'message.sent';
25907
25994
  /**
25908
25995
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
25909
25996
  */
25910
- export type platform22 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage' | 'line' | 'wechat';
25997
+ export type platform23 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage' | 'line' | 'wechat';
25911
25998
 
25912
25999
  /**
25913
26000
  * WhatsApp send origin. Absent on non-WhatsApp platforms.
@@ -26827,7 +26914,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
26827
26914
 
26828
26915
  export type event86 = 'whatsapp.account.alert_received';
26829
26916
 
26830
- export type platform23 = 'whatsapp';
26917
+ export type platform24 = 'whatsapp';
26831
26918
 
26832
26919
  /**
26833
26920
  * Webhook payload for the `whatsapp.account.name_status_updated` event, fired when Meta finishes reviewing a WhatsApp display-name change on a connected number. Maps Meta's `phone_number_name_update` WABA webhook field onto our event envelope.
@@ -27616,7 +27703,7 @@ export type WhatsAppTemplateLookupError = {
27616
27703
 
27617
27704
  export type type39 = 'platform_error';
27618
27705
 
27619
- export type code4 = 'platform_api_error';
27706
+ export type code5 = 'platform_api_error';
27620
27707
 
27621
27708
  export type phase = 'template_lookup';
27622
27709
 
@@ -33832,7 +33919,7 @@ export type ListAccountsData = {
33832
33919
  */
33833
33920
  adAccountRows?: boolean;
33834
33921
  /**
33835
- * Only accounts of this kind. ads = ad accounts (Meta, Google, LinkedIn, Pinterest, TikTok, X, OpenAI, Reddit, Microsoft), communication = WhatsApp, Telegram, Discord, Slack, iMessage, LINE and WeChat, blogs = Shopify and WordPress, crm = HubSpot, analytics = Google Analytics, social = every other platform.
33922
+ * Only accounts of this kind. ads = ad accounts (Meta, Google, LinkedIn, Pinterest, TikTok, X, OpenAI, Reddit, Microsoft), communication = WhatsApp, Telegram, Discord, Slack, iMessage, LINE and WeChat, blogs = Shopify and WordPress, crm = HubSpot and Salesforce, analytics = Google Analytics, social = every other platform.
33836
33923
  */
33837
33924
  category?: 'social' | 'ads' | 'communication' | 'blogs' | 'crm' | 'analytics';
33838
33925
  /**
@@ -36269,6 +36356,91 @@ export type GetHubSpotConnectUrlError = (ErrorResponse | {
36269
36356
  };
36270
36357
  } | unknown);
36271
36358
 
36359
+ export type GetSalesforceConnectUrlData = {
36360
+ query: {
36361
+ /**
36362
+ * Sign in at login.salesforce.com (`production`, also Developer Edition orgs) or test.salesforce.com (`sandbox`).
36363
+ */
36364
+ environment?: 'production' | 'sandbox';
36365
+ /**
36366
+ * Your Zernio profile ID (get from /v1/profiles).
36367
+ */
36368
+ profileId: string;
36369
+ /**
36370
+ * Custom redirect after connection. Must be an absolute http(s) URL or custom app scheme such as `myapp://callback`; relative and unsafe URLs return 400.
36371
+ */
36372
+ redirect_url?: string;
36373
+ };
36374
+ };
36375
+
36376
+ export type GetSalesforceConnectUrlResponse = ({
36377
+ /**
36378
+ * Salesforce URL to open in the user agent.
36379
+ */
36380
+ authUrl: string;
36381
+ /**
36382
+ * Authenticated, expiring OAuth state handled by the callback.
36383
+ */
36384
+ state: string;
36385
+ });
36386
+
36387
+ export type GetSalesforceConnectUrlError = (ErrorResponse | {
36388
+ /**
36389
+ * Human-readable error message suitable for end-user display.
36390
+ */
36391
+ error: string;
36392
+ /**
36393
+ * Machine-readable error code. Stable across versions.
36394
+ */
36395
+ code: 'PAYMENT_REQUIRED';
36396
+ /**
36397
+ * Discriminator for which gate fired.
36398
+ */
36399
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
36400
+ /**
36401
+ * Link to the relevant documentation page.
36402
+ */
36403
+ documentation_url?: string;
36404
+ /**
36405
+ * Deep-link to send the end-user to. For
36406
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
36407
+ * the add-payment-method drawer on the Zernio billing page.
36408
+ * For `enterprise_required` this is the Zernio enterprise
36409
+ * contact page.
36410
+ *
36411
+ */
36412
+ dashboard_url?: string;
36413
+ /**
36414
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
36415
+ */
36416
+ details?: {
36417
+ /**
36418
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
36419
+ */
36420
+ free_tier_account_limit?: number;
36421
+ /**
36422
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
36423
+ */
36424
+ current_account_count?: number;
36425
+ /**
36426
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
36427
+ */
36428
+ has_payment_method?: boolean;
36429
+ /**
36430
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
36431
+ */
36432
+ verification_amount_cents?: number;
36433
+ /**
36434
+ * The negotiated connected-account cap from the
36435
+ * team's enterprise contract. Self-service teams
36436
+ * have no cap and never receive this reason. Only
36437
+ * set when reason=enterprise_required.
36438
+ *
36439
+ */
36440
+ effective_account_limit?: number;
36441
+ };
36442
+ } | unknown);
36443
+
36272
36444
  export type GetStripeConnectUrlData = {
36273
36445
  query: {
36274
36446
  /**
@@ -42059,6 +42231,12 @@ export type UpdateHubSpotSettingsData = {
42059
42231
  * Add the delivery status of each outgoing WhatsApp, SMS or RCS message to its timeline entry and update it as the message is delivered, read or fails. A failure shows the reason and its code. Only applies while `logMessages` is on.
42060
42232
  */
42061
42233
  logDeliveryStatus?: boolean;
42234
+ /**
42235
+ * Values for contact properties your portal requires on create, keyed by HubSpot internal name (lowercase letters, digits, underscores), for example `{"lifecyclestage": "lead"}`. Replaces the whole map; send `{}` to clear it. Clears `syncIssue` until the next contact create tells whether the portal accepts them.
42236
+ */
42237
+ contactDefaults?: {
42238
+ [key: string]: (string);
42239
+ };
42062
42240
  /**
42063
42241
  * Send each deal that becomes closed won as a Purchase to the profile's event destinations, about once an hour. Requires the portal to have granted `crm.objects.deals.read`; otherwise 400. Deals closed before it was turned on are not sent.
42064
42242
  */
@@ -42080,6 +42258,49 @@ export type UpdateHubSpotSettingsResponse = ({
42080
42258
 
42081
42259
  export type UpdateHubSpotSettingsError = (ErrorResponse | unknown);
42082
42260
 
42261
+ export type GetSalesforceSettingsData = {
42262
+ path: {
42263
+ accountId: string;
42264
+ };
42265
+ };
42266
+
42267
+ export type GetSalesforceSettingsResponse = ({
42268
+ account?: SalesforceSettings;
42269
+ });
42270
+
42271
+ export type GetSalesforceSettingsError = (ErrorResponse | unknown);
42272
+
42273
+ export type UpdateSalesforceSettingsData = {
42274
+ body: {
42275
+ /**
42276
+ * Create a Lead or Contact for an inbox contact that matches nobody by phone (any phone field) or email. A match is linked as it is and never updated.
42277
+ */
42278
+ syncContacts?: boolean;
42279
+ /**
42280
+ * Log inbound and outbound inbox messages as one conversation Task per person, channel and day.
42281
+ */
42282
+ logMessages?: boolean;
42283
+ /**
42284
+ * What a person new to Salesforce is created as. Leads get Company `[not provided]`.
42285
+ */
42286
+ createAs?: 'lead' | 'contact';
42287
+ /**
42288
+ * Mark sent messages in the transcript as delivered, read or failed.
42289
+ */
42290
+ logDeliveryStatus?: boolean;
42291
+ };
42292
+ path: {
42293
+ accountId: string;
42294
+ };
42295
+ };
42296
+
42297
+ export type UpdateSalesforceSettingsResponse = ({
42298
+ message?: string;
42299
+ account?: SalesforceSettings;
42300
+ });
42301
+
42302
+ export type UpdateSalesforceSettingsError = (ErrorResponse | unknown);
42303
+
42083
42304
  export type GetStripeSettingsData = {
42084
42305
  path: {
42085
42306
  accountId: string;