@zernio/node 0.2.759 → 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 +24 -62
- package/dist/index.d.ts +24 -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 +23 -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
|
*/
|
|
@@ -5754,7 +5749,7 @@ export type MetaAdsPlatformData = {
|
|
|
5754
5749
|
};
|
|
5755
5750
|
|
|
5756
5751
|
/**
|
|
5757
|
-
* 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.
|
|
5758
5753
|
*/
|
|
5759
5754
|
export type MetaCreativeFeatures = {
|
|
5760
5755
|
[key: string]: ('OPT_IN' | 'OPT_OUT');
|
|
@@ -5776,40 +5771,9 @@ export type MetaInstagramIdentityRef = {
|
|
|
5776
5771
|
};
|
|
5777
5772
|
|
|
5778
5773
|
/**
|
|
5779
|
-
*
|
|
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.
|
|
5780
5775
|
*/
|
|
5781
|
-
export type MetaPromotion =
|
|
5782
|
-
/**
|
|
5783
|
-
* Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.
|
|
5784
|
-
*/
|
|
5785
|
-
type: 'AMOUNT_OFF' | 'FREE_RETURN' | 'FREE_SHIPPING' | 'PERCENTAGE_OFF' | 'PROMO_CODE';
|
|
5786
|
-
/**
|
|
5787
|
-
* 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.
|
|
5788
|
-
*/
|
|
5789
|
-
value: number;
|
|
5790
|
-
/**
|
|
5791
|
-
* Optional promotion code.
|
|
5792
|
-
*/
|
|
5793
|
-
code?: string;
|
|
5794
|
-
/**
|
|
5795
|
-
* Optional ISO 8601 start timestamp with a timezone offset or Z.
|
|
5796
|
-
*/
|
|
5797
|
-
startDate?: string;
|
|
5798
|
-
/**
|
|
5799
|
-
* Optional ISO 8601 end timestamp with a timezone offset or Z. Must be after startDate when both are set.
|
|
5800
|
-
*/
|
|
5801
|
-
endDate?: string;
|
|
5802
|
-
} | null;
|
|
5803
|
-
|
|
5804
|
-
/**
|
|
5805
|
-
* Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.
|
|
5806
|
-
*/
|
|
5807
|
-
export type type8 = 'AMOUNT_OFF' | 'FREE_RETURN' | 'FREE_SHIPPING' | 'PERCENTAGE_OFF' | 'PROMO_CODE';
|
|
5808
|
-
|
|
5809
|
-
/**
|
|
5810
|
-
* 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.
|
|
5811
|
-
*/
|
|
5812
|
-
export type MetaPromotionStatus = 'applied' | 'not_returned' | 'unavailable';
|
|
5776
|
+
export type MetaPromotion = null;
|
|
5813
5777
|
|
|
5814
5778
|
export type Money = {
|
|
5815
5779
|
/**
|
|
@@ -6062,7 +6026,7 @@ export type PortfolioBidStrategy = {
|
|
|
6062
6026
|
targetRoas?: (number) | null;
|
|
6063
6027
|
};
|
|
6064
6028
|
|
|
6065
|
-
export type
|
|
6029
|
+
export type type8 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE';
|
|
6066
6030
|
|
|
6067
6031
|
export type Post = {
|
|
6068
6032
|
_id?: string;
|
|
@@ -7385,7 +7349,7 @@ export type UploadedFile = {
|
|
|
7385
7349
|
mimeType?: string;
|
|
7386
7350
|
};
|
|
7387
7351
|
|
|
7388
|
-
export type
|
|
7352
|
+
export type type9 = 'image' | 'video' | 'document';
|
|
7389
7353
|
|
|
7390
7354
|
export type UploadTokenResponse = {
|
|
7391
7355
|
token?: string;
|
|
@@ -10550,7 +10514,7 @@ export type WhatsAppTemplateButton = {
|
|
|
10550
10514
|
navigate_screen?: string;
|
|
10551
10515
|
};
|
|
10552
10516
|
|
|
10553
|
-
export type
|
|
10517
|
+
export type type10 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
10554
10518
|
|
|
10555
10519
|
/**
|
|
10556
10520
|
* Required when type is otp
|
|
@@ -10712,7 +10676,7 @@ export type WorkflowNode = {
|
|
|
10712
10676
|
* integrations (webhook, ai, handoff, start_call).
|
|
10713
10677
|
*
|
|
10714
10678
|
*/
|
|
10715
|
-
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';
|
|
10716
10680
|
|
|
10717
10681
|
/**
|
|
10718
10682
|
* A single X API operation with its per-call price and the Zernio platform methods that trigger it.
|
|
@@ -10848,7 +10812,7 @@ export type XArticleBlock = {
|
|
|
10848
10812
|
entity_ranges?: Array<XArticleEntityRange>;
|
|
10849
10813
|
};
|
|
10850
10814
|
|
|
10851
|
-
export type
|
|
10815
|
+
export type type12 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
|
|
10852
10816
|
|
|
10853
10817
|
/**
|
|
10854
10818
|
* X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
|
|
@@ -10927,7 +10891,7 @@ export type XArticleEntity = {
|
|
|
10927
10891
|
|
|
10928
10892
|
export type mutability = 'immutable' | 'mutable' | 'segmented';
|
|
10929
10893
|
|
|
10930
|
-
export type
|
|
10894
|
+
export type type13 = 'divider' | 'latex';
|
|
10931
10895
|
|
|
10932
10896
|
/**
|
|
10933
10897
|
* The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
|
|
@@ -33767,12 +33731,6 @@ export type GetAdData = {
|
|
|
33767
33731
|
*/
|
|
33768
33732
|
adId: string;
|
|
33769
33733
|
};
|
|
33770
|
-
query?: {
|
|
33771
|
-
/**
|
|
33772
|
-
* Meta only. Read current promotion metadata from Meta and include promotionStatus. Omit for stored creative settings with no promotion-specific Graph call.
|
|
33773
|
-
*/
|
|
33774
|
-
refreshPromotion?: boolean;
|
|
33775
|
-
};
|
|
33776
33734
|
};
|
|
33777
33735
|
|
|
33778
33736
|
export type GetAdResponse = ({
|
|
@@ -33923,10 +33881,9 @@ export type UpdateAdData = {
|
|
|
33923
33881
|
* GET /v1/ads/creatives and ignores every other field. Meta creatives are
|
|
33924
33882
|
* immutable, so any change creates a new creative and repoints the ad; the old
|
|
33925
33883
|
* creative is retained on the ad account for historical reporting.
|
|
33926
|
-
* `
|
|
33927
|
-
*
|
|
33928
|
-
*
|
|
33929
|
-
* 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.
|
|
33930
33887
|
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
33931
33888
|
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
33932
33889
|
* `landing_page_url`; `videoUrl` triggers a fresh upload. `description`, `videoId`
|
|
@@ -33939,6 +33896,9 @@ export type UpdateAdData = {
|
|
|
33939
33896
|
*
|
|
33940
33897
|
*/
|
|
33941
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
|
+
*/
|
|
33942
33902
|
promotion?: MetaPromotion;
|
|
33943
33903
|
creativeFeatures?: MetaCreativeFeatures;
|
|
33944
33904
|
/**
|
|
@@ -35758,9 +35718,12 @@ export type CreateAdCreativeData = {
|
|
|
35758
35718
|
* Appended to every outbound URL (e.g. utm_source=fb).
|
|
35759
35719
|
*/
|
|
35760
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
|
+
*/
|
|
35761
35724
|
promotion?: MetaPromotion;
|
|
35762
35725
|
/**
|
|
35763
|
-
* 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.
|
|
35764
35727
|
*/
|
|
35765
35728
|
creativeFeatures?: MetaCreativeFeatures;
|
|
35766
35729
|
/**
|
|
@@ -35776,8 +35739,6 @@ export type CreateAdCreativeResponse = ({
|
|
|
35776
35739
|
* Platform creative id, reusable via existingCreativeId.
|
|
35777
35740
|
*/
|
|
35778
35741
|
creativeId?: string;
|
|
35779
|
-
promotion?: MetaPromotion;
|
|
35780
|
-
promotionStatus?: MetaPromotionStatus;
|
|
35781
35742
|
});
|
|
35782
35743
|
|
|
35783
35744
|
export type CreateAdCreativeError = (unknown | {
|
|
@@ -37375,9 +37336,12 @@ export type CreateStandaloneAdData = {
|
|
|
37375
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.
|
|
37376
37337
|
*/
|
|
37377
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
|
+
*/
|
|
37378
37342
|
promotion?: MetaPromotion;
|
|
37379
37343
|
/**
|
|
37380
|
-
* 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.
|
|
37381
37345
|
*/
|
|
37382
37346
|
creativeFeatures?: MetaCreativeFeatures;
|
|
37383
37347
|
/**
|
|
@@ -37518,10 +37482,6 @@ export type CreateStandaloneAdData = {
|
|
|
37518
37482
|
*
|
|
37519
37483
|
*/
|
|
37520
37484
|
creatives?: Array<{
|
|
37521
|
-
/**
|
|
37522
|
-
* Overrides the top-level offer for this item. Omit to inherit; null disables the inherited offer.
|
|
37523
|
-
*/
|
|
37524
|
-
promotion?: MetaPromotion;
|
|
37525
37485
|
/**
|
|
37526
37486
|
* Replaces the entire top-level creativeFeatures map for this item. Omit to inherit; an empty map clears these defaults.
|
|
37527
37487
|
*/
|