@zernio/node 0.2.754 → 0.2.756

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 CHANGED
@@ -8245,19 +8245,19 @@ type TargetingSpec = {
8245
8245
  name?: string;
8246
8246
  }>;
8247
8247
  /**
8248
- * LinkedIn B2B only. Industry URN id fragments.
8248
+ * LinkedIn B2B only. Industry URN id fragments, or the full urn:li:industry:* URN from /v1/ads/targeting/search?dimension=industry.
8249
8249
  */
8250
8250
  industries?: Array<(string)>;
8251
8251
  /**
8252
- * LinkedIn B2B only.
8252
+ * LinkedIn B2B only. Single-letter size codes (A to I), or the full urn:li:staffCountRange:* URN from /v1/ads/targeting/search?dimension=companySize.
8253
8253
  */
8254
8254
  companySizes?: Array<(string)>;
8255
8255
  /**
8256
- * LinkedIn B2B only.
8256
+ * LinkedIn B2B only. Seniority URN id fragments, or the full urn:li:seniority:* URN from /v1/ads/targeting/search?dimension=seniority.
8257
8257
  */
8258
8258
  seniorities?: Array<(string)>;
8259
8259
  /**
8260
- * LinkedIn B2B only.
8260
+ * LinkedIn B2B only. Function URN id fragments, or the full urn:li:function:* URN from /v1/ads/targeting/search?dimension=jobFunction.
8261
8261
  */
8262
8262
  jobFunctions?: Array<(string)>;
8263
8263
  /**
@@ -33433,7 +33433,36 @@ type UpdateAdData = {
33433
33433
  })>;
33434
33434
  ageMin?: number;
33435
33435
  ageMax?: number;
33436
+ /**
33437
+ * ISO 3166-1 alpha-2 codes. On Google this is the FULL new country set for the campaign (same contract as `locations`); on LinkedIn it replaces the campaign's geo criteria.
33438
+ */
33436
33439
  countries?: Array<(string)>;
33440
+ /**
33441
+ * Google and LinkedIn. The FULL new location set for the campaign. Bare country-code array, or an object with countries/regions/cities/zips/metros key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Equivalent to the top-level geo fields; sending both returns 400. Empty returns 400, `customLocations` returns 422.
33442
+ */
33443
+ locations?: (Array<(string)> | {
33444
+ countries?: Array<(string)>;
33445
+ regions?: Array<{
33446
+ key: string;
33447
+ name?: string;
33448
+ }>;
33449
+ cities?: Array<{
33450
+ key: string;
33451
+ name?: string;
33452
+ }>;
33453
+ zips?: Array<{
33454
+ key: string;
33455
+ name?: string;
33456
+ }>;
33457
+ metros?: Array<{
33458
+ key: string;
33459
+ name?: string;
33460
+ }>;
33461
+ });
33462
+ /**
33463
+ * Google only. The FULL new language set for the campaign, as Google language codes (ISO 639-1, plus variants such as `zh_CN`). An unknown code returns 400.
33464
+ */
33465
+ languages?: Array<(string)>;
33437
33466
  /**
33438
33467
  * Interest objects from /v1/ads/interests. Each must include id and name.
33439
33468
  */
