feat(frontend): contract types + REST client (MSW-tested)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 12:13:50 +02:00
co-authored by Claude Sonnet 4.6
parent 7e42ac11ef
commit 913ac30137
10 changed files with 147 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
import { apiFetch } from "./client";
import type { PreviewResult } from "./types";
export const sqlPreview = (
id: string,
opts: { limit?: number; offset?: number } = {}
) =>
apiFetch<PreviewResult>(`/sessions/${id}/sql/preview`, {
method: "POST",
body: JSON.stringify(opts),
});
export const sqlExport = (id: string) =>
apiFetch<{ path: string }>(`/sessions/${id}/sql/export`, { method: "POST" });