import { DocumentationLegacyPage } from "../../model/documentation/SDKDocumentationLegacyPage"; import Fuse from "fuse.js"; export declare enum DocSearchResultDataType { contentBlock = "contentBlock", sectionHeader = "sectionHeader", pageTitle = "pageTitle" } export type DocSearchResult = { item: DocSearchResultData; refIndex: number; }; export type DocSearchResultData = { id: number; pageName: string; pageId: string; blockId: string | undefined; text: string; type: DocSearchResultDataType; }; export type DocSearchConfiguration = { shouldSort?: boolean; threshold?: number; location?: number; distance?: number; maxPatternLength?: number; minMatchCharLength?: number; ignoreLocation?: boolean; keys: Array; }; /** Search manager */ export declare class DocSearch { searchEngine: Fuse; searchConfiguration: DocSearchConfiguration; constructor(configuration: DocSearchConfiguration); updateSearchIndex: (pages: Array) => Array; search: (input: string) => Array; /** When using this configuration, the results will be very precise and will not be deviating too much from the query */ static defaultPreciseConfiguration(): DocSearchConfiguration; /** When using this configuration, the results will be more fuzzy and might cover broader spectrum results than just near-keyword based search */ static defaultFuzzyConfiguration(): DocSearchConfiguration; /** Reconstructs the search index */ private reconstructSearchIndex; /** Creates flattened structure of the blocks, even from the contained blocks, so it is easier to iterate through them */ private flattenedBlocksOfPage; /** Flattens one leaf of blocks */ private flattenedBlocksOfBlock; }