@getlatedev/node 0.2.1437 → 0.2.1439
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 +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +23 -2
- package/src/generated/types.gen.ts +35 -2
package/dist/index.d.mts
CHANGED
|
@@ -24051,11 +24051,13 @@ type GetFacebookPageInsightsData = {
|
|
|
24051
24051
|
* **Live Meta metrics** (current names, post-Nov-2025):
|
|
24052
24052
|
*
|
|
24053
24053
|
* - page_media_view (replaces deprecated page_impressions)
|
|
24054
|
+
* - page_total_media_view_unique (reach: unique viewers, replaces deprecated page_impressions_unique). The reach total sums daily unique viewers, not unique people over the range: a viewer seen on several days counts once per day. For a range of exactly 28 days it is Meta's 28-day unique viewers when Meta returns them.
|
|
24054
24055
|
* - page_views_total
|
|
24055
|
-
* - page_post_engagements
|
|
24056
|
+
* - page_post_engagements (content interactions: reactions, comments, shares and more)
|
|
24056
24057
|
* - page_video_views
|
|
24057
24058
|
* - page_video_view_time
|
|
24058
24059
|
* - page_follows (replaces deprecated page_fans)
|
|
24060
|
+
* - page_actions_post_reactions_like_total, page_actions_post_reactions_love_total, page_actions_post_reactions_wow_total, page_actions_post_reactions_haha_total, page_actions_post_reactions_sorry_total, page_actions_post_reactions_anger_total (reactions by type; like includes care)
|
|
24059
24061
|
*
|
|
24060
24062
|
* **Zernio-synthesized** from daily follower snapshots (filling the Nov-2025 gap left by the page_fan_adds / page_fan_removes deprecation):
|
|
24061
24063
|
*
|
|
@@ -56595,12 +56597,40 @@ type GetAdAccountHealthData = {
|
|
|
56595
56597
|
type GetAdAccountHealthResponse = ({
|
|
56596
56598
|
adAccountId?: string;
|
|
56597
56599
|
status?: 'ok' | 'attention' | 'blocked';
|
|
56600
|
+
/**
|
|
56601
|
+
* False when a create or boost on this ad account would be refused; `blockers` says why.
|
|
56602
|
+
*/
|
|
56603
|
+
ready?: boolean;
|
|
56604
|
+
blockers?: Array<{
|
|
56605
|
+
/**
|
|
56606
|
+
* The `checks[].id` that blocks.
|
|
56607
|
+
*/
|
|
56608
|
+
check: string;
|
|
56609
|
+
/**
|
|
56610
|
+
* The error code a refused create or boost returns for this reason.
|
|
56611
|
+
*/
|
|
56612
|
+
code: string;
|
|
56613
|
+
message: string;
|
|
56614
|
+
/**
|
|
56615
|
+
* What to do, in English.
|
|
56616
|
+
*/
|
|
56617
|
+
hint: string;
|
|
56618
|
+
fix?: {
|
|
56619
|
+
label?: string;
|
|
56620
|
+
url?: string;
|
|
56621
|
+
};
|
|
56622
|
+
}>;
|
|
56598
56623
|
checkedAt?: string;
|
|
56599
56624
|
checks?: Array<{
|
|
56600
|
-
id: 'account_status' | 'payment' | 'spend_cap' | 'page' | 'instagram' | 'lead_terms' | 'pixel' | 'whatsapp';
|
|
56625
|
+
id: 'account_status' | 'payment' | 'spend_cap' | 'page' | 'instagram' | 'lead_terms' | 'pixel' | 'whatsapp' | 'last_refusal';
|
|
56601
56626
|
status: 'ok' | 'warning' | 'error' | 'missing' | 'unknown';
|
|
56602
56627
|
title: string;
|
|
56603
56628
|
message: string;
|
|
56629
|
+
/**
|
|
56630
|
+
* When the check is not `ok`: the error code a create refused for this reason returns.
|
|
56631
|
+
*/
|
|
56632
|
+
code?: string;
|
|
56633
|
+
hint?: string;
|
|
56604
56634
|
fix?: {
|
|
56605
56635
|
label?: string;
|
|
56606
56636
|
url?: string;
|
|
@@ -57699,6 +57729,7 @@ type BoostPostData = {
|
|
|
57699
57729
|
*
|
|
57700
57730
|
* - Idempotency-Key storage and the duplicate-boost guard are bypassed.
|
|
57701
57731
|
* - Counts toward the 30 Meta writes per ad account per 5 minutes.
|
|
57732
|
+
* - Runs the account status and payment checks of GET /v1/ads/accounts/health first: an ad account that is not ready answers its blocker `code` (`ad_account_unusable`, `ad_account_payment_required`) with `details.hint` and `details.fix`, and Meta is not called.
|
|
57702
57733
|
* - With `adSetId`, only the ad is dry-run.
|
|
57703
57734
|
* - An Instagram video Meta refuses as a direct reference (subcode 1815279) comes back as `unverified` nodes, because the copy a real boost makes cannot be dry-run.
|
|
57704
57735
|
*
|
|
@@ -58096,6 +58127,8 @@ type CreateStandaloneAdData = {
|
|
|
58096
58127
|
*
|
|
58097
58128
|
* **Meta**: validates the inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created; validation bypasses Idempotency-Key storage. Success returns 200 with per-node results; a Meta rejection returns an error.
|
|
58098
58129
|
*
|
|
58130
|
+
* Before the dry run, Meta validateOnly runs the account status and payment checks of GET /v1/ads/accounts/health: an ad account that is not ready answers its blocker `code` (`ad_account_unusable`, `ad_account_payment_required`) with `details.hint` and `details.fix`, and Meta is not called.
|
|
58131
|
+
*
|
|
58099
58132
|
* - Supported: a single image or existing video.id (each also with bodies[] / headlines[] Multiple Text Options), all-image placementAssets with per-rule copy and text pools, or existingCreativeId.
|
|
58100
58133
|
* - Return 400: dynamicCreative, translations, carouselCards, placement videos, new video uploads, creatives[], adSetId, RESERVED buying.
|
|
58101
58134
|
* - Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped.
|
package/dist/index.d.ts
CHANGED
|
@@ -24051,11 +24051,13 @@ type GetFacebookPageInsightsData = {
|
|
|
24051
24051
|
* **Live Meta metrics** (current names, post-Nov-2025):
|
|
24052
24052
|
*
|
|
24053
24053
|
* - page_media_view (replaces deprecated page_impressions)
|
|
24054
|
+
* - page_total_media_view_unique (reach: unique viewers, replaces deprecated page_impressions_unique). The reach total sums daily unique viewers, not unique people over the range: a viewer seen on several days counts once per day. For a range of exactly 28 days it is Meta's 28-day unique viewers when Meta returns them.
|
|
24054
24055
|
* - page_views_total
|
|
24055
|
-
* - page_post_engagements
|
|
24056
|
+
* - page_post_engagements (content interactions: reactions, comments, shares and more)
|
|
24056
24057
|
* - page_video_views
|
|
24057
24058
|
* - page_video_view_time
|
|
24058
24059
|
* - page_follows (replaces deprecated page_fans)
|
|
24060
|
+
* - page_actions_post_reactions_like_total, page_actions_post_reactions_love_total, page_actions_post_reactions_wow_total, page_actions_post_reactions_haha_total, page_actions_post_reactions_sorry_total, page_actions_post_reactions_anger_total (reactions by type; like includes care)
|
|
24059
24061
|
*
|
|
24060
24062
|
* **Zernio-synthesized** from daily follower snapshots (filling the Nov-2025 gap left by the page_fan_adds / page_fan_removes deprecation):
|
|
24061
24063
|
*
|
|
@@ -56595,12 +56597,40 @@ type GetAdAccountHealthData = {
|
|
|
56595
56597
|
type GetAdAccountHealthResponse = ({
|
|
56596
56598
|
adAccountId?: string;
|
|
56597
56599
|
status?: 'ok' | 'attention' | 'blocked';
|
|
56600
|
+
/**
|
|
56601
|
+
* False when a create or boost on this ad account would be refused; `blockers` says why.
|
|
56602
|
+
*/
|
|
56603
|
+
ready?: boolean;
|
|
56604
|
+
blockers?: Array<{
|
|
56605
|
+
/**
|
|
56606
|
+
* The `checks[].id` that blocks.
|
|
56607
|
+
*/
|
|
56608
|
+
check: string;
|
|
56609
|
+
/**
|
|
56610
|
+
* The error code a refused create or boost returns for this reason.
|
|
56611
|
+
*/
|
|
56612
|
+
code: string;
|
|
56613
|
+
message: string;
|
|
56614
|
+
/**
|
|
56615
|
+
* What to do, in English.
|
|
56616
|
+
*/
|
|
56617
|
+
hint: string;
|
|
56618
|
+
fix?: {
|
|
56619
|
+
label?: string;
|
|
56620
|
+
url?: string;
|
|
56621
|
+
};
|
|
56622
|
+
}>;
|
|
56598
56623
|
checkedAt?: string;
|
|
56599
56624
|
checks?: Array<{
|
|
56600
|
-
id: 'account_status' | 'payment' | 'spend_cap' | 'page' | 'instagram' | 'lead_terms' | 'pixel' | 'whatsapp';
|
|
56625
|
+
id: 'account_status' | 'payment' | 'spend_cap' | 'page' | 'instagram' | 'lead_terms' | 'pixel' | 'whatsapp' | 'last_refusal';
|
|
56601
56626
|
status: 'ok' | 'warning' | 'error' | 'missing' | 'unknown';
|
|
56602
56627
|
title: string;
|
|
56603
56628
|
message: string;
|
|
56629
|
+
/**
|
|
56630
|
+
* When the check is not `ok`: the error code a create refused for this reason returns.
|
|
56631
|
+
*/
|
|
56632
|
+
code?: string;
|
|
56633
|
+
hint?: string;
|
|
56604
56634
|
fix?: {
|
|
56605
56635
|
label?: string;
|
|
56606
56636
|
url?: string;
|
|
@@ -57699,6 +57729,7 @@ type BoostPostData = {
|
|
|
57699
57729
|
*
|
|
57700
57730
|
* - Idempotency-Key storage and the duplicate-boost guard are bypassed.
|
|
57701
57731
|
* - Counts toward the 30 Meta writes per ad account per 5 minutes.
|
|
57732
|
+
* - Runs the account status and payment checks of GET /v1/ads/accounts/health first: an ad account that is not ready answers its blocker `code` (`ad_account_unusable`, `ad_account_payment_required`) with `details.hint` and `details.fix`, and Meta is not called.
|
|
57702
57733
|
* - With `adSetId`, only the ad is dry-run.
|
|
57703
57734
|
* - An Instagram video Meta refuses as a direct reference (subcode 1815279) comes back as `unverified` nodes, because the copy a real boost makes cannot be dry-run.
|
|
57704
57735
|
*
|
|
@@ -58096,6 +58127,8 @@ type CreateStandaloneAdData = {
|
|
|
58096
58127
|
*
|
|
58097
58128
|
* **Meta**: validates the inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created; validation bypasses Idempotency-Key storage. Success returns 200 with per-node results; a Meta rejection returns an error.
|
|
58098
58129
|
*
|
|
58130
|
+
* Before the dry run, Meta validateOnly runs the account status and payment checks of GET /v1/ads/accounts/health: an ad account that is not ready answers its blocker `code` (`ad_account_unusable`, `ad_account_payment_required`) with `details.hint` and `details.fix`, and Meta is not called.
|
|
58131
|
+
*
|
|
58099
58132
|
* - Supported: a single image or existing video.id (each also with bodies[] / headlines[] Multiple Text Options), all-image placementAssets with per-rule copy and text pools, or existingCreativeId.
|
|
58100
58133
|
* - Return 400: dynamicCreative, translations, carouselCards, placement videos, new video uploads, creatives[], adSetId, RESERVED buying.
|
|
58101
58134
|
* - Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped.
|
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.
|
|
39
|
+
version: "0.2.1439",
|
|
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.
|
|
8
|
+
version: "0.2.1439",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -337,7 +337,7 @@ export const getYouTubeVideoRetention = <ThrowOnError extends boolean = false>(o
|
|
|
337
337
|
|
|
338
338
|
/**
|
|
339
339
|
* Get Facebook Page insights
|
|
340
|
-
* Returns page-level Facebook insights (media views, views, post engagements, video metrics, follower counts). The response shape matches /v1/analytics/instagram/account-insights, so the same client handling works across platforms.
|
|
340
|
+
* Returns page-level Facebook insights (media views, reach, views, post engagements, reaction counts, video metrics, follower counts). The response shape matches /v1/analytics/instagram/account-insights, so the same client handling works across platforms.
|
|
341
341
|
*
|
|
342
342
|
* Max 89 days, defaults to last 30 days.
|
|
343
343
|
*
|
|
@@ -350,6 +350,8 @@ export const getYouTubeVideoRetention = <ThrowOnError extends boolean = false>(o
|
|
|
350
350
|
* - page_fan_adds
|
|
351
351
|
* - page_fan_removes
|
|
352
352
|
*
|
|
353
|
+
* page_impressions_unique is deprecated above Graph API v25 and is not accepted; use page_total_media_view_unique. Meta's Page Insights reference (https://developers.facebook.com/docs/graph-api/reference/insights) also deprecates a number of Page Insights metrics for all API versions by June 15, 2026.
|
|
354
|
+
*
|
|
353
355
|
* Use the replacements below. Because Meta did not provide direct adds/removes replacements, Zernio synthesizes followers_gained / followers_lost from the daily follower snapshotter.
|
|
354
356
|
*
|
|
355
357
|
*/
|
|
@@ -16038,15 +16040,34 @@ export const getAdAccountFinance = <ThrowOnError extends boolean = false>(option
|
|
|
16038
16040
|
* - the Page's Lead Ads terms
|
|
16039
16041
|
* - the newest pixel event
|
|
16040
16042
|
* - the WhatsApp number linked to the Page
|
|
16043
|
+
* - the last refusal Meta gave a create or boost for a reason only the account owner can fix (`last_refusal`, see below)
|
|
16041
16044
|
*
|
|
16042
16045
|
* Each check reads on its own: one this connection cannot see comes back `unknown` instead of failing the request.
|
|
16043
16046
|
*
|
|
16047
|
+
* ### Remembered refusals
|
|
16048
|
+
*
|
|
16049
|
+
* Meta cannot be asked about a code 31 security check up front. So `last_refusal` reports the last refusal of this kind that a create or boost met:
|
|
16050
|
+
*
|
|
16051
|
+
* - a code 31 security check or a temporary block, remembered for the connection (`accountId`)
|
|
16052
|
+
* - a payment method, the non-discrimination policy or a disabled account, remembered for the ad account
|
|
16053
|
+
*
|
|
16054
|
+
* It stays until a later create succeeds, or for 7 days (1 day for a temporary block).
|
|
16055
|
+
*
|
|
16044
16056
|
* ### Reading the result
|
|
16045
16057
|
*
|
|
16046
|
-
* - `
|
|
16058
|
+
* - `ready` is `false` when a create or boost would be refused. `blockers` lists why, each with the `code` a refused create returns (`ad_account_unusable`, `ad_account_payment_required`, `linked_account_required`, `meta_security_check_required`, `ad_account_policy_not_accepted`, ...), a `hint` and a `fix` link.
|
|
16059
|
+
* - `status` is `blocked` when any check is `error`, `attention` when one is `warning`, else `ok`. It also counts problems that stop delivery but not a create, such as a reached spending limit, so `status` can be `blocked` while `ready` is `true`.
|
|
16060
|
+
* - A check that is not `ok` carries the `code` of the create refusal it explains, when there is one: `whatsapp` (`missing`) carries `whatsapp_number_not_linked` and `lead_terms` (`missing`) carries `lead_ads_terms_not_accepted`, which only click-to-WhatsApp ads and lead ads hit.
|
|
16047
16061
|
* - `missing` marks an optional asset that is not set up (a pixel, a WhatsApp number): only the ads that need it are affected.
|
|
16062
|
+
* - An unsettled balance (`account_status` 3) is a `warning`: Meta still accepts creates on it while a payment method is set.
|
|
16048
16063
|
* - A `fix.url` is either a Meta page or a Zernio dashboard path (starting with `/`).
|
|
16049
16064
|
*
|
|
16065
|
+
* ### validateOnly
|
|
16066
|
+
*
|
|
16067
|
+
* `POST /v1/ads/create` and `POST /v1/ads/boost` with `validateOnly: true` run the account status and payment checks first. A blocked account answers the same `code` with `details.hint` and `details.fix`, without a Meta dry run (Meta counts dry runs as ad writes).
|
|
16068
|
+
*
|
|
16069
|
+
* They read the account state cached for up to 5 minutes. This endpoint always reads it fresh and refreshes that cache.
|
|
16070
|
+
*
|
|
16050
16071
|
*/
|
|
16051
16072
|
export const getAdAccountHealth = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdAccountHealthData, ThrowOnError>) => {
|
|
16052
16073
|
return (options?.client ?? client).get<GetAdAccountHealthResponse, GetAdAccountHealthError, ThrowOnError>({
|
|
@@ -22759,11 +22759,13 @@ export type GetFacebookPageInsightsData = {
|
|
|
22759
22759
|
* **Live Meta metrics** (current names, post-Nov-2025):
|
|
22760
22760
|
*
|
|
22761
22761
|
* - page_media_view (replaces deprecated page_impressions)
|
|
22762
|
+
* - page_total_media_view_unique (reach: unique viewers, replaces deprecated page_impressions_unique). The reach total sums daily unique viewers, not unique people over the range: a viewer seen on several days counts once per day. For a range of exactly 28 days it is Meta's 28-day unique viewers when Meta returns them.
|
|
22762
22763
|
* - page_views_total
|
|
22763
|
-
* - page_post_engagements
|
|
22764
|
+
* - page_post_engagements (content interactions: reactions, comments, shares and more)
|
|
22764
22765
|
* - page_video_views
|
|
22765
22766
|
* - page_video_view_time
|
|
22766
22767
|
* - page_follows (replaces deprecated page_fans)
|
|
22768
|
+
* - page_actions_post_reactions_like_total, page_actions_post_reactions_love_total, page_actions_post_reactions_wow_total, page_actions_post_reactions_haha_total, page_actions_post_reactions_sorry_total, page_actions_post_reactions_anger_total (reactions by type; like includes care)
|
|
22767
22769
|
*
|
|
22768
22770
|
* **Zernio-synthesized** from daily follower snapshots (filling the Nov-2025 gap left by the page_fan_adds / page_fan_removes deprecation):
|
|
22769
22771
|
*
|
|
@@ -57744,12 +57746,40 @@ export type GetAdAccountHealthData = {
|
|
|
57744
57746
|
export type GetAdAccountHealthResponse = ({
|
|
57745
57747
|
adAccountId?: string;
|
|
57746
57748
|
status?: 'ok' | 'attention' | 'blocked';
|
|
57749
|
+
/**
|
|
57750
|
+
* False when a create or boost on this ad account would be refused; `blockers` says why.
|
|
57751
|
+
*/
|
|
57752
|
+
ready?: boolean;
|
|
57753
|
+
blockers?: Array<{
|
|
57754
|
+
/**
|
|
57755
|
+
* The `checks[].id` that blocks.
|
|
57756
|
+
*/
|
|
57757
|
+
check: string;
|
|
57758
|
+
/**
|
|
57759
|
+
* The error code a refused create or boost returns for this reason.
|
|
57760
|
+
*/
|
|
57761
|
+
code: string;
|
|
57762
|
+
message: string;
|
|
57763
|
+
/**
|
|
57764
|
+
* What to do, in English.
|
|
57765
|
+
*/
|
|
57766
|
+
hint: string;
|
|
57767
|
+
fix?: {
|
|
57768
|
+
label?: string;
|
|
57769
|
+
url?: string;
|
|
57770
|
+
};
|
|
57771
|
+
}>;
|
|
57747
57772
|
checkedAt?: string;
|
|
57748
57773
|
checks?: Array<{
|
|
57749
|
-
id: 'account_status' | 'payment' | 'spend_cap' | 'page' | 'instagram' | 'lead_terms' | 'pixel' | 'whatsapp';
|
|
57774
|
+
id: 'account_status' | 'payment' | 'spend_cap' | 'page' | 'instagram' | 'lead_terms' | 'pixel' | 'whatsapp' | 'last_refusal';
|
|
57750
57775
|
status: 'ok' | 'warning' | 'error' | 'missing' | 'unknown';
|
|
57751
57776
|
title: string;
|
|
57752
57777
|
message: string;
|
|
57778
|
+
/**
|
|
57779
|
+
* When the check is not `ok`: the error code a create refused for this reason returns.
|
|
57780
|
+
*/
|
|
57781
|
+
code?: string;
|
|
57782
|
+
hint?: string;
|
|
57753
57783
|
fix?: {
|
|
57754
57784
|
label?: string;
|
|
57755
57785
|
url?: string;
|
|
@@ -58868,6 +58898,7 @@ export type BoostPostData = {
|
|
|
58868
58898
|
*
|
|
58869
58899
|
* - Idempotency-Key storage and the duplicate-boost guard are bypassed.
|
|
58870
58900
|
* - Counts toward the 30 Meta writes per ad account per 5 minutes.
|
|
58901
|
+
* - Runs the account status and payment checks of GET /v1/ads/accounts/health first: an ad account that is not ready answers its blocker `code` (`ad_account_unusable`, `ad_account_payment_required`) with `details.hint` and `details.fix`, and Meta is not called.
|
|
58871
58902
|
* - With `adSetId`, only the ad is dry-run.
|
|
58872
58903
|
* - An Instagram video Meta refuses as a direct reference (subcode 1815279) comes back as `unverified` nodes, because the copy a real boost makes cannot be dry-run.
|
|
58873
58904
|
*
|
|
@@ -59289,6 +59320,8 @@ export type CreateStandaloneAdData = {
|
|
|
59289
59320
|
*
|
|
59290
59321
|
* **Meta**: validates the inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created; validation bypasses Idempotency-Key storage. Success returns 200 with per-node results; a Meta rejection returns an error.
|
|
59291
59322
|
*
|
|
59323
|
+
* Before the dry run, Meta validateOnly runs the account status and payment checks of GET /v1/ads/accounts/health: an ad account that is not ready answers its blocker `code` (`ad_account_unusable`, `ad_account_payment_required`) with `details.hint` and `details.fix`, and Meta is not called.
|
|
59324
|
+
*
|
|
59292
59325
|
* - Supported: a single image or existing video.id (each also with bodies[] / headlines[] Multiple Text Options), all-image placementAssets with per-rule copy and text pools, or existingCreativeId.
|
|
59293
59326
|
* - Return 400: dynamicCreative, translations, carouselCards, placement videos, new video uploads, creatives[], adSetId, RESERVED buying.
|
|
59294
59327
|
* - Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped.
|