search-client
Version:
Javascript library for executing searches in the Haive search-index via the SearchManager REST interface.
19 lines (18 loc) • 767 B
TypeScript
import moment from 'moment';
import { IQuery } from '.';
export declare abstract class BaseQueryConverter {
/**
* Returns the url for the REST API.
*
* @param baseUrl is the leading part of the url that is to be generated.
* @param query is the query that is to be converted into the url.
* @returns The url to use for fetching the date, represented as a string.
*/
getUrl(url: string, query: IQuery): string;
/**
* Converts the query params to an array of key=value segments.
*/
protected abstract getUrlParams(query: IQuery): string[];
protected addParamIfSet(params: string[], key: string, param: any): void;
protected createDate(date: Date | string | number | moment.DurationInputObject): string;
}