@getlatedev/node 0.2.912 → 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.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.912",
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: "@getlatedev/node",
8
- version: "0.2.912",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.912",
3
+ "version": "0.2.914",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4315,10 +4315,17 @@ export const listInboxComments = <ThrowOnError extends boolean = false>(options?
4315
4315
  * Get post comments
4316
4316
  * Fetch comments for a specific post. Requires accountId query parameter.
4317
4317
  *
4318
- * On Facebook, passing a COMMENT id as `postId` is also supported and returns that
4319
- * comment's replies instead of the post's top-level comments. Instagram does not support
4320
- * this and returns 400: its replies come nested in each comment's `replies` array, with no
4321
- * separate paging. YouTube does not support it either, `postId` must be a video id.
4318
+ * Pass `commentId` (Facebook, Instagram, Reddit, TikTok) to fetch replies to a specific
4319
+ * comment instead of the post's top-level comments. Facebook, Instagram and TikTok return
4320
+ * the comment's replies, paged by `limit`/`cursor`; Reddit returns the focused comment
4321
+ * thread instead. On Facebook and Instagram the requested comment itself comes back in the
4322
+ * top-level `comment` field.
4323
+ *
4324
+ * On Facebook, passing a COMMENT id as `postId` (instead of using `commentId`) is also
4325
+ * supported for backwards compatibility and returns that comment's replies the same way.
4326
+ * Prefer `commentId` for new integrations; it also works on Instagram, which rejects a
4327
+ * comment id passed as `postId`. YouTube does not support either form, `postId` must be a
4328
+ * video id.
4322
4329
  *
4323
4330
  * Responses are cached for up to 10 minutes, so a page may lag new comments by that
4324
4331
  * window. Do not poll this endpoint for real-time updates: subscribe to the
@@ -9002,7 +9009,7 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
9002
9009
  * Edit a Google campaign's device, location, or language targeting
9003
9010
  * Google Ads compliance row M.10: geo and language targeting set at
9004
9011
  * creation must stay editable afterwards. Send at least one of `devices`,
9005
- * `locations`, `languages`; each provided field REPLACES that field's
9012
+ * `locations`, `languages`, `locationTargetingType`; each provided field REPLACES that field's
9006
9013
  * existing criteria on the campaign (a full set, not a delta). Fields left
9007
9014
  * out of the body are untouched. Google only; every other platform returns
9008
9015
  * 501.
@@ -9025,6 +9032,11 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
9025
9032
  * `languages` is an array of Google's language codes (ISO 639-1, plus variants
9026
9033
  * such as `zh_CN`); an unknown code returns 400.
9027
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
+ *
9028
9040
  * The response includes the refreshed `devices`/`locations`/`languages` state
9029
9041
  * read back from Google after the edit, and invalidates the cached copy
9030
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
  */
