import { CheckEvent } from './flag/flags'; import { Logger } from './logger'; type PayloadContext = { active?: boolean; }; export type BulkEvent = { type: "company"; companyId: string; userId?: string; attributes?: Record; context?: PayloadContext; } | { type: "user"; userId: string; attributes?: Record; context?: PayloadContext; } | { type: "event"; event: string; companyId?: string; userId: string; attributes?: Record; context?: PayloadContext; } | { type: "feature-flag-event"; action: "check-is-enabled" | "check-config"; key: string; targetingVersion?: number; evalResult?: boolean | { key: string; payload: any; }; evalContext?: Record; evalRuleResults?: boolean[]; evalMissingFields?: string[]; evalErrors?: CheckEvent["evaluationErrors"]; } | { type: "prompt-event"; action: "received" | "shown" | "dismissed"; featureId: string; promptId: string; userId: string; promptedQuestion: string; }; export type BulkQueueOptions = { flushDelayMs?: number; maxSize?: number; logger?: Logger; }; export declare class BulkQueue { private readonly flushDelayMs; private readonly maxSize; private readonly logger?; private readonly sendBulk; private queue; private timer; private inFlightBatch; private inFlightPromise; private lastDropErrorAt; private totalDroppedEvents; private droppedSinceLastError; constructor(sendBulk: (events: BulkEvent[]) => Promise, opts?: BulkQueueOptions); enqueue(event: BulkEvent): Promise; flush(): Promise; size(): Promise; private schedule; private sendBatch; private getInFlightBatchSize; private trimPendingQueueToCapacity; } export {}; //# sourceMappingURL=bulkQueue.d.ts.map