export type GetApiApiV1AssessmentsIdSummaryExportArgs = {id: number}; export type GetApiApiV1AssessmentsIdSummaryExportOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Export the LLM assessment summary as a PDF * * GET /api/v1/assessments/{id}/summary/export */ export const getApiApiV1AssessmentsIdSummaryExport = async (args: GetApiApiV1AssessmentsIdSummaryExportArgs, options?: GetApiApiV1AssessmentsIdSummaryExportOptions) => { const {baseUrl = "https://app.visotrust.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/pdf") const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/assessments/${encodeURIComponent(String(args.id))}/summary/export${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 res.blob() };