Complete inbox CLI implementation
This commit is contained in:
@@ -15,6 +15,7 @@ type fetchOptions struct {
|
||||
agent string
|
||||
statuses string
|
||||
limit int
|
||||
unread bool
|
||||
}
|
||||
|
||||
func newFetchCmd(root *rootOptions) *cobra.Command {
|
||||
@@ -42,6 +43,7 @@ func newFetchCmd(root *rootOptions) *cobra.Command {
|
||||
Agent: agent,
|
||||
Statuses: parseCSV(opts.statuses),
|
||||
Limit: opts.limit,
|
||||
Unread: opts.unread,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -71,6 +73,7 @@ func newFetchCmd(root *rootOptions) *cobra.Command {
|
||||
cmd.Flags().StringVar(&opts.agent, "agent", "", "Assigned agent filter")
|
||||
cmd.Flags().StringVar(&opts.statuses, "status", "pending", "Comma-separated status filter")
|
||||
cmd.Flags().IntVar(&opts.limit, "limit", 20, "Maximum number of threads")
|
||||
cmd.Flags().BoolVar(&opts.unread, "unread", false, "Only return threads whose latest message is unread by the agent")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user