teams

package
v6.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInstallationOption added in v6.1.0

type CreateInstallationOption func(*CreateInstallationOptions)

type CreateInstallationOptions added in v6.1.0

type CreateInstallationOptions struct {
	AuthorizationDetails string
	// contains filtered or unexported fields
}

func (CreateInstallationOptions) New added in v6.1.0

type CreateMembershipOption

type CreateMembershipOption func(*CreateMembershipOptions)

type CreateMembershipOptions

type CreateMembershipOptions struct {
	Email  string
	UserId string
	Phone  string
	Url    string
	Name   string
	// contains filtered or unexported fields
}

func (CreateMembershipOptions) New

type CreateOption

type CreateOption func(*CreateOptions)

type CreateOptions

type CreateOptions struct {
	Roles []string
	// contains filtered or unexported fields
}

func (CreateOptions) New

func (options CreateOptions) New() *CreateOptions

type ListInstallationsOption added in v6.1.0

type ListInstallationsOption func(*ListInstallationsOptions)

type ListInstallationsOptions added in v6.1.0

type ListInstallationsOptions struct {
	Queries []string
	Total   bool
	// contains filtered or unexported fields
}

func (ListInstallationsOptions) New added in v6.1.0

type ListMembershipsOption

type ListMembershipsOption func(*ListMembershipsOptions)

type ListMembershipsOptions

type ListMembershipsOptions struct {
	Queries []string
	Search  string
	Total   bool
	// contains filtered or unexported fields
}

func (ListMembershipsOptions) New

type ListOption

type ListOption func(*ListOptions)

type ListOptions

type ListOptions struct {
	Queries []string
	Search  string
	Total   bool
	// contains filtered or unexported fields
}

func (ListOptions) New

func (options ListOptions) New() *ListOptions

type Teams

type Teams struct {
	// contains filtered or unexported fields
}

Teams service

func New

func New(clt client.Client) *Teams

func (*Teams) Create

func (srv *Teams) Create(TeamId string, Name string, optionalSetters ...CreateOption) (*models.Team, error)

Create 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.

func (*Teams) CreateInstallation added in v6.1.0

func (srv *Teams) CreateInstallation(TeamId string, AppId string, optionalSetters ...CreateInstallationOption) (*models.AppInstallation, error)

CreateInstallation install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.

func (*Teams) CreateMembership

func (srv *Teams) CreateMembership(TeamId string, Roles []string, optionalSetters ...CreateMembershipOption) (*models.Membership, error)

CreateMembership 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.

You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters.

Use the `url` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.

Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.

func (*Teams) Delete

func (srv *Teams) Delete(TeamId string) (*interface{}, error)

Delete delete a team using its ID. Only team members with the owner role can delete the team.

func (*Teams) DeleteInstallation added in v6.1.0

func (srv *Teams) DeleteInstallation(TeamId string, InstallationId string) (*interface{}, error)

DeleteInstallation uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.

func (*Teams) DeleteMembership

func (srv *Teams) DeleteMembership(TeamId string, MembershipId string) (*interface{}, error)

DeleteMembership 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.

func (*Teams) Get

func (srv *Teams) Get(TeamId string) (*models.Team, error)

Get get a team by its ID. All team members have read access for this resource.

func (*Teams) GetInstallation added in v6.1.0

func (srv *Teams) GetInstallation(TeamId string, InstallationId string) (*models.AppInstallation, error)

GetInstallation get an app installation on a team by its unique ID. Any team member can read installations.

func (*Teams) GetMembership

func (srv *Teams) GetMembership(TeamId string, MembershipId string) (*models.Membership, error)

GetMembership 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.

func (*Teams) GetPrefs

func (srv *Teams) GetPrefs(TeamId string) (*models.Preferences, error)

GetPrefs 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](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).

func (*Teams) List

func (srv *Teams) List(optionalSetters ...ListOption) (*models.TeamList, error)

List get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.

func (*Teams) ListInstallations added in v6.1.0

