@getlatedev/node 0.2.373 → 0.2.374

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
@@ -4420,19 +4420,19 @@ type TargetingSpec = {
4420
4420
  name?: string;
4421
4421
  }>;
4422
4422
  /**
4423
- * City targeting. Optional `radius` + `distance_unit` 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).
4423
+ * 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).
4424
4424
  */
4425
4425
  cities?: Array<{
4426
4426
  key: string;
4427
4427
  name?: string;
4428
4428
  /**
4429
- * Radius around the city. Requires distance_unit.
4429
+ * 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.
4430
4430
  */
4431
4431
  radius?: number;
4432
4432
  /**
4433
4433
  * Required if radius is set.
4434
4434
  */
4435
- distance_unit?: 'mile' | 'kilometer';
4435
+ distanceUnit?: 'mile' | 'kilometer';
4436
4436
  }>;
4437
4437
  /**
4438
4438
  * Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`). Supported on Meta, Google, TikTok, Pinterest, X.
@@ -4475,18 +4475,18 @@ type TargetingSpec = {
4475
4475
  name?: string;
4476
4476
  }>;
4477
4477
  /**
4478
- * Cities to exclude. Optional `radius` + `distance_unit` exclude a catchment around the city (both must be set together or both omitted); Meta honours the radius on excluded cities.
4478
+ * Cities to exclude. Optional `radius` + `distanceUnit` exclude a catchment around the city (both must be set together or both omitted); Meta honours the radius on excluded cities.
4479
4479
  */
4480
4480
  cities?: Array<{
4481
4481
  key: string;
4482
4482
  /**
4483
- * Radius around the excluded city. Requires distance_unit.
4483
+ * Radius around the excluded city. Requires distanceUnit.
4484
4484
  */
4485
4485
  radius?: number;
4486
4486
  /**
4487
4487
  * Required if radius is set.
4488
4488
  */
4489
- distance_unit?: 'mile' | 'kilometer';
4489
+ distanceUnit?: 'mile' | 'kilometer';
4490
4490
  }>;
