@zernio/node 0.2.524 → 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 +28 -12
- package/dist/index.d.ts +28 -12
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +22 -20
- package/src/generated/types.gen.ts +28 -12
package/dist/index.d.mts
CHANGED
|
@@ -25990,10 +25990,28 @@ type UpdateAdCampaignStatusError = (unknown | {
|
|
|
25990
25990
|
type UpdateAdCampaignData = {
|
|
25991
25991
|
body: {
|
|
25992
25992
|
/**
|
|
25993
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -25990,10 +25990,28 @@ type UpdateAdCampaignStatusError = (unknown | {
|
|
|
25990
25990
|
type UpdateAdCampaignData = {
|
|
25991
25991
|
body: {
|
|
25992
25992
|
/**
|
|
25993
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
};
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@zernio/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.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.
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -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.
|
|
6842
|
-
*
|
|
6843
|
-
*
|
|
6844
|
-
*
|
|
6845
|
-
*
|
|
6846
|
-
*
|
|
6847
|
-
*
|
|
6848
|
-
*
|
|
6849
|
-
*
|
|
6850
|
-
*
|
|
6851
|
-
*
|
|
6852
|
-
*
|
|
6853
|
-
*
|
|
6854
|
-
*
|
|
6855
|
-
*
|
|
6856
|
-
*
|
|
6857
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
};
|