@getlatedev/node 0.2.913 → 0.2.915

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.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.913",
39
+ version: "0.2.915",
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: "@getlatedev/node",
8
- version: "0.2.913",
8
+ version: "0.2.915",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.913",
3
+ "version": "0.2.915",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -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
- key: string;
7728
- name?: string;
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
- key: string;
7735
- name?: string;
7736
- /**
7737
- * 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.
7738
- */
7739
- radius?: number;
7740
- /**
7741
- * Required if radius is set.
7742
- */
7743
- distanceUnit?: 'mile' | 'kilometer';
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
  */
@@ -15968,6 +15980,12 @@ export type GetConnectUrlData = {
15968
15980
  * requested Google scopes that were not granted. Ask the user to connect again and keep every
15969
15981
  * permission checked.
15970
15982
  *
15983
+ * `no_youtube_channel` means Google authorized the account but it has no YouTube channel we can
15984
+ * connect. It always comes with `is_user_fixable=true` and an `error_message`. The usual causes: the
15985
+ * user picked their personal Google identity instead of the Brand Account in Google's account
15986
+ * chooser, they only have YouTube Studio access (not Brand Account owner or manager), or the
15987
+ * account has no channel yet.
15988
+ *
15971
15989
  * This list is NOT exhaustive and new values may be added at any time. Treat an unrecognized
15972
15990
  * value as a generic failure rather than matching it exhaustively. Existing values are not
15973
15991
  * renamed or removed without notice.
@@ -15985,7 +16003,7 @@ export type GetConnectUrlData = {
15985
16003
  * Destination selection:
15986
16004
  * no_facebook_pages, facebook_pages_error, no_google_locations, google_locations_error,
15987
16005
  * google_permission_denied, no_snapchat_public_profiles, snapchat_profiles_error,
15988
- * discord_no_guild, slack_no_team
16006
+ * no_youtube_channel, discord_no_guild, slack_no_team
15989
16007
  *
15990
16008
  * WhatsApp:
15991
16009
  * whatsapp_error, one_whatsapp_per_profile, whatsapp_number_already_connected,
@@ -35253,6 +35271,10 @@ export type CreateAdCampaignData = {
35253
35271
  budgetAmount?: number;
35254
35272
  budgetType?: 'daily' | 'lifetime';
35255
35273
  status?: 'ACTIVE' | 'PAUSED';
35274
+ /**
35275
+ * Google only (400 elsewhere). Written on the new campaign.
35276
+ */
35277
+ locationTargetingType?: (GoogleLocationTargetingType);
35256
35278
  /**
35257
35279
  * 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
35280
  */
@@ -35874,6 +35896,10 @@ export type GetCampaignTargetingResponse = ({
35874
35896
  id?: string;
35875
35897
  name?: string;
35876
35898
  }>;
35899
+ /**
35900
+ * Who the location targeting reaches, see GoogleLocationTargetingType. Null when Google reports a legacy value (SEARCH_INTEREST) this API does not set.
35901
+ */
35902
+ locationTargetingType?: ('presence' | 'presence_or_interest') | null;
35877
35903
  /**
35878
35904
  * When this targeting was fetched from Google. Null when it was never served from cache.
35879
35905
  */
@@ -35907,27 +35933,28 @@ export type UpdateCampaignTargetingData = {
35907
35933
  */
35908
35934
  locations?: (Array<(string)> | {
35909
35935
  countries?: Array<(string)>;
35910
- regions?: Array<{
35911
- key: string;
35912
- name?: string;
35913
- }>;
35914
- cities?: Array<{
35915
- key: string;
35916
- name?: string;
35917
- }>;
35918
- zips?: Array<{
35919
- key: string;
35920
- name?: string;
35921
- }>;
35922
- metros?: Array<{
35923
- key: string;
35924
- name?: string;
35925
- }>;
35936
+ regions?: Array<(string | {
35937
+ key: string;
35938
+ name?: string;
35939
+ })>;
35940
+ cities?: Array<(string | {
35941
+ key: string;
35942
+ name?: string;
35943
+ })>;
35944
+ zips?: Array<(string | {
35945
+ key: string;
35946
+ name?: string;
35947
+ })>;
35948
+ metros?: Array<(string | {
35949
+ key: string;
35950
+ name?: string;
35951
+ })>;
35926
35952
  });
35927
35953
  /**
35928
35954
  * Google's language codes (ISO 639-1, plus variants such as `zh_CN`), e.g. ["en", "de"].
35929
35955
  */
35930
35956
  languages?: Array<(string)>;
35957
+ locationTargetingType?: GoogleLocationTargetingType;
35931
35958
  };
35932
35959
  };
35933
35960
  path: {
@@ -35943,7 +35970,11 @@ export type UpdateCampaignTargetingResponse = ({
35943
35970
  /**
35944
35971
  * Which targeting fields were applied.
35945
35972
  */
35946
- updated?: Array<('devices' | 'locations' | 'languages')>;
35973
+ updated?: Array<('devices' | 'locations' | 'languages' | 'locationTargetingType')>;
35974
+ /**
35975
+ * The value read back from Google after the edit.
35976
+ */
35977
+ locationTargetingType?: ('presence' | 'presence_or_interest') | null;
35947
35978
  devices?: Array<{
35948
35979
  device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
35949
35980
  included?: boolean;
@@ -40378,6 +40409,10 @@ export type BoostPostData = {
40378
40409
  */
40379
40410
  advantage_audience?: 0 | 1;
40380
40411
  };
40412
+ /**
40413
+ * Google only (400 elsewhere). Written on the campaign the boost creates.
40414
+ */
40415
+ locationTargetingType?: (GoogleLocationTargetingType);
40381
40416
  /**
40382
40417
  * Meta only. A Meta-native targeting spec (e.g.
40383
40418
  * `{ "geo_locations": { "cities": [{ "key": "...", "radius": 15, "distance_unit": "kilometer" }] } }`).
@@ -41050,35 +41085,35 @@ export type CreateStandaloneAdData = {
41050
41085
  */
41051
41086
  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
41087
  /**
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).
41088
+ * 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
41089
  *
41055
41090
  * 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
41091
  *
41057
41092
  */
41058
- cities?: Array<{
41059
- /**
41060
- * Meta city ID, from /v1/ads/targeting/search results.
41061
- */
41062
- key: string;
41063
- /**
41064
- * 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).
41065
- */
41066
- radius?: number;
41067
- /**
41068
- * Unit for radius. Required if radius is set.
41069
- */
41070
- distance_unit?: 'mile' | 'kilometer';
41071
- }>;
41093
+ cities?: Array<(string | {
41094
+ /**
41095
+ * City id from /v1/ads/targeting/search results (Meta city key, Google geo target constant id, TikTok location id).
41096
+ */
41097
+ key: string;
41098
+ /**
41099
+ * 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).
41100
+ */
41101
+ radius?: number;
41102
+ /**
41103
+ * Unit for radius. Required if radius is set.
41104
+ */
41105
+ distance_unit?: 'mile' | 'kilometer';
41106
+ })>;
41072
41107
  /**
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>`.
41108
+ * 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
41109
  *
41075
41110
  */
41076
- regions?: Array<{
41077
- /**
41078
- * Platform region ID, from /v1/ads/targeting/search results.
41079
- */
41080
- key: string;
41081
- }>;
41111
+ regions?: Array<(string | {
41112
+ /**
41113
+ * Platform region ID, from /v1/ads/targeting/search results.
41114
+ */
41115
+ key: string;
41116
+ })>;
41082
41117
  ageMin?: number;
41083
41118
  ageMax?: number;
41084
41119
  /**
@@ -41091,17 +41126,17 @@ export type CreateStandaloneAdData = {
41091
41126
  /**
41092
41127
  * 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
41128
  */
41094
- zips?: Array<{
41095
- key: string;
41096
- name?: string;
41097
- }>;
41129
+ zips?: Array<(string | {
41130
+ key: string;
41131
+ name?: string;
41132
+ })>;
41098
41133
  /**
41099
41134
  * 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
41135
  */
41101
- metros?: Array<{
41102
- key: string;
41103
- name?: string;
41104
- }>;
41136
+ metros?: Array<(string | {
41137
+ key: string;
41138
+ name?: string;
41139
+ })>;
41105
41140
  /**
41106
41141
  * Point-radius (lat/lng) geo targeting. Meta only (custom_locations). Rejected on platforms without radius support.
41107
41142
  */
@@ -41523,6 +41558,10 @@ export type CreateStandaloneAdData = {
41523
41558
  * Google only. Performance Max requires assetGroup and is always created PAUSED.
41524
41559
  */
41525
41560
  campaignType?: 'display' | 'search' | 'pmax';
41561
+ /**
41562
+ * 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.
41563
+ */
41564
+ locationTargetingType?: (GoogleLocationTargetingType);
41526
41565
  assetGroup?: GooglePmaxAssetGroupInput;
41527
41566
  /**
41528
41567
  * 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.