AshTypescript.TypedChannel.Info (ash_typescript v0.18.2)

Copy Markdown View Source

Provides introspection functions for AshTypescript.TypedChannel configuration and for the Ash.Notifier.PubSub publications typed channels reference.

Summary

Functions

Finds the Ash.Notifier.PubSub publication matching event.

typed_channel DSL entities

Whether or not a given module uses the AshTypescript.TypedChannel DSL.

typed_channel DSL options

The Phoenix channel topic pattern (e.g. "org:*").

The Phoenix channel topic pattern (e.g. "org:*").

Functions

find_publication(resource, event)

@spec find_publication(module() | [struct()], String.t()) :: struct() | nil

Finds the Ash.Notifier.PubSub publication matching event.

Accepts either the resource module or an already-fetched publication list. Matching falls back to the action name for publications with no event:.

typed_channel(dsl_or_extended)

@spec typed_channel(dsl_or_extended :: module() | map()) :: [struct()]

typed_channel DSL entities

typed_channel?(module)

@spec typed_channel?(module()) :: boolean()

Whether or not a given module uses the AshTypescript.TypedChannel DSL.

typed_channel_options(dsl_or_extended)

@spec typed_channel_options(dsl_or_extended :: module() | map()) :: %{
  required(atom()) => any()
}

typed_channel DSL options

Returns a map containing the and any configured or default values.

typed_channel_topic(dsl_or_extended)

@spec typed_channel_topic(dsl_or_extended :: module() | map()) ::
  {:ok, String.t()} | :error

The Phoenix channel topic pattern (e.g. "org:*").

typed_channel_topic!(dsl_or_extended)

@spec typed_channel_topic!(dsl_or_extended :: module() | map()) ::
  String.t() | no_return()

The Phoenix channel topic pattern (e.g. "org:*").