export interface ProviderQuotaWindow {
	label: string;
	used: number;
	limit: number;
	usedFraction?: number;
	resetHint?: string;
}

export interface ProviderQuotaEntry {
	ok: boolean;
	fetchedAt: string;
	error?: string;
	windows: ProviderQuotaWindow[];
	raw?: Record<string, unknown>;
}

export interface AuthLike {
	getCredentialsForProvider(id: string): Array<{ type: string; key?: string }>;
}

export declare const QUOTA_CAPABLE_PROVIDER_IDS: readonly string[];
export declare function getProviderQuotaState(
	providerId: string,
): ProviderQuotaEntry | null;
export declare function getAllProviderQuotaEntries(): Record<
	string,
	ProviderQuotaEntry
>;
export declare function runProviderQuotaRefreshIfStale(
	basePath: string,
	auth: AuthLike,
): Promise<void>;
export declare function scheduleProviderQuotaRefresh(
	basePath: string,
	auth: AuthLike,
): void;
