@botonic/plugin-contentful
Version:
Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet
25 lines (24 loc) • 896 B
TypeScript
/**
* 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[]);
}