export type DeleteApiV2EvalRunsEvalRunUuidArgs = {eval_run_uuid: string, workspace_uuid?: string | undefined}; export type DeleteApiV2EvalRunsEvalRunUuidOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Eval Run * * DELETE /v2/eval-runs/{eval_run_uuid} * * Also accepts auth: AuthBearer */ export const deleteApiV2EvalRunsEvalRunUuid = async (args: DeleteApiV2EvalRunsEvalRunUuidArgs, options?: DeleteApiV2EvalRunsEvalRunUuidOptions) => { const {baseUrl = "https://api.aymara.ai", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.workspace_uuid != null) query.append("workspace_uuid", String(args.workspace_uuid)) if (ApiKey !== undefined) headers.set("x-api-key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v2/eval-runs/${encodeURIComponent(String(args.eval_run_uuid))}${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 };