Constructors for Jido.Messaging domain events as Jido.Signal CloudEvents.
These events describe committed local messaging state. jido_chat still owns
adapter-facing envelopes and payloads; this module carries the normalized
runtime facts that small chat apps, bridges, agents, and UIs can subscribe to.
Summary
Functions
Builds the canonical signal for a locally committed room message.
Converts a messaging record into the plain event payload used by message signals.
Builds the canonical signal for a failed outbound platform delivery.
Builds the canonical signal for an inbound platform message.
Builds the canonical signal for a successful outbound platform delivery.
Builds a Jido.Signal CloudEvent for a normalized messaging event type.
Builds the canonical signal for a message reaction being added.
Builds the canonical signal for a message reaction being removed.
Builds a canonical room-scoped signal from arbitrary event data.
Returns the telemetry event name associated with a messaging event type.
Returns the CloudEvent type string for a messaging event atom or custom type string.
Types
@type event_type() :: :message_added | :message_received | :message_sent | :message_failed | :room_created | :participant_joined | :participant_left | :presence_changed | :typing | :reaction_added | :reaction_removed | :message_delivered | :message_read | :thread_created | :thread_reply_added | atom()
Functions
@spec message_added(module(), Jido.Messaging.Message.t(), keyword() | map()) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds the canonical signal for a locally committed room message.
@spec message_data(Jido.Messaging.Message.t(), keyword() | map()) :: map()
Converts a messaging record into the plain event payload used by message signals.
@spec message_failed(module() | nil, String.t(), term(), keyword() | map()) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds the canonical signal for a failed outbound platform delivery.
@spec message_received(module() | nil, Jido.Messaging.Message.t(), keyword() | map()) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds the canonical signal for an inbound platform message.
@spec message_sent(module() | nil, Jido.Messaging.Message.t(), keyword() | map()) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds the canonical signal for a successful outbound platform delivery.
@spec new( String.t() | event_type(), module() | nil, String.t() | nil, map(), keyword() | map() ) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds a Jido.Signal CloudEvent for a normalized messaging event type.
@spec reaction_added( module(), Jido.Messaging.Message.t(), String.t(), String.t(), keyword() | map() ) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds the canonical signal for a message reaction being added.
@spec reaction_removed( module(), Jido.Messaging.Message.t(), String.t(), String.t(), keyword() | map() ) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds the canonical signal for a message reaction being removed.
@spec room_event(module(), event_type(), String.t(), map(), keyword() | map()) :: {:ok, Jido.Signal.t()} | {:error, term()}
Builds a canonical room-scoped signal from arbitrary event data.
@spec telemetry_event_for(String.t() | event_type()) :: [atom()]
Returns the telemetry event name associated with a messaging event type.
@spec type_for(String.t() | event_type()) :: String.t()
Returns the CloudEvent type string for a messaging event atom or custom type string.