export type DeleteApiV1PlaygroundJobsJobIdArgs = {job_id: string}; export type DeleteApiV1PlaygroundJobsJobIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * playground_delete_job * * DELETE /v1/playground/jobs/{job_id} */ export const deleteApiV1PlaygroundJobsJobId = async (args: DeleteApiV1PlaygroundJobsJobIdArgs, options?: DeleteApiV1PlaygroundJobsJobIdOptions) => { const {baseUrl = "https://ndi-api.nace.ai", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/playground/jobs/${encodeURIComponent(String(args.job_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };