@zernio/node 0.2.470 → 0.2.472
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 +96 -8
- package/dist/index.d.ts +96 -8
- 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 +96 -8
package/dist/index.d.mts
CHANGED
|
@@ -1625,7 +1625,7 @@ type AdMetrics = {
|
|
|
1625
1625
|
cpm?: number;
|
|
1626
1626
|
engagement?: number;
|
|
1627
1627
|
/**
|
|
1628
|
-
* 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.
|
|
1628
|
+
* 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.
|
|
1629
1629
|
*/
|
|
1630
1630
|
conversions?: number;
|
|
1631
1631
|
/**
|
|
@@ -5480,7 +5480,7 @@ type TargetingSpec = {
|
|
|
5480
5480
|
ageMin?: number;
|
|
5481
5481
|
ageMax?: number;
|
|
5482
5482
|
/**
|
|
5483
|
-
* Restrict by gender. 'all' (default) targets everyone.
|
|
5483
|
+
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
5484
5484
|
*/
|
|
5485
5485
|
gender?: 'all' | 'male' | 'female';
|
|
5486
5486
|
/**
|
|
@@ -5536,7 +5536,7 @@ type TargetingSpec = {
|
|
|
5536
5536
|
audienceExclude?: Array<(string)>;
|
|
5537
5537
|
};
|
|
5538
5538
|
/**
|
|
5539
|
-
* Restrict by gender. 'all' (default) targets everyone.
|
|
5539
|
+
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
5540
5540
|
*/
|
|
5541
5541
|
type gender = 'all' | 'male' | 'female';
|
|
5542
5542
|
/**
|
|
@@ -24690,6 +24690,24 @@ type CreateAdCampaignData = {
|
|
|
24690
24690
|
budgetAmount?: number;
|
|
24691
24691
|
budgetType?: 'daily' | 'lifetime';
|
|
24692
24692
|
status?: 'ACTIVE' | 'PAUSED';
|
|
24693
|
+
/**
|
|
24694
|
+
* 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}`.
|
|
24695
|
+
*/
|
|
24696
|
+
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
24697
|
+
/**
|
|
24698
|
+
* Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise.
|
|
24699
|
+
*/
|
|
24700
|
+
bidAmount?: number;
|
|
24701
|
+
/**
|
|
24702
|
+
* Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS.
|
|
24703
|
+
*/
|
|
24704
|
+
roasAverageFloor?: number;
|
|
24705
|
+
};
|
|
24706
|
+
headers?: {
|
|
24707
|
+
/**
|
|
24708
|
+
* 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.
|
|
24709
|
+
*/
|
|
24710
|
+
'Idempotency-Key'?: string;
|
|
24693
24711
|
};
|
|
24694
24712
|
};
|
|
24695
24713
|
type CreateAdCampaignResponse = ({
|
|
@@ -24860,6 +24878,12 @@ type DuplicateAdCampaignData = {
|
|
|
24860
24878
|
*/
|
|
24861
24879
|
syncAfter?: boolean;
|
|
24862
24880
|
};
|
|
24881
|
+
headers?: {
|
|
24882
|
+
/**
|
|
24883
|
+
* 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.
|
|
24884
|
+
*/
|
|
24885
|
+
'Idempotency-Key'?: string;
|
|
24886
|
+
};
|
|
24863
24887
|
path: {
|
|
24864
24888
|
/**
|
|
24865
24889
|
* Source platform campaign ID
|
|
@@ -24905,6 +24929,12 @@ type DuplicateAdSetData = {
|
|
|
24905
24929
|
renameSuffix?: string;
|
|
24906
24930
|
syncAfter?: boolean;
|
|
24907
24931
|
};
|
|
24932
|
+
headers?: {
|
|
24933
|
+
/**
|
|
24934
|
+
* 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.
|
|
24935
|
+
*/
|
|
24936
|
+
'Idempotency-Key'?: string;
|
|
24937
|
+
};
|
|
24908
24938
|
path: {
|
|
24909
24939
|
/**
|
|
24910
24940
|
* Source platform ad set ID
|
|
@@ -24940,6 +24970,12 @@ type DuplicateAdData = {
|
|
|
24940
24970
|
renameSuffix?: string;
|
|
24941
24971
|
syncAfter?: boolean;
|
|
24942
24972
|
};
|
|
24973
|
+
headers?: {
|
|
24974
|
+
/**
|
|
24975
|
+
* 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.
|
|
24976
|
+
*/
|
|
24977
|
+
'Idempotency-Key'?: string;
|
|
24978
|
+
};
|
|
24943
24979
|
path: {
|
|
24944
24980
|
/**
|
|
24945
24981
|
* Zernio ad ID or platform ad ID
|
|
@@ -25234,7 +25270,7 @@ type GetAdsTimelineResponse = ({
|
|
|
25234
25270
|
*/
|
|
25235
25271
|
cpm?: number;
|
|
25236
25272
|
/**
|
|
25237
|
-
* 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).
|
|
25273
|
+
* 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).
|
|
25238
25274
|
*/
|
|
25239
25275
|
conversions?: number;
|
|
25240
25276
|
costPerConversion?: number;
|
|
@@ -26746,7 +26782,7 @@ type BoostPostData = {
|
|
|
26746
26782
|
ageMin?: number;
|
|
26747
26783
|
ageMax?: number;
|
|
26748
26784
|
/**
|
|
26749
|
-
* Meta
|
|
26785
|
+
* Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
26750
26786
|
*/
|
|
26751
26787
|
gender?: 'all' | 'male' | 'female';
|
|
26752
26788
|
/**
|
|
@@ -27086,9 +27122,13 @@ type CreateStandaloneAdData = {
|
|
|
27086
27122
|
*/
|
|
27087
27123
|
video?: {
|
|
27088
27124
|
/**
|
|
27089
|
-
* 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.
|
|
27125
|
+
* 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`.
|
|
27090
27126
|
*/
|
|
27091
|
-
url
|
|
27127
|
+
url?: string;
|
|
27128
|
+
/**
|
|
27129
|
+
* 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`.
|
|
27130
|
+
*/
|
|
27131
|
+
id?: string;
|
|
27092
27132
|
/**
|
|
27093
27133
|
* 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).
|
|
27094
27134
|
*/
|
|
@@ -27445,6 +27485,54 @@ type CreateStandaloneAdData = {
|
|
|
27445
27485
|
*/
|
|
27446
27486
|
callToAction?: string;
|
|
27447
27487
|
}>;
|
|
27488
|
+
/**
|
|
27489
|
+
* 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.
|
|
27490
|
+
*/
|
|
27491
|
+
defaultLocale?: string;
|
|
27492
|
+
/**
|
|
27493
|
+
* Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying
|
|
27494
|
+
* per-locale copy and, optionally, per-locale media — the "Languages" toggle in Ads
|
|
27495
|
+
* Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
27496
|
+
* splitting it across one ad per language.
|
|
27497
|
+
*
|
|
27498
|
+
* The ad's top-level copy and media are the DEFAULT every unlisted locale falls back
|
|
27499
|
+
* to, and a variant inherits any field it omits, so send only what differs per
|
|
27500
|
+
* language. Media shared across languages is uploaded once.
|
|
27501
|
+
*
|
|
27502
|
+
* Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
27503
|
+
* `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
27504
|
+
*
|
|
27505
|
+
*/
|
|
27506
|
+
translations?: Array<{
|
|
27507
|
+
/**
|
|
27508
|
+
* 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`).
|
|
27509
|
+
*/
|
|
27510
|
+
locale: string;
|
|
27511
|
+
/**
|
|
27512
|
+
* Headline for this language. Inherits the top-level `headline` when omitted.
|
|
27513
|
+
*/
|
|
27514
|
+
headline?: string;
|
|
27515
|
+
/**
|
|
27516
|
+
* Primary text for this language. Inherits the top-level `body` when omitted.
|
|
27517
|
+
*/
|
|
27518
|
+
body?: string;
|
|
27519
|
+
/**
|
|
27520
|
+
* Link description for this language. Inherits the top-level `description` when omitted.
|
|
27521
|
+
*/
|
|
27522
|
+
description?: string;
|
|
27523
|
+
/**
|
|
27524
|
+
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
27525
|
+
*/
|
|
27526
|
+
imageUrl?: string;
|
|
27527
|
+
/**
|
|
27528
|
+
* Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video.
|
|
27529
|
+
*/
|
|
27530
|
+
videoUrl?: string;
|
|
27531
|
+
/**
|
|
27532
|
+
* Poster frame for this language's video.
|
|
27533
|
+
*/
|
|
27534
|
+
thumbnailUrl?: string;
|
|
27535
|
+
}>;
|
|
27448
27536
|
/**
|
|
27449
27537
|
* Meta only. Placement asset customization: pin a SPECIFIC asset (image OR video) to
|
|
27450
27538
|
* each placement group on a SINGLE ad (e.g. a 9:16 on Stories/Reels and a 4:5 on Feed).
|
|
@@ -27555,7 +27643,7 @@ type CreateStandaloneAdData = {
|
|
|
27555
27643
|
windowDays: 1 | 7 | 28;
|
|
27556
27644
|
}>;
|
|
27557
27645
|
/**
|
|
27558
|
-
*
|
|
27646
|
+
* Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
27559
27647
|
*/
|
|
27560
27648
|
gender?: 'all' | 'male' | 'female';
|
|
27561
27649
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1625,7 +1625,7 @@ type AdMetrics = {
|
|
|
1625
1625
|
cpm?: number;
|
|
1626
1626
|
engagement?: number;
|
|
1627
1627
|
/**
|
|
1628
|
-
* 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.
|
|
1628
|
+
* 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.
|
|
1629
1629
|
*/
|
|
1630
1630
|
conversions?: number;
|
|
1631
1631
|
/**
|
|
@@ -5480,7 +5480,7 @@ type TargetingSpec = {
|
|
|
5480
5480
|
ageMin?: number;
|
|
5481
5481
|
ageMax?: number;
|
|
5482
5482
|
/**
|
|
5483
|
-
* Restrict by gender. 'all' (default) targets everyone.
|
|
5483
|
+
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
5484
5484
|
*/
|
|
5485
5485
|
gender?: 'all' | 'male' | 'female';
|
|
5486
5486
|
/**
|
|
@@ -5536,7 +5536,7 @@ type TargetingSpec = {
|
|
|
5536
5536
|
audienceExclude?: Array<(string)>;
|
|
5537
5537
|
};
|
|
5538
5538
|
/**
|
|
5539
|
-
* Restrict by gender. 'all' (default) targets everyone.
|
|
5539
|
+
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
5540
5540
|
*/
|
|
5541
5541
|
type gender = 'all' | 'male' | 'female';
|
|
5542
5542
|
/**
|
|
@@ -24690,6 +24690,24 @@ type CreateAdCampaignData = {
|
|
|
24690
24690
|
budgetAmount?: number;
|
|
24691
24691
|
budgetType?: 'daily' | 'lifetime';
|
|
24692
24692
|
status?: 'ACTIVE' | 'PAUSED';
|
|
24693
|
+
/**
|
|
24694
|
+
* 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}`.
|
|
24695
|
+
*/
|
|
24696
|
+
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
24697
|
+
/**
|
|
24698
|
+
* Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise.
|
|
24699
|
+
*/
|
|
24700
|
+
bidAmount?: number;
|
|
24701
|
+
/**
|
|
24702
|
+
* Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS.
|
|
24703
|
+
*/
|
|
24704
|
+
roasAverageFloor?: number;
|
|
24705
|
+
};
|
|
24706
|
+
headers?: {
|
|
24707
|
+
/**
|
|
24708
|
+
* 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.
|
|
24709
|
+
*/
|
|
24710
|
+
'Idempotency-Key'?: string;
|
|
24693
24711
|
};
|
|
24694
24712
|
};
|
|
24695
24713
|
type CreateAdCampaignResponse = ({
|
|
@@ -24860,6 +24878,12 @@ type DuplicateAdCampaignData = {
|
|
|
24860
24878
|
*/
|
|
24861
24879
|
syncAfter?: boolean;
|
|
24862
24880
|
};
|
|
24881
|
+
headers?: {
|
|
24882
|
+
/**
|
|
24883
|
+
* 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.
|
|
24884
|
+
*/
|
|
24885
|
+
'Idempotency-Key'?: string;
|
|
24886
|
+
};
|
|
24863
24887
|
path: {
|
|
24864
24888
|
/**
|
|
24865
24889
|
* Source platform campaign ID
|
|
@@ -24905,6 +24929,12 @@ type DuplicateAdSetData = {
|
|
|
24905
24929
|
renameSuffix?: string;
|
|
24906
24930
|
syncAfter?: boolean;
|
|
24907
24931
|
};
|
|
24932
|
+
headers?: {
|
|
24933
|
+
/**
|
|
24934
|
+
* 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.
|
|
24935
|
+
*/
|
|
24936
|
+
'Idempotency-Key'?: string;
|
|
24937
|
+
};
|
|
24908
24938
|
path: {
|
|
24909
24939
|
/**
|
|
24910
24940
|
* Source platform ad set ID
|
|
@@ -24940,6 +24970,12 @@ type DuplicateAdData = {
|
|
|
24940
24970
|
renameSuffix?: string;
|
|
24941
24971
|
syncAfter?: boolean;
|
|
24942
24972
|
};
|
|
24973
|
+
headers?: {
|
|
24974
|
+
/**
|
|
24975
|
+
* 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.
|
|
24976
|
+
*/
|
|
24977
|
+
'Idempotency-Key'?: string;
|
|
24978
|
+
};
|
|
24943
24979
|
path: {
|
|
24944
24980
|
/**
|
|
24945
24981
|
* Zernio ad ID or platform ad ID
|
|
@@ -25234,7 +25270,7 @@ type GetAdsTimelineResponse = ({
|
|
|
25234
25270
|
*/
|
|
25235
25271
|
cpm?: number;
|
|
25236
25272
|
/**
|
|
25237
|
-
* 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).
|
|
25273
|
+
* 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).
|
|
25238
25274
|
*/
|
|
25239
25275
|
conversions?: number;
|
|
25240
25276
|
costPerConversion?: number;
|
|
@@ -26746,7 +26782,7 @@ type BoostPostData = {
|
|
|
26746
26782
|
ageMin?: number;
|
|
26747
26783
|
ageMax?: number;
|
|
26748
26784
|
/**
|
|
26749
|
-
* Meta
|
|
26785
|
+
* Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
26750
26786
|
*/
|
|
26751
26787
|
gender?: 'all' | 'male' | 'female';
|
|
26752
26788
|
/**
|
|
@@ -27086,9 +27122,13 @@ type CreateStandaloneAdData = {
|
|
|
27086
27122
|
*/
|
|
27087
27123
|
video?: {
|
|
27088
27124
|
/**
|
|
27089
|
-
* 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.
|
|
27125
|
+
* 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`.
|
|
27090
27126
|
*/
|
|
27091
|
-
url
|
|
27127
|
+
url?: string;
|
|
27128
|
+
/**
|
|
27129
|
+
* 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`.
|
|
27130
|
+
*/
|
|
27131
|
+
id?: string;
|
|
27092
27132
|
/**
|
|
27093
27133
|
* 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).
|
|
27094
27134
|
*/
|
|
@@ -27445,6 +27485,54 @@ type CreateStandaloneAdData = {
|
|
|
27445
27485
|
*/
|
|
27446
27486
|
callToAction?: string;
|
|
27447
27487
|
}>;
|
|
27488
|
+
/**
|
|
27489
|
+
* 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.
|
|
27490
|
+
*/
|
|
27491
|
+
defaultLocale?: string;
|
|
27492
|
+
/**
|
|
27493
|
+
* Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying
|
|
27494
|
+
* per-locale copy and, optionally, per-locale media — the "Languages" toggle in Ads
|
|
27495
|
+
* Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
27496
|
+
* splitting it across one ad per language.
|
|
27497
|
+
*
|
|
27498
|
+
* The ad's top-level copy and media are the DEFAULT every unlisted locale falls back
|
|
27499
|
+
* to, and a variant inherits any field it omits, so send only what differs per
|
|
27500
|
+
* language. Media shared across languages is uploaded once.
|
|
27501
|
+
*
|
|
27502
|
+
* Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
27503
|
+
* `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
27504
|
+
*
|
|
27505
|
+
*/
|
|
27506
|
+
translations?: Array<{
|
|
27507
|
+
/**
|
|
27508
|
+
* 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`).
|
|
27509
|
+
*/
|
|
27510
|
+
locale: string;
|
|
27511
|
+
/**
|
|
27512
|
+
* Headline for this language. Inherits the top-level `headline` when omitted.
|
|
27513
|
+
*/
|
|
27514
|
+
headline?: string;
|
|
27515
|
+
/**
|
|
27516
|
+
* Primary text for this language. Inherits the top-level `body` when omitted.
|
|
27517
|
+
*/
|
|
27518
|
+
body?: string;
|
|
27519
|
+
/**
|
|
27520
|
+
* Link description for this language. Inherits the top-level `description` when omitted.
|
|
27521
|
+
*/
|
|
27522
|
+
description?: string;
|
|
27523
|
+
/**
|
|
27524
|
+
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
27525
|
+
*/
|
|
27526
|
+
imageUrl?: string;
|
|
27527
|
+
/**
|
|
27528
|
+
* Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video.
|
|
27529
|
+
*/
|
|
27530
|
+
videoUrl?: string;
|
|
27531
|
+
/**
|
|
27532
|
+
* Poster frame for this language's video.
|
|
27533
|
+
*/
|
|
27534
|
+
thumbnailUrl?: string;
|
|
27535
|
+
}>;
|
|
27448
27536
|
/**
|
|
27449
27537
|
* Meta only. Placement asset customization: pin a SPECIFIC asset (image OR video) to
|
|
27450
27538
|
* each placement group on a SINGLE ad (e.g. a 9:16 on Stories/Reels and a 4:5 on Feed).
|
|
@@ -27555,7 +27643,7 @@ type CreateStandaloneAdData = {
|
|
|
27555
27643
|
windowDays: 1 | 7 | 28;
|
|
27556
27644
|
}>;
|
|
27557
27645
|
/**
|
|
27558
|
-
*
|
|
27646
|
+
* Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
27559
27647
|
*/
|
|
27560
27648
|
gender?: 'all' | 'male' | 'female';
|
|
27561
27649
|
/**
|
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.
|
|
39
|
+
version: "0.2.472",
|
|
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.
|
|
8
|
+
version: "0.2.472",
|
|
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
|
@@ -6670,6 +6670,8 @@ export const listAdCampaigns = <ThrowOnError extends boolean = false>(options?:
|
|
|
6670
6670
|
* (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created
|
|
6671
6671
|
* `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the
|
|
6672
6672
|
* next sync discovery pass.
|
|
6673
|
+
*
|
|
6674
|
+
* **Idempotency:** send an `Idempotency-Key` header to make retries safe.
|
|
6673
6675
|
*/
|
|
6674
6676
|
export const createAdCampaign = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAdCampaignData, ThrowOnError>) => {
|
|
6675
6677
|
return (options?.client ?? client).post<CreateAdCampaignResponse, CreateAdCampaignError, ThrowOnError>({
|
|
@@ -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
|
/**
|
|
@@ -4456,7 +4456,7 @@ export type TargetingSpec = {
|
|
|
4456
4456
|
ageMin?: number;
|
|
4457
4457
|
ageMax?: number;
|
|
4458
4458
|
/**
|
|
4459
|
-
* Restrict by gender. 'all' (default) targets everyone.
|
|
4459
|
+
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
4460
4460
|
*/
|
|
4461
4461
|
gender?: 'all' | 'male' | 'female';
|
|
4462
4462
|
/**
|
|
@@ -4513,7 +4513,7 @@ export type TargetingSpec = {
|
|
|
4513
4513
|
};
|
|
4514
4514
|
|
|
4515
4515
|
/**
|
|
4516
|
-
* Restrict by gender. 'all' (default) targets everyone.
|
|
4516
|
+
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
4517
4517
|
*/
|
|
4518
4518
|
export type gender = 'all' | 'male' | 'female';
|
|
4519
4519
|
|
|
@@ -25068,6 +25068,24 @@ export type CreateAdCampaignData = {
|
|
|
25068
25068
|
budgetAmount?: number;
|
|
25069
25069
|
budgetType?: 'daily' | 'lifetime';
|
|
25070
25070
|
status?: 'ACTIVE' | 'PAUSED';
|
|
25071
|
+
/**
|
|
25072
|
+
* 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}`.
|
|
25073
|
+
*/
|
|
25074
|
+
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
25075
|
+
/**
|
|
25076
|
+
* Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise.
|
|
25077
|
+
*/
|
|
25078
|
+
bidAmount?: number;
|
|
25079
|
+
/**
|
|
25080
|
+
* Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS.
|
|
25081
|
+
*/
|
|
25082
|
+
roasAverageFloor?: number;
|
|
25083
|
+
};
|
|
25084
|
+
headers?: {
|
|
25085
|
+
/**
|
|
25086
|
+
* 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.
|
|
25087
|
+
*/
|
|
25088
|
+
'Idempotency-Key'?: string;
|
|
25071
25089
|
};
|
|
25072
25090
|
};
|
|
25073
25091
|
|
|
@@ -25253,6 +25271,12 @@ export type DuplicateAdCampaignData = {
|
|
|
25253
25271
|
*/
|
|
25254
25272
|
syncAfter?: boolean;
|
|
25255
25273
|
};
|
|
25274
|
+
headers?: {
|
|
25275
|
+
/**
|
|
25276
|
+
* 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.
|
|
25277
|
+
*/
|
|
25278
|
+
'Idempotency-Key'?: string;
|
|
25279
|
+
};
|
|
25256
25280
|
path: {
|
|
25257
25281
|
/**
|
|
25258
25282
|
* Source platform campaign ID
|
|
@@ -25301,6 +25325,12 @@ export type DuplicateAdSetData = {
|
|
|
25301
25325
|
renameSuffix?: string;
|
|
25302
25326
|
syncAfter?: boolean;
|
|
25303
25327
|
};
|
|
25328
|
+
headers?: {
|
|
25329
|
+
/**
|
|
25330
|
+
* 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.
|
|
25331
|
+
*/
|
|
25332
|
+
'Idempotency-Key'?: string;
|
|
25333
|
+
};
|
|
25304
25334
|
path: {
|
|
25305
25335
|
/**
|
|
25306
25336
|
* Source platform ad set ID
|
|
@@ -25339,6 +25369,12 @@ export type DuplicateAdData = {
|
|
|
25339
25369
|
renameSuffix?: string;
|
|
25340
25370
|
syncAfter?: boolean;
|
|
25341
25371
|
};
|
|
25372
|
+
headers?: {
|
|
25373
|
+
/**
|
|
25374
|
+
* 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.
|
|
25375
|
+
*/
|
|
25376
|
+
'Idempotency-Key'?: string;
|
|
25377
|
+
};
|
|
25342
25378
|
path: {
|
|
25343
25379
|
/**
|
|
25344
25380
|
* Zernio ad ID or platform ad ID
|
|
@@ -25649,7 +25685,7 @@ export type GetAdsTimelineResponse = ({
|
|
|
25649
25685
|
*/
|
|
25650
25686
|
cpm?: number;
|
|
25651
25687
|
/**
|
|
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).
|
|
25688
|
+
* 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
25689
|
*/
|
|
25654
25690
|
conversions?: number;
|
|
25655
25691
|
costPerConversion?: number;
|
|
@@ -27271,7 +27307,7 @@ export type BoostPostData = {
|
|
|
27271
27307
|
ageMin?: number;
|
|
27272
27308
|
ageMax?: number;
|
|
27273
27309
|
/**
|
|
27274
|
-
* Meta
|
|
27310
|
+
* Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
27275
27311
|
*/
|
|
27276
27312
|
gender?: 'all' | 'male' | 'female';
|
|
27277
27313
|
/**
|
|
@@ -27614,9 +27650,13 @@ export type CreateStandaloneAdData = {
|
|
|
27614
27650
|
*/
|
|
27615
27651
|
video?: {
|
|
27616
27652
|
/**
|
|
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.
|
|
27653
|
+
* 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
27654
|
*/
|
|
27619
|
-
url
|
|
27655
|
+
url?: string;
|
|
27656
|
+
/**
|
|
27657
|
+
* 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`.
|
|
27658
|
+
*/
|
|
27659
|
+
id?: string;
|
|
27620
27660
|
/**
|
|
27621
27661
|
* 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
27662
|
*/
|
|
@@ -27973,6 +28013,54 @@ export type CreateStandaloneAdData = {
|
|
|
27973
28013
|
*/
|
|
27974
28014
|
callToAction?: string;
|
|
27975
28015
|
}>;
|
|
28016
|
+
/**
|
|
28017
|
+
* 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.
|
|
28018
|
+
*/
|
|
28019
|
+
defaultLocale?: string;
|
|
28020
|
+
/**
|
|
28021
|
+
* Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying
|
|
28022
|
+
* per-locale copy and, optionally, per-locale media — the "Languages" toggle in Ads
|
|
28023
|
+
* Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
28024
|
+
* splitting it across one ad per language.
|
|
28025
|
+
*
|
|
28026
|
+
* The ad's top-level copy and media are the DEFAULT every unlisted locale falls back
|
|
28027
|
+
* to, and a variant inherits any field it omits, so send only what differs per
|
|
28028
|
+
* language. Media shared across languages is uploaded once.
|
|
28029
|
+
*
|
|
28030
|
+
* Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
28031
|
+
* `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
28032
|
+
*
|
|
28033
|
+
*/
|
|
28034
|
+
translations?: Array<{
|
|
28035
|
+
/**
|
|
28036
|
+
* 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`).
|
|
28037
|
+
*/
|
|
28038
|
+
locale: string;
|
|
28039
|
+
/**
|
|
28040
|
+
* Headline for this language. Inherits the top-level `headline` when omitted.
|
|
28041
|
+
*/
|
|
28042
|
+
headline?: string;
|
|
28043
|
+
/**
|
|
28044
|
+
* Primary text for this language. Inherits the top-level `body` when omitted.
|
|
28045
|
+
*/
|
|
28046
|
+
body?: string;
|
|
28047
|
+
/**
|
|
28048
|
+
* Link description for this language. Inherits the top-level `description` when omitted.
|
|
28049
|
+
*/
|
|
28050
|
+
description?: string;
|
|
28051
|
+
/**
|
|
28052
|
+
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
28053
|
+
*/
|
|
28054
|
+
imageUrl?: string;
|
|
28055
|
+
/**
|
|
28056
|
+
* Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video.
|
|
28057
|
+
*/
|
|
28058
|
+
videoUrl?: string;
|
|
28059
|
+
/**
|
|
28060
|
+
* Poster frame for this language's video.
|
|
28061
|
+
*/
|
|
28062
|
+
thumbnailUrl?: string;
|
|
28063
|
+
}>;
|
|
27976
28064
|
/**
|
|
27977
28065
|
* Meta only. Placement asset customization: pin a SPECIFIC asset (image OR video) to
|
|
27978
28066
|
* each placement group on a SINGLE ad (e.g. a 9:16 on Stories/Reels and a 4:5 on Feed).
|
|
@@ -28083,7 +28171,7 @@ export type CreateStandaloneAdData = {
|
|
|
28083
28171
|
windowDays: 1 | 7 | 28;
|
|
28084
28172
|
}>;
|
|
28085
28173
|
/**
|
|
28086
|
-
*
|
|
28174
|
+
* Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
28087
28175
|
*/
|
|
28088
28176
|
gender?: 'all' | 'male' | 'female';
|
|
28089
28177
|
/**
|