UNPKG

@tsed-plus/meilisearch-mongoose-indexer

Version:

Extends the Ts.ED framework with the functionality to synchronize Mongoose models with Meilisearch

12 lines (11 loc) 587 B
import { Document as MeiliDocument, Index, IndexOptions, Settings } from 'meilisearch'; export declare type UpdateIndexAndSettingsOptions = { indexOptions?: IndexOptions; indexSettings?: Settings; }; export declare class BaseMeiliMongoIndexer<T = any, U = object> { getIndexName(): Promise<string> | string | undefined; getCreateIndexOptions(): Promise<IndexOptions> | IndexOptions; getUpdateIndexAndSettingsOptions(index: Index<U>): Promise<UpdateIndexAndSettingsOptions | undefined>; transformDocument(input: T): MeiliDocument<U> | Promise<MeiliDocument<U>>; }