import { apiFetch } from "./client.js"; export function sincronizarAtendimentos(params = {}) { return apiFetch("/api/atendimentos/sync", { method: "POST", body: params }); } export function listarAtendimentos({ page = 1, pageSize = 20, setor, status } = {}) { const query = new URLSearchParams({ page: String(page), pageSize: String(pageSize) }); if (setor) query.set("setor", setor); if (status !== undefined) query.set("status", String(status)); return apiFetch(`/api/atendimentos?${query.toString()}`); } export function obterAtendimento(id) { return apiFetch(`/api/atendimentos/${id}`); }