@getlatedev/node 0.2.1435 → 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 +26 -11
- package/dist/index.d.ts +26 -11
- 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 +26 -11
package/dist/index.d.mts
CHANGED
|
@@ -10046,14 +10046,25 @@ type ErrorResponse = {
|
|
|
10046
10046
|
/**
|
|
10047
10047
|
* Additional structured context for the error (for example field-level validation errors). What it carries depends on the endpoint and platform.
|
|
10048
10048
|
*
|
|
10049
|
-
* **Meta ads refusals.** The ones customers hit most come back with their own `code` instead of `platform_api_error`, the field to fix in `param`, and `details.fix` ({ label, url })
|
|
10050
|
-
*
|
|
10051
|
-
*
|
|
10052
|
-
*
|
|
10053
|
-
* - `
|
|
10054
|
-
* - `
|
|
10055
|
-
* - `
|
|
10056
|
-
* - `
|
|
10049
|
+
* **Meta ads refusals.** The ones customers hit most come back with their own `code` instead of `platform_api_error`, the field to fix in `param`, and an English `details.hint` saying how to fix it. `details.fix` ({ label, url }) links the Meta page that resolves it, when there is one.
|
|
10050
|
+
*
|
|
10051
|
+
* The code is picked from Meta's numeric `code` and `error_subcode`, never from the message, so it is the same whatever language Meta wrote `error_user_msg` in. Branch on `code` and show `details.hint`.
|
|
10052
|
+
*
|
|
10053
|
+
* - `ad_account_payment_required`: the ad account has no usable payment method (subcode 1815010, 1359188).
|
|
10054
|
+
* - `ad_account_policy_not_accepted`: a business admin has to accept Meta's non-discrimination policy (subcode 2859002, 2859024).
|
|
10055
|
+
* - `lead_ads_terms_not_accepted`: the Facebook Page has not accepted the Lead Ads terms (subcode 1815089).
|
|
10056
|
+
* - `verified_advertiser_required`: the market requires a verified beneficiary and payer; send `regionalRegulationIdentities` (subcode 3858634, 3858636, 3858442, 3858548, 3858495).
|
|
10057
|
+
* - `ad_account_unusable`: the ad account is not active, or the business is restricted from advertising (subcode 1885316, 2446325, and 2490592, 4841021 below).
|
|
10058
|
+
* - `meta_security_check_required`: the Facebook user behind the connection is held at a security check (code 31).
|
|
10059
|
+
* - `meta_action_blocked`: Meta temporarily blocked the Facebook user from this action (subcode 2859015).
|
|
10060
|
+
* - `meta_ad_consent_required`: the Page or Instagram owner chose Meta without ads or less personalized ads (subcode 3858231, 3858412).
|
|
10061
|
+
* - `instagram_account_restricted`: Meta restricted the Instagram account the ad runs as (subcode 2207070).
|
|
10062
|
+
* - `insufficient_permissions`: the ad account cannot use the Instagram account, or the Facebook user has no advertiser permission on the Page (subcode 1815199, 1815202, 1885499, 1341012, and the Advertise permission case below).
|
|
10063
|
+
* - `whatsapp_number_not_linked`: the WhatsApp number is no longer linked to the Page (subcode 2446880).
|
|
10064
|
+
* - `invalid_targeting`: Meta refused the audience or a placement (subcode 1487079, 1870247, 2909035, 1870189, 1870188, 1487756, 1487843, 2490562).
|
|
10065
|
+
* - `post_not_boostable`: Meta does not allow the post to be promoted (subcode 2446187, 2875030, 1487472).
|
|
10066
|
+
* - `budget_too_low`: the budget is below Meta's minimum, which `platformError.error_user_msg` states (subcode 1885272).
|
|
10067
|
+
* - `meta_object_not_accessible`: Meta cannot load an object the request names (wrong ID, deleted, or no access); `platformError.message` names the ID (subcode 33, on ads routes only).
|
|
10057
10068
|
*
|
|
10058
10069
|
* Meta's own error stays in the message and in `platformError`.
|
|
10059
10070
|
*
|
|
@@ -23492,7 +23503,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23492
23503
|
*/
|
|
23493
23504
|
provisionalSince?: string;
|
|
23494
23505
|
/**
|
|
23495
|
-
*
|
|
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.
|
|
23496
23511
|
*/
|
|
23497
23512
|
retentionCurve?: Array<{
|
|
23498
23513
|
/**
|
|
@@ -23508,11 +23523,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23508
23523
|
*/
|
|
23509
23524
|
relativeRetentionPerformance?: number;
|
|
23510
23525
|
/**
|
|
23511
|
-
* Viewers who started watching in this segment. 0 when
|
|
23526
|
+
* Viewers who started watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23512
23527
|
*/
|
|
23513
23528
|
startedWatching?: number;
|
|
23514
23529
|
/**
|
|
23515
|
-
* Viewers who stopped watching in this segment. 0 when
|
|
23530
|
+
* Viewers who stopped watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23516
23531
|
*/
|
|
23517
23532
|
stoppedWatching?: number;
|
|
23518
23533
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -10046,14 +10046,25 @@ type ErrorResponse = {
|
|
|
10046
10046
|
/**
|
|
10047
10047
|
* Additional structured context for the error (for example field-level validation errors). What it carries depends on the endpoint and platform.
|
|
10048
10048
|
*
|
|
10049
|
-
* **Meta ads refusals.** The ones customers hit most come back with their own `code` instead of `platform_api_error`, the field to fix in `param`, and `details.fix` ({ label, url })
|
|
10050
|
-
*
|
|
10051
|
-
*
|
|
10052
|
-
*
|
|
10053
|
-
* - `
|
|
10054
|
-
* - `
|
|
10055
|
-
* - `
|
|
10056
|
-
* - `
|
|
10049
|
+
* **Meta ads refusals.** The ones customers hit most come back with their own `code` instead of `platform_api_error`, the field to fix in `param`, and an English `details.hint` saying how to fix it. `details.fix` ({ label, url }) links the Meta page that resolves it, when there is one.
|
|
10050
|
+
*
|
|
10051
|
+
* The code is picked from Meta's numeric `code` and `error_subcode`, never from the message, so it is the same whatever language Meta wrote `error_user_msg` in. Branch on `code` and show `details.hint`.
|
|
10052
|
+
*
|
|
10053
|
+
* - `ad_account_payment_required`: the ad account has no usable payment method (subcode 1815010, 1359188).
|
|
10054
|
+
* - `ad_account_policy_not_accepted`: a business admin has to accept Meta's non-discrimination policy (subcode 2859002, 2859024).
|
|
10055
|
+
* - `lead_ads_terms_not_accepted`: the Facebook Page has not accepted the Lead Ads terms (subcode 1815089).
|
|
10056
|
+
* - `verified_advertiser_required`: the market requires a verified beneficiary and payer; send `regionalRegulationIdentities` (subcode 3858634, 3858636, 3858442, 3858548, 3858495).
|
|
10057
|
+
* - `ad_account_unusable`: the ad account is not active, or the business is restricted from advertising (subcode 1885316, 2446325, and 2490592, 4841021 below).
|
|
10058
|
+
* - `meta_security_check_required`: the Facebook user behind the connection is held at a security check (code 31).
|
|
10059
|
+
* - `meta_action_blocked`: Meta temporarily blocked the Facebook user from this action (subcode 2859015).
|
|
10060
|
+
* - `meta_ad_consent_required`: the Page or Instagram owner chose Meta without ads or less personalized ads (subcode 3858231, 3858412).
|
|
10061
|
+
* - `instagram_account_restricted`: Meta restricted the Instagram account the ad runs as (subcode 2207070).
|
|
10062
|
+
* - `insufficient_permissions`: the ad account cannot use the Instagram account, or the Facebook user has no advertiser permission on the Page (subcode 1815199, 1815202, 1885499, 1341012, and the Advertise permission case below).
|
|
10063
|
+
* - `whatsapp_number_not_linked`: the WhatsApp number is no longer linked to the Page (subcode 2446880).
|
|
10064
|
+
* - `invalid_targeting`: Meta refused the audience or a placement (subcode 1487079, 1870247, 2909035, 1870189, 1870188, 1487756, 1487843, 2490562).
|
|
10065
|
+
* - `post_not_boostable`: Meta does not allow the post to be promoted (subcode 2446187, 2875030, 1487472).
|
|
10066
|
+
* - `budget_too_low`: the budget is below Meta's minimum, which `platformError.error_user_msg` states (subcode 1885272).
|
|
10067
|
+
* - `meta_object_not_accessible`: Meta cannot load an object the request names (wrong ID, deleted, or no access); `platformError.message` names the ID (subcode 33, on ads routes only).
|
|
10057
10068
|
*
|
|
10058
10069
|
* Meta's own error stays in the message and in `platformError`.
|
|
10059
10070
|
*
|
|
@@ -23492,7 +23503,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23492
23503
|
*/
|
|
23493
23504
|
provisionalSince?: string;
|
|
23494
23505
|
/**
|
|
23495
|
-
*
|
|
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.
|
|
23496
23511
|
*/
|
|
23497
23512
|
retentionCurve?: Array<{
|
|
23498
23513
|
/**
|
|
@@ -23508,11 +23523,11 @@ type YouTubeVideoRetentionResponse = {
|
|
|
23508
23523
|
*/
|
|
23509
23524
|
relativeRetentionPerformance?: number;
|
|
23510
23525
|
/**
|
|
23511
|
-
* Viewers who started watching in this segment. 0 when
|
|
23526
|
+
* Viewers who started watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23512
23527
|
*/
|
|
23513
23528
|
startedWatching?: number;
|
|
23514
23529
|
/**
|
|
23515
|
-
* Viewers who stopped watching in this segment. 0 when
|
|
23530
|
+
* Viewers who stopped watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
23516
23531
|
*/
|
|
23517
23532
|
stoppedWatching?: number;
|
|
23518
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>({
|
|
@@ -8111,14 +8111,25 @@ export type ErrorResponse = {
|
|
|
8111
8111
|
/**
|
|
8112
8112
|
* Additional structured context for the error (for example field-level validation errors). What it carries depends on the endpoint and platform.
|
|
8113
8113
|
*
|
|
8114
|
-
* **Meta ads refusals.** The ones customers hit most come back with their own `code` instead of `platform_api_error`, the field to fix in `param`, and `details.fix` ({ label, url })
|
|
8115
|
-
*
|
|
8116
|
-
*
|
|
8117
|
-
*
|
|
8118
|
-
* - `
|
|
8119
|
-
* - `
|
|
8120
|
-
* - `
|
|
8121
|
-
* - `
|
|
8114
|
+
* **Meta ads refusals.** The ones customers hit most come back with their own `code` instead of `platform_api_error`, the field to fix in `param`, and an English `details.hint` saying how to fix it. `details.fix` ({ label, url }) links the Meta page that resolves it, when there is one.
|
|
8115
|
+
*
|
|
8116
|
+
* The code is picked from Meta's numeric `code` and `error_subcode`, never from the message, so it is the same whatever language Meta wrote `error_user_msg` in. Branch on `code` and show `details.hint`.
|
|
8117
|
+
*
|
|
8118
|
+
* - `ad_account_payment_required`: the ad account has no usable payment method (subcode 1815010, 1359188).
|
|
8119
|
+
* - `ad_account_policy_not_accepted`: a business admin has to accept Meta's non-discrimination policy (subcode 2859002, 2859024).
|
|
8120
|
+
* - `lead_ads_terms_not_accepted`: the Facebook Page has not accepted the Lead Ads terms (subcode 1815089).
|
|
8121
|
+
* - `verified_advertiser_required`: the market requires a verified beneficiary and payer; send `regionalRegulationIdentities` (subcode 3858634, 3858636, 3858442, 3858548, 3858495).
|
|
8122
|
+
* - `ad_account_unusable`: the ad account is not active, or the business is restricted from advertising (subcode 1885316, 2446325, and 2490592, 4841021 below).
|
|
8123
|
+
* - `meta_security_check_required`: the Facebook user behind the connection is held at a security check (code 31).
|
|
8124
|
+
* - `meta_action_blocked`: Meta temporarily blocked the Facebook user from this action (subcode 2859015).
|
|
8125
|
+
* - `meta_ad_consent_required`: the Page or Instagram owner chose Meta without ads or less personalized ads (subcode 3858231, 3858412).
|
|
8126
|
+
* - `instagram_account_restricted`: Meta restricted the Instagram account the ad runs as (subcode 2207070).
|
|
8127
|
+
* - `insufficient_permissions`: the ad account cannot use the Instagram account, or the Facebook user has no advertiser permission on the Page (subcode 1815199, 1815202, 1885499, 1341012, and the Advertise permission case below).
|
|
8128
|
+
* - `whatsapp_number_not_linked`: the WhatsApp number is no longer linked to the Page (subcode 2446880).
|
|
8129
|
+
* - `invalid_targeting`: Meta refused the audience or a placement (subcode 1487079, 1870247, 2909035, 1870189, 1870188, 1487756, 1487843, 2490562).
|
|
8130
|
+
* - `post_not_boostable`: Meta does not allow the post to be promoted (subcode 2446187, 2875030, 1487472).
|
|
8131
|
+
* - `budget_too_low`: the budget is below Meta's minimum, which `platformError.error_user_msg` states (subcode 1885272).
|
|
8132
|
+
* - `meta_object_not_accessible`: Meta cannot load an object the request names (wrong ID, deleted, or no access); `platformError.message` names the ID (subcode 33, on ads routes only).
|
|
8122
8133
|
*
|
|
8123
8134
|
* Meta's own error stays in the message and in `platformError`.
|
|
8124
8135
|
*
|
|
@@ -22166,7 +22177,11 @@ export type YouTubeVideoRetentionResponse = {
|
|
|
22166
22177
|
*/
|
|
22167
22178
|
provisionalSince?: string;
|
|
22168
22179
|
/**
|
|
22169
|
-
*
|
|
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.
|
|
22170
22185
|
*/
|
|
22171
22186
|
retentionCurve?: Array<{
|
|
22172
22187
|
/**
|
|
@@ -22182,11 +22197,11 @@ export type YouTubeVideoRetentionResponse = {
|
|
|
22182
22197
|
*/
|
|
22183
22198
|
relativeRetentionPerformance?: number;
|
|
22184
22199
|
/**
|
|
22185
|
-
* Viewers who started watching in this segment. 0 when
|
|
22200
|
+
* Viewers who started watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
22186
22201
|
*/
|
|
22187
22202
|
startedWatching?: number;
|
|
22188
22203
|
/**
|
|
22189
|
-
* Viewers who stopped watching in this segment. 0 when
|
|
22204
|
+
* Viewers who stopped watching in this segment. A 0 placeholder when segmentMetricsAvailable is false.
|
|
22190
22205
|
*/
|
|
22191
22206
|
stoppedWatching?: number;
|
|
22192
22207
|
/**
|