/** * A resolved deep link returned by LinkHopp. */ export interface LinkHoppLink { /** The destination URL / deep link target. */ destinationUrl: string; /** Free-form metadata attached to the link. */ metadata: Record; /** Campaign name (if set in the dashboard). */ campaign: string | null; /** UTM source parameter. */ utmSource: string | null; /** UTM medium parameter. */ utmMedium: string | null; /** UTM campaign parameter. */ utmCampaign: string | null; /** How the match was established (e.g. "token", "fingerprint", "direct"). */ matchMethod: string | null; } /** * Raw response from the POST /api/v1/match endpoint. */ export interface MatchResponse { matched: boolean; method: string | null; link: { destination_url: string; metadata: Record; campaign: string | null; utm_source: string | null; utm_medium: string | null; utm_campaign: string | null; } | null; } /** * Configuration options for LinkHopp.init(). */ export interface LinkHoppConfig { /** Your API key from the LinkHopp dashboard. */ apiKey: string; /** Custom worker URL. Defaults to 'https://linkhopp.com'. */ baseUrl?: string; } /** * Callback invoked when a deep link is received while the app is running. */ export type LinkHoppLinkCallback = (link: LinkHoppLink) => void;