export type GetApiProjectsIdCaseAuditLogPdfArgs = {id: string}; export type GetApiProjectsIdCaseAuditLogPdfOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /projects/{id}/case-audit-log.pdf * * GET /projects/{id}/case-audit-log.pdf */ export const getApiProjectsIdCaseAuditLogPdf = async (args: GetApiProjectsIdCaseAuditLogPdfArgs, options?: GetApiProjectsIdCaseAuditLogPdfOptions) => { 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(/\/+$/, '')}/projects/${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() };