From e5bde4a76ec693e6f12445b2977998f0668eafdc Mon Sep 17 00:00:00 2001 From: Kornel Date: Mon, 4 Dec 2023 15:58:44 +0000 Subject: [PATCH] Add audit_actions --- src/types.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/types.rs b/src/types.rs index ae0bed6..ea73e41 100644 --- a/src/types.rs +++ b/src/types.rs @@ -328,6 +328,16 @@ pub struct VersionLinks { pub version_downloads: String, } +/// Changes made to a create [`Version`] +#[derive(Serialize, Deserialize, Debug, Clone)] +#[allow(missing_docs)] +pub struct AuditAction { + /// publish, yank, unyank + action: String, + time: DateTime, + user: User, +} + /// A [`Crate`] version. #[derive(Serialize, Deserialize, Debug, Clone)] #[allow(missing_docs)] @@ -348,6 +358,8 @@ pub struct Version { pub crate_size: Option, pub published_by: Option, pub rust_version: Option, + #[serde(default)] + pub audit_actions: Vec, } /// A crate category.