@getlatedev/node 0.2.1189 → 0.2.1191

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
@@ -2540,12 +2540,54 @@ type AdAnalyticsResponse = {
2540
2540
  * keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
2541
2541
  * is not part of the stored metrics series.
2542
2542
  *
2543
+ * TikTok rows are keyed by TikTok's own dimension name (`country_code` for
2544
+ * `country`, `platform` for `publisher_platform`). `placement` rows carry the
2545
+ * label TikTok Ads Manager shows (`TikTok`, `TikTok Ad Network`, `News Feed App Series`)
2546
+ * in `placement` and TikTok's API value (`PLACEMENT_TIKTOK`, `PLACEMENT_PANGLE`,
2547
+ * `PLACEMENT_GLOBAL_APP_BUNDLE`) in `placementRaw`; a value without a known label
2548
+ * carries the raw value in both.
2549
+ *
2550
+ * A requested dimension with no data in the range is an empty array.
2551
+ *
2543
2552
  */
2544
2553
  breakdowns?: {
2545
2554
  [key: string]: Array<{
2546
2555
  [key: string]: unknown;
2547
2556
  }>;
2548
2557
  };
2558
+ /**
2559
+ * Requested breakdowns this platform cannot break down by (e.g. region on TikTok, any breakdown on Google). Absent when every requested breakdown is supported.
2560
+ */
2561
+ unsupportedBreakdowns?: Array<(string)>;
2562
+ /**
2563
+ * Guidance for some names in unsupportedBreakdowns, keyed by that name (e.g. placement on Meta points at publisher_platform and platform_position; platform_position on TikTok points at placement). Absent when no unsupported name has a hint.
2564
+ */
2565
+ breakdownHints?: {
2566
+ [key: string]: (string);
2567
+ };
2568
+ /**
2569
+ * TikTok only: breakdowns the platform failed to return (rate limit, permission, rejected query). Each one is an empty array under breakdowns; summary and daily are unaffected. Absent when every breakdown answered.
2570
+ */
2571
+ breakdownErrors?: Array<{
2572
+ breakdown?: string;
2573
+ /**
2574
+ * The platform's error message.
2575
+ */
2576
+ message?: string;
2577
+ }>;
2578
+ /**
2579
+ * TikTok only: TikTok metric names TikTok refused for a breakdown, keyed by the requested breakdown (e.g. total_purchase and total_purchase_value have no relation to platform, ac or language). Every row value derived from a refused metric is null in that breakdown (purchaseValue and roas, or the matching actions and actionValues entries), never a number computed without it. Absent when no metric was refused.
2580
+ */
2581
+ breakdownDroppedMetrics?: {
2582
+ [key: string]: Array<(string)>;
2583
+ };
2584
+ /**
2585
+ * TikTok only, present when the requested range is longer than the 365 days TikTok serves per breakdown: the window the breakdowns cover (the last 365 days of the range). summary and daily still cover the full range.
2586
+ */
2587
+ breakdownsRange?: {
2588
+ fromDate?: string;
2589
+ toDate?: string;
2590
+ };
2549
2591
  };
2550
2592
  };
2551
2593
  /**
@@ -5062,12 +5104,54 @@ type CampaignAnalyticsResponse = {
5062
5104
  * keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
5063
5105
  * is not part of the stored metrics series.
5064
5106
  *
5107
+ * TikTok rows are keyed by TikTok's own dimension name (`country_code` for
5108
+ * `country`, `platform` for `publisher_platform`). `placement` rows carry the
5109
+ * label TikTok Ads Manager shows (`TikTok`, `TikTok Ad Network`, `News Feed App Series`)
5110
+ * in `placement` and TikTok's API value (`PLACEMENT_TIKTOK`, `PLACEMENT_PANGLE`,
5111
+ * `PLACEMENT_GLOBAL_APP_BUNDLE`) in `placementRaw`; a value without a known label
5112
+ * carries the raw value in both.
5113
+ *
5114
+ * A requested dimension with no data in the range is an empty array.
5115
+ *
5065
5116
  */
5066
5117
  breakdowns?: {
5067
5118
  [key: string]: Array<{
5068
5119
  [key: string]: unknown;
5069
5120
  }>;
5070
5121
  };
