export type ConnectionSource = 'ga4' | 'gsc'; export type PreviewState = 'empty' | 'partial' | 'full'; export interface SourceStatus { connected: boolean; pending_pick: boolean; property_id: string; property_name: string; last_sync: string | null; connected_at: string | null; } export type OAuthMode = 'broker' | 'direct'; export interface ConnectionsStatus { oauth_configured: boolean; oauth_mode: OAuthMode; mock_dashboard_enabled: boolean; live_sync_enabled?: boolean; sync_error?: string | null; oauth_blocker: string | null; ga4: SourceStatus; gsc: SourceStatus; } export interface DashboardKpi { value: string | number; delta?: string; note?: string; } export interface DashboardPayload { is_mock: boolean; range_days?: number; ga4_active: boolean; gsc_active: boolean; message?: string; ga4?: { kpis: { ai_referrals: DashboardKpi; top_ai_source: DashboardKpi; }; series: Array<{ date: string; ai: number; other: number }>; landing_pages: Array<{ path: string; sessions: number }>; }; gsc?: { kpis: { clicks: DashboardKpi; avg_position: DashboardKpi; }; queries: Array<{ query: string; clicks: number; impressions: number; position: number; note: string; }>; }; } export interface PropertyOption { id: string; name: string; }