AppwriteElixir.Services.Teams (appwrite_elixir v0.1.4-rc)
The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources, such as database documents or storage files. Each user who creates a team becomes the team owner and can delegate the ownership role by inviting a new team member. Only team owners can invite new users to their team.
Link to this section Summary
Functions
Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project.
Creates team membership by team ID,email,user roles,redirect url and name
Delete a team by its unique ID. Only team owners have write access for this resource.
Delete Team Membership by Team unique ID and Membership ID.
Get a list of all of the project's teams. You can use the query params to filter your results.
Get a team by its unique ID. All team members have read access for this resource.
Get a team members by the team unique ID. All team members have read access for this list of resources. You can use the query params to filter your results.
Update a team by its unique ID. Only team owners have write access for this resource.
Update membership roles by team ID,membership ID,user roles
Update Team Membership Status by Team unique ID,Membership ID,User unique ID and Secret key.
Link to this section Types
membership_object()
Specs
membership_object_list()
Specs
membership_object_list() :: [sum: integer(), memberships: [membership_object()]]
team_object()
Specs
$id: Team ID.
name: Team name.
dateCreated: Team creation date in Unix timestamp.
sum: Total sum of team members.
team_object_list()
Specs
team_object_list() :: [sum: integer(), teams: [team_object()]]
Link to this section Functions
create_team(name, roles \\ [])
Specs
create_team(String.t(), []) :: team_object()
Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project.
create_team_membership(teamId, email, roles, url, name \\ "")
Specs
create_team_membership(String.t(), String.t(), [...], String.t(), String.t()) :: membership_object()
Creates team membership by team ID,email,user roles,redirect url and name
delete_team(teamId)
Specs
delete_team(String.t()) :: nil
Delete a team by its unique ID. Only team owners have write access for this resource.
delete_team_membership(teamId, membershipId)
Specs
Delete Team Membership by Team unique ID and Membership ID.
get_all_teams(search \\ "", limit \\ 25, offset \\ 0, orderType \\ "ASC")
Specs
get_all_teams(String.t(), integer(), integer(), String.t()) :: team_object_list()
Get a list of all of the project's teams. You can use the query params to filter your results.
get_team(teamId)
Specs
get_team(String.t()) :: team_object()
Get a team by its unique ID. All team members have read access for this resource.
get_team_members(teamId, search \\ "", limit \\ 25, offset \\ 0, orderType \\ "ASC")
Specs
get_team_members(String.t(), String.t(), integer(), integer(), String.t()) :: membership_object_list()
Get a team members by the team unique ID. All team members have read access for this list of resources. You can use the query params to filter your results.
update_team(teamId, name)
Specs
update_team(String.t(), String.t()) :: team_object()
Update a team by its unique ID. Only team owners have write access for this resource.
update_team_membership_roles(teamId, membershipId, roles)
Specs
update_team_membership_roles(String.t(), String.t(), [...]) :: membership_object()
Update membership roles by team ID,membership ID,user roles
update_team_membership_status(teamId, membershipId, userId, secretKey)
Specs
update_team_membership_status(String.t(), String.t(), String.t(), String.t()) :: membership_object()
Update Team Membership Status by Team unique ID,Membership ID,User unique ID and Secret key.