interface ApiKeyTestResult {
    valid: boolean;
    userId: string | null;
}
interface UseApiKeyReturn {
    /**
     * The key to display. Masked by default (from retrieve). Becomes the FULL
     * value after `reveal()` or `regenerate()` resolves, so the user can copy it.
     */
    apiKey: string | null;
    /** True once `reveal()`/`regenerate()` has surfaced the full (unmasked) key. */
    isRevealed: boolean;
    reissuedAt: string | null;
    createdAt: string | null;
    isLoading: boolean;
    isRevealing: boolean;
    isRegenerating: boolean;
    isTesting: boolean;
    /**
     * Fetch the current full key WITHOUT rotating it (the durable value every one
     * of the user's agents uses). Use this to let the user copy their key for
     * agent onboarding — `regenerate()` would invalidate the agents already using it.
     */
    reveal: () => Promise<void>;
    regenerate: () => Promise<void>;
    testKey: (key: string) => Promise<ApiKeyTestResult>;
    refresh: () => void;
}
declare function useApiKey(): UseApiKeyReturn;

export { type UseApiKeyReturn, useApiKey };
