import { type MetricParams } from '../../util/clickhouse';
export interface PulseData {
    status: string;
    timestamp: string;
    message: string;
    metrics?: Record<string, any>;
}
export declare const OTEL_TRACES_TABLE_NAME = "otel_traces";
export declare const EVAL_RESULTS_TABLE_NAME = "eval_results";
export declare const OTEL_GPUS_TABLE_NAME = "otel_metrics_gauge";
export declare class PulseService {
    private static readonly TOTAL_RECORDS_STATUSES;
    private isTotalRecordsStatus;
    private evalMapGrouping;
    private evalMapGroupingSessions;
    /**
     * Get pulse data - demonstrates the service pattern and ClickHouse integration
     */
    getPulse(): Promise<PulseData>;
    /**
     * Additional method to demonstrate service extensibility
     * This could include more complex health checks, metrics gathering, etc.
     */
    getDetailedMetrics(): Promise<Record<string, any>>;
    getTotalRequests(params: MetricParams): Promise<any>;
    getAverageRequestDuration(params: MetricParams): Promise<any>;
    getAverageTokensPerRequest(params: MetricParams): Promise<any>;
    getAverageCostPerRequest(params: MetricParams): Promise<any>;
    getDashboard(params: MetricParams): Promise<any>;
    getGraphRequestPerTime(params: MetricParams): Promise<any[]>;
    /**
     * Traces
     */
    getReports(params: MetricParams): Promise<{
        reports: any[];
        total: any;
    }>;
    getReportsForCronJob(params: {
        limit: number;
        page: number;
        startTime: string;
        endTime: string;
        applicationId: string;
        sampleByCount?: boolean;
        sampleByPercentage?: boolean;
        samplingRate?: number;
        seed?: number;
    }): Promise<any[]>;
    getObservationReportsForCronJob(params: {
        limit: number;
        page: number;
        startTime: string;
        endTime: string;
        applicationId: string;
        seed?: number;
        traceIds?: string[];
    }): Promise<any[]>;
    parseSpanResult(span: any): Record<string, any>;
    getReportData(params: {
        traceId: string;
    }): Promise<Record<string, any>[]>;
    private isNotEmpty;
    private escapeClickHouseSqlString;
    private parseJsonObjectField;
    /** List rows for metric failure analysis: no `results` blob; nested detail loads separately. */
    private populateMetricFailureListRows;
    private populateMetricFailureListRowsSessions;
    getTotalRecords(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
    }): Promise<any>;
    private getTotalRecordsBucketUnit;
    private normalizeAndPadTotalRecordsSeries;
    private formatTotalRecordsBucketLabelUtc;
    getMetricFailureAnalysisTotal(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
    }): Promise<any[]>;
    getMetricFailureAnalysisTotalSessions(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
    }): Promise<any[]>;
    getMetricFailureAnalysisSuccess(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
    }): Promise<any[]>;
    getMetricFailureAnalysisFailure(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
    }): Promise<any[]>;
    getMetricVolumeAnalysis(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
    }): Promise<any[]>;
    getAudioMetricAnalysis(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
        metricName: string;
    }): Promise<{
        outcome: string;
        count: unknown;
        total: number;
        passed: number;
        failed: number;
    }[]>;
    getAudioMetricTimeAnalysis(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
        metricName: string;
    }): Promise<{
        lineData?: undefined;
        donutData?: undefined;
    } | {
        lineData: any[];
        donutData: {
            label: string;
            value: number;
            color: string;
        }[];
    }>;
    getTotalRecordsPass(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        projectId: string;
        applicationId: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    getTotalRecordsFail(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        projectId: string;
        applicationId: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    getTotalRecordsError(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        projectId: string;
        applicationId: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    getTotalSessionsPass(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        projectId: string;
        applicationId: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    getTotalSessionsFail(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        projectId: string;
        applicationId: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    getTotalSessionsError(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        projectId: string;
        applicationId: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    private populateEvaluations;
    getMetricFailureAnalysis(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        metricType: string;
        categoryType: string;
        metricName: string;
        projectId: string;
        applicationId: string;
        output?: string;
        isRedteam?: number;
        /** When set, returns full eval rows for this trace only (for nested sidebar). */
        detailTraceId?: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    getMetricFailureAnalysisSessions(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        page: number;
        limit: number;
        metricType: string;
        categoryType: string;
        metricName: string;
        projectId: string;
        applicationId: string;
        output?: string;
        /** When set, returns full eval rows for this session only (nested sidebar). */
        detailSessionId?: string;
    }): Promise<{
        count: any;
        results: any[];
    }>;
    getSessionsForCronJob(params: {
        limit: number;
        page: number;
        startTime: string;
        endTime: string;
        applicationId: string;
        sampleByCount?: boolean;
        sampleByPercentage?: boolean;
        samplingRate?: number;
        seed?: number;
    }): Promise<any[]>;
    getSpansUsageForCronJob(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        orgId: string;
    }): Promise<0 | {
        count: any;
        applicationIds: string[];
    }>;
    getSpansUsage(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        } | null;
        orgId: string;
        shouldGetDailyUsage?: boolean;
    }): Promise<any>;
    getTimeLimit(timespan: string): {
        start: string;
        end: string;
        type: string;
    } | null;
    private getAiReliabilityGrouping;
    private getAiReliabilityBucketSqlConfig;
    getAiReliabilityScore(params: {
        timeLimit: {
            start: string;
            end: string;
            type: string;
        };
        projectId: string;
        applicationId: string;
    }): Promise<{
        bucket_type: "hourly" | "daily" | "weekly" | "monthly";
        reliability_score: number;
        pass_cases: number;
        total_cases: number;
        chart_data: {
            timestamp: string;
            pass_cases: number;
            total_cases: number;
            reliability_score: number;
        }[];
    }>;
}
export declare const pulseService: PulseService;
//# sourceMappingURL=pulseService.d.ts.map