@getlatedev/node 0.2.1105 → 0.2.1107

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.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.1105",
39
+ version: "0.2.1107",
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.1105",
8
+ version: "0.2.1107",
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.1105",
3
+ "version": "0.2.1107",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -9369,7 +9369,7 @@ export const getCommentAutomation = <ThrowOnError extends boolean = false>(optio
9369
9369
 
9370
9370
  /**
9371
9371
  * Update automation settings
9372
- * Update an automation's keywords, DM message, inline buttons, comment reply, or active status.
9372
+ * Update an automation's keywords, DM message, inline buttons, comment reply, post binding, or active status.
9373
9373
  * Pass `buttons: []` to clear all buttons. When `buttons` is non-empty, `dmMessage` (the new
9374
9374
  * one if you're changing it, otherwise the stored one) must be 640 characters or less.
9375
9375
  * On a TikTok, Threads, LinkedIn or YouTube automation (public reply only) the DM fields
@@ -10334,6 +10334,14 @@ export type SocialAccount = {
10334
10334
  profileId: (string | Profile);
10335
10335
  username?: string;
10336
10336
  displayName?: string;
10337
+ /**
10338
+ * The account's id on its platform as the platform reports it to Zernio; stable across reconnects, so it is the key to match an account against your own records. Instagram: the app-scoped user id on Instagram Login accounts (the professional account id is in `metadata.instagramScopedId`), the professional account id (`17841...`) on Facebook Login accounts. TikTok: the open_id of Zernio's TikTok app, which differs from the open_id any other app sees for the same user. Either value can be passed back as `expectedPlatformUserId` on GET /v1/connect/{platform}.
10339
+ */
10340
+ platformUserId?: string;
10341
+ /**
10342
+ * 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.
10343
+ */
10344
+ tiktokAccountType?: 'business' | 'personal' | 'unknown';
10337
10345
  /**
10338
10346
  * URL to the account's profile picture on the platform. May be null if the platform does not provide one.
10339
10347
  */
@@ -10402,6 +10410,7 @@ export type SocialAccount = {
10402
10410
  *
10403
10411
  * For Instagram accounts:
10404
10412
  * - loginMethod: "facebook_login" when the account was connected through Facebook Login. Absent on accounts connected with Instagram Login. On facebook_login accounts, comment reads leave hidden comments out entirely instead of returning them with isHidden true.
10413
+ * - instagramScopedId: the Instagram professional account id (`17841...`). On Instagram Login accounts this is the id that is the same whichever app connected the account, while platformUserId is app-scoped; Facebook Login accounts hold this id as platformUserId.
10405
10414
  *
10406
10415
  * For X (Twitter) accounts:
10407
10416
  * - profileData.extraData.isPremium: Whether X reports a paid subscription (Basic, Premium, Premium+, or a blue verified badge), which raises the post length limit from 280 to 25,000 characters. Read live at connect and reconnect and refreshed by the daily follower snapshot; because X intermittently reports no subscription for subscribed accounts, a cancellation is stored on the fourth consecutive daily snapshot that reports it (about four days). Accounts connected before the extraData layout carry the same flag at profileData.isPremium.
@@ -10414,6 +10423,11 @@ export type SocialAccount = {
10414
10423
 
10415
10424
  export type platform11 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs' | 'whopads';
10416
10425
 
10426
+ /**
10427
+ * 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.
10428
+ */
10429
+ export type tiktokAccountType = 'business' | 'personal' | 'unknown';
10430
+
10417
10431
  /**
10418
10432
  * A tracking tag's install on a connected store: a Shopify web pixel, or a Custom HTML widget on a WordPress site. Fields marked Shopify or WordPress are present only for that platform.
10419
10433
  */
@@ -19887,6 +19901,14 @@ export type GetConnectUrlData = {
19887
19901
  * Hosted signup page only (`signup=hosted`, WhatsApp): name shown in the page title ("Connect your WhatsApp number to <brandName>") instead of Zernio. The Zernio logo stays: the page is co-branded, not white-label. Trimmed; 1 to 60 characters. Rejected with 400 `INVALID_FIELD_VALUE` without `signup=hosted`. Stored on the signup session at issue time, so the page URL cannot change it.
19888
19902
  */
19889
19903
  brandName?: string;
19904
+ /**
19905
+ * 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. Compared with every id the platform reports for the authorized account: the `platformUserId` of a Zernio account on this platform, or on Instagram either the app-scoped id or the professional account id (`metadata.instagramScopedId`, the `17841...` id that Facebook Login accounts hold as platformUserId). TikTok open_ids are app-scoped, so an id from your own TikTok app never matches; use expectedUsername there. Honoured by the OAuth callback (every platform that connects without a selection step, Instagram Login included) and by the Instagram selection step; on the other selection endpoints you choose the destination yourself. In headless mode the marker travels in the redirect_url we hand you, so pass that URL back unchanged. On X it counts toward the OAuth state limit described under redirect_url.
19906
+ */
19907
+ expectedPlatformUserId?: string;
19908
+ /**
19909
+ * Only connect if the authorized account's handle is this one (case-insensitive, a leading @ is ignored); otherwise the flow ends with `error=account_mismatch`, `error_message` naming the handle that was authorized, and nothing is written. Same coverage and transport as expectedPlatformUserId; when both are sent both must match. Use this on a first connection, where you hold the handle the user typed but no Zernio id yet.
19910
+ */
19911
+ expectedUsername?: string;
19890
19912
  /**
19891
19913
  * When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience.
19892
19914
  */
@@ -19937,7 +19959,7 @@ export type GetConnectUrlData = {
19937
19959
  * `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are
19938
19960
  * conditional and must be treated as optional. Your own query params are kept on every
19939
19961
  * redirect, but ours overwrite a param of yours with the same name. On an error redirect the
19940
- * internal `headless`, `adsConnect`, `adsScope` and `reconnectAccountId` markers we add during the flow are removed.
19962
+ * internal `headless`, `adsConnect`, `adsScope`, `reconnectAccountId`, `expectedPlatformUserId` and `expectedUsername` markers we add during the flow are removed.
19941
19963
  *
19942
19964
  * Correlation (every redirect from an OAuth callback, success and failure, and the
19943
19965
  * `redirect_url` returned by the selection endpoints such as POST /v1/connect/facebook/select-page):
@@ -19990,7 +20012,7 @@ export type GetConnectUrlData = {
19990
20012
  * oauth_denied, invalid_callback, invalid_state, unsupported_platform, connection_failed,
19991
20013
  * internal_error, token_exchange_failed, byok_config_error, personal_account_not_supported,
19992
20014
  * missing_google_permissions, missing_tiktok_permissions, platform_requires_destination,
19993
- * reconnect_account_mismatch, instagram_login_method_mismatch, invalid_request,
20015
+ * reconnect_account_mismatch, account_mismatch, instagram_login_method_mismatch, invalid_request,
19994
20016
  * code_already_redeemed
19995
20017
  *
19996
20018
  * Access and limits:
@@ -38914,6 +38936,9 @@ export type ListCommentAutomationsResponse = ({
38914
38936
  * Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
38915
38937
  */
38916
38938
  typoTolerance?: boolean;
38939
+ /**
38940
+ * Instagram and Facebook only. On reply-only platforms (tiktok, threads, linkedin, youtube) every DM-leg field is omitted: dmMessage, dmMessageVariations, buttons, template, quickReplies, dmMedia, publicReplyPolicy, dedupeSameTextHours, actions, audience, followGate, dmDelaySeconds and alsoMatchInDms.
38941
+ */
38917
38942
  dmMessage?: string;
38918
38943
  /**
38919
38944
  * Inline DM buttons (up to 3). Omitted when none are set.
@@ -39100,6 +39125,9 @@ export type CreateCommentAutomationResponse = ({
39100
39125
  * Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
39101
39126
  */
39102
39127
  typoTolerance?: boolean;
39128
+ /**
39129
+ * Omitted on reply-only platforms (tiktok, threads, linkedin, youtube), together with every other DM-leg field.
39130
+ */
39103
39131
  dmMessage?: string;
39104
39132
  /**
39105
39133
  * Inline DM buttons (up to 3). Omitted when none are set.
@@ -39178,6 +39206,9 @@ export type GetCommentAutomationResponse = ({
39178
39206
  * Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
39179
39207
  */
39180
39208
  typoTolerance?: boolean;
39209
+ /**
39210
+ * Omitted on reply-only platforms (tiktok, threads, linkedin, youtube), together with every other DM-leg field.
39211
+ */
39181
39212
  dmMessage?: string;
39182
39213
  /**
39183
39214
  * Inline DM buttons (up to 3). Omitted when none are set.
@@ -39253,6 +39284,18 @@ export type UpdateCommentAutomationData = {
39253
39284
  * Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
39254
39285
  */
39255
39286
  typoTolerance?: boolean;
39287
+ /**
39288
+ * Re-binds the automation to another post: the platform media/post ID (or story media id when trigger=story_reply). postId, platformPostId and postTitle move as a unit: sending any of them replaces all three, and an omitted one is cleared. Send all three as null (or empty) to make it account-wide (any post / any story). Omit all three to keep the current binding. 409 when another active automation already owns the new post.
39289
+ */
39290
+ platformPostId?: (string) | null;
39291
+ /**
39292
+ * Zernio post ID (24 hexadecimal characters); platform IDs return 400. Use it INSTEAD of platformPostId to bind to a not-yet-published Zernio post: the automation stays pending and arms itself when that post publishes. Moves as a unit with platformPostId and postTitle (see platformPostId).
39293
+ */
39294
+ postId?: (string) | null;
39295
+ /**
39296
+ * Post content snippet for display. Moves as a unit with platformPostId and postId (see platformPostId).
39297
+ */
39298
+ postTitle?: (string) | null;
39256
39299
  dmMessage?: string;
39257
39300
  /**
39258
39301
  * Inline DM buttons (1-3). Pass [] to clear all buttons.
@@ -39333,6 +39376,9 @@ export type UpdateCommentAutomationResponse = ({
39333
39376
  * Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
39334
39377
  */
39335
39378
  typoTolerance?: boolean;
39379
+ /**
39380
+ * Omitted on reply-only platforms (tiktok, threads, linkedin, youtube), together with every other DM-leg field.
39381
+ */
39336
39382
  dmMessage?: string;
39337
39383
  /**
39338
39384
  * Inline DM buttons (up to 3). Omitted when none are set.
@@ -39371,7 +39417,7 @@ export type UpdateCommentAutomationResponse = ({
39371
39417
 
39372
39418
  export type UpdateCommentAutomationError = (ErrorResponse | {
39373
39419
  error?: string;
39374
- });
39420
+ } | unknown);
39375
39421
 
39376
39422
  export type DeleteCommentAutomationData = {
39377
39423
  path: {