export type GetApiApiV1RunsIdReviewsExpectedFilenameArgs = {id: string, filename: string}; export type GetApiApiV1RunsIdReviewsExpectedFilenameOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Download corrected artifact file * * GET /api/v1/runs/{id}/reviews/expected/{filename} */ export const getApiApiV1RunsIdReviewsExpectedFilename = async (args: GetApiApiV1RunsIdReviewsExpectedFilenameArgs, options?: GetApiApiV1RunsIdReviewsExpectedFilenameOptions) => { const {baseUrl = "https://studio.eigenpal.com", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/octet-stream") if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/runs/${encodeURIComponent(String(args.id))}/reviews/expected/${encodeURIComponent(String(args.filename))}${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() };