export type DeleteApiV1KnowledgeBaseEvalsSuitesSuiteIdArgs = {suite_id: string}; export type DeleteApiV1KnowledgeBaseEvalsSuitesSuiteIdOptions = {baseUrl: string, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an evaluation suite * * DELETE /v1/knowledge-base/evals/suites/{suite_id} */ export const deleteApiV1KnowledgeBaseEvalsSuitesSuiteId = async (args: DeleteApiV1KnowledgeBaseEvalsSuitesSuiteIdArgs, options: DeleteApiV1KnowledgeBaseEvalsSuitesSuiteIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("x-api-key", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/v1/knowledge-base/evals/suites/${encodeURIComponent(String(args.suite_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 };