import apiClient from './client'; import type { Client, CreateClientInput, UpdateClientInput } from '@/types'; export const clientsApi = { getAll: async (): Promise => { const { data } = await apiClient.get('/clients'); return data; }, create: async (input: CreateClientInput): Promise => { const { data } = await apiClient.post('/clients', input); return data; }, update: async (id: string, input: UpdateClientInput): Promise => { const { data } = await apiClient.put(`/clients/${id}`, input); return data; }, delete: async (id: string): Promise => { await apiClient.delete(`/clients/${id}`); }, };