Public extension contract for request-intent persistence and one-time consumption.
Summary
Callbacks
@callback consume_intent( relay_state :: binary(), request_id :: binary(), opts :: keyword() ) :: :ok | {:error, Relyra.Error.t()}
@callback fetch_intent(relay_state :: binary(), opts :: keyword()) :: {:ok, map()} | {:error, Relyra.Error.t()}
@callback put_intent(relay_state :: binary(), intent :: map(), opts :: keyword()) :: :ok | {:error, Relyra.Error.t()}
Functions
@spec consume_intent(binary(), binary(), keyword()) :: :ok | {:error, Relyra.Error.t()}
@spec fetch_intent( binary(), keyword() ) :: {:ok, map()} | {:error, Relyra.Error.t()}
@spec put_intent(binary(), map(), keyword()) :: :ok | {:error, Relyra.Error.t()}