///
export interface IEntitySearchParameters {
query?: IFullTextQuery;
filters?: ISearchFilters;
traverse?: ITraverseFilters;
sorting?: ISearchSorting;
paging?: ISearchRequestPaging;
options?: ISearchOptions;
relations?: ISearchQueryRelations;
}
export interface ISearchFilters {
}
export interface ITraverseFilters {
rootOnly?: boolean;
parentIds?: string[];
}
export interface ISearchOptions {
includeFacets?: boolean;
includeChildrenMap?: boolean;
facetsFilters?: ISearchFilters;
}
export interface ISearchRequestPaging {
cursor?: TCursor;
pageSize: number;
}
export interface ISearchSortingField {
field: TSorting;
direction: SortDirection;
}
export interface ISearchSorting {
fields: ISearchSortingField[];
}
export declare enum SortDirection {
Asc = "asc",
Desc = "desc"
}
export interface IFullTextQuery {
term: string;
fields: string[];
}
export type ISearchQueryRelationsProperty = TProperty extends Promise ? ISearchQueryRelationsProperty> | boolean : TProperty extends Array ? ISearchQueryRelationsProperty> | boolean : TProperty extends string ? never : TProperty extends number ? never : TProperty extends boolean ? never : TProperty extends Function ? never : TProperty extends Buffer ? never : TProperty extends Date ? never : TProperty extends object ? ISearchQueryRelations | boolean : boolean;
export type ISearchQueryRelations = {
[P in keyof TEntity]?: P extends "toString" ? unknown : ISearchQueryRelationsProperty>;
};