/** * Pure helpers for rendering OAuth usage data on the profile page. * * Lives outside the inline-HTML template in profilePage.ts so the labeling * and formatting logic can be unit-tested. The same logic is mirrored in * the page's inline browser script — see profilePage.ts. * * Why duplicate at all? profilePage.ts is one big template literal that * runs in the browser, so we can't directly import these at runtime. We * inline the constants (via JSON.stringify) and re-implement the small * format functions in the template, with these TS versions guarding the * behavior via tests. */ /** Friendly labels for Anthropic's raw window keys. */ export declare const WINDOW_LABELS: Record; /** * Map a raw window type (e.g. "five_hour", "seven_day_opus") to a short * human label. Falls back to a prettified version of the key for any * type we haven't named (Anthropic adds new windows occasionally). */ export declare function labelForWindow(type: string): string; /** * Bucket a 0..1 utilization value into a status used for color coding. * Mirrors pylon's three-tier scheme: comfortable / warning / hot. */ export type UsageStatus = "ok" | "warn" | "high"; export declare function classifyUtilization(utilization: number | null | undefined): UsageStatus; /** * Format the time-until-reset for a window. * * `resetsAt` is a Unix epoch in milliseconds (matching Meridian's own * /v1/usage/quota response shape) — null when the window has no known * reset time. * * `now` is injectable so tests don't depend on Date.now(); production * callers omit it and the function uses the current time. */ export declare function formatResetCountdown(resetsAt: number | null | undefined, now?: number): string; /** * Format an extra-usage block. Returns null when the profile has no * extra-usage info worth showing (disabled or missing data) — caller * should hide the section entirely in that case. */ export interface ExtraUsageDisplay { used: string; limit: string; utilizationPct: number; status: UsageStatus; } export declare function formatExtraUsage(eu: { isEnabled: boolean; monthlyLimit: number; usedCredits: number; utilization: number | null; currency: string; } | null | undefined): ExtraUsageDisplay | null; //# sourceMappingURL=profileUsage.d.ts.map