ExPlain.Users (ExPlain v0.3.0)

Copy Markdown View Source

Operations for fetching workspace users (agents) in Plain.

Summary

Functions

Fetches a workspace user by their email address. Returns {:ok, nil} if not found.

Fetches a workspace user by their Plain user ID. Returns {:ok, nil} if not found.

Functions

get_by_email(client, email)

@spec get_by_email(ExPlain.Client.t(), String.t()) ::
  {:ok, ExPlain.Users.User.t() | nil} | {:error, ExPlain.Error.t()}

Fetches a workspace user by their email address. Returns {:ok, nil} if not found.

get_by_id(client, user_id)

@spec get_by_id(ExPlain.Client.t(), String.t()) ::
  {:ok, ExPlain.Users.User.t() | nil} | {:error, ExPlain.Error.t()}

Fetches a workspace user by their Plain user ID. Returns {:ok, nil} if not found.