# `Chronicle.EventStoreSubscriptions.DefinitionBuilder`
[🔗](https://github.com/Cratis/Chronicle.Elixir/blob/main/lib/chronicle/event_store_subscriptions/definition_builder.ex#L4)

Immutable builder for event store subscription definitions.

When no event types are configured explicitly, the builder uses all registered
event types passed to `new/1`.

# `t`

```elixir
@type t() :: %Chronicle.EventStoreSubscriptions.DefinitionBuilder{
  event_types: [module()],
  registered_event_types: [module()]
}
```

# `build`

```elixir
@spec build(t(), String.t(), String.t()) ::
  Chronicle.EventStoreSubscriptions.Definition.t()
```

Builds an event store subscription definition.

# `new`

```elixir
@spec new([module()]) :: t()
```

Creates a new definition builder.

# `with_event_type`

```elixir
@spec with_event_type(t(), module()) :: t()
```

Adds an event type to the subscription definition.

---

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