1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
use clap::Subcommand;
#[derive(Subcommand)]
pub enum QueryAction {
/// Save a named query
Save {
/// Query name
name: String,
/// Free-text search (creates a "search" kind query)
#[arg(long)]
search: Option<String>,
/// Filter by product (repeatable for OR; prefix with ! to exclude)
#[arg(long)]
product: Vec<String>,
/// Filter by component (repeatable for OR; prefix with ! to exclude)
#[arg(long)]
component: Vec<String>,
/// Filter by status (repeatable for OR; prefix with ! to exclude)
#[arg(long)]
status: Vec<String>,
/// Filter by assignee (repeatable for OR; prefix with ! to exclude)
#[arg(long)]
assignee: Vec<String>,
/// Filter by creator (repeatable for OR; prefix with ! to exclude)
#[arg(long)]
creator: Vec<String>,
/// Filter by priority (repeatable for OR; prefix with ! to exclude)
#[arg(long)]
priority: Vec<String>,
/// Filter by severity (repeatable for OR; prefix with ! to exclude)
#[arg(long)]
severity: Vec<String>,
/// Max number of results
#[arg(long)]
limit: Option<u32>,
/// Only return these fields (comma-separated)
#[arg(long)]
fields: Option<String>,
/// Exclude these fields (comma-separated)
#[arg(long)]
exclude_fields: Option<String>,
},
/// List all saved queries
List,
/// Show details of a saved query
Show {
/// Query name
name: String,
},
/// Delete a saved query
Delete {
/// Query name
name: String,
},
/// Run a saved query
Run {
/// Query name
name: String,
/// Override the saved limit
#[arg(long)]
limit: Option<u32>,
/// Override the saved fields selection
#[arg(long)]
fields: Option<String>,
/// Override the saved exclude-fields selection
#[arg(long)]
exclude_fields: Option<String>,
},
}