export type GetApiApiV1ReclassificationRunsRunIdLogArgs = {run_id: string}; export type GetApiApiV1ReclassificationRunsRunIdLogOptions = {baseUrl: string, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Stream run log (storage-first / compute-fallback) * * GET /api/v1/reclassification/runs/{run_id}/log */ export const getApiApiV1ReclassificationRunsRunIdLog = async (args: GetApiApiV1ReclassificationRunsRunIdLogArgs, options: GetApiApiV1ReclassificationRunsRunIdLogOptions) => { const {baseUrl, fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/reclassification/runs/${encodeURIComponent(String(args.run_id))}/log${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };