WorkOS.Radar (WorkOS SDK for Elixir v3.0.1)

Copy Markdown View Source

Operations for the Radar API.

Summary

Functions

add_list_entry(client, type, action, params \\ %{}, opts \\ [])

@spec add_list_entry(WorkOS.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, WorkOS.RadarListEntryAlreadyPresentResponse.t()}
  | {:error, WorkOS.Error.error()}

Add an entry to a Radar list

Add an entry to a Radar list.

Parameters

  • type — The type of the Radar list (e.g. ip_address, domain, email).
  • action — The list action indicating whether to add the entry to the allow or block list.
  • params — request body map
  • opts — per-request options (see WorkOS.Client.request/5)

create_attempt(client, params \\ %{}, opts \\ [])

@spec create_attempt(WorkOS.Client.t(), map(), keyword()) ::
  {:ok, WorkOS.RadarStandaloneResponse.t()} | {:error, WorkOS.Error.error()}

Create an attempt

Assess a request for risk using the Radar engine and receive a verdict.

Parameters

remove_list_entry(client, type, action, params \\ %{}, opts \\ [])

@spec remove_list_entry(WorkOS.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, WorkOS.Error.error()}

Remove an entry from a Radar list

Remove an entry from a Radar list.

Parameters

  • type — The type of the Radar list (e.g. ip_address, domain, email).
  • action — The list action indicating whether to remove the entry from the allow or block list.
  • params — query parameters
  • opts — per-request options (see WorkOS.Client.request/5)

update_attempt(client, id, params \\ %{}, opts \\ [])

@spec update_attempt(WorkOS.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, WorkOS.Error.error()}

Update a Radar attempt

You may optionally inform Radar that an authentication attempt or challenge was successful using this endpoint. Some Radar controls depend on tracking recent successful attempts, such as impossible travel.

Parameters

  • id — The unique identifier of the Radar attempt to update.
  • params — request body map
  • opts — per-request options (see WorkOS.Client.request/5)