export interface FaqEntry { question: string; answer: string; } /** Every question/answer pair in the upstream FAQ, whatever its nesting. */ export declare function flattenFaq(data: unknown): FaqEntry[]; /** * The FAQ entries that answer a customer's phrase, or none. A phrase is a FAQ * question when an entry's question shares two of its words, one of them not a * catalogue word: "cek sisa pulsa" (cek, pulsa), "cara cek masa aktif" (cek, masa, * aktif), "masa tenggang", "kuota rollover". One shared word is a coincidence * ("siapa kepala divisi" and "Siapa saja yang bisa membeli"). */ export declare function faqMatches(entries: FaqEntry[], words: string[]): (FaqEntry & { score: number; shared: string[]; })[]; /** Which FAQ a phrase is about: the postpaid one when it says so. */ export declare const faqProduct: (phrase: string) => 'simpati' | 'halo'; /** * The entries a query is about, best first, with the query words each question shares. * * A question must share a query word in its own text: an answer mentions "pulsa" * and "paket" everywhere, so an answer-only hit is noise. */ export declare function searchFaq(entries: FaqEntry[], query: string): (FaqEntry & { score: number; shared: string[]; })[];