import LogRocket from 'logrocket'; import { Logger } from '@elliemae/pui-diagnostics'; /** * EMUI global interface */ interface EMUI { /** * CDN domain for LogRocket assets */ cdnDomain?: string | null; /** * LogRocket instance */ logRocket: typeof LogRocket; /** * LogRocket configuration options */ logRocketConfig?: { /** * Enable or disable LogRocket initialization */ enable?: boolean; /** * LogRocket application ID */ appId: string; /** * Child domains for LogRocket session sharing */ childDomains?: string[]; /** * Parent domain for LogRocket session sharing */ parentDomain?: string; /** * Root hostname for LogRocket session sharing */ rootHostname?: string; /** * Flag to enable LogRocket on localhost */ localhostEnable?: boolean; }; /** * Logger instance for logging */ logger?: Logger; /** * Flag for developers to manually set consent for testing purposes */ dangerouslyOverrideSessionRecordingConsent?: boolean; /** * Flag indicating whether LogRocket has been initialized */ isLogRocketInitialized?: boolean; /** * Captured at init time: whether LogRocket is enabled */ lrEnabled?: boolean; /** * Captured at init time: whether user consented to session recording */ lrSessionRecordingConsent?: boolean; } /** * OneTrust API interface */ interface OneTrustAPI { IsAlertBoxClosed: () => boolean; getGeolocationData: () => { region: string; country: string; }; AllowAll: () => void; RejectAll: () => void; ToggleInfoDisplay: () => void; LoadBanner: () => void; } declare global { interface Window { /** * EMUI global object provided by microapp */ emui: EMUI; /** * enable onetrust integration */ hasOneTrust?: boolean; /** * OneTrust API object */ OneTrust?: OneTrustAPI; /** * Comma-separated list of active OneTrust consent groups */ OnetrustActiveGroups?: string; /** * Callback function invoked by OneTrust when consent preferences change * @returns void */ OptanonWrapper?: () => void; /** * Callback function to be invoked when OneTrust is ready * @returns void */ onetrustCallback?: () => void; /** * URL of the LogRocket asynchronous script */ _lrAsyncScript?: string; } } export {};