export type GetApiApiV1ComplianceReportsIdDownloadArgs = {id: string}; export type GetApiApiV1ComplianceReportsIdDownloadOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Download a completed compliance report * * GET /api/v1/compliance/reports/{id}/download */ export const getApiApiV1ComplianceReportsIdDownload = async (args: GetApiApiV1ComplianceReportsIdDownloadArgs, options?: GetApiApiV1ComplianceReportsIdDownloadOptions) => { const {baseUrl = "https://orchestrator.getaxonflow.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/compliance/reports/${encodeURIComponent(String(args.id))}/download${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 };