overcentric
Version:
A lightweight, privacy-focused toolkit for modern SaaS web applications
23 lines (22 loc) • 680 B
TypeScript
export interface EventQueueConfig {
projectId: string;
endpoint?: string;
onDebugLog?: (message: string) => void;
}
export declare class EventQueue {
private static instance;
private eventQueue;
private flushTimeoutId;
private config;
private readonly MAX_BATCH_SIZE;
private readonly FLUSH_INTERVAL;
private readonly MAX_RETRIES;
private readonly DEFAULT_ENDPOINT;
private constructor();
static getInstance(config: EventQueueConfig): EventQueue;
private logDebug;
private setupEventListeners;
addEvent(eventName: string, properties: Record<string, any>): void;
private scheduleFlush;
private flushEvents;
}