import { api } from './client'; export interface UserProfile { username: string; email: string; first_name: string; last_name: string; } export type ProfilePatch = Partial>; export const profileApi = { get: () => api.get('/profile/'), update: (patch: ProfilePatch) => api.patch('/profile/', patch), changePassword: (old_password: string, new_password: string) => api.post<{ detail: string }>('/profile/change-password/', { old_password, new_password }), deleteData: () => api.del<{ detail: string }>('/profile/delete-data/'), deleteAccount: (password: string) => api.del<{ detail: string }>('/profile/delete-account/', { password }) };