@zernio/node 0.2.755 → 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
@@ -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
  */
package/dist/index.d.ts CHANGED
@@ -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
  */
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.755",
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.755",
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.755",
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
@@ -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
  */