# `Jidoka.Effect.Journal`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/effect/journal.ex#L1)

Intent/result journal used to make effects replayable.

# `t`

```elixir
@type t() :: %Jidoka.Effect.Journal{
  intents: %{optional(binary()) =&gt; term()},
  results: %{optional(binary()) =&gt; term()}
}
```

# `incomplete_intent?`

```elixir
@spec incomplete_intent?(t(), Jidoka.Effect.Intent.t()) :: boolean()
```

Returns true when an intent is recorded without a result.

# `intent_for`

```elixir
@spec intent_for(t(), Jidoka.Effect.Intent.t() | String.t()) ::
  Jidoka.Effect.Intent.t() | nil
```

Returns a recorded intent by intent value or identifier.

# `intent_recorded?`

```elixir
@spec intent_recorded?(t(), Jidoka.Effect.Intent.t() | String.t()) :: boolean()
```

Returns true when the journal contains the intent.

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds an empty or restored effect journal.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds an effect journal and raises if the attributes are invalid.

# `put_intent`

```elixir
@spec put_intent(t(), Jidoka.Effect.Intent.t()) :: t()
```

Records an intent by its stable identifier.

# `put_result`

```elixir
@spec put_result(t(), Jidoka.Effect.Result.t()) :: t()
```

Records an effect result by its intent identifier.

# `result_for`

```elixir
@spec result_for(t(), Jidoka.Effect.Intent.t()) :: Jidoka.Effect.Result.t() | nil
```

Returns the recorded result for an intent, if it exists.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for an effect journal.

---

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