export type GetApiOlostepV1BatchesBatchIdArgs = {batch_id: string}; export type GetApiOlostepV1BatchesBatchIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retrieves the status and progress information about a batch. To retrieve the content for a batch, see here * * GET /olostep/v1/batches/{batch_id} */ export const getApiOlostepV1BatchesBatchId = async (args: GetApiOlostepV1BatchesBatchIdArgs, options?: GetApiOlostepV1BatchesBatchIdOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/olostep/v1/batches/${encodeURIComponent(String(args.batch_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 undefined };