import type { Company } from "@paperclip/shared"; import { api } from "./client"; export type CompanyStats = Record; export const companiesApi = { list: () => api.get("/companies"), get: (companyId: string) => api.get(`/companies/${companyId}`), stats: () => api.get("/companies/stats"), create: (data: { name: string; description?: string | null; budgetMonthlyCents?: number }) => api.post("/companies", data), update: ( companyId: string, data: Partial< Pick< Company, "name" | "description" | "status" | "budgetMonthlyCents" | "requireBoardApprovalForNewAgents" > >, ) => api.patch(`/companies/${companyId}`, data), archive: (companyId: string) => api.post(`/companies/${companyId}/archive`, {}), remove: (companyId: string) => api.delete<{ ok: true }>(`/companies/${companyId}`), };