interface JourniumEvent { uuid: string; ingestion_key: string; client_timestamp: string; event: string; properties: Record; } interface AutoTrackPageviewsOptions { trackSpaPageviews?: boolean; trackInitialPageview?: boolean; } interface AutocaptureOptions { captureClicks?: boolean; captureFormSubmits?: boolean; captureFormChanges?: boolean; captureTextSelection?: boolean; ignoreClasses?: string[]; ignoreElements?: string[]; captureContentText?: boolean; dataAttributePrefixes?: string[]; dataAttributeNames?: string[]; } interface JourniumServerOptions { debug?: boolean; flushAt?: number; flushInterval?: number; autocapture?: boolean | AutocaptureOptions; autoTrackPageviews?: boolean | AutoTrackPageviewsOptions; sessionTimeout?: number; ingestionPaused?: boolean; [key: string]: unknown; } interface ServerOptionsResponse { config?: JourniumServerOptions; errorCode?: string; message?: string; status: 'success' | 'error'; } interface JourniumLocalOptions { debug?: boolean; flushAt?: number; flushInterval?: number; autocapture?: boolean | AutocaptureOptions; autoTrackPageviews?: boolean | AutoTrackPageviewsOptions; sessionTimeout?: number; /** @internal Used by framework SDKs (Angular, Next.js) to disable built-in pageview * tracking without modifying autoTrackPageviews, so remote config can still override it. */ _frameworkHandlesPageviews?: boolean; /** @internal SDK identifier in "package@version" format, e.g. "@journium/nextjs@1.2.0". * Set automatically by each SDK package. */ _sdkVersion?: string; [key: string]: unknown; } interface JourniumConfig { publishableKey: string; apiHost?: string; options?: JourniumLocalOptions; } /** Page context fields shared by $pageview and $autocapture events. */ interface PageContextProperties { $current_url?: string; $host?: string; $pathname?: string; $search?: string; $page_title?: string; $referrer?: string; [key: string]: unknown; } interface PageviewProperties extends PageContextProperties { $previous_url?: string; $previous_pathname?: string; } /** Base properties shared by all autocapture event types. */ interface AutocaptureBaseProperties extends PageContextProperties { $event_type: 'click' | 'submit' | 'change' | 'text_selection'; $element_tag?: string; $element_type?: string; $element_id?: string; $element_classes?: string[]; $element_semantic_classes?: string[]; $element_name?: string; $element_role?: string; $element_aria_label?: string; $element_data_testid?: string; $element_data_track?: string; $element_href?: string; $element_text?: string; $element_text_source?: 'content' | 'aria-label' | 'title' | 'alt' | 'svg-title'; $element_state?: { disabled?: boolean; checked?: boolean; selected?: boolean; expanded?: boolean; }; $element_position?: { x: number; y: number; width: number; height: number; }; $parent_tag?: string; $parent_id?: string; $elements_chain?: string; $elements_chain_href?: string; $elements_chain_elements?: string[]; $elements_chain_texts?: string[]; $elements_chain_ids?: string[]; } declare const generateId: () => string; declare const generateUuidv7: () => string; declare const getCurrentTimestamp: () => string; declare const getCurrentUrl: () => string; declare const getPageTitle: () => string; declare const getReferrer: () => string; declare const isBrowser: () => boolean; declare const isNode: () => boolean; declare const fetchRemoteOptions: (apiHost: string, publishableKey: string, fetchFn?: typeof fetch) => Promise; declare const mergeOptions: >(localOptions: T | null | undefined, remoteOptions: T | null | undefined) => T; interface BrowserIdentity { distinct_id: string; $device_id: string; $session_id: string; session_timestamp: number; $user_state: 'anonymous' | 'identified'; } interface UserAgentInfo { $raw_user_agent: string; $browser: string; $os: string; $device_type: string; } declare class BrowserIdentityManager { private identity; private sessionTimeout; private storageKey; constructor(sessionTimeout?: number, publishableKey?: string); private loadOrCreateIdentity; private saveIdentity; private isBrowser; getIdentity(): BrowserIdentity | null; updateSessionTimeout(timeoutMs: number): void; refreshSession(): void; identify(distinctId: string, _attributes?: Record): { previousDistinctId: string | null; }; reset(): void; getUserAgentInfo(): UserAgentInfo; private parseBrowser; private parseOS; private parseDeviceType; } declare class Logger { private static isDebugEnabled; static setDebug(enabled: boolean): void; static isDebug(): boolean; static log(...args: unknown[]): void; static warn(...args: unknown[]): void; static error(...args: unknown[]): void; static info(...args: unknown[]): void; } export { AutoTrackPageviewsOptions, AutocaptureBaseProperties, AutocaptureOptions, BrowserIdentity, BrowserIdentityManager, JourniumConfig, JourniumEvent, JourniumLocalOptions, JourniumServerOptions, Logger, PageContextProperties, PageviewProperties, ServerOptionsResponse, UserAgentInfo, fetchRemoteOptions, generateId, generateUuidv7, getCurrentTimestamp, getCurrentUrl, getPageTitle, getReferrer, isBrowser, isNode, mergeOptions };