bankai/task_view

Types

pub type DeferredFilter {
  AnyDeferred
  DeferredOnly
  NotDeferred
}

Constructors

  • AnyDeferred
  • DeferredOnly
  • NotDeferred
pub type Direction {
  Ascending
  Descending
}

Constructors

  • Ascending
  • Descending
pub type SortField {
  ById
  ByPriority
  ByCreated
  ByUpdated
}

Constructors

  • ById
  • ByPriority
  • ByCreated
  • ByUpdated
pub type Spec {
  Spec(
    statuses: List(types.TaskStatus),
    kinds: List(types.TaskKind),
    priority_min: option.Option(Int),
    priority_max: option.Option(Int),
    assignee: option.Option(String),
    labels_any: List(String),
    labels_all: List(String),
    deferred: DeferredFilter,
    created_after: option.Option(Int),
    created_before: option.Option(Int),
    updated_after: option.Option(Int),
    updated_before: option.Option(Int),
    sort: SortField,
    direction: Direction,
    offset: Int,
    limit: option.Option(Int),
  )
}

Constructors

Values

pub fn apply(
  tasks: List(types.Task),
  spec: Spec,
  now: Int,
) -> List(types.Task)
pub fn count(
  tasks: List(types.Task),
  spec: Spec,
  now: Int,
) -> json.Json
pub fn default() -> Spec
pub fn envelope(
  tasks: List(types.Task),
  spec: Spec,
  now: Int,
  compact: Bool,
) -> json.Json
pub fn has_flag(args: List(String), flag: String) -> Bool
pub fn parse(args: List(String)) -> Result(Spec, String)
Search Document