# `AshHooks.Provider.DeliveryContext`
[🔗](https://github.com/baselabs/ash_hooks/blob/v3.3.0/lib/ash_hooks/provider/delivery_context.ex#L1)

Durable context for provider callbacks, with and without a source resource.

| Field | parse_event_type/2 and event_identity/2 | handle_event/3 |
| --- | --- | --- |
| tenant, source, scope, provider_alias | Set at ingest | Rebuilt from the stored receipt on every claim |
| delivery_id, external_event_id | nil | Set from the stored receipt |
| verified_facts | nil | Rebuilt from the stored receipt when recording is on |

`provider_alias` is nil for declarations without `source_record`.
A composite delivery key is a map; a single delivery key is its value.
Request headers and a receipt timestamp are absent because recovery cannot
reconstruct them. A handler needing host-owned receipt fields can read its
ledger by `delivery_id` under `tenant`.

# `t`

```elixir
@type t() :: %AshHooks.Provider.DeliveryContext{
  delivery_id: term(),
  external_event_id: binary() | nil,
  provider_alias: atom() | nil,
  scope: map(),
  source: atom(),
  tenant: term(),
  verified_facts: map() | nil
}
```

---

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