/**
 * Quota Fetcher for Gemini CLI Accounts
 *
 * Fetches quota information from Google Cloud Code internal API.
 * Used for displaying bucket-based quotas grouped by model series.
 */
import type { GeminiCliQuotaResult, GeminiCliBucket } from './quota-types';
/** Raw bucket from API response */
interface RawGeminiCliBucket {
    model_id?: string;
    modelId?: string;
    token_type?: string | null;
    tokenType?: string | null;
    remaining_fraction?: number;
    remainingFraction?: number;
    remaining_amount?: number;
    remainingAmount?: number;
    reset_time?: string | null;
    resetTime?: string | null;
}
interface ParsedGeminiCliErrorBody {
    errorCode?: string;
    errorDetail?: string;
    message?: string;
}
/**
 * Extract project ID from account field
 * Input: "user@example.com (cloudaicompanion-abc-123)"
 * Output: "cloudaicompanion-abc-123"
 */
declare function resolveGeminiCliProjectId(accountField: string): string | null;
declare function sanitizeGeminiCliErrorDetail(bodyText: string): string | undefined;
declare function extractGeminiCliNestedMessage(value: unknown): string | undefined;
declare function parseGeminiCliErrorBody(bodyText: string): ParsedGeminiCliErrorBody;
declare function buildGeminiCliForbiddenActionHint(parsed: ParsedGeminiCliErrorBody): string;
/**
 * Build GeminiCliBucket array from API response
 * Groups buckets by model series and token type
 */
declare function buildGeminiCliBuckets(rawBuckets: RawGeminiCliBucket[]): GeminiCliBucket[];
/**
 * Fetch quota for a single Gemini CLI account
 *
 * @param accountId - Account identifier (email)
 * @param verbose - Show detailed diagnostics
 * @returns Quota result with buckets and percentages
 */
export declare function fetchGeminiCliQuota(accountId: string, verbose?: boolean): Promise<GeminiCliQuotaResult>;
/**
 * Fetch quota for all Gemini CLI accounts
 *
 * @param verbose - Show detailed diagnostics
 * @returns Array of account quotas
 */
export declare function fetchAllGeminiCliQuotas(verbose?: boolean): Promise<{
    account: string;
    quota: GeminiCliQuotaResult;
}[]>;
export declare const __testExports: {
    sanitizeGeminiCliErrorDetail: typeof sanitizeGeminiCliErrorDetail;
    extractGeminiCliNestedMessage: typeof extractGeminiCliNestedMessage;
    parseGeminiCliErrorBody: typeof parseGeminiCliErrorBody;
    buildGeminiCliForbiddenActionHint: typeof buildGeminiCliForbiddenActionHint;
};
export { resolveGeminiCliProjectId, buildGeminiCliBuckets };
//# sourceMappingURL=quota-fetcher-gemini-cli.d.ts.map