@zernio/node 0.2.473 → 0.2.475
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 +44 -15
- package/dist/index.d.ts +44 -15
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +9 -1
- package/src/generated/types.gen.ts +44 -15
package/dist/index.d.mts
CHANGED
|
@@ -22963,8 +22963,14 @@ type GetContactChannelsError = (unknown | {
|
|
|
22963
22963
|
type BulkCreateContactsData = {
|
|
22964
22964
|
body: {
|
|
22965
22965
|
profileId: string;
|
|
22966
|
-
|
|
22967
|
-
|
|
22966
|
+
/**
|
|
22967
|
+
* Required when contacts carry channel data (platformIdentifier or a row-level accountId). Omit for a plain CRM import with no channels.
|
|
22968
|
+
*/
|
|
22969
|
+
accountId?: string;
|
|
22970
|
+
/**
|
|
22971
|
+
* Ignored when accountId is set: the platform is derived from the resolved account. Only relevant to disambiguate accountId lookup; a mismatch 404s.
|
|
22972
|
+
*/
|
|
22973
|
+
platform?: string;
|
|
22968
22974
|
contacts: Array<{
|
|
22969
22975
|
name: string;
|
|
22970
22976
|
platformIdentifier: string;
|
|
@@ -24692,13 +24698,13 @@ type CreateAdCampaignData = {
|
|
|
24692
24698
|
goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales';
|
|
24693
24699
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
24694
24700
|
/**
|
|
24695
|
-
* Campaign-level (CBO) budget in
|
|
24701
|
+
* Campaign-level (CBO) 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. Requires budgetType.
|
|
24696
24702
|
*/
|
|
24697
24703
|
budgetAmount?: number;
|
|
24698
24704
|
budgetType?: 'daily' | 'lifetime';
|
|
24699
24705
|
status?: 'ACTIVE' | 'PAUSED';
|
|
24700
24706
|
/**
|
|
24701
|
-
* Campaign bid strategy. Meta
|
|
24707
|
+
* Campaign bid strategy. Meta stores `bid_strategy` alongside the budget, so this REQUIRES `budgetAmount` + `budgetType` on the same request; sending it without a campaign budget is a 400. A campaign carrying a strategy without its `bid_amount` makes every ad set created under it fail with an error that names the ad set (code 100, subcode 1815857), so the bad state is rejected up front rather than accepted. To bid at ad-set level, set the strategy there instead.
|
|
24702
24708
|
*/
|
|
24703
24709
|
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
24704
24710
|
/**
|
|
@@ -24815,6 +24821,10 @@ type UpdateAdCampaignError = (unknown | {
|
|
|
24815
24821
|
type DeleteAdCampaignData = {
|
|
24816
24822
|
body: {
|
|
24817
24823
|
platform: 'facebook' | 'instagram';
|
|
24824
|
+
/**
|
|
24825
|
+
* Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
|
|
24826
|
+
*/
|
|
24827
|
+
accountId?: string;
|
|
24818
24828
|
};
|
|
24819
24829
|
path: {
|
|
24820
24830
|
/**
|
|
@@ -27055,7 +27065,7 @@ type CreateStandaloneAdData = {
|
|
|
27055
27065
|
*/
|
|
27056
27066
|
validateOnly?: boolean;
|
|
27057
27067
|
/**
|
|
27058
|
-
* Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
27068
|
+
* 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 shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
27059
27069
|
*/
|
|
27060
27070
|
budgetAmount?: number;
|
|
27061
27071
|
/**
|
|
@@ -27493,7 +27503,7 @@ type CreateStandaloneAdData = {
|
|
|
27493
27503
|
callToAction?: string;
|
|
27494
27504
|
}>;
|
|
27495
27505
|
/**
|
|
27496
|
-
* Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own.
|
|
27506
|
+
* Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
|
|
27497
27507
|
*/
|
|
27498
27508
|
defaultLocale?: string;
|
|
27499
27509
|
/**
|
|
@@ -27502,9 +27512,28 @@ type CreateStandaloneAdData = {
|
|
|
27502
27512
|
* Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
27503
27513
|
* splitting it across one ad per language.
|
|
27504
27514
|
*
|
|
27505
|
-
* The ad's top-level copy
|
|
27506
|
-
*
|
|
27507
|
-
*
|
|
27515
|
+
* The ad's top-level copy is the DEFAULT shown to every locale you do NOT list,
|
|
27516
|
+
* and it counts as one of the language variants.
|
|
27517
|
+
*
|
|
27518
|
+
* IMPORTANT, and the opposite of what you might expect: text does NOT inherit.
|
|
27519
|
+
* Every entry must carry its own `headline`, `body` AND `description`, and all of
|
|
27520
|
+
* them must be DISTINCT from each other and from the ad's top-level copy. Meta
|
|
27521
|
+
* deduplicates identical strings inside the asset feed, so two locales sharing a
|
|
27522
|
+
* string collapse into one asset and the create fails with a misleading "Too few
|
|
27523
|
+
* ... texts provided in asset creation" (subcode 1885817) that names a field which
|
|
27524
|
+
* is actually present. We validate this before calling Meta and return a 400
|
|
27525
|
+
* naming the offending locale and field. `description` is therefore effectively
|
|
27526
|
+
* required on the ad whenever `translations` is present, even though it is
|
|
27527
|
+
* optional otherwise.
|
|
27528
|
+
*
|
|
27529
|
+
* Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate
|
|
27530
|
+
* with "The language asset feed includes an unsupported targeting field"
|
|
27531
|
+
* (subcode 1885985).
|
|
27532
|
+
*
|
|
27533
|
+
* Media DOES inherit and is uploaded once when shared. Note that Meta enforces
|
|
27534
|
+
* Dynamic Creative image dimensions on language feeds, so an `imageUrl` that
|
|
27535
|
+
* works on a normal ad may be rejected with "The following images have invalid
|
|
27536
|
+
* dimensions for Dynamic Creative" (subcode 1885558). Video is not affected.
|
|
27508
27537
|
*
|
|
27509
27538
|
* Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
27510
27539
|
* `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
@@ -27516,17 +27545,17 @@ type CreateStandaloneAdData = {
|
|
|
27516
27545
|
*/
|
|
27517
27546
|
locale: string;
|
|
27518
27547
|
/**
|
|
27519
|
-
* Headline for this language.
|
|
27548
|
+
* Headline for this language. REQUIRED, and must differ from every other locale and from the ad's top-level headline.
|
|
27520
27549
|
*/
|
|
27521
|
-
headline
|
|
27550
|
+
headline: string;
|
|
27522
27551
|
/**
|
|
27523
|
-
* Primary text for this language.
|
|
27552
|
+
* Primary text for this language. REQUIRED, and must differ from every other locale and from the ad's top-level body.
|
|
27524
27553
|
*/
|
|
27525
|
-
body
|
|
27554
|
+
body: string;
|
|
27526
27555
|
/**
|
|
27527
|
-
* Link description for this language.
|
|
27556
|
+
* Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
|
|
27528
27557
|
*/
|
|
27529
|
-
description
|
|
27558
|
+
description: string;
|
|
27530
27559
|
/**
|
|
27531
27560
|
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
27532
27561
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -22963,8 +22963,14 @@ type GetContactChannelsError = (unknown | {
|
|
|
22963
22963
|
type BulkCreateContactsData = {
|
|
22964
22964
|
body: {
|
|
22965
22965
|
profileId: string;
|
|
22966
|
-
|
|
22967
|
-
|
|
22966
|
+
/**
|
|
22967
|
+
* Required when contacts carry channel data (platformIdentifier or a row-level accountId). Omit for a plain CRM import with no channels.
|
|
22968
|
+
*/
|
|
22969
|
+
accountId?: string;
|
|
22970
|
+
/**
|
|
22971
|
+
* Ignored when accountId is set: the platform is derived from the resolved account. Only relevant to disambiguate accountId lookup; a mismatch 404s.
|
|
22972
|
+
*/
|
|
22973
|
+
platform?: string;
|
|
22968
22974
|
contacts: Array<{
|
|
22969
22975
|
name: string;
|
|
22970
22976
|
platformIdentifier: string;
|
|
@@ -24692,13 +24698,13 @@ type CreateAdCampaignData = {
|
|
|
24692
24698
|
goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales';
|
|
24693
24699
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
24694
24700
|
/**
|
|
24695
|
-
* Campaign-level (CBO) budget in
|
|
24701
|
+
* Campaign-level (CBO) 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. Requires budgetType.
|
|
24696
24702
|
*/
|
|
24697
24703
|
budgetAmount?: number;
|
|
24698
24704
|
budgetType?: 'daily' | 'lifetime';
|
|
24699
24705
|
status?: 'ACTIVE' | 'PAUSED';
|
|
24700
24706
|
/**
|
|
24701
|
-
* Campaign bid strategy. Meta
|
|
24707
|
+
* Campaign bid strategy. Meta stores `bid_strategy` alongside the budget, so this REQUIRES `budgetAmount` + `budgetType` on the same request; sending it without a campaign budget is a 400. A campaign carrying a strategy without its `bid_amount` makes every ad set created under it fail with an error that names the ad set (code 100, subcode 1815857), so the bad state is rejected up front rather than accepted. To bid at ad-set level, set the strategy there instead.
|
|
24702
24708
|
*/
|
|
24703
24709
|
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
24704
24710
|
/**
|
|
@@ -24815,6 +24821,10 @@ type UpdateAdCampaignError = (unknown | {
|
|
|
24815
24821
|
type DeleteAdCampaignData = {
|
|
24816
24822
|
body: {
|
|
24817
24823
|
platform: 'facebook' | 'instagram';
|
|
24824
|
+
/**
|
|
24825
|
+
* Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
|
|
24826
|
+
*/
|
|
24827
|
+
accountId?: string;
|
|
24818
24828
|
};
|
|
24819
24829
|
path: {
|
|
24820
24830
|
/**
|
|
@@ -27055,7 +27065,7 @@ type CreateStandaloneAdData = {
|
|
|
27055
27065
|
*/
|
|
27056
27066
|
validateOnly?: boolean;
|
|
27057
27067
|
/**
|
|
27058
|
-
* Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
27068
|
+
* 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 shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
27059
27069
|
*/
|
|
27060
27070
|
budgetAmount?: number;
|
|
27061
27071
|
/**
|
|
@@ -27493,7 +27503,7 @@ type CreateStandaloneAdData = {
|
|
|
27493
27503
|
callToAction?: string;
|
|
27494
27504
|
}>;
|
|
27495
27505
|
/**
|
|
27496
|
-
* Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own.
|
|
27506
|
+
* Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
|
|
27497
27507
|
*/
|
|
27498
27508
|
defaultLocale?: string;
|
|
27499
27509
|
/**
|
|
@@ -27502,9 +27512,28 @@ type CreateStandaloneAdData = {
|
|
|
27502
27512
|
* Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
27503
27513
|
* splitting it across one ad per language.
|
|
27504
27514
|
*
|
|
27505
|
-
* The ad's top-level copy
|
|
27506
|
-
*
|
|
27507
|
-
*
|
|
27515
|
+
* The ad's top-level copy is the DEFAULT shown to every locale you do NOT list,
|
|
27516
|
+
* and it counts as one of the language variants.
|
|
27517
|
+
*
|
|
27518
|
+
* IMPORTANT, and the opposite of what you might expect: text does NOT inherit.
|
|
27519
|
+
* Every entry must carry its own `headline`, `body` AND `description`, and all of
|
|
27520
|
+
* them must be DISTINCT from each other and from the ad's top-level copy. Meta
|
|
27521
|
+
* deduplicates identical strings inside the asset feed, so two locales sharing a
|
|
27522
|
+
* string collapse into one asset and the create fails with a misleading "Too few
|
|
27523
|
+
* ... texts provided in asset creation" (subcode 1885817) that names a field which
|
|
27524
|
+
* is actually present. We validate this before calling Meta and return a 400
|
|
27525
|
+
* naming the offending locale and field. `description` is therefore effectively
|
|
27526
|
+
* required on the ad whenever `translations` is present, even though it is
|
|
27527
|
+
* optional otherwise.
|
|
27528
|
+
*
|
|
27529
|
+
* Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate
|
|
27530
|
+
* with "The language asset feed includes an unsupported targeting field"
|
|
27531
|
+
* (subcode 1885985).
|
|
27532
|
+
*
|
|
27533
|
+
* Media DOES inherit and is uploaded once when shared. Note that Meta enforces
|
|
27534
|
+
* Dynamic Creative image dimensions on language feeds, so an `imageUrl` that
|
|
27535
|
+
* works on a normal ad may be rejected with "The following images have invalid
|
|
27536
|
+
* dimensions for Dynamic Creative" (subcode 1885558). Video is not affected.
|
|
27508
27537
|
*
|
|
27509
27538
|
* Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
27510
27539
|
* `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
@@ -27516,17 +27545,17 @@ type CreateStandaloneAdData = {
|
|
|
27516
27545
|
*/
|
|
27517
27546
|
locale: string;
|
|
27518
27547
|
/**
|
|
27519
|
-
* Headline for this language.
|
|
27548
|
+
* Headline for this language. REQUIRED, and must differ from every other locale and from the ad's top-level headline.
|
|
27520
27549
|
*/
|
|
27521
|
-
headline
|
|
27550
|
+
headline: string;
|
|
27522
27551
|
/**
|
|
27523
|
-
* Primary text for this language.
|
|
27552
|
+
* Primary text for this language. REQUIRED, and must differ from every other locale and from the ad's top-level body.
|
|
27524
27553
|
*/
|
|
27525
|
-
body
|
|
27554
|
+
body: string;
|
|
27526
27555
|
/**
|
|
27527
|
-
* Link description for this language.
|
|
27556
|
+
* Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
|
|
27528
27557
|
*/
|
|
27529
|
-
description
|
|
27558
|
+
description: string;
|
|
27530
27559
|
/**
|
|
27531
27560
|
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
27532
27561
|
*/
|
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.475",
|
|
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.475",
|
|
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
|
@@ -6062,7 +6062,7 @@ export const getContactChannels = <ThrowOnError extends boolean = false>(options
|
|
|
6062
6062
|
|
|
6063
6063
|
/**
|
|
6064
6064
|
* Bulk create contacts
|
|
6065
|
-
* Import up to 1000 contacts at a time. Skips duplicates. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
|
|
6065
|
+
* Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
|
|
6066
6066
|
*/
|
|
6067
6067
|
export const bulkCreateContacts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkCreateContactsData, ThrowOnError>) => {
|
|
6068
6068
|
return (options?.client ?? client).post<BulkCreateContactsResponse, BulkCreateContactsError, ThrowOnError>({
|
|
@@ -6724,6 +6724,14 @@ export const updateAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
6724
6724
|
* Meta-only for now. Other platforms return 501 Not Implemented — fall
|
|
6725
6725
|
* back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
6726
6726
|
*
|
|
6727
|
+
* **Empty campaigns.** A campaign with zero ads has no local Ad documents
|
|
6728
|
+
* to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would
|
|
6729
|
+
* 404. That state is produced by the two-step create flow (campaign, then
|
|
6730
|
+
* ads via `existingCampaignId`) whenever Meta rejects the ad step. To
|
|
6731
|
+
* delete such a shell, send `accountId` in the body: we skip the local
|
|
6732
|
+
* lookup entirely and forward the delete to Meta. `accountId` is ignored
|
|
6733
|
+
* when the campaign does have ads.
|
|
6734
|
+
*
|
|
6727
6735
|
*/
|
|
6728
6736
|
export const deleteAdCampaign = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAdCampaignData, ThrowOnError>) => {
|
|
6729
6737
|
return (options?.client ?? client).delete<DeleteAdCampaignResponse, DeleteAdCampaignError, ThrowOnError>({
|
|
@@ -23192,8 +23192,14 @@ export type GetContactChannelsError = (unknown | {
|
|
|
23192
23192
|
export type BulkCreateContactsData = {
|
|
23193
23193
|
body: {
|
|
23194
23194
|
profileId: string;
|
|
23195
|
-
|
|
23196
|
-
|
|
23195
|
+
/**
|
|
23196
|
+
* Required when contacts carry channel data (platformIdentifier or a row-level accountId). Omit for a plain CRM import with no channels.
|
|
23197
|
+
*/
|
|
23198
|
+
accountId?: string;
|
|
23199
|
+
/**
|
|
23200
|
+
* Ignored when accountId is set: the platform is derived from the resolved account. Only relevant to disambiguate accountId lookup; a mismatch 404s.
|
|
23201
|
+
*/
|
|
23202
|
+
platform?: string;
|
|
23197
23203
|
contacts: Array<{
|
|
23198
23204
|
name: string;
|
|
23199
23205
|
platformIdentifier: string;
|
|
@@ -25071,13 +25077,13 @@ export type CreateAdCampaignData = {
|
|
|
25071
25077
|
goal: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'lead_conversion' | 'job_applicants' | 'conversions' | 'app_promotion' | 'catalog_sales';
|
|
25072
25078
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
|
|
25073
25079
|
/**
|
|
25074
|
-
* Campaign-level (CBO) budget in
|
|
25080
|
+
* Campaign-level (CBO) 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. Requires budgetType.
|
|
25075
25081
|
*/
|
|
25076
25082
|
budgetAmount?: number;
|
|
25077
25083
|
budgetType?: 'daily' | 'lifetime';
|
|
25078
25084
|
status?: 'ACTIVE' | 'PAUSED';
|
|
25079
25085
|
/**
|
|
25080
|
-
* Campaign bid strategy. Meta
|
|
25086
|
+
* Campaign bid strategy. Meta stores `bid_strategy` alongside the budget, so this REQUIRES `budgetAmount` + `budgetType` on the same request; sending it without a campaign budget is a 400. A campaign carrying a strategy without its `bid_amount` makes every ad set created under it fail with an error that names the ad set (code 100, subcode 1815857), so the bad state is rejected up front rather than accepted. To bid at ad-set level, set the strategy there instead.
|
|
25081
25087
|
*/
|
|
25082
25088
|
bidStrategy?: 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
25083
25089
|
/**
|
|
@@ -25203,6 +25209,10 @@ export type UpdateAdCampaignError = (unknown | {
|
|
|
25203
25209
|
export type DeleteAdCampaignData = {
|
|
25204
25210
|
body: {
|
|
25205
25211
|
platform: 'facebook' | 'instagram';
|
|
25212
|
+
/**
|
|
25213
|
+
* Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
|
|
25214
|
+
*/
|
|
25215
|
+
accountId?: string;
|
|
25206
25216
|
};
|
|
25207
25217
|
path: {
|
|
25208
25218
|
/**
|
|
@@ -27584,7 +27594,7 @@ export type CreateStandaloneAdData = {
|
|
|
27584
27594
|
*/
|
|
27585
27595
|
validateOnly?: boolean;
|
|
27586
27596
|
/**
|
|
27587
|
-
* Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
27597
|
+
* 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 shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
27588
27598
|
*/
|
|
27589
27599
|
budgetAmount?: number;
|
|
27590
27600
|
/**
|
|
@@ -28022,7 +28032,7 @@ export type CreateStandaloneAdData = {
|
|
|
28022
28032
|
callToAction?: string;
|
|
28023
28033
|
}>;
|
|
28024
28034
|
/**
|
|
28025
|
-
* Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own.
|
|
28035
|
+
* Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
|
|
28026
28036
|
*/
|
|
28027
28037
|
defaultLocale?: string;
|
|
28028
28038
|
/**
|
|
@@ -28031,9 +28041,28 @@ export type CreateStandaloneAdData = {
|
|
|
28031
28041
|
* Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
28032
28042
|
* splitting it across one ad per language.
|
|
28033
28043
|
*
|
|
28034
|
-
* The ad's top-level copy
|
|
28035
|
-
*
|
|
28036
|
-
*
|
|
28044
|
+
* The ad's top-level copy is the DEFAULT shown to every locale you do NOT list,
|
|
28045
|
+
* and it counts as one of the language variants.
|
|
28046
|
+
*
|
|
28047
|
+
* IMPORTANT, and the opposite of what you might expect: text does NOT inherit.
|
|
28048
|
+
* Every entry must carry its own `headline`, `body` AND `description`, and all of
|
|
28049
|
+
* them must be DISTINCT from each other and from the ad's top-level copy. Meta
|
|
28050
|
+
* deduplicates identical strings inside the asset feed, so two locales sharing a
|
|
28051
|
+
* string collapse into one asset and the create fails with a misleading "Too few
|
|
28052
|
+
* ... texts provided in asset creation" (subcode 1885817) that names a field which
|
|
28053
|
+
* is actually present. We validate this before calling Meta and return a 400
|
|
28054
|
+
* naming the offending locale and field. `description` is therefore effectively
|
|
28055
|
+
* required on the ad whenever `translations` is present, even though it is
|
|
28056
|
+
* optional otherwise.
|
|
28057
|
+
*
|
|
28058
|
+
* Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate
|
|
28059
|
+
* with "The language asset feed includes an unsupported targeting field"
|
|
28060
|
+
* (subcode 1885985).
|
|
28061
|
+
*
|
|
28062
|
+
* Media DOES inherit and is uploaded once when shared. Note that Meta enforces
|
|
28063
|
+
* Dynamic Creative image dimensions on language feeds, so an `imageUrl` that
|
|
28064
|
+
* works on a normal ad may be rejected with "The following images have invalid
|
|
28065
|
+
* dimensions for Dynamic Creative" (subcode 1885558). Video is not affected.
|
|
28037
28066
|
*
|
|
28038
28067
|
* Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
28039
28068
|
* `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
@@ -28045,17 +28074,17 @@ export type CreateStandaloneAdData = {
|
|
|
28045
28074
|
*/
|
|
28046
28075
|
locale: string;
|
|
28047
28076
|
/**
|
|
28048
|
-
* Headline for this language.
|
|
28077
|
+
* Headline for this language. REQUIRED, and must differ from every other locale and from the ad's top-level headline.
|
|
28049
28078
|
*/
|
|
28050
|
-
headline
|
|
28079
|
+
headline: string;
|
|
28051
28080
|
/**
|
|
28052
|
-
* Primary text for this language.
|
|
28081
|
+
* Primary text for this language. REQUIRED, and must differ from every other locale and from the ad's top-level body.
|
|
28053
28082
|
*/
|
|
28054
|
-
body
|
|
28083
|
+
body: string;
|
|
28055
28084
|
/**
|
|
28056
|
-
* Link description for this language.
|
|
28085
|
+
* Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
|
|
28057
28086
|
*/
|
|
28058
|
-
description
|
|
28087
|
+
description: string;
|
|
28059
28088
|
/**
|
|
28060
28089
|
* Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
28061
28090
|
*/
|