captide
Version:
Get hundreds of thousands of financial documents into your AI app 🚀
21 lines (20 loc) • 862 B
TypeScript
/**
* Generates a shareable link for a highlighted document element
*
* @param sourceLink The document's source link
* @param elementId The highlighted element ID (with # prefix)
* @param baseUrl The base URL of the application (defaults to current origin)
* @param viewerRoutePath The route path to use for the document viewer (defaults to '/document-viewer')
* @returns A fully qualified shareable URL
*/
export declare function generateShareableLink(sourceLink: string, elementId: string | null, baseUrl?: string, viewerRoutePath?: string): string;
/**
* Parses document viewer parameters from a URL
*
* @param url The URL to parse (defaults to current URL)
* @returns Object containing sourceLink and elementId
*/
export declare function parseDocumentViewerParams(url?: string): {
sourceLink: string | null;
elementId: string | null;
};