Teams class

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

Constructors

Teams.new(Client client)
Initializes a Teams service

Properties

client Client
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

create({required String teamId, required String name, List<String>? roles}) Future<Team>
Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
createMembership({required String teamId, required List<String> roles, String? email, String? userId, String? phone, String? url, String? name}) Future<Membership>
Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team.
delete({required String teamId}) Future
Delete a team using its ID. Only team members with the owner role can delete the team.
deleteMembership({required String teamId, required String membershipId}) Future
This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
get({required String teamId}) Future<Team>
Get a team by its ID. All team members have read access for this resource.
getMembership({required String teamId, required String membershipId}) Future<Membership>
Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
getPrefs({required String teamId}) Future<Preferences>
Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in user preferences.
list({List<String>? queries, String? search}) Future<TeamList>
Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
listMemberships({required String teamId, List<String>? queries, String? search}) Future<MembershipList>
Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateMembership({required String teamId, required String membershipId, required List<String> roles}) Future<Membership>
Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about roles and permissions.
updateMembershipStatus({required String teamId, required String membershipId, required String userId, required String secret}) Future<Membership>
Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
updateName({required String teamId, required String name}) Future<Team>
Update the team's name by its unique ID.
updatePrefs({required String teamId, required Map prefs}) Future<Preferences>
Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded.

Operators

operator ==(Object other) bool
The equality operator.
inherited