/** * A/B experiments — variants, traffic split, lifecycle, Bayesian results. * * GET /experiments?projectId=&status= * POST /experiments * POST /experiments/projects/:p/experiments/:id/start * POST /experiments/projects/:p/experiments/:id/pause * POST /experiments/projects/:p/experiments/:id/conclude * GET /experiments/projects/:p/experiments/:id/results * * The results endpoint returns a winner only when statistical confidence * clears the server-configured threshold (default P(best) ≥ 0.95). */ import type { Client } from './client.js'; export interface ExperimentVariant { readonly key: string; readonly name: string; readonly weight: number; readonly isControl?: boolean; } export interface ExperimentView { readonly id: string; readonly projectId: string; readonly environmentId: string | null; readonly key: string; readonly name: string; readonly description: string | null; readonly status: string; readonly variants: readonly ExperimentVariant[]; readonly primaryMetric?: unknown; readonly winningVariant: string | null; readonly startedAt: string | null; readonly pausedAt: string | null; readonly concludedAt: string | null; readonly createdAt: string; } export interface ListOptions { readonly status?: string; } export declare const list: (client: Client, projectId: string, options?: ListOptions) => Promise<{ experiments: readonly ExperimentView[]; }>; export interface CreateInput { readonly projectId: string; readonly key: string; readonly name: string; readonly variants: readonly ExperimentVariant[]; readonly description?: string; readonly environmentId?: string | null; } export declare const create: (client: Client, input: CreateInput) => Promise; export type LifecycleAction = 'start' | 'pause' | 'conclude'; export declare const start: (client: Client, projectId: string, experimentId: string) => Promise<{ success: boolean; }>; export declare const pause: (client: Client, projectId: string, experimentId: string) => Promise<{ success: boolean; }>; export declare const conclude: (client: Client, projectId: string, experimentId: string) => Promise<{ success: boolean; }>; export interface ResultRow { readonly variant: string; readonly exposures: number; readonly conversions: number; readonly conversionRate?: number; readonly confidenceInterval?: { readonly low: number; readonly high: number; }; readonly probabilityToBeBest?: number; } export interface ResultsView { readonly experimentId: string; readonly status: string; readonly winningVariant: string | null; readonly variants: readonly ResultRow[]; } export declare const results: (client: Client, projectId: string, experimentId: string) => Promise; //# sourceMappingURL=experiments.d.ts.map