import { apiFetch } from "@/lib/auth/api-client"; import { CreateFeedingInput, Feeding, FeedingSummaryEntry, UpdateFeedingInput, } from "./types"; export function fetchColonyFeedings(colonyId: string): Promise { return apiFetch(`/colonies/${colonyId}/feedings`); } export function fetchColonyFeedingsSummary(colonyId: string): Promise { return apiFetch(`/colonies/${colonyId}/feedings/summary`); } export function createFeeding(input: CreateFeedingInput): Promise { return apiFetch("/feedings", { method: "POST", body: JSON.stringify(input), }); } export function updateFeeding( id: string, input: UpdateFeedingInput, ): Promise { return apiFetch(`/feedings/${id}`, { method: "PATCH", body: JSON.stringify(input), }); }