export interface CommonDeeplinkOptions { /** * Protocol to use for deeplink * - `tg` - use `tg://` protocol links (default) * - `http` - use `http://` protocol * - `https` - use `https://` protocol * - `none` - don't use any protocol * * @default 'https' */ protocol?: 'tg' | 'http' | 'https' | 'none'; /** * For protocols except `tg://`, domain to use * * @default 't.me' */ domain?: string; } type InputQuery = Record | null; interface BuildDeeplinkOptions { internalBuild?: (options: T) => [string, InputQuery]; internalParse?: (path: string, query: URLSearchParams) => T | null; externalBuild?: (options: T) => [string, InputQuery]; externalParse?: (path: string, query: URLSearchParams) => T | null; } export interface Deeplink { (options: T & CommonDeeplinkOptions): string; parse: (url: string) => T | null; } export declare function deeplinkBuilder(params: BuildDeeplinkOptions): Deeplink; export {};