API Reference AshDispatch v#0.5.0
View SourceModules
Event-driven notification system for Ash Framework.
Behavior for checking user email preferences.
Calculates admin-specific URL for source resource, regardless of receipt audience.
Calculation for loading user records from the configured user resource.
Calculation that loads Oban job data for delivery receipts.
Calculates a human-readable label for the source resource type. Uses UrlBuilder.resource_label/1 if available, else derives from module name.
Calculates the source URL for a delivery receipt at runtime.
Enqueues a new Oban job when a delivery receipt is retried.
Represents a delivery channel for an event.
Centralized channel resolution for AshDispatch events.
Centralized configuration access for AshDispatch.
Helper module for accessing content maps with mixed atom/string keys.
Event context passed to all event callbacks and transports.
Core dispatcher that handles event delivery across all transports.
Internal AshDispatch Domain for library-provided resources.
DSL entity struct for channel definitions.
DSL entity struct for counter broadcast configurations.
Defines the DSL sections for AshDispatch events.
Transformer that infers the event ID from the module name if not explicitly set.
Transformer that sets default values for event configuration.
Transformer that validates channel configurations.
Swoosh-based email backend for AshDispatch.
Behaviour and DSL for defining events.
Lightweight :custom_topic transport for AshDispatch.Event.
Helper functions for events that use Ash introspection to derive behavior.
Handles variable interpolation in DSL content strings.
Extracts recipient identifiers and names from recipient structs using cascading configuration.
Auto-discovery registry for event modules.
Centralized event resolution and callback execution for AshDispatch events.
Spark DSL extension that adds a user belongs_to relationship to DeliveryReceipt.
Transformer that conditionally adds a user belongs_to relationship to the resource.
Helper for building initial Phoenix Channel state.
Helper for loading initial counter values when users connect.
Helper for loading and managing notifications.
Defensive field-reading helpers for post-action notifier hooks.
Helpers for introspecting Ash resources to derive configuration automatically.
Introspection helpers for AshDispatch events.
Central introspection module for discovering all AshDispatch events.
Central module for all AshDispatch naming conventions.
Single notifier that handles ALL DispatchEvent and counter-broadcast work for resources using the AshDispatch DSL.
Side-effect orchestration for counter broadcasts — extracted from the
prior AshDispatch.Changes.BroadcastCounterUpdate module.
Side-effect orchestration for dispatch events — extracted from the
prior AshDispatch.Changes.DispatchEvent module.
Spark Info module — reads per-action AshDispatch config persisted by the resource transformers.
Macro for creating a user channel with all AshDispatch functionality built-in.
Policy check that delegates to a configured permission checker.
Preparation that loads Oban job data for delivery receipts.
Centralized receipt status management for AshDispatch workers.
Behaviour and DSL for declarative recipient resolution.
DSL macros for defining audiences in a RecipientResolver.
Resolution logic for audience-based recipient lookup.
Ash.Resource extension for defining event dispatching and counter broadcasting.
DSL sections for AshDispatch.Resource extension.
DSL entity struct for explicit audience path overrides.
DSL entity struct for audience prefix configuration.
Data structure representing a counter definition from the DSL.
Data structure for entity_changes configuration in the dispatch section.
DSL entity struct for event definitions in resources.
DSL entity struct for resource-level locale configuration.
Data structure for resource_meta configuration in the dispatch section.
Introspection helpers for AshDispatch.Resource.
Transformer that registers AshDispatch.Notifier and persists
per-action counter-broadcast config for resources using the
counters DSL block.
Transformer that registers AshDispatch.Notifier and persists
per-action dispatch-event config for resources using the dispatch
DSL block.
Transformer that auto-injects the host app's EntityNotifier into any resource
that declares entity_changes(true).
Transformer that validates event configurations.
Reference documentation for DeliveryReceipt resources.
Provides the base DSL for DeliveryReceipt resources.
Read-only Ash resource exposing email event metadata via RPC.
Non-persisted resource for manually triggering events from admin interfaces.
Provides the base DSL for ManualTrigger resources.
Reference documentation for Notification resources.
Provides the base DSL for Notification resources.
Behaviour that an SMS backend module implements. Configure a backend in your app config
HTML-safe rendering helpers for AshDispatch.TemplateResolver.
Automatically sets up DeliveryReceipt resource in your consuming app.
Resolves and renders HEEx/EEx templates for events with fallback chain.
Behaviour for AshDispatch transports.
Compile-time aggregator over AshDispatch.Transport implementations.
Lightweight PubSub broadcast transport for real-time events.
Discord webhook transport.
Email transport via Oban jobs.
In-app notification transport.
Oban-job-enqueue transport.
SMS transport — delegates to a consumer-configured backend.
Slack webhook transport.
Generic webhook transport.
Behaviour for checking user notification preferences.
Default user preference checker that allows all notifications.
Validates that a delivery receipt can be retried.
Interpolates variables in template strings.
Handles webhooks from Resend for email delivery events.
Cron worker that automatically retries failed delivery receipts.
Oban worker for sending emails asynchronously.
Oban worker for sending webhooks asynchronously.
Mix Tasks
Generates missing files for AshDispatch events based on DSL definitions.
Generates Mermaid diagrams showing AshDispatch events, channels, and counters.
Generates static HTML/text preview files for all AshDispatch events.
Generates an AshDispatch.RecipientResolver module for declarative audience resolution.
Installs AshDispatch into a project
Sets up the initial AshDispatch directory structure and generates default layouts.
Mix compiler that copies AshDispatch templates to priv/ directory.