use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
#[serde(transparent)]
pub struct AggsBody(pub Value);
impl From<Value> for AggsBody {
fn from(aggregations: Value) -> AggsBody {
AggsBody(aggregations)
}
}
impl From<Map<String, Value>> for AggsBody {
fn from(aggregations: Map<String, Value>) -> AggsBody {
AggsBody(Value::Object(aggregations))
}
}
pub type RawAggs = IndexMap<String, Value>;