import apiClient from './client'; import type { Project, CreateProjectInput, UpdateProjectInput } from '@/types'; export const projectsApi = { getAll: async (clientId?: string): Promise => { const { data } = await apiClient.get('/projects', { params: clientId ? { clientId } : undefined, }); return data; }, create: async (input: CreateProjectInput): Promise => { const { data } = await apiClient.post('/projects', input); return data; }, update: async (id: string, input: UpdateProjectInput): Promise => { const { data } = await apiClient.put(`/projects/${id}`, input); return data; }, delete: async (id: string): Promise => { await apiClient.delete(`/projects/${id}`); }, };