@getlatedev/node 0.2.1104 → 0.2.1106

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.1104",
39
+ version: "0.2.1106",
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.1104",
8
+ version: "0.2.1106",
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.1104",
3
+ "version": "0.2.1106",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -355,6 +355,48 @@ export type Ad = {
355
355
  * All media URLs for this ad (carousel images, multiple assets). Populated for Meta (carousel child_attachments), Google Ads (responsive display marketing_images), and LinkedIn (multi-image posts).
356
356
  */
357
357
  mediaUrls?: Array<(string)>;
358
+ /**
359
+ * Meta only today. The carousel's cards in the order the ad shows them, one per
360
+ * Meta `link_data.child_attachments` entry, using the same field names as the
361
+ * `carouselCards` create input. On a carousel synced from Meta, `imageUrl` is resolved
362
+ * exactly like `mediaUrls` (the stable `/adimages` permalink first), so the cards that
363
+ * carry an image line up with `mediaUrls` in order; a card whose image Meta does not
364
+ * resolve keeps its place without `imageUrl`. On a carousel created through Zernio
365
+ * it starts as the cards you sent. Absent on non-carousel ads and on
366
+ * other platforms. Synced carousels stored before this field existed fill it in on
367
+ * their next sync.
368
+ *
369
+ */
370
+ carouselCards?: Array<{
371
+ /**
372
+ * Card image, resolved like the matching `mediaUrls` entry. Absent when Meta returns no resolvable image for the card.
373
+ */
374
+ imageUrl?: string;
375
+ /**
376
+ * Meta ad image hash of the card image (`image_hash`).
377
+ */
378
+ imageHash?: string;
379
+ /**
380
+ * Card title (Meta `name`).
381
+ */
382
+ headline?: string;
383
+ /**
384
+ * Card description, under the title (Meta `description`).
385
+ */
386
+ description?: string;
387
+ /**
388
+ * Card destination URL (Meta `link`).
389
+ */
390
+ linkUrl?: string;
391
+ /**
392
+ * Card call to action type (Meta `call_to_action.type`), e.g. SHOP_NOW or WATCH_MORE.
393
+ */
394
+ callToAction?: string;
395
+ /**
396
+ * Meta video id when the card is a video (`video_id`).
397
+ */
398
+ videoId?: string;
399
+ }>;
358
400
  /**
359
401
  * LinkedIn only. Whether LinkedIn is currently serving this specific creative. Complements the ad-level `servingStatuses`, which describes the parent campaign.
360
402
  */
@@ -10292,6 +10334,14 @@ export type SocialAccount = {
10292
10334
  profileId: (string | Profile);
10293
10335
  username?: string;
10294
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';
10295
10345
  /**
10296
10346
  * URL to the account's profile picture on the platform. May be null if the platform does not provide one.
10297
10347
  */
@@ -10360,6 +10410,7 @@ export type SocialAccount = {
10360
10410
  *
10361
10411
  * For Instagram accounts:
10362
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.
10363
10414
  *
10364
10415
  * For X (Twitter) accounts:
10365
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.
@@ -10372,6 +10423,11 @@ export type SocialAccount = {
10372
10423
 
10373
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';
10374
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
+
10375
10431
  /**
10376
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.
10377
10433
  */
@@ -19845,6 +19901,14 @@ export type GetConnectUrlData = {
19845
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.
19846
19902
  */
19847
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;
19848
19912
  /**
19849
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.
19850
19914
  */
@@ -19895,7 +19959,7 @@ export type GetConnectUrlData = {
19895
19959
  * `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are
19896
19960
  * conditional and must be treated as optional. Your own query params are kept on every
19897
19961
  * redirect, but ours overwrite a param of yours with the same name. On an error redirect the
19898
- * 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.
19899
19963
  *
19900
19964
  * Correlation (every redirect from an OAuth callback, success and failure, and the
19901
19965
  * `redirect_url` returned by the selection endpoints such as POST /v1/connect/facebook/select-page):
@@ -19948,7 +20012,7 @@ export type GetConnectUrlData = {
19948
20012
  * oauth_denied, invalid_callback, invalid_state, unsupported_platform, connection_failed,
19949
20013
  * internal_error, token_exchange_failed, byok_config_error, personal_account_not_supported,
19950
20014
  * missing_google_permissions, missing_tiktok_permissions, platform_requires_destination,
19951
- * reconnect_account_mismatch, instagram_login_method_mismatch, invalid_request,
20015
+ * reconnect_account_mismatch, account_mismatch, instagram_login_method_mismatch, invalid_request,
19952
20016
  * code_already_redeemed
19953
20017
  *
19954
20018
  * Access and limits: