@zernio/node 0.2.1045 → 0.2.1047
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/README.md +1 -0
- package/dist/index.d.mts +121 -3
- package/dist/index.d.ts +121 -3
- package/dist/index.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
- package/src/client.ts +2 -0
- package/src/generated/sdk.gen.ts +16 -1
- package/src/generated/types.gen.ts +125 -2
|
@@ -1504,6 +1504,58 @@ export type AdTreeResponse = {
|
|
|
1504
1504
|
backfillPending?: boolean;
|
|
1505
1505
|
};
|
|
1506
1506
|
|
|
1507
|
+
export type AnalyticsDashboardFollowers = {
|
|
1508
|
+
/**
|
|
1509
|
+
* Live follower count when the window includes today, otherwise the count the window ended on.
|
|
1510
|
+
*/
|
|
1511
|
+
current?: number;
|
|
1512
|
+
/**
|
|
1513
|
+
* Last minus first follower snapshot inside the window. Can be negative.
|
|
1514
|
+
*/
|
|
1515
|
+
gained?: number;
|
|
1516
|
+
byAccount?: Array<{
|
|
1517
|
+
accountId?: string;
|
|
1518
|
+
platform?: string;
|
|
1519
|
+
current?: number;
|
|
1520
|
+
gained?: number;
|
|
1521
|
+
}>;
|
|
1522
|
+
};
|
|
1523
|
+
|
|
1524
|
+
export type AnalyticsDashboardPost = {
|
|
1525
|
+
postId?: string;
|
|
1526
|
+
platform?: string;
|
|
1527
|
+
publishedAt?: string;
|
|
1528
|
+
/**
|
|
1529
|
+
* Lifetime metrics of the post on this platform.
|
|
1530
|
+
*/
|
|
1531
|
+
metrics?: {
|
|
1532
|
+
impressions?: number;
|
|
1533
|
+
reach?: number;
|
|
1534
|
+
likes?: number;
|
|
1535
|
+
comments?: number;
|
|
1536
|
+
shares?: number;
|
|
1537
|
+
saves?: number;
|
|
1538
|
+
clicks?: number;
|
|
1539
|
+
views?: number;
|
|
1540
|
+
engagementRate?: number;
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
|
|
1544
|
+
export type AnalyticsDashboardTotals = {
|
|
1545
|
+
impressions?: number;
|
|
1546
|
+
reach?: number;
|
|
1547
|
+
likes?: number;
|
|
1548
|
+
comments?: number;
|
|
1549
|
+
shares?: number;
|
|
1550
|
+
saves?: number;
|
|
1551
|
+
clicks?: number;
|
|
1552
|
+
views?: number;
|
|
1553
|
+
/**
|
|
1554
|
+
* Percentage. Likes, comments, shares and saves over impressions, pooled per platform (reach, then views, when a platform has no impressions).
|
|
1555
|
+
*/
|
|
1556
|
+
engagementRate?: number;
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1507
1559
|
/**
|
|
1508
1560
|
* One changed analytics snapshot. Metrics are the absolute values recorded at
|
|
1509
1561
|
* `syncedAt`, not the amount they moved by since the previous snapshot, so a later
|
|
@@ -10065,7 +10117,7 @@ export type TargetingSpec = {
|
|
|
10065
10117
|
}>;
|
|
10066
10118
|
};
|
|
10067
10119
|
/**
|
|
10068
|
-
* Minimum age. Applied on Meta, TikTok, Pinterest, LinkedIn and
|
|
10120
|
+
* Minimum age. Applied on Meta, TikTok, Pinterest, LinkedIn, X and Google Search/Display (Google excludes the age ranges outside the request); rejected with 400 on OpenAI and on Google Performance Max / Demand Gen. Each platform clamps to its own range: Meta and Pinterest effectively cap at 65 (65 = 65+), TikTok maps up to 100. LinkedIn rounds out to its buckets (18-24, 25-34, 35-54, 55+) and has no under-18 audience; X rounds out to the narrowest of its fixed ranges (e.g. 25-34 becomes 25-49, 18-65 becomes 18+). Pinterest has no under-18 bucket, so an ageMin below 18 starts at 18 there.
|
|
10069
10121
|
*/
|
|
10070
10122
|
ageMin?: number;
|
|
10071
10123
|
/**
|
|
@@ -10073,7 +10125,7 @@ export type TargetingSpec = {
|
|
|
10073
10125
|
*/
|
|
10074
10126
|
ageMax?: number;
|
|
10075
10127
|
/**
|
|
10076
|
-
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok, Pinterest, LinkedIn and
|
|
10128
|
+
* Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok, Pinterest, LinkedIn, X and Google Search/Display (Google excludes the other gender); rejected with 400 on OpenAI and on Google Performance Max / Demand Gen.
|
|
10077
10129
|
*/
|
|
10078
10130
|
gender?: 'all' | 'male' | 'female';
|
|
10079
10131
|
/**
|
|
@@ -16068,6 +16120,77 @@ export type GetDailyMetricsError = ({
|
|
|
16068
16120
|
code?: string;
|
|
16069
16121
|
});
|
|
16070
16122
|
|
|
16123
|
+
export type GetAnalyticsDashboardData = {
|
|
16124
|
+
query: {
|
|
16125
|
+
/**
|
|
16126
|
+
* Set to "previous_period" to also return previousTotals and previousFollowers for the window of the same length that ends the day before fromDate.
|
|
16127
|
+
*/
|
|
16128
|
+
compare?: 'previous_period';
|
|
16129
|
+
/**
|
|
16130
|
+
* First day of the window (YYYY-MM-DD, inclusive).
|
|
16131
|
+
*/
|
|
16132
|
+
fromDate: string;
|
|
16133
|
+
/**
|
|
16134
|
+
* Platform to cover (e.g. "instagram"), or "all".
|
|
16135
|
+
*/
|
|
16136
|
+
platform?: string;
|
|
16137
|
+
/**
|
|
16138
|
+
* Profile ID, or "all" for every profile you can access.
|
|
16139
|
+
*/
|
|
16140
|
+
profileId?: string;
|
|
16141
|
+
/**
|
|
16142
|
+
* How many of the most recently published posts to return.
|
|
16143
|
+
*/
|
|
16144
|
+
recentPosts?: number;
|
|
16145
|
+
/**
|
|
16146
|
+
* Last day of the window (YYYY-MM-DD, inclusive). May equal fromDate. The window covers at most 366 days.
|
|
16147
|
+
*/
|
|
16148
|
+
toDate: string;
|
|
16149
|
+
/**
|
|
16150
|
+
* How many top posts to return, ranked by engagement (likes, comments, shares and saves, the same sum as daily engagement).
|
|
16151
|
+
*/
|
|
16152
|
+
topPosts?: number;
|
|
16153
|
+
};
|
|
16154
|
+
};
|
|
16155
|
+
|
|
16156
|
+
export type GetAnalyticsDashboardResponse = ({
|
|
16157
|
+
dateRange: {
|
|
16158
|
+
fromDate?: string;
|
|
16159
|
+
toDate?: string;
|
|
16160
|
+
};
|
|
16161
|
+
totals: AnalyticsDashboardTotals;
|
|
16162
|
+
previousTotals?: AnalyticsDashboardTotals;
|
|
16163
|
+
followers: AnalyticsDashboardFollowers;
|
|
16164
|
+
previousFollowers?: AnalyticsDashboardFollowers;
|
|
16165
|
+
/**
|
|
16166
|
+
* One entry per day of the window, days without data included as zeros.
|
|
16167
|
+
*/
|
|
16168
|
+
daily: Array<{
|
|
16169
|
+
date?: string;
|
|
16170
|
+
impressions?: number;
|
|
16171
|
+
reach?: number;
|
|
16172
|
+
/**
|
|
16173
|
+
* Likes, comments, shares and saves received that day.
|
|
16174
|
+
*/
|
|
16175
|
+
engagement?: number;
|
|
16176
|
+
views?: number;
|
|
16177
|
+
/**
|
|
16178
|
+
* Net follower change against the previous snapshot. Can be negative.
|
|
16179
|
+
*/
|
|
16180
|
+
followersGained?: number;
|
|
16181
|
+
}>;
|
|
16182
|
+
topPosts: Array<AnalyticsDashboardPost>;
|
|
16183
|
+
recentPosts: Array<AnalyticsDashboardPost>;
|
|
16184
|
+
/**
|
|
16185
|
+
* When the most recently synced account in scope was last synced. Null if none has synced yet.
|
|
16186
|
+
*/
|
|
16187
|
+
dataAsOf: (string) | null;
|
|
16188
|
+
});
|
|
16189
|
+
|
|
16190
|
+
export type GetAnalyticsDashboardError = (ErrorResponse | {
|
|
16191
|
+
error?: string;
|
|
16192
|
+
} | unknown);
|
|
16193
|
+
|
|
16071
16194
|
export type GetBestTimeToPostData = {
|
|
16072
16195
|
query?: {
|
|
16073
16196
|
/**
|