import api from './api'; import { Operation } from '../types/Operation'; // ID: type-import-fix export const operationService = { getAll: async (): Promise => { const response = await api.get('/operations'); return response.data; }, create: async (name: string): Promise => { const response = await api.post('/operations', { name }); return response.data; }, delete: async (id: number): Promise => { await api.delete(`/operations/${id}`); } };