Chatto.Api.V1.RoleService (chatto v0.1.0)

Copy Markdown View Source

Provides authenticated reads for public role metadata.

Summary

Functions

Gets public role records for multiple role names referenced by member rows, mentions, or integration clients.

Gets one public role by stable name. Returns NOT_FOUND when the role is unknown.

Lists the current role catalog as a finite snapshot. Requires an authenticated user.

Functions

batch_get_roles(client, request)

@spec batch_get_roles(Req.Request.t(), Chatto.Api.V1.BatchGetRolesRequest.t()) ::
  {:ok, Chatto.Api.V1.BatchGetRolesResponse.t()}
  | {:error, Chatto.Connect.Error.t()}

Gets public role records for multiple role names referenced by member rows, mentions, or integration clients.

get_role(client, request)

@spec get_role(Req.Request.t(), Chatto.Api.V1.GetRoleRequest.t()) ::
  {:ok, Chatto.Api.V1.GetRoleResponse.t()} | {:error, Chatto.Connect.Error.t()}

Gets one public role by stable name. Returns NOT_FOUND when the role is unknown.

list_roles(client, request)

@spec list_roles(Req.Request.t(), Chatto.Api.V1.ListRolesRequest.t()) ::
  {:ok, Chatto.Api.V1.ListRolesResponse.t()}
  | {:error, Chatto.Connect.Error.t()}

Lists the current role catalog as a finite snapshot. Requires an authenticated user.