/** * Journey detection utility * * Allows to determine the journey name based on elements present on the page. * You can define custom mappings between CSS selectors, URL parameters, and URLs. */ /** * Configuration for a single journey detection */ export declare type JourneyConfig = string | string[] | { selector: string | string[]; urlParam?: string; url?: string | RegExp; }; /** * Mapping configuration for journey detection * Maps a journey name to a configuration that can include: * - CSS selectors (string or string[]) * - Optional URL parameter to check * - Optional URL pattern to match */ export declare type JourneyMapping = { [journeyName: string]: JourneyConfig; }; /** * Detects the journey name based on elements present on the page * * @param mappings - Optional custom mappings. If not provided, uses default mappings * @param document - Optional document object (defaults to window.document) * @param location - Optional location object (defaults to window.location) * @returns The detected journey name, or null if no match is found */ export declare const detectJourney: (mappings?: JourneyMapping, document?: Document, location?: Location) => string | null; /** * Registers custom journey mappings * Merges with default mappings (custom mappings take precedence) * * @param customMappings - Custom journey mappings to add or override * @returns Combined mappings (default + custom) */ export declare const createJourneyMappings: (customMappings: JourneyMapping) => JourneyMapping; //# sourceMappingURL=journey.util.d.ts.map