export type NumberAggregationValue = { average: number; count: number; sum: number; }; export type AggregationType = 'sum' | 'avg' | 'count' | 'min' | 'max' | 'distinct' | 'group'; export type AggregationOptions = { attribute: string; types: AggregationType[]; distinctOptions?: { limit?: number; skipKeys?: boolean; }; groupOptions?: { limit?: number; calculateNotFound?: boolean; groups?: AggregationGroupOption[]; }; excludeZeros?: boolean; excludeUndefineds?: boolean; excludeUnresolved?: boolean; }; export type AggregationGroupOption = { from?: any; to?: any; value?: any[]; }; export type AggregationDistinctValue = { value: string; count: number; keys?: string[]; }; export type AggregationGroupValue = { option: AggregationGroupOption; count: number; keys: string[]; }; export type Aggregation = { attribute: string; types: AggregationType[]; sum?: number; avg?: number; count?: number; min?: number; max?: number; distinct?: AggregationDistinctValue[]; group?: AggregationGroupValue[]; };