func (srv *Teams) ListInstallations(TeamId string, optionalSetters ...ListInstallationsOption) (*models.AppInstallationList, error)

ListInstallations list app installations on a team. Any team member can read installations.

func (*Teams) ListMemberships

func (srv *Teams) ListMemberships(TeamId string, optionalSetters ...ListMembershipsOption) (*models.MembershipList, error)

ListMemberships 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.

func (*Teams) UpdateInstallation added in v6.1.0

func (srv *Teams) UpdateInstallation(TeamId string, InstallationId string, optionalSetters ...UpdateInstallationOption) (*models.AppInstallation, error)

UpdateInstallation update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.

func (*Teams) UpdateMembership

func (srv *Teams) UpdateMembership(TeamId string, MembershipId string, Roles []string) (*models.Membership, error)

UpdateMembership 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](https://appwrite.io/docs/permissions).

func (*Teams) UpdateMembershipStatus

func (srv *Teams) UpdateMembershipStatus(TeamId string, MembershipId string, UserId string, Secret string) (*models.Membership, error)

UpdateMembershipStatus 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.

If the request is successful, a session for the user is automatically created.

func (*Teams) UpdateName

func (srv *Teams) UpdateName(TeamId string, Name string) (*models.Team, error)

UpdateName update the team's name by its unique ID.

func (*Teams) UpdatePrefs

func (srv *Teams) UpdatePrefs(TeamId string, Prefs interface{}) (*models.Preferences, error)

UpdatePrefs 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.

func (*Teams) WithCreateInstallationAuthorizationDetails added in v6.1.0

func (srv *Teams) WithCreateInstallationAuthorizationDetails(v string) CreateInstallationOption

func (*Teams) WithCreateMembershipEmail

func (srv *Teams) WithCreateMembershipEmail(v string) CreateMembershipOption

func (*Teams) WithCreateMembershipName

func (srv *Teams) WithCreateMembershipName(v string) CreateMembershipOption

func (*Teams) WithCreateMembershipPhone

func (srv *Teams) WithCreateMembershipPhone(v string) CreateMembershipOption

func (*Teams) WithCreateMembershipUrl

func (srv *Teams) WithCreateMembershipUrl(v string) CreateMembershipOption

func (*Teams) WithCreateMembershipUserId

func (srv *Teams) WithCreateMembershipUserId(v string) CreateMembershipOption

func (*Teams) WithCreateRoles

func (srv *Teams) WithCreateRoles(v []string) CreateOption

func (*Teams) WithListInstallationsQueries added in v6.1.0

func (srv *Teams) WithListInstallationsQueries(v []string) ListInstallationsOption

func (*Teams) WithListInstallationsTotal added in v6.1.0

func (srv *Teams) WithListInstallationsTotal(v bool) ListInstallationsOption

func (*Teams) WithListMembershipsQueries

func (srv *Teams) WithListMembershipsQueries(v []string) ListMembershipsOption

func (*Teams) WithListMembershipsSearch

func (srv *Teams) WithListMembershipsSearch(v string) ListMembershipsOption

func (*Teams) WithListMembershipsTotal

func (srv *Teams) WithListMembershipsTotal(v bool) ListMembershipsOption

func (*Teams) WithListQueries

func (srv *Teams) WithListQueries(v []string) ListOption

func (*Teams) WithListSearch

func (srv *Teams) WithListSearch(v string) ListOption

func (*Teams) WithListTotal

func (srv *Teams) WithListTotal(v bool) ListOption

func (*Teams) WithUpdateInstallationAuthorizationDetails added in v6.1.0

func (srv *Teams) WithUpdateInstallationAuthorizationDetails(v string) UpdateInstallationOption

type UpdateInstallationOption added in v6.1.0

type UpdateInstallationOption func(*UpdateInstallationOptions)

type UpdateInstallationOptions added in v6.1.0

type UpdateInstallationOptions struct {
	AuthorizationDetails string
	// contains filtered or unexported fields
}

func (UpdateInstallationOptions) New added in v6.1.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL