import type { AxiosResponse } from "axios"; import api, { apiGet, apiPatch, apiPost } from "./axios"; import type { UserMeResponse, LoginRequest, LoginResponse, LoginKeyResponse, RegisterRequest } from "../types/api"; export const login = (payload: LoginRequest): Promise> => apiPost("/api/v1/auth/login", payload); export const getLoginKey = (): Promise> => apiGet("/api/v1/auth/login-key"); export const fetchMe = (): Promise> => apiGet("/api/v1/auth/me"); export const register = (payload: RegisterRequest): Promise> => apiPost("/api/v1/auth/register", payload); export const updateProfile = (payload: { full_name?: string; clinical_department?: string; current_password?: string; password?: string; }) => apiPatch("/api/v1/auth/me", payload); export default api;