import { CounterRecord, EventRecord, HistogramRecord, HistogramStats, IDiagnosticsStorage, ILogger, ReactNativeStorageData, Storage, TagRecord } from '@amplitude/analytics-core'; /** * Diagnostics storage for React Native, backed by the storage configured on the client. * * The blob is held in memory and persisted to a single storage key. Keeping memory as the source * of truth avoids read-modify-write races when the injected storage has no transactions. One key * also means one write per save tick instead of one per data type. * * When no storage is configured this degrades to memory-only — diagnostics still accumulate and * flush for the life of the app, and are lost on app kill. Nothing here throws on that path. */ export declare class ReactNativeDiagnosticsStorage implements IDiagnosticsStorage { private readonly storage?; readonly storageKey: string; private readonly logger; private blob; private readonly ready; /** Serializes writes so concurrent callers can't clobber each other's snapshot of the blob. */ private writeQueue; constructor(apiKey: string, logger: ILogger, storage?: Storage | undefined); private hydrate; private persist; setTags(tags: Record): Promise; incrementCounters(counters: Record): Promise; setHistogramStats(histogramStats: Record): Promise; addEventRecords(events: Array<{ event_name: string; time: number; event_properties: Record; }>): Promise; setLastFlushTimestamp(timestamp: number): Promise; getLastFlushTimestamp(): Promise; getAllAndClear(): Promise<{ tags: TagRecord[]; counters: CounterRecord[]; histogramStats: HistogramRecord[]; events: EventRecord[]; }>; } //# sourceMappingURL=diagnostics-storage.d.ts.map