# `Wardrik.Catalog`

Maps each `WardrikProtocol` operation to its handler and its compiled input schema.

Every surface runs operations through it, with `Wardrik.run/3`.

# `handler`

```elixir
@type handler() :: (Wardrik.Scope.t(), map() -&gt;
                {:ok, term()} | {:error, Wardrik.Error.t()})
```

# `t`

```elixir
@type t() :: %Wardrik.Catalog{
  handlers: %{required(String.t()) =&gt; handler()},
  operations: %{
    required(String.t()) =&gt; {WardrikProtocol.operation(), JSV.Root.t()}
  },
  streams: %{required(String.t()) =&gt; handler()}
}
```

# `fetch`

```elixir
@spec fetch(t(), String.t()) ::
  {:ok, {WardrikProtocol.operation(), JSV.Root.t()}} | :error
```

Returns the operation `id` with its compiled input schema, or `:error`.

# `new`

```elixir
@spec new() :: t()
```

Returns the catalog of Wardrik's own operations.

---

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