import { apiFetch } from "./client"; import type { PreviewResult } from "./types"; export const sqlPreview = ( id: string, opts: { limit?: number; offset?: number } = {} ) => apiFetch(`/sessions/${id}/sql/preview`, { method: "POST", body: JSON.stringify(opts), }); export const sqlExport = (id: string) => apiFetch<{ path: string }>(`/sessions/${id}/sql/export`, { method: "POST" });