export type GetApiProjectsProjectIdJobsArgs = {project_id: number, id?: number | undefined, name?: string | undefined, model_id?: number | undefined, version_id?: number | undefined, status?: string | undefined, error?: string | undefined}; export type GetApiProjectsProjectIdJobsOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * List all prediction jobs created using the model. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead. * * GET /projects/{project_id}/jobs */ export const getApiProjectsProjectIdJobs = async (args: GetApiProjectsProjectIdJobsArgs, options?: GetApiProjectsProjectIdJobsOptions) => { const {baseUrl = "http://localhost:8080/v1", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.id != null) query.append("id", String(args.id)) if (args.name != null) query.append("name", String(args.name)) if (args.model_id != null) query.append("model_id", String(args.model_id)) if (args.version_id != null) query.append("version_id", String(args.version_id)) if (args.status != null) query.append("status", String(args.status)) if (args.error != null) query.append("error", String(args.error)) if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/projects/${encodeURIComponent(String(args.project_id))}/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() };