View Source Ash.Resource.Actions.Implementation behaviour (ash v2.19.3)

An implementation of a generic action.

Summary

Types

@type context() :: %{
  optional(:actor) => term(),
  optional(:tenant) => term(),
  optional(:authorize?) => boolean(),
  optional(:api) => module(),
  optional(any()) => any()
}

Callbacks

@callback run(Ash.ActionInput.t(), opts :: Keyword.t(), context()) ::
  {:ok, term()} | {:ok, [Ash.Notifier.Notification.t()]} | {:error, term()}