/** * Authentication API client methods */ import { apiClient } from './client'; export interface UserResponse { id: string; email: string; created_at: string; is_active: boolean; } export interface TokenResponse { access_token: string; token_type: string; user: UserResponse; } export interface RegisterRequest { email: string; password: string; } export interface LoginRequest { email: string; password: string; } export const authApi = { /** * Register a new user */ async register(data: RegisterRequest): Promise { return apiClient.post('/auth/register', data); }, /** * Login user and get JWT token */ async login(data: LoginRequest): Promise { return apiClient.post('/auth/login', data); }, /** * Get current user information */ async getCurrentUser(): Promise { return apiClient.get('/auth/me'); }, };