use serde::{Deserialize, Serialize};
use super::common::ChangeKind;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RecentChange {
#[serde(default)]
pub kind: Option<ChangeKind>,
#[serde(default)]
pub key: Option<String>,
#[serde(default)]
pub author: Option<ChangeAuthor>,
#[serde(default)]
pub ip: Option<String>,
#[serde(default)]
pub timestamp: Option<String>,
#[serde(default)]
pub comment: Option<String>,
#[serde(default)]
pub changes: Option<Vec<ChangeDetail>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ChangeAuthor {
#[serde(default)]
pub key: Option<String>,
#[serde(default)]
pub displayname: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ChangeDetail {
#[serde(default)]
pub key: Option<String>,
#[serde(default)]
pub value: Option<serde_json::Value>,
#[serde(rename = "type")]
#[serde(default)]
pub kind: Option<String>,
}
#[derive(Debug, Clone, Default)]
pub struct ChangesParams {
pub limit: Option<u32>,
pub offset: Option<u32>,
pub bot: Option<bool>,
}