@meilisearch/meili-api
Version:
The MeiliSearch JS client for Node.js and the browser.
81 lines • 2.07 kB
TypeScript
import { AxiosInstance } from 'axios';
import { Indexes } from './indexes';
import * as Types from './types';
interface Config {
host: string;
apiKey?: string;
}
declare class Meili {
baseURL: string;
apiKey?: string;
instance: AxiosInstance;
constructor(config: Config);
/**
* Return an Index instance
* @memberof Meili
* @method Index
*/
Index(indexUid: string): Indexes;
/**
* List all indexes in the database
* @memberof Meili
* @method listIndexes
*/
listIndexes(): Promise<object[]>;
/**
* Create a new index with am optional schema
* @memberof Meili
* @method createIndex
*/
createIndex(data: Types.CreateIndexRequest): Promise<Types.CreateIndexResponse>;
/**
* Check if the server is healhty
* @memberof Admin
* @method isHealthy
*/
isHealthy(): Promise<boolean>;
/**
* Change the healthyness to healthy
* @memberof Admin
* @method setHealthy
*/
setHealthy(): Promise<void>;
/**
* Change the healthyness to unhealthy
* @memberof Admin
* @method setUnhealthy
*/
setUnhealthy(): Promise<void>;
/**
* Change the healthyness to unhealthy
* @memberof Admin
* @method setUnhealthy
*/
changeHealthTo(health: boolean): Promise<void>;
/**
* Get the stats of all the database
* @memberof Admin
* @method databaseStats
*/
databaseStats(): Promise<object>;
/**
* Get the version of the server
* @memberof Admin
* @method version
*/
version(): Promise<object>;
/**
* Get the server consuption, RAM / CPU / Network
* @memberof Admin
* @method systemInformation
*/
systemInformation(): Promise<object>;
/**
* Get the server consuption, RAM / CPU / Network. All information as human readable
* @memberof Admin
* @method systemInformationPretty
*/
systemInformationPretty(): Promise<object>;
}
export default Meili;
//# sourceMappingURL=index.d.ts.map