View Source Plausible.Billing.SiteLocker (Plausible v0.0.1)
Summary
Types
@type lock_reason() ::
:grace_period_ended_now
| :grace_period_ended_already
| :no_trial
| :no_active_subscription
@type update_opt() :: {:send_email?, boolean()}
Functions
@spec send_grace_period_end_email(Plausible.Auth.User.t()) :: Plausible.Mailer.result()
@spec set_lock_status_for(Plausible.Auth.User.t(), boolean()) :: {:ok, non_neg_integer()}
@spec update_sites_for(Plausible.Auth.User.t(), [update_opt()]) :: {:locked, lock_reason()} | :unlocked