UNPKG

@botonic/plugin-contentful

Version:

## What Does This Plugin Do?

25 lines (24 loc) 896 B
/** * When a search returns multiple results, the one with highest priority should be selected. * Eg. content A has keyword 'insurance' and content B has keyword 'travel insurance'. * Since the second is more specific, it should have a higher priority */ export type Priority = number; export declare const PRIORITY_MIN: Priority; export declare const PRIORITY_MAX: Priority; /** * The score is how certain we are that the content matches the user input */ export type Score = number; export declare const SCORE_MIN: Score; export declare const SCORE_MAX: Score; export declare class SearchableByKeywords { readonly name: string; keywords: string[]; priority: number; constructor(name: string, keywords?: string[], priority?: number); } export declare class SearchableBy { readonly keywords: SearchableByKeywords[]; constructor(keywords?: SearchableByKeywords[]); }