Renders templates and validates channel payload shapes.
Summary
Functions
Renders a binary or map template and validates it for the target channel.
Renders a step template with enrollment and hook data.
Renders a single Liquid text template.
Validates Liquid syntax and MJML compilation for an optional email template.
Types
@type render_error() :: %{kind: :permanent, reason: term()}
Functions
Renders a binary or map template and validates it for the target channel.
@spec render_step(map(), term(), map()) :: {:ok, map()} | {:error, render_error()}
Renders a step template with enrollment and hook data.
@spec render_text(binary(), map()) :: {:ok, binary()} | {:error, render_error()}
Renders a single Liquid text template.
@spec validate(binary() | map(), atom() | binary()) :: :ok | {:error, [{integer(), integer(), binary()}]}
Validates Liquid syntax and MJML compilation for an optional email template.