import apiClient from './client'; interface User { id: string; name: string; email: string; role: string; } interface LoginRequest { email: string; password: string; } interface LoginResponse { token: string; user: User; } export const userApi = { login: async (data: LoginRequest): Promise => { return apiClient.post('/auth/login', data); }, register: async (data: any): Promise => { return apiClient.post('/auth/register', data); }, getProfile: async (): Promise => { return apiClient.get('/user/profile'); }, updateProfile: async (data: any): Promise => { return apiClient.put('/user/profile', data); }, }; export default userApi;