@zernio/node 0.2.759 → 0.2.761
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/README.md +2 -0
- package/dist/index.d.mts +66 -62
- package/dist/index.d.ts +66 -62
- package/dist/index.js +15 -1
- package/dist/index.mjs +15 -1
- package/package.json +1 -1
- package/src/client.ts +4 -0
- package/src/generated/sdk.gen.ts +37 -18
- package/src/generated/types.gen.ts +69 -63
|
@@ -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
|
-
*
|
|
5780
|
-
*/
|
|
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.
|
|
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.
|
|
5811
5775
|
*/
|
|
5812
|
-
export type
|
|
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.
|
|
@@ -17979,6 +17943,52 @@ export type CompleteTelegramConnectError = (ErrorResponse | {
|
|
|
17979
17943
|
error?: string;
|
|
17980
17944
|
} | unknown);
|
|
17981
17945
|
|
|
17946
|
+
export type GetPageWebhookSubscriptionData = {
|
|
17947
|
+
path: {
|
|
17948
|
+
accountId: string;
|
|
17949
|
+
};
|
|
17950
|
+
};
|
|
17951
|
+
|
|
17952
|
+
export type GetPageWebhookSubscriptionResponse = ({
|
|
17953
|
+
pageId?: string;
|
|
17954
|
+
/**
|
|
17955
|
+
* False when the Page carries no subscription for our app at all.
|
|
17956
|
+
*/
|
|
17957
|
+
appSubscribed?: boolean;
|
|
17958
|
+
/**
|
|
17959
|
+
* Whether lead ads submitted on this Page reach Zernio in real time.
|
|
17960
|
+
*/
|
|
17961
|
+
leadgen?: boolean;
|
|
17962
|
+
subscribedFields?: Array<(string)>;
|
|
17963
|
+
/**
|
|
17964
|
+
* Present only when leadgen is missing.
|
|
17965
|
+
*/
|
|
17966
|
+
warning?: (string) | null;
|
|
17967
|
+
});
|
|
17968
|
+
|
|
17969
|
+
export type GetPageWebhookSubscriptionError = (ErrorResponse | {
|
|
17970
|
+
error?: string;
|
|
17971
|
+
} | unknown);
|
|
17972
|
+
|
|
17973
|
+
export type ResyncPageWebhookSubscriptionData = {
|
|
17974
|
+
path: {
|
|
17975
|
+
accountId: string;
|
|
17976
|
+
};
|
|
17977
|
+
};
|
|
17978
|
+
|
|
17979
|
+
export type ResyncPageWebhookSubscriptionResponse = ({
|
|
17980
|
+
resubscribed?: boolean;
|
|
17981
|
+
pageId?: string;
|
|
17982
|
+
appSubscribed?: boolean;
|
|
17983
|
+
leadgen?: boolean;
|
|
17984
|
+
subscribedFields?: Array<(string)>;
|
|
17985
|
+
warning?: (string) | null;
|
|
17986
|
+
});
|
|
17987
|
+
|
|
17988
|
+
export type ResyncPageWebhookSubscriptionError = (ErrorResponse | {
|
|
17989
|
+
error?: string;
|
|
17990
|
+
} | unknown);
|
|
17991
|
+
|
|
17982
17992
|
export type GetFacebookPagesData = {
|
|
17983
17993
|
path: {
|
|
17984
17994
|
accountId: string;
|
|
@@ -33767,12 +33777,6 @@ export type GetAdData = {
|
|
|
33767
33777
|
*/
|
|
33768
33778
|
adId: string;
|
|
33769
33779
|
};
|
|
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
33780
|
};
|
|
33777
33781
|
|
|
33778
33782
|
export type GetAdResponse = ({
|
|
@@ -33923,10 +33927,9 @@ export type UpdateAdData = {
|
|
|
33923
33927
|
* GET /v1/ads/creatives and ignores every other field. Meta creatives are
|
|
33924
33928
|
* immutable, so any change creates a new creative and repoints the ad; the old
|
|
33925
33929
|
* creative is retained on the ad account for historical reporting.
|
|
33926
|
-
* `
|
|
33927
|
-
*
|
|
33928
|
-
*
|
|
33929
|
-
* A supplied creativeFeatures map overrides individual existing keys.
|
|
33930
|
+
* `creativeFeatures` is Meta-only. Omitted settings are preserved from the
|
|
33931
|
+
* live creative, including full rebuilds. A supplied creativeFeatures map
|
|
33932
|
+
* overrides individual existing keys.
|
|
33930
33933
|
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
33931
33934
|
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
33932
33935
|
* `landing_page_url`; `videoUrl` triggers a fresh upload. `description`, `videoId`
|
|
@@ -33939,6 +33942,9 @@ export type UpdateAdData = {
|
|
|
33939
33942
|
*
|
|
33940
33943
|
*/
|
|
33941
33944
|
creative?: {
|
|
33945
|
+
/**
|
|
33946
|
+
* 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.
|
|
33947
|
+
*/
|
|
33942
33948
|
promotion?: MetaPromotion;
|
|
33943
33949
|
creativeFeatures?: MetaCreativeFeatures;
|
|
33944
33950
|
/**
|
|
@@ -35758,9 +35764,12 @@ export type CreateAdCreativeData = {
|
|
|
35758
35764
|
* Appended to every outbound URL (e.g. utm_source=fb).
|
|
35759
35765
|
*/
|
|
35760
35766
|
urlTags?: string;
|
|
35767
|
+
/**
|
|
35768
|
+
* 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.
|
|
35769
|
+
*/
|
|
35761
35770
|
promotion?: MetaPromotion;
|
|
35762
35771
|
/**
|
|
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
|
|
35772
|
+
* 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
35773
|
*/
|
|
35765
35774
|
creativeFeatures?: MetaCreativeFeatures;
|
|
35766
35775
|
/**
|
|
@@ -35776,8 +35785,6 @@ export type CreateAdCreativeResponse = ({
|
|
|
35776
35785
|
* Platform creative id, reusable via existingCreativeId.
|
|
35777
35786
|
*/
|
|
35778
35787
|
creativeId?: string;
|
|
35779
|
-
promotion?: MetaPromotion;
|
|
35780
|
-
promotionStatus?: MetaPromotionStatus;
|
|
35781
35788
|
});
|
|
35782
35789
|
|
|
35783
35790
|
export type CreateAdCreativeError = (unknown | {
|
|
@@ -37375,9 +37382,12 @@ export type CreateStandaloneAdData = {
|
|
|
37375
37382
|
* 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
37383
|
*/
|
|
37377
37384
|
rfPredictionId?: string;
|
|
37385
|
+
/**
|
|
37386
|
+
* 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.
|
|
37387
|
+
*/
|
|
37378
37388
|
promotion?: MetaPromotion;
|
|
37379
37389
|
/**
|
|
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
|
|
37390
|
+
* 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
37391
|
*/
|
|
37382
37392
|
creativeFeatures?: MetaCreativeFeatures;
|
|
37383
37393
|
/**
|
|
@@ -37518,10 +37528,6 @@ export type CreateStandaloneAdData = {
|
|
|
37518
37528
|
*
|
|
37519
37529
|
*/
|
|
37520
37530
|
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
37531
|
/**
|
|
37526
37532
|
* Replaces the entire top-level creativeFeatures map for this item. Omit to inherit; an empty map clears these defaults.
|
|
37527
37533
|
*/
|