import type { ApiClient } from './request';
import type { JsonValue } from './shared-contracts';
export type AnalyticsPreset = "1d" | "7d" | "30d" | "90d" | "365d";
export type AnalyticsReportQuery = {
    siteId: string;
    period?: AnalyticsPreset;
    from?: string;
    to?: string;
};
export type AnalyticsSeriesPoint = {
    date: string;
    pageViews: number;
    uniqueVisitors: number;
    conversions: number;
};
export type AnalyticsTopPage = {
    path: string;
    views: number;
    conversions: number;
    conversionRate: number;
};
export type AnalyticsReferrer = {
    source: string;
    visits: number;
};
export type AnalyticsTotals = {
    visits: number;
    uniqueVisitors: number;
    conversions: number;
};
export type AnalyticsReportResponse = {
    range: {
        from: string;
        to: string;
        preset?: AnalyticsPreset | null;
    };
    series: AnalyticsSeriesPoint[];
    totals: AnalyticsTotals;
    breakdown: {
        conversionsByEvent: Record<"cta_click" | "form_submit" | string, number>;
    };
    topPages: AnalyticsTopPage[];
    topReferrers: AnalyticsReferrer[];
    partial?: boolean;
    goLiveAt: string | null;
    clamped?: boolean;
    noDataYet?: boolean;
};
export type AnalyticsReportFilters = Omit<AnalyticsReportQuery, "siteId">;
/**
 * Analytics event collection payload.
 * Matches the schema validated by the dashboard API route.
 */
export type AnalyticsCollectBody = {
    siteId?: string;
    eventName: 'page_view' | 'cta_click' | 'form_submit';
    path: string;
    referrer?: string | null;
    metadata?: Record<string, JsonValue>;
    sessionId?: string;
};
export declare function analyticsCollect(apiClient: ApiClient, body: AnalyticsCollectBody): Promise<void>;
export declare function getAnalyticsReport(apiClient: ApiClient, query: AnalyticsReportQuery): Promise<AnalyticsReportResponse>;
