export type GetApiApiJobsArgs = {name?: string | undefined, type?: string | undefined, status?: ('NEW' | 'QUEUED' | 'RUNNING' | 'CANCELLED' | 'COMPLETED_ERROR' | 'COMPLETED_SUCCESS' | 'INCOMPLETE_ERROR') | undefined, callerId?: string | undefined, daysToReturn?: number | undefined, orderBy?: Array | undefined, limit?: number | undefined, skip?: number | undefined}; export type GetApiApiJobsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Allowed user roles:


Deprecated. Replace with combination of /api/jobs/query/summary for a list of job infos and /api/jobs/{jobId} for the details of a specific job info

Deprecated since 08 MAY 2025
* * GET /api/jobs */ export const getApiApiJobs = async (args: GetApiApiJobsArgs, options?: GetApiApiJobsOptions) => { const {baseUrl = "https://api.burstiq.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.name != null) query.append("name", String(args.name)) if (args.type != null) query.append("type", String(args.type)) if (args.status != null) query.append("status", String(args.status)) if (args.callerId != null) query.append("callerId", String(args.callerId)) if (args.daysToReturn != null) query.append("daysToReturn", String(args.daysToReturn)) for (const item of args.orderBy ?? []) query.append("orderBy", String(item)) if (args.limit != null) query.append("limit", String(args.limit)) if (args.skip != null) query.append("skip", String(args.skip)) const url = `${baseUrl.replace(/\/+$/, '')}/api/jobs${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() };