diff --git a/pbs-api-types/Cargo.toml b/pbs-api-types/Cargo.toml index 94ab583b..808ff514 100644 --- a/pbs-api-types/Cargo.toml +++ b/pbs-api-types/Cargo.toml @@ -16,6 +16,7 @@ serde.workspace = true serde_plain.workspace = true proxmox-auth-api = { workspace = true, features = [ "api-types" ] } +proxmox-apt-api-types.workspace = true proxmox-human-byte.workspace = true proxmox-lang.workspace=true proxmox-schema = { workspace = true, features = [ "api-macro" ] } diff --git a/pbs-api-types/src/lib.rs b/pbs-api-types/src/lib.rs index a3ad185b..40bcd8f1 100644 --- a/pbs-api-types/src/lib.rs +++ b/pbs-api-types/src/lib.rs @@ -52,6 +52,13 @@ pub use proxmox_schema::api_types::{SYSTEMD_DATETIME_FORMAT, TIME_ZONE_SCHEMA}; use proxmox_schema::api_types::{DNS_NAME_STR, IPRE_BRACKET_STR}; +// re-export APT API types +pub use proxmox_apt_api_types::{ + APTChangeRepositoryOptions, APTGetChangelogOptions, APTRepositoriesResult, APTRepositoryFile, + APTRepositoryFileError, APTRepositoryHandle, APTRepositoryInfo, APTStandardRepository, + APTUpdateInfo, APTUpdateOptions, +}; + #[rustfmt::skip] pub const BACKUP_ID_RE: &str = r"[A-Za-z0-9_][A-Za-z0-9._\-]*"; @@ -249,34 +256,6 @@ pub const PASSWORD_HINT_SCHEMA: Schema = StringSchema::new("Password hint.") .max_length(64) .schema(); -#[api()] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "PascalCase")] -/// Describes a package for which an update is available. -pub struct APTUpdateInfo { - /// Package name - pub package: String, - /// Package title - pub title: String, - /// Package architecture - pub arch: String, - /// Human readable package description - pub description: String, - /// New version to be updated to - pub version: String, - /// Old version currently installed - pub old_version: String, - /// Package origin - pub origin: String, - /// Package priority in human-readable form - pub priority: String, - /// Package section - pub section: String, - /// Custom extra field for additional package information - #[serde(skip_serializing_if = "Option::is_none")] - pub extra_info: Option, -} - #[api()] #[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")]