@zernio/node 0.2.99 → 0.2.101
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/README.md +4 -2
- package/dist/index.d.mts +301 -21
- package/dist/index.d.ts +301 -21
- package/dist/index.js +14 -0
- package/dist/index.mjs +14 -0
- package/package.json +1 -1
- package/src/client.ts +4 -0
- package/src/generated/sdk.gen.ts +91 -17
- package/src/generated/types.gen.ts +306 -20
|
@@ -117,9 +117,56 @@ export type Ad = {
|
|
|
117
117
|
*/
|
|
118
118
|
optimizationGoal?: (string) | null;
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
120
|
+
* Human-readable advertiser/account name (Meta `AdAccount.name`, TikTok
|
|
121
|
+
* `advertiser_name`, LinkedIn / X / Pinterest equivalents). Refreshed every
|
|
122
|
+
* sync so platform-side renames propagate within one cycle. `null` when the
|
|
123
|
+
* platform doesn't return a name or the sync hasn't run yet.
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
platformAdAccountName?: (string) | null;
|
|
127
|
+
/**
|
|
128
|
+
* Platform-reported creation timestamp (Meta `created_time`, TikTok `create_time`).
|
|
129
|
+
* Distinct from `createdAt` which reflects when Zernio first synced the doc — for
|
|
130
|
+
* sort/filter by "when the ad was actually created on the platform", read this field.
|
|
131
|
+
* `null` for legacy ads synced before this field was added; aggregations fall back
|
|
132
|
+
* to `createdAt` in that case.
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
platformCreatedAt?: (string) | null;
|
|
136
|
+
/**
|
|
137
|
+
* Ad-set bid strategy (overrides campaign level on Meta). Populated for Meta and
|
|
138
|
+
* TikTok. TikTok's native `bid_type` is normalized to the cross-platform Meta enum:
|
|
139
|
+
* `BID_TYPE_NO_BID` -> `LOWEST_COST_WITHOUT_CAP`, `BID_TYPE_CUSTOM` ->
|
|
140
|
+
* `LOWEST_COST_WITH_BID_CAP`, deep_bid_type=MIN_ROAS or roas_bid>0 ->
|
|
141
|
+
* `LOWEST_COST_WITH_MIN_ROAS`, `BID_TYPE_MAX_CONVERSION` -> `LOWEST_COST_WITHOUT_CAP`.
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
145
|
+
/**
|
|
146
|
+
* Bid cap in WHOLE currency units of the ad account (USD: 5 = $5.00; JPY: 100 = ¥100).
|
|
147
|
+
* Populated when bidStrategy is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. `null` for
|
|
148
|
+
* auto-bid (`LOWEST_COST_WITHOUT_CAP`).
|
|
149
|
+
*
|
|
150
|
+
* - Meta source: `bid_amount` on the ad set (smallest-denomination int, decoded here).
|
|
151
|
+
* - TikTok source: priority order `bid_price` -> `conversion_bid_price` -> `deep_cpa_bid`
|
|
152
|
+
* (whichever is set on the ad group). TikTok stores all three in whole currency units.
|
|
153
|
+
*
|
|
154
|
+
* Source: facebook-business-sdk-codegen api_specs/specs/AdSet.json (`bid_amount`).
|
|
155
|
+
*
|
|
121
156
|
*/
|
|
122
|
-
|
|
157
|
+
bidAmount?: (number) | null;
|
|
158
|
+
/**
|
|
159
|
+
* Minimum ROAS as a decimal multiplier (2.0 = 2.0x ROAS). Populated when bidStrategy
|
|
160
|
+
* is `LOWEST_COST_WITH_MIN_ROAS`.
|
|
161
|
+
*
|
|
162
|
+
* - Meta source: decoded from `bid_constraints.roas_average_floor` (Meta stores as
|
|
163
|
+
* fixed-point int × 10000; we return the decimal).
|
|
164
|
+
* - TikTok source: `roas_bid` on the ad group (already a decimal).
|
|
165
|
+
*
|
|
166
|
+
* Source: facebook-business-sdk-codegen api_specs/specs/AdCampaignBidConstraint.json.
|
|
167
|
+
*
|
|
168
|
+
*/
|
|
169
|
+
roasAverageFloor?: (number) | null;
|
|
123
170
|
/**
|
|
124
171
|
* Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
|
|
125
172
|
*/
|
|
@@ -275,6 +322,10 @@ export type AdCampaign = {
|
|
|
275
322
|
currency?: (string) | null;
|
|
276
323
|
metrics?: AdMetrics;
|
|
277
324
|
platformAdAccountId?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Human-readable advertiser/account name from the platform. Refreshed on every sync.
|
|
327
|
+
*/
|
|
328
|
+
platformAdAccountName?: (string) | null;
|
|
278
329
|
accountId?: string;
|
|
279
330
|
profileId?: string;
|
|
280
331
|
/**
|
|
@@ -286,9 +337,17 @@ export type AdCampaign = {
|
|
|
286
337
|
*/
|
|
287
338
|
optimizationGoal?: (string) | null;
|
|
288
339
|
/**
|
|
289
|
-
* Campaign-level bid strategy
|
|
340
|
+
* Campaign-level bid strategy. Ad sets inherit this unless they override.
|
|
341
|
+
*/
|
|
342
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
343
|
+
/**
|
|
344
|
+
* Representative bid cap from the top-spending ad set (whole currency units). Populated when bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP.
|
|
345
|
+
*/
|
|
346
|
+
bidAmount?: (number) | null;
|
|
347
|
+
/**
|
|
348
|
+
* Representative ROAS floor from the top-spending ad set. Decimal multiplier (2.0 = 2.0x).
|
|
290
349
|
*/
|
|
291
|
-
|
|
350
|
+
roasAverageFloor?: (number) | null;
|
|
292
351
|
/**
|
|
293
352
|
* Meta promoted object at campaign level (conversion event details)
|
|
294
353
|
*/
|
|
@@ -398,7 +457,15 @@ export type AdTreeAdSet = {
|
|
|
398
457
|
/**
|
|
399
458
|
* Bid strategy for this ad set (overrides campaign level when set)
|
|
400
459
|
*/
|
|
401
|
-
bidStrategy?: (
|
|
460
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
461
|
+
/**
|
|
462
|
+
* Bid cap in whole currency units. Populated when bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP.
|
|
463
|
+
*/
|
|
464
|
+
bidAmount?: (number) | null;
|
|
465
|
+
/**
|
|
466
|
+
* Minimum ROAS as a decimal multiplier (2.0 = 2.0x). Populated when bidStrategy is LOWEST_COST_WITH_MIN_ROAS.
|
|
467
|
+
*/
|
|
468
|
+
roasAverageFloor?: (number) | null;
|
|
402
469
|
/**
|
|
403
470
|
* Meta promoted object for this ad set (conversion event details)
|
|
404
471
|
*/
|
|
@@ -477,6 +544,10 @@ export type AdTreeCampaign = {
|
|
|
477
544
|
currency?: (string) | null;
|
|
478
545
|
metrics?: AdMetrics;
|
|
479
546
|
platformAdAccountId?: string;
|
|
547
|
+
/**
|
|
548
|
+
* Human-readable advertiser/account name from the platform. Refreshed on every sync.
|
|
549
|
+
*/
|
|
550
|
+
platformAdAccountName?: (string) | null;
|
|
480
551
|
accountId?: string;
|
|
481
552
|
profileId?: string;
|
|
482
553
|
/**
|
|
@@ -488,9 +559,17 @@ export type AdTreeCampaign = {
|
|
|
488
559
|
*/
|
|
489
560
|
optimizationGoal?: (string) | null;
|
|
490
561
|
/**
|
|
491
|
-
* Campaign-level bid strategy
|
|
562
|
+
* Campaign-level bid strategy. Ad sets inherit this unless they override.
|
|
563
|
+
*/
|
|
564
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
565
|
+
/**
|
|
566
|
+
* Representative bid cap for the campaign — bubbled up from the top-spending ad set's `bid_amount` (whole currency units). Populated when the ad-set bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP.
|
|
492
567
|
*/
|
|
493
|
-
|
|
568
|
+
bidAmount?: (number) | null;
|
|
569
|
+
/**
|
|
570
|
+
* Representative ROAS floor for the campaign — bubbled up from the top-spending ad set. Decimal multiplier (2.0 = 2.0x).
|
|
571
|
+
*/
|
|
572
|
+
roasAverageFloor?: (number) | null;
|
|
494
573
|
/**
|
|
495
574
|
* Meta promoted object at campaign level (conversion event details)
|
|
496
575
|
*/
|
|
@@ -659,6 +738,18 @@ export type scope = 'full' | 'profiles';
|
|
|
659
738
|
*/
|
|
660
739
|
export type permission = 'read-write' | 'read';
|
|
661
740
|
|
|
741
|
+
/**
|
|
742
|
+
* Meta bid strategy. Same enum applies at campaign and ad-set level; ad-set value (when set)
|
|
743
|
+
* overrides campaign-level. Cross-field rules:
|
|
744
|
+
* - `LOWEST_COST_WITHOUT_CAP` (default): auto-bid, forbids `bidAmount` and `roasAverageFloor`.
|
|
745
|
+
* - `LOWEST_COST_WITH_BID_CAP` / `COST_CAP`: require `bidAmount` (whole currency units).
|
|
746
|
+
* - `LOWEST_COST_WITH_MIN_ROAS`: requires `roasAverageFloor` (decimal multiplier, 2.0 = 2.0x).
|
|
747
|
+
* Source: facebook-business-sdk-codegen api_specs/specs/enum_types.json (`AdSet_bid_strategy`,
|
|
748
|
+
* `Campaign_bid_strategy`).
|
|
749
|
+
*
|
|
750
|
+
*/
|
|
751
|
+
export type BidStrategy = 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
752
|
+
|
|
662
753
|
/**
|
|
663
754
|
* Bluesky post settings. Supports text posts with up to 4 images or a single video. threadItems creates a reply chain (Bluesky thread). Images exceeding 1MB are automatically compressed. Alt text supported via mediaItem properties.
|
|
664
755
|
*
|
|
@@ -674,6 +765,27 @@ export type BlueskyPlatformData = {
|
|
|
674
765
|
}>;
|
|
675
766
|
};
|
|
676
767
|
|
|
768
|
+
/**
|
|
769
|
+
* TikTok Business Center entity. Returned by `GET /v1/ads/business-centers`. BCs are
|
|
770
|
+
* TikTok's agency container — one BC owns N advertisers (ad accounts). Most solo
|
|
771
|
+
* advertisers don't have one; the agency token uses BCs to roll up multi-client access.
|
|
772
|
+
*
|
|
773
|
+
*/
|
|
774
|
+
export type BusinessCenter = {
|
|
775
|
+
/**
|
|
776
|
+
* Business Center ID
|
|
777
|
+
*/
|
|
778
|
+
bcId?: string;
|
|
779
|
+
/**
|
|
780
|
+
* Display name set by the BC owner
|
|
781
|
+
*/
|
|
782
|
+
name?: string;
|
|
783
|
+
/**
|
|
784
|
+
* Number of advertisers (ad accounts) reachable under this BC for the calling token
|
|
785
|
+
*/
|
|
786
|
+
advertiserCount?: number;
|
|
787
|
+
};
|
|
788
|
+
|
|
677
789
|
/**
|
|
678
790
|
* A single conversion event to relay to the ad platform. All PII fields
|
|
679
791
|
* (email, phone, names) are hashed with SHA-256 server-side using each
|
|
@@ -6026,6 +6138,9 @@ export type GetGoogleBusinessLocationDetailsData = {
|
|
|
6026
6138
|
locationId?: string;
|
|
6027
6139
|
/**
|
|
6028
6140
|
* Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, serviceItems, profile, openInfo, metadata, moreHours.
|
|
6141
|
+
* `title` and `metadata` are always included in the response so the `location` summary block can be populated, even if you omit them here.
|
|
6142
|
+
* Note: `location` is a derived response field, not a Google readMask value, passing it returns 400.
|
|
6143
|
+
*
|
|
6029
6144
|
*/
|
|
6030
6145
|
readMask?: string;
|
|
6031
6146
|
};
|
|
@@ -6036,11 +6151,11 @@ export type GetGoogleBusinessLocationDetailsResponse = ({
|
|
|
6036
6151
|
accountId?: string;
|
|
6037
6152
|
locationId?: string;
|
|
6038
6153
|
/**
|
|
6039
|
-
* Compact public-facing summary derived from `metadata`. Useful
|
|
6040
|
-
* surfacing the "leave a review" URL (e.g. behind a QR code) without
|
|
6041
|
-
* parsing
|
|
6042
|
-
*
|
|
6043
|
-
*
|
|
6154
|
+
* Compact public-facing summary derived from Google's `metadata`. Useful
|
|
6155
|
+
* for surfacing the "leave a review" URL (e.g. behind a QR code) without
|
|
6156
|
+
* parsing the raw block. Always populated regardless of readMask.
|
|
6157
|
+
* For unverified or new locations Google omits placeId/reviewUrl/mapsUri,
|
|
6158
|
+
* so those return as null and `isVerified` is false.
|
|
6044
6159
|
*
|
|
6045
6160
|
*/
|
|
6046
6161
|
location?: {
|
|
@@ -12591,13 +12706,17 @@ export type UpdateAdCampaignStatusError = (unknown | {
|
|
|
12591
12706
|
export type UpdateAdCampaignData = {
|
|
12592
12707
|
body: {
|
|
12593
12708
|
platform: 'facebook' | 'instagram';
|
|
12594
|
-
budget
|
|
12709
|
+
budget?: {
|
|
12595
12710
|
/**
|
|
12596
12711
|
* Budget amount in the ad account's currency
|
|
12597
12712
|
*/
|
|
12598
12713
|
amount: number;
|
|
12599
12714
|
type: 'daily' | 'lifetime';
|
|
12600
12715
|
};
|
|
12716
|
+
/**
|
|
12717
|
+
* Campaign-level default. Ad sets inherit this unless they override.
|
|
12718
|
+
*/
|
|
12719
|
+
bidStrategy?: (BidStrategy);
|
|
12601
12720
|
};
|
|
12602
12721
|
path: {
|
|
12603
12722
|
/**
|
|
@@ -12611,6 +12730,7 @@ export type UpdateAdCampaignResponse = ({
|
|
|
12611
12730
|
updated?: number;
|
|
12612
12731
|
budget?: AdBudget;
|
|
12613
12732
|
budgetLevel?: 'campaign';
|
|
12733
|
+
bidStrategy?: BidStrategy;
|
|
12614
12734
|
});
|
|
12615
12735
|
|
|
12616
12736
|
export type UpdateAdCampaignError = (unknown | {
|
|
@@ -12673,7 +12793,7 @@ export type BulkUpdateAdCampaignStatusError = (unknown | {
|
|
|
12673
12793
|
|
|
12674
12794
|
export type DuplicateAdCampaignData = {
|
|
12675
12795
|
body: {
|
|
12676
|
-
platform: 'facebook' | 'instagram';
|
|
12796
|
+
platform: 'facebook' | 'instagram' | 'tiktok';
|
|
12677
12797
|
/**
|
|
12678
12798
|
* Copy child ad sets + ads + creatives + targeting
|
|
12679
12799
|
*/
|
|
@@ -12722,16 +12842,38 @@ export type UpdateAdSetData = {
|
|
|
12722
12842
|
body: {
|
|
12723
12843
|
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
12724
12844
|
/**
|
|
12725
|
-
* Omit if
|
|
12845
|
+
* Omit if not updating budget
|
|
12726
12846
|
*/
|
|
12727
12847
|
budget?: {
|
|
12728
12848
|
amount?: number;
|
|
12729
12849
|
type?: 'daily' | 'lifetime';
|
|
12730
12850
|
};
|
|
12731
12851
|
/**
|
|
12732
|
-
* Omit if
|
|
12852
|
+
* Omit if not toggling delivery state
|
|
12733
12853
|
*/
|
|
12734
12854
|
status?: 'active' | 'paused';
|
|
12855
|
+
/**
|
|
12856
|
+
* Ad-set-level bid strategy. Overrides the campaign-level default.
|
|
12857
|
+
* Supported on Meta (facebook, instagram) and TikTok. On TikTok the
|
|
12858
|
+
* Meta-style enum is mapped to bid_type / bid_price / deep_bid_type
|
|
12859
|
+
* automatically. Other platforms (linkedin, pinterest, google, twitter)
|
|
12860
|
+
* return 501 Not Implemented when bidStrategy is set.
|
|
12861
|
+
*
|
|
12862
|
+
*/
|
|
12863
|
+
bidStrategy?: (BidStrategy);
|
|
12864
|
+
/**
|
|
12865
|
+
* Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
|
|
12866
|
+
* bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
|
|
12867
|
+
* smallest-denomination integer.
|
|
12868
|
+
*
|
|
12869
|
+
*/
|
|
12870
|
+
bidAmount?: number;
|
|
12871
|
+
/**
|
|
12872
|
+
* Minimum ROAS as a decimal multiplier (2.0 = 2.0x). Required when bidStrategy is
|
|
12873
|
+
* LOWEST_COST_WITH_MIN_ROAS. Sent to Meta as `bid_constraints.roas_average_floor` × 10000.
|
|
12874
|
+
*
|
|
12875
|
+
*/
|
|
12876
|
+
roasAverageFloor?: number;
|
|
12735
12877
|
};
|
|
12736
12878
|
path: {
|
|
12737
12879
|
/**
|
|
@@ -12747,6 +12889,9 @@ export type UpdateAdSetResponse = ({
|
|
|
12747
12889
|
status?: 'active' | 'paused';
|
|
12748
12890
|
statusUpdated?: number;
|
|
12749
12891
|
statusSkipped?: number;
|
|
12892
|
+
bidStrategy?: BidStrategy;
|
|
12893
|
+
bidAmount?: (number) | null;
|
|
12894
|
+
roasAverageFloor?: (number) | null;
|
|
12750
12895
|
});
|
|
12751
12896
|
|
|
12752
12897
|
export type UpdateAdSetError = (unknown | {
|
|
@@ -12851,7 +12996,8 @@ export type UpdateAdData = {
|
|
|
12851
12996
|
type?: 'daily' | 'lifetime';
|
|
12852
12997
|
};
|
|
12853
12998
|
/**
|
|
12854
|
-
* Meta
|
|
12999
|
+
* Meta + TikTok only. Pinterest / X / LinkedIn / Google return 501.
|
|
13000
|
+
*
|
|
12855
13001
|
*/
|
|
12856
13002
|
targeting?: {
|
|
12857
13003
|
ageMin?: number;
|
|
@@ -12869,6 +13015,28 @@ export type UpdateAdData = {
|
|
|
12869
13015
|
*/
|
|
12870
13016
|
advantage_audience?: 0 | 1;
|
|
12871
13017
|
};
|
|
13018
|
+
/**
|
|
13019
|
+
* Replace the ad's creative. Meta + TikTok only.
|
|
13020
|
+
*
|
|
13021
|
+
* - **Meta**: requires `headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`. The
|
|
13022
|
+
* ad's existing creative is replaced via a new `/act_X/adcreatives` upload + ad
|
|
13023
|
+
* update. The old creative is retained on the ad account for historical reporting.
|
|
13024
|
+
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
13025
|
+
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
13026
|
+
* `landing_page_url`; `videoUrl` triggers a fresh upload.
|
|
13027
|
+
*
|
|
13028
|
+
*/
|
|
13029
|
+
creative?: {
|
|
13030
|
+
/**
|
|
13031
|
+
* Meta only
|
|
13032
|
+
*/
|
|
13033
|
+
headline?: string;
|
|
13034
|
+
body?: string;
|
|
13035
|
+
callToAction?: string;
|
|
13036
|
+
linkUrl?: string;
|
|
13037
|
+
imageUrl?: string;
|
|
13038
|
+
videoUrl?: string;
|
|
13039
|
+
};
|
|
12872
13040
|
name?: string;
|
|
12873
13041
|
};
|
|
12874
13042
|
path: {
|
|
@@ -12994,12 +13162,62 @@ export type GetAdCommentsError = (unknown | {
|
|
|
12994
13162
|
error?: string;
|
|
12995
13163
|
});
|
|
12996
13164
|
|
|
13165
|
+
export type ListAdsBusinessCentersData = {
|
|
13166
|
+
query: {
|
|
13167
|
+
/**
|
|
13168
|
+
* ID of the `tiktokads` (or parent `tiktok` posting) SocialAccount
|
|
13169
|
+
*/
|
|
13170
|
+
accountId: string;
|
|
13171
|
+
};
|
|
13172
|
+
};
|
|
13173
|
+
|
|
13174
|
+
export type ListAdsBusinessCentersResponse = ({
|
|
13175
|
+
businessCenters?: Array<BusinessCenter>;
|
|
13176
|
+
});
|
|
13177
|
+
|
|
13178
|
+
export type ListAdsBusinessCentersError = ({
|
|
13179
|
+
error?: string;
|
|
13180
|
+
} | unknown);
|
|
13181
|
+
|
|
13182
|
+
export type TriggerAdsInitialSyncData = {
|
|
13183
|
+
body: {
|
|
13184
|
+
/**
|
|
13185
|
+
* ID of the ads SocialAccount to re-sync (e.g. `metaads` / `tiktokads` doc).
|
|
13186
|
+
* Posting accounts (`facebook` / `tiktok`) are rejected — pass the ads-side
|
|
13187
|
+
* account ID that owns the platform tokens.
|
|
13188
|
+
*
|
|
13189
|
+
*/
|
|
13190
|
+
accountId: string;
|
|
13191
|
+
};
|
|
13192
|
+
};
|
|
13193
|
+
|
|
13194
|
+
export type TriggerAdsInitialSyncResponse = ({
|
|
13195
|
+
status?: 'queued' | 'already_queued';
|
|
13196
|
+
/**
|
|
13197
|
+
* Trace ID for the enqueued job. Reused on `already_queued`.
|
|
13198
|
+
*/
|
|
13199
|
+
traceId?: (string) | null;
|
|
13200
|
+
message?: string;
|
|
13201
|
+
});
|
|
13202
|
+
|
|
13203
|
+
export type TriggerAdsInitialSyncError = (unknown | {
|
|
13204
|
+
error?: string;
|
|
13205
|
+
});
|
|
13206
|
+
|
|
12997
13207
|
export type ListAdAccountsData = {
|
|
12998
13208
|
query: {
|
|
12999
13209
|
/**
|
|
13000
13210
|
* Social account ID
|
|
13001
13211
|
*/
|
|
13002
13212
|
accountId: string;
|
|
13213
|
+
/**
|
|
13214
|
+
* Filter response to a single platform ad account ID (e.g. `act_123` for Meta, advertiser_id for TikTok). Returns at most one item.
|
|
13215
|
+
*/
|
|
13216
|
+
adAccountId?: string;
|
|
13217
|
+
/**
|
|
13218
|
+
* Clamp the returned `accounts[]` length. Useful for typeahead pickers on agency tokens with hundreds of advertisers.
|
|
13219
|
+
*/
|
|
13220
|
+
limit?: number;
|
|
13003
13221
|
};
|
|
13004
13222
|
};
|
|
13005
13223
|
|
|
@@ -13082,9 +13300,25 @@ export type BoostPostData = {
|
|
|
13082
13300
|
advantage_audience?: 0 | 1;
|
|
13083
13301
|
};
|
|
13084
13302
|
/**
|
|
13085
|
-
*
|
|
13303
|
+
* Meta bid strategy applied to the ad set. On TikTok, mapped to
|
|
13304
|
+
* `bid_type` / `bid_price` / `deep_bid_type` automatically.
|
|
13305
|
+
*
|
|
13306
|
+
*/
|
|
13307
|
+
bidStrategy?: (BidStrategy);
|
|
13308
|
+
/**
|
|
13309
|
+
* Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
|
|
13310
|
+
* `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. Backward-compat: providing
|
|
13311
|
+
* `bidAmount` without `bidStrategy` is treated as `LOWEST_COST_WITH_BID_CAP`.
|
|
13312
|
+
*
|
|
13086
13313
|
*/
|
|
13087
13314
|
bidAmount?: number;
|
|
13315
|
+
/**
|
|
13316
|
+
* Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when
|
|
13317
|
+
* `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as
|
|
13318
|
+
* `bid_constraints.roas_average_floor` × 10000 (Meta uses fixed-point integers).
|
|
13319
|
+
*
|
|
13320
|
+
*/
|
|
13321
|
+
roasAverageFloor?: number;
|
|
13088
13322
|
/**
|
|
13089
13323
|
* Meta only. Tracking specs (pixel, URL tags).
|
|
13090
13324
|
*/
|
|
@@ -13096,6 +13330,34 @@ export type BoostPostData = {
|
|
|
13096
13330
|
* Meta only. Required for housing, employment, credit, or political ads.
|
|
13097
13331
|
*/
|
|
13098
13332
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS')>;
|
|
13333
|
+
/**
|
|
13334
|
+
* TikTok-only. Custom destination URL for the Spark Ad. Without this, TikTok
|
|
13335
|
+
* Spark Ads have no clickable destination — required for traffic / conversion
|
|
13336
|
+
* objectives. Maps to `landing_page_url` on the creative entry of /v2/ad/create/
|
|
13337
|
+
* (TikTok SDK `AdcreateCreatives.landing_page_url`). Ignored on Meta / LinkedIn /
|
|
13338
|
+
* Pinterest / X / Google (those infer the destination from the boosted post).
|
|
13339
|
+
*
|
|
13340
|
+
*/
|
|
13341
|
+
linkUrl?: string;
|
|
13342
|
+
/**
|
|
13343
|
+
* TikTok-only. Call-to-action button label on the Spark Ad creative (e.g.
|
|
13344
|
+
* `LEARN_MORE`, `SHOP_NOW`, `DOWNLOAD_NOW`, `SIGN_UP`, `WATCH_NOW`). Maps to
|
|
13345
|
+
* `call_to_action` on the creative entry of /v2/ad/create/. Pass-through —
|
|
13346
|
+
* the platform validates the value. See TikTok's "Enumeration - Call-to-Action"
|
|
13347
|
+
* reference for the full list.
|
|
13348
|
+
*
|
|
13349
|
+
*/
|
|
13350
|
+
callToAction?: string;
|
|
13351
|
+
/**
|
|
13352
|
+
* TikTok-only. Spark Code (creator's `auth_code`) authorizing cross-creator
|
|
13353
|
+
* Spark Ads — the advertiser can boost a video owned by a DIFFERENT TikTok
|
|
13354
|
+
* account. Without this, boosts are limited to videos owned by the same
|
|
13355
|
+
* account running the ads (same-BC creators only). The creator generates the
|
|
13356
|
+
* code in their TikTok app's Promote settings and shares it with the
|
|
13357
|
+
* advertiser. Maps to `auth_code` on the creative entry of /v2/ad/create/.
|
|
13358
|
+
*
|
|
13359
|
+
*/
|
|
13360
|
+
sparkAuthCode?: string;
|
|
13099
13361
|
/**
|
|
13100
13362
|
* Name of the legal entity benefiting from the ad.
|
|
13101
13363
|
* Required by Meta when targeting EU users (DSA Article 26).
|
|
@@ -13217,8 +13479,15 @@ export type CreateStandaloneAdData = {
|
|
|
13217
13479
|
/**
|
|
13218
13480
|
* Meta-only. When present, switches to the attach shape: adds
|
|
13219
13481
|
* one new ad to this existing ad set without creating a new
|
|
13220
|
-
* campaign. Budget, targeting, goal,
|
|
13221
|
-
* from the ad set on Meta
|
|
13482
|
+
* campaign. Budget, targeting, goal, schedule, AND bid strategy
|
|
13483
|
+
* are inherited from the ad set on Meta — passing `bidStrategy`
|
|
13484
|
+
* in attach mode returns 400. To change an existing ad set's
|
|
13485
|
+
* bid, use `PUT /v1/ads/ad-sets/{adSetId}`. Mutually exclusive
|
|
13486
|
+
* with `creatives[]`.
|
|
13487
|
+
*
|
|
13488
|
+
* Supported on Meta (facebook, instagram) and TikTok. On TikTok
|
|
13489
|
+
* the `adSetId` is the ad group ID; the new ad inherits the
|
|
13490
|
+
* ad group's bid + budget + targeting.
|
|
13222
13491
|
*
|
|
13223
13492
|
*/
|
|
13224
13493
|
adSetId?: string;
|
|
@@ -13272,6 +13541,23 @@ export type CreateStandaloneAdData = {
|
|
|
13272
13541
|
* Meta only. Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Ignored by non-Meta platforms.
|
|
13273
13542
|
*/
|
|
13274
13543
|
gender?: 'all' | 'male' | 'female';
|
|
13544
|
+
/**
|
|
13545
|
+
* Meta bid strategy applied to the ad set.
|
|
13546
|
+
*/
|
|
13547
|
+
bidStrategy?: (BidStrategy);
|
|
13548
|
+
/**
|
|
13549
|
+
* Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
|
|
13550
|
+
* `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`.
|
|
13551
|
+
*
|
|
13552
|
+
*/
|
|
13553
|
+
bidAmount?: number;
|
|
13554
|
+
/**
|
|
13555
|
+
* Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when
|
|
13556
|
+
* `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as
|
|
13557
|
+
* `bid_constraints.roas_average_floor` × 10000.
|
|
13558
|
+
*
|
|
13559
|
+
*/
|
|
13560
|
+
roasAverageFloor?: number;
|
|
13275
13561
|
/**
|
|
13276
13562
|
* Name of the legal entity benefiting from the ad.
|
|
13277
13563
|
* Required by Meta when targeting EU users (DSA Article 26).
|