import { apiFetch, apiFetchBlob } from "@/lib/auth/api-client"; export type QrEntityType = | "colonies" | "apiaries" | "queens" | "honey-batches" | "storage-containers" | "bottling-batches"; export async function fetchQrCodeSvg(entityType: QrEntityType, id: string): Promise { const { blob } = await apiFetchBlob(`/qr/${entityType}/${id}.svg`, `${entityType}.svg`); return blob; } export async function fetchQrLink(entityType: QrEntityType, id: string): Promise { const { url } = await apiFetch<{ url: string }>(`/qr/${entityType}/${id}/link`); return url; }