@getlatedev/node 0.2.1436 → 0.2.1437
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 +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +6 -0
- package/src/generated/types.gen.ts +7 -3
package/dist/index.d.mts
CHANGED
|
@@ -23503,7 +23503,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23503
23503
|
*/
|
|
23504
23504
|
provisionalSince?: string;
|
|
23505
23505
|
/**
|
|
23506
|
-
*
|
|
23506
|
+
* Whether YouTube returned startedWatching and stoppedWatching for this curve. When false, both are 0 placeholders in every point, not measured values.
|
|
23507
|
+
*/
|
|
23508
|
+
segmentMetricsAvailable?: boolean;
|
|
23509
|
+
/**
|
|
23510
|
+
* Up to 100 points covering the video timeline, aggregated over the date range. Contains only the buckets YouTube reports for that range and is never zero-filled, so it can end before 1.0, skip positions, or be empty.
|
|
23507
23511
|
*/
|
|
23508
23512
|
retentionCurve?: Array<{
|
|
23509
23513
|
/**
|
|
@@ -23519,11 +23523,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23519
23523
|
*/
|
|
23520
23524
|
relativeRetentionPerformance?: number;
|
|
23521
23525
|
/**
|
|
23522
|
-
* Viewers who started watching in this segment. 0 when
|
|
23526
|
+
* Viewers who started watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23523
23527
|
*/
|
|
23524
23528
|
startedWatching?: number;
|
|
23525
23529
|
/**
|
|
23526
|
-
* Viewers who stopped watching in this segment. 0 when
|
|
23530
|
+
* Viewers who stopped watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23527
23531
|
*/
|
|
23528
23532
|
stoppedWatching?: number;
|
|
23529
23533
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -23503,7 +23503,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23503
23503
|
*/
|
|
23504
23504
|
provisionalSince?: string;
|
|
23505
23505
|
/**
|
|
23506
|
-
*
|
|
23506
|
+
* Whether YouTube returned startedWatching and stoppedWatching for this curve. When false, both are 0 placeholders in every point, not measured values.
|
|
23507
|
+
*/
|
|
23508
|
+
segmentMetricsAvailable?: boolean;
|
|
23509
|
+
/**
|
|
23510
|
+
* Up to 100 points covering the video timeline, aggregated over the date range. Contains only the buckets YouTube reports for that range and is never zero-filled, so it can end before 1.0, skip positions, or be empty.
|
|
23507
23511
|
*/
|
|
23508
23512
|
retentionCurve?: Array<{
|
|
23509
23513
|
/**
|
|
@@ -23519,11 +23523,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23519
23523
|
*/
|
|
23520
23524
|
relativeRetentionPerformance?: number;
|
|
23521
23525
|
/**
|
|
23522
|
-
* Viewers who started watching in this segment. 0 when
|
|
23526
|
+
* Viewers who started watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23523
23527
|
*/
|
|
23524
23528
|
startedWatching?: number;
|
|
23525
23529
|
/**
|
|
23526
|
-
* Viewers who stopped watching in this segment. 0 when
|
|
23530
|
+
* Viewers who stopped watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23527
23531
|
*/
|
|
23528
23532
|
stoppedWatching?: number;
|
|
23529
23533
|
/**
|
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.
|
|
39
|
+
version: "0.2.1437",
|
|
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.
|
|
8
|
+
version: "0.2.1437",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -316,11 +316,17 @@ export const getYouTubeDailyViews = <ThrowOnError extends boolean = false>(optio
|
|
|
316
316
|
* - Up to 100 points (elapsedVideoTimeRatio 0.01-1.0), aggregated over the whole date range. YouTube does not support per-day retention breakdowns.
|
|
317
317
|
* - audienceWatchRatio: the absolute share of viewers watching at that point in the video. It can exceed 1 (rewinds and looping, common on Shorts).
|
|
318
318
|
* - relativeRetentionPerformance: compares against videos of similar length (0 = worst, 0.5 = median, 1 = best).
|
|
319
|
+
* - Zernio returns exactly the buckets YouTube reports for the requested range and fills none in. A curve that ends before 1.0, or skips a position, means YouTube returned no row there for that range.
|
|
320
|
+
* - The range ends at toDate (default 3 days ago), so recent views are included only with a later toDate.
|
|
319
321
|
*
|
|
320
322
|
* ### Empty curves
|
|
321
323
|
*
|
|
322
324
|
* YouTube returns an empty curve for videos with very few views or before analytics processing completes (2-3 day delay).
|
|
323
325
|
*
|
|
326
|
+
* ### startedWatching and stoppedWatching
|
|
327
|
+
*
|
|
328
|
+
* YouTube does not return segment-level data for every video. Zernio then fetches the curve without it: `segmentMetricsAvailable` is `false` and both fields are `0` placeholders in every point. When it is `true`, a `0` is the value YouTube reported.
|
|
329
|
+
*
|
|
324
330
|
*/
|
|
325
331
|
export const getYouTubeVideoRetention = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetYouTubeVideoRetentionData, ThrowOnError>) => {
|
|
326
332
|
return (options?.client ?? client).get<GetYouTubeVideoRetentionResponse, GetYouTubeVideoRetentionError, ThrowOnError>({
|
|
@@ -22177,7 +22177,11 @@ export type YouTubeVideoRetentionResponse = {
|
|
|
22177
22177
|
*/
|
|
22178
22178
|
provisionalSince?: string;
|
|
22179
22179
|
/**
|
|
22180
|
-
*
|
|
22180
|
+
* Whether YouTube returned startedWatching and stoppedWatching for this curve. When false, both are 0 placeholders in every point, not measured values.
|
|
22181
|
+
*/
|
|
22182
|
+
segmentMetricsAvailable?: boolean;
|
|
22183
|
+
/**
|
|
22184
|
+
* Up to 100 points covering the video timeline, aggregated over the date range. Contains only the buckets YouTube reports for that range and is never zero-filled, so it can end before 1.0, skip positions, or be empty.
|
|
22181
22185
|
*/
|
|
22182
22186
|
retentionCurve?: Array<{
|
|
22183
22187
|
/**
|
|
@@ -22193,11 +22197,11 @@ export type YouTubeVideoRetentionResponse = {
|
|
|
22193
22197
|
*/
|
|
22194
22198
|
relativeRetentionPerformance?: number;
|
|
22195
22199
|
/**
|
|
22196
|
-
* Viewers who started watching in this segment. 0 when
|
|
22200
|
+
* Viewers who started watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
22197
22201
|
*/
|
|
22198
22202
|
startedWatching?: number;
|
|
22199
22203
|
/**
|
|
22200
|
-
* Viewers who stopped watching in this segment. 0 when
|
|
22204
|
+
* Viewers who stopped watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
22201
22205
|
*/
|
|
22202
22206
|
stoppedWatching?: number;
|
|
22203
22207
|
/**
|