export interface AggregationResponse { 'entity-type'?: string; id: string; field?: string; properties?: Record; ranges?: any[]; selection?: any[]; type?: string; buckets: AggregationBucket[]; extendedBuckets?: AggregationBucket[]; } export interface AggregationBucket { key: string; docCount: number; fetchedKey?: Record; from?: number; to?: number; fromAsDate?: Record; toAsDate?: Record; }