export type GetApiRoadmapsIdCaseAuditLogPdfArgs = {id: string}; export type GetApiRoadmapsIdCaseAuditLogPdfOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /roadmaps/{id}/case-audit-log.pdf * * GET /roadmaps/{id}/case-audit-log.pdf */ export const getApiRoadmapsIdCaseAuditLogPdf = async (args: GetApiRoadmapsIdCaseAuditLogPdfArgs, options?: GetApiRoadmapsIdCaseAuditLogPdfOptions) => { const {baseUrl = "https://dev-rest.onboard.io", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/pdf") if (ApiKeyAuth !== undefined) headers.set("Authorization", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/roadmaps/${encodeURIComponent(String(args.id))}/case-audit-log.pdf${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() };