@zernio/node 0.2.523 → 0.2.525

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
@@ -25990,10 +25990,28 @@ type UpdateAdCampaignStatusError = (unknown | {
25990
25990
  type UpdateAdCampaignData = {
25991
25991
  body: {
25992
25992
  /**
25993
- * Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
25993
+ * Required: platform campaign IDs are not globally unique.
25994
+ */
25995
+ platform: 'facebook' | 'instagram' | 'google';
25996
+ /**
25997
+ * **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise.
25994
25998
  */
25995
25999
  accountId?: string;
25996
- platform: 'facebook' | 'instagram';
26000
+ /**
26001
+ * **Meta + Google.** On Meta, the campaign default that ad sets inherit unless they override it. On Google, the campaign's own bidding strategy.
26002
+ */
26003
+ bidStrategy?: (BidStrategy);
26004
+ /**
26005
+ * **Google only.** Whole currency units (USD: 12 = $12.00). Max CPC for LOWEST_COST_WITH_BID_CAP, CPA target for COST_CAP; required for both.
26006
+ */
26007
+ bidAmount?: number;
26008
+ /**
26009
+ * **Google only.** Decimal ROAS multiplier (2.0 = 2.0x), required for LOWEST_COST_WITH_MIN_ROAS.
26010
+ */
26011
+ roasAverageFloor?: number;
26012
+ /**
26013
+ * **Meta only.** The CBO budget.
26014
+ */
25997
26015
  budget?: {
25998
26016
  /**
25999
26017
  * Budget amount in the ad account's currency
@@ -26002,22 +26020,15 @@ type UpdateAdCampaignData = {
26002
26020
  type: 'daily' | 'lifetime';
26003
26021
  };
26004
26022
  /**
26005
- * Campaign-level default. Ad sets inherit this unless they override.
26006
- */
26007
- bidStrategy?: (BidStrategy);
26008
- /**
26009
- * Rename the campaign (Meta only; other platforms return 501). At least one of budget/bidStrategy/name/platformSpecificData is required.
26023
+ * **Meta only.** Rename the campaign.
26010
26024
  */
26011
26025
  name?: string;
26012
26026
  /**
26013
- * Platform-specific campaign settings. The platform is implied by the `platform`
26014
- * body param (same convention as platformSpecificData on POST /v1/ads/create).
26015
- * Meta (facebook/instagram) only; other platforms return 400.
26016
- *
26027
+ * **Meta only.** Platform implied by the `platform` body param, same convention as POST /v1/ads/create.
26017
26028
  */
26018
26029
  platformSpecificData?: {
26019
26030
  /**
26020
- * Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap (0 is rejected by Meta).
26031
+ * Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap; 0 is rejected by Meta.
26021
26032
  */
26022
26033
  spendCap?: (number) | null;
26023
26034
  };
@@ -26030,10 +26041,15 @@ type UpdateAdCampaignData = {
26030
26041
  };
26031
26042
  };
26032
26043
  type UpdateAdCampaignResponse = ({
26044
+ /**
26045
+ * Local Ad documents mirrored. 0 on the empty-campaign path.
26046
+ */
26033
26047
  updated?: number;
26034
26048
  budget?: AdBudget;
26035
26049
  budgetLevel?: 'campaign';
26036
26050
  bidStrategy?: BidStrategy;
26051
+ bidAmount?: number;
26052
+ roasAverageFloor?: number;
26037
26053
  platformSpecificData?: {
26038
26054
  [key: string]: unknown;
26039
26055
  };
@@ -29587,10 +29603,11 @@ type CreateLeadFormData = {
29587
29603
  thankYouButtonText?: string;
29588
29604
  thankYouButtonType?: string;
29589
29605
  thankYouWebsiteUrl?: string;
29606
+ /**
29607
+ * Set true for a higher-intent form (adds a review step before submit).
29608
+ */
29590
29609
  isOptimizedForQuality?: boolean;
29591
- formType?: 'MORE_VOLUME' | 'HIGHER_INTENT' | 'RICH_CREATIVE';
29592
29610
  blockDisplayForNonTargetedViewer?: boolean;
29593
- allowOrganicLeadGen?: boolean;
29594
29611
  questionPageCustomHeadline?: string;
29595
29612
  contextCard?: {
29596
29613
  title?: string;
package/dist/index.d.ts CHANGED
@@ -25990,10 +25990,28 @@ type UpdateAdCampaignStatusError = (unknown | {
25990
25990
  type UpdateAdCampaignData = {
25991
25991
  body: {
25992
25992
  /**
25993
- * Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
25993
+ * Required: platform campaign IDs are not globally unique.
25994
+ */
25995
+ platform: 'facebook' | 'instagram' | 'google';
25996
+ /**
25997
+ * **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise.
25994
25998
  */
25995
25999
  accountId?: string;
25996
- platform: 'facebook' | 'instagram';
26000
+ /**
26001
+ * **Meta + Google.** On Meta, the campaign default that ad sets inherit unless they override it. On Google, the campaign's own bidding strategy.
26002
+ */
26003
+ bidStrategy?: (BidStrategy);
26004
+ /**
26005
+ * **Google only.** Whole currency units (USD: 12 = $12.00). Max CPC for LOWEST_COST_WITH_BID_CAP, CPA target for COST_CAP; required for both.
26006
+ */
26007
+ bidAmount?: number;
26008
+ /**
26009
+ * **Google only.** Decimal ROAS multiplier (2.0 = 2.0x), required for LOWEST_COST_WITH_MIN_ROAS.
26010
+ */
26011
+ roasAverageFloor?: number;
26012
+ /**
26013
+ * **Meta only.** The CBO budget.
26014
+ */
25997
26015
  budget?: {
25998
26016
  /**
25999
26017
  * Budget amount in the ad account's currency
@@ -26002,22 +26020,15 @@ type UpdateAdCampaignData = {
26002
26020
  type: 'daily' | 'lifetime';
26003
26021
  };
26004
26022
  /**
26005
- * Campaign-level default. Ad sets inherit this unless they override.
26006
- */
26007
- bidStrategy?: (BidStrategy);
26008
- /**
26009
- * Rename the campaign (Meta only; other platforms return 501). At least one of budget/bidStrategy/name/platformSpecificData is required.
26023
+ * **Meta only.** Rename the campaign.
26010
26024
  */
26011
26025
  name?: string;
26012
26026
  /**
26013
- * Platform-specific campaign settings. The platform is implied by the `platform`
26014
- * body param (same convention as platformSpecificData on POST /v1/ads/create).
26015
- * Meta (facebook/instagram) only; other platforms return 400.
26016
- *
26027
+ * **Meta only.** Platform implied by the `platform` body param, same convention as POST /v1/ads/create.
26017
26028
  */
26018
26029
  platformSpecificData?: {
26019
26030
  /**
26020
- * Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap (0 is rejected by Meta).
26031
+ * Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap; 0 is rejected by Meta.
26021
26032
  */
26022
26033
  spendCap?: (number) | null;
26023
26034
  };
@@ -26030,10 +26041,15 @@ type UpdateAdCampaignData = {
26030
26041
  };
26031
26042
  };
26032
26043
  type UpdateAdCampaignResponse = ({
26044
+ /**
26045
+ * Local Ad documents mirrored. 0 on the empty-campaign path.
26046
+ */
26033
26047
  updated?: number;
26034
26048
  budget?: AdBudget;
26035
26049
  budgetLevel?: 'campaign';
26036
26050
  bidStrategy?: BidStrategy;
26051
+ bidAmount?: number;
26052
+ roasAverageFloor?: number;
26037
26053
  platformSpecificData?: {
26038
26054
  [key: string]: unknown;
26039
26055
  };
@@ -29587,10 +29603,11 @@ type CreateLeadFormData = {
29587
29603
  thankYouButtonText?: string;
29588
29604
  thankYouButtonType?: string;
29589
29605
  thankYouWebsiteUrl?: string;
29606
+ /**
29607
+ * Set true for a higher-intent form (adds a review step before submit).
29608
+ */
29590
29609
  isOptimizedForQuality?: boolean;
29591
- formType?: 'MORE_VOLUME' | 'HIGHER_INTENT' | 'RICH_CREATIVE';
29592
29610
  blockDisplayForNonTargetedViewer?: boolean;
29593
- allowOrganicLeadGen?: boolean;
29594
29611
  questionPageCustomHeadline?: string;
29595
29612
  contextCard?: {
29596
29613
  title?: string;
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@zernio/node",
39
- version: "0.2.523",
39
+ version: "0.2.525",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@zernio/node",
8
- version: "0.2.523",
8
+ version: "0.2.525",
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": "@zernio/node",
3
- "version": "0.2.523",
3
+ "version": "0.2.525",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -6838,23 +6838,28 @@ export const updateAdCampaignStatus = <ThrowOnError extends boolean = false>(opt
6838
6838
 
6839
6839
  /**
6840
6840
  * Update a campaign
6841
- * Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required.
6842
- *
6843
- * **Empty campaigns.** A campaign with zero ads has no local Ad documents to
6844
- * resolve, so this would 404 even though it exists on Meta. Send `accountId`
6845
- * in the body to skip the local lookup and forward the update to Meta. The
6846
- * response then carries `updated: 0`, since there are no local rows to mirror
6847
- * onto. `accountId` is ignored when the campaign does have ads.
6848
- *
6849
- * - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns
6850
- * (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint
6851
- * will return 409 with code BUDGET_LEVEL_MISMATCH.
6852
- * - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and
6853
- * `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}.
6854
- * - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad
6855
- * account's currency.
6856
- *
6857
- * Meta-only for now. Other platforms return 501 Not Implemented.
6841
+ * Campaign-level edits. Send at least one of `budget`, `bidStrategy`, `name`
6842
+ * or `platformSpecificData`. An unsupported field is always an error, never a
6843
+ * silent drop.
6844
+ *
6845
+ * | Body field | Meta | Google | Others |
6846
+ * |---|---|---|---|
6847
+ * | `bidStrategy` | Yes | Yes | 501 |
6848
+ * | `bidAmount`, `roasAverageFloor` | 400 — ad-set level | Yes | 400 |
6849
+ * | `budget` (CBO; ABO returns 409) | Yes | 501 | 501 |
6850
+ * | `name` | Yes | 501 | 501 |
6851
+ * | `platformSpecificData.spendCap` | Yes | 400 | 400 |
6852
+ * | `accountId` (empty campaigns) | Yes | - | - |
6853
+ *
6854
+ * Google maps the shared enum onto its own strategies: `LOWEST_COST_WITHOUT_CAP`
6855
+ * to Maximize Clicks, `LOWEST_COST_WITH_BID_CAP` to Maximize Clicks with a max
6856
+ * CPC (`bidAmount`), `COST_CAP` to Target CPA (`bidAmount`),
6857
+ * `LOWEST_COST_WITH_MIN_ROAS` to Target ROAS (`roasAverageFloor`). A campaign on
6858
+ * a PORTFOLIO bidding strategy is rejected: detach it in Google Ads first, since
6859
+ * it is shared across campaigns.
6860
+ *
6861
+ * `accountId` forwards the update straight to Meta for a campaign with zero ads,
6862
+ * which would otherwise 404; the response then carries `updated: 0`.
6858
6863
  *
6859
6864
  */
6860
6865
  export const updateAdCampaign = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdCampaignData, ThrowOnError>) => {
@@ -6870,9 +6875,6 @@ export const updateAdCampaign = <ThrowOnError extends boolean = false>(options:
6870
6875
  * and ads. Locally, all Ad documents for this campaign are marked
6871
6876
  * `status: cancelled`.
6872
6877
  *
6873
- * Meta-only for now. Other platforms return 501 Not Implemented — fall
6874
- * back to DELETE /v1/ads/{adId} per ad in the meantime.
6875
- *
6876
6878
  * **Empty campaigns.** A campaign with zero ads has no local Ad documents
6877
6879
  * to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would
6878
6880
  * 404. That state is produced by the two-step create flow (campaign, then
@@ -26368,10 +26368,28 @@ export type UpdateAdCampaignStatusError = (unknown | {
26368
26368
  export type UpdateAdCampaignData = {
26369
26369
  body: {
26370
26370
  /**
26371
- * Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
26371
+ * Required: platform campaign IDs are not globally unique.
26372
+ */
26373
+ platform: 'facebook' | 'instagram' | 'google';
26374
+ /**
26375
+ * **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise.
26372
26376
  */
26373
26377
  accountId?: string;
26374
- platform: 'facebook' | 'instagram';
26378
+ /**
26379
+ * **Meta + Google.** On Meta, the campaign default that ad sets inherit unless they override it. On Google, the campaign's own bidding strategy.
26380
+ */
26381
+ bidStrategy?: (BidStrategy);
26382
+ /**
26383
+ * **Google only.** Whole currency units (USD: 12 = $12.00). Max CPC for LOWEST_COST_WITH_BID_CAP, CPA target for COST_CAP; required for both.
26384
+ */
26385
+ bidAmount?: number;
26386
+ /**
26387
+ * **Google only.** Decimal ROAS multiplier (2.0 = 2.0x), required for LOWEST_COST_WITH_MIN_ROAS.
26388
+ */
26389
+ roasAverageFloor?: number;
26390
+ /**
26391
+ * **Meta only.** The CBO budget.
26392
+ */
26375
26393
  budget?: {
26376
26394
  /**
26377
26395
  * Budget amount in the ad account's currency
@@ -26380,22 +26398,15 @@ export type UpdateAdCampaignData = {
26380
26398
  type: 'daily' | 'lifetime';
26381
26399
  };
26382
26400
  /**
26383
- * Campaign-level default. Ad sets inherit this unless they override.
26384
- */
26385
- bidStrategy?: (BidStrategy);
26386
- /**
26387
- * Rename the campaign (Meta only; other platforms return 501). At least one of budget/bidStrategy/name/platformSpecificData is required.
26401
+ * **Meta only.** Rename the campaign.
26388
26402
  */
26389
26403
  name?: string;
26390
26404
  /**
26391
- * Platform-specific campaign settings. The platform is implied by the `platform`
26392
- * body param (same convention as platformSpecificData on POST /v1/ads/create).
26393
- * Meta (facebook/instagram) only; other platforms return 400.
26394
- *
26405
+ * **Meta only.** Platform implied by the `platform` body param, same convention as POST /v1/ads/create.
26395
26406
  */
26396
26407
  platformSpecificData?: {
26397
26408
  /**
26398
- * Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap (0 is rejected by Meta).
26409
+ * Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap; 0 is rejected by Meta.
26399
26410
  */
26400
26411
  spendCap?: (number) | null;
26401
26412
  };
@@ -26409,10 +26420,15 @@ export type UpdateAdCampaignData = {
26409
26420
  };
26410
26421
 
26411
26422
  export type UpdateAdCampaignResponse = ({
26423
+ /**
26424
+ * Local Ad documents mirrored. 0 on the empty-campaign path.
26425
+ */
26412
26426
  updated?: number;
26413
26427
  budget?: AdBudget;
26414
26428
  budgetLevel?: 'campaign';
26415
26429
  bidStrategy?: BidStrategy;
26430
+ bidAmount?: number;
26431
+ roasAverageFloor?: number;
26416
26432
  platformSpecificData?: {
26417
26433
  [key: string]: unknown;
26418
26434
  };
@@ -30133,10 +30149,11 @@ export type CreateLeadFormData = {
30133
30149
  thankYouButtonText?: string;
30134
30150
  thankYouButtonType?: string;
30135
30151
  thankYouWebsiteUrl?: string;
30152
+ /**
30153
+ * Set true for a higher-intent form (adds a review step before submit).
30154
+ */
30136
30155
  isOptimizedForQuality?: boolean;
30137
- formType?: 'MORE_VOLUME' | 'HIGHER_INTENT' | 'RICH_CREATIVE';
30138
30156
  blockDisplayForNonTargetedViewer?: boolean;
30139
- allowOrganicLeadGen?: boolean;
30140
30157
  questionPageCustomHeadline?: string;
30141
30158
  contextCard?: {
30142
30159
  title?: string;