Per-recipient policy settings for quiet hours and delivery caps.
Summary
Functions
Evaluates quiet-hours and delivery-cap suppression for a delivery.
Fetches the policy settings row for a recipient, or nil.
Upserts policy settings for one recipient.
Functions
@spec evaluate( Chimeway.Delivery.t(), keyword() ) :: {:ok, :proceed} | {:suppress, atom()} | {:defer, map()}
Evaluates quiet-hours and delivery-cap suppression for a delivery.
@spec get_settings(String.t()) :: Chimeway.Policy.Settings.Setting.t() | nil
Fetches the policy settings row for a recipient, or nil.
@spec upsert_settings(map()) :: {:ok, Chimeway.Policy.Settings.Setting.t()} | {:error, Ecto.Changeset.t()}
Upserts policy settings for one recipient.