Skip to content

Commit

Permalink
Add audit_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski authored and theduke committed Dec 4, 2023
1 parent f66d8c8 commit e5bde4a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Utc>,
user: User,
}

/// A [`Crate`] version.
#[derive(Serialize, Deserialize, Debug, Clone)]
#[allow(missing_docs)]
Expand All @@ -348,6 +358,8 @@ pub struct Version {
pub crate_size: Option<u64>,
pub published_by: Option<User>,
pub rust_version: Option<String>,
#[serde(default)]
pub audit_actions: Vec<AuditAction>,
}

/// A crate category.
Expand Down

0 comments on commit e5bde4a

Please sign in to comment.