Behaviour contract for notification definitions.
Delayed fallback channels
delayed_fallback_channels/2 lets notifiers mark outbound channels as delayed
fallback candidates. Returned channels must be a subset of channels/2 output
and must never include :in_app.
Summary
Types
@type orchestration_mode() :: :immediate | :digest_held
@type orchestration_resolution() :: %{ default: orchestration_mode(), channels: %{required(String.t()) => orchestration_mode()}, default_digest_key: String.t() | nil, digest_keys: %{required(String.t()) => String.t()}, source: :default | :notifier | :planner_override }
@type workflow_resolution() :: %{ workflow_key: String.t(), workflow_version: pos_integer(), steps: [workflow_step_resolution()], source: :notifier | :planner_override }
@type workflow_step_resolution() :: %{ step_key: String.t(), step_order: pos_integer(), channel: String.t(), config: map() }
Callbacks
Functions
@spec normalize_workflow_declaration(map()) :: {:ok, workflow_resolution()} | {:error, term()}
@spec resolve_rendering(module(), map(), map()) :: {:ok, Chimeway.Rendering.rendering_declaration()} | {:error, term()}
@spec serialize_orchestration(orchestration_resolution()) :: map()
@spec serialize_workflow(workflow_resolution()) :: map()