import type { Experiment, ExperimentListParams, RunRequest, Uuid } from "@introspection-sdk/types"; import type { HttpClient } from "../http.js"; import type { IntrospectionClient } from "../client.js"; import { Paginator } from "../pagination.js"; import { Runner } from "../runner.js"; /** * CRUD, lifecycle, and execution for `/v1/experiments` on the CP. Create and * update accept the exact Control Plane request document so its schema remains * the source of truth. */ export declare class ExperimentsApi { private readonly http; private readonly client; constructor(http: HttpClient, client: IntrospectionClient); /** * List experiments matching `params`. `await` the result for the first * page, or `for await` it to stream every experiment across pages * (fetched lazily — `limit` sets the page size, `next` the starting * cursor; stop early to stop fetching). */ list(params?: ExperimentListParams): Paginator; get(id: Uuid): Promise; create(document: Record): Promise; update(id: Uuid, document: Record, project?: string): Promise; delete(id: Uuid, project?: string): Promise; startById(id: Uuid): Promise; endById(id: Uuid): Promise; cancelById(id: Uuid): Promise; runById(id: Uuid, opts?: RunRequest): Promise; } export declare class ExperimentHandle { private readonly api; private readonly id; constructor(api: ExperimentsApi, id: Uuid); run(opts?: RunRequest): Promise; start(): Promise; end(): Promise; cancel(): Promise; } export type ExperimentHandleFactory = (id: Uuid) => ExperimentHandle; export declare function attachExperiments(client: IntrospectionClient, http: HttpClient): ExperimentsApi & ExperimentHandleFactory; //# sourceMappingURL=experiments.d.ts.map