LemonGateway.Transports.Webhook.Response (lemon_gateway v0.1.0)

View Source

Response shaping, completion waiting, and callback delivery helpers for the webhook transport.

Summary

Functions

callback_success_status?(status)

@spec callback_success_status?(term()) :: boolean()

cleanup_wait_setup(arg1)

@spec cleanup_wait_setup(map()) :: :ok

prepare_wait_before_submit(arg1, run_ctx, opts)

@spec prepare_wait_before_submit(atom(), map(), keyword()) ::
  {:ok, map(), map() | nil} | {:error, term()}

response_for_run(run_ctx, opts)

@spec response_for_run(
  map(),
  keyword()
) :: {:ok, integer(), map()} | {:error, :run_timeout | term()}

wait_for_run_completion(run_id, timeout_ms, opts \\ [])

@spec wait_for_run_completion(binary(), integer(), keyword()) ::
  {:ok, map()} | {:error, :timeout | :invalid_run_id | term()}