export type DeleteApiV2EvalReportsReportUuidArgs = {report_uuid: string, workspace_uuid?: string | undefined}; export type DeleteApiV2EvalReportsReportUuidOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Eval Run Suite Report * * DELETE /v2/eval-reports/{report_uuid} * * Also accepts auth: AuthBearer */ export const deleteApiV2EvalReportsReportUuid = async (args: DeleteApiV2EvalReportsReportUuidArgs, options?: DeleteApiV2EvalReportsReportUuidOptions) => { 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-reports/${encodeURIComponent(String(args.report_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 };