5122
+ /**
5123
+ * Requested breakdowns this platform cannot break down by (e.g. region on TikTok, any breakdown on Google). Absent when every requested breakdown is supported.
5124
+ */
5125
+ unsupportedBreakdowns?: Array<(string)>;
5126
+ /**
5127
+ * Guidance for some names in unsupportedBreakdowns, keyed by that name (e.g. placement on Meta points at publisher_platform and platform_position; platform_position on TikTok points at placement). Absent when no unsupported name has a hint.
5128
+ */
5129
+ breakdownHints?: {
5130
+ [key: string]: (string);
5131
+ };
5132
+ /**
5133
+ * TikTok only: breakdowns the platform failed to return (rate limit, permission, rejected query). Each one is an empty array under breakdowns; summary and daily are unaffected. Absent when every breakdown answered.
5134
+ */
5135
+ breakdownErrors?: Array<{
5136
+ breakdown?: string;
5137
+ /**
5138
+ * The platform's error message.
5139
+ */
5140
+ message?: string;
5141
+ }>;
5142
+ /**
5143
+ * TikTok only: TikTok metric names TikTok refused for a breakdown, keyed by the requested breakdown (e.g. total_purchase and total_purchase_value have no relation to platform, ac or language). Every row value derived from a refused metric is null in that breakdown (purchaseValue and roas, or the matching actions and actionValues entries), never a number computed without it. Absent when no metric was refused.
5144
+ */
5145
+ breakdownDroppedMetrics?: {
5146
+ [key: string]: Array<(string)>;
5147
+ };
5148
+ /**
5149
+ * TikTok only, present when the requested range is longer than the 365 days TikTok serves per breakdown: the window the breakdowns cover (the last 365 days of the range). summary and daily still cover the full range.
5150
+ */
5151
+ breakdownsRange?: {
5152
+ fromDate?: string;
5153
+ toDate?: string;
5154
+ };
5071
5155
  };
5072
5156
  };
5073
5157
  /**
@@ -9291,23 +9375,44 @@ type InstagramBusinessDiscovery = {
9291
9375
  * Most recent media first, up to `limit`.
9292
9376
  */
9293
9377
  media: Array<{
9294
- id?: string;
9295
- caption?: (string) | null;
9378
+ id: string;
9379
+ caption: (string) | null;
9296
9380
  /**
9297
9381
  * IMAGE, VIDEO or CAROUSEL_ALBUM
9298
9382
  */
9299
- mediaType?: (string) | null;
9383
+ mediaType: (string) | null;
9300
9384
  /**
9301
9385
  * FEED or REELS
9302
9386
  */
9303
- mediaProductType?: (string) | null;
9304
- timestamp?: (string) | null;
9305
- permalink?: (string) | null;
9387
+ mediaProductType: (string) | null;
9388
+ timestamp: (string) | null;
9389
+ permalink: (string) | null;
9306
9390
  /**
9307
9391
  * Null when the owner hides like counts
9308
9392
  */
9309
- likeCount?: (number) | null;
9310
- commentsCount?: (number) | null;
9393
+ likeCount: (number) | null;
9394
+ commentsCount: (number) | null;
9395
+ /**
9396
+ * Temporary CDN URL that expires; download the file rather than storing the link. Null on videos whose audio is licensed music, use thumbnailUrl for the cover.
9397
+ */
9398
+ mediaUrl: (string) | null;
9399
+ /**
9400
+ * Video cover frame, VIDEO only. Temporary CDN URL.
9401
+ */
9402
+ thumbnailUrl: (string) | null;
9403
+ /**
9404
+ * Reels only. Null on images and carousels.
9405
+ */
9406
+ viewCount: (number) | null;
9407
+ /**
9408
+ * Carousel slides in order. Null unless mediaType is CAROUSEL_ALBUM.
9409
+ */
9410
+ children: Array<{
9411
+ id: string;
9412
+ mediaType: (string) | null;
9413
+ mediaUrl: (string) | null;
9414
+ thumbnailUrl: (string) | null;
9415
+ }> | null;
9311
9416
  }>;
9312
9417
  };
