import { apiClient } from '../services/apiClient'; import { LoginResponse, User, VerifyOtpResponse } from '../interfaces'; // ─── Types ─────────────────────────────────────────────────────────────────── export interface UpdateProfileResponse { success: boolean; user: User; } export interface LogoutResponse { success: boolean; } // ─── Endpoints ─────────────────────────────────────────────────────────────── export const loginApi = (phone: string) => apiClient.post('/auth/otp/request', { phone }); export const verifyOtpApi = (phone: string, code: string, role: string) => apiClient.post('/auth/otp/verify', { phone, code, role }); export const updateProfileApi = (data: { name: string; email: string; locationLabels: string[]; }) => apiClient.put('/auth/profile', data); export const logoutApi = () => apiClient.post('/auth/logout', {});