4491
4491
  zips?: Array<{
4492
4492
  key: string;
@@ -7195,6 +7195,18 @@ type YouTubeDemographicsResponse = {
7195
7195
  */
7196
7196
  accountId?: string;
7197
7197
  platform?: string;
7198
+ /**
7199
+ * Present only when demographics are scoped to a single video
7200
+ */
7201
+ videoId?: string;
7202
+ /**
7203
+ * Video title (video mode only)
7204
+ */
7205
+ title?: (string) | null;
7206
+ /**
7207
+ * Video publish date (video mode only)
7208
+ */
7209
+ publishedAt?: (string) | null;
7198
7210
  /**
7199
7211
  * Object keyed by breakdown dimension (age, gender, country)
7200
7212
  */
@@ -7910,10 +7922,17 @@ type GetYouTubeDemographicsData = {
7910
7922
  */
7911
7923
  endDate?: string;
7912
7924
  /**
7913
- * Start date in YYYY-MM-DD format. Defaults to 90 days ago.
7925
+ * Start date in YYYY-MM-DD format. Defaults to 90 days ago, or to the video's
7926
+ * publish date (lifetime) when videoId is provided.
7914
7927
  *
7915
7928
  */
7916
7929
  startDate?: string;
7930
+ /**
7931
+ * YouTube video ID. When provided, demographics are scoped to this single video
7932
+ * (must belong to the connected channel; otherwise 404 video_not_found).
7933
+ *
7934
+ */
7935
+ videoId?: string;
7917
7936
  };
7918
7937
  };
7919
7938
  type GetYouTubeDemographicsResponse = (YouTubeDemographicsResponse);
@@ -23423,16 +23442,16 @@ type BoostPostData = {
23423
23442
  name?: string;
23424
23443
  }>;
23425
23444
  /**
23426
- * City targeting. Optional `radius` + `distance_unit` extend beyond the city limits (both set together, Meta only).
23445
+ * City targeting. Optional `radius` + `distanceUnit` extend beyond the city limits (both set together, Meta only).
23427
23446
  */
23428
23447
  cities?: Array<{
23429
23448
  key: string;
23430
23449
  name?: string;
23431
23450
  /**
23432
- * Requires distance_unit.
23451
+ * 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).
23433
23452
  */
23434
23453
  radius?: number;
23435
- distance_unit?: 'mile' | 'kilometer';
23454
+ distanceUnit?: 'mile' | 'kilometer';
23436
23455
  }>;
23437
23456
  /**
23438
23457
  * Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`).
@@ -23835,7 +23854,7 @@ type CreateStandaloneAdData = {
23835
23854
  */
23836
23855
  key: string;
23837
23856
  /**
23838
- * Optional radius around the city. Must be set together with distance_unit.
23857
+ * 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).
23839
23858
  */
23840
23859
  radius?: number;
23841
23860
  /**
@@ -25874,6 +25893,10 @@ type CreateCtwaAdData = {
25874
25893
  * TargetingGeoLocationCity. `key` is Meta's city ID
25875
25894
  * (lookupable via GET /v1/ads/targeting/search). `radius`
25876
25895
  * and `distance_unit` are coupled: set both or neither.
25896
+ * Meta enforces a minimum city radius (~17 km / 10 mi);
25897
+ * smaller values resolve to a 0-size audience and the ad
25898
+ * fails at launch. For a tighter catchment use customLocations
25899
+ * (lat/lng).
25877
25900
  *
25878
25901
  */
25879
25902
  cities?: Array<{
package/dist/index.d.ts CHANGED
@@ -4420,19 +4420,19 @@ type TargetingSpec = {
4420
4420
  name?: string;
4421
4421
  }>;
4422
4422
  /**
4423
- * City targeting. Optional `radius` + `distance_unit` 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).
4423
+ * 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).
4424
4424
  */
4425
4425
  cities?: Array<{
4426
4426
  key: string;
4427
4427
  name?: string;
4428
4428
  /**
4429
- * Radius around the city. Requires distance_unit.
4429
+ * 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.
4430
4430
  */
4431
4431
  radius?: number;
4432
4432
  /**
4433
4433
  * Required if radius is set.
4434
4434
  */
4435
- distance_unit?: 'mile' | 'kilometer';
4435
+ distanceUnit?: 'mile' | 'kilometer';
4436
4436
  }>;
4437
4437
  /**
4438
4438
  * Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`). Supported on Meta, Google, TikTok, Pinterest, X.
@@ -4475,18 +4475,18 @@ type TargetingSpec = {
4475
4475
  name?: string;
4476
4476
  }>;
4477
4477
  /**
4478
- * Cities to exclude. Optional `radius` + `distance_unit` exclude a catchment around the city (both must be set together or both omitted); Meta honours the radius on excluded cities.
4478
+ * Cities to exclude. Optional `radius` + `distanceUnit` exclude a catchment around the city (both must be set together or both omitted); Meta honours the radius on excluded cities.
4479
4479
  */
4480
4480
  cities?: Array<{
4481
4481
  key: string;
4482
4482
  /**
4483
- * Radius around the excluded city. Requires distance_unit.
4483
+ * Radius around the excluded city. Requires distanceUnit.
4484
4484
  */
4485
4485
  radius?: number;
4486
4486
  /**
4487
4487
  * Required if radius is set.
4488
4488
  */
4489
- distance_unit?: 'mile' | 'kilometer';
4489
+ distanceUnit?: 'mile' | 'kilometer';
4490
4490
  }>;
4491
4491
  zips?: Array<{
4492
4492
  key: string;
@@ -7195,6 +7195,18 @@ type YouTubeDemographicsResponse = {
7195
7195
  */
7196
7196
  accountId?: string;
7197
7197
  platform?: string;
7198
+ /**
7199
+ * Present only when demographics are scoped to a single video
7200
+ */
7201
+ videoId?: string;
7202
+ /**
7203
+ * Video title (video mode only)
7204
+ */
7205
+ title?: (string) | null;
7206
+ /**
7207
+ * Video publish date (video mode only)
7208
+ */
7209
+ publishedAt?: (string) | null;
7198
7210
  /**
7199
7211
  * Object keyed by breakdown dimension (age, gender, country)
7200
7212
  */
@@ -7910,10 +7922,17 @@ type GetYouTubeDemographicsData = {
7910
7922
  */
7911
7923
  endDate?: string;
7912
7924
  /**
7913
- * Start date in YYYY-MM-DD format. Defaults to 90 days ago.
7925
+ * Start date in YYYY-MM-DD format. Defaults to 90 days ago, or to the video's
7926
+ * publish date (lifetime) when videoId is provided.
7914
7927
  *
7915
7928
  */
7916
7929
  startDate?: string;
7930
+ /**
7931
+ * YouTube video ID. When provided, demographics are scoped to this single video
7932
+ * (must belong to the connected channel; otherwise 404 video_not_found).
7933
+ *
7934
+ */
7935
+ videoId?: string;
7917
7936
  };
7918
7937
  };
7919
7938
  type GetYouTubeDemographicsResponse = (YouTubeDemographicsResponse);
@@ -23423,16 +23442,16 @@ type BoostPostData = {
23423
23442
  name?: string;
23424
23443
  }>;
23425
23444
  /**
23426
- * City targeting. Optional `radius` + `distance_unit` extend beyond the city limits (both set together, Meta only).
23445
+ * City targeting. Optional `radius` + `distanceUnit` extend beyond the city limits (both set together, Meta only).
23427
23446
  */
23428
23447
  cities?: Array<{
23429
23448
  key: string;
23430
23449
  name?: string;
23431
23450
  /**
23432
- * Requires distance_unit.
23451
+ * 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).
23433
23452
  */
23434
23453
  radius?: number;
23435
- distance_unit?: 'mile' | 'kilometer';
23454
+ distanceUnit?: 'mile' | 'kilometer';
23436
23455
  }>;
23437
23456
  /**
23438
23457
  * Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`).
@@ -23835,7 +23854,7 @@ type CreateStandaloneAdData = {
23835
23854
  */
23836
23855
  key: string;
23837
23856
  /**
23838
- * Optional radius around the city. Must be set together with distance_unit.
23857
+ * 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).
23839
23858
  */
23840
23859
  radius?: number;
23841
23860
  /**
@@ -25874,6 +25893,10 @@ type CreateCtwaAdData = {
25874
25893
  * TargetingGeoLocationCity. `key` is Meta's city ID
25875
25894
  * (lookupable via GET /v1/ads/targeting/search). `radius`
25876
25895
  * and `distance_unit` are coupled: set both or neither.
25896
+ * Meta enforces a minimum city radius (~17 km / 10 mi);
25897
+ * smaller values resolve to a 0-size audience and the ad
25898
+ * fails at launch. For a tighter catchment use customLocations
25899
+ * (lat/lng).
25877
25900
  *
25878
25901
  */
25879
25902
  cities?: Array<{
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.373",
39
+ version: "0.2.374",
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.373",
8
+ version: "0.2.374",
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.373",
3
+ "version": "0.2.374",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -279,8 +279,11 @@ export const getInstagramDemographics = <ThrowOnError extends boolean = false>(o
279
279
  /**
280
280
  * Get YouTube demographics
281
281
  * Returns audience demographic insights for a YouTube channel, broken down by age, gender, and/or country.
282
+ * Pass videoId to get the audience profile of a single video instead of the whole channel.
282
283
  * Age and gender values are viewer percentages (0-100). Country values are view counts.
283
- * Data is based on signed-in viewers only, with a 2-3 day delay. Requires the Analytics add-on.
284
+ * Data is based on signed-in viewers only, with a 2-3 day delay. YouTube suppresses demographics
285
+ * for videos with too few signed-in views, so low-traffic videos can return empty breakdowns.
286
+ * Requires the Analytics add-on.
284
287
  *
285
288
  */
286
289
  export const getYouTubeDemographics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetYouTubeDemographicsData, ThrowOnError>) => {
@@ -3692,19 +3692,19 @@ export type TargetingSpec = {
3692
3692
  name?: string;
3693
3693
  }>;
3694
3694
  /**
3695
- * City targeting. Optional `radius` + `distance_unit` 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).
3695
+ * 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).
3696
3696
  */
3697
3697
  cities?: Array<{
3698
3698
  key: string;
3699
3699
  name?: string;
3700
3700
  /**
3701
- * Radius around the city. Requires distance_unit.
3701
+ * 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.
3702
3702
  */
3703
3703
  radius?: number;
3704
3704
  /**
3705
3705
  * Required if radius is set.
3706
3706
  */
3707
- distance_unit?: 'mile' | 'kilometer';
3707
+ distanceUnit?: 'mile' | 'kilometer';
3708
3708
  }>;
3709
3709
  /**
3710
3710
  * Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`). Supported on Meta, Google, TikTok, Pinterest, X.
@@ -3747,18 +3747,18 @@ export type TargetingSpec = {
3747
3747
  name?: string;
3748
3748
  }>;
3749
3749
  /**
3750
- * Cities to exclude. Optional `radius` + `distance_unit` exclude a catchment around the city (both must be set together or both omitted); Meta honours the radius on excluded cities.
3750
+ * Cities to exclude. Optional `radius` + `distanceUnit` exclude a catchment around the city (both must be set together or both omitted); Meta honours the radius on excluded cities.
3751
3751
  */
3752
3752
  cities?: Array<{
3753
3753
  key: string;
3754
3754
  /**
3755
- * Radius around the excluded city. Requires distance_unit.
3755
+ * Radius around the excluded city. Requires distanceUnit.
3756
3756
  */
3757
3757
  radius?: number;
3758
3758
  /**
3759
3759
  * Required if radius is set.
3760
3760
  */
3761
- distance_unit?: 'mile' | 'kilometer';
3761
+ distanceUnit?: 'mile' | 'kilometer';
3762
3762
  }>;
3763
3763
  zips?: Array<{
3764
3764
  key: string;
@@ -6577,6 +6577,18 @@ export type YouTubeDemographicsResponse = {
6577
6577
  */
6578
6578
  accountId?: string;
6579
6579
  platform?: string;
6580
+ /**
6581
+ * Present only when demographics are scoped to a single video
6582
+ */
6583
+ videoId?: string;
6584
+ /**
6585
+ * Video title (video mode only)
6586
+ */
6587
+ title?: (string) | null;
6588
+ /**
6589
+ * Video publish date (video mode only)
6590
+ */
6591
+ publishedAt?: (string) | null;
6580
6592
  /**
6581
6593
  * Object keyed by breakdown dimension (age, gender, country)
6582
6594
  */
@@ -7338,10 +7350,17 @@ export type GetYouTubeDemographicsData = {
7338
7350
  */
7339
7351
  endDate?: string;
7340
7352
  /**
7341
- * Start date in YYYY-MM-DD format. Defaults to 90 days ago.
7353
+ * Start date in YYYY-MM-DD format. Defaults to 90 days ago, or to the video's
7354
+ * publish date (lifetime) when videoId is provided.
7342
7355
  *
7343
7356
  */
7344
7357
  startDate?: string;
7358
+ /**
7359
+ * YouTube video ID. When provided, demographics are scoped to this single video
7360
+ * (must belong to the connected channel; otherwise 404 video_not_found).
7361
+ *
7362
+ */
7363
+ videoId?: string;
7345
7364
  };
7346
7365
  };
7347
7366
 
@@ -24082,16 +24101,16 @@ export type BoostPostData = {
24082
24101
  name?: string;
24083
24102
  }>;
24084
24103
  /**
24085
- * City targeting. Optional `radius` + `distance_unit` extend beyond the city limits (both set together, Meta only).
24104
+ * City targeting. Optional `radius` + `distanceUnit` extend beyond the city limits (both set together, Meta only).
24086
24105
  */
24087
24106
  cities?: Array<{
24088
24107
  key: string;
24089
24108
  name?: string;
24090
24109
  /**
24091
- * Requires distance_unit.
24110
+ * 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).
24092
24111
  */
24093
24112
  radius?: number;
24094
- distance_unit?: 'mile' | 'kilometer';
24113
+ distanceUnit?: 'mile' | 'kilometer';
24095
24114
  }>;
24096
24115
  /**
24097
24116
  * Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`).
@@ -24497,7 +24516,7 @@ export type CreateStandaloneAdData = {
24497
24516
  */
24498
24517
  key: string;
24499
24518
  /**
24500
- * Optional radius around the city. Must be set together with distance_unit.
24519
+ * 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).
24501
24520
  */
24502
24521
  radius?: number;
24503
24522
  /**
@@ -26641,6 +26660,10 @@ export type CreateCtwaAdData = {
26641
26660
  * TargetingGeoLocationCity. `key` is Meta's city ID
26642
26661
  * (lookupable via GET /v1/ads/targeting/search). `radius`
26643
26662
  * and `distance_unit` are coupled: set both or neither.
26663
+ * Meta enforces a minimum city radius (~17 km / 10 mi);
26664
+ * smaller values resolve to a 0-size audience and the ad
26665
+ * fails at launch. For a tighter catchment use customLocations
26666
+ * (lat/lng).
26644
26667
  *
26645
26668
  */
26646
26669
  cities?: Array<{