@getlatedev/node 0.2.932 → 0.2.934

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 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
  /**
@@ -2886,7 +2886,7 @@ type AdsTimelineResponse = {
2886
2886
  }>;
2887
2887
  };
2888
2888
  /**
2889
- * Meta only. 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.
2889
+ * 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
2890
  */
2891
2891
  type AdTracking = {
2892
2892
  /**
@@ -2894,7 +2894,7 @@ type AdTracking = {
2894
2894
  */
2895
2895
  pixelId?: string;
2896
2896
  /**
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.
2897
+ * 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
2898
  */
2899
2899
  urlTags?: Array<{
2900
2900
  key: string;
@@ -3022,7 +3022,7 @@ type AdTreeCampaign = {
3022
3022
  */
3023
3023
  reviewStatus?: (AdReviewStatus | null);
3024
3024
  /**
3025
- * Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`.
3025
+ * 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
3026
  */
3027
3027
  platformCampaignStatus?: (string) | null;
3028
3028
  /**
@@ -35180,7 +35180,7 @@ type CreateAdCampaignData = {
35180
35180
  */
35181
35181
  buyingType?: 'AUCTION' | 'RESERVED';
35182
35182
  /**
35183
- * Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED. `true` on any other platform returns 501 `feature_not_available` (same as POST /v1/ads/create); `false` is ignored.
35183
+ * 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
35184
  */
35185
35185
  validateOnly?: boolean;
35186
35186
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
@@ -36532,7 +36532,7 @@ type UpdateAdData = {
36532
36532
  */
36533
36533
  amount?: number;
36534
36534
  /**
36535
- * OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap.
36535
+ * 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
36536
  */
36537
36537
  type?: 'daily' | 'lifetime';
36538
36538
  };
@@ -40403,15 +40403,15 @@ type CreateStandaloneAdData = {
40403
40403
  */
40404
40404
  aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
40405
40405
  /**
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`.
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. 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
40407
  */
40408
40408
  validateOnly?: boolean;
40409
40409
  /**
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 requires a $1 minimum (its budget is lifetime-only, see budgetType).
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: in the ad account currency, minimum 1; OpenAI can require a higher daily minimum for some currencies and names it in the error.
40411
40411
  */
40412
40412
  budgetAmount?: number;
40413
40413
  /**
40414
- * Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads creation accepts lifetime only; sending daily returns 422 (daily caps can be set afterwards with PUT /v1/ads/campaigns/{campaignId}). OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window.
40414
+ * 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
40415
  */
40416
40416
  budgetType?: 'daily' | 'lifetime';
40417
40417
  /**
@@ -41261,7 +41261,7 @@ type CreateStandaloneAdData = {
41261
41261
  *
41262
41262
  * Meta bid strategy applied to the ad set.
41263
41263
  *
41264
- * OpenAI Ads: required on every ad group via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). No auto-bid option exists; send `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` together with `bidAmount`, omitting it returns 400.
41264
+ * 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
41265
  *
41266
41266
  * 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
41267
  *
@@ -43540,6 +43540,27 @@ type ListConversionDestinationsResponse = ({
43540
43540
  *
43541
43541
  */
43542
43542
  adAccountId?: string;
43543
+ /**
43544
+ * OpenAI Ads only: the conversion event settings wired
43545
+ * to this pixel. A `goal: conversions` create on
43546
+ * POST /v1/ads/create optimizes for the first
43547
+ * `optimizable` one; when none is, it returns 400.
43548
+ *
43549
+ */
43550
+ conversionEvents?: Array<{
43551
+ id?: string;
43552
+ name?: string;
43553
+ /**
43554
+ * OpenAI event type, e.g. order_created, lead_created, or custom.
43555
+ */
43556
+ eventType?: (string) | null;
43557
+ customEventName?: (string) | null;
43558
+ archived?: boolean;
43559
+ /**
43560
+ * Active and standard (not custom). Only these can be a conversions campaign's optimization event.
43561
+ */
43562
+ optimizable?: boolean;
43563
+ }>;
43543
43564
  }>;
43544
43565
  });
43545
43566
  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
  /**
@@ -2886,7 +2886,7 @@ type AdsTimelineResponse = {
2886
2886
  }>;
2887
2887
  };
2888
2888
  /**
2889
- * Meta only. 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.
2889
+ * 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
2890
  */
2891
2891
  type AdTracking = {
2892
2892
  /**
@@ -2894,7 +2894,7 @@ type AdTracking = {
2894
2894
  */
2895
2895
  pixelId?: string;
2896
2896
  /**
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.
2897
+ * 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
2898
  */
2899
2899
  urlTags?: Array<{
2900
2900
  key: string;
@@ -3022,7 +3022,7 @@ type AdTreeCampaign = {
3022
3022
  */
3023
3023
  reviewStatus?: (AdReviewStatus | null);
3024
3024
  /**
3025
- * Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`.
3025
+ * 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
3026
  */
3027
3027
  platformCampaignStatus?: (string) | null;
3028
3028
  /**
@@ -35180,7 +35180,7 @@ type CreateAdCampaignData = {
35180
35180
  */
35181
35181
  buyingType?: 'AUCTION' | 'RESERVED';
35182
35182
  /**
35183
- * Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED. `true` on any other platform returns 501 `feature_not_available` (same as POST /v1/ads/create); `false` is ignored.
35183
+ * 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
35184
  */
35185
35185
  validateOnly?: boolean;
35186
35186
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
@@ -36532,7 +36532,7 @@ type UpdateAdData = {
36532
36532
  */
36533
36533
  amount?: number;
36534
36534
  /**
36535
- * OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap.
36535
+ * 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
36536
  */
36537
36537
  type?: 'daily' | 'lifetime';
36538
36538
  };
@@ -40403,15 +40403,15 @@ type CreateStandaloneAdData = {
40403
40403
  */
40404
40404
  aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
40405
40405
  /**
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`.
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. 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
40407
  */
40408
40408
  validateOnly?: boolean;
40409
40409
  /**
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 requires a $1 minimum (its budget is lifetime-only, see budgetType).
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: in the ad account currency, minimum 1; OpenAI can require a higher daily minimum for some currencies and names it in the error.
40411
40411
  */
40412
40412
  budgetAmount?: number;
40413
40413
  /**
40414
- * Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads creation accepts lifetime only; sending daily returns 422 (daily caps can be set afterwards with PUT /v1/ads/campaigns/{campaignId}). OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window.
40414
+ * 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
40415
  */
40416
40416
  budgetType?: 'daily' | 'lifetime';
40417
40417
  /**
@@ -41261,7 +41261,7 @@ type CreateStandaloneAdData = {
41261
41261
  *
41262
41262
  * Meta bid strategy applied to the ad set.
41263
41263
  *
41264
- * OpenAI Ads: required on every ad group via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). No auto-bid option exists; send `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` together with `bidAmount`, omitting it returns 400.
41264
+ * 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
41265
  *
41266
41266
  * 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
41267
  *
@@ -43540,6 +43540,27 @@ type ListConversionDestinationsResponse = ({
43540
43540
  *
43541
43541
  */
43542
43542
  adAccountId?: string;
43543
+ /**
43544
+ * OpenAI Ads only: the conversion event settings wired
43545
+ * to this pixel. A `goal: conversions` create on
43546
+ * POST /v1/ads/create optimizes for the first
43547
+ * `optimizable` one; when none is, it returns 400.
43548
+ *
43549
+ */
43550
+ conversionEvents?: Array<{
43551
+ id?: string;
43552
+ name?: string;
43553
+ /**
43554
+ * OpenAI event type, e.g. order_created, lead_created, or custom.
43555
+ */
43556
+ eventType?: (string) | null;
43557
+ customEventName?: (string) | null;
43558
+ archived?: boolean;
43559
+ /**
43560
+ * Active and standard (not custom). Only these can be a conversions campaign's optimization event.
43561
+ */
43562
+ optimizable?: boolean;
43563
+ }>;
43543
43564
  }>;
43544
43565
  });
43545
43566
  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.932",
39
+ version: "0.2.934",
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.932",
8
+ version: "0.2.934",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.932",
3
+ "version": "0.2.934",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -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 only `budgetType: lifetime`, Google only
8726
- * `budgetType: daily`). LinkedIn creates the
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`.
@@ -9697,6 +9699,14 @@ export const generateKeywordHistoricalMetrics = <ThrowOnError extends boolean =
9697
9699
  * an invalid query returns a 400 carrying Google's message (note: selecting `segments.date`
9698
9700
  * requires a finite date filter).
9699
9701
  *
9702
+ * Queries run against Google Ads API **v25**, so write GAQL against the v25 field reference.
9703
+ * One exception is translated for backward compatibility: the legacy `campaign.start_date` /
9704
+ * `campaign.end_date` (removed by Google in v23) are rewritten to `campaign.start_date_time` /
9705
+ * `campaign.end_date_time`, and rows still carry `campaign.startDate` / `campaign.endDate` as
9706
+ * `YYYY-MM-DD`. In WHERE, `=`, `<`, `<=`, `>`, `>=`, `BETWEEN` and `IS [NOT] NULL` against a
9707
+ * `'YYYY-MM-DD'` literal are translated; any other form returns Google's 400. New code should
9708
+ * select the `_date_time` fields directly.
9709
+ *
9700
9710
  */
9701
9711
  export const queryAdInsights = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<QueryAdInsightsData, ThrowOnError>) => {
9702
9712
  return (options?.client ?? client).get<QueryAdInsightsResponse, QueryAdInsightsError, ThrowOnError>({
@@ -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
  /**
@@ -1236,7 +1236,7 @@ export type AdsTimelineResponse = {
1236
1236
  };
1237
1237
 
1238
1238
  /**
1239
- * Meta only. 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.
1239
+ * 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
1240
  */
1241
1241
  export type AdTracking = {
1242
1242
  /**
@@ -1244,7 +1244,7 @@ export type AdTracking = {
1244
1244
  */
1245
1245
  pixelId?: string;
1246
1246
  /**
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.
1247
+ * 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
1248
  */
1249
1249
  urlTags?: Array<{
1250
1250
  key: string;
@@ -1374,7 +1374,7 @@ export type AdTreeCampaign = {
1374
1374
  */
1375
1375
  reviewStatus?: (AdReviewStatus | null);
1376
1376
  /**
1377
- * Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`.
1377
+ * 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
1378
  */
1379
1379
  platformCampaignStatus?: (string) | null;
1380
1380
  /**
@@ -35517,7 +35517,7 @@ export type CreateAdCampaignData = {
35517
35517
  */
35518
35518
  buyingType?: 'AUCTION' | 'RESERVED';
35519
35519
  /**
35520
- * Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED. `true` on any other platform returns 501 `feature_not_available` (same as POST /v1/ads/create); `false` is ignored.
35520
+ * 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
35521
  */
35522
35522
  validateOnly?: boolean;
35523
35523
  specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
@@ -36944,7 +36944,7 @@ export type UpdateAdData = {
36944
36944
  */
36945
36945
  amount?: number;
36946
36946
  /**
36947
- * OpenAI Ads accepts both and sets the campaign's single spend cap, replacing the previous daily or lifetime cap.
36947
+ * 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
36948
  */
36949
36949
  type?: 'daily' | 'lifetime';
36950
36950
  };
@@ -41061,15 +41061,15 @@ export type CreateStandaloneAdData = {
41061
41061
  */
41062
41062
  aiDisclosure?: 'OPT_IN' | 'OPT_OUT';
41063
41063
  /**
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`.
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. 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
41065
  */
41066
41066
  validateOnly?: boolean;
41067
41067
  /**
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 requires a $1 minimum (its budget is lifetime-only, see budgetType).
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: in the ad account currency, minimum 1; OpenAI can require a higher daily minimum for some currencies and names it in the error.
41069
41069
  */
41070
41070
  budgetAmount?: number;
41071
41071
  /**
41072
- * Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads creation accepts lifetime only; sending daily returns 422 (daily caps can be set afterwards with PUT /v1/ads/campaigns/{campaignId}). OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window.
41072
+ * 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
41073
  */
41074
41074
  budgetType?: 'daily' | 'lifetime';
41075
41075
  /**
@@ -41919,7 +41919,7 @@ export type CreateStandaloneAdData = {
41919
41919
  *
41920
41920
  * Meta bid strategy applied to the ad set.
41921
41921
  *
41922
- * OpenAI Ads: required on every ad group via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). No auto-bid option exists; send `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` together with `bidAmount`, omitting it returns 400.
41922
+ * 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
41923
  *
41924
41924
  * 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
41925
  *
@@ -44352,6 +44352,27 @@ export type ListConversionDestinationsResponse = ({
44352
44352
  *
44353
44353
  */
44354
44354
  adAccountId?: string;
44355
+ /**
44356
+ * OpenAI Ads only: the conversion event settings wired
44357
+ * to this pixel. A `goal: conversions` create on
44358
+ * POST /v1/ads/create optimizes for the first
44359
+ * `optimizable` one; when none is, it returns 400.
44360
+ *
44361
+ */
44362
+ conversionEvents?: Array<{
44363
+ id?: string;
44364
+ name?: string;
44365
+ /**
44366
+ * OpenAI event type, e.g. order_created, lead_created, or custom.
44367
+ */
44368
+ eventType?: (string) | null;
44369
+ customEventName?: (string) | null;
44370
+ archived?: boolean;
44371
+ /**
44372
+ * Active and standard (not custom). Only these can be a conversions campaign's optimization event.
44373
+ */
44374
+ optimizable?: boolean;
44375
+ }>;
44355
44376
  }>;
44356
44377
  });
44357
44378