import { type Model } from "../../db"; import { AuthHeaderValidVerificationResultIngestion } from "../auth/types"; export type TokenCountDelegate = (p: { model: Model; text: unknown; }) => number | undefined; /** * Options for event batch processing. * @property delay - Delay in ms to wait before processing events in the batch. * @property source - Source of the events for metrics tracking (e.g., "otel", "api"). * @property isLangfuseInternal - Whether the events are being ingested by Langfuse internally (e.g. traces created for prompt experiments). */ type ProcessEventBatchOptions = { delay?: number | null; source?: "api" | "otel"; isLangfuseInternal?: boolean; }; /** * Processes a batch of events. * @param input - Batch of IngestionEventType. Will validate the types first thing and return errors if they are invalid. * @param authCheck - AuthHeaderValidVerificationResultIngestion * @param options - (Optional) Options for the event batch processing. */ export declare const processEventBatch: (input: unknown[], authCheck: AuthHeaderValidVerificationResultIngestion, options?: ProcessEventBatchOptions) => Promise<{ successes: { id: string; status: number; }[]; errors: { id: string; status: number; message?: string; error?: string; }[]; }>; export declare const aggregateBatchResult: (errors: Array<{ id: string; error: unknown; }>, results: Array<{ id: string; result: unknown; }>, projectId?: string) => { successes: { id: string; status: number; }[]; errors: { id: string; status: number; message?: string; error?: string; }[]; }; export {}; //# sourceMappingURL=processEventBatch.d.ts.map