use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
#[serde(tag = "event", rename_all = "snake_case")]
#[schemars(rename = "cli.output.notification.Updater")]
pub enum Updater {
#[schemars(title = "Skipped")]
Skipped {
reason: SkipReason,
},
#[schemars(title = "Checking")]
Checking {
asset_name: String,
current_version: String,
},
#[schemars(title = "UpToDate")]
UpToDate {
current_version: String,
remote_version: String,
},
#[schemars(title = "Found")]
Found {
current_version: String,
remote_version: String,
asset_name: String,
url: String,
},
#[schemars(title = "Installed")]
Installed {
current_version: String,
remote_version: String,
},
}
#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
#[serde(rename_all = "snake_case")]
#[schemars(rename = "cli.output.notification.SkipReason")]
pub enum SkipReason {
#[schemars(title = "UnsupportedPlatform")]
UnsupportedPlatform,
#[schemars(title = "DevTree")]
DevTree,
#[schemars(title = "IncompleteRelease")]
IncompleteRelease,
}