OrganizationMembership
The OrganizationMembership
object is the model around an organization membership entity and describes the relationship between users and organizations.
Properties
Name | Type | Description |
---|---|---|
id | string | A unique identifier for this organization membership. |
publicMetadata | object | Custom metadata that are visible to the frontend. |
role | string | 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>;
Updates the member's role.
UpdateOrganizationMembershipParams
Name | Type | Description |
---|---|---|
role | string | The role of the new member. |
Returns
Type | Description |
---|---|
Promise<OrganizationMembership> | This method returns a Promise which resolves to the OrganizationMembership for the updated membership. |