import { apiClient } from './api-client'; export interface TokenPair { accessToken: string; refreshToken: string; expiresIn: number; } export interface UserProfile { id: string; email: string | null; phone: string; fullName: string; avatarUrl: string | null; role: string; kycStatus: string; isActive: boolean; createdAt: string; } export interface RegisterPayload { phone: string; password: string; fullName: string; email?: string; } export interface LoginPayload { phone: string; password: string; } export const authApi = { register: (data: RegisterPayload) => apiClient.post('/auth/register', data), login: (data: LoginPayload) => apiClient.post('/auth/login', data), refresh: (refreshToken: string) => apiClient.post('/auth/refresh', { refreshToken }), getProfile: (token: string) => apiClient.authGet('/auth/profile', token), };