@hhoangphuoc/escape-room-cli
Version:
A CLI for playing AI-generated escape room games. Install globally with: npm install -g @hhoangphuoc/escape-room-cli
23 lines (22 loc) • 558 B
TypeScript
/**
* 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;
};
}>;