/**
 * Credit gate service with caching.
 *
 * Checks whether the user has remaining credits (or an unlimited plan)
 * and caches the result for a configurable TTL to avoid hammering the API.
 *
 */
export interface CreditCheckResult {
    hasCredits: boolean;
    creditsRemaining: number;
    isUnlimited: boolean;
    hasTeamBilling: boolean;
}
export declare class CreditGate {
    private cachedResult;
    private cachedAt;
    private readonly ttlMs;
    constructor(ttlMs?: number);
    check(accessToken: string): Promise<CreditCheckResult>;
    /** Returns the cached result if still within TTL, null otherwise. */
    getCached(): CreditCheckResult | null;
    /** Populate the cache from an already-fetched balance (e.g. from polling). */
    populate(balance: {
        creditsRemaining: number;
        isUnlimited: boolean;
        hasTeamBilling: boolean;
    }): void;
    invalidate(): void;
}
//# sourceMappingURL=credit-gate.d.ts.map