# `Snodo.Extensions.Tasks.Transition`
[🔗](https://github.com/joshrotenberg/snodo/blob/v0.2.0/extensions/tasks/lib/snodo/extensions/tasks/transition.ex#L1)

Pure application of a validated Task event to a revisioned snapshot.

The reducer emits `:applied` only when durable state changes and advances the
revision exactly once. `:unchanged` represents a valid no-op. Stores may use
`:duplicate` when replaying a previously committed event; pure application
does not emit that outcome because event history belongs to the store.

# `outcome`

```elixir
@type outcome() :: :applied | :unchanged | :duplicate
```

# `t`

```elixir
@type t() :: %Snodo.Extensions.Tasks.Transition{
  committed_at: String.t(),
  effects: map(),
  event_revision: non_neg_integer(),
  outcome: outcome(),
  snapshot: Snodo.Extensions.Tasks.Snapshot.t()
}
```

# `apply`

```elixir
@spec apply(
  Snodo.Extensions.Tasks.Snapshot.t(),
  Snodo.Extensions.Tasks.Event.t(),
  String.t()
) ::
  {:ok, t()} | {:error, term()}
```

Applies one event at the store-assigned commit timestamp.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
