import type { IndemnClient } from './client.js'; import type { TestSet, CreateTestSetInput } from './types.js'; export class TestSetsSDK { constructor(private client: IndemnClient) {} async listTestSets(agentId?: string): Promise { const query = agentId ? { agent_id: agentId } : undefined; return this.client.evalsGet('/api/v1/test-sets', query); } async getTestSet(id: string): Promise { return this.client.evalsGet(`/api/v1/test-sets/${id}`); } async createTestSet(input: CreateTestSetInput): Promise { return this.client.evalsPost('/api/v1/test-sets', input); } async updateTestSet(id: string, input: Partial): Promise { return this.client.evalsPut(`/api/v1/test-sets/${id}`, input); } async deleteTestSet(id: string): Promise { await this.client.evalsDelete(`/api/v1/test-sets/${id}`); } async listVersions(id: string): Promise { return this.client.evalsGet(`/api/v1/test-sets/${id}/versions`); } async getVersion(id: string, version: number): Promise { return this.client.evalsGet(`/api/v1/test-sets/${id}/versions/${version}`); } }