export type UserIdentifyPayload = { userId: string; firstName?: string; lastName?: string; email?: string; phone?: string; avatar?: string; properties?: Record; }; export declare function registerWidgetHost(widgetHost: string): void; export declare function pushUserIdentifyToIframes(payload: UserIdentifyPayload): void; /** * Register an agent iframe created during widget init. Identity is pushed on * load and on every subsequent identify() call until the registration is removed. */ export declare function registerBrainfishIframe(iframe: HTMLIFrameElement, widgetHost: string, options?: { signal?: AbortSignal; }): void; export declare function unregisterBrainfishIframe(iframe: HTMLIFrameElement): void; export declare function ensureIdentityListener(): void; export declare function normalizeIdentifyPayload(userData: Record): UserIdentifyPayload | null; /** * Stores identity on the host page and delivers it to agent iframes. * Returns the normalized payload for analytics, or null if invalid. */ export declare function setUserIdentity(userData: Record): UserIdentifyPayload | null; export declare function getLatestIdentifyPayload(): UserIdentifyPayload | null; /** * Wraps window.BrainfishAnalytics so direct callers of * BrainfishAnalytics('identify', payload) also deliver identity to agent * iframes. The wrapper re-applies whenever the global is reassigned (the * web-tracker CDN script replaces the bootstrap queue function on load). */ export declare function installBrainfishAnalyticsIdentityHook(): void; /** @internal Test helper */ export declare function resetUserIdentityState(): void;