search-client
Version:
Javascript library for executing searches in the Haive search-index via the SearchManager REST interface.
78 lines (77 loc) • 2.19 kB
TypeScript
import { IAuthenticationSettings } from './Authentication';
import { IAutocompleteSettings } from './Autocomplete';
import { ICategorizeSettings } from './Categorize';
import { IQuery } from './Common';
import { IFindSettings } from './Find';
export interface ISettings {
/**
* The JWT authentication token to use.
*/
authentication?: IAuthenticationSettings;
/**
* Settings for autocomplete().
*/
autocomplete?: IAutocompleteSettings;
/**
* Settings for categorize().
*/
categorize?: ICategorizeSettings;
/**
* Settings for find().
*/
find?: IFindSettings;
/**
* You can use this path to override the path to the rest-service.
* If not set, it will default to "RestService/v4".
*/
basePath?: string;
/**
* Settings for the common query (autocomplete/find/categorize)
*/
query?: IQuery;
/**
* BaseUrl for the SearchClient service (can be overriden in specific services)
*/
baseUrl?: string;
}
/**
* Settings as used by the SearchClient.
*
* Please see the data-type description for each property in question.
*/
export declare class Settings implements ISettings {
/**
* The JWT authentication token to use.
*/
authentication?: IAuthenticationSettings;
/**
* Settings for autocomplete().
*/
autocomplete?: IAutocompleteSettings;
/**
* Settings for categorize().
*/
categorize?: ICategorizeSettings;
/**
* Settings for find().
*/
find?: IFindSettings;
/**
* You can use this path to override the path to the rest-service.
* Default: RestService/v4
*/
basePath?: string;
/**
* Settings for the common query (autocomplete/find/categorize)
*/
query?: IQuery;
/**
* BaseUrl for the SearchClient service (can be overridden in specific services)
*/
baseUrl?: string;
/**
* Creates a Settings object for you, based on Settings defaults and the overrides provided as a param.
* @param settings - The settings defined here will override the default Settings.
*/
constructor(settings: ISettings | string);
}