@zernio/node 0.2.913 → 0.2.914
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 +59 -27
- package/dist/index.d.ts +59 -27
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +6 -1
- package/src/generated/types.gen.ts +98 -65
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.914",
|
|
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.914",
|
|
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
|
@@ -9009,7 +9009,7 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
|
|
|
9009
9009
|
* Edit a Google campaign's device, location, or language targeting
|
|
9010
9010
|
* Google Ads compliance row M.10: geo and language targeting set at
|
|
9011
9011
|
* creation must stay editable afterwards. Send at least one of `devices`,
|
|
9012
|
-
* `locations`, `languages`; each provided field REPLACES that field's
|
|
9012
|
+
* `locations`, `languages`, `locationTargetingType`; each provided field REPLACES that field's
|
|
9013
9013
|
* existing criteria on the campaign (a full set, not a delta). Fields left
|
|
9014
9014
|
* out of the body are untouched. Google only; every other platform returns
|
|
9015
9015
|
* 501.
|
|
@@ -9032,6 +9032,11 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
|
|
|
9032
9032
|
* `languages` is an array of Google's language codes (ISO 639-1, plus variants
|
|
9033
9033
|
* such as `zh_CN`); an unknown code returns 400.
|
|
9034
9034
|
*
|
|
9035
|
+
* `locationTargetingType` switches who the location targeting reaches:
|
|
9036
|
+
* `presence` (people in or regularly in the locations) or `presence_or_interest`
|
|
9037
|
+
* (also people searching for or interested in them). Example:
|
|
9038
|
+
* `{ "platform": "google", "targeting": { "locationTargetingType": "presence" } }`.
|
|
9039
|
+
*
|
|
9035
9040
|
* The response includes the refreshed `devices`/`locations`/`languages` state
|
|
9036
9041
|
* read back from Google after the edit, and invalidates the cached copy
|
|
9037
9042
|
* `GET` on this campaign would otherwise keep serving.
|
|
@@ -4830,6 +4830,18 @@ export type GoogleBusinessReview = {
|
|
|
4830
4830
|
*/
|
|
4831
4831
|
export type starRating = 'ONE' | 'TWO' | 'THREE' | 'FOUR' | 'FIVE';
|
|
4832
4832
|
|
|
4833
|
+
/**
|
|
4834
|
+
* Google only. Who a campaign's location targeting reaches (Google's
|
|
4835
|
+
* `campaign.geo_target_type_setting.positive_geo_target_type`).
|
|
4836
|
+
* `presence`: people in, or regularly in, the targeted locations.
|
|
4837
|
+
* `presence_or_interest`: also people searching for or showing interest in them.
|
|
4838
|
+
* Omitted leaves Google's default, `presence_or_interest`. Accepted on Search,
|
|
4839
|
+
* Display and Performance Max campaigns. Excluded locations always use presence
|
|
4840
|
+
* (Google refuses presence_or_interest for exclusions on these campaign types).
|
|
4841
|
+
*
|
|
4842
|
+
*/
|
|
4843
|
+
export type GoogleLocationTargetingType = 'presence' | 'presence_or_interest';
|
|
4844
|
+
|
|
4833
4845
|
export type GooglePmaxAssetGroup = {
|
|
4834
4846
|
id: string;
|
|
4835
4847
|
resourceName: string;
|
|
@@ -7721,27 +7733,27 @@ export type TargetingSpec = {
|
|
|
7721
7733
|
*/
|
|
7722
7734
|
countries?: Array<(string)>;
|
|
7723
7735
|
/**
|
|
7724
|
-
* Region/state targeting. `key` is the platform location ID from /v1/ads/targeting/search?dimension=geo&geoType=region.
|
|
7736
|
+
* Region/state targeting. `key` is the platform location ID from /v1/ads/targeting/search?dimension=geo&geoType=region. An entry may also be that id as a plain string (`"20321"` is `{ key: "20321" }`).
|
|
7725
7737
|
*/
|
|
7726
|
-
regions?: Array<{
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7738
|
+
regions?: Array<(string | {
|
|
7739
|
+
key: string;
|
|
7740
|
+
name?: string;
|
|
7741
|
+
})>;
|
|
7730
7742
|
/**
|
|
7731
|
-
* City targeting. Optional `radius` + `distanceUnit` extend beyond the city limits; both must be set together or both omitted. `radius` is only honoured on platforms whose capability map allows city radius (Meta).
|
|
7743
|
+
* City targeting. Optional `radius` + `distanceUnit` extend beyond the city limits; both must be set together or both omitted. `radius` is only honoured on platforms whose capability map allows city radius (Meta). An entry may also be the city id as a plain string (`"1006410"` is `{ key: "1006410" }`).
|
|
7732
7744
|
*/
|
|
7733
|
-
cities?: Array<{
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
+
cities?: Array<(string | {
|
|
7746
|
+
key: string;
|
|
7747
|
+
name?: string;
|
|
7748
|
+
/**
|
|
7749
|
+
* Radius around the city. Requires distanceUnit. Meta enforces a minimum city radius (~17 km / 10 mi); smaller values resolve to a 0-size audience and the ad fails at launch. For a tighter catchment use customLocations (lat/lng), which allows a smaller radius.
|
|
7750
|
+
*/
|
|
7751
|
+
radius?: number;
|
|
7752
|
+
/**
|
|
7753
|
+
* Required if radius is set.
|
|
7754
|
+
*/
|
|
7755
|
+
distanceUnit?: 'mile' | 'kilometer';
|
|
7756
|
+
})>;
|
|
7745
7757
|
/**
|
|
7746
7758
|
* Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`). Supported on Meta, Google, TikTok, Pinterest, X.
|
|
7747
7759
|
*/
|
|
@@ -35253,6 +35265,10 @@ export type CreateAdCampaignData = {
|
|
|
35253
35265
|
budgetAmount?: number;
|
|
35254
35266
|
budgetType?: 'daily' | 'lifetime';
|
|
35255
35267
|
status?: 'ACTIVE' | 'PAUSED';
|
|
35268
|
+
/**
|
|
35269
|
+
* Google only (400 elsewhere). Written on the new campaign.
|
|
35270
|
+
*/
|
|
35271
|
+
locationTargetingType?: (GoogleLocationTargetingType);
|
|
35256
35272
|
/**
|
|
35257
35273
|
* 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 on Meta, set the strategy there instead. On Google: LOWEST_COST_WITHOUT_CAP = Maximize Conversions, COST_CAP + bidAmount = Target CPA, LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS, LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling; portfolioBidStrategyId attaches a portfolio strategy instead.
|
|
35258
35274
|
*/
|
|
@@ -35874,6 +35890,10 @@ export type GetCampaignTargetingResponse = ({
|
|
|
35874
35890
|
id?: string;
|
|
35875
35891
|
name?: string;
|
|
35876
35892
|
}>;
|
|
35893
|
+
/**
|
|
35894
|
+
* Who the location targeting reaches, see GoogleLocationTargetingType. Null when Google reports a legacy value (SEARCH_INTEREST) this API does not set.
|
|
35895
|
+
*/
|
|
35896
|
+
locationTargetingType?: ('presence' | 'presence_or_interest') | null;
|
|
35877
35897
|
/**
|
|
35878
35898
|
* When this targeting was fetched from Google. Null when it was never served from cache.
|
|
35879
35899
|
*/
|
|
@@ -35907,27 +35927,28 @@ export type UpdateCampaignTargetingData = {
|
|
|
35907
35927
|
*/
|
|
35908
35928
|
locations?: (Array<(string)> | {
|
|
35909
35929
|
countries?: Array<(string)>;
|
|
35910
|
-
regions?: Array<{
|
|
35911
|
-
|
|
35912
|
-
|
|
35913
|
-
|
|
35914
|
-
cities?: Array<{
|
|
35915
|
-
|
|
35916
|
-
|
|
35917
|
-
|
|
35918
|
-
zips?: Array<{
|
|
35919
|
-
|
|
35920
|
-
|
|
35921
|
-
|
|
35922
|
-
metros?: Array<{
|
|
35923
|
-
|
|
35924
|
-
|
|
35925
|
-
|
|
35930
|
+
regions?: Array<(string | {
|
|
35931
|
+
key: string;
|
|
35932
|
+
name?: string;
|
|
35933
|
+
})>;
|
|
35934
|
+
cities?: Array<(string | {
|
|
35935
|
+
key: string;
|
|
35936
|
+
name?: string;
|
|
35937
|
+
})>;
|
|
35938
|
+
zips?: Array<(string | {
|
|
35939
|
+
key: string;
|
|
35940
|
+
name?: string;
|
|
35941
|
+
})>;
|
|
35942
|
+
metros?: Array<(string | {
|
|
35943
|
+
key: string;
|
|
35944
|
+
name?: string;
|
|
35945
|
+
})>;
|
|
35926
35946
|
});
|
|
35927
35947
|
/**
|
|
35928
35948
|
* Google's language codes (ISO 639-1, plus variants such as `zh_CN`), e.g. ["en", "de"].
|
|
35929
35949
|
*/
|
|
35930
35950
|
languages?: Array<(string)>;
|
|
35951
|
+
locationTargetingType?: GoogleLocationTargetingType;
|
|
35931
35952
|
};
|
|
35932
35953
|
};
|
|
35933
35954
|
path: {
|
|
@@ -35943,7 +35964,11 @@ export type UpdateCampaignTargetingResponse = ({
|
|
|
35943
35964
|
/**
|
|
35944
35965
|
* Which targeting fields were applied.
|
|
35945
35966
|
*/
|
|
35946
|
-
updated?: Array<('devices' | 'locations' | 'languages')>;
|
|
35967
|
+
updated?: Array<('devices' | 'locations' | 'languages' | 'locationTargetingType')>;
|
|
35968
|
+
/**
|
|
35969
|
+
* The value read back from Google after the edit.
|
|
35970
|
+
*/
|
|
35971
|
+
locationTargetingType?: ('presence' | 'presence_or_interest') | null;
|
|
35947
35972
|
devices?: Array<{
|
|
35948
35973
|
device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
|
|
35949
35974
|
included?: boolean;
|
|
@@ -40378,6 +40403,10 @@ export type BoostPostData = {
|
|
|
40378
40403
|
*/
|
|
40379
40404
|
advantage_audience?: 0 | 1;
|
|
40380
40405
|
};
|
|
40406
|
+
/**
|
|
40407
|
+
* Google only (400 elsewhere). Written on the campaign the boost creates.
|
|
40408
|
+
*/
|
|
40409
|
+
locationTargetingType?: (GoogleLocationTargetingType);
|
|
40381
40410
|
/**
|
|
40382
40411
|
* Meta only. A Meta-native targeting spec (e.g.
|
|
40383
40412
|
* `{ "geo_locations": { "cities": [{ "key": "...", "radius": 15, "distance_unit": "kilometer" }] } }`).
|
|
@@ -41050,35 +41079,35 @@ export type CreateStandaloneAdData = {
|
|
|
41050
41079
|
*/
|
|
41051
41080
|
countryGroups?: Array<('africa' | 'asia' | 'europe' | 'north_america' | 'south_america' | 'oceania' | 'central_america' | 'caribbean' | 'eea' | 'euro_area' | 'nafta' | 'mercosur' | 'afta' | 'apec' | 'gcc' | 'cisfta' | 'emerging_markets' | 'itunes_app_store' | 'android_free_store' | 'android_paid_store')>;
|
|
41052
41081
|
/**
|
|
41053
|
-
* City-level geo targeting (Meta and TikTok). Each city is targeted by the platform's opaque `key` (the city ID) which can be looked up via `GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>`. Optional `radius` + `distance_unit` (Meta only) extend the targeting beyond the city limits (e.g. radius 25 km around the city center). Both must be set together, or both omitted (Meta defaults to ~16 km when omitted).
|
|
41082
|
+
* City-level geo targeting (Meta, Google and TikTok). An entry is either `{ key }` or the key alone as a plain string (`["1006410"]`). Each city is targeted by the platform's opaque `key` (the city ID) which can be looked up via `GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>`. Optional `radius` + `distance_unit` (Meta only) extend the targeting beyond the city limits (e.g. radius 25 km around the city center). Both must be set together, or both omitted (Meta defaults to ~16 km when omitted).
|
|
41054
41083
|
*
|
|
41055
41084
|
* On Meta, cannot overlap with the same country in `countries` (Meta returns a "locations overlap" error). Either drop the country or scope it to a different country. On TikTok, keys are numeric location ids and can be sent without `countries`.
|
|
41056
41085
|
*
|
|
41057
41086
|
*/
|
|
41058
|
-
cities?: Array<{
|
|
41059
|
-
|
|
41060
|
-
|
|
41061
|
-
|
|
41062
|
-
|
|
41063
|
-
|
|
41064
|
-
|
|
41065
|
-
|
|
41066
|
-
|
|
41067
|
-
|
|
41068
|
-
|
|
41069
|
-
|
|
41070
|
-
|
|
41071
|
-
|
|
41087
|
+
cities?: Array<(string | {
|
|
41088
|
+
/**
|
|
41089
|
+
* City id from /v1/ads/targeting/search results (Meta city key, Google geo target constant id, TikTok location id).
|
|
41090
|
+
*/
|
|
41091
|
+
key: string;
|
|
41092
|
+
/**
|
|
41093
|
+
* Optional radius around the city. Must be set together with distance_unit. Meta enforces a minimum city radius (~17 km / 10 mi); smaller values resolve to a 0-size audience and the ad fails at launch. For a tighter catchment use customLocations (lat/lng).
|
|
41094
|
+
*/
|
|
41095
|
+
radius?: number;
|
|
41096
|
+
/**
|
|
41097
|
+
* Unit for radius. Required if radius is set.
|
|
41098
|
+
*/
|
|
41099
|
+
distance_unit?: 'mile' | 'kilometer';
|
|
41100
|
+
})>;
|
|
41072
41101
|
/**
|
|
41073
|
-
* Region-level (state/province) geo targeting (Meta and TikTok). Each region is targeted by the platform's opaque `key` (the region ID) which can be looked up via `GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>`.
|
|
41102
|
+
* Region-level (state/province) geo targeting (Meta, Google and TikTok). Each region is targeted by the platform's opaque `key` (the region ID) which can be looked up via `GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>`. An entry may also be the key alone as a plain string.
|
|
41074
41103
|
*
|
|
41075
41104
|
*/
|
|
41076
|
-
regions?: Array<{
|
|
41077
|
-
|
|
41078
|
-
|
|
41079
|
-
|
|
41080
|
-
|
|
41081
|
-
|
|
41105
|
+
regions?: Array<(string | {
|
|
41106
|
+
/**
|
|
41107
|
+
* Platform region ID, from /v1/ads/targeting/search results.
|
|
41108
|
+
*/
|
|
41109
|
+
key: string;
|
|
41110
|
+
})>;
|
|
41082
41111
|
ageMin?: number;
|
|
41083
41112
|
ageMax?: number;
|
|
41084
41113
|
/**
|
|
@@ -41091,17 +41120,17 @@ export type CreateStandaloneAdData = {
|
|
|
41091
41120
|
/**
|
|
41092
41121
|
* Postal/ZIP geo targeting. `key` is the platform's postal location ID from /v1/ads/targeting/search?dimension=geo&geoType=zip. Supported on Meta, Google, TikTok, Pinterest, X.
|
|
41093
41122
|
*/
|
|
41094
|
-
zips?: Array<{
|
|
41095
|
-
|
|
41096
|
-
|
|
41097
|
-
|
|
41123
|
+
zips?: Array<(string | {
|
|
41124
|
+
key: string;
|
|
41125
|
+
name?: string;
|
|
41126
|
+
})>;
|
|
41098
41127
|
/**
|
|
41099
41128
|
* DMA / metro-area geo targeting (Meta and TikTok). `key` is the platform's metro ID from /v1/ads/targeting/search?dimension=geo&geoType=metro (TikTok metros appear as type `metro`, e.g. the New York DMA).
|
|
41100
41129
|
*/
|
|
41101
|
-
metros?: Array<{
|
|
41102
|
-
|
|
41103
|
-
|
|
41104
|
-
|
|
41130
|
+
metros?: Array<(string | {
|
|
41131
|
+
key: string;
|
|
41132
|
+
name?: string;
|
|
41133
|
+
})>;
|
|
41105
41134
|
/**
|
|
41106
41135
|
* Point-radius (lat/lng) geo targeting. Meta only (custom_locations). Rejected on platforms without radius support.
|
|
41107
41136
|
*/
|
|
@@ -41523,6 +41552,10 @@ export type CreateStandaloneAdData = {
|
|
|
41523
41552
|
* Google only. Performance Max requires assetGroup and is always created PAUSED.
|
|
41524
41553
|
*/
|
|
41525
41554
|
campaignType?: 'display' | 'search' | 'pmax';
|
|
41555
|
+
/**
|
|
41556
|
+
* Google only (400 elsewhere). Set on the new campaign; a request that joins an existing campaign (`existingCampaignId` or `adSetId`) returns 400, change that campaign with PUT /v1/ads/campaigns/{campaignId}/targeting instead. `presence` reaches only people in or regularly in the targeted locations.
|
|
41557
|
+
*/
|
|
41558
|
+
locationTargetingType?: (GoogleLocationTargetingType);
|
|
41526
41559
|
assetGroup?: GooglePmaxAssetGroupInput;
|
|
41527
41560
|
/**
|
|
41528
41561
|
* Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /v1/ads/{adId} targeting.keywords.
|