@zernio/node 0.2.471 → 0.2.473
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 +139 -44
- package/dist/index.d.ts +139 -44
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +2 -0
- package/src/generated/types.gen.ts +139 -43
|
@@ -450,7 +450,7 @@ export type AdMetrics = {
|
|
|
450
450
|
cpm?: number;
|
|
451
451
|
engagement?: number;
|
|
452
452
|
/**
|
|
453
|
-
* Count of conversion events over the requested date range. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
453
|
+
* Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
454
454
|
*/
|
|
455
455
|
conversions?: number;
|
|
456
456
|
/**
|
|
@@ -2258,14 +2258,10 @@ export type ExternalPostWebhookPost = {
|
|
|
2258
2258
|
export type source = 'external';
|
|
2259
2259
|
|
|
2260
2260
|
/**
|
|
2261
|
-
* Feed posts support up to 10 images (no mixed video+image). Stories require single media (24h, no captions). Reels require single vertical video (9:16, 3-60s).
|
|
2261
|
+
* Feed posts support up to 10 images (no mixed video+image). Stories require single media (24h, no captions). Reels require single vertical video (9:16, 3-60s). Geo-restriction is a hard visibility restriction: users outside the specified countries cannot see the post. Not supported for stories. Draft, carousel, and colored-background text options live under facebookSettings, see FacebookSettings.
|
|
2262
2262
|
*
|
|
2263
2263
|
*/
|
|
2264
2264
|
export type FacebookPlatformData = {
|
|
2265
|
-
/**
|
|
2266
|
-
* When true, creates the post as a draft in Facebook Publishing Tools instead of publishing immediately. Supported for feed posts (text, link, image, video) and reels. Not supported for stories. Drafts expire after ~30 days.
|
|
2267
|
-
*/
|
|
2268
|
-
draft?: boolean;
|
|
2269
2265
|
/**
|
|
2270
2266
|
* Set to 'story' for Page Stories (24h ephemeral) or 'reel' for Reels (short vertical video). Defaults to feed post if omitted.
|
|
2271
2267
|
*/
|
|
@@ -2275,7 +2271,7 @@ export type FacebookPlatformData = {
|
|
|
2275
2271
|
*/
|
|
2276
2272
|
title?: string;
|
|
2277
2273
|
/**
|
|
2278
|
-
* Optional first comment to post immediately after publishing (feed posts and reels, not stories). Skipped when draft is true.
|
|
2274
|
+
* Optional first comment to post immediately after publishing (feed posts and reels, not stories). Skipped when facebookSettings.draft is true.
|
|
2279
2275
|
*/
|
|
2280
2276
|
firstComment?: string;
|
|
2281
2277
|
/**
|
|
@@ -2283,34 +2279,7 @@ export type FacebookPlatformData = {
|
|
|
2283
2279
|
*/
|
|
2284
2280
|
pageId?: string;
|
|
2285
2281
|
geoRestriction?: GeoRestriction;
|
|
2286
|
-
|
|
2287
|
-
* Renders the post as a multi-link carousel (organic Page post). When set, mediaItems must be provided with the same length and all items must be images (no videos). Each cards[i] adds the click-through link and headline for the image at mediaItems[i]. Mutually exclusive with contentType=story|reel. Facebook display truncates name at ~35 chars and description at ~30 chars; longer strings are accepted but get truncated on render.
|
|
2288
|
-
*
|
|
2289
|
-
*/
|
|
2290
|
-
carouselCards?: Array<{
|
|
2291
|
-
/**
|
|
2292
|
-
* Per-card click destination (required).
|
|
2293
|
-
*/
|
|
2294
|
-
link: string;
|
|
2295
|
-
/**
|
|
2296
|
-
* Per-card headline (optional, ~35-char display).
|
|
2297
|
-
*/
|
|
2298
|
-
name?: string;
|
|
2299
|
-
/**
|
|
2300
|
-
* Per-card subhead (optional, ~30-char display).
|
|
2301
|
-
*/
|
|
2302
|
-
description?: string;
|
|
2303
|
-
}>;
|
|
2304
|
-
/**
|
|
2305
|
-
* Optional top-level "See more" destination shown on the carousel end card. Defaults to the first card's link when omitted. Only used together with carouselCards.
|
|
2306
|
-
*
|
|
2307
|
-
*/
|
|
2308
|
-
carouselLink?: string;
|
|
2309
|
-
/**
|
|
2310
|
-
* Facebook-defined preset ID that renders the post as large text on a colored background (Graph `text_format_preset_id`). Supply the raw numeric ID from Meta; we do not publish a catalog of presets and Facebook may change the available set. Pages only (ignored on personal profiles and groups) and text-only feed posts only: the request is rejected with 400 when mediaItems or carouselCards are present, when contentType is story or reel, or when content is empty. An attachment makes Facebook drop the background silently, so those are rejected up front. Length is NOT rejected: Facebook's composer stops offering a background at around 130 characters, but Meta documents no API limit, so longer content publishes and returns a warning instead. A URL detected in the content is NOT attached as a link preview while a preset is set, because a link attachment also makes Facebook drop the background.
|
|
2311
|
-
*
|
|
2312
|
-
*/
|
|
2313
|
-
textFormatPresetId?: string;
|
|
2282
|
+
facebookSettings?: FacebookSettings;
|
|
2314
2283
|
};
|
|
2315
2284
|
|
|
2316
2285
|
/**
|
|
@@ -2408,6 +2377,45 @@ export type FacebookPostEarningsResponse = {
|
|
|
2408
2377
|
*/
|
|
2409
2378
|
export type period = 'lifetime';
|
|
2410
2379
|
|
|
2380
|
+
/**
|
|
2381
|
+
* Facebook options that must be nested under platformSpecificData.facebookSettings, or sent at the request root as facebookSettings. The remaining Facebook options sit directly on platformSpecificData, see FacebookPlatformData.
|
|
2382
|
+
*
|
|
2383
|
+
*/
|
|
2384
|
+
export type FacebookSettings = {
|
|
2385
|
+
/**
|
|
2386
|
+
* When true, creates the post as a draft in Facebook Publishing Tools instead of publishing immediately. Supported for feed posts (text, link, image, video) and reels. Not supported for stories. Drafts expire after ~30 days.
|
|
2387
|
+
*/
|
|
2388
|
+
draft?: boolean;
|
|
2389
|
+
/**
|
|
2390
|
+
* Renders the post as a multi-link carousel (organic Page post). When set, mediaItems must be provided with the same length and all items must be images (no videos). Each cards[i] adds the click-through link and headline for the image at mediaItems[i]. Mutually exclusive with contentType=story|reel. Facebook display truncates name at ~35 chars and description at ~30 chars; longer strings are accepted but get truncated on render.
|
|
2391
|
+
*
|
|
2392
|
+
*/
|
|
2393
|
+
carouselCards?: Array<{
|
|
2394
|
+
/**
|
|
2395
|
+
* Per-card click destination (required).
|
|
2396
|
+
*/
|
|
2397
|
+
link: string;
|
|
2398
|
+
/**
|
|
2399
|
+
* Per-card headline (optional, ~35-char display).
|
|
2400
|
+
*/
|
|
2401
|
+
name?: string;
|
|
2402
|
+
/**
|
|
2403
|
+
* Per-card subhead (optional, ~30-char display).
|
|
2404
|
+
*/
|
|
2405
|
+
description?: string;
|
|
2406
|
+
}>;
|
|
2407
|
+
/**
|
|
2408
|
+
* Optional top-level "See more" destination shown on the carousel end card. Defaults to the first card's link when omitted. Only used together with carouselCards.
|
|
2409
|
+
*
|
|
2410
|
+
*/
|
|
2411
|
+
carouselLink?: string;
|
|
2412
|
+
/**
|
|
2413
|
+
* Facebook-defined preset ID that renders the post as large text on a colored background (Graph `text_format_preset_id`). Supply the raw numeric ID from Meta; we do not publish a catalog of presets and Facebook may change the available set. Pages only (ignored on personal profiles and groups) and text-only feed posts only: the request is rejected with 400 when mediaItems or carouselCards are present, when contentType is story or reel, or when content is empty. An attachment makes Facebook drop the background silently, so those are rejected up front. Length is NOT rejected: Facebook's composer stops offering a background at around 130 characters, but Meta documents no API limit, so longer content publishes and returns a warning instead. A URL detected in the content is NOT attached as a link preview while a preset is set, because a link attachment also makes Facebook drop the background.
|
|
2414
|
+
*
|
|
2415
|
+
*/
|
|
2416
|
+
textFormatPresetId?: string;
|
|
2417
|
+
};
|
|
2418
|
+
|
|
2411
2419
|
export type FollowerStatsResponse = {
|
|
2412
2420
|
accounts?: Array<AccountWithFollowerStats>;
|
|
2413
2421
|
stats?: {
|
|
@@ -9400,9 +9408,9 @@ export type CreatePostData = {
|
|
|
9400
9408
|
*/
|
|
9401
9409
|
tiktokSettings?: TikTokPlatformData;
|
|
9402
9410
|
/**
|
|
9403
|
-
* Root-level Facebook settings applied to all Facebook platforms. Merged into each platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
9411
|
+
* Root-level Facebook settings applied to all Facebook platforms. Merged into each platform's platformSpecificData.facebookSettings, with platform-specific settings taking precedence.
|
|
9404
9412
|
*/
|
|
9405
|
-
facebookSettings?:
|
|
9413
|
+
facebookSettings?: FacebookSettings;
|
|
9406
9414
|
recycling?: RecyclingConfig;
|
|
9407
9415
|
/**
|
|
9408
9416
|
* Profile ID to schedule via queue. When provided without scheduledFor, the post is auto-assigned to the next available slot. Do not call /v1/queue/next-slot and use that time in scheduledFor, as that bypasses queue locking.
|
|
@@ -9564,11 +9572,11 @@ export type UpdatePostData = {
|
|
|
9564
9572
|
*/
|
|
9565
9573
|
tiktokSettings?: TikTokPlatformData;
|
|
9566
9574
|
/**
|
|
9567
|
-
* Root-level Facebook settings applied to all Facebook platforms. Merged into each platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
9575
|
+
* Root-level Facebook settings applied to all Facebook platforms. Merged into each platform's platformSpecificData.facebookSettings, with platform-specific settings taking precedence.
|
|
9568
9576
|
*/
|
|
9569
|
-
facebookSettings?:
|
|
9577
|
+
facebookSettings?: FacebookSettings;
|
|
9570
9578
|
recycling?: RecyclingConfig;
|
|
9571
|
-
[key: string]: unknown | string | MediaItem | boolean | TikTokPlatformData |
|
|
9579
|
+
[key: string]: unknown | string | MediaItem | boolean | TikTokPlatformData | FacebookSettings | RecyclingConfig;
|
|
9572
9580
|
};
|
|
9573
9581
|
path: {
|
|
9574
9582
|
postId: string;
|
|
@@ -25068,6 +25076,24 @@ export type CreateAdCampaignData = {
|
|
|
25068
25076
|
budgetAmount?: number;
|
|
25069
25077
|
budgetType?: 'daily' | 'lifetime';
|
|
25070
25078
|
status?: 'ACTIVE' | 'PAUSED';
|
|
25079
|
+
/**
|
|
25080
|
+
* Campaign bid strategy. Meta puts `bid_strategy` where the budget lives, so this applies only alongside a campaign budget (CBO). Previously settable only via `PUT /v1/ads/campaigns/{campaignId}`.
|
|
25081
|
+
*/
|
|
25082
|
+
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
25083
|
+
/**
|
|
25084
|
+
* Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise.
|
|
25085
|
+
*/
|
|
25086
|
+
bidAmount?: number;
|
|
25087
|
+
/**
|
|
25088
|
+
* Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS.
|
|
25089
|
+
*/
|
|
25090
|
+
roasAverageFloor?: number;
|
|
25091
|
+
};
|
|
25092
|
+
headers?: {
|
|
25093
|
+
/**
|
|
25094
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
|
|
25095
|
+
*/
|
|
25096
|
+
'Idempotency-Key'?: string;
|
|
25071
25097
|
};
|
|
25072
25098
|
};
|
|
25073
25099
|
|
|
@@ -25253,6 +25279,12 @@ export type DuplicateAdCampaignData = {
|
|
|
25253
25279
|
*/
|
|
25254
25280
|
syncAfter?: boolean;
|
|
25255
25281
|
};
|
|
25282
|
+
headers?: {
|
|
25283
|
+
/**
|
|
25284
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
|
|
25285
|
+
*/
|
|
25286
|
+
'Idempotency-Key'?: string;
|
|
25287
|
+
};
|
|
25256
25288
|
path: {
|
|
25257
25289
|
/**
|
|
25258
25290
|
* Source platform campaign ID
|
|
@@ -25301,6 +25333,12 @@ export type DuplicateAdSetData = {
|
|
|
25301
25333
|
renameSuffix?: string;
|
|
25302
25334
|
syncAfter?: boolean;
|
|
25303
25335
|
};
|
|
25336
|
+
headers?: {
|
|
25337
|
+
/**
|
|
25338
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
|
|
25339
|
+
*/
|
|
25340
|
+
'Idempotency-Key'?: string;
|
|
25341
|
+
};
|
|
25304
25342
|
path: {
|
|
25305
25343
|
/**
|
|
25306
25344
|
* Source platform ad set ID
|
|
@@ -25339,6 +25377,12 @@ export type DuplicateAdData = {
|
|
|
25339
25377
|
renameSuffix?: string;
|
|
25340
25378
|
syncAfter?: boolean;
|
|
25341
25379
|
};
|
|
25380
|
+
headers?: {
|
|
25381
|
+
/**
|
|
25382
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
|
|
25383
|
+
*/
|
|
25384
|
+
'Idempotency-Key'?: string;
|
|
25385
|
+
};
|
|
25342
25386
|
path: {
|
|
25343
25387
|
/**
|
|
25344
25388
|
* Zernio ad ID or platform ad ID
|
|
@@ -25649,7 +25693,7 @@ export type GetAdsTimelineResponse = ({
|
|
|
25649
25693
|
*/
|
|
25650
25694
|
cpm?: number;
|
|
25651
25695
|
/**
|
|
25652
|
-
* Sum of conversion events over the range. Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
25696
|
+
* Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
25653
25697
|
*/
|
|
25654
25698
|
conversions?: number;
|
|
25655
25699
|
costPerConversion?: number;
|
|
@@ -27614,9 +27658,13 @@ export type CreateStandaloneAdData = {
|
|
|
27614
27658
|
*/
|
|
27615
27659
|
video?: {
|
|
27616
27660
|
/**
|
|
27617
|
-
* Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s.
|
|
27661
|
+
* Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s. Provide either `url` or `id`.
|
|
27618
27662
|
*/
|
|
27619
|
-
url
|
|
27663
|
+
url?: string;
|
|
27664
|
+
/**
|
|
27665
|
+
* Meta only. Reuse a video ALREADY uploaded to this ad account instead of re-uploading the file: pass the `videoId` returned by a previous create. Wins over `url`, so N ads that differ only in copy share one upload (`existingCreativeId` only covers the identical-copy case). Provide either `url` or `id`.
|
|
27666
|
+
*/
|
|
27667
|
+
id?: string;
|
|
27620
27668
|
/**
|
|
27621
27669
|
* Public URL of a still-image thumbnail for the video. OPTIONAL: when omitted on Meta, the poster is auto-generated from Meta's own preferred video thumbnail (the same candidates Ads Manager shows), so video ads publish without supplying one. Provide it to control the poster frame exactly (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame).
|
|
27622
27670
|
*/
|
|
@@ -27973,6 +28021,54 @@ export type CreateStandaloneAdData = {
|
|
|
27973
28021
|
*/
|
|
27974
28022
|
callToAction?: string;
|
|
27975
28023
|
}>;
|
|
28024
|
+
/**
|
|
28025
|
+
* Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own.
|
|
28026
|
+
*/
|
|
28027
|
+
defaultLocale?: string;
|
|
28028
|
+
/**
|
|
28029
|
+
* Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying
|
|
28030
|
+
* per-locale copy and, optionally, per-locale media — the "Languages" toggle in Ads
|
|
28031
|
+
* Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
28032
|
+
* splitting it across one ad per language.
|
|
28033
|
+
*
|
|
28034
|
+
* The ad's top-level copy and media are the DEFAULT every unlisted locale falls back
|
|
28035
|
+
* to, and a variant inherits any field it omits, so send only what differs per
|
|
28036
|
+
* language. Media shared across languages is uploaded once.
|
|
28037
|
+
*
|
|
28038
|
+
* Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
28039
|
+
* `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
28040
|
+
*
|
|
28041
|
+
*/
|
|
28042
|
+
translations?: Array<{
|
|
28043
|
+
/**
|
|
28044
|
+
* Language code, resolved to Meta's numeric locale id. Bare codes target the '(All)' umbrella (`es` = every Spanish variant); region-qualified codes target the variant (`pt_BR`, `en_GB`).
|
|
28045
|
+
*/
|
|
28046
|
+
locale: string;
|
|
28047
|
+
/**
|
|
28048
|
+
* Headline for this language. Inherits the top-level `headline` when omitted.
|
|
28049
|
+
*/
|
|
28050
|
+
headline?: string;
|
|
28051
|
+
/**
|
|
28052
|
+
* Primary text for this language. Inherits the top-level `body` when omitted.
|
|
28053
|
+
*/
|
|
28054
|
+
body?: string;
|
|
28055
|
+
/**
|
|
28056
|
+
* Link description for this language. Inherits the top-level `description` when omitted.
|
|
28057
|
+
*/
|
|
28058
|
+
description?: string;
|
|
28059
|
+
/**
|
|
28060
|
+
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
28061
|
+
*/
|
|
28062
|
+
imageUrl?: string;
|
|
28063
|
+
/**
|
|
28064
|
+
* Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video.
|
|
28065
|
+
*/
|
|
28066
|
+
videoUrl?: string;
|
|
28067
|
+
/**
|
|
28068
|
+
* Poster frame for this language's video.
|
|
28069
|
+
*/
|
|
28070
|
+
thumbnailUrl?: string;
|
|
28071
|
+
}>;
|
|
27976
28072
|
/**
|
|
27977
28073
|
* Meta only. Placement asset customization: pin a SPECIFIC asset (image OR video) to
|
|
27978
28074
|
* each placement group on a SINGLE ad (e.g. a 9:16 on Stories/Reels and a 4:5 on Feed).
|