Accrue.Entitlements.Repair (accrue v1.5.1)

Copy Markdown View Source

Bounded, host-authorized recovery actions for entitlement operations.

This context deliberately exposes named actions rather than a generic repair dispatcher. It never reconstructs accounts or invokes provider lifecycle or financial APIs. The host resolves the account and makes the authorization decision before calling this boundary; this module records the operator's bounded intent in the same transaction as any delegated local repair work.

Summary

Types

outcome()

@type outcome() :: %{
  :action => atom(),
  :disposition => atom(),
  optional(:audit_id) => integer(),
  optional(:current_revision) => non_neg_integer(),
  optional(:diagnostic) => map()
}

Functions

drain_reconciliation_backlog(account, target, opts \\ [])

@spec drain_reconciliation_backlog(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}

escalate_duplicate_charge(account, target, opts \\ [])

@spec escalate_duplicate_charge(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}

recover_history_cursor(account, target, opts \\ [])

@spec recover_history_cursor(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}

replace_revoked_device(account, target, opts \\ [])

@spec replace_revoked_device(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}

retry_missed_notification(account, target, opts \\ [])

@spec retry_missed_notification(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}

retry_provider_check(account, target, opts \\ [])

@spec retry_provider_check(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}

review_ownership_conflict(account, target, opts \\ [])

@spec review_ownership_conflict(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}

rotate_signing_keys(account, target, opts \\ [])

@spec rotate_signing_keys(Accrue.Entitlements.Account.t(), map(), keyword()) ::
  {:ok, outcome()} | {:error, atom()}