// Caminho: services/excecoesApi.ts import api from './api'; export interface Exception { id: any; doctor_id: string; date: string; kind: 'bloqueio' | 'liberacao'; [key: string]: any; } export const excecoesApi = { list: async (): Promise => { const response = await api.get('/rest/v1/doctor_exceptions?select=*'); return response.data; }, create: async (data: Omit): Promise => { const response = await api.post('/rest/v1/doctor_exceptions', data, { headers: { 'Prefer': 'return=representation' } }); return response.data[0]; }, delete: async (id: string): Promise => { await api.delete(`/rest/v1/doctor_exceptions?id=eq.${id}`); }, };