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

View Source

Response shaping and callback wait orchestration for webhook runs.

Summary

Functions

callback_success_status?(status)

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

cleanup_wait_setup(wait_setup)

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

prepare_wait_before_submit(mode, run_ctx, opts \\ [])

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

response_for_run(run_ctx, opts \\ [])

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

wait_for_run_completion(run_id, timeout_ms)

@spec wait_for_run_completion(binary(), non_neg_integer()) ::
  {:ok, map()} | {:error, term()}