@zernio/node 0.2.98 → 0.2.100
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 +2 -2
- package/dist/index.d.mts +196 -14
- package/dist/index.d.ts +196 -14
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +28 -43
- package/src/generated/types.gen.ts +196 -13
|
@@ -117,9 +117,39 @@ export type Ad = {
|
|
|
117
117
|
*/
|
|
118
118
|
optimizationGoal?: (string) | null;
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
120
|
+
* Ad-set bid strategy (overrides campaign level on Meta). Populated for Meta and
|
|
121
|
+
* TikTok. TikTok's native `bid_type` is normalized to the cross-platform Meta enum:
|
|
122
|
+
* `BID_TYPE_NO_BID` -> `LOWEST_COST_WITHOUT_CAP`, `BID_TYPE_CUSTOM` ->
|
|
123
|
+
* `LOWEST_COST_WITH_BID_CAP`, deep_bid_type=MIN_ROAS or roas_bid>0 ->
|
|
124
|
+
* `LOWEST_COST_WITH_MIN_ROAS`, `BID_TYPE_MAX_CONVERSION` -> `LOWEST_COST_WITHOUT_CAP`.
|
|
125
|
+
*
|
|
126
|
+
*/
|
|
127
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
128
|
+
/**
|
|
129
|
+
* Bid cap in WHOLE currency units of the ad account (USD: 5 = $5.00; JPY: 100 = ¥100).
|
|
130
|
+
* Populated when bidStrategy is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. `null` for
|
|
131
|
+
* auto-bid (`LOWEST_COST_WITHOUT_CAP`).
|
|
132
|
+
*
|
|
133
|
+
* - Meta source: `bid_amount` on the ad set (smallest-denomination int, decoded here).
|
|
134
|
+
* - TikTok source: priority order `bid_price` -> `conversion_bid_price` -> `deep_cpa_bid`
|
|
135
|
+
* (whichever is set on the ad group). TikTok stores all three in whole currency units.
|
|
136
|
+
*
|
|
137
|
+
* Source: facebook-business-sdk-codegen api_specs/specs/AdSet.json (`bid_amount`).
|
|
138
|
+
*
|
|
139
|
+
*/
|
|
140
|
+
bidAmount?: (number) | null;
|
|
141
|
+
/**
|
|
142
|
+
* Minimum ROAS as a decimal multiplier (2.0 = 2.0x ROAS). Populated when bidStrategy
|
|
143
|
+
* is `LOWEST_COST_WITH_MIN_ROAS`.
|
|
144
|
+
*
|
|
145
|
+
* - Meta source: decoded from `bid_constraints.roas_average_floor` (Meta stores as
|
|
146
|
+
* fixed-point int × 10000; we return the decimal).
|
|
147
|
+
* - TikTok source: `roas_bid` on the ad group (already a decimal).
|
|
148
|
+
*
|
|
149
|
+
* Source: facebook-business-sdk-codegen api_specs/specs/AdCampaignBidConstraint.json.
|
|
150
|
+
*
|
|
121
151
|
*/
|
|
122
|
-
|
|
152
|
+
roasAverageFloor?: (number) | null;
|
|
123
153
|
/**
|
|
124
154
|
* Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
|
|
125
155
|
*/
|
|
@@ -286,9 +316,17 @@ export type AdCampaign = {
|
|
|
286
316
|
*/
|
|
287
317
|
optimizationGoal?: (string) | null;
|
|
288
318
|
/**
|
|
289
|
-
* Campaign-level bid strategy
|
|
319
|
+
* Campaign-level bid strategy. Ad sets inherit this unless they override.
|
|
290
320
|
*/
|
|
291
|
-
bidStrategy?: (
|
|
321
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
322
|
+
/**
|
|
323
|
+
* Representative bid cap from the top-spending ad set (whole currency units). Populated when bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP.
|
|
324
|
+
*/
|
|
325
|
+
bidAmount?: (number) | null;
|
|
326
|
+
/**
|
|
327
|
+
* Representative ROAS floor from the top-spending ad set. Decimal multiplier (2.0 = 2.0x).
|
|
328
|
+
*/
|
|
329
|
+
roasAverageFloor?: (number) | null;
|
|
292
330
|
/**
|
|
293
331
|
* Meta promoted object at campaign level (conversion event details)
|
|
294
332
|
*/
|
|
@@ -398,7 +436,15 @@ export type AdTreeAdSet = {
|
|
|
398
436
|
/**
|
|
399
437
|
* Bid strategy for this ad set (overrides campaign level when set)
|
|
400
438
|
*/
|
|
401
|
-
bidStrategy?: (
|
|
439
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
440
|
+
/**
|
|
441
|
+
* Bid cap in whole currency units. Populated when bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP.
|
|
442
|
+
*/
|
|
443
|
+
bidAmount?: (number) | null;
|
|
444
|
+
/**
|
|
445
|
+
* Minimum ROAS as a decimal multiplier (2.0 = 2.0x). Populated when bidStrategy is LOWEST_COST_WITH_MIN_ROAS.
|
|
446
|
+
*/
|
|
447
|
+
roasAverageFloor?: (number) | null;
|
|
402
448
|
/**
|
|
403
449
|
* Meta promoted object for this ad set (conversion event details)
|
|
404
450
|
*/
|
|
@@ -488,9 +534,17 @@ export type AdTreeCampaign = {
|
|
|
488
534
|
*/
|
|
489
535
|
optimizationGoal?: (string) | null;
|
|
490
536
|
/**
|
|
491
|
-
* Campaign-level bid strategy
|
|
537
|
+
* Campaign-level bid strategy. Ad sets inherit this unless they override.
|
|
538
|
+
*/
|
|
539
|
+
bidStrategy?: ((BidStrategy) | null);
|
|
540
|
+
/**
|
|
541
|
+
* 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
542
|
*/
|
|
493
|
-
|
|
543
|
+
bidAmount?: (number) | null;
|
|
544
|
+
/**
|
|
545
|
+
* Representative ROAS floor for the campaign — bubbled up from the top-spending ad set. Decimal multiplier (2.0 = 2.0x).
|
|
546
|
+
*/
|
|
547
|
+
roasAverageFloor?: (number) | null;
|
|
494
548
|
/**
|
|
495
549
|
* Meta promoted object at campaign level (conversion event details)
|
|
496
550
|
*/
|
|
@@ -659,6 +713,18 @@ export type scope = 'full' | 'profiles';
|
|
|
659
713
|
*/
|
|
660
714
|
export type permission = 'read-write' | 'read';
|
|
661
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Meta bid strategy. Same enum applies at campaign and ad-set level; ad-set value (when set)
|
|
718
|
+
* overrides campaign-level. Cross-field rules:
|
|
719
|
+
* - `LOWEST_COST_WITHOUT_CAP` (default): auto-bid, forbids `bidAmount` and `roasAverageFloor`.
|
|
720
|
+
* - `LOWEST_COST_WITH_BID_CAP` / `COST_CAP`: require `bidAmount` (whole currency units).
|
|
721
|
+
* - `LOWEST_COST_WITH_MIN_ROAS`: requires `roasAverageFloor` (decimal multiplier, 2.0 = 2.0x).
|
|
722
|
+
* Source: facebook-business-sdk-codegen api_specs/specs/enum_types.json (`AdSet_bid_strategy`,
|
|
723
|
+
* `Campaign_bid_strategy`).
|
|
724
|
+
*
|
|
725
|
+
*/
|
|
726
|
+
export type BidStrategy = 'LOWEST_COST_WITHOUT_CAP' | 'LOWEST_COST_WITH_BID_CAP' | 'COST_CAP' | 'LOWEST_COST_WITH_MIN_ROAS';
|
|
727
|
+
|
|
662
728
|
/**
|
|
663
729
|
* 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
730
|
*
|
|
@@ -6026,6 +6092,9 @@ export type GetGoogleBusinessLocationDetailsData = {
|
|
|
6026
6092
|
locationId?: string;
|
|
6027
6093
|
/**
|
|
6028
6094
|
* Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, serviceItems, profile, openInfo, metadata, moreHours.
|
|
6095
|
+
* `title` and `metadata` are always included in the response so the `location` summary block can be populated, even if you omit them here.
|
|
6096
|
+
* Note: `location` is a derived response field, not a Google readMask value, passing it returns 400.
|
|
6097
|
+
*
|
|
6029
6098
|
*/
|
|
6030
6099
|
readMask?: string;
|
|
6031
6100
|
};
|
|
@@ -6035,6 +6104,36 @@ export type GetGoogleBusinessLocationDetailsResponse = ({
|
|
|
6035
6104
|
success?: boolean;
|
|
6036
6105
|
accountId?: string;
|
|
6037
6106
|
locationId?: string;
|
|
6107
|
+
/**
|
|
6108
|
+
* Compact public-facing summary derived from Google's `metadata`. Useful
|
|
6109
|
+
* for surfacing the "leave a review" URL (e.g. behind a QR code) without
|
|
6110
|
+
* parsing the raw block. Always populated regardless of readMask.
|
|
6111
|
+
* For unverified or new locations Google omits placeId/reviewUrl/mapsUri,
|
|
6112
|
+
* so those return as null and `isVerified` is false.
|
|
6113
|
+
*
|
|
6114
|
+
*/
|
|
6115
|
+
location?: {
|
|
6116
|
+
/**
|
|
6117
|
+
* Business name as set in GBP
|
|
6118
|
+
*/
|
|
6119
|
+
name?: (string) | null;
|
|
6120
|
+
/**
|
|
6121
|
+
* Google Maps Place ID for this location
|
|
6122
|
+
*/
|
|
6123
|
+
placeId?: (string) | null;
|
|
6124
|
+
/**
|
|
6125
|
+
* Public "write a review" URL Google generates for this place
|
|
6126
|
+
*/
|
|
6127
|
+
reviewUrl?: (string) | null;
|
|
6128
|
+
/**
|
|
6129
|
+
* Public Google Maps URL for this location
|
|
6130
|
+
*/
|
|
6131
|
+
mapsUri?: (string) | null;
|
|
6132
|
+
/**
|
|
6133
|
+
* True when the location has Voice of Merchant (verified + live on Google)
|
|
6134
|
+
*/
|
|
6135
|
+
isVerified?: boolean;
|
|
6136
|
+
} | null;
|
|
6038
6137
|
/**
|
|
6039
6138
|
* Business name
|
|
6040
6139
|
*/
|
|
@@ -12561,13 +12660,17 @@ export type UpdateAdCampaignStatusError = (unknown | {
|
|
|
12561
12660
|
export type UpdateAdCampaignData = {
|
|
12562
12661
|
body: {
|
|
12563
12662
|
platform: 'facebook' | 'instagram';
|
|
12564
|
-
budget
|
|
12663
|
+
budget?: {
|
|
12565
12664
|
/**
|
|
12566
12665
|
* Budget amount in the ad account's currency
|
|
12567
12666
|
*/
|
|
12568
12667
|
amount: number;
|
|
12569
12668
|
type: 'daily' | 'lifetime';
|
|
12570
12669
|
};
|
|
12670
|
+
/**
|
|
12671
|
+
* Campaign-level default. Ad sets inherit this unless they override.
|
|
12672
|
+
*/
|
|
12673
|
+
bidStrategy?: (BidStrategy);
|
|
12571
12674
|
};
|
|
12572
12675
|
path: {
|
|
12573
12676
|
/**
|
|
@@ -12581,6 +12684,7 @@ export type UpdateAdCampaignResponse = ({
|
|
|
12581
12684
|
updated?: number;
|
|
12582
12685
|
budget?: AdBudget;
|
|
12583
12686
|
budgetLevel?: 'campaign';
|
|
12687
|
+
bidStrategy?: BidStrategy;
|
|
12584
12688
|
});
|
|
12585
12689
|
|
|
12586
12690
|
export type UpdateAdCampaignError = (unknown | {
|
|
@@ -12692,16 +12796,38 @@ export type UpdateAdSetData = {
|
|
|
12692
12796
|
body: {
|
|
12693
12797
|
platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter';
|
|
12694
12798
|
/**
|
|
12695
|
-
* Omit if
|
|
12799
|
+
* Omit if not updating budget
|
|
12696
12800
|
*/
|
|
12697
12801
|
budget?: {
|
|
12698
12802
|
amount?: number;
|
|
12699
12803
|
type?: 'daily' | 'lifetime';
|
|
12700
12804
|
};
|
|
12701
12805
|
/**
|
|
12702
|
-
* Omit if
|
|
12806
|
+
* Omit if not toggling delivery state
|
|
12703
12807
|
*/
|
|
12704
12808
|
status?: 'active' | 'paused';
|
|
12809
|
+
/**
|
|
12810
|
+
* Ad-set-level bid strategy. Overrides the campaign-level default.
|
|
12811
|
+
* Supported on Meta (facebook, instagram) and TikTok. On TikTok the
|
|
12812
|
+
* Meta-style enum is mapped to bid_type / bid_price / deep_bid_type
|
|
12813
|
+
* automatically. Other platforms (linkedin, pinterest, google, twitter)
|
|
12814
|
+
* return 501 Not Implemented when bidStrategy is set.
|
|
12815
|
+
*
|
|
12816
|
+
*/
|
|
12817
|
+
bidStrategy?: (BidStrategy);
|
|
12818
|
+
/**
|
|
12819
|
+
* Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
|
|
12820
|
+
* bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Internally converted to Meta's
|
|
12821
|
+
* smallest-denomination integer.
|
|
12822
|
+
*
|
|
12823
|
+
*/
|
|
12824
|
+
bidAmount?: number;
|
|
12825
|
+
/**
|
|
12826
|
+
* Minimum ROAS as a decimal multiplier (2.0 = 2.0x). Required when bidStrategy is
|
|
12827
|
+
* LOWEST_COST_WITH_MIN_ROAS. Sent to Meta as `bid_constraints.roas_average_floor` × 10000.
|
|
12828
|
+
*
|
|
12829
|
+
*/
|
|
12830
|
+
roasAverageFloor?: number;
|
|
12705
12831
|
};
|
|
12706
12832
|
path: {
|
|
12707
12833
|
/**
|
|
@@ -12717,6 +12843,9 @@ export type UpdateAdSetResponse = ({
|
|
|
12717
12843
|
status?: 'active' | 'paused';
|
|
12718
12844
|
statusUpdated?: number;
|
|
12719
12845
|
statusSkipped?: number;
|
|
12846
|
+
bidStrategy?: BidStrategy;
|
|
12847
|
+
bidAmount?: (number) | null;
|
|
12848
|
+
roasAverageFloor?: (number) | null;
|
|
12720
12849
|
});
|
|
12721
12850
|
|
|
12722
12851
|
export type UpdateAdSetError = (unknown | {
|
|
@@ -13052,9 +13181,25 @@ export type BoostPostData = {
|
|
|
13052
13181
|
advantage_audience?: 0 | 1;
|
|
13053
13182
|
};
|
|
13054
13183
|
/**
|
|
13055
|
-
*
|
|
13184
|
+
* Meta bid strategy applied to the ad set. On TikTok, mapped to
|
|
13185
|
+
* `bid_type` / `bid_price` / `deep_bid_type` automatically.
|
|
13186
|
+
*
|
|
13187
|
+
*/
|
|
13188
|
+
bidStrategy?: (BidStrategy);
|
|
13189
|
+
/**
|
|
13190
|
+
* Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
|
|
13191
|
+
* `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. Backward-compat: providing
|
|
13192
|
+
* `bidAmount` without `bidStrategy` is treated as `LOWEST_COST_WITH_BID_CAP`.
|
|
13193
|
+
*
|
|
13056
13194
|
*/
|
|
13057
13195
|
bidAmount?: number;
|
|
13196
|
+
/**
|
|
13197
|
+
* Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when
|
|
13198
|
+
* `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as
|
|
13199
|
+
* `bid_constraints.roas_average_floor` × 10000 (Meta uses fixed-point integers).
|
|
13200
|
+
*
|
|
13201
|
+
*/
|
|
13202
|
+
roasAverageFloor?: number;
|
|
13058
13203
|
/**
|
|
13059
13204
|
* Meta only. Tracking specs (pixel, URL tags).
|
|
13060
13205
|
*/
|
|
@@ -13066,6 +13211,24 @@ export type BoostPostData = {
|
|
|
13066
13211
|
* Meta only. Required for housing, employment, credit, or political ads.
|
|
13067
13212
|
*/
|
|
13068
13213
|
specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS')>;
|
|
13214
|
+
/**
|
|
13215
|
+
* TikTok-only. Custom destination URL for the Spark Ad. Without this, TikTok
|
|
13216
|
+
* Spark Ads have no clickable destination — required for traffic / conversion
|
|
13217
|
+
* objectives. Maps to `landing_page_url` on the creative entry of /v2/ad/create/
|
|
13218
|
+
* (TikTok SDK `AdcreateCreatives.landing_page_url`). Ignored on Meta / LinkedIn /
|
|
13219
|
+
* Pinterest / X / Google (those infer the destination from the boosted post).
|
|
13220
|
+
*
|
|
13221
|
+
*/
|
|
13222
|
+
linkUrl?: string;
|
|
13223
|
+
/**
|
|
13224
|
+
* TikTok-only. Call-to-action button label on the Spark Ad creative (e.g.
|
|
13225
|
+
* `LEARN_MORE`, `SHOP_NOW`, `DOWNLOAD_NOW`, `SIGN_UP`, `WATCH_NOW`). Maps to
|
|
13226
|
+
* `call_to_action` on the creative entry of /v2/ad/create/. Pass-through —
|
|
13227
|
+
* the platform validates the value. See TikTok's "Enumeration - Call-to-Action"
|
|
13228
|
+
* reference for the full list.
|
|
13229
|
+
*
|
|
13230
|
+
*/
|
|
13231
|
+
callToAction?: string;
|
|
13069
13232
|
/**
|
|
13070
13233
|
* Name of the legal entity benefiting from the ad.
|
|
13071
13234
|
* Required by Meta when targeting EU users (DSA Article 26).
|
|
@@ -13187,8 +13350,11 @@ export type CreateStandaloneAdData = {
|
|
|
13187
13350
|
/**
|
|
13188
13351
|
* Meta-only. When present, switches to the attach shape: adds
|
|
13189
13352
|
* one new ad to this existing ad set without creating a new
|
|
13190
|
-
* campaign. Budget, targeting, goal,
|
|
13191
|
-
* from the ad set on Meta
|
|
13353
|
+
* campaign. Budget, targeting, goal, schedule, AND bid strategy
|
|
13354
|
+
* are inherited from the ad set on Meta — passing `bidStrategy`
|
|
13355
|
+
* in attach mode returns 400. To change an existing ad set's
|
|
13356
|
+
* bid, use `PUT /v1/ads/ad-sets/{adSetId}`. Mutually exclusive
|
|
13357
|
+
* with `creatives[]`.
|
|
13192
13358
|
*
|
|
13193
13359
|
*/
|
|
13194
13360
|
adSetId?: string;
|
|
@@ -13242,6 +13408,23 @@ export type CreateStandaloneAdData = {
|
|
|
13242
13408
|
* Meta only. Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Ignored by non-Meta platforms.
|
|
13243
13409
|
*/
|
|
13244
13410
|
gender?: 'all' | 'male' | 'female';
|
|
13411
|
+
/**
|
|
13412
|
+
* Meta bid strategy applied to the ad set.
|
|
13413
|
+
*/
|
|
13414
|
+
bidStrategy?: (BidStrategy);
|
|
13415
|
+
/**
|
|
13416
|
+
* Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when
|
|
13417
|
+
* `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`.
|
|
13418
|
+
*
|
|
13419
|
+
*/
|
|
13420
|
+
bidAmount?: number;
|
|
13421
|
+
/**
|
|
13422
|
+
* Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when
|
|
13423
|
+
* `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as
|
|
13424
|
+
* `bid_constraints.roas_average_floor` × 10000.
|
|
13425
|
+
*
|
|
13426
|
+
*/
|
|
13427
|
+
roasAverageFloor?: number;
|
|
13245
13428
|
/**
|
|
13246
13429
|
* Name of the legal entity benefiting from the ad.
|
|
13247
13430
|
* Required by Meta when targeting EU users (DSA Article 26).
|