feat: global platform update

This commit is contained in:
ivannoskov
2026-01-07 14:17:43 +03:00
parent 25b194ad41
commit 3b6b97447b
22 changed files with 1536 additions and 309 deletions

View File

@@ -354,6 +354,55 @@ export interface SpendingAnalyticsQueryParams {
grouping?: DateGrouping;
}
// Overview Analytics
export interface OverviewMetric {
value: number;
delta_percent: number;
}
export interface OverviewDailyStat {
date: string; // YYYY-MM-DD
cost: number;
subscriptions: number;
subscriptions_delta: number;
cpf: number;
}
export interface OverviewChannelCpf {
channel_id: string;
title: string;
username: string | null;
cpf: number;
total_cost: number;
subscriptions: number;
}
export interface OverviewProjectSpending {
project_id: string;
project_title: string;
project_username: string | null;
total_cost: number;
}
export interface OverviewAnalytics {
total_cost: OverviewMetric;
total_reach: OverviewMetric;
placements_count: OverviewMetric;
subscriptions_count: OverviewMetric;
avg_cpm: OverviewMetric;
avg_cpf: OverviewMetric;
daily_stats: OverviewDailyStat[];
top_channels_by_cpf: OverviewChannelCpf[];
worst_channels_by_cpf: OverviewChannelCpf[];
project_spending: OverviewProjectSpending[];
}
export interface OverviewAnalyticsQueryParams {
project_id?: string;
date_from?: string;
date_to?: string;
}
// ----------------------------------------------------------------------------
// Common Types
// ----------------------------------------------------------------------------