@@ -24498,14 +24510,14 @@ export type ListInboxCommentsError = ({
24498
24510
  export type GetInboxPostCommentsData = {
24499
24511
  path: {
24500
24512
  /**
24501
- * Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook, a comment ID is also accepted here and returns that comment's replies (not supported on Instagram).
24513
+ * Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook, a comment ID is also accepted here and returns that comment's replies, kept for backwards compatibility; prefer the `commentId` query parameter, which also works on Instagram.
24502
24514
  */
24503
24515
  postId: string;
24504
24516
  };
24505
24517
  query: {
24506
24518
  accountId: string;
24507
24519
  /**
24508
- * (Reddit and TikTok only) Get replies to a specific comment
24520
+ * (Facebook, Instagram, Reddit and TikTok) Get replies to a specific comment. On Facebook and Instagram, the requested comment is returned in the top-level `comment` field and comments[] holds its replies.
24509
24521
  */
24510
24522
  commentId?: string;
24511
24523
  /**
@@ -24557,7 +24569,7 @@ export type GetInboxPostCommentsResponse = ({
24557
24569
  [key: string]: unknown;
24558
24570
  }>;
24559
24571
  /**
24560
- * Facebook only. True when replies[] (capped at 10) does not hold the comment's full reply thread; fetch the rest by passing the comment id as postId to GET /v1/inbox/comments/{postId}. Absent (not false) on every other platform, including Instagram, which has no equivalent signal.
24572
+ * Facebook only. True when replies[] (capped at 10) does not hold the comment's full reply thread; fetch the rest by passing the comment id as the `commentId` query parameter to GET /v1/inbox/comments/{postId} (or, for backwards compatibility, as `postId`). Absent (not false) on every other platform, including Instagram, which has no equivalent signal.
24561
24573
  */
24562
24574
  repliesHasMore?: boolean;
24563
24575
  canReply?: boolean;
@@ -24656,6 +24668,15 @@ export type GetInboxPostCommentsResponse = ({
24656
24668
  */
24657
24669
  isGallery?: boolean;
24658
24670
  } | null;
24671
+ /**
24672
+ * (Facebook and Instagram only) Present when `commentId` was passed: the requested
24673
+ * comment itself, in the same shape as an entry in comments[]. comments[] then holds
24674
+ * that comment's replies instead of the post's top-level comments.
24675
+ *
24676
+ */
24677
+ comment?: {
24678
+ [key: string]: unknown;
24679
+ };
24659
24680
  pagination?: {
24660
24681
  hasMore?: boolean;
24661
24682
  /**
@@ -35244,6 +35265,10 @@ export type CreateAdCampaignData = {
35244
35265
  budgetAmount?: number;
35245
35266
  budgetType?: 'daily' | 'lifetime';
35246
35267
  status?: 'ACTIVE' | 'PAUSED';
35268
+ /**
35269
+ * Google only (400 elsewhere). Written on the new campaign.
35270
+ */
35271
+ locationTargetingType?: (GoogleLocationTargetingType);
35247
35272
  /**
35248
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.
35249
35274
  */
@@ -35865,6 +35890,10 @@ export type GetCampaignTargetingResponse = ({
35865
35890
  id?: string;
35866
35891
  name?: string;
35867
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;
35868
35897
  /**
35869
35898
  * When this targeting was fetched from Google. Null when it was never served from cache.
35870
35899
  */
@@ -35898,27 +35927,28 @@ export type UpdateCampaignTargetingData = {
35898
35927
  */
35899
35928
  locations?: (Array<(string)> | {
35900
35929
  countries?: Array<(string)>;
35901
- regions?: Array<{
35902
- key: string;
35903
- name?: string;
35904
- }>;
35905
- cities?: Array<{
35906
- key: string;
35907
- name?: string;
35908
- }>;
35909
- zips?: Array<{
35910
- key: string;
35911
- name?: string;
35912
- }>;
35913
- metros?: Array<{
35914
- key: string;
35915
- name?: string;
35916
- }>;
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
+ })>;
35917
35946
  });
35918
35947
  /**
35919
35948
  * Google's language codes (ISO 639-1, plus variants such as `zh_CN`), e.g. ["en", "de"].
35920
35949
  */
35921
35950
  languages?: Array<(string)>;
35951
+ locationTargetingType?: GoogleLocationTargetingType;
35922
35952
  };
35923
35953
  };
35924
35954
  path: {
@@ -35934,7 +35964,11 @@ export type UpdateCampaignTargetingResponse = ({
35934
35964
  /**
35935
35965
  * Which targeting fields were applied.
35936
35966
  */
35937
- 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;
35938
35972
  devices?: Array<{
35939
35973
  device?: 'MOBILE' | 'DESKTOP' | 'TABLET' | 'CONNECTED_TV';
35940
35974
  included?: boolean;
@@ -40369,6 +40403,10 @@ export type BoostPostData = {
40369
40403
  */
40370
40404
  advantage_audience?: 0 | 1;
40371
40405
  };
40406
+ /**
40407
+ * Google only (400 elsewhere). Written on the campaign the boost creates.
40408
+ */
40409
+ locationTargetingType?: (GoogleLocationTargetingType);
40372
40410
  /**
40373
40411
  * Meta only. A Meta-native targeting spec (e.g.
40374
40412
  * `{ "geo_locations": { "cities": [{ "key": "...", "radius": 15, "distance_unit": "kilometer" }] } }`).
@@ -41041,35 +41079,35 @@ export type CreateStandaloneAdData = {
41041
41079
  */
41042
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')>;
41043
41081
  /**
41044
- * 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).
41045
41083
  *
41046
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`.
41047
41085
  *
41048
41086
  */
41049
- cities?: Array<{
41050
- /**
41051
- * Meta city ID, from /v1/ads/targeting/search results.
41052
- */
41053
- key: string;
41054
- /**
41055
- * 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).
41056
- */
41057
- radius?: number;
41058
- /**
41059
- * Unit for radius. Required if radius is set.
41060
- */
41061
- distance_unit?: 'mile' | 'kilometer';
41062
- }>;
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
+ })>;
41063
41101
  /**
41064
- * 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.
41065
41103
  *
41066
41104
  */
41067
- regions?: Array<{
41068
- /**
41069
- * Platform region ID, from /v1/ads/targeting/search results.
41070
- */
41071
- key: string;
41072
- }>;
41105
+ regions?: Array<(string | {
41106
+ /**
41107
+ * Platform region ID, from /v1/ads/targeting/search results.
41108
+ */
41109
+ key: string;
41110
+ })>;
41073
41111
  ageMin?: number;
41074
41112
  ageMax?: number;
41075
41113
  /**
@@ -41082,17 +41120,17 @@ export type CreateStandaloneAdData = {
41082
41120
  /**
41083
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.
41084
41122
  */
41085
- zips?: Array<{
41086
- key: string;
41087
- name?: string;
41088
- }>;
41123
+ zips?: Array<(string | {
41124
+ key: string;
41125
+ name?: string;
41126
+ })>;
41089
41127
  /**
41090
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).
41091
41129
  */
41092
- metros?: Array<{
41093
- key: string;
41094
- name?: string;
41095
- }>;
41130
+ metros?: Array<(string | {
41131
+ key: string;
41132
+ name?: string;
41133
+ })>;
41096
41134
  /**
41097
41135
  * Point-radius (lat/lng) geo targeting. Meta only (custom_locations). Rejected on platforms without radius support.
41098
41136
  */
@@ -41514,6 +41552,10 @@ export type CreateStandaloneAdData = {
41514
41552
  * Google only. Performance Max requires assetGroup and is always created PAUSED.
41515
41553
  */
41516
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);
41517
41559
  assetGroup?: GooglePmaxAssetGroupInput;
41518
41560
  /**
41519
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.