/**
 * Usage Service
 *
 * Tracks and reports usage against tier limits
 */
import type { Tier } from '../types/auth.js';
export type UsageAction = 'update_check' | 'download' | 'sync' | 'migration';
export interface UsageStat {
    used: number;
    limit: number;
    remaining: number;
}
export interface UsageReport {
    tier: Tier;
    today: {
        updateChecks: UsageStat;
        downloads: UsageStat;
        syncs: UsageStat;
        migrations: UsageStat;
    };
}
export interface LimitCheckResult {
    allowed: boolean;
    current: number;
    limit: number;
    remaining: number;
    tier: Tier;
}
export declare class UsageService {
    private apiUrl;
    constructor(apiUrl?: string);
    /**
     * Check if a 401 response indicates a revoked session.
     * If so, clear the local session and log a message.
     */
    private handleSessionRevoked;
    private getHeaders;
    getUsage(): Promise<UsageReport>;
    checkLimit(action: UsageAction): Promise<LimitCheckResult>;
    recordUsage(action: UsageAction): Promise<void>;
    private getOfflineUsage;
}
export declare function getUsageService(): UsageService;
//# sourceMappingURL=usage-service.d.ts.map