9313
9418
  type InstagramDemographicsResponse = {
@@ -42983,11 +43088,23 @@ type GetCampaignAnalyticsData = {
42983
43088
  * **Meta**: age, gender, country, publisher_platform, device_platform, region,
42984
43089
  * platform_position, impression_device, video_asset, image_asset, body_asset, title_asset.
42985
43090
  *
43091
+ * **TikTok**: gender, age, country (or country_code), publisher_platform (or platform),
43092
+ * ac, language, placement. TikTok serves at most 365 days per breakdown, so a longer
43093
+ * range is read over its last 365 days and `analytics.breakdownsRange` says which window.
43094
+ *
42986
43095
  * **LinkedIn** (firmographics): job_title, job_function, seniority, industry,
42987
43096
  * company, company_size, country, region. Rows carry the raw pivot `value`
42988
43097
  * plus a resolved `name`. LinkedIn serves these aggregated over the whole
42989
43098
  * range, delays the data 12-24h, and omits segments with fewer than 3 events.
42990
43099
  *
43100
+ * A known dimension the platform cannot break down by is listed in
43101
+ * `analytics.unsupportedBreakdowns` instead of being dropped (with guidance in
43102
+ * `analytics.breakdownHints` where there is an alternative); the rest of the response
43103
+ * is unchanged. An unknown name returns 400. A TikTok dimension that fails is listed
43104
+ * in `analytics.breakdownErrors` and the response stays 200.
43105
+ * Metrics TikTok refuses for a dimension are listed in `analytics.breakdownDroppedMetrics`,
43106
+ * and the row values derived from them are null.
43107
+ *
42991
43108
  */
42992
43109
  breakdowns?: string;
42993
43110
  /**
@@ -43353,7 +43470,7 @@ type QueryAdInsightsData = {
43353
43470
  */
43354
43471
  after?: string;
43355
43472
  /**
43356
- * Comma-separated Graph breakdowns (e.g. age,gender or publisher_platform).
43473
+ * Meta only: comma-separated Graph breakdowns (e.g. age,gender or publisher_platform). Returns 400 on TikTok (add the breakdown to dimensions with reportType=AUDIENCE, e.g. dimensions=campaign_id,placement) and on Google (select segments.* in the query).
43357
43474
  */
43358
43475
  breakdowns?: string;
43359
43476
  /**
@@ -43581,15 +43698,26 @@ type GetAdAnalyticsData = {
43581
43698
  /**
43582
43699
  * Comma-separated breakdown dimensions.
43583
43700
  *
43584
- * **Meta**: age, gender, country, publisher_platform, device_platform, region.
43701
+ * **Meta**: age, gender, country, publisher_platform, device_platform, region,
43702
+ * platform_position, impression_device, video_asset, image_asset, body_asset, title_asset.
43585
43703
  *
43586
- * **TikTok**: gender, age, country_code, platform, ac, language.
43704
+ * **TikTok**: gender, age, country (or country_code), publisher_platform (or platform),
43705
+ * ac, language, placement. TikTok serves at most 365 days per breakdown, so a longer
43706
+ * range is read over its last 365 days and `analytics.breakdownsRange` says which window.
43587
43707
  *
43588
43708
  * **LinkedIn** (firmographics): job_title, job_function, seniority, industry,
43589
43709
  * company, company_size, country, region. Rows carry the raw pivot `value`
43590
43710
  * plus a resolved `name`. LinkedIn serves these aggregated over the whole
43591
43711
  * range, delays the data 12-24h, and omits segments with fewer than 3 events.
43592
43712
  *
43713
+ * A known dimension the platform cannot break down by is listed in
43714
+ * `analytics.unsupportedBreakdowns` instead of being dropped (with guidance in
43715
+ * `analytics.breakdownHints` where there is an alternative); the rest of the response
43716
+ * is unchanged. An unknown name returns 400. A TikTok dimension that fails is listed
43717
+ * in `analytics.breakdownErrors` and the response stays 200.
43718
+ * Metrics TikTok refuses for a dimension are listed in `analytics.breakdownDroppedMetrics`,
43719
+ * and the row values derived from them are null.
43720
+ *
43593
43721
  */
43594
43722
  breakdowns?: string;
43595
43723
  /**
package/dist/index.d.ts CHANGED
@@ -2540,12 +2540,54 @@ type AdAnalyticsResponse = {
2540
2540
  * keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
2541
2541
  * is not part of the stored metrics series.
2542
2542
  *
2543
+ * TikTok rows are keyed by TikTok's own dimension name (`country_code` for
2544
+ * `country`, `platform` for `publisher_platform`). `placement` rows carry the
2545
+ * label TikTok Ads Manager shows (`TikTok`, `TikTok Ad Network`, `News Feed App Series`)
2546
+ * in `placement` and TikTok's API value (`PLACEMENT_TIKTOK`, `PLACEMENT_PANGLE`,
2547
+ * `PLACEMENT_GLOBAL_APP_BUNDLE`) in `placementRaw`; a value without a known label
2548
+ * carries the raw value in both.
2549
+ *
2550
+ * A requested dimension with no data in the range is an empty array.
2551
+ *
2543
2552
  */
2544
2553
  breakdowns?: {
2545
2554
  [key: string]: Array<{
2546
2555
  [key: string]: unknown;
2547
2556
  }>;
2548
2557
  };
2558
+ /**
2559
+ * Requested breakdowns this platform cannot break down by (e.g. region on TikTok, any breakdown on Google). Absent when every requested breakdown is supported.
2560
+ */
2561
+ unsupportedBreakdowns?: Array<(string)>;
2562
+ /**
2563
+ * Guidance for some names in unsupportedBreakdowns, keyed by that name (e.g. placement on Meta points at publisher_platform and platform_position; platform_position on TikTok points at placement). Absent when no unsupported name has a hint.
2564
+ */
2565
+ breakdownHints?: {
2566
+ [key: string]: (string);
2567
+ };
2568
+ /**
2569
+ * TikTok only: breakdowns the platform failed to return (rate limit, permission, rejected query). Each one is an empty array under breakdowns; summary and daily are unaffected. Absent when every breakdown answered.
2570
+ */
2571
+ breakdownErrors?: Array<{
2572
+ breakdown?: string;
2573
+ /**
2574
+ * The platform's error message.
2575
+ */
2576
+ message?: string;
2577
+ }>;
2578
+ /**
2579
+ * TikTok only: TikTok metric names TikTok refused for a breakdown, keyed by the requested breakdown (e.g. total_purchase and total_purchase_value have no relation to platform, ac or language). Every row value derived from a refused metric is null in that breakdown (purchaseValue and roas, or the matching actions and actionValues entries), never a number computed without it. Absent when no metric was refused.
2580
+ */
2581
+ breakdownDroppedMetrics?: {
2582
+ [key: string]: Array<(string)>;
2583
+ };
2584
+ /**
2585
+ * TikTok only, present when the requested range is longer than the 365 days TikTok serves per breakdown: the window the breakdowns cover (the last 365 days of the range). summary and daily still cover the full range.
2586
+ */
2587
+ breakdownsRange?: {
2588
+ fromDate?: string;
2589
+ toDate?: string;
2590
+ };
2549
2591
  };
2550
2592
  };
