OrganizationMembership
The OrganizationMembership
object is the model around an organization membership entity and describes the relationship between users and organizations.
Attributes
Name Type Description id
string
A unique identifier for this organization membership. publicMetadata
object
Custom metadata that are visible to the frontend. role
'admin' | 'basic_member' | 'guest_member'
The role of the current user in the organization. publicUserData
PublicUserData
Public information about the user that this membership belongs to. organization
Organization
The organization object the membership belongs to. createdAt
Date
Date of the time the membership was created. updatedAt
Date
Date of the last time the membership was updated.
Methods
destroy()
function destroy () : Promise < OrganizationMembership >;
Deletes the membership from the organization it belongs to.
Returns
Type Description Promise<OrganizationMembership >
This method returns a Promise
which resolves to the OrganizationMembership
for the deleted membership.
update()
function update ( updateParams : UpdateOrganizationMembershipParams ) : Promise < OrganizationMembership >;
UpdateOrganizationMembershipParams
Name Type Description role
'admin' | 'basic_member' | 'guest_member'
The role of the new member.
Returns