@@ -38310,9 +38339,9 @@ type SearchAdTargetingData = {
38310
38339
  */
38311
38340
  countryCode?: string;
38312
38341
  /**
38313
- * What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options, `language` resolves Google's targetable language_constant table (Google only), `workPosition`/`workEmployer`/`workIndustry` resolve Meta work demographics. Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias.
38342
+ * What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options, `language` resolves Google's targetable language_constant table (Google only), `workPosition`/`workEmployer`/`workIndustry` resolve Meta work demographics, `industry`/`jobFunction`/`seniority`/`companySize` resolve LinkedIn B2B facets (LinkedIn only). Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias.
38314
38343
  */
38315
- dimension?: 'geo' | 'interest' | 'behavior' | 'income' | 'language' | 'workPosition' | 'workEmployer' | 'workIndustry';
38344
+ dimension?: 'geo' | 'interest' | 'behavior' | 'income' | 'language' | 'workPosition' | 'workEmployer' | 'workIndustry' | 'industry' | 'jobFunction' | 'seniority' | 'companySize';
38316
38345
  /**
38317
38346
  * Only used when `dimension=geo`. The kind of location to resolve. `all` searches every type in one relevance-ranked call. Defaults to `city`.
38318
38347
  */
@@ -38338,7 +38367,7 @@ type SearchAdTargetingResponse = ({
38338
38367
  */
38339
38368
  name: string;
38340
38369
  /**
38341
- * What the result is (e.g. city, region, country, zip, metro, location, interest, behavior, income).
38370
+ * What the result is (e.g. city, region, country, zip, metro, location, interest, behavior, income, industry, jobFunction, seniority, companySize).
38342
38371
  */
38343
38372
  type: string;
38344
38373
  /**
package/dist/index.d.ts CHANGED
@@ -8245,19 +8245,19 @@ type TargetingSpec = {
8245
8245
  name?: string;
8246
8246
  }>;
8247
8247
  /**
8248
- * LinkedIn B2B only. Industry URN id fragments.
8248
+ * LinkedIn B2B only. Industry URN id fragments, or the full urn:li:industry:* URN from /v1/ads/targeting/search?dimension=industry.
8249
8249
  */
8250
8250
  industries?: Array<(string)>;
8251
8251
  /**
8252
- * LinkedIn B2B only.
8252
+ * LinkedIn B2B only. Single-letter size codes (A to I), or the full urn:li:staffCountRange:* URN from /v1/ads/targeting/search?dimension=companySize.
8253
8253
  */
8254
8254
  companySizes?: Array<(string)>;
8255
8255
  /**
8256
- * LinkedIn B2B only.
8256
+ * LinkedIn B2B only. Seniority URN id fragments, or the full urn:li:seniority:* URN from /v1/ads/targeting/search?dimension=seniority.
8257
8257
  */
8258
8258
  seniorities?: Array<(string)>;
8259
8259
  /**
8260
- * LinkedIn B2B only.
8260
+ * LinkedIn B2B only. Function URN id fragments, or the full urn:li:function:* URN from /v1/ads/targeting/search?dimension=jobFunction.
8261
8261
  */
8262
8262
  jobFunctions?: Array<(string)>;
8263
8263
  /**
@@ -33433,7 +33433,36 @@ type UpdateAdData = {
33433
33433
  })>;
33434
33434
  ageMin?: number;
33435
33435
  ageMax?: number;
33436
+ /**
33437
+ * ISO 3166-1 alpha-2 codes. On Google this is the FULL new country set for the campaign (same contract as `locations`); on LinkedIn it replaces the campaign's geo criteria.
33438
+ */
33436
33439
  countries?: Array<(string)>;
33440
+ /**
33441
+ * Google and LinkedIn. The FULL new location set for the campaign. Bare country-code array, or an object with countries/regions/cities/zips/metros key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Equivalent to the top-level geo fields; sending both returns 400. Empty returns 400, `customLocations` returns 422.
33442
+ */
33443
+ locations?: (Array<(string)> | {
33444
+ countries?: Array<(string)>;
33445
+ regions?: Array<{
33446
+ key: string;
33447
+ name?: string;
33448
+ }>;
33449
+ cities?: Array<{
33450
+ key: string;
33451
+ name?: string;
33452
+ }>;
33453
+ zips?: Array<{
33454
+ key: string;
33455
+ name?: string;
33456
+ }>;
33457
+ metros?: Array<{
33458
+ key: string;
33459
+ name?: string;
33460
+ }>;
33461
+ });
33462
+ /**
33463
+ * Google only. The FULL new language set for the campaign, as Google language codes (ISO 639-1, plus variants such as `zh_CN`). An unknown code returns 400.
33464
+ */
33465
+ languages?: Array<(string)>;
33437
33466
  /**
33438
33467
  * Interest objects from /v1/ads/interests. Each must include id and name.
33439
33468
  */
@@ -38310,9 +38339,9 @@ type SearchAdTargetingData = {
38310
38339
  */
38311
38340
  countryCode?: string;
38312
38341
  /**
38313
- * What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options, `language` resolves Google's targetable language_constant table (Google only), `workPosition`/`workEmployer`/`workIndustry` resolve Meta work demographics. Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias.
38342
+ * What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options, `language` resolves Google's targetable language_constant table (Google only), `workPosition`/`workEmployer`/`workIndustry` resolve Meta work demographics, `industry`/`jobFunction`/`seniority`/`companySize` resolve LinkedIn B2B facets (LinkedIn only). Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias.
38314
38343
  */
38315
- dimension?: 'geo' | 'interest' | 'behavior' | 'income' | 'language' | 'workPosition' | 'workEmployer' | 'workIndustry';
38344
+ dimension?: 'geo' | 'interest' | 'behavior' | 'income' | 'language' | 'workPosition' | 'workEmployer' | 'workIndustry' | 'industry' | 'jobFunction' | 'seniority' | 'companySize';
38316
38345
  /**
38317
38346
  * Only used when `dimension=geo`. The kind of location to resolve. `all` searches every type in one relevance-ranked call. Defaults to `city`.
38318
38347
  */
@@ -38338,7 +38367,7 @@ type SearchAdTargetingResponse = ({
38338
38367
  */
38339
38368
  name: string;
38340
38369
  /**
38341
- * What the result is (e.g. city, region, country, zip, metro, location, interest, behavior, income).
38370
+ * What the result is (e.g. city, region, country, zip, metro, location, interest, behavior, income, industry, jobFunction, seniority, companySize).
38342
38371
  */
38343
38372
  type: string;
38344
38373
  /**
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.754",
39
+ version: "0.2.756",
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.754",
8
+ version: "0.2.756",
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": "@zernio/node",
3
- "version": "0.2.754",
3
+ "version": "0.2.756",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -8370,7 +8370,12 @@ export const getCampaignTargeting = <ThrowOnError extends boolean = false>(optio
8370
8370
  * `locations` accepts the same shapes as campaign creation: a bare array of
8371
8371
  * ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros`
8372
8372
  * key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative
8373
- * (excluded) locations are left untouched by this endpoint.
8373
+ * (excluded) locations are left untouched by this endpoint. An empty location list
8374
+ * returns 400 instead of removing every criterion: a Google campaign with no location
8375
+ * criteria targets every country, so omit `locations` to leave targeting alone.
8376
+ *
8377
+ * The removes and the creates go out in ONE Google `googleAds:mutate`, so a failed
8378
+ * edit leaves the campaign's previous set intact rather than a half-applied one.
8374
8379
  *
8375
8380
  * `languages` is an array of Google's language codes (ISO 639-1, plus variants
8376
8381
  * such as `zh_CN`); an unknown code returns 400.
@@ -8663,10 +8668,13 @@ export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLega
8663
8668
  * - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative
8664
8669
  * (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`).
8665
8670
  * - **Google**: status, budget, KEYWORD edits via `targeting.keywords` /
8666
- * `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`.
8671
+ * `targeting.negativeKeywords`, DEVICE bid adjustments via `targeting.devices`,
8672
+ * LOCATION edits via `targeting.locations` (or the equivalent top-level
8673
+ * `targeting.countries` / `regions` / `cities` / `zips` / `metros`), and LANGUAGE
8674
+ * edits via `targeting.languages`.
8667
8675
  * Each list you send becomes the FULL new set of its kind (criteria not in the
8668
8676
  * list are removed); a kind left out is untouched. Any other `targeting` field
8669
- * returns 400: Google cannot mutate broad targeting post-create without recreating
8677
+ * returns 400: Google cannot mutate it post-create without recreating
8670
8678
  * the campaign. RSA text updates use top-level `headlines`, `descriptions` and `finalUrls`.
8671
8679
  * Each supplied array replaces the full list; omit a field to preserve it. Use 3-15 headlines
8672
8680
  * (1-30 characters) and 2-4 descriptions (1-90 characters). Omit an asset to remove it;
@@ -8681,6 +8689,19 @@ export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLega
8681
8689
  * `targeting` or `creative` returns 501 with code `unsupported_platform_operation`.
8682
8690
  * OpenAI Ads budget is lifetime-only (see `budget.type` below).
8683
8691
  *
8692
+ * **Google location and language replacement:** locations, languages and devices are
8693
+ * campaign-level criteria on Google, so these edits apply to every ad group and ad in
8694
+ * the ad's campaign. Send the complete list you want to keep. Zernio diffs it against
8695
+ * the campaign's live criteria and sends the removes and the creates in ONE
8696
+ * `googleAds:mutate`, so the campaign is never left with a half-applied set; criteria
8697
+ * already in the list keep their criterion ID and history. Excluded (negative)
8698
+ * locations are left untouched. Two cases are refused rather than applied: an empty
8699
+ * location list returns 400 (a Google campaign with no location criteria targets every
8700
+ * country, which is never what "remove my locations" means, so omit the field instead),
8701
+ * and radius targeting (`customLocations`) returns 422 because it is a separate Google
8702
+ * criterion type that this replacement neither creates nor removes. Send either
8703
+ * `targeting.locations` or the top-level geo fields, not both: mixing them returns 400.
8704
+ *
8684
8705
  * **Google keyword replacement:** These edits affect the ad's entire ad group,
8685
8706
  * including sibling ads. Positive (`targeting.keywords`) and negative
8686
8707
  * (`targeting.negativeKeywords`) sets are independent: omit a field to leave
@@ -10236,6 +10257,8 @@ export const searchAdInterests = <ThrowOnError extends boolean = false>(options:
10236
10257
  * - `language`: Google-only
10237
10258
  * - `workPosition`, `workEmployer`, `workIndustry`: the Meta-only work demographics, whose
10238
10259
  * ids feed `TargetingSpec.workPositions`/`workEmployers`/`workIndustries`
10260
+ * - `industry`, `jobFunction`, `seniority`, `companySize`: the LinkedIn-only B2B facets, whose
10261
+ * URNs feed `TargetingSpec.industries`/`jobFunctions`/`seniorities`/`companySizes`
10239
10262
  *
10240
10263
  * Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only).
10241
10264
  * Work industries are a fixed ~30-entry Meta catalog with no server-side query,
@@ -10260,6 +10283,15 @@ export const searchAdInterests = <ThrowOnError extends boolean = false>(options:
10260
10283
  * `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`,
10261
10284
  * `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`.
10262
10285
  *
10286
+ * LinkedIn B2B searches (`industry`, `jobFunction`, `seniority`, `companySize`) return the
10287
+ * full URN to pass straight back, so no URN id fragment has to be assembled by hand:
10288
+ * `urn:li:industry:4`, `urn:li:function:8`, `urn:li:seniority:6`,
10289
+ * `urn:li:staffCountRange:(51,200)`. Only `industry` is a server-side name search
10290
+ * (LinkedIn's typeahead finder). LinkedIn exposes no typeahead for job functions,
10291
+ * seniorities and company sizes, so Zernio fetches each whole table (26, 10 and 9 entries),
10292
+ * caches it, and does the matching, ranking and `limit` cutoff itself. Those three never
10293
+ * carry `audienceSize`, and `countryCode` and `geoType` are not applied to any of the four.
10294
+ *
10263
10295
  * Google geo searches resolve against Google's geoTargetConstants and return
10264
10296
  * every matching level in one list; `geoType` is not applied (Google's
10265
10297
  * `target_type` is an open taxonomy that does not map one-to-one onto the
@@ -6938,19 +6938,19 @@ export type TargetingSpec = {
6938
6938
  name?: string;
6939
6939
  }>;
6940
6940
  /**
6941
- * LinkedIn B2B only. Industry URN id fragments.
6941
+ * LinkedIn B2B only. Industry URN id fragments, or the full urn:li:industry:* URN from /v1/ads/targeting/search?dimension=industry.
6942
6942
  */
6943
6943
  industries?: Array<(string)>;
6944
6944
  /**
6945
- * LinkedIn B2B only.
6945
+ * LinkedIn B2B only. Single-letter size codes (A to I), or the full urn:li:staffCountRange:* URN from /v1/ads/targeting/search?dimension=companySize.
6946
6946
  */
6947
6947
  companySizes?: Array<(string)>;
6948
6948
  /**
6949
- * LinkedIn B2B only.
6949
+ * LinkedIn B2B only. Seniority URN id fragments, or the full urn:li:seniority:* URN from /v1/ads/targeting/search?dimension=seniority.
6950
6950
  */
6951
6951
  seniorities?: Array<(string)>;
6952
6952
  /**
6953
- * LinkedIn B2B only.
6953
+ * LinkedIn B2B only. Function URN id fragments, or the full urn:li:function:* URN from /v1/ads/targeting/search?dimension=jobFunction.
6954
6954
  */
6955
6955
  jobFunctions?: Array<(string)>;
6956
6956
  /**
@@ -33805,7 +33805,36 @@ export type UpdateAdData = {
33805
33805
  })>;
33806
33806
  ageMin?: number;
33807
33807
  ageMax?: number;
33808
+ /**
33809
+ * ISO 3166-1 alpha-2 codes. On Google this is the FULL new country set for the campaign (same contract as `locations`); on LinkedIn it replaces the campaign's geo criteria.
33810
+ */
33808
33811
  countries?: Array<(string)>;
33812
+ /**
33813
+ * Google and LinkedIn. The FULL new location set for the campaign. Bare country-code array, or an object with countries/regions/cities/zips/metros key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Equivalent to the top-level geo fields; sending both returns 400. Empty returns 400, `customLocations` returns 422.
33814
+ */
33815
+ locations?: (Array<(string)> | {
33816
+ countries?: Array<(string)>;
33817
+ regions?: Array<{
33818
+ key: string;
33819
+ name?: string;
33820
+ }>;
33821
+ cities?: Array<{
33822
+ key: string;
33823
+ name?: string;
33824
+ }>;
33825
+ zips?: Array<{
33826
+ key: string;
33827
+ name?: string;
33828
+ }>;
33829
+ metros?: Array<{
33830
+ key: string;
33831
+ name?: string;
33832
+ }>;
33833
+ });
33834
+ /**
33835
+ * Google only. The FULL new language set for the campaign, as Google language codes (ISO 639-1, plus variants such as `zh_CN`). An unknown code returns 400.
33836
+ */
33837
+ languages?: Array<(string)>;
33809
33838
  /**
33810
33839
  * Interest objects from /v1/ads/interests. Each must include id and name.
33811
33840
  */
@@ -38961,9 +38990,9 @@ export type SearchAdTargetingData = {
38961
38990
  */
38962
38991
  countryCode?: string;
38963
38992
  /**
38964
- * What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options, `language` resolves Google's targetable language_constant table (Google only), `workPosition`/`workEmployer`/`workIndustry` resolve Meta work demographics. Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias.
38993
+ * What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options, `language` resolves Google's targetable language_constant table (Google only), `workPosition`/`workEmployer`/`workIndustry` resolve Meta work demographics, `industry`/`jobFunction`/`seniority`/`companySize` resolve LinkedIn B2B facets (LinkedIn only). Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias.
38965
38994
  */
38966
- dimension?: 'geo' | 'interest' | 'behavior' | 'income' | 'language' | 'workPosition' | 'workEmployer' | 'workIndustry';
38995
+ dimension?: 'geo' | 'interest' | 'behavior' | 'income' | 'language' | 'workPosition' | 'workEmployer' | 'workIndustry' | 'industry' | 'jobFunction' | 'seniority' | 'companySize';
38967
38996
  /**
38968
38997
  * Only used when `dimension=geo`. The kind of location to resolve. `all` searches every type in one relevance-ranked call. Defaults to `city`.
38969
38998
  */
@@ -38990,7 +39019,7 @@ export type SearchAdTargetingResponse = ({
38990
39019
  */
38991
39020
  name: string;
38992
39021
  /**
38993
- * What the result is (e.g. city, region, country, zip, metro, location, interest, behavior, income).
39022
+ * What the result is (e.g. city, region, country, zip, metro, location, interest, behavior, income, industry, jobFunction, seniority, companySize).
38994
39023
  */
38995
39024
  type: string;
38996
39025
  /**