@zernio/node 0.2.763 → 0.2.765

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
@@ -7142,7 +7142,9 @@ type MetaInstagramIdentityRef = {
7142
7142
  /**
7143
7143
  * Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.
7144
7144
  */
7145
- type MetaPromotion = null;
7145
+ type MetaPromotion = {
7146
+ [key: string]: unknown;
7147
+ } | null;
7146
7148
  type Money = {
7147
7149
  /**
7148
7150
  * ISO 4217 currency code (e.g. USD, EUR)
@@ -8463,7 +8465,7 @@ type TikTokPlatformData = {
8463
8465
  */
8464
8466
  videoCoverTimestampMs?: number;
8465
8467
  /**
8466
- * Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is stitched as a single frame at the start of the video and used as the cover. Accounts connected through the TikTok for Business app instead pass the URL to TikTok as the cover directly, with no stitching, and the URL must resolve on a domain we have verified with TikTok. Overrides videoCoverTimestampMs when provided.
8468
+ * Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). Any downloadable URL works: we rehost it ourselves. The image is stitched as a single frame at the start of the video to serve as the cover. Accounts connected through the TikTok for Business app hand it to TikTok as the cover instead, with no stitching, falling back to videoCoverTimestampMs without it. Overrides videoCoverTimestampMs when provided.
8467
8469
  */
8468
8470
  videoCoverImageUrl?: string;
8469
8471
  /**
@@ -14117,7 +14119,7 @@ type CreatePostData = {
14117
14119
  */
14118
14120
  isDraft?: boolean;
14119
14121
  /**
14120
- * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`.
14122
+ * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`. Accounts connected through the TikTok for Business app do not go through these limits at all and also always report `canPublish: true`, so on those accounts a dry run confirms the request is well-formed rather than gating it.
14121
14123
  */
14122
14124
  dryRun?: boolean;
14123
14125
  /**
@@ -15497,8 +15499,8 @@ type GetConnectUrlData = {
15497
15499
  * OAuth and callback:
15498
15500
  * oauth_denied, invalid_callback, invalid_state, unsupported_platform, connection_failed,
15499
15501
  * internal_error, token_exchange_failed, byok_config_error, personal_account_not_supported,
15500
- * missing_google_permissions, platform_requires_destination, reconnect_account_mismatch,
15501
- * invalid_request
15502
+ * missing_google_permissions, missing_tiktok_permissions, platform_requires_destination,
15503
+ * reconnect_account_mismatch, invalid_request
15502
15504
  *
15503
15505
  * Access and limits:
15504
15506
  * profile_not_found, invalid_profile_id, access_denied, account_limit_exceeded,
@@ -15539,6 +15541,10 @@ type GetConnectUrlData = {
15539
15541
  * (`tiktokads`, `xads`), not the value used in the request path. The googleads and shopify
15540
15542
  * flows report `googleads` and `shopify`.
15541
15543
  *
15544
+ * 3. `missing_tiktok_permissions` means the TikTok authorization left out a permission the
15545
+ * already-connected account needs, so nothing was changed and it keeps working as before.
15546
+ * It is user-fixable: connect again and accept every permission on TikTok's screen.
15547
+ *
15542
15548
  */
15543
15549
  redirect_url?: string;
15544
15550
  /**
package/dist/index.d.ts CHANGED
@@ -7142,7 +7142,9 @@ type MetaInstagramIdentityRef = {
7142
7142
  /**
7143
7143
  * Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.
7144
7144
  */
7145
- type MetaPromotion = null;
7145
+ type MetaPromotion = {
7146
+ [key: string]: unknown;
7147
+ } | null;
7146
7148
  type Money = {
7147
7149
  /**
7148
7150
  * ISO 4217 currency code (e.g. USD, EUR)
@@ -8463,7 +8465,7 @@ type TikTokPlatformData = {
8463
8465
  */
8464
8466
  videoCoverTimestampMs?: number;
8465
8467
  /**
8466
- * Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is stitched as a single frame at the start of the video and used as the cover. Accounts connected through the TikTok for Business app instead pass the URL to TikTok as the cover directly, with no stitching, and the URL must resolve on a domain we have verified with TikTok. Overrides videoCoverTimestampMs when provided.
8468
+ * Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). Any downloadable URL works: we rehost it ourselves. The image is stitched as a single frame at the start of the video to serve as the cover. Accounts connected through the TikTok for Business app hand it to TikTok as the cover instead, with no stitching, falling back to videoCoverTimestampMs without it. Overrides videoCoverTimestampMs when provided.
8467
8469
  */
8468
8470
  videoCoverImageUrl?: string;
8469
8471
  /**
@@ -14117,7 +14119,7 @@ type CreatePostData = {
14117
14119
  */
14118
14120
  isDraft?: boolean;
14119
14121
  /**
14120
- * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`.
14122
+ * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`. Accounts connected through the TikTok for Business app do not go through these limits at all and also always report `canPublish: true`, so on those accounts a dry run confirms the request is well-formed rather than gating it.
14121
14123
  */
14122
14124
  dryRun?: boolean;
14123
14125
  /**
@@ -15497,8 +15499,8 @@ type GetConnectUrlData = {
15497
15499
  * OAuth and callback:
15498
15500
  * oauth_denied, invalid_callback, invalid_state, unsupported_platform, connection_failed,
15499
15501
  * internal_error, token_exchange_failed, byok_config_error, personal_account_not_supported,
15500
- * missing_google_permissions, platform_requires_destination, reconnect_account_mismatch,
15501
- * invalid_request
15502
+ * missing_google_permissions, missing_tiktok_permissions, platform_requires_destination,
15503
+ * reconnect_account_mismatch, invalid_request
15502
15504
  *
15503
15505
  * Access and limits:
15504
15506
  * profile_not_found, invalid_profile_id, access_denied, account_limit_exceeded,
@@ -15539,6 +15541,10 @@ type GetConnectUrlData = {
15539
15541
  * (`tiktokads`, `xads`), not the value used in the request path. The googleads and shopify
15540
15542
  * flows report `googleads` and `shopify`.
15541
15543
  *
15544
+ * 3. `missing_tiktok_permissions` means the TikTok authorization left out a permission the
15545
+ * already-connected account needs, so nothing was changed and it keeps working as before.
15546
+ * It is user-fixable: connect again and accept every permission on TikTok's screen.
15547
+ *
15542
15548
  */
15543
15549
  redirect_url?: string;
15544
15550
  /**
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.763",
39
+ version: "0.2.765",
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.763",
8
+ version: "0.2.765",
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.763",
3
+ "version": "0.2.765",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1567,6 +1567,15 @@ export const createInviteToken = <ThrowOnError extends boolean = false>(options:
1567
1567
  * Initiate an OAuth connection flow. Returns an authUrl to redirect the user to.
1568
1568
  * Standard flow: Zernio hosts the selection UI, then redirects to your redirect_url. Headless mode (headless=true): user is redirected to your redirect_url with OAuth data for custom UI. Use the platform-specific selection endpoints to complete.
1569
1569
  *
1570
+ * TikTok: every connection now goes through the TikTok for Business app. One TikTok account per
1571
+ * profile, so connecting on a profile that already holds one replaces it. Reconnecting the SAME
1572
+ * account keeps it and all of its history; authorizing a DIFFERENT TikTok account takes the slot
1573
+ * over and permanently deletes the previous account's analytics, inbox and DM history. The two
1574
+ * are told apart by the `@handle` stored at the last connect, so an account whose handle has
1575
+ * been renamed on TikTok since then reads as a different account. An authorization that leaves
1576
+ * out a permission the connected account needs changes nothing at all and comes back as
1577
+ * `missing_tiktok_permissions`; connect again and accept every permission on TikTok's screen.
1578
+ *
1570
1579
  */
1571
1580
  export const getConnectUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetConnectUrlData, ThrowOnError>) => {
1572
1581
  return (options?.client ?? client).get<GetConnectUrlResponse, GetConnectUrlError, ThrowOnError>({
@@ -5773,7 +5773,9 @@ export type MetaInstagramIdentityRef = {
5773
5773
  /**
5774
5774
  * Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.
5775
5775
  */
5776
- export type MetaPromotion = null;
5776
+ export type MetaPromotion = {
5777
+ [key: string]: unknown;
5778
+ } | null;
5777
5779
 
5778
5780
  export type Money = {
5779
5781
  /**
@@ -7160,7 +7162,7 @@ export type TikTokPlatformData = {
7160
7162
  */
7161
7163
  videoCoverTimestampMs?: number;
7162
7164
  /**
7163
- * Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is stitched as a single frame at the start of the video and used as the cover. Accounts connected through the TikTok for Business app instead pass the URL to TikTok as the cover directly, with no stitching, and the URL must resolve on a domain we have verified with TikTok. Overrides videoCoverTimestampMs when provided.
7165
+ * Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). Any downloadable URL works: we rehost it ourselves. The image is stitched as a single frame at the start of the video to serve as the cover. Accounts connected through the TikTok for Business app hand it to TikTok as the cover instead, with no stitching, falling back to videoCoverTimestampMs without it. Overrides videoCoverTimestampMs when provided.
7164
7166
  */
7165
7167
  videoCoverImageUrl?: string;
7166
7168
  /**
@@ -13106,7 +13108,7 @@ export type CreatePostData = {
13106
13108
  */
13107
13109
  isDraft?: boolean;
13108
13110
  /**
13109
- * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`.
13111
+ * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`. Accounts connected through the TikTok for Business app do not go through these limits at all and also always report `canPublish: true`, so on those accounts a dry run confirms the request is well-formed rather than gating it.
13110
13112
  */
13111
13113
  dryRun?: boolean;
13112
13114
  /**
@@ -14593,8 +14595,8 @@ export type GetConnectUrlData = {
14593
14595
  * OAuth and callback:
14594
14596
  * oauth_denied, invalid_callback, invalid_state, unsupported_platform, connection_failed,
14595
14597
  * internal_error, token_exchange_failed, byok_config_error, personal_account_not_supported,
14596
- * missing_google_permissions, platform_requires_destination, reconnect_account_mismatch,
14597
- * invalid_request
14598
+ * missing_google_permissions, missing_tiktok_permissions, platform_requires_destination,
14599
+ * reconnect_account_mismatch, invalid_request
14598
14600
  *
14599
14601
  * Access and limits:
14600
14602
  * profile_not_found, invalid_profile_id, access_denied, account_limit_exceeded,
@@ -14635,6 +14637,10 @@ export type GetConnectUrlData = {
14635
14637
  * (`tiktokads`, `xads`), not the value used in the request path. The googleads and shopify
14636
14638
  * flows report `googleads` and `shopify`.
14637
14639
  *
14640
+ * 3. `missing_tiktok_permissions` means the TikTok authorization left out a permission the
14641
+ * already-connected account needs, so nothing was changed and it keeps working as before.
14642
+ * It is user-fixable: connect again and accept every permission on TikTok's screen.
14643
+ *
14638
14644
  */
14639
14645
  redirect_url?: string;
14640
14646
  /**