AshDispatch.Resource.Dsl (AshDispatch v0.5.1)

View Source

DSL sections for AshDispatch.Resource extension.

Summary

Functions

The audience entity for explicit audience path overrides.

The audience_prefix entity for child resources.

The counter entity for defining individual counters.

The counters section for declaring resource-level counters.

The main dispatch section for defining events in resources.

The entity_changes entity for enabling real-time entity change broadcasting.

The event entity for defining individual events.

The locales entity for resource-level locale configuration.

The resource_meta entity for TypeScript resource metadata generation.

Functions

audience_entity()

The audience entity for explicit audience path overrides.

Allows defining custom paths for specific audiences, useful when an audience needs a different path than the default or when combined with audience_prefix.

audience_prefix_entity()

The audience_prefix entity for child resources.

Specifies a relationship prefix that all relationship-based audiences should go through before resolving. This is useful for child resources like OrderItem that access users through their parent Order.

counter_entity()

The counter entity for defining individual counters.

counters_section()

The counters section for declaring resource-level counters.

dispatch_section()

The main dispatch section for defining events in resources.

entity_changes_entity()

The entity_changes entity for enabling real-time entity change broadcasting.

When enabled, CRUD events for this resource are automatically broadcast as entity_change and entity_created channel events, enabling real-time UI updates like entity snapshots, toast notifications, and status dots.

event_entity()

The event entity for defining individual events.

locales_entity()

The locales entity for resource-level locale configuration.

Defines which locales should have templates generated and serves as the default locale list for all events in the resource.

resource_meta_entity()

The resource_meta entity for TypeScript resource metadata generation.

Provides metadata about the resource that the TypeScript SDK uses to generate navigation paths, labels, and type-safe resource constants.