@getlatedev/node 0.2.1238 → 0.2.1240
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/README.md +3 -0
- package/dist/index.d.mts +155 -17
- package/dist/index.d.ts +155 -17
- package/dist/index.js +22 -1
- package/dist/index.mjs +22 -1
- package/package.json +1 -1
- package/src/client.ts +6 -0
- package/src/generated/sdk.gen.ts +51 -1
- package/src/generated/types.gen.ts +162 -16
|
@@ -7350,6 +7350,36 @@ export type GoogleTargetImpressionShare = {
|
|
|
7350
7350
|
|
|
7351
7351
|
export type location = 'ANYWHERE_ON_PAGE' | 'TOP_OF_PAGE' | 'ABSOLUTE_TOP_OF_PAGE';
|
|
7352
7352
|
|
|
7353
|
+
export type HubSpotSettings = {
|
|
7354
|
+
/**
|
|
7355
|
+
* Zernio account ID of the HubSpot connection.
|
|
7356
|
+
*/
|
|
7357
|
+
_id: string;
|
|
7358
|
+
platform: 'hubspot';
|
|
7359
|
+
/**
|
|
7360
|
+
* HubSpot portal (hub) ID.
|
|
7361
|
+
*/
|
|
7362
|
+
hubId: string;
|
|
7363
|
+
/**
|
|
7364
|
+
* HubSpot portal domain, when HubSpot reports one.
|
|
7365
|
+
*/
|
|
7366
|
+
hubDomain: (string) | null;
|
|
7367
|
+
/**
|
|
7368
|
+
* OAuth scopes the portal granted.
|
|
7369
|
+
*/
|
|
7370
|
+
scopes: Array<(string)>;
|
|
7371
|
+
/**
|
|
7372
|
+
* Whether Zernio creates or updates HubSpot contacts for inbox contacts.
|
|
7373
|
+
*/
|
|
7374
|
+
syncContacts: boolean;
|
|
7375
|
+
/**
|
|
7376
|
+
* Whether Zernio logs inbox messages on HubSpot contact timelines.
|
|
7377
|
+
*/
|
|
7378
|
+
logMessages: boolean;
|
|
7379
|
+
};
|
|
7380
|
+
|
|
7381
|
+
export type platform6 = 'hubspot';
|
|
7382
|
+
|
|
7353
7383
|
export type ImessageAudienceContact = {
|
|
7354
7384
|
conversationId?: string;
|
|
7355
7385
|
accountId?: string;
|
|
@@ -7428,7 +7458,7 @@ export type ImessageSender = {
|
|
|
7428
7458
|
isActive?: boolean;
|
|
7429
7459
|
};
|
|
7430
7460
|
|
|
7431
|
-
export type
|
|
7461
|
+
export type platform7 = 'imessage';
|
|
7432
7462
|
|
|
7433
7463
|
/**
|
|
7434
7464
|
* A provisioned iMessage sender order and its lifecycle. Activation is asynchronous: poll GET /v1/imessage/senders/{senderId} or subscribe to account.connected.
|
|
@@ -7581,7 +7611,7 @@ export type InboxWebhookConversationDetail = {
|
|
|
7581
7611
|
contactId?: string;
|
|
7582
7612
|
};
|
|
7583
7613
|
|
|
7584
|
-
export type
|
|
7614
|
+
export type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'rcs' | 'slack' | 'tiktok' | 'imessage';
|
|
7585
7615
|
|
|
7586
7616
|
/**
|
|
7587
7617
|
* The message object included in inbox webhook payloads.
|
|
@@ -7700,7 +7730,7 @@ export type InboxWebhookMessage = {
|
|
|
7700
7730
|
isRead: boolean;
|
|
7701
7731
|
};
|
|
7702
7732
|
|
|
7703
|
-
export type
|
|
7733
|
+
export type platform9 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
|
|
7704
7734
|
|
|
7705
7735
|
export type direction2 = 'incoming' | 'outgoing';
|
|
7706
7736
|
|
|
@@ -7828,7 +7858,7 @@ export type InstagramAccountInsightsResponse = {
|
|
|
7828
7858
|
/**
|
|
7829
7859
|
* Platform that served this response.
|
|
7830
7860
|
*/
|
|
7831
|
-
export type
|
|
7861
|
+
export type platform10 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
|
|
7832
7862
|
|
|
7833
7863
|
export type metricType = 'time_series' | 'total_value';
|
|
7834
7864
|
|
|
@@ -10817,7 +10847,7 @@ export type ReviewWebhookReview = {
|
|
|
10817
10847
|
/**
|
|
10818
10848
|
* Platform the review originated on. Currently Google Business Profile only.
|
|
10819
10849
|
*/
|
|
10820
|
-
export type
|
|
10850
|
+
export type platform11 = 'googlebusiness';
|
|
10821
10851
|
|
|
10822
10852
|
/**
|
|
10823
10853
|
* A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
|
|
@@ -10941,7 +10971,7 @@ export type contentType3 = 'story' | 'saved_story' | 'spotlight';
|
|
|
10941
10971
|
|
|
10942
10972
|
export type SocialAccount = {
|
|
10943
10973
|
_id: string;
|
|
10944
|
-
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';
|
|
10974
|
+
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' | 'hubspot';
|
|
10945
10975
|
profileId: (string | Profile);
|
|
10946
10976
|
username?: string;
|
|
10947
10977
|
displayName?: string;
|
|
@@ -11051,7 +11081,7 @@ export type SocialAccount = {
|
|
|
11051
11081
|
};
|
|
11052
11082
|
};
|
|
11053
11083
|
|
|
11054
|
-
export type
|
|
11084
|
+
export type platform12 = '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' | 'hubspot';
|
|
11055
11085
|
|
|
11056
11086
|
/**
|
|
11057
11087
|
* TikTok accounts only. The account type TikTok reported when the account was connected. `personal` accounts cannot use TikTok direct messages through the API (TikTok limits Business Messaging to Business Accounts): skip the inbox for them and tell the user to switch to a Business Account in the TikTok app, then reconnect. `business` is the prerequisite, not a guarantee; messaging also needs the messaging scopes granted and TikTok's regional availability. `unknown` on accounts connected before this was captured or whose grant left out the account-type scope.
|
|
@@ -11131,7 +11161,7 @@ export type StorePixelInstall = {
|
|
|
11131
11161
|
/**
|
|
11132
11162
|
* The store platform.
|
|
11133
11163
|
*/
|
|
11134
|
-
export type
|
|
11164
|
+
export type platform13 = 'shopify' | 'wordpress';
|
|
11135
11165
|
|
|
11136
11166
|
/**
|
|
11137
11167
|
* WordPress only.
|
|
@@ -11812,7 +11842,7 @@ export type TrackingTag = {
|
|
|
11812
11842
|
autoTagging?: boolean;
|
|
11813
11843
|
};
|
|
11814
11844
|
|
|
11815
|
-
export type
|
|
11845
|
+
export type platform14 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads' | 'whopads';
|
|
11816
11846
|
|
|
11817
11847
|
/**
|
|
11818
11848
|
* Platform-native flavor of the tag (Meta: `pixel`).
|
|
@@ -13728,7 +13758,7 @@ export type WebhookPayloadComment = {
|
|
|
13728
13758
|
|
|
13729
13759
|
export type event14 = 'comment.received';
|
|
13730
13760
|
|
|
13731
|
-
export type
|
|
13761
|
+
export type platform15 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
|
|
13732
13762
|
|
|
13733
13763
|
export type WebhookPayloadCommerceOrder = {
|
|
13734
13764
|
/**
|
|
@@ -14090,7 +14120,7 @@ export type WebhookPayloadLead = {
|
|
|
14090
14120
|
|
|
14091
14121
|
export type event22 = 'lead.received';
|
|
14092
14122
|
|
|
14093
|
-
export type
|
|
14123
|
+
export type platform16 = 'facebook';
|
|
14094
14124
|
|
|
14095
14125
|
/**
|
|
14096
14126
|
* Webhook payload for message received events
|
|
@@ -15107,7 +15137,7 @@ export type event27 = 'message.sent';
|
|
|
15107
15137
|
/**
|
|
15108
15138
|
* Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
15109
15139
|
*/
|
|
15110
|
-
export type
|
|
15140
|
+
export type platform17 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
|
|
15111
15141
|
|
|
15112
15142
|
/**
|
|
15113
15143
|
* WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts); meta_business_agent when Meta Business Agent answered on the number. Absent on non-WhatsApp platforms. Says where WhatsApp saw the send come from, not which Zernio surface produced it: read sentVia for that.
|
|
@@ -15682,7 +15712,7 @@ export type WebhookPayloadWhatsAppAccountAlertReceived = {
|
|
|
15682
15712
|
|
|
15683
15713
|
export type event38 = 'whatsapp.account.alert_received';
|
|
15684
15714
|
|
|
15685
|
-
export type
|
|
15715
|
+
export type platform18 = 'whatsapp';
|
|
15686
15716
|
|
|
15687
15717
|
/**
|
|
15688
15718
|
* Webhook payload for the `whatsapp.account.name_status_updated` event.
|
|
@@ -20081,9 +20111,9 @@ export type DeleteProfileError = (unknown | ErrorResponse | {
|
|
|
20081
20111
|
export type ListAccountsData = {
|
|
20082
20112
|
query?: {
|
|
20083
20113
|
/**
|
|
20084
|
-
* Only accounts of this kind. ads = ad accounts (Meta, Google, LinkedIn, Pinterest, TikTok, X, OpenAI, Reddit), communication = WhatsApp, Telegram, Discord, Slack and iMessage, blogs = Shopify and WordPress, social = every other platform.
|
|
20114
|
+
* Only accounts of this kind. ads = ad accounts (Meta, Google, LinkedIn, Pinterest, TikTok, X, OpenAI, Reddit), communication = WhatsApp, Telegram, Discord, Slack and iMessage, blogs = Shopify and WordPress, crm = HubSpot, social = every other platform.
|
|
20085
20115
|
*/
|
|
20086
|
-
category?: 'social' | 'ads' | 'communication' | 'blogs';
|
|
20116
|
+
category?: 'social' | 'ads' | 'communication' | 'blogs' | 'crm';
|
|
20087
20117
|
/**
|
|
20088
20118
|
* When true, leaves out accounts the dashboard does not show as connections: posting
|
|
20089
20119
|
* accounts with `enabled: false` (ads accounts are always kept, whatever their `enabled`
|
|
@@ -20289,7 +20319,7 @@ export type GetAllAccountsHealthData = {
|
|
|
20289
20319
|
/**
|
|
20290
20320
|
* Filter by platform
|
|
20291
20321
|
*/
|
|
20292
|
-
platform?: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'whopads';
|
|
20322
|
+
platform?: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'whopads' | 'hubspot';
|
|
20293
20323
|
/**
|
|
20294
20324
|
* Filter by profile ID
|
|
20295
20325
|
*/
|
|
@@ -21870,6 +21900,87 @@ export type ConnectShopifyWithTokenError = (unknown | ErrorResponse | {
|
|
|
21870
21900
|
};
|
|
21871
21901
|
});
|
|
21872
21902
|
|
|
21903
|
+
export type GetHubSpotConnectUrlData = {
|
|
21904
|
+
query: {
|
|
21905
|
+
/**
|
|
21906
|
+
* Your Zernio profile ID (get from /v1/profiles).
|
|
21907
|
+
*/
|
|
21908
|
+
profileId: string;
|
|
21909
|
+
/**
|
|
21910
|
+
* 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.
|
|
21911
|
+
*/
|
|
21912
|
+
redirect_url?: string;
|
|
21913
|
+
};
|
|
21914
|
+
};
|
|
21915
|
+
|
|
21916
|
+
export type GetHubSpotConnectUrlResponse = ({
|
|
21917
|
+
/**
|
|
21918
|
+
* HubSpot URL to open in the user agent.
|
|
21919
|
+
*/
|
|
21920
|
+
authUrl: string;
|
|
21921
|
+
/**
|
|
21922
|
+
* Authenticated, expiring OAuth state handled by the callback.
|
|
21923
|
+
*/
|
|
21924
|
+
state: string;
|
|
21925
|
+
});
|
|
21926
|
+
|
|
21927
|
+
export type GetHubSpotConnectUrlError = (ErrorResponse | {
|
|
21928
|
+
/**
|
|
21929
|
+
* Human-readable error message suitable for end-user display.
|
|
21930
|
+
*/
|
|
21931
|
+
error: string;
|
|
21932
|
+
/**
|
|
21933
|
+
* Machine-readable error code. Stable across versions.
|
|
21934
|
+
*/
|
|
21935
|
+
code: 'PAYMENT_REQUIRED';
|
|
21936
|
+
/**
|
|
21937
|
+
* Discriminator for which gate fired.
|
|
21938
|
+
*/
|
|
21939
|
+
reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
|
|
21940
|
+
/**
|
|
21941
|
+
* Link to the relevant documentation page.
|
|
21942
|
+
*/
|
|
21943
|
+
documentation_url?: string;
|
|
21944
|
+
/**
|
|
21945
|
+
* Deep-link to send the end-user to. For
|
|
21946
|
+
* `free_tier_exceeded` and `twitter_passthrough` this opens
|
|
21947
|
+
* the add-payment-method drawer on the Zernio billing page.
|
|
21948
|
+
* For `enterprise_required` this is the Zernio enterprise
|
|
21949
|
+
* contact page.
|
|
21950
|
+
*
|
|
21951
|
+
*/
|
|
21952
|
+
dashboard_url?: string;
|
|
21953
|
+
/**
|
|
21954
|
+
* Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
21955
|
+
*/
|
|
21956
|
+
details?: {
|
|
21957
|
+
/**
|
|
21958
|
+
* How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
21959
|
+
*/
|
|
21960
|
+
free_tier_account_limit?: number;
|
|
21961
|
+
/**
|
|
21962
|
+
* How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
|
|
21963
|
+
*/
|
|
21964
|
+
current_account_count?: number;
|
|
21965
|
+
/**
|
|
21966
|
+
* Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
|
|
21967
|
+
*/
|
|
21968
|
+
has_payment_method?: boolean;
|
|
21969
|
+
/**
|
|
21970
|
+
* One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
|
|
21971
|
+
*/
|
|
21972
|
+
verification_amount_cents?: number;
|
|
21973
|
+
/**
|
|
21974
|
+
* The negotiated connected-account cap from the
|
|
21975
|
+
* team's enterprise contract. Self-service teams
|
|
21976
|
+
* have no cap and never receive this reason. Only
|
|
21977
|
+
* set when reason=enterprise_required.
|
|
21978
|
+
*
|
|
21979
|
+
*/
|
|
21980
|
+
effective_account_limit?: number;
|
|
21981
|
+
};
|
|
21982
|
+
} | unknown);
|
|
21983
|
+
|
|
21873
21984
|
export type GetWordPressAuthUrlData = {
|
|
21874
21985
|
query: {
|
|
21875
21986
|
/**
|
|
@@ -26452,6 +26563,41 @@ export type SetRedditPostFlairResponse = ({
|
|
|
26452
26563
|
|
|
26453
26564
|
export type SetRedditPostFlairError = (unknown | ErrorResponse);
|
|
26454
26565
|
|
|
26566
|
+
export type GetHubSpotSettingsData = {
|
|
26567
|
+
path: {
|
|
26568
|
+
accountId: string;
|
|
26569
|
+
};
|
|
26570
|
+
};
|
|
26571
|
+
|
|
26572
|
+
export type GetHubSpotSettingsResponse = ({
|
|
26573
|
+
account?: HubSpotSettings;
|
|
26574
|
+
});
|
|
26575
|
+
|
|
26576
|
+
export type GetHubSpotSettingsError = (ErrorResponse | unknown);
|
|
26577
|
+
|
|
26578
|
+
export type UpdateHubSpotSettingsData = {
|
|
26579
|
+
body: {
|
|
26580
|
+
/**
|
|
26581
|
+
* Create or update a HubSpot contact for each inbox contact.
|
|
26582
|
+
*/
|
|
26583
|
+
syncContacts?: boolean;
|
|
26584
|
+
/**
|
|
26585
|
+
* Log inbound and outbound inbox messages on the contact's HubSpot timeline.
|
|
26586
|
+
*/
|
|
26587
|
+
logMessages?: boolean;
|
|
26588
|
+
};
|
|
26589
|
+
path: {
|
|
26590
|
+
accountId: string;
|
|
26591
|
+
};
|
|
26592
|
+
};
|
|
26593
|
+
|
|
26594
|
+
export type UpdateHubSpotSettingsResponse = ({
|
|
26595
|
+
message?: string;
|
|
26596
|
+
account?: HubSpotSettings;
|
|
26597
|
+
});
|
|
26598
|
+
|
|
26599
|
+
export type UpdateHubSpotSettingsError = (ErrorResponse | unknown);
|
|
26600
|
+
|
|
26455
26601
|
export type GetSlackSettingsData = {
|
|
26456
26602
|
path: {
|
|
26457
26603
|
accountId: string;
|