2551
2593
  /**
@@ -5062,12 +5104,54 @@ type CampaignAnalyticsResponse = {
5062
5104
  * keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
5063
5105
  * is not part of the stored metrics series.
5064
5106
  *
5107
+ * TikTok rows are keyed by TikTok's own dimension name (`country_code` for
5108
+ * `country`, `platform` for `publisher_platform`). `placement` rows carry the
5109
+ * label TikTok Ads Manager shows (`TikTok`, `TikTok Ad Network`, `News Feed App Series`)
5110
+ * in `placement` and TikTok's API value (`PLACEMENT_TIKTOK`, `PLACEMENT_PANGLE`,
5111
+ * `PLACEMENT_GLOBAL_APP_BUNDLE`) in `placementRaw`; a value without a known label
5112
+ * carries the raw value in both.
5113
+ *
5114
+ * A requested dimension with no data in the range is an empty array.
5115
+ *
5065
5116
  */
5066
5117
  breakdowns?: {
5067
5118
  [key: string]: Array<{
5068
5119
  [key: string]: unknown;
5069
5120
  }>;
5070
5121
  };
5122
+ /**
5123
+ * Requested breakdowns this platform cannot break down by (e.g. region on TikTok, any breakdown on Google). Absent when every requested breakdown is supported.
5124
+ */
5125
+ unsupportedBreakdowns?: Array<(string)>;
5126
+ /**
5127
+ * Guidance for some names in unsupportedBreakdowns, keyed by that name (e.g. placement on Meta points at publisher_platform and platform_position; platform_position on TikTok points at placement). Absent when no unsupported name has a hint.
5128
+ */
5129
+ breakdownHints?: {
5130
+ [key: string]: (string);
5131
+ };
5132
+ /**
5133
+ * TikTok only: breakdowns the platform failed to return (rate limit, permission, rejected query). Each one is an empty array under breakdowns; summary and daily are unaffected. Absent when every breakdown answered.
5134
+ */
5135
+ breakdownErrors?: Array<{
5136
+ breakdown?: string;
5137
+ /**
5138
+ * The platform's error message.
5139
+ */
5140
+ message?: string;
5141
+ }>;
5142
+ /**
5143
+ * TikTok only: TikTok metric names TikTok refused for a breakdown, keyed by the requested breakdown (e.g. total_purchase and total_purchase_value have no relation to platform, ac or language). Every row value derived from a refused metric is null in that breakdown (purchaseValue and roas, or the matching actions and actionValues entries), never a number computed without it. Absent when no metric was refused.
5144
+ */
5145
+ breakdownDroppedMetrics?: {
5146
+ [key: string]: Array<(string)>;
5147
+ };
5148
+ /**
5149
+ * TikTok only, present when the requested range is longer than the 365 days TikTok serves per breakdown: the window the breakdowns cover (the last 365 days of the range). summary and daily still cover the full range.
5150
+ */
5151
+ breakdownsRange?: {
5152
+ fromDate?: string;
5153
+ toDate?: string;
5154
+ };
5071
5155
  };
5072
5156
  };
5073
5157
  /**
@@ -9291,23 +9375,44 @@ type InstagramBusinessDiscovery = {
9291
9375
  * Most recent media first, up to `limit`.
9292
9376
  */
9293
9377
  media: Array<{
9294
- id?: string;
9295
- caption?: (string) | null;
9378
+ id: string;
9379
+ caption: (string) | null;
9296
9380
  /**
9297
9381
  * IMAGE, VIDEO or CAROUSEL_ALBUM
9298
9382
  */
9299
- mediaType?: (string) | null;
9383
+ mediaType: (string) | null;
9300
9384
  /**
9301
9385
  * FEED or REELS
9302
9386
  */
9303
- mediaProductType?: (string) | null;
9304
- timestamp?: (string) | null;
9305
- permalink?: (string) | null;
9387
+ mediaProductType: (string) | null;
9388
+ timestamp: (string) | null;
9389
+ permalink: (string) | null;
9306
9390
  /**
9307
9391
  * Null when the owner hides like counts
9308
9392
  */
9309
- likeCount?: (number) | null;
9310
- commentsCount?: (number) | null;
9393
+ likeCount: (number) | null;
9394
+ commentsCount: (number) | null;
9395
+ /**
9396
+ * Temporary CDN URL that expires; download the file rather than storing the link. Null on videos whose audio is licensed music, use thumbnailUrl for the cover.
9397
+ */
9398
+ mediaUrl: (string) | null;
9399
+ /**
9400
+ * Video cover frame, VIDEO only. Temporary CDN URL.
9401
+ */
9402
+ thumbnailUrl: (string) | null;
9403
+ /**
9404
+ * Reels only. Null on images and carousels.
9405
+ */
9406
+ viewCount: (number) | null;
9407
+ /**
9408
+ * Carousel slides in order. Null unless mediaType is CAROUSEL_ALBUM.
9409
+ */
9410
+ children: Array<{
9411
+ id: string;
9412
+ mediaType: (string) | null;
9413
+ mediaUrl: (string) | null;
9414
+ thumbnailUrl: (string) | null;
9415
+ }> | null;
9311
9416
  }>;
