# `Lemma.Response`
[🔗](https://github.com/lemma/lemma/blob/main/lib/lemma/response.ex#L1)

Typed projection of the JSON map returned by `Lemma.run/3`: evaluated rule
results and the resolved temporal window of the spec version actually run.

`Lemma.run/3` itself still returns the plain decoded JSON map for backward
compatibility; call `from_map/1` on that map to get a typed struct.

# `t`

```elixir
@type t() :: %Lemma.Response{
  effective: String.t(),
  results: %{optional(String.t()) =&gt; Lemma.RuleResult.t()},
  spec: String.t(),
  spec_effective_from: String.t() | nil,
  spec_effective_to: String.t() | nil
}
```

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Builds a `Lemma.Response` from the map decoded from `Lemma.run/3`'s JSON.

Raises `KeyError` if a required field (`spec`, `effective`, `results`) is
missing — that shape never comes from a real `Lemma.run/3` call.

---

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