import { i18n } from '@osd/i18n' ; import { BucketAggType } from './bucket_agg_type' ; import { BUCKET_TYPES } from './bucket_agg_types' ; import { GeoBoundingBox } from './lib/geo_point' ; import { BaseAggParams } from '../types' ; const filterTitle = i18n . translate ( 'data.search.aggs.buckets.filterTitle' , { defaultMessage : 'Filter' , } ) ; export interface AggParamsFilter extends BaseAggParams { geo_bounding_box ? : GeoBoundingBox ; } export const getFilterBucketAgg = ( ) => new BucketAggType ( { name : BUCKET_TYPES . FILTER , title : filterTitle , makeLabel : ( ) => filterTitle , params : [ { name : 'geo_bounding_box' , } , ] , } ) ;