export declare function getReferrer(): string; export interface PostMessageData { metadata?: Record; mx: boolean; type: string; [key: string]: any; } export declare function postMessageToParent(message: PostMessageData): boolean; export declare function postInsightOnTransaction(beatGuid: string): boolean; export declare function postClientConfiguredCta(template: string): boolean; export declare const BEAT_CTA_EVENT = "beat/cta"; export declare const BEAT_OPERATION_1 = "op_1"; export declare const BEAT_OPERATION_2 = "op_2"; export declare const BEAT_OPERATION_3 = "op_3"; /** Minimal beat shape needed to build a CTA post message. */ export interface BeatCtaSource { guid: string; template: string; payload?: { action_string?: string; } | null; } export interface BeatCtaPayload { action: string; beat_guid: string; beat_template: string; action_string?: string; [key: string]: unknown; } /** * Build the `[event, payload]` tuple for a beat CTA post message. * Mirrors Pulse's `getBaseCtaPostMessage`. */ export declare function getBaseCtaPostMessage(beat: BeatCtaSource, op?: string): [string, BeatCtaPayload]; /** * Send a beat post message to the parent window. Only posts when embedded in an * iframe (`window.self !== window.top`), mirroring Pulse's `sendPostMessage` * (default scheme `mx/pulse`). Returns false when not embedded or no target. */ export declare function sendBeatPostMessage(event: string, data: Record, scheme?: string): boolean; /** * Navigate a mobile webview to a custom-scheme URL instead of posting a message. * Mirrors Pulse's `setWebviewURL` (default scheme `mx`). */ export declare function setWebviewURL(event: string, data?: Record, scheme?: string): void; export interface SendBeatCtaOptions { /** True when running inside a native mobile webview. */ isMobileWebview?: boolean; /** Custom URL scheme for webview navigation (from client config). */ webviewScheme?: string; /** Current user guid, added to the metadata like the Pulse epic does. */ userGuid?: string; /** Operation string sent with the CTA (defaults to op_1). */ op?: string; } /** * Send a beat CTA to the host: builds the payload, adds `user_guid`, then either * posts a message to the host or navigates the webview. Mirrors the behaviour of * Pulse's `postMessages` epic (minus the RxJS buffering). */ export declare function sendBeatCta(beat: BeatCtaSource, { isMobileWebview, webviewScheme, userGuid, op }?: SendBeatCtaOptions): void;