import { ElasticsearchQueryDSL } from "./elasticsearch.types.js"; export type SortOrder = "asc" | "desc"; export type Sort = Array<{ field: string; order?: SortOrder; } | Record>; export type QueryString = { query: string; allow_leading_wildcard?: false; analyze_wildcard?: boolean; analyzer?: string; auto_generate_synonyms_phrase_query?: boolean; default_field?: string; default_operator?: "AND" | "OR"; enable_position_increments?: boolean; fields?: string[]; fuzziness?: string | number; lenient?: boolean; minimum_should_match?: string | number; quote_analyzer?: string; phrase_slop?: number; quote_field_suffix?: string; time_zone?: string; type?: "best_fields" | "most_fields" | "cross_fields" | "phrase" | "phrase_prefix"; }; export type Range = Record; export type Term = Record; export type Terms = Record>; export type Match = Record; export type BoolQuery = { must?: ElasticsearchQueryDSL | ElasticsearchQueryDSL[]; must_not?: ElasticsearchQueryDSL | ElasticsearchQueryDSL[]; should?: ElasticsearchQueryDSL | ElasticsearchQueryDSL[]; filter?: ElasticsearchQueryDSL | ElasticsearchQueryDSL[]; minimum_should_match?: number | string; boost?: number; }; export type QueryClause = ElasticsearchQueryDSL; export type SourceField = boolean | string | string[] | { includes?: string[]; excludes?: string[]; }; export type SearchRequest = { query?: ElasticsearchQueryDSL; dayOffset?: number; from?: number; size?: number; sort?: Sort; _source?: SourceField; post_filter?: ElasticsearchQueryDSL; docvalue_fields?: string[]; version?: boolean; stored_fields?: string[]; highlight?: Record; aggregations?: Record; aggs?: Record; };