export type GetApiApiopsProjectsProjectNameJwksJwkNameExportFileArgs = {projectName: string, jwkName: string, publicOnly?: boolean | undefined}; export type GetApiApiopsProjectsProjectNameJwksJwkNameExportFileOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Download a JWK as its raw JSON document * * GET /apiops/projects/{projectName}/jwks/{jwkName}/export-file/ */ export const getApiApiopsProjectsProjectNameJwksJwkNameExportFile = async (args: GetApiApiopsProjectsProjectNameJwksJwkNameExportFileArgs, options?: GetApiApiopsProjectsProjectNameJwksJwkNameExportFileOptions) => { const {baseUrl = "http://167.86.118.166:32080", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.publicOnly != null) query.append("publicOnly", String(args.publicOnly)) const url = `${baseUrl.replace(/\/+$/, '')}/apiops/projects/${encodeURIComponent(String(args.projectName))}/jwks/${encodeURIComponent(String(args.jwkName))}/export-file/${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() };