import Base from "../../base"; import { IBase, IResourceMapper, ISearchParams, IAutocompleteParams } from "../../interfaces"; import { ISearch, ISearchResource, ISearchResultsPayload } from "./"; import { IAutocompletePayload } from "./autocomplete"; export interface ISearchService extends IBase { query(options: ISearchParams): Promise; createClickthrough(term: string, searchResultId: string): Promise; createAutocompleteClickthrough(prefix: string, searchResultSwiftypeId: string): Promise; queryAutocomplete(options: ISearchParams): Promise; } export default class SearchService extends Base implements ISearchService { resource: string; mapper: IResourceMapper; url(): string; query(options: ISearchParams): Promise; createClickthrough(term: any, searchResultId: any): Promise; createAutocompleteClickthrough(prefix: any, searchResultSwiftypeId: any): Promise; queryAutocomplete(options: IAutocompleteParams): Promise; }