/** * Lemma Cloud — API Key Manager * * Handles key generation, validation, usage tracking, and plan enforcement. * Uses a JSON file as storage (swap for Redis/Postgres in production). */ import { ApiKey } from './types'; export declare class KeyManager { private keys; private storePath; private saveTimer; constructor(storePath?: string); generate(tenantId: string, name: string, plan?: ApiKey['plan']): ApiKey; validate(keyId: string): { valid: boolean; key?: ApiKey; reason?: string; }; recordRequest(keyId: string): void; upgradePlan(keyId: string, plan: ApiKey['plan']): boolean; revoke(keyId: string): boolean; getByTenant(tenantId: string): ApiKey[]; get(keyId: string): ApiKey | undefined; private maybeResetDaily; private maybeResetMonthly; private scheduleSave; private save; private load; } //# sourceMappingURL=KeyManager.d.ts.map