interface StorageAdapter { open(name: string): Promise; get(key: string): Promise; set(key: string, value: unknown): Promise; delete(key: string): Promise; iterate(prefix: string): AsyncIterable<[string, unknown]>; close(): Promise; } type StorageKind = 'memory' | 'indexeddb' | 'localstorage' | StorageAdapter; type IdentityProvider = () => Record | undefined; type AnalyticsEvent = { ts: number; event: string; payload?: Record; } & Record; type AnalyticsOpts = { endpoint?: string; identity?: IdentityProvider; batchSize?: number; flushIntervalMs?: number; offlineBuffer?: StorageKind; transport?: (events: AnalyticsEvent[]) => Promise; }; declare class Analytics { private endpoint?; private identity?; private batchSize; private flushIntervalMs; private buffer; private storage?; private staticIdentity; private flushTimer?; private transport?; constructor(opts: AnalyticsOpts); init(): Promise; identify(values: Record): void; reset(): void; track(event: string, payload?: Record, overrides?: { identity?: Record; }): void; flush(): Promise; dispose(): Promise; } declare function createAnalytics(opts: AnalyticsOpts): Analytics; export { Analytics, type AnalyticsEvent, type AnalyticsOpts, createAnalytics };