export type DeleteApiV2EvalsEvalUuidArgs = {eval_uuid: string, workspace_uuid?: string | undefined}; export type DeleteApiV2EvalsEvalUuidOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Eval * * DELETE /v2/evals/{eval_uuid} * * Also accepts auth: AuthBearer */ export const deleteApiV2EvalsEvalUuid = async (args: DeleteApiV2EvalsEvalUuidArgs, options?: DeleteApiV2EvalsEvalUuidOptions) => { 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/evals/${encodeURIComponent(String(args.eval_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 };