@zernio/node 0.2.758 → 0.2.760
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 +28 -62
- package/dist/index.d.ts +28 -62
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +7 -17
- package/src/generated/types.gen.ts +27 -63
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -8644,11 +8644,8 @@ export const getAdsTimeline = <ThrowOnError extends boolean = false>(options: Op
|
|
|
8644
8644
|
* - the creative's `effective_instagram_media_id` (Instagram side)
|
|
8645
8645
|
*
|
|
8646
8646
|
* Any of the four resolve to the same ad. Caller doesn't need a translation step.
|
|
8647
|
-
*
|
|
8648
|
-
*
|
|
8649
|
-
* Meta promotion metadata is read live and exposed as `ad.creative.promotion`
|
|
8650
|
-
* with `promotionStatus`. Only `applied` confirms an offer; `not_returned` means the
|
|
8651
|
-
* creative read succeeded without promotion metadata, and `unavailable` means it failed.
|
|
8647
|
+
* `creative.creativeFeatures` holds the stored requested settings, which do not confirm
|
|
8648
|
+
* platform application.
|
|
8652
8649
|
*
|
|
8653
8650
|
*/
|
|
8654
8651
|
export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdData, ThrowOnError>) => {
|
|
@@ -9426,11 +9423,8 @@ export const listAdCreatives = <ThrowOnError extends boolean = false>(options: O
|
|
|
9426
9423
|
* `existingCreativeId`. Provide exactly one of `imageUrl` (uploaded server-side),
|
|
9427
9424
|
* `imageHash` (from POST /v1/ads/images or the library list), or `carouselCards` (2-10
|
|
9428
9425
|
* hand-built cards). The Page (and linked Instagram account, when present) is resolved
|
|
9429
|
-
* from `accountId` as the story actor. `
|
|
9430
|
-
*
|
|
9431
|
-
* read the creative back from Meta;
|
|
9432
|
-
* `promotionStatus: not_returned` means Meta accepted creation but omitted promotion
|
|
9433
|
-
* metadata, so the requested offer is not confirmed as applied.
|
|
9426
|
+
* from `accountId` as the story actor. `creativeFeatures` configures Advantage+
|
|
9427
|
+
* enhancements. `promotion` is not supported and any object is rejected with 400.
|
|
9434
9428
|
*/
|
|
9435
9429
|
export const createAdCreative = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAdCreativeData, ThrowOnError>) => {
|
|
9436
9430
|
return (options?.client ?? client).post<CreateAdCreativeResponse, CreateAdCreativeError, ThrowOnError>({
|
|
@@ -10039,15 +10033,11 @@ export const listGoogleAssetGroups = <ThrowOnError extends boolean = false>(opti
|
|
|
10039
10033
|
* - Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting.
|
|
10040
10034
|
* - Attach shape via adSetId: adds one new ad to an existing ad set, inheriting its budget, targeting, and schedule (Meta, Google Ads, TikTok, and LinkedIn). On LinkedIn adSetId is the existing Campaign id, and the budget, schedule, targeting and bidding fields must be omitted.
|
|
10041
10035
|
*
|
|
10042
|
-
* Meta accepts `
|
|
10043
|
-
*
|
|
10044
|
-
*
|
|
10036
|
+
* Meta accepts `creativeFeatures` on the single and attach shapes and as defaults for
|
|
10037
|
+
* `creatives[]`; an item replaces the whole feature map. `promotion` is not supported on any
|
|
10038
|
+
* shape and any object is rejected with 400.
|
|
10045
10039
|
* Reusing `existingCreativeId` uses the existing creative settings instead of new settings.
|
|
10046
10040
|
* Requested settings are persisted for lists, exports, and default ad-detail reads.
|
|
10047
|
-
* Only ads supplied a `promotion` receive live readback; multi-create batches those reads
|
|
10048
|
-
* in groups of up to 50 IDs without per-ad fallback. Inspect `ad.creative.promotionStatus` (or
|
|
10049
|
-
* `ads[].creative.promotionStatus`). `not_returned` means Meta omitted the metadata;
|
|
10050
|
-
* successful creation does not by itself prove the offer was applied or will display.
|
|
10051
10041
|
*
|
|
10052
10042
|
* Per-platform required fields, budget minimums, and video-ad rules are documented on each property below.
|
|
10053
10043
|
*
|
|
@@ -291,11 +291,6 @@ export type Ad = {
|
|
|
291
291
|
* Public Facebook watch URL for VIDEO-type ads (https://www.facebook.com/watch/?v={videoId}). Null for non-video ads.
|
|
292
292
|
*/
|
|
293
293
|
videoUrl?: (string) | null;
|
|
294
|
-
/**
|
|
295
|
-
* Meta offer read from the live creative on creation or GET /v1/ads/{adId}. Null when metadata is not returned or cannot be read. Requested values are never echoed as applied.
|
|
296
|
-
*/
|
|
297
|
-
promotion?: MetaPromotion;
|
|
298
|
-
promotionStatus?: MetaPromotionStatus;
|
|
299
294
|
/**
|
|
300
295
|
* Meta ad creative id backing this ad. Reusable via existingCreativeId on POST /v1/ads/create.
|
|
301
296
|
*/
|
|
@@ -1460,6 +1455,10 @@ export type AnalyticsListResponse = {
|
|
|
1460
1455
|
platform?: string;
|
|
1461
1456
|
platformPostUrl?: string;
|
|
1462
1457
|
isExternal?: boolean;
|
|
1458
|
+
/**
|
|
1459
|
+
* True when this post's metrics include paid delivery, so organic reporting should exclude it. Set for LinkedIn dark posts and for TikTok posts that one of your TikTok ads promotes (Spark / boosted). TikTok exposes no ad flag of its own, so a video created by an uploaded-asset (non-Spark) TikTok ad is posted to the profile with a fresh organic id and cannot be detected: those still report as false.
|
|
1460
|
+
*/
|
|
1461
|
+
isAd?: boolean;
|
|
1463
1462
|
profileId?: (string) | null;
|
|
1464
1463
|
thumbnailUrl?: string;
|
|
1465
1464
|
mediaType?: 'image' | 'video' | 'gif' | 'document' | 'carousel' | 'text';
|
|
@@ -5750,7 +5749,7 @@ export type MetaAdsPlatformData = {
|
|
|
5750
5749
|
};
|
|
5751
5750
|
|
|
5752
5751
|
/**
|
|
5753
|
-
* Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an enhancement
|
|
5752
|
+
* Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. The deprecated standard_enhancements bundle is rejected by Meta.
|
|
5754
5753
|
*/
|
|
5755
5754
|
export type MetaCreativeFeatures = {
|
|
5756
5755
|
[key: string]: ('OPT_IN' | 'OPT_OUT');
|
|
@@ -5772,40 +5771,9 @@ export type MetaInstagramIdentityRef = {
|
|
|
5772
5771
|
};
|
|
5773
5772
|
|
|
5774
5773
|
/**
|
|
5775
|
-
*
|
|
5776
|
-
*/
|
|
5777
|
-
export type MetaPromotion = {
|
|
5778
|
-
/**
|
|
5779
|
-
* Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.
|
|
5780
|
-
*/
|
|
5781
|
-
type: 'AMOUNT_OFF' | 'FREE_RETURN' | 'FREE_SHIPPING' | 'PERCENTAGE_OFF' | 'PROMO_CODE';
|
|
5782
|
-
/**
|
|
5783
|
-
* Nonnegative promotion value passed to Meta unchanged. AMOUNT_OFF units are not confirmed, including major versus minor currency units. For PERCENTAGE_OFF this is the percentage discount, at most 100.
|
|
5784
|
-
*/
|
|
5785
|
-
value: number;
|
|
5786
|
-
/**
|
|
5787
|
-
* Optional promotion code.
|
|
5788
|
-
*/
|
|
5789
|
-
code?: string;
|
|
5790
|
-
/**
|
|
5791
|
-
* Optional ISO 8601 start timestamp with a timezone offset or Z.
|
|
5792
|
-
*/
|
|
5793
|
-
startDate?: string;
|
|
5794
|
-
/**
|
|
5795
|
-
* Optional ISO 8601 end timestamp with a timezone offset or Z. Must be after startDate when both are set.
|
|
5796
|
-
*/
|
|
5797
|
-
endDate?: string;
|
|
5798
|
-
} | null;
|
|
5799
|
-
|
|
5800
|
-
/**
|
|
5801
|
-
* Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.
|
|
5802
|
-
*/
|
|
5803
|
-
export type type8 = 'AMOUNT_OFF' | 'FREE_RETURN' | 'FREE_SHIPPING' | 'PERCENTAGE_OFF' | 'PROMO_CODE';
|
|
5804
|
-
|
|
5805
|
-
/**
|
|
5806
|
-
* Meta creative readback result. applied means Meta returned promotion metadata; not_returned means the read succeeded without promotion metadata; unavailable means the read failed. Only applied confirms the returned offer. Missing metadata is not proof that Ads Manager displays the requested Promotion.
|
|
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.
|
|
5807
5775
|
*/
|
|
5808
|
-
export type
|
|
5776
|
+
export type MetaPromotion = null;
|
|
5809
5777
|
|
|
5810
5778
|
export type Money = {
|
|
5811
5779
|
/**
|
|
@@ -6058,7 +6026,7 @@ export type PortfolioBidStrategy = {
|
|
|
6058
6026
|
targetRoas?: (number) | null;
|
|
6059
6027
|
};
|
|
6060
6028
|
|
|
6061
|
-
export type
|
|
6029
|
+
export type type8 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE';
|
|
6062
6030
|
|
|
6063
6031
|
export type Post = {
|
|
6064
6032
|
_id?: string;
|
|
@@ -7381,7 +7349,7 @@ export type UploadedFile = {
|
|
|
7381
7349
|
mimeType?: string;
|
|
7382
7350
|
};
|
|
7383
7351
|
|
|
7384
|
-
export type
|
|
7352
|
+
export type type9 = 'image' | 'video' | 'document';
|
|
7385
7353
|
|
|
7386
7354
|
export type UploadTokenResponse = {
|
|
7387
7355
|
token?: string;
|
|
@@ -10546,7 +10514,7 @@ export type WhatsAppTemplateButton = {
|
|
|
10546
10514
|
navigate_screen?: string;
|
|
10547
10515
|
};
|
|
10548
10516
|
|
|
10549
|
-
export type
|
|
10517
|
+
export type type10 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
10550
10518
|
|
|
10551
10519
|
/**
|
|
10552
10520
|
* Required when type is otp
|
|
@@ -10708,7 +10676,7 @@ export type WorkflowNode = {
|
|
|
10708
10676
|
* integrations (webhook, ai, handoff, start_call).
|
|
10709
10677
|
*
|
|
10710
10678
|
*/
|
|
10711
|
-
export type
|
|
10679
|
+
export type type11 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
|
|
10712
10680
|
|
|
10713
10681
|
/**
|
|
10714
10682
|
* A single X API operation with its per-call price and the Zernio platform methods that trigger it.
|
|
@@ -10844,7 +10812,7 @@ export type XArticleBlock = {
|
|
|
10844
10812
|
entity_ranges?: Array<XArticleEntityRange>;
|
|
10845
10813
|
};
|
|
10846
10814
|
|
|
10847
|
-
export type
|
|
10815
|
+
export type type12 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
|
|
10848
10816
|
|
|
10849
10817
|
/**
|
|
10850
10818
|
* X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
|
|
@@ -10923,7 +10891,7 @@ export type XArticleEntity = {
|
|
|
10923
10891
|
|
|
10924
10892
|
export type mutability = 'immutable' | 'mutable' | 'segmented';
|
|
10925
10893
|
|
|
10926
|
-
export type
|
|
10894
|
+
export type type13 = 'divider' | 'latex';
|
|
10927
10895
|
|
|
10928
10896
|
/**
|
|
10929
10897
|
* The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
|
|
@@ -33763,12 +33731,6 @@ export type GetAdData = {
|
|
|
33763
33731
|
*/
|
|
33764
33732
|
adId: string;
|
|
33765
33733
|
};
|
|
33766
|
-
query?: {
|
|
33767
|
-
/**
|
|
33768
|
-
* Meta only. Read current promotion metadata from Meta and include promotionStatus. Omit for stored creative settings with no promotion-specific Graph call.
|
|
33769
|
-
*/
|
|
33770
|
-
refreshPromotion?: boolean;
|
|
33771
|
-
};
|
|
33772
33734
|
};
|
|
33773
33735
|
|
|
33774
33736
|
export type GetAdResponse = ({
|
|
@@ -33919,10 +33881,9 @@ export type UpdateAdData = {
|
|
|
33919
33881
|
* GET /v1/ads/creatives and ignores every other field. Meta creatives are
|
|
33920
33882
|
* immutable, so any change creates a new creative and repoints the ad; the old
|
|
33921
33883
|
* creative is retained on the ad account for historical reporting.
|
|
33922
|
-
* `
|
|
33923
|
-
*
|
|
33924
|
-
*
|
|
33925
|
-
* A supplied creativeFeatures map overrides individual existing keys.
|
|
33884
|
+
* `creativeFeatures` is Meta-only. Omitted settings are preserved from the
|
|
33885
|
+
* live creative, including full rebuilds. A supplied creativeFeatures map
|
|
33886
|
+
* overrides individual existing keys.
|
|
33926
33887
|
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
33927
33888
|
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
33928
33889
|
* `landing_page_url`; `videoUrl` triggers a fresh upload. `description`, `videoId`
|
|
@@ -33935,6 +33896,9 @@ export type UpdateAdData = {
|
|
|
33935
33896
|
*
|
|
33936
33897
|
*/
|
|
33937
33898
|
creative?: {
|
|
33899
|
+
/**
|
|
33900
|
+
* 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.
|
|
33901
|
+
*/
|
|
33938
33902
|
promotion?: MetaPromotion;
|
|
33939
33903
|
creativeFeatures?: MetaCreativeFeatures;
|
|
33940
33904
|
/**
|
|
@@ -35754,9 +35718,12 @@ export type CreateAdCreativeData = {
|
|
|
35754
35718
|
* Appended to every outbound URL (e.g. utm_source=fb).
|
|
35755
35719
|
*/
|
|
35756
35720
|
urlTags?: string;
|
|
35721
|
+
/**
|
|
35722
|
+
* 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.
|
|
35723
|
+
*/
|
|
35757
35724
|
promotion?: MetaPromotion;
|
|
35758
35725
|
/**
|
|
35759
|
-
* Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an enhancement
|
|
35726
|
+
* Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting.
|
|
35760
35727
|
*/
|
|
35761
35728
|
creativeFeatures?: MetaCreativeFeatures;
|
|
35762
35729
|
/**
|
|
@@ -35772,8 +35739,6 @@ export type CreateAdCreativeResponse = ({
|
|
|
35772
35739
|
* Platform creative id, reusable via existingCreativeId.
|
|
35773
35740
|
*/
|
|
35774
35741
|
creativeId?: string;
|
|
35775
|
-
promotion?: MetaPromotion;
|
|
35776
|
-
promotionStatus?: MetaPromotionStatus;
|
|
35777
35742
|
});
|
|
35778
35743
|
|
|
35779
35744
|
export type CreateAdCreativeError = (unknown | {
|
|
@@ -37371,9 +37336,12 @@ export type CreateStandaloneAdData = {
|
|
|
37371
37336
|
* Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED.
|
|
37372
37337
|
*/
|
|
37373
37338
|
rfPredictionId?: string;
|
|
37339
|
+
/**
|
|
37340
|
+
* 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.
|
|
37341
|
+
*/
|
|
37374
37342
|
promotion?: MetaPromotion;
|
|
37375
37343
|
/**
|
|
37376
|
-
* Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an enhancement
|
|
37344
|
+
* Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting.
|
|
37377
37345
|
*/
|
|
37378
37346
|
creativeFeatures?: MetaCreativeFeatures;
|
|
37379
37347
|
/**
|
|
@@ -37514,10 +37482,6 @@ export type CreateStandaloneAdData = {
|
|
|
37514
37482
|
*
|
|
37515
37483
|
*/
|
|
37516
37484
|
creatives?: Array<{
|
|
37517
|
-
/**
|
|
37518
|
-
* Overrides the top-level offer for this item. Omit to inherit; null disables the inherited offer.
|
|
37519
|
-
*/
|
|
37520
|
-
promotion?: MetaPromotion;
|
|
37521
37485
|
/**
|
|
37522
37486
|
* Replaces the entire top-level creativeFeatures map for this item. Omit to inherit; an empty map clears these defaults.
|
|
37523
37487
|
*/
|