/** Typed API functions for the Tiere (Rennmäuse) resource. */ import { api, resources } from './client' import { toQueryString, type GridifyQuery } from './gridify' import type { CreateGerbil, Gerbil, Paged, UpdateGerbil } from './types' export function listGerbils(query: GridifyQuery): Promise> { return api.get>(`${resources.gerbils}${toQueryString(query)}`) } export function getGerbil(id: string): Promise { return api.get(`${resources.gerbils}/${id}`) } /** SEARCH-2b: distinct non-empty originBreeder (Herkunft) values, sorted. */ export function listOriginBreeders(): Promise { return api.get(`${resources.gerbils}/breeders`) } export function createGerbil(body: CreateGerbil): Promise { return api.post(resources.gerbils, body) } export function updateGerbil(id: string, body: UpdateGerbil): Promise { return api.put(`${resources.gerbils}/${id}`, body) } export function deleteGerbil(id: string): Promise { return api.delete(`${resources.gerbils}/${id}`) }