export type GetApiBlobRawIdFullIdArgs = {id: number, fullId: string}; export type GetApiBlobRawIdFullIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Download raw blob data (inline) * * GET /blob/raw/{id}/{fullId} */ export const getApiBlobRawIdFullId = async (args: GetApiBlobRawIdFullIdArgs, options?: GetApiBlobRawIdFullIdOptions) => { const {baseUrl = "https://app.testiny.io/api/v1", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-Api-Key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/blob/raw/${encodeURIComponent(String(args.id))}/${encodeURIComponent(String(args.fullId))}${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 undefined };