import type { estypes } from "@elastic/elasticsearch"; import type { MappingObject } from "./search-query.js"; import type { GeoFields } from "../fields.js"; import { GeoPointValue } from "../mapping.js"; export type GeoQuery = GeoBoundingBox | GeoDistance | GeoHashGrid | GeoHexGrid | GeoShape | GeoPolygon; export interface GeoBoundingBox { geo_bounding_box: { [path in keyof GeoFields]: estypes.GeoBounds | estypes.QueryDslGeoExecution | estypes.QueryDslGeoValidationMethod | boolean | estypes.float | string; }; } /** * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html */ export interface GeoDistance { geo_distance: { distance: string; distance_type?: "arc" | "plane"; } & { [k in GeoFields]: GeoPointValue; }; } /** * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html */ export interface GeoShape { geo_shape: { [k in GeoFields]: estypes.QueryDslGeoShapeFieldQuery; }; } export interface GeoHashGrid { geohash_grid: { field: GeoFields; }; } export interface GeoHexGrid { geohex_grid: { field: GeoFields; precision: number; }; } export interface GeoPolygon { geo_polygon: { [field in GeoFields]?: estypes.QueryDslGeoPolygonPoints | estypes.QueryDslGeoValidationMethod | boolean | estypes.float | string; } & estypes.QueryDslGeoPolygonQueryKeys; } //# sourceMappingURL=geo-query.d.ts.map