/**
 * Handles the login API call.
 */
export declare function loginUser(userId: string): Promise<Response>;
/**
 * Handles the user registration API call.
 */
export declare function registerUser(payload: {
    name: string;
    email?: string;
    apiKey?: string;
    provider?: 'openai' | 'anthropic';
}): Promise<Response>;
/**
 * A generic function to handle API responses, parse JSON, and format errors.
 */
export declare function handleApiResponse<T>(response: Response): Promise<{
    ok: boolean;
    data: T | {
        error: string;
    };
}>;
