/**
 * CLIProxy Stats Routes - Stats, status, models, error logs for CLIProxyAPI
 */
import { Router } from 'express';
import { checkCliproxyUpdate, getInstalledCliproxyVersion, getStoredConfiguredBackend } from '../../cliproxy/binary-manager';
import { fetchAllVersions } from '../../cliproxy/binary/version-checker';
import { restartDashboardCliproxy } from '../services/cliproxy-dashboard-restart-service';
declare const router: import("express-serve-static-core").Router;
type RestartDashboardCliproxyHandler = typeof restartDashboardCliproxy;
/**
 * Cache only stable failures; skip transient network errors (timeouts, 429s, 5xx).
 * Generic across all quota result types.
 */
export declare function shouldCacheQuotaResult(result: {
    success: boolean;
    needsReauth?: boolean;
    isForbidden?: boolean;
    httpStatus?: number;
    retryable?: boolean;
    error?: string;
}): boolean;
interface ResolveUpdateCheckDeps {
    checkCliproxyUpdateFn?: typeof checkCliproxyUpdate;
    getInstalledVersionFn?: typeof getInstalledCliproxyVersion;
}
interface ResolveVersionsDeps {
    fetchAllVersionsFn?: typeof fetchAllVersions;
    getInstalledVersionFn?: typeof getInstalledCliproxyVersion;
}
export declare function resolveCliproxyUpdateCheckPayload(backend: ReturnType<typeof getStoredConfiguredBackend>, deps?: ResolveUpdateCheckDeps): Promise<import("../../cliproxy/binary-manager").CliproxyUpdateCheckResult | {
    hasUpdate: boolean;
    currentVersion: string;
    latestVersion: string;
    fromCache: boolean;
    checkedAt: number;
    backend: import("../../cliproxy/types").CLIProxyBackend;
    backendLabel: string;
    isStable: boolean;
    maxStableVersion: string;
    stabilityMessage: string | undefined;
}>;
export declare function resolveCliproxyVersionsPayload(backend: ReturnType<typeof getStoredConfiguredBackend>, deps?: ResolveVersionsDeps): Promise<{
    versions: string[];
    latestStable: string;
    latest: string;
    fromCache: boolean;
    checkedAt: number;
    currentVersion: string;
    maxStableVersion: string;
    faultyRange: {
        min: string;
        max: string;
    };
}>;
/**
 * POST /api/cliproxy/restart - Restart CLIProxy without version change
 * Returns: { success, port?, error? }
 */
export declare function registerCliproxyRestartRoute(targetRouter: Router, restartHandler?: RestartDashboardCliproxyHandler): void;
export default router;
//# sourceMappingURL=cliproxy-stats-routes.d.ts.map