Lettermint.Team (Lettermint v2.2.0)

Copy Markdown View Source

The team of the token. Needs :team_token. Members are in Lettermint.Team.Members, pending invitations in Lettermint.Team.Invites.

Every function takes the options timeout: (milliseconds) last.

Summary

Functions

Creates a custom role. Needs a plan with custom roles. permissions must include the permissions they depend on, and role names are unique.

Deletes a custom role. Built-in roles cannot be deleted. query: %{replacement_role_id: ...}, the role that receives the existing assignments; it is required only while the role is still assigned to members, invites or SCIM groups.

Copies a role under a new name. Without a description, the copy keeps the description of the source role. The Owner role cannot be duplicated.

The team. query: %{include: ["features"]} and so on.

The roles that can be assigned to members.

Replaces the name, description and permissions of a custom role. Built-in roles cannot be changed.

Usage of the current and previous billing periods.

Types

result(value)

@type result(value) :: {:ok, value} | {:error, Lettermint.Error.t()}

Functions

create_role(client, body, options \\ [])

Creates a custom role. Needs a plan with custom roles. permissions must include the permissions they depend on, and role names are unique.

delete_role(client, role_id, query \\ %{}, options \\ [])

Deletes a custom role. Built-in roles cannot be deleted. query: %{replacement_role_id: ...}, the role that receives the existing assignments; it is required only while the role is still assigned to members, invites or SCIM groups.

duplicate_role(client, role_id, body, options \\ [])

Copies a role under a new name. Without a description, the copy keeps the description of the source role. The Owner role cannot be duplicated.

retrieve(client, query \\ %{}, options \\ [])

The team. query: %{include: ["features"]} and so on.

retrieve_role(client, role_id, options \\ [])

Retrieves a role.

roles(client, options \\ [])

The roles that can be assigned to members.

update(client, body, options \\ [])

Updates the team.

update_role(client, role_id, body, options \\ [])

Replaces the name, description and permissions of a custom role. Built-in roles cannot be changed.

usage(client, options \\ [])

Usage of the current and previous billing periods.