import { LoggerFacade } from "../logging/logger"; import { AsyncStore, AsyncStoreWithBatchedGet, Store } from "../utils/cache/store"; import { Maybe } from "../utils/type"; import { EventWithId } from "./batch_event_processor"; import { Platform } from '../platform_support'; export type StoredEvent = EventWithId & { _time?: { storedAt: number; ttl: number; }; }; export declare const DEFAULT_MAX_EVENTS_IN_STORE = 500; export declare const DEFAULT_STORE_TTL: number; export declare const EVENT_STORE_PREFIX = "optly_event:"; export type EventStoreConfig = { maxSize?: number; ttl?: number; store: Store; logger?: LoggerFacade; }; export declare class EventStore extends AsyncStoreWithBatchedGet implements AsyncStore { readonly operation = "async"; private store; private serializer; private logger?; private maxSize; private ttl; private keys?; constructor(config: EventStoreConfig); private readKeys; set(key: string, event: EventWithId): Promise; private processStoredEvent; get(key: string): Promise; remove(key: string): Promise; getKeys(): Promise; getBatched(keys: string[]): Promise[]>; } export declare const __platforms: Platform[];