export = ClientAdapter; /** * Storage client adapter to perform validation on index/collection existence * and to maintain the index/collection cache. */ declare class ClientAdapter { /** * @param {storeScopeEnum} scope */ constructor(scope: storeScopeEnum); es: Elasticsearch; client: any; scope: storeScopeEnum; cache: IndexCache; init(): Promise; createIndex(index: any, { indexCacheOnly, propagate }?: { indexCacheOnly?: boolean; propagate?: boolean; }): Promise; createCollection(index: any, collection: any, opts: any, { indexCacheOnly, propagate }?: { indexCacheOnly?: boolean; propagate?: boolean; }): Promise; deleteIndex(index: any): Promise; deleteIndexes(indexes: any): Promise; deleteCollection(index: any, collection: any): Promise; /** * Populates the index cache with existing index/collection. * Also checks for duplicated index names. */ populateCache(): Promise; registerCollectionEvents(): void; registerIndexEvents(): void; registerDocumentEvents(): void; registerMappingEvents(): void; /** * Cache update operations. These events trigger neither any actual change * in the storage layer, nor kuzzle events. */ registerCacheEvents(): void; /** * Load database fixtures into Kuzzle * * @param {String} fixturesId * @returns {Promise} */ loadFixtures(fixtures?: {}, { refresh }?: { refresh?: string; }): Promise; /** * Load database mappings into Kuzzle * * @param {String} mappings * @param {String} options rawMappings (false) * - propagate (true): notify the other nodes of the cluster * - indexCacheOnly (false): only update the cache, don't update the database * @returns {Promise} */ loadMappings(fixtures?: {}, options?: string): Promise; } import { Elasticsearch } from "../../service/storage/Elasticsearch"; import { IndexCache } from "./indexCache";