Lockspire.Admin.Consents (lockspire v1.0.0)

Copy Markdown

Shared query and command boundary for operator and host-owned consent workflows.

Summary

Types

consent_view()

@type consent_view() :: %{
  grant: Lockspire.Domain.ConsentGrant.t(),
  client: Lockspire.Domain.Client.t() | nil
}

Functions

get_consent(grant_id)

@spec get_consent(integer()) :: {:ok, consent_view() | nil} | {:error, term()}

list_consents(opts \\ [])

@spec list_consents(keyword()) :: {:ok, [consent_view()]} | {:error, term()}

list_consents_for_account(account_id)

@spec list_consents_for_account(String.t()) ::
  {:ok, [consent_view()]} | {:error, term()}

revoke_consent(grant_id, attrs \\ %{})

@spec revoke_consent(integer(), map()) :: {:ok, consent_view()} | {:error, term()}