import type { TCollectionName, TConditionTree, TFieldName, TSchema } from '../../templates'; import type { Caller, Collection } from '@forestadmin/datasource-toolkit'; import CollectionCustomizationContext from '../../context/collection-context'; export type SearchOptions = TCollectionName> = { /** * Include fields from the first level of relations */ extended?: boolean; /** * Remove these fields from the default search fields */ excludeFields?: Array>; /** * Add these fields to the default search fields */ includeFields?: Array>; /** * Replace the list of default searched field by these fields */ onlyFields?: Array>; }; export default class CollectionSearchContext = TCollectionName> extends CollectionCustomizationContext { readonly generateSearchFilter: (searchText: string, options?: SearchOptions) => TConditionTree; constructor(collection: Collection, caller: Caller, generateSearchFilter: (searchText: string, options?: SearchOptions) => TConditionTree); } //# sourceMappingURL=collection-search-context.d.ts.map