UNPKG

@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

18 lines (17 loc) 864 B
import { CMS, Context, ContextWithLocale, PagingOptions, Text } from '../cms'; import { KeywordsOptions, MatchType, Normalizer } from '../nlp'; import { SearchResult } from './search-result'; export declare class Search { private readonly cms; private readonly normalizer; private readonly search; constructor(cms: CMS, normalizer: Normalizer, keywordsOptions?: { [locale: string]: KeywordsOptions; }); /** * It does not sort the results based on the {@link SearchResult.priority}. * @param context must contain language */ searchByKeywords(inputText: string, matchType: MatchType, context: ContextWithLocale, paging?: PagingOptions): Promise<SearchResult[]>; respondFoundContents(results: SearchResult[], confirmKeywordsFoundTextId: string, noKeywordsFoundTextId: string, context: Context): Promise<Text>; }