import type { JsonObject } from '@xylabs/object'; import type { UserEvent } from './Api/index.ts'; import { PixelApi } from './Api/index.ts'; import type { ExIds } from './ExIds.ts'; /** Singleton pixel tracker that queues and sends user events to the XY Labs tracking API. */ export declare class XyPixel { static api: PixelApi; private static _instance?; private static utmFieldsObj; cid: string; email?: string; email_hash?: string | null; exids?: ExIds; pixelId?: string; queue: UserEvent[]; private queueMutex; private constructor(); /** Returns the singleton XyPixel instance, throwing if not yet initialized. */ static get instance(): XyPixel; /** * Initializes the XyPixel singleton with the given pixel ID. * @param pixelId - The pixel identifier for this tracking instance * @returns The newly created XyPixel instance */ static init(pixelId: string): XyPixel; /** * Replaces the default PixelApi instance used for sending events. * @param api - The PixelApi instance to use */ static selectApi(api: PixelApi): void; private static utmFields; /** * Associates an email address with this pixel instance, hashing it for privacy. * @param email - The email address to identify the user with */ identify(email?: string): void; /** * Queues a tracking event and attempts to flush the queue to the API. * @param event - The event name * @param fields - Optional event-specific fields * @param eventId - Optional unique event identifier */ send(event: string, fields?: T, eventId?: string): Promise; private tryFlushQueue; private updateFbId; } //# sourceMappingURL=Pixel.d.ts.map