@zernio/node 0.2.714 → 0.2.715

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.d.mts CHANGED
@@ -12630,6 +12630,9 @@ type CreatePostData = {
12630
12630
  * Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
12631
12631
  */
12632
12632
  content?: string;
12633
+ /**
12634
+ * Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.
12635
+ */
12633
12636
  mediaItems?: Array<MediaItem>;
12634
12637
  /**
12635
12638
  * Target platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
@@ -12648,12 +12651,21 @@ type CreatePostData = {
12648
12651
  scheduledFor?: string;
12649
12652
  platformSpecificData?: (TwitterPlatformData | ThreadsPlatformData | FacebookPlatformData | InstagramPlatformData | LinkedInPlatformData | PinterestPlatformData | YouTubePlatformData | GoogleBusinessPlatformData | TikTokPlatformData | TelegramPlatformData | SnapchatPlatformData | RedditPlatformData | BlueskyPlatformData | DiscordPlatformData | SlackPlatformData);
12650
12653
  }>;
12654
+ /**
12655
+ * When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.
12656
+ */
12651
12657
  scheduledFor?: string;
12658
+ /**
12659
+ * Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
12660
+ */
12652
12661
  publishNow?: boolean;
12653
12662
  /**
12654
12663
  * When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
12655
12664
  */
12656
12665
  isDraft?: boolean;
12666
+ /**
12667
+ * IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
12668
+ */
12657
12669
  timezone?: string;
12658
12670
  /**
12659
12671
  * Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
@@ -12667,7 +12679,13 @@ type CreatePostData = {
12667
12679
  * Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.
12668
12680
  */
12669
12681
  mentions?: Array<(string)>;
12682
+ /**
12683
+ * Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
12684
+ */
12670
12685
  crosspostingEnabled?: boolean;
12686
+ /**
12687
+ * Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.
12688
+ */
12671
12689
  metadata?: {
12672
12690
  [key: string]: unknown;
12673
12691
  };
@@ -13914,7 +13932,7 @@ type CreateInviteTokenError = (unknown | {
13914
13932
  type GetConnectUrlData = {
13915
13933
  path: {
13916
13934
  /**
13917
- * Social media platform to connect
13935
+ * Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.
13918
13936
  */
13919
13937
  platform: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'reddit' | 'pinterest' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp';
13920
13938
  };
@@ -36051,6 +36069,10 @@ type CreateTrackingTagData = {
36051
36069
  */
36052
36070
  adAccountId: string;
36053
36071
  name: string;
36072
+ /**
36073
+ * OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
36074
+ */
36075
+ defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
36054
36076
  };
36055
36077
  path: {
36056
36078
  /**
package/dist/index.d.ts CHANGED
@@ -12630,6 +12630,9 @@ type CreatePostData = {
12630
12630
  * Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
12631
12631
  */
12632
12632
  content?: string;
12633
+ /**
12634
+ * Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.
12635
+ */
12633
12636
  mediaItems?: Array<MediaItem>;
12634
12637
  /**
12635
12638
  * Target platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
@@ -12648,12 +12651,21 @@ type CreatePostData = {
12648
12651
  scheduledFor?: string;
12649
12652
  platformSpecificData?: (TwitterPlatformData | ThreadsPlatformData | FacebookPlatformData | InstagramPlatformData | LinkedInPlatformData | PinterestPlatformData | YouTubePlatformData | GoogleBusinessPlatformData | TikTokPlatformData | TelegramPlatformData | SnapchatPlatformData | RedditPlatformData | BlueskyPlatformData | DiscordPlatformData | SlackPlatformData);
12650
12653
  }>;
12654
+ /**
12655
+ * When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.
12656
+ */
12651
12657
  scheduledFor?: string;
12658
+ /**
12659
+ * Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
12660
+ */
12652
12661
  publishNow?: boolean;
12653
12662
  /**
12654
12663
  * When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
12655
12664
  */
12656
12665
  isDraft?: boolean;
12666
+ /**
12667
+ * IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
12668
+ */
12657
12669
  timezone?: string;
12658
12670
  /**
12659
12671
  * Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
@@ -12667,7 +12679,13 @@ type CreatePostData = {
12667
12679
  * Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.
12668
12680
  */
12669
12681
  mentions?: Array<(string)>;
12682
+ /**
12683
+ * Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
12684
+ */
12670
12685
  crosspostingEnabled?: boolean;
12686
+ /**
12687
+ * Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.
12688
+ */
12671
12689
  metadata?: {
12672
12690
  [key: string]: unknown;
12673
12691
  };
@@ -13914,7 +13932,7 @@ type CreateInviteTokenError = (unknown | {
13914
13932
  type GetConnectUrlData = {
13915
13933
  path: {
13916
13934
  /**
13917
- * Social media platform to connect
13935
+ * Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.
13918
13936
  */
13919
13937
  platform: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'reddit' | 'pinterest' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp';
13920
13938
  };
@@ -36051,6 +36069,10 @@ type CreateTrackingTagData = {
36051
36069
  */
36052
36070
  adAccountId: string;
36053
36071
  name: string;
36072
+ /**
36073
+ * OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
36074
+ */
36075
+ defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
36054
36076
  };
36055
36077
  path: {
36056
36078
  /**
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: "@zernio/node",
39
- version: "0.2.714",
39
+ version: "0.2.715",
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: "@zernio/node",
8
- version: "0.2.714",
8
+ version: "0.2.715",
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": "@zernio/node",
3
- "version": "0.2.714",
3
+ "version": "0.2.715",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -876,6 +876,10 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
876
876
  * Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response.
877
877
  * Content is optional when media is attached, all platforms have `customContent`, every platform entry is an X Article (`platformSpecificData.article`), or every platform entry is a LinkedIn text-free reshare (`platformSpecificData.reshareUrl` with no text). See each platform's schema for media constraints.
878
878
  *
879
+ * ## Scheduling
880
+ *
881
+ * Pick one of `scheduledFor` (schedule), `publishNow: true` (publish synchronously) or `queuedFromProfile` (next queue slot). With none of them and `isDraft` unset, the post is saved as a draft. `platforms` is required unless the post is a draft. `isDraft: true` wins over `publishNow` and `scheduledFor` (the post is saved, never published); `publishNow: true` wins over `scheduledFor`. A `scheduledFor` already in the past is not rejected: the post is published synchronously in the same request, exactly like `publishNow`.
882
+ *
879
883
  * ## Idempotency
880
884
  *
881
885
  * Two layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post.
@@ -3265,7 +3269,7 @@ export const getWebhookSettings = <ThrowOnError extends boolean = false>(options
3265
3269
  *
3266
3270
  * `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
3267
3271
  *
3268
- * Webhooks are automatically disabled after 10 consecutive delivery failures.
3272
+ * Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`.
3269
3273
  *
3270
3274
  * A restricted (zrk_) API key can only subscribe to events whose resource group
3271
3275
  * the key holds; an event outside the key's groups is rejected with 403, so a
@@ -3293,7 +3297,7 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
3293
3297
  *
3294
3298
  * When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
3295
3299
  *
3296
- * Webhooks are automatically disabled after 10 consecutive delivery failures.
3300
+ * Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`.
3297
3301
  *
3298
3302
  * A restricted (zrk_) API key can only set `events` to events whose resource
3299
3303
  * group the key holds; an event outside the key's groups is rejected with 403.
@@ -9999,7 +10003,8 @@ export const listTrackingTags = <ThrowOnError extends boolean = false>(options:
9999
10003
  * pixel.
10000
10004
  *
10001
10005
  * NOT idempotent on either platform: each call creates a new pixel (and,
10002
- * for OpenAI, a new Conversions API key). Do not retry blindly on
10006
+ * for OpenAI, a new Conversions API key plus, with `defaultEventType`, a
10007
+ * new conversion event setting). Do not retry blindly on
10003
10008
  * timeout. Meta (platform `metaads`) and OpenAI Ads (platform
10004
10009
  * `openaiads`); other platforms return 405.
10005
10010
  *
@@ -11784,6 +11784,9 @@ export type CreatePostData = {
11784
11784
  * Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
11785
11785
  */
11786
11786
  content?: string;
11787
+ /**
11788
+ * Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.
11789
+ */
11787
11790
  mediaItems?: Array<MediaItem>;
11788
11791
  /**
11789
11792
  * Target platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
@@ -11802,12 +11805,21 @@ export type CreatePostData = {
11802
11805
  scheduledFor?: string;
11803
11806
  platformSpecificData?: (TwitterPlatformData | ThreadsPlatformData | FacebookPlatformData | InstagramPlatformData | LinkedInPlatformData | PinterestPlatformData | YouTubePlatformData | GoogleBusinessPlatformData | TikTokPlatformData | TelegramPlatformData | SnapchatPlatformData | RedditPlatformData | BlueskyPlatformData | DiscordPlatformData | SlackPlatformData);
11804
11807
  }>;
11808
+ /**
11809
+ * When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.
11810
+ */
11805
11811
  scheduledFor?: string;
11812
+ /**
11813
+ * Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
11814
+ */
11806
11815
  publishNow?: boolean;
11807
11816
  /**
11808
11817
  * When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
11809
11818
  */
11810
11819
  isDraft?: boolean;
11820
+ /**
11821
+ * IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
11822
+ */
11811
11823
  timezone?: string;
11812
11824
  /**
11813
11825
  * Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
@@ -11821,7 +11833,13 @@ export type CreatePostData = {
11821
11833
  * Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.
11822
11834
  */
11823
11835
  mentions?: Array<(string)>;
11836
+ /**
11837
+ * Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
11838
+ */
11824
11839
  crosspostingEnabled?: boolean;
11840
+ /**
11841
+ * Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.
11842
+ */
11825
11843
  metadata?: {
11826
11844
  [key: string]: unknown;
11827
11845
  };
@@ -13169,7 +13187,7 @@ export type CreateInviteTokenError = (unknown | {
13169
13187
  export type GetConnectUrlData = {
13170
13188
  path: {
13171
13189
  /**
13172
- * Social media platform to connect
13190
+ * Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.
13173
13191
  */
13174
13192
  platform: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'reddit' | 'pinterest' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp';
13175
13193
  };
@@ -36800,6 +36818,10 @@ export type CreateTrackingTagData = {
36800
36818
  */
36801
36819
  adAccountId: string;
36802
36820
  name: string;
36821
+ /**
36822
+ * OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
36823
+ */
36824
+ defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
36803
36825
  };
36804
36826
  path: {
36805
36827
  /**