import type { Benchmark, BenchmarkRun, BenchmarkVersion, RunStats } from '../../types/index.js'; declare class AsyncBenchmarkStorage { /** * Get all benchmarks, sorted by updatedAt descending (most recently active first) * @param options.includeSample - whether to include sample/demo data */ getAll(options?: { includeSample?: boolean; }): Promise; /** * Get a single benchmark by ID * @param options.fields - 'polling' for lightweight payload (excludes versions, testCaseSnapshots, headers) * @param options.runsSize - max number of runs to return * @param options.runsOffset - offset into runs array for pagination */ getById(id: string, options?: { fields?: 'polling'; runsSize?: number; runsOffset?: number; }): Promise; /** * Create a new benchmark (immutable) */ create(benchmark: Omit): Promise; /** * Save a benchmark (create only - benchmarks are immutable) * For compatibility with existing code that calls save() */ save(benchmark: Benchmark): Promise; /** * Delete a benchmark */ delete(id: string): Promise; /** * Get total count of benchmarks */ getCount(): Promise; /** * Get all run configs for a benchmark */ getRuns(benchmarkId: string): Promise; /** * Get a specific run config by ID from a benchmark */ getRunById(benchmarkId: string, runId: string): Promise; /** * Add or update a run in a benchmark */ addRun(benchmarkId: string, run: BenchmarkRun): Promise; /** * Delete a run config from a benchmark using atomic server-side operation. * This avoids the read-modify-write pattern that could corrupt other runs. */ deleteRun(benchmarkId: string, runId: string): Promise; /** * Generate a unique benchmark ID */ generateBenchmarkId(): string; /** * Generate a unique run ID */ generateRunId(): string; /** * Bulk create benchmarks (for migration) */ bulkCreate(benchmarks: Benchmark[]): Promise<{ created: number; errors: boolean; }>; /** * Update benchmark metadata only (name, description) - no version change * Uses centralized opensearchClient for consistent API handling */ updateMetadata(id: string, updates: { name?: string; description?: string; }): Promise; /** * Update test case list - creates a new version * Uses centralized opensearchClient for consistent API handling */ updateTestCases(id: string, testCaseIds: string[]): Promise; /** * Get all versions of a benchmark * Uses centralized opensearchClient for consistent API handling */ getVersions(benchmarkId: string): Promise; /** * Get a specific version of a benchmark * Uses centralized opensearchClient for consistent API handling */ getVersion(benchmarkId: string, version: number): Promise; /** * Update a benchmark (name, description, or testCaseIds). * If testCaseIds changed, creates a new version. * Uses centralized opensearchClient for consistent API handling */ update(id: string, updates: { name?: string; description?: string; testCaseIds?: string[]; }): Promise; /** * Manually refresh stats for all runs in a benchmark. * Useful for fixing stale stats or after manual data corrections. */ refreshAllStats(benchmarkId: string): Promise<{ refreshed: number; } | null>; /** * Manually refresh stats for a single run in a benchmark. * Useful for fixing stale stats for a specific run. */ refreshRunStats(benchmarkId: string, runId: string): Promise<{ refreshed: boolean; stats: RunStats; } | null>; } export declare const asyncBenchmarkStorage: AsyncBenchmarkStorage; /** @deprecated Use asyncBenchmarkStorage instead */ export declare const asyncExperimentStorage: AsyncBenchmarkStorage; export {}; //# sourceMappingURL=asyncBenchmarkStorage.d.ts.map