/** * @octomil/browser — Federated analytics client * * Provides cross-site statistical analyses (descriptive stats, t-tests, * chi-square, ANOVA) and query history for federation members. * * Matches the cross-platform SDK interface. */ import type { AnalyticsFilter, DescriptiveResult, TTestResult, ChiSquareResult, AnovaResult, AnalyticsQuery, AnalyticsQueryListResponse } from "./types.js"; export interface FederatedAnalyticsOptions { /** Base URL of the Octomil server. */ serverUrl: string; /** Optional API key for authenticated requests. */ apiKey?: string; } export interface DescriptiveOptions { variable: string; groupBy?: string; groupIds?: string[]; includePercentiles?: boolean; filters?: AnalyticsFilter; } export interface TTestOptions { variable: string; groupA: string; groupB: string; confidenceLevel?: number; filters?: AnalyticsFilter; } export interface ChiSquareOptions { variable1: string; variable2: string; groupIds?: string[]; confidenceLevel?: number; filters?: AnalyticsFilter; } export interface AnovaOptions { variable: string; groupBy?: string; groupIds?: string[]; confidenceLevel?: number; postHoc?: boolean; filters?: AnalyticsFilter; } export declare class FederatedAnalyticsClient { private readonly serverUrl; private readonly apiKey?; constructor(options: FederatedAnalyticsOptions); /** Run descriptive statistics across groups in the federation. */ descriptive(options: DescriptiveOptions): Promise; /** Run a two-sample t-test between two groups. */ tTest(options: TTestOptions): Promise; /** Run a chi-square test of independence. */ chiSquare(options: ChiSquareOptions): Promise; /** Run a one-way ANOVA test across groups. */ anova(options: AnovaOptions): Promise; /** List past analytics queries. */ listQueries(limit?: number, offset?: number): Promise; /** Get a specific analytics query by ID. */ getQuery(queryId: string): Promise; private buildHeaders; private post; private get; } //# sourceMappingURL=federated-analytics.d.ts.map