export type GetApiPublicV1AlphaExposureIdArgs = {id: number}; export type GetApiPublicV1AlphaExposureIdOptions = {baseUrl?: string | undefined, TokenAuthentication?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get exposure analysis info by exposure analysis id * * GET /public/v1/alpha/exposure/{id} */ export const getApiPublicV1AlphaExposureId = async (args: GetApiPublicV1AlphaExposureIdArgs, options?: GetApiPublicV1AlphaExposureIdOptions) => { const {baseUrl = "https://api.prewave.com", fetch: fetchFn = fetch, TokenAuthentication} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (TokenAuthentication !== undefined) headers.set("X-Auth-Token", TokenAuthentication) const url = `${baseUrl.replace(/\/+$/, '')}/public/v1/alpha/exposure/${encodeURIComponent(String(args.id))}${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() };