AshHooks.Provider.DeliveryContext (AshHooks v3.3.0)

Copy Markdown View Source

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

Fieldparse_event_type/2 and event_identity/2handle_event/3
tenant, source, scope, provider_aliasSet at ingestRebuilt from the stored receipt on every claim
delivery_id, external_event_idnilSet from the stored receipt
verified_factsnilRebuilt 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.

Summary

Types

t()

@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
}