9312
9417
  };
9313
9418
  type InstagramDemographicsResponse = {
@@ -42983,11 +43088,23 @@ type GetCampaignAnalyticsData = {
42983
43088
  * **Meta**: age, gender, country, publisher_platform, device_platform, region,
42984
43089
  * platform_position, impression_device, video_asset, image_asset, body_asset, title_asset.
42985
43090
  *
43091
+ * **TikTok**: gender, age, country (or country_code), publisher_platform (or platform),
43092
+ * ac, language, placement. TikTok serves at most 365 days per breakdown, so a longer
43093
+ * range is read over its last 365 days and `analytics.breakdownsRange` says which window.
43094
+ *
42986
43095
  * **LinkedIn** (firmographics): job_title, job_function, seniority, industry,
42987
43096
  * company, company_size, country, region. Rows carry the raw pivot `value`
42988
43097
  * plus a resolved `name`. LinkedIn serves these aggregated over the whole
42989
43098
  * range, delays the data 12-24h, and omits segments with fewer than 3 events.
42990
43099
  *
43100
+ * A known dimension the platform cannot break down by is listed in
43101
+ * `analytics.unsupportedBreakdowns` instead of being dropped (with guidance in
43102
+ * `analytics.breakdownHints` where there is an alternative); the rest of the response
43103
+ * is unchanged. An unknown name returns 400. A TikTok dimension that fails is listed
43104
+ * in `analytics.breakdownErrors` and the response stays 200.
43105
+ * Metrics TikTok refuses for a dimension are listed in `analytics.breakdownDroppedMetrics`,
43106
+ * and the row values derived from them are null.
43107
+ *
42991
43108
  */
42992
43109
  breakdowns?: string;
42993
43110
  /**
@@ -43353,7 +43470,7 @@ type QueryAdInsightsData = {
43353
43470
  */
43354
43471
  after?: string;
43355
43472
  /**
43356
- * Comma-separated Graph breakdowns (e.g. age,gender or publisher_platform).
43473
+ * Meta only: comma-separated Graph breakdowns (e.g. age,gender or publisher_platform). Returns 400 on TikTok (add the breakdown to dimensions with reportType=AUDIENCE, e.g. dimensions=campaign_id,placement) and on Google (select segments.* in the query).
43357
43474
  */
43358
43475
  breakdowns?: string;
43359
43476
  /**
@@ -43581,15 +43698,26 @@ type GetAdAnalyticsData = {
43581
43698
  /**
43582
43699
  * Comma-separated breakdown dimensions.
43583
43700
  *
43584
- * **Meta**: age, gender, country, publisher_platform, device_platform, region.
43701
+ * **Meta**: age, gender, country, publisher_platform, device_platform, region,
43702
+ * platform_position, impression_device, video_asset, image_asset, body_asset, title_asset.
43585
43703
  *
43586
- * **TikTok**: gender, age, country_code, platform, ac, language.
43704
+ * **TikTok**: gender, age, country (or country_code), publisher_platform (or platform),
43705
+ * ac, language, placement. TikTok serves at most 365 days per breakdown, so a longer
43706
+ * range is read over its last 365 days and `analytics.breakdownsRange` says which window.
43587
43707
  *
43588
43708
  * **LinkedIn** (firmographics): job_title, job_function, seniority, industry,
43589
43709
  * company, company_size, country, region. Rows carry the raw pivot `value`
43590
43710
  * plus a resolved `name`. LinkedIn serves these aggregated over the whole
43591
43711
  * range, delays the data 12-24h, and omits segments with fewer than 3 events.
43592
43712
  *
43713
+ * A known dimension the platform cannot break down by is listed in
43714
+ * `analytics.unsupportedBreakdowns` instead of being dropped (with guidance in
43715
+ * `analytics.breakdownHints` where there is an alternative); the rest of the response
43716
+ * is unchanged. An unknown name returns 400. A TikTok dimension that fails is listed
43717
+ * in `analytics.breakdownErrors` and the response stays 200.
43718
+ * Metrics TikTok refuses for a dimension are listed in `analytics.breakdownDroppedMetrics`,
43719
+ * and the row values derived from them are null.
43720
+ *
43593
43721
  */
43594
43722
  breakdowns?: string;
43595
43723
  /**
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.1189",
39
+ version: "0.2.1191",
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.1189",
8
+ version: "0.2.1191",
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.1189",
3
+ "version": "0.2.1191",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -2999,6 +2999,8 @@ export const getInstagramAudio = <ThrowOnError extends boolean = false>(options:
2999
2999
  *
3000
3000
  * `likeCount` is null when the owner hides like counts.
3001
3001
  *
3002
+ * Media URLs are temporary, and fields Meta does not return come back as null, never omitted.
3003
+ *
3002
3004
  */
3003
3005
  export const getInstagramBusinessDiscovery = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInstagramBusinessDiscoveryData, ThrowOnError>) => {
3004
3006
  return (options?.client ?? client).get<GetInstagramBusinessDiscoveryResponse, GetInstagramBusinessDiscoveryError, ThrowOnError>({
@@ -10945,9 +10947,9 @@ export const removeAdGroupAssets = <ThrowOnError extends boolean = false>(option
10945
10947
  *
10946
10948
  * Returns performance analytics for a whole campaign in one call: summary metrics, a daily
10947
10949
  * timeline over the requested date range (summed across the campaign's ads), and optional
10948
- * demographic breakdowns. Breakdowns are fetched live from Meta at the campaign level (one call
10949
- * per dimension, no per-ad fan-out), so an agency dashboard gets campaign-level age/gender/etc.
10950
- * without summing thousands of per-ad reads. `campaignId` is the platform campaign id; pass
10950
+ * demographic breakdowns. Breakdowns are fetched live from Meta, TikTok or LinkedIn at the campaign
10951
+ * level (one call per dimension, no per-ad fan-out), so an agency dashboard gets campaign-level
10952
+ * age/gender/placement/etc. without summing thousands of per-ad reads. `campaignId` is the platform campaign id; pass
10951
10953
  * `platform` when a campaign id could be ambiguous across platforms. If no date range is provided,
10952
10954
  * defaults to the last 90 days. Date range is capped at 730 days max.
10953
10955
  * Google adds searchImpressionShare, searchBudgetLostImpressionShare,
@@ -11188,10 +11190,10 @@ export const getAdInsightsReport = <ThrowOnError extends boolean = false>(option
11188
11190
 
11189
11191
  /**
11190
11192
  * Get ad analytics
11191
- * Returns one ad's performance summary and daily timeline, with optional audience breakdowns on Meta and TikTok.
11193
+ * Returns one ad's performance summary and daily timeline, with optional audience breakdowns on Meta, TikTok and LinkedIn.
11192
11194
  *
11193
11195
  * Includes summary metrics, a daily timeline
11194
- * over the requested date range, and optional demographic breakdowns (Meta and TikTok only).
11196
+ * over the requested date range, and optional demographic breakdowns (Meta, TikTok and LinkedIn only).
11195
11197
  * If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
11196
11198
  *
11197
11199
  */
@@ -543,12 +543,54 @@ export type AdAnalyticsResponse = {
543
543
  * keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
544
544
  * is not part of the stored metrics series.
545
545
  *
546
+ * TikTok rows are keyed by TikTok's own dimension name (`country_code` for
547
+ * `country`, `platform` for `publisher_platform`). `placement` rows carry the
548
+ * label TikTok Ads Manager shows (`TikTok`, `TikTok Ad Network`, `News Feed App Series`)
549
+ * in `placement` and TikTok's API value (`PLACEMENT_TIKTOK`, `PLACEMENT_PANGLE`,
550
+ * `PLACEMENT_GLOBAL_APP_BUNDLE`) in `placementRaw`; a value without a known label
551
+ * carries the raw value in both.
552
+ *
553
+ * A requested dimension with no data in the range is an empty array.
554
+ *
546
555
  */
547
556
  breakdowns?: {
548
557
  [key: string]: Array<{
549
558
  [key: string]: unknown;
550
559
  }>;
551
560
  };
561
+ /**
562
+ * Requested breakdowns this platform cannot break down by (e.g. region on TikTok, any breakdown on Google). Absent when every requested breakdown is supported.
563
+ */
564
+ unsupportedBreakdowns?: Array<(string)>;
565
+ /**
566
+ * Guidance for some names in unsupportedBreakdowns, keyed by that name (e.g. placement on Meta points at publisher_platform and platform_position; platform_position on TikTok points at placement). Absent when no unsupported name has a hint.
567
+ */
568
+ breakdownHints?: {
569
+ [key: string]: (string);
570
+ };
571
+ /**
572
+ * TikTok only: breakdowns the platform failed to return (rate limit, permission, rejected query). Each one is an empty array under breakdowns; summary and daily are unaffected. Absent when every breakdown answered.
573
+ */
574
+ breakdownErrors?: Array<{
575
+ breakdown?: string;
576
+ /**
577
+ * The platform's error message.
578
+ */
579
+ message?: string;
580
+ }>;
581
+ /**
582
+ * TikTok only: TikTok metric names TikTok refused for a breakdown, keyed by the requested breakdown (e.g. total_purchase and total_purchase_value have no relation to platform, ac or language). Every row value derived from a refused metric is null in that breakdown (purchaseValue and roas, or the matching actions and actionValues entries), never a number computed without it. Absent when no metric was refused.
583
+ */
584
+ breakdownDroppedMetrics?: {
585
+ [key: string]: Array<(string)>;
586
+ };
587
+ /**
588
+ * TikTok only, present when the requested range is longer than the 365 days TikTok serves per breakdown: the window the breakdowns cover (the last 365 days of the range). summary and daily still cover the full range.
589
+ */
590
+ breakdownsRange?: {
591
+ fromDate?: string;
592
+ toDate?: string;
593
+ };
552
594
  };
553
595
  };
554
596
 
@@ -3178,12 +3220,54 @@ export type CampaignAnalyticsResponse = {
3178
3220
  * keys are ABSENT rather than 0. `audiencePenetration` is available here only: it
3179
3221
  * is not part of the stored metrics series.
3180
3222
  *
3223
+ * TikTok rows are keyed by TikTok's own dimension name (`country_code` for
3224
+ * `country`, `platform` for `publisher_platform`). `placement` rows carry the
3225
+ * label TikTok Ads Manager shows (`TikTok`, `TikTok Ad Network`, `News Feed App Series`)
3226
+ * in `placement` and TikTok's API value (`PLACEMENT_TIKTOK`, `PLACEMENT_PANGLE`,
3227
+ * `PLACEMENT_GLOBAL_APP_BUNDLE`) in `placementRaw`; a value without a known label
3228
+ * carries the raw value in both.
3229
+ *
3230
+ * A requested dimension with no data in the range is an empty array.
3231
+ *
3181
3232
  */
3182
3233
  breakdowns?: {
3183
3234
  [key: string]: Array<{
3184
3235
  [key: string]: unknown;
3185
3236
  }>;
3186
3237
  };
3238
+ /**
3239
+ * Requested breakdowns this platform cannot break down by (e.g. region on TikTok, any breakdown on Google). Absent when every requested breakdown is supported.
3240
+ */
3241
+ unsupportedBreakdowns?: Array<(string)>;
3242
+ /**
3243
+ * Guidance for some names in unsupportedBreakdowns, keyed by that name (e.g. placement on Meta points at publisher_platform and platform_position; platform_position on TikTok points at placement). Absent when no unsupported name has a hint.
3244
+ */
3245
+ breakdownHints?: {
3246
+ [key: string]: (string);
3247
+ };
3248
+ /**
3249
+ * TikTok only: breakdowns the platform failed to return (rate limit, permission, rejected query). Each one is an empty array under breakdowns; summary and daily are unaffected. Absent when every breakdown answered.
3250
+ */
3251
+ breakdownErrors?: Array<{
3252
+ breakdown?: string;
3253
+ /**
3254
+ * The platform's error message.
3255
+ */
3256
+ message?: string;
3257
+ }>;
3258
+ /**
3259
+ * TikTok only: TikTok metric names TikTok refused for a breakdown, keyed by the requested breakdown (e.g. total_purchase and total_purchase_value have no relation to platform, ac or language). Every row value derived from a refused metric is null in that breakdown (purchaseValue and roas, or the matching actions and actionValues entries), never a number computed without it. Absent when no metric was refused.
3260
+ */
3261
+ breakdownDroppedMetrics?: {
3262
+ [key: string]: Array<(string)>;
3263
+ };
3264
+ /**
3265
+ * TikTok only, present when the requested range is longer than the 365 days TikTok serves per breakdown: the window the breakdowns cover (the last 365 days of the range). summary and daily still cover the full range.
3266
+ */
3267
+ breakdownsRange?: {
3268
+ fromDate?: string;
3269
+ toDate?: string;
3270
+ };
3187
3271
  };
3188
3272
  };
3189
3273
 
@@ -7599,23 +7683,44 @@ export type InstagramBusinessDiscovery = {
7599
7683
  * Most recent media first, up to `limit`.
7600
7684
  */
7601
7685
  media: Array<{
7602
- id?: string;
7603
- caption?: (string) | null;
7686
+ id: string;
7687
+ caption: (string) | null;
7604
7688
  /**
7605
7689
  * IMAGE, VIDEO or CAROUSEL_ALBUM
7606
7690
  */
7607
- mediaType?: (string) | null;
7691
+ mediaType: (string) | null;
7608
7692
  /**
7609
7693
  * FEED or REELS
7610
7694
  */
7611
- mediaProductType?: (string) | null;
7612
- timestamp?: (string) | null;
7613
- permalink?: (string) | null;
7695
+ mediaProductType: (string) | null;
7696
+ timestamp: (string) | null;
7697
+ permalink: (string) | null;
7614
7698
  /**
7615
7699
  * Null when the owner hides like counts
7616
7700
  */
7617
- likeCount?: (number) | null;
7618
- commentsCount?: (number) | null;
7701
+ likeCount: (number) | null;
7702
+ commentsCount: (number) | null;
7703
+ /**
7704
+ * Temporary CDN URL that expires; download the file rather than storing the link. Null on videos whose audio is licensed music, use thumbnailUrl for the cover.
7705
+ */
7706
+ mediaUrl: (string) | null;
7707
+ /**
7708
+ * Video cover frame, VIDEO only. Temporary CDN URL.
7709
+ */
7710
+ thumbnailUrl: (string) | null;
7711
+ /**
7712
+ * Reels only. Null on images and carousels.
7713
+ */
7714
+ viewCount: (number) | null;
7715
+ /**
7716
+ * Carousel slides in order. Null unless mediaType is CAROUSEL_ALBUM.
7717
+ */
7718
+ children: Array<{
7719
+ id: string;
7720
+ mediaType: (string) | null;
7721
+ mediaUrl: (string) | null;
7722
+ thumbnailUrl: (string) | null;
7723
+ }> | null;
7619
7724
  }>;
7620
7725
  };
7621
7726
 
@@ -43516,11 +43621,23 @@ export type GetCampaignAnalyticsData = {
43516
43621
  * **Meta**: age, gender, country, publisher_platform, device_platform, region,
43517
43622
  * platform_position, impression_device, video_asset, image_asset, body_asset, title_asset.
43518
43623
  *
43624
+ * **TikTok**: gender, age, country (or country_code), publisher_platform (or platform),
43625
+ * ac, language, placement. TikTok serves at most 365 days per breakdown, so a longer
43626
+ * range is read over its last 365 days and `analytics.breakdownsRange` says which window.
43627
+ *
43519
43628
  * **LinkedIn** (firmographics): job_title, job_function, seniority, industry,
43520
43629
  * company, company_size, country, region. Rows carry the raw pivot `value`
43521
43630
  * plus a resolved `name`. LinkedIn serves these aggregated over the whole
43522
43631
  * range, delays the data 12-24h, and omits segments with fewer than 3 events.
43523
43632
  *
43633
+ * A known dimension the platform cannot break down by is listed in
43634
+ * `analytics.unsupportedBreakdowns` instead of being dropped (with guidance in
43635
+ * `analytics.breakdownHints` where there is an alternative); the rest of the response
43636
+ * is unchanged. An unknown name returns 400. A TikTok dimension that fails is listed
43637
+ * in `analytics.breakdownErrors` and the response stays 200.
43638
+ * Metrics TikTok refuses for a dimension are listed in `analytics.breakdownDroppedMetrics`,
43639
+ * and the row values derived from them are null.
43640
+ *
43524
43641
  */
43525
43642
  breakdowns?: string;
43526
43643
  /**
@@ -43907,7 +44024,7 @@ export type QueryAdInsightsData = {
43907
44024
  */
43908
44025
  after?: string;
43909
44026
  /**
43910
- * Comma-separated Graph breakdowns (e.g. age,gender or publisher_platform).
44027
+ * Meta only: comma-separated Graph breakdowns (e.g. age,gender or publisher_platform). Returns 400 on TikTok (add the breakdown to dimensions with reportType=AUDIENCE, e.g. dimensions=campaign_id,placement) and on Google (select segments.* in the query).
43911
44028
  */
43912
44029
  breakdowns?: string;
43913
44030
  /**
@@ -44144,15 +44261,26 @@ export type GetAdAnalyticsData = {
44144
44261
  /**
44145
44262
  * Comma-separated breakdown dimensions.
44146
44263
  *
44147
- * **Meta**: age, gender, country, publisher_platform, device_platform, region.
44264
+ * **Meta**: age, gender, country, publisher_platform, device_platform, region,
44265
+ * platform_position, impression_device, video_asset, image_asset, body_asset, title_asset.
44148
44266
  *
44149
- * **TikTok**: gender, age, country_code, platform, ac, language.
44267
+ * **TikTok**: gender, age, country (or country_code), publisher_platform (or platform),
44268
+ * ac, language, placement. TikTok serves at most 365 days per breakdown, so a longer
44269
+ * range is read over its last 365 days and `analytics.breakdownsRange` says which window.
44150
44270
  *
44151
44271
  * **LinkedIn** (firmographics): job_title, job_function, seniority, industry,
44152
44272
  * company, company_size, country, region. Rows carry the raw pivot `value`
44153
44273
  * plus a resolved `name`. LinkedIn serves these aggregated over the whole
44154
44274
  * range, delays the data 12-24h, and omits segments with fewer than 3 events.
44155
44275
  *
44276
+ * A known dimension the platform cannot break down by is listed in
44277
+ * `analytics.unsupportedBreakdowns` instead of being dropped (with guidance in
44278
+ * `analytics.breakdownHints` where there is an alternative); the rest of the response
44279
+ * is unchanged. An unknown name returns 400. A TikTok dimension that fails is listed
44280
+ * in `analytics.breakdownErrors` and the response stays 200.
44281
+ * Metrics TikTok refuses for a dimension are listed in `analytics.breakdownDroppedMetrics`,
44282
+ * and the row values derived from them are null.
44283
+ *
44156
44284
  */
44157
44285
  breakdowns?: string;
44158
44286
  /**