@zernio/node 0.2.729 → 0.2.731
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 +105 -24
- package/dist/index.d.ts +105 -24
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +27 -4
- package/src/generated/types.gen.ts +108 -23
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.731",
|
|
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.731",
|
|
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
|
@@ -8367,7 +8367,9 @@ export const duplicateAdSet = <ThrowOnError extends boolean = false>(options: Op
|
|
|
8367
8367
|
* Duplicates a single ad via Meta's native `POST /{ad-id}/copies`. The copy is created
|
|
8368
8368
|
* paused. `adSetId` retargets the copy into another ad set; omitted = the source's own ad
|
|
8369
8369
|
* set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered
|
|
8370
|
-
* automatically (`syncAfter: false` to skip).
|
|
8370
|
+
* automatically (`syncAfter: false` to skip). Creative settings returned by Meta,
|
|
8371
|
+
* including explicit promotion metadata and creativeFeatures, are preserved when the
|
|
8372
|
+
* native copy requires a creative rebuild. Metadata Meta does not return cannot be recovered.
|
|
8371
8373
|
*/
|
|
8372
8374
|
export const duplicateAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DuplicateAdData, ThrowOnError>) => {
|
|
8373
8375
|
return (options?.client ?? client).post<DuplicateAdResponse, DuplicateAdError, ThrowOnError>({
|
|
@@ -8555,6 +8557,11 @@ export const getAdsTimeline = <ThrowOnError extends boolean = false>(options: Op
|
|
|
8555
8557
|
* - the creative's `effective_instagram_media_id` (Instagram side)
|
|
8556
8558
|
*
|
|
8557
8559
|
* Any of the four resolve to the same ad. Caller doesn't need a translation step.
|
|
8560
|
+
* By default, creative.promotion and creative.creativeFeatures contain stored requested
|
|
8561
|
+
* settings, which do not confirm platform application. With `refreshPromotion=true`,
|
|
8562
|
+
* Meta promotion metadata is read live and exposed as `ad.creative.promotion`
|
|
8563
|
+
* with `promotionStatus`. Only `applied` confirms an offer; `not_returned` means the
|
|
8564
|
+
* creative read succeeded without promotion metadata, and `unavailable` means it failed.
|
|
8558
8565
|
*
|
|
8559
8566
|
*/
|
|
8560
8567
|
export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdData, ThrowOnError>) => {
|
|
@@ -9102,7 +9109,11 @@ export const listAdCreatives = <ThrowOnError extends boolean = false>(options: O
|
|
|
9102
9109
|
* `existingCreativeId`. Provide exactly one of `imageUrl` (uploaded server-side),
|
|
9103
9110
|
* `imageHash` (from POST /v1/ads/images or the library list), or `carouselCards` (2-10
|
|
9104
9111
|
* hand-built cards). The Page (and linked Instagram account, when present) is resolved
|
|
9105
|
-
* from `accountId` as the story actor.
|
|
9112
|
+
* from `accountId` as the story actor. `promotion` configures an explicit offer separately
|
|
9113
|
+
* from Advantage+ `creativeFeatures`. Only when `promotion` is supplied does the response
|
|
9114
|
+
* read the creative back from Meta;
|
|
9115
|
+
* `promotionStatus: not_returned` means Meta accepted creation but omitted promotion
|
|
9116
|
+
* metadata, so the requested offer is not confirmed as applied.
|
|
9106
9117
|
*/
|
|
9107
9118
|
export const createAdCreative = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAdCreativeData, ThrowOnError>) => {
|
|
9108
9119
|
return (options?.client ?? client).post<CreateAdCreativeResponse, CreateAdCreativeError, ThrowOnError>({
|
|
@@ -9516,7 +9527,9 @@ export const getDsaRecommendations = <ThrowOnError extends boolean = false>(opti
|
|
|
9516
9527
|
* **Messaging boosts (Meta).** Use `goal: engagement` with
|
|
9517
9528
|
* `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`.
|
|
9518
9529
|
* The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively;
|
|
9519
|
-
* `destinationType` alone
|
|
9530
|
+
* `destinationType` alone does not select a messaging CTA. Omit `linkUrl`
|
|
9531
|
+
* only for messaging CTAs. Plain link CTAs keep their goal and link behavior
|
|
9532
|
+
* when combined with an independent `destinationType`.
|
|
9520
9533
|
* The campaign uses OUTCOME_ENGAGEMENT and the ad set uses CONVERSATIONS
|
|
9521
9534
|
* with the promoted Page. Optional `whatsappPhoneNumber` selects a number
|
|
9522
9535
|
* already paired with that Page. Conflicting CTA/destination, instant form,
|
|
@@ -9553,6 +9566,16 @@ export const boostPost = <ThrowOnError extends boolean = false>(options: Options
|
|
|
9553
9566
|
* - Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting.
|
|
9554
9567
|
* - 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.
|
|
9555
9568
|
*
|
|
9569
|
+
* Meta accepts `promotion` and `creativeFeatures` on the single and attach shapes and
|
|
9570
|
+
* as defaults for `creatives[]`. An item replaces the whole feature map; its `promotion`
|
|
9571
|
+
* replaces the default offer, and `promotion: null` disables that default for the item.
|
|
9572
|
+
* Reusing `existingCreativeId` uses the existing creative settings instead of new settings.
|
|
9573
|
+
* Requested settings are persisted for lists, exports, and default ad-detail reads.
|
|
9574
|
+
* Only ads supplied a `promotion` receive live readback; multi-create batches those reads
|
|
9575
|
+
* in groups of up to 50 IDs without per-ad fallback. Inspect `ad.creative.promotionStatus` (or
|
|
9576
|
+
* `ads[].creative.promotionStatus`). `not_returned` means Meta omitted the metadata;
|
|
9577
|
+
* successful creation does not by itself prove the offer was applied or will display.
|
|
9578
|
+
*
|
|
9556
9579
|
* Per-platform required fields, budget minimums, and video-ad rules are documented on each property below.
|
|
9557
9580
|
*
|
|
9558
9581
|
* LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content "dark post" authored by a Company Page (see `organizationId`). Supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`.
|
|
@@ -9940,7 +9963,7 @@ export const listAdCatalogs = <ThrowOnError extends boolean = false>(options: Op
|
|
|
9940
9963
|
|
|
9941
9964
|
/**
|
|
9942
9965
|
* List a catalog's product sets
|
|
9943
|
-
* Lists a Meta product catalog's product sets, the unit a catalog ad promotes. Pass the chosen set as `promotedObject.productSetId` on POST /v1/ads/create with `goal: catalog_sales`.
|
|
9966
|
+
* Lists a Meta product catalog's product sets, the unit a catalog ad promotes. Pass the chosen set id, not the parent catalog id, as `promotedObject.productSetId` on POST /v1/ads/create with `goal: catalog_sales`. Creation verifies set visibility and returns 400 for a catalog id or an inaccessible set.
|
|
9944
9967
|
*/
|
|
9945
9968
|
export const listAdCatalogProductSets = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListAdCatalogProductSetsData, ThrowOnError>) => {
|
|
9946
9969
|
return (options?.client ?? client).get<ListAdCatalogProductSetsResponse, ListAdCatalogProductSetsError, ThrowOnError>({
|
|
@@ -271,6 +271,11 @@ export type Ad = {
|
|
|
271
271
|
* Public Facebook watch URL for VIDEO-type ads (https://www.facebook.com/watch/?v={videoId}). Null for non-video ads.
|
|
272
272
|
*/
|
|
273
273
|
videoUrl?: (string) | null;
|
|
274
|
+
/**
|
|
275
|
+
* 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.
|
|
276
|
+
*/
|
|
277
|
+
promotion?: MetaPromotion;
|
|
278
|
+
promotionStatus?: MetaPromotionStatus;
|
|
274
279
|
/**
|
|
275
280
|
* Meta ad creative id backing this ad. Reusable via existingCreativeId on POST /v1/ads/create.
|
|
276
281
|
*/
|
|
@@ -338,6 +343,10 @@ export type Ad = {
|
|
|
338
343
|
* Destination URL
|
|
339
344
|
*/
|
|
340
345
|
linkUrl?: string;
|
|
346
|
+
/**
|
|
347
|
+
* Explicit E.164 WhatsApp number supplied when creating a Meta boost or messaging ad. Absent when omitted by the caller or on older records.
|
|
348
|
+
*/
|
|
349
|
+
whatsappPhoneNumber?: string;
|
|
341
350
|
pinterestImageUrl?: string;
|
|
342
351
|
pinterestTitle?: string;
|
|
343
352
|
pinterestDescription?: string;
|
|
@@ -2810,6 +2819,10 @@ export type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 's
|
|
|
2810
2819
|
*
|
|
2811
2820
|
*/
|
|
2812
2821
|
export type CtwaAdRequestBody = {
|
|
2822
|
+
/**
|
|
2823
|
+
* Meta enhancement settings for single or attached ads, and defaults for creatives[]. An item replaces the entire map, including with an empty object.
|
|
2824
|
+
*/
|
|
2825
|
+
creativeFeatures?: MetaCreativeFeatures;
|
|
2813
2826
|
/**
|
|
2814
2827
|
* Facebook or Instagram SocialAccount ID.
|
|
2815
2828
|
*/
|
|
@@ -2835,7 +2848,7 @@ export type CtwaAdRequestBody = {
|
|
|
2835
2848
|
*/
|
|
2836
2849
|
objectStoryId?: string;
|
|
2837
2850
|
/**
|
|
2838
|
-
* WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set.
|
|
2851
|
+
* WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad.
|
|
2839
2852
|
*/
|
|
2840
2853
|
whatsappPhoneNumber?: string;
|
|
2841
2854
|
/**
|
|
@@ -2918,6 +2931,10 @@ export type CtwaAdRequestBody = {
|
|
|
2918
2931
|
* Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with existingPostId and fresh creative fields.
|
|
2919
2932
|
*/
|
|
2920
2933
|
objectStoryId?: string;
|
|
2934
|
+
/**
|
|
2935
|
+
* Replaces the top-level creativeFeatures map for this item. Omit to inherit; an empty object clears inherited enrollment choices.
|
|
2936
|
+
*/
|
|
2937
|
+
creativeFeatures?: MetaCreativeFeatures;
|
|
2921
2938
|
headline?: string;
|
|
2922
2939
|
/**
|
|
2923
2940
|
* Primary text shown above the image / video.
|
|
@@ -5386,6 +5403,49 @@ export type MetaAdsPlatformData = {
|
|
|
5386
5403
|
lifetimeMinSpendTarget?: number;
|
|
5387
5404
|
};
|
|
5388
5405
|
|
|
5406
|
+
/**
|
|
5407
|
+
* 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; use the separate promotion field for an explicit offer. The deprecated standard_enhancements bundle is rejected by Meta.
|
|
5408
|
+
*/
|
|
5409
|
+
export type MetaCreativeFeatures = {
|
|
5410
|
+
[key: string]: ('OPT_IN' | 'OPT_OUT');
|
|
5411
|
+
};
|
|
5412
|
+
|
|
5413
|
+
/**
|
|
5414
|
+
* Meta explicit Promotion offer. Maps to creative_sourcing_spec.promotion_metadata_spec with promotion_source ADVERTISER_INPUT. Dates become Unix seconds. Send null to omit an explicit offer on a new creative or remove it when rebuilding. Creation success alone does not confirm application: inspect promotionStatus in the response.
|
|
5415
|
+
*/
|
|
5416
|
+
export type MetaPromotion = {
|
|
5417
|
+
/**
|
|
5418
|
+
* Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.
|
|
5419
|
+
*/
|
|
5420
|
+
type: 'AMOUNT_OFF' | 'FREE_RETURN' | 'FREE_SHIPPING' | 'PERCENTAGE_OFF' | 'PROMO_CODE';
|
|
5421
|
+
/**
|
|
5422
|
+
* 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.
|
|
5423
|
+
*/
|
|
5424
|
+
value: number;
|
|
5425
|
+
/**
|
|
5426
|
+
* Optional promotion code.
|
|
5427
|
+
*/
|
|
5428
|
+
code?: string;
|
|
5429
|
+
/**
|
|
5430
|
+
* Optional ISO 8601 start timestamp with a timezone offset or Z.
|
|
5431
|
+
*/
|
|
5432
|
+
startDate?: string;
|
|
5433
|
+
/**
|
|
5434
|
+
* Optional ISO 8601 end timestamp with a timezone offset or Z. Must be after startDate when both are set.
|
|
5435
|
+
*/
|
|
5436
|
+
endDate?: string;
|
|
5437
|
+
} | null;
|
|
5438
|
+
|
|
5439
|
+
/**
|
|
5440
|
+
* Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.
|
|
5441
|
+
*/
|
|
5442
|
+
export type type8 = 'AMOUNT_OFF' | 'FREE_RETURN' | 'FREE_SHIPPING' | 'PERCENTAGE_OFF' | 'PROMO_CODE';
|
|
5443
|
+
|
|
5444
|
+
/**
|
|
5445
|
+
* 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.
|
|
5446
|
+
*/
|
|
5447
|
+
export type MetaPromotionStatus = 'applied' | 'not_returned' | 'unavailable';
|
|
5448
|
+
|
|
5389
5449
|
export type Money = {
|
|
5390
5450
|
/**
|
|
5391
5451
|
* ISO 4217 currency code (e.g. USD, EUR)
|
|
@@ -5637,7 +5697,7 @@ export type PortfolioBidStrategy = {
|
|
|
5637
5697
|
targetRoas?: (number) | null;
|
|
5638
5698
|
};
|
|
5639
5699
|
|
|
5640
|
-
export type
|
|
5700
|
+
export type type9 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE';
|
|
5641
5701
|
|
|
5642
5702
|
export type Post = {
|
|
5643
5703
|
_id?: string;
|
|
@@ -6933,7 +6993,7 @@ export type UploadedFile = {
|
|
|
6933
6993
|
mimeType?: string;
|
|
6934
6994
|
};
|
|
6935
6995
|
|
|
6936
|
-
export type
|
|
6996
|
+
export type type10 = 'image' | 'video' | 'document';
|
|
6937
6997
|
|
|
6938
6998
|
export type UploadTokenResponse = {
|
|
6939
6999
|
token?: string;
|
|
@@ -10032,7 +10092,7 @@ export type WhatsAppTemplateButton = {
|
|
|
10032
10092
|
navigate_screen?: string;
|
|
10033
10093
|
};
|
|
10034
10094
|
|
|
10035
|
-
export type
|
|
10095
|
+
export type type11 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
10036
10096
|
|
|
10037
10097
|
/**
|
|
10038
10098
|
* Required when type is otp
|
|
@@ -10194,7 +10254,7 @@ export type WorkflowNode = {
|
|
|
10194
10254
|
* integrations (webhook, ai, handoff, start_call).
|
|
10195
10255
|
*
|
|
10196
10256
|
*/
|
|
10197
|
-
export type
|
|
10257
|
+
export type type12 = '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';
|
|
10198
10258
|
|
|
10199
10259
|
/**
|
|
10200
10260
|
* A single X API operation with its per-call price and the Zernio platform methods that trigger it.
|
|
@@ -10330,7 +10390,7 @@ export type XArticleBlock = {
|
|
|
10330
10390
|
entity_ranges?: Array<XArticleEntityRange>;
|
|
10331
10391
|
};
|
|
10332
10392
|
|
|
10333
|
-
export type
|
|
10393
|
+
export type type13 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
|
|
10334
10394
|
|
|
10335
10395
|
/**
|
|
10336
10396
|
* X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
|
|
@@ -10409,7 +10469,7 @@ export type XArticleEntity = {
|
|
|
10409
10469
|
|
|
10410
10470
|
export type mutability = 'immutable' | 'mutable' | 'segmented';
|
|
10411
10471
|
|
|
10412
|
-
export type
|
|
10472
|
+
export type type14 = 'divider' | 'latex';
|
|
10413
10473
|
|
|
10414
10474
|
/**
|
|
10415
10475
|
* The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
|
|
@@ -33018,13 +33078,19 @@ export type GetAdData = {
|
|
|
33018
33078
|
*/
|
|
33019
33079
|
adId: string;
|
|
33020
33080
|
};
|
|
33081
|
+
query?: {
|
|
33082
|
+
/**
|
|
33083
|
+
* Meta only. Read current promotion metadata from Meta and include promotionStatus. Omit for stored creative settings with no promotion-specific Graph call.
|
|
33084
|
+
*/
|
|
33085
|
+
refreshPromotion?: boolean;
|
|
33086
|
+
};
|
|
33021
33087
|
};
|
|
33022
33088
|
|
|
33023
33089
|
export type GetAdResponse = ({
|
|
33024
33090
|
ad?: Ad;
|
|
33025
33091
|
});
|
|
33026
33092
|
|
|
33027
|
-
export type GetAdError = ({
|
|
33093
|
+
export type GetAdError = (ErrorResponse | {
|
|
33028
33094
|
error?: string;
|
|
33029
33095
|
});
|
|
33030
33096
|
|
|
@@ -33115,6 +33181,10 @@ export type UpdateAdData = {
|
|
|
33115
33181
|
* GET /v1/ads/creatives and ignores every other field. Meta creatives are
|
|
33116
33182
|
* immutable, so any change creates a new creative and repoints the ad; the old
|
|
33117
33183
|
* creative is retained on the ad account for historical reporting.
|
|
33184
|
+
* `promotion` and `creativeFeatures` are Meta-only. Omitted settings are
|
|
33185
|
+
* preserved from the live creative, including full rebuilds. Send
|
|
33186
|
+
* `promotion: null` to remove the explicit offer from the replacement.
|
|
33187
|
+
* A supplied creativeFeatures map overrides individual existing keys.
|
|
33118
33188
|
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
33119
33189
|
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
33120
33190
|
* `landing_page_url`; `videoUrl` triggers a fresh upload. `description`, `videoId`
|
|
@@ -33127,6 +33197,8 @@ export type UpdateAdData = {
|
|
|
33127
33197
|
*
|
|
33128
33198
|
*/
|
|
33129
33199
|
creative?: {
|
|
33200
|
+
promotion?: MetaPromotion;
|
|
33201
|
+
creativeFeatures?: MetaCreativeFeatures;
|
|
33130
33202
|
/**
|
|
33131
33203
|
* Meta and LinkedIn (TikTok has no headline slot)
|
|
33132
33204
|
*/
|
|
@@ -34425,12 +34497,11 @@ export type CreateAdCreativeData = {
|
|
|
34425
34497
|
* Appended to every outbound URL (e.g. utm_source=fb).
|
|
34426
34498
|
*/
|
|
34427
34499
|
urlTags?: string;
|
|
34500
|
+
promotion?: MetaPromotion;
|
|
34428
34501
|
/**
|
|
34429
|
-
*
|
|
34502
|
+
* 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; an explicit offer uses promotion.
|
|
34430
34503
|
*/
|
|
34431
|
-
creativeFeatures?:
|
|
34432
|
-
[key: string]: ('OPT_IN' | 'OPT_OUT');
|
|
34433
|
-
};
|
|
34504
|
+
creativeFeatures?: MetaCreativeFeatures;
|
|
34434
34505
|
/**
|
|
34435
34506
|
* Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key, and Meta rejects it there.
|
|
34436
34507
|
*/
|
|
@@ -34444,6 +34515,8 @@ export type CreateAdCreativeResponse = ({
|
|
|
34444
34515
|
* Platform creative id, reusable via existingCreativeId.
|
|
34445
34516
|
*/
|
|
34446
34517
|
creativeId?: string;
|
|
34518
|
+
promotion?: MetaPromotion;
|
|
34519
|
+
promotionStatus?: MetaPromotionStatus;
|
|
34447
34520
|
});
|
|
34448
34521
|
|
|
34449
34522
|
export type CreateAdCreativeError = (unknown | {
|
|
@@ -35269,6 +35342,7 @@ export type GetDsaRecommendationsError = (unknown | {
|
|
|
35269
35342
|
|
|
35270
35343
|
export type BoostPostData = {
|
|
35271
35344
|
body: {
|
|
35345
|
+
creativeFeatures?: MetaCreativeFeatures;
|
|
35272
35346
|
/**
|
|
35273
35347
|
* Zernio post ID (provide this or platformPostId)
|
|
35274
35348
|
*/
|
|
@@ -35309,11 +35383,11 @@ export type BoostPostData = {
|
|
|
35309
35383
|
*/
|
|
35310
35384
|
instagramAccountId?: string;
|
|
35311
35385
|
/**
|
|
35312
|
-
* Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as.
|
|
35386
|
+
* Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Independent of plain link CTAs and their goal. A messaging callToAction selects its destination automatically; an explicit destinationType must then match. Lead ads use ON_AD.
|
|
35313
35387
|
*/
|
|
35314
35388
|
destinationType?: 'INSTAGRAM_PROFILE' | 'WEBSITE' | 'ON_AD' | 'MESSENGER' | 'WHATSAPP' | 'INSTAGRAM_DIRECT';
|
|
35315
35389
|
/**
|
|
35316
|
-
* Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires
|
|
35390
|
+
* Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires WHATSAPP_MESSAGE callToAction. Stored as creative.whatsappPhoneNumber on the ad.
|
|
35317
35391
|
*/
|
|
35318
35392
|
whatsappPhoneNumber?: string;
|
|
35319
35393
|
/**
|
|
@@ -35571,7 +35645,7 @@ export type BoostPostData = {
|
|
|
35571
35645
|
*/
|
|
35572
35646
|
leadGenFormId?: string;
|
|
35573
35647
|
/**
|
|
35574
|
-
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
35648
|
+
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On Meta a new campaign stays paused until explicitly activated; an attached ad is itself paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
35575
35649
|
*/
|
|
35576
35650
|
status?: 'ACTIVE' | 'PAUSED';
|
|
35577
35651
|
/**
|
|
@@ -35679,12 +35753,11 @@ export type CreateStandaloneAdData = {
|
|
|
35679
35753
|
* 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.
|
|
35680
35754
|
*/
|
|
35681
35755
|
rfPredictionId?: string;
|
|
35756
|
+
promotion?: MetaPromotion;
|
|
35682
35757
|
/**
|
|
35683
|
-
* Meta only.
|
|
35758
|
+
* 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; an explicit offer uses promotion.
|
|
35684
35759
|
*/
|
|
35685
|
-
creativeFeatures?:
|
|
35686
|
-
[key: string]: ('OPT_IN' | 'OPT_OUT');
|
|
35687
|
-
};
|
|
35760
|
+
creativeFeatures?: MetaCreativeFeatures;
|
|
35688
35761
|
/**
|
|
35689
35762
|
* Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key, and Meta rejects it there.
|
|
35690
35763
|
*/
|
|
@@ -35819,6 +35892,14 @@ export type CreateStandaloneAdData = {
|
|
|
35819
35892
|
*
|
|
35820
35893
|
*/
|
|
35821
35894
|
creatives?: Array<{
|
|
35895
|
+
/**
|
|
35896
|
+
* Overrides the top-level offer for this item. Omit to inherit; null disables the inherited offer.
|
|
35897
|
+
*/
|
|
35898
|
+
promotion?: MetaPromotion;
|
|
35899
|
+
/**
|
|
35900
|
+
* Replaces the entire top-level creativeFeatures map for this item. Omit to inherit; an empty map clears these defaults.
|
|
35901
|
+
*/
|
|
35902
|
+
creativeFeatures?: MetaCreativeFeatures;
|
|
35822
35903
|
/**
|
|
35823
35904
|
* Exact name for this ad. Falls back to `<name> #N` (N = 1-based position).
|
|
35824
35905
|
*/
|
|
@@ -35850,7 +35931,8 @@ export type CreateStandaloneAdData = {
|
|
|
35850
35931
|
* are inherited from the ad set on Meta, and passing `bidStrategy`
|
|
35851
35932
|
* in attach mode returns 400. To change an existing ad set's
|
|
35852
35933
|
* bid, use `PUT /v1/ads/ad-sets/{adSetId}`. Mutually exclusive
|
|
35853
|
-
* with `creatives[]`.
|
|
35934
|
+
* with `creatives[]`. `dynamicCreative` returns 400 in attach mode: create
|
|
35935
|
+
* a new dynamic ad set by omitting `adSetId` instead.
|
|
35854
35936
|
*
|
|
35855
35937
|
* The attached ad takes the full single-creative surface:
|
|
35856
35938
|
* `headline`/`body`/`description`/`callToAction` plus either
|
|
@@ -36165,7 +36247,10 @@ export type CreateStandaloneAdData = {
|
|
|
36165
36247
|
* (`imageUrl`, `headline`, `body`, `linkUrl`, `callToAction`) are ignored. Mutually
|
|
36166
36248
|
* exclusive with the `creatives[]` multi-creative shape. Exactly ONE of `imageUrls` /
|
|
36167
36249
|
* `videoUrls` is required (Meta allows one ad format per asset feed; sending both →
|
|
36168
|
-
* 400).
|
|
36250
|
+
* 400). Limits remain 10 images or videos and 5 bodies, titles or descriptions.
|
|
36251
|
+
* The ad set is created with `is_dynamic_creative: true`. Combining this field
|
|
36252
|
+
* with `adSetId` returns 400: omit `adSetId` to create a new dynamic ad set.
|
|
36253
|
+
* Multiple headlines go in `titles`; multiple primary texts go in `bodies`.
|
|
36169
36254
|
*
|
|
36170
36255
|
*/
|
|
36171
36256
|
dynamicCreative?: {
|
|
@@ -36743,11 +36828,11 @@ export type CreateStandaloneAdData = {
|
|
|
36743
36828
|
*/
|
|
36744
36829
|
customConversionId?: string;
|
|
36745
36830
|
/**
|
|
36746
|
-
*
|
|
36831
|
+
* Optional catalog ID. If supplied with productSetId, the set must belong to this catalog. A catalog ID cannot replace productSetId.
|
|
36747
36832
|
*/
|
|
36748
36833
|
productCatalogId?: string;
|
|
36749
36834
|
/**
|
|
36750
|
-
*
|
|
36835
|
+
* Meta product SET ID from GET /v1/ads/catalogs/{catalogId}/product-sets. Zernio checks that the token can read the set and its product_catalog before creation. A catalog ID or inaccessible set returns a precise 400 naming promotedObject.productSetId. A mismatch with productCatalogId names promotedObject.productCatalogId.
|
|
36751
36836
|
*/
|
|
36752
36837
|
productSetId?: string;
|
|
36753
36838
|
/**
|