Files
ThothII/frontend/src/api/sql.ts
T

15 lines
419 B
TypeScript

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" });