use clap::Args;
use super::actions::EditActionArgs;
use super::targets::{GetOutputFormat, ListOutputFormat, ShowOutputFormat};
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonListArgs {
pub(crate) filter: Option<String>,
#[arg(short = 'n', long)]
pub(crate) limit: Option<usize>,
#[arg(short = 'o', long, value_enum)]
pub(crate) output: Option<ListOutputFormat>,
#[arg(long)]
pub(crate) tag: Option<String>,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonGetArgs {
pub(crate) id: String,
pub(crate) field: Option<String>,
#[arg(short = 'o', long, value_enum)]
pub(crate) output: Option<GetOutputFormat>,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonShowArgs {
pub(crate) id: String,
#[arg(short = 'o', long, value_enum, default_value = "table")]
pub(crate) output: ShowOutputFormat,
#[arg(long)]
pub(crate) history: bool,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonEditArgs {
pub(crate) id: String,
pub(crate) path: String,
#[command(flatten)]
pub(crate) action: EditActionArgs,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonRenderArgs {
pub(crate) id: String,
#[arg(long)]
pub(crate) dry_run: bool,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonDeleteArgs {
pub(crate) id: String,
#[arg(short = 'f', long)]
pub(crate) force: bool,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonDeprecateArgs {
pub(crate) id: String,
#[arg(short = 'f', long)]
pub(crate) force: bool,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonSupersedeArgs {
pub(crate) id: String,
#[arg(long)]
pub(crate) by: String,
#[arg(short = 'f', long)]
pub(crate) force: bool,
}
#[derive(Args, Clone, Debug)]
pub(crate) struct CommonIdArgs {
pub(crate) id: String,
}