@getlatedev/node 0.2.933 → 0.2.935
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 +54 -14
- package/dist/index.d.ts +54 -14
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +5 -3
- package/src/generated/types.gen.ts +54 -14
package/dist/index.d.mts
CHANGED
|
@@ -1776,7 +1776,7 @@ type Ad = {
|
|
|
1776
1776
|
*/
|
|
1777
1777
|
status?: (AdStatus);
|
|
1778
1778
|
/**
|
|
1779
|
-
* The ad's own on/off toggle as configured on the platform (Meta `configured_status`: ACTIVE / PAUSED), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta ads synced after this field was added.
|
|
1779
|
+
* The ad's own on/off toggle as configured on the platform (Meta `configured_status`, ChatGPT (OpenAI) ad `status`: ACTIVE / PAUSED, plus ARCHIVED on OpenAI), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta and OpenAI ads synced after this field was added.
|
|
1780
1780
|
*/
|
|
1781
1781
|
configuredStatus?: (string) | null;
|
|
1782
1782
|
/**
|
|
@@ -2172,7 +2172,7 @@ type AdCampaign = {
|
|
|
2172
2172
|
*/
|
|
2173
2173
|
reviewStatus?: (AdReviewStatus | null);
|
|
2174
2174
|
/**
|
|
2175
|
-
* Raw platform-level campaign status (Meta `effective_status
|
|
2175
|
+
* Raw platform-level campaign status (Meta `effective_status`; ChatGPT (OpenAI): the campaign's own switch, active / paused / archived).
|
|
2176
2176
|
*/
|
|
2177
2177
|
platformCampaignStatus?: (string) | null;
|
|
2178
2178
|
/**
|
|
@@ -2676,7 +2676,7 @@ type matchType2 = 'broad' | 'phrase' | 'exact';
|
|
|
2676
2676
|
* For `goal: app_promotion`, it is also sent on the campaign only when
|
|
2677
2677
|
* `isSkadnetworkAttribution: true`. Plain Android app installs keep the
|
|
2678
2678
|
* existing campaign payload, with the promoted object only on the ad set.
|
|
2679
|
-
* POST /v1/ads/campaigns forwards this object only for that explicit SKAN flag.
|
|
2679
|
+
* POST /v1/ads/campaigns forwards this object on Meta only for that explicit SKAN flag.
|
|
2680
2680
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
2681
2681
|
* event/page/app (without it Meta rejects the ad-set create with
|
|
2682
2682
|
* `error_subcode: 1815430` "Please select a promoted object for your ad set"):
|
|
@@ -2696,8 +2696,13 @@ type matchType2 = 'broad' | 'phrase' | 'exact';
|
|
|
2696
2696
|
* the App ID of an app registered on the TikTok Ads account (Assets → Events →
|
|
2697
2697
|
* App Events). Install optimization needs the app's MMP tracking configured.
|
|
2698
2698
|
*
|
|
2699
|
+
* **OpenAI (ChatGPT) Ads**: `goal: conversions` only, on POST /v1/ads/create and
|
|
2700
|
+
* POST /v1/ads/campaigns. `customEventType` picks the conversion event the campaign
|
|
2701
|
+
* optimizes for (sent as the campaign's `conversion_event_setting_ids`); every other
|
|
2702
|
+
* `promotedObject` field is rejected with a 400. See `customEventType` below.
|
|
2703
|
+
*
|
|
2699
2704
|
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
2700
|
-
* Meta and
|
|
2705
|
+
* Meta, TikTok and OpenAI ignore `promotedObject` entirely.
|
|
2701
2706
|
*
|
|
2702
2707
|
*/
|
|
2703
2708
|
type AdPromotedObject = {
|
|
@@ -2733,6 +2738,17 @@ type AdPromotedObject = {
|
|
|
2733
2738
|
* deprecated. On rejection the error lists the event types your pixel
|
|
2734
2739
|
* actually tracks. Optional for `goal: conversions`.
|
|
2735
2740
|
*
|
|
2741
|
+
* **OpenAI (ChatGPT) Ads:** a conversion event from
|
|
2742
|
+
* `GET /v1/accounts/{accountId}/conversion-destinations` (`conversionEvents[]`),
|
|
2743
|
+
* given as its `id` (exact), its `eventType` (e.g. `order_created`) or its `name`
|
|
2744
|
+
* (e.g. `Purchase`), both case-insensitive. It must be `optimizable` (active and
|
|
2745
|
+
* not custom). An unknown, archived or custom event returns a 400 listing the
|
|
2746
|
+
* account's optimizable events; a type or name shared by several optimizable
|
|
2747
|
+
* events returns a 400 asking for the id. `validateOnly: true` runs the same
|
|
2748
|
+
* check and names the resolved event in its `message`. Optional: when omitted,
|
|
2749
|
+
* the campaign optimizes for the first optimizable event in OpenAI's own list
|
|
2750
|
+
* order, which is the most recently created one.
|
|
2751
|
+
*
|
|
2736
2752
|
*/
|
|
2737
2753
|
customEventType?: string;
|
|
2738
2754
|
/**
|
|
@@ -2886,7 +2902,7 @@ type AdsTimelineResponse = {
|
|
|
2886
2902
|
}>;
|
|
2887
2903
|
};
|
|
2888
2904
|
/**
|
|
2889
|
-
* Meta
|
|
2905
|
+
* Meta, plus `urlTags` on ChatGPT (OpenAI). Meta: attaches pixel measurement to the ad regardless of the optimization goal (the "Website events" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` is stored on the new creative as `url_tags` and retained on the ad for compatibility. Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel. ChatGPT (OpenAI): `urlTags` becomes the ad's `landing_page_configuration.query_string_template`, which OpenAI appends to `linkUrl` on click.
|
|
2890
2906
|
*/
|
|
2891
2907
|
type AdTracking = {
|
|
2892
2908
|
/**
|
|
@@ -2894,7 +2910,7 @@ type AdTracking = {
|
|
|
2894
2910
|
*/
|
|
2895
2911
|
pixelId?: string;
|
|
2896
2912
|
/**
|
|
2897
|
-
* Click-URL params stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded.
|
|
2913
|
+
* Click-URL params. Meta: stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded. ChatGPT (OpenAI): the same encoding, with OpenAI's macros `{campaign_id}`, `{ad_group_id}`, `{ad_id}` and `{oppref}` (click id) passed through raw. OpenAI expands macros here, not inside `linkUrl`.
|
|
2898
2914
|
*/
|
|
2899
2915
|
urlTags?: Array<{
|
|
2900
2916
|
key: string;
|
|
@@ -3022,7 +3038,7 @@ type AdTreeCampaign = {
|
|
|
3022
3038
|
*/
|
|
3023
3039
|
reviewStatus?: (AdReviewStatus | null);
|
|
3024
3040
|
/**
|
|
3025
|
-
* Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`.
|
|
3041
|
+
* Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES; ChatGPT (OpenAI): the campaign's own switch, active / paused / archived, independent of the delivery `status`). Distinct from per-ad `platformStatus`.
|
|
3026
3042
|
*/
|
|
3027
3043
|
platformCampaignStatus?: (string) | null;
|
|
3028
3044
|
/**
|
|
@@ -35180,7 +35196,7 @@ type CreateAdCampaignData = {
|
|
|
35180
35196
|
*/
|
|
35181
35197
|
buyingType?: 'AUCTION' | 'RESERVED';
|
|
35182
35198
|
/**
|
|
35183
|
-
* Meta
|
|
35199
|
+
* Meta and ChatGPT (OpenAI). Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED. OpenAI has no dry-run, so there Zernio checks the budget, goal and conversion event itself. `true` on any other platform returns 501 `feature_not_available` (same as POST /v1/ads/create); `false` is ignored.
|
|
35184
35200
|
*/
|
|
35185
35201
|
validateOnly?: boolean;
|
|
35186
35202
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
@@ -36532,7 +36548,7 @@ type UpdateAdData = {
|
|
|
36532
36548
|
*/
|
|
36533
36549
|
amount?: number;
|
|
36534
36550
|
/**
|
|
36535
|
-
* OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap.
|
|
36551
|
+
* OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap. A daily cap cannot go back to lifetime (422).
|
|
36536
36552
|
*/
|
|
36537
36553
|
type?: 'daily' | 'lifetime';
|
|
36538
36554
|
};
|
|
@@ -40366,7 +40382,7 @@ type CreateStandaloneAdData = {
|
|
|
40366
40382
|
* - For `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost.
|
|
40367
40383
|
*
|
|
40368
40384
|
* **OpenAI Ads**
|
|
40369
|
-
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns
|
|
40385
|
+
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 400. Pick the event with `promotedObject.customEventType` (see AdPromotedObject); without it the most recently created optimizable event is used.
|
|
40370
40386
|
*
|
|
40371
40387
|
*/
|
|
40372
40388
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes' | 'job_applicants';
|
|
@@ -40403,15 +40419,15 @@ type CreateStandaloneAdData = {
|
|
|
40403
40419
|
*/
|
|
40404
40420
|
aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
|
|
40405
40421
|
/**
|
|
40406
|
-
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. Any other platform, or a Google campaignType other than pmax, returns 501 `feature_not_available`.
|
|
40422
|
+
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. ChatGPT (OpenAI) has no platform dry-run: Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own write-time checks (image fetch, currency-specific minimums, ad review) still run only on a real create. Any other platform, or a Google campaignType other than pmax, returns 501 `feature_not_available`.
|
|
40407
40423
|
*/
|
|
40408
40424
|
validateOnly?: boolean;
|
|
40409
40425
|
/**
|
|
40410
|
-
* Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads
|
|
40426
|
+
* Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads: in the ad account currency, minimum 1; OpenAI can require a higher daily minimum for some currencies and names it in the error.
|
|
40411
40427
|
*/
|
|
40412
40428
|
budgetAmount?: number;
|
|
40413
40429
|
/**
|
|
40414
|
-
* Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads
|
|
40430
|
+
* Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but OpenAI never switches a daily cap back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget.
|
|
40415
40431
|
*/
|
|
40416
40432
|
budgetType?: 'daily' | 'lifetime';
|
|
40417
40433
|
/**
|
|
@@ -41261,7 +41277,7 @@ type CreateStandaloneAdData = {
|
|
|
41261
41277
|
*
|
|
41262
41278
|
* Meta bid strategy applied to the ad set.
|
|
41263
41279
|
*
|
|
41264
|
-
* OpenAI Ads:
|
|
41280
|
+
* OpenAI Ads: sent via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` with `bidAmount` sets a fixed bid (`fixed_bid`, the CPA bid on `conversions`). Omitted or `LOWEST_COST_WITHOUT_CAP` bids automatically with OpenAI's Maximize Results (`maximize_clicks` for `traffic`, `maximize_conversions` for `conversions`), which needs `budgetType: daily`; on a lifetime budget or the `awareness` goal it returns 400.
|
|
41265
41281
|
*
|
|
41266
41282
|
* Google (not deprecated there, this shared flat field is Google's only shape): applied to the campaign this call creates. On Google: LOWEST_COST_WITHOUT_CAP = Maximize Conversions, COST_CAP + bidAmount = Target CPA, LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS, LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling; portfolioBidStrategyId attaches a portfolio strategy instead. Omitted, the campaign falls back to a goal-based default.
|
|
41267
41283
|
*
|
|
@@ -43540,6 +43556,30 @@ type ListConversionDestinationsResponse = ({
|
|
|
43540
43556
|
*
|
|
43541
43557
|
*/
|
|
43542
43558
|
adAccountId?: string;
|
|
43559
|
+
/**
|
|
43560
|
+
* OpenAI Ads only: the conversion event settings wired
|
|
43561
|
+
* to this pixel. Pass one's `id`, `eventType` or `name`
|
|
43562
|
+
* as `promotedObject.customEventType` on a
|
|
43563
|
+
* `goal: conversions` create (POST /v1/ads/create or
|
|
43564
|
+
* POST /v1/ads/campaigns) to optimize for it. Without
|
|
43565
|
+
* it, the account's most recently created `optimizable`
|
|
43566
|
+
* event is used; when none is, the create returns 400.
|
|
43567
|
+
*
|
|
43568
|
+
*/
|
|
43569
|
+
conversionEvents?: Array<{
|
|
43570
|
+
id?: string;
|
|
43571
|
+
name?: string;
|
|
43572
|
+
/**
|
|
43573
|
+
* OpenAI event type, e.g. order_created, lead_created, or custom.
|
|
43574
|
+
*/
|
|
43575
|
+
eventType?: (string) | null;
|
|
43576
|
+
customEventName?: (string) | null;
|
|
43577
|
+
archived?: boolean;
|
|
43578
|
+
/**
|
|
43579
|
+
* Active and standard (not custom). Only these can be a conversions campaign's optimization event.
|
|
43580
|
+
*/
|
|
43581
|
+
optimizable?: boolean;
|
|
43582
|
+
}>;
|
|
43543
43583
|
}>;
|
|
43544
43584
|
});
|
|
43545
43585
|
type ListConversionDestinationsError = (unknown | {
|
package/dist/index.d.ts
CHANGED
|
@@ -1776,7 +1776,7 @@ type Ad = {
|
|
|
1776
1776
|
*/
|
|
1777
1777
|
status?: (AdStatus);
|
|
1778
1778
|
/**
|
|
1779
|
-
* The ad's own on/off toggle as configured on the platform (Meta `configured_status`: ACTIVE / PAUSED), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta ads synced after this field was added.
|
|
1779
|
+
* The ad's own on/off toggle as configured on the platform (Meta `configured_status`, ChatGPT (OpenAI) ad `status`: ACTIVE / PAUSED, plus ARCHIVED on OpenAI), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta and OpenAI ads synced after this field was added.
|
|
1780
1780
|
*/
|
|
1781
1781
|
configuredStatus?: (string) | null;
|
|
1782
1782
|
/**
|
|
@@ -2172,7 +2172,7 @@ type AdCampaign = {
|
|
|
2172
2172
|
*/
|
|
2173
2173
|
reviewStatus?: (AdReviewStatus | null);
|
|
2174
2174
|
/**
|
|
2175
|
-
* Raw platform-level campaign status (Meta `effective_status
|
|
2175
|
+
* Raw platform-level campaign status (Meta `effective_status`; ChatGPT (OpenAI): the campaign's own switch, active / paused / archived).
|
|
2176
2176
|
*/
|
|
2177
2177
|
platformCampaignStatus?: (string) | null;
|
|
2178
2178
|
/**
|
|
@@ -2676,7 +2676,7 @@ type matchType2 = 'broad' | 'phrase' | 'exact';
|
|
|
2676
2676
|
* For `goal: app_promotion`, it is also sent on the campaign only when
|
|
2677
2677
|
* `isSkadnetworkAttribution: true`. Plain Android app installs keep the
|
|
2678
2678
|
* existing campaign payload, with the promoted object only on the ad set.
|
|
2679
|
-
* POST /v1/ads/campaigns forwards this object only for that explicit SKAN flag.
|
|
2679
|
+
* POST /v1/ads/campaigns forwards this object on Meta only for that explicit SKAN flag.
|
|
2680
2680
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
2681
2681
|
* event/page/app (without it Meta rejects the ad-set create with
|
|
2682
2682
|
* `error_subcode: 1815430` "Please select a promoted object for your ad set"):
|
|
@@ -2696,8 +2696,13 @@ type matchType2 = 'broad' | 'phrase' | 'exact';
|
|
|
2696
2696
|
* the App ID of an app registered on the TikTok Ads account (Assets → Events →
|
|
2697
2697
|
* App Events). Install optimization needs the app's MMP tracking configured.
|
|
2698
2698
|
*
|
|
2699
|
+
* **OpenAI (ChatGPT) Ads**: `goal: conversions` only, on POST /v1/ads/create and
|
|
2700
|
+
* POST /v1/ads/campaigns. `customEventType` picks the conversion event the campaign
|
|
2701
|
+
* optimizes for (sent as the campaign's `conversion_event_setting_ids`); every other
|
|
2702
|
+
* `promotedObject` field is rejected with a 400. See `customEventType` below.
|
|
2703
|
+
*
|
|
2699
2704
|
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
2700
|
-
* Meta and
|
|
2705
|
+
* Meta, TikTok and OpenAI ignore `promotedObject` entirely.
|
|
2701
2706
|
*
|
|
2702
2707
|
*/
|
|
2703
2708
|
type AdPromotedObject = {
|
|
@@ -2733,6 +2738,17 @@ type AdPromotedObject = {
|
|
|
2733
2738
|
* deprecated. On rejection the error lists the event types your pixel
|
|
2734
2739
|
* actually tracks. Optional for `goal: conversions`.
|
|
2735
2740
|
*
|
|
2741
|
+
* **OpenAI (ChatGPT) Ads:** a conversion event from
|
|
2742
|
+
* `GET /v1/accounts/{accountId}/conversion-destinations` (`conversionEvents[]`),
|
|
2743
|
+
* given as its `id` (exact), its `eventType` (e.g. `order_created`) or its `name`
|
|
2744
|
+
* (e.g. `Purchase`), both case-insensitive. It must be `optimizable` (active and
|
|
2745
|
+
* not custom). An unknown, archived or custom event returns a 400 listing the
|
|
2746
|
+
* account's optimizable events; a type or name shared by several optimizable
|
|
2747
|
+
* events returns a 400 asking for the id. `validateOnly: true` runs the same
|
|
2748
|
+
* check and names the resolved event in its `message`. Optional: when omitted,
|
|
2749
|
+
* the campaign optimizes for the first optimizable event in OpenAI's own list
|
|
2750
|
+
* order, which is the most recently created one.
|
|
2751
|
+
*
|
|
2736
2752
|
*/
|
|
2737
2753
|
customEventType?: string;
|
|
2738
2754
|
/**
|
|
@@ -2886,7 +2902,7 @@ type AdsTimelineResponse = {
|
|
|
2886
2902
|
}>;
|
|
2887
2903
|
};
|
|
2888
2904
|
/**
|
|
2889
|
-
* Meta
|
|
2905
|
+
* Meta, plus `urlTags` on ChatGPT (OpenAI). Meta: attaches pixel measurement to the ad regardless of the optimization goal (the "Website events" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` is stored on the new creative as `url_tags` and retained on the ad for compatibility. Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel. ChatGPT (OpenAI): `urlTags` becomes the ad's `landing_page_configuration.query_string_template`, which OpenAI appends to `linkUrl` on click.
|
|
2890
2906
|
*/
|
|
2891
2907
|
type AdTracking = {
|
|
2892
2908
|
/**
|
|
@@ -2894,7 +2910,7 @@ type AdTracking = {
|
|
|
2894
2910
|
*/
|
|
2895
2911
|
pixelId?: string;
|
|
2896
2912
|
/**
|
|
2897
|
-
* Click-URL params stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded.
|
|
2913
|
+
* Click-URL params. Meta: stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded. ChatGPT (OpenAI): the same encoding, with OpenAI's macros `{campaign_id}`, `{ad_group_id}`, `{ad_id}` and `{oppref}` (click id) passed through raw. OpenAI expands macros here, not inside `linkUrl`.
|
|
2898
2914
|
*/
|
|
2899
2915
|
urlTags?: Array<{
|
|
2900
2916
|
key: string;
|
|
@@ -3022,7 +3038,7 @@ type AdTreeCampaign = {
|
|
|
3022
3038
|
*/
|
|
3023
3039
|
reviewStatus?: (AdReviewStatus | null);
|
|
3024
3040
|
/**
|
|
3025
|
-
* Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`.
|
|
3041
|
+
* Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES; ChatGPT (OpenAI): the campaign's own switch, active / paused / archived, independent of the delivery `status`). Distinct from per-ad `platformStatus`.
|
|
3026
3042
|
*/
|
|
3027
3043
|
platformCampaignStatus?: (string) | null;
|
|
3028
3044
|
/**
|
|
@@ -35180,7 +35196,7 @@ type CreateAdCampaignData = {
|
|
|
35180
35196
|
*/
|
|
35181
35197
|
buyingType?: 'AUCTION' | 'RESERVED';
|
|
35182
35198
|
/**
|
|
35183
|
-
* Meta
|
|
35199
|
+
* Meta and ChatGPT (OpenAI). Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED. OpenAI has no dry-run, so there Zernio checks the budget, goal and conversion event itself. `true` on any other platform returns 501 `feature_not_available` (same as POST /v1/ads/create); `false` is ignored.
|
|
35184
35200
|
*/
|
|
35185
35201
|
validateOnly?: boolean;
|
|
35186
35202
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
@@ -36532,7 +36548,7 @@ type UpdateAdData = {
|
|
|
36532
36548
|
*/
|
|
36533
36549
|
amount?: number;
|
|
36534
36550
|
/**
|
|
36535
|
-
* OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap.
|
|
36551
|
+
* OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap. A daily cap cannot go back to lifetime (422).
|
|
36536
36552
|
*/
|
|
36537
36553
|
type?: 'daily' | 'lifetime';
|
|
36538
36554
|
};
|
|
@@ -40366,7 +40382,7 @@ type CreateStandaloneAdData = {
|
|
|
40366
40382
|
* - For `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost.
|
|
40367
40383
|
*
|
|
40368
40384
|
* **OpenAI Ads**
|
|
40369
|
-
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns
|
|
40385
|
+
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 400. Pick the event with `promotedObject.customEventType` (see AdPromotedObject); without it the most recently created optimizable event is used.
|
|
40370
40386
|
*
|
|
40371
40387
|
*/
|
|
40372
40388
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes' | 'job_applicants';
|
|
@@ -40403,15 +40419,15 @@ type CreateStandaloneAdData = {
|
|
|
40403
40419
|
*/
|
|
40404
40420
|
aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
|
|
40405
40421
|
/**
|
|
40406
|
-
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. Any other platform, or a Google campaignType other than pmax, returns 501 `feature_not_available`.
|
|
40422
|
+
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. ChatGPT (OpenAI) has no platform dry-run: Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own write-time checks (image fetch, currency-specific minimums, ad review) still run only on a real create. Any other platform, or a Google campaignType other than pmax, returns 501 `feature_not_available`.
|
|
40407
40423
|
*/
|
|
40408
40424
|
validateOnly?: boolean;
|
|
40409
40425
|
/**
|
|
40410
|
-
* Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads
|
|
40426
|
+
* Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads: in the ad account currency, minimum 1; OpenAI can require a higher daily minimum for some currencies and names it in the error.
|
|
40411
40427
|
*/
|
|
40412
40428
|
budgetAmount?: number;
|
|
40413
40429
|
/**
|
|
40414
|
-
* Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads
|
|
40430
|
+
* Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but OpenAI never switches a daily cap back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget.
|
|
40415
40431
|
*/
|
|
40416
40432
|
budgetType?: 'daily' | 'lifetime';
|
|
40417
40433
|
/**
|
|
@@ -41261,7 +41277,7 @@ type CreateStandaloneAdData = {
|
|
|
41261
41277
|
*
|
|
41262
41278
|
* Meta bid strategy applied to the ad set.
|
|
41263
41279
|
*
|
|
41264
|
-
* OpenAI Ads:
|
|
41280
|
+
* OpenAI Ads: sent via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` with `bidAmount` sets a fixed bid (`fixed_bid`, the CPA bid on `conversions`). Omitted or `LOWEST_COST_WITHOUT_CAP` bids automatically with OpenAI's Maximize Results (`maximize_clicks` for `traffic`, `maximize_conversions` for `conversions`), which needs `budgetType: daily`; on a lifetime budget or the `awareness` goal it returns 400.
|
|
41265
41281
|
*
|
|
41266
41282
|
* Google (not deprecated there, this shared flat field is Google's only shape): applied to the campaign this call creates. On Google: LOWEST_COST_WITHOUT_CAP = Maximize Conversions, COST_CAP + bidAmount = Target CPA, LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS, LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling; portfolioBidStrategyId attaches a portfolio strategy instead. Omitted, the campaign falls back to a goal-based default.
|
|
41267
41283
|
*
|
|
@@ -43540,6 +43556,30 @@ type ListConversionDestinationsResponse = ({
|
|
|
43540
43556
|
*
|
|
43541
43557
|
*/
|
|
43542
43558
|
adAccountId?: string;
|
|
43559
|
+
/**
|
|
43560
|
+
* OpenAI Ads only: the conversion event settings wired
|
|
43561
|
+
* to this pixel. Pass one's `id`, `eventType` or `name`
|
|
43562
|
+
* as `promotedObject.customEventType` on a
|
|
43563
|
+
* `goal: conversions` create (POST /v1/ads/create or
|
|
43564
|
+
* POST /v1/ads/campaigns) to optimize for it. Without
|
|
43565
|
+
* it, the account's most recently created `optimizable`
|
|
43566
|
+
* event is used; when none is, the create returns 400.
|
|
43567
|
+
*
|
|
43568
|
+
*/
|
|
43569
|
+
conversionEvents?: Array<{
|
|
43570
|
+
id?: string;
|
|
43571
|
+
name?: string;
|
|
43572
|
+
/**
|
|
43573
|
+
* OpenAI event type, e.g. order_created, lead_created, or custom.
|
|
43574
|
+
*/
|
|
43575
|
+
eventType?: (string) | null;
|
|
43576
|
+
customEventName?: (string) | null;
|
|
43577
|
+
archived?: boolean;
|
|
43578
|
+
/**
|
|
43579
|
+
* Active and standard (not custom). Only these can be a conversions campaign's optimization event.
|
|
43580
|
+
*/
|
|
43581
|
+
optimizable?: boolean;
|
|
43582
|
+
}>;
|
|
43543
43583
|
}>;
|
|
43544
43584
|
});
|
|
43545
43585
|
type ListConversionDestinationsError = (unknown | {
|
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: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.935",
|
|
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: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.935",
|
|
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
|
@@ -8722,8 +8722,9 @@ export const listAdCampaigns = <ThrowOnError extends boolean = false>(options?:
|
|
|
8722
8722
|
* for ABO (each ad set carries its own budget), and `specialAdCategories` is Meta-only
|
|
8723
8723
|
* (400 elsewhere); `bidStrategy` is Meta and Google (400 elsewhere), and Google also
|
|
8724
8724
|
* accepts `portfolioBidStrategyId` instead. Google, X and OpenAI require a budget
|
|
8725
|
-
* (422 without one; OpenAI accepts
|
|
8726
|
-
* `budgetType: daily`).
|
|
8725
|
+
* (422 without one; OpenAI accepts daily or lifetime, Google only
|
|
8726
|
+
* `budgetType: daily`). On OpenAI `goal` sets the campaign objective, and
|
|
8727
|
+
* `conversions` needs an active standard conversion event on the account. LinkedIn creates the
|
|
8727
8728
|
* campaign GROUP (our campaign level) and rejects a budget, which lives on the
|
|
8728
8729
|
* campaign (ad set) level there; it comes back `status: DRAFT`. TikTok campaigns are
|
|
8729
8730
|
* created without a status and report `ENABLE`. Created `PAUSED` unless
|
|
@@ -8896,7 +8897,8 @@ export const getAdCampaignDetails = <ThrowOnError extends boolean = false>(optio
|
|
|
8896
8897
|
*
|
|
8897
8898
|
* OpenAI Ads campaigns carry exactly one spend cap: `budget.type` daily or lifetime
|
|
8898
8899
|
* replaces whichever cap the campaign had, with a minimum of 1 in the ad account's
|
|
8899
|
-
* currency (422 below it).
|
|
8900
|
+
* currency (422 below it). Lifetime can switch to daily, but OpenAI never switches a
|
|
8901
|
+
* daily cap back to lifetime (422).
|
|
8900
8902
|
*
|
|
8901
8903
|
* `accountId` forwards the update straight to Meta for a campaign with zero ads,
|
|
8902
8904
|
* which would otherwise 404; the response then carries `updated: 0`.
|
|
@@ -92,7 +92,7 @@ export type Ad = {
|
|
|
92
92
|
*/
|
|
93
93
|
status?: (AdStatus);
|
|
94
94
|
/**
|
|
95
|
-
* The ad's own on/off toggle as configured on the platform (Meta `configured_status`: ACTIVE / PAUSED), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta ads synced after this field was added.
|
|
95
|
+
* The ad's own on/off toggle as configured on the platform (Meta `configured_status`, ChatGPT (OpenAI) ad `status`: ACTIVE / PAUSED, plus ARCHIVED on OpenAI), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta and OpenAI ads synced after this field was added.
|
|
96
96
|
*/
|
|
97
97
|
configuredStatus?: (string) | null;
|
|
98
98
|
/**
|
|
@@ -496,7 +496,7 @@ export type AdCampaign = {
|
|
|
496
496
|
*/
|
|
497
497
|
reviewStatus?: (AdReviewStatus | null);
|
|
498
498
|
/**
|
|
499
|
-
* Raw platform-level campaign status (Meta `effective_status
|
|
499
|
+
* Raw platform-level campaign status (Meta `effective_status`; ChatGPT (OpenAI): the campaign's own switch, active / paused / archived).
|
|
500
500
|
*/
|
|
501
501
|
platformCampaignStatus?: (string) | null;
|
|
502
502
|
/**
|
|
@@ -1017,7 +1017,7 @@ export type matchType2 = 'broad' | 'phrase' | 'exact';
|
|
|
1017
1017
|
* For `goal: app_promotion`, it is also sent on the campaign only when
|
|
1018
1018
|
* `isSkadnetworkAttribution: true`. Plain Android app installs keep the
|
|
1019
1019
|
* existing campaign payload, with the promoted object only on the ad set.
|
|
1020
|
-
* POST /v1/ads/campaigns forwards this object only for that explicit SKAN flag.
|
|
1020
|
+
* POST /v1/ads/campaigns forwards this object on Meta only for that explicit SKAN flag.
|
|
1021
1021
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
1022
1022
|
* event/page/app (without it Meta rejects the ad-set create with
|
|
1023
1023
|
* `error_subcode: 1815430` "Please select a promoted object for your ad set"):
|
|
@@ -1037,8 +1037,13 @@ export type matchType2 = 'broad' | 'phrase' | 'exact';
|
|
|
1037
1037
|
* the App ID of an app registered on the TikTok Ads account (Assets → Events →
|
|
1038
1038
|
* App Events). Install optimization needs the app's MMP tracking configured.
|
|
1039
1039
|
*
|
|
1040
|
+
* **OpenAI (ChatGPT) Ads**: `goal: conversions` only, on POST /v1/ads/create and
|
|
1041
|
+
* POST /v1/ads/campaigns. `customEventType` picks the conversion event the campaign
|
|
1042
|
+
* optimizes for (sent as the campaign's `conversion_event_setting_ids`); every other
|
|
1043
|
+
* `promotedObject` field is rejected with a 400. See `customEventType` below.
|
|
1044
|
+
*
|
|
1040
1045
|
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
1041
|
-
* Meta and
|
|
1046
|
+
* Meta, TikTok and OpenAI ignore `promotedObject` entirely.
|
|
1042
1047
|
*
|
|
1043
1048
|
*/
|
|
1044
1049
|
export type AdPromotedObject = {
|
|
@@ -1074,6 +1079,17 @@ export type AdPromotedObject = {
|
|
|
1074
1079
|
* deprecated. On rejection the error lists the event types your pixel
|
|
1075
1080
|
* actually tracks. Optional for `goal: conversions`.
|
|
1076
1081
|
*
|
|
1082
|
+
* **OpenAI (ChatGPT) Ads:** a conversion event from
|
|
1083
|
+
* `GET /v1/accounts/{accountId}/conversion-destinations` (`conversionEvents[]`),
|
|
1084
|
+
* given as its `id` (exact), its `eventType` (e.g. `order_created`) or its `name`
|
|
1085
|
+
* (e.g. `Purchase`), both case-insensitive. It must be `optimizable` (active and
|
|
1086
|
+
* not custom). An unknown, archived or custom event returns a 400 listing the
|
|
1087
|
+
* account's optimizable events; a type or name shared by several optimizable
|
|
1088
|
+
* events returns a 400 asking for the id. `validateOnly: true` runs the same
|
|
1089
|
+
* check and names the resolved event in its `message`. Optional: when omitted,
|
|
1090
|
+
* the campaign optimizes for the first optimizable event in OpenAI's own list
|
|
1091
|
+
* order, which is the most recently created one.
|
|
1092
|
+
*
|
|
1077
1093
|
*/
|
|
1078
1094
|
customEventType?: string;
|
|
1079
1095
|
/**
|
|
@@ -1236,7 +1252,7 @@ export type AdsTimelineResponse = {
|
|
|
1236
1252
|
};
|
|
1237
1253
|
|
|
1238
1254
|
/**
|
|
1239
|
-
* Meta
|
|
1255
|
+
* Meta, plus `urlTags` on ChatGPT (OpenAI). Meta: attaches pixel measurement to the ad regardless of the optimization goal (the "Website events" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` is stored on the new creative as `url_tags` and retained on the ad for compatibility. Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel. ChatGPT (OpenAI): `urlTags` becomes the ad's `landing_page_configuration.query_string_template`, which OpenAI appends to `linkUrl` on click.
|
|
1240
1256
|
*/
|
|
1241
1257
|
export type AdTracking = {
|
|
1242
1258
|
/**
|
|
@@ -1244,7 +1260,7 @@ export type AdTracking = {
|
|
|
1244
1260
|
*/
|
|
1245
1261
|
pixelId?: string;
|
|
1246
1262
|
/**
|
|
1247
|
-
* Click-URL params stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded.
|
|
1263
|
+
* Click-URL params. Meta: stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded. ChatGPT (OpenAI): the same encoding, with OpenAI's macros `{campaign_id}`, `{ad_group_id}`, `{ad_id}` and `{oppref}` (click id) passed through raw. OpenAI expands macros here, not inside `linkUrl`.
|
|
1248
1264
|
*/
|
|
1249
1265
|
urlTags?: Array<{
|
|
1250
1266
|
key: string;
|
|
@@ -1374,7 +1390,7 @@ export type AdTreeCampaign = {
|
|
|
1374
1390
|
*/
|
|
1375
1391
|
reviewStatus?: (AdReviewStatus | null);
|
|
1376
1392
|
/**
|
|
1377
|
-
* Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`.
|
|
1393
|
+
* Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES; ChatGPT (OpenAI): the campaign's own switch, active / paused / archived, independent of the delivery `status`). Distinct from per-ad `platformStatus`.
|
|
1378
1394
|
*/
|
|
1379
1395
|
platformCampaignStatus?: (string) | null;
|
|
1380
1396
|
/**
|
|
@@ -35517,7 +35533,7 @@ export type CreateAdCampaignData = {
|
|
|
35517
35533
|
*/
|
|
35518
35534
|
buyingType?: 'AUCTION' | 'RESERVED';
|
|
35519
35535
|
/**
|
|
35520
|
-
* Meta
|
|
35536
|
+
* Meta and ChatGPT (OpenAI). Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED. OpenAI has no dry-run, so there Zernio checks the budget, goal and conversion event itself. `true` on any other platform returns 501 `feature_not_available` (same as POST /v1/ads/create); `false` is ignored.
|
|
35521
35537
|
*/
|
|
35522
35538
|
validateOnly?: boolean;
|
|
35523
35539
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
@@ -36944,7 +36960,7 @@ export type UpdateAdData = {
|
|
|
36944
36960
|
*/
|
|
36945
36961
|
amount?: number;
|
|
36946
36962
|
/**
|
|
36947
|
-
* OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap.
|
|
36963
|
+
* OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap. A daily cap cannot go back to lifetime (422).
|
|
36948
36964
|
*/
|
|
36949
36965
|
type?: 'daily' | 'lifetime';
|
|
36950
36966
|
};
|
|
@@ -41024,7 +41040,7 @@ export type CreateStandaloneAdData = {
|
|
|
41024
41040
|
* - For `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost.
|
|
41025
41041
|
*
|
|
41026
41042
|
* **OpenAI Ads**
|
|
41027
|
-
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns
|
|
41043
|
+
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 400. Pick the event with `promotedObject.customEventType` (see AdPromotedObject); without it the most recently created optimizable event is used.
|
|
41028
41044
|
*
|
|
41029
41045
|
*/
|
|
41030
41046
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'conversions' | 'app_promotion' | 'catalog_sales' | 'page_likes' | 'job_applicants';
|
|
@@ -41061,15 +41077,15 @@ export type CreateStandaloneAdData = {
|
|
|
41061
41077
|
*/
|
|
41062
41078
|
aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
|
|
41063
41079
|
/**
|
|
41064
|
-
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. Any other platform, or a Google campaignType other than pmax, returns 501 `feature_not_available`.
|
|
41080
|
+
* Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. ChatGPT (OpenAI) has no platform dry-run: Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own write-time checks (image fetch, currency-specific minimums, ad review) still run only on a real create. Any other platform, or a Google campaignType other than pmax, returns 501 `feature_not_available`.
|
|
41065
41081
|
*/
|
|
41066
41082
|
validateOnly?: boolean;
|
|
41067
41083
|
/**
|
|
41068
|
-
* Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads
|
|
41084
|
+
* Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads: in the ad account currency, minimum 1; OpenAI can require a higher daily minimum for some currencies and names it in the error.
|
|
41069
41085
|
*/
|
|
41070
41086
|
budgetAmount?: number;
|
|
41071
41087
|
/**
|
|
41072
|
-
* Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads
|
|
41088
|
+
* Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but OpenAI never switches a daily cap back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget.
|
|
41073
41089
|
*/
|
|
41074
41090
|
budgetType?: 'daily' | 'lifetime';
|
|
41075
41091
|
/**
|
|
@@ -41919,7 +41935,7 @@ export type CreateStandaloneAdData = {
|
|
|
41919
41935
|
*
|
|
41920
41936
|
* Meta bid strategy applied to the ad set.
|
|
41921
41937
|
*
|
|
41922
|
-
* OpenAI Ads:
|
|
41938
|
+
* OpenAI Ads: sent via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` with `bidAmount` sets a fixed bid (`fixed_bid`, the CPA bid on `conversions`). Omitted or `LOWEST_COST_WITHOUT_CAP` bids automatically with OpenAI's Maximize Results (`maximize_clicks` for `traffic`, `maximize_conversions` for `conversions`), which needs `budgetType: daily`; on a lifetime budget or the `awareness` goal it returns 400.
|
|
41923
41939
|
*
|
|
41924
41940
|
* Google (not deprecated there, this shared flat field is Google's only shape): applied to the campaign this call creates. On Google: LOWEST_COST_WITHOUT_CAP = Maximize Conversions, COST_CAP + bidAmount = Target CPA, LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS, LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling; portfolioBidStrategyId attaches a portfolio strategy instead. Omitted, the campaign falls back to a goal-based default.
|
|
41925
41941
|
*
|
|
@@ -44352,6 +44368,30 @@ export type ListConversionDestinationsResponse = ({
|
|
|
44352
44368
|
*
|
|
44353
44369
|
*/
|
|
44354
44370
|
adAccountId?: string;
|
|
44371
|
+
/**
|
|
44372
|
+
* OpenAI Ads only: the conversion event settings wired
|
|
44373
|
+
* to this pixel. Pass one's `id`, `eventType` or `name`
|
|
44374
|
+
* as `promotedObject.customEventType` on a
|
|
44375
|
+
* `goal: conversions` create (POST /v1/ads/create or
|
|
44376
|
+
* POST /v1/ads/campaigns) to optimize for it. Without
|
|
44377
|
+
* it, the account's most recently created `optimizable`
|
|
44378
|
+
* event is used; when none is, the create returns 400.
|
|
44379
|
+
*
|
|
44380
|
+
*/
|
|
44381
|
+
conversionEvents?: Array<{
|
|
44382
|
+
id?: string;
|
|
44383
|
+
name?: string;
|
|
44384
|
+
/**
|
|
44385
|
+
* OpenAI event type, e.g. order_created, lead_created, or custom.
|
|
44386
|
+
*/
|
|
44387
|
+
eventType?: (string) | null;
|
|
44388
|
+
customEventName?: (string) | null;
|
|
44389
|
+
archived?: boolean;
|
|
44390
|
+
/**
|
|
44391
|
+
* Active and standard (not custom). Only these can be a conversions campaign's optimization event.
|
|
44392
|
+
*/
|
|
44393
|
+
optimizable?: boolean;
|
|
44394
|
+
}>;
|
|
44355
44395
|
}>;
|
|
44356
44396
|
});
|
|
44357
44397
|
|