feat: update analitycs

This commit is contained in:
ivannoskov
2025-12-01 07:43:47 +03:00
parent 270e75e192
commit e06b53d133
9 changed files with 1631 additions and 3 deletions

View File

@@ -313,6 +313,25 @@ export interface ExternalChannelsAnalytics {
external_channels: ExternalChannelAnalytics[];
}
// Analytics Configuration Types
export type AnalyticsMetric = "cost" | "subscriptions" | "views" | "cpf" | "cpm";
export interface ChartConfig {
id: string;
targetChannelIds: string[]; // Multiple selection
metrics: AnalyticsMetric[];
dateFrom: Date | null;
dateTo: Date | null;
grouping: DateGrouping;
}
export interface SpendingAnalyticsQueryParams {
target_channel_id?: string;
date_from?: string;
date_to?: string;
grouping?: DateGrouping;
}
// ----------------------------------------------------------------------------
// Common API Responses
// ----------------------------------------------------------------------------