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()
Deletes the membership from the organization it belongs to.
function destroy(): Promise<OrganizationMembership>;
destroy()
returns
Type | Description |
---|---|
Promise<OrganizationMembership> | A Promise which resolves to the OrganizationMembership for the deleted membership. |
update()
Updates the member's role.
function update(updateParams: UpdateOrganizationMembershipParams): Promise<OrganizationMembership>;
UpdateOrganizationMembershipParams
Name | Type | Description |
---|---|---|
role | string | The role of the new member. |
update()
returns
Type | Description |
---|---|
Promise<OrganizationMembership> | A Promise which resolves to the OrganizationMembership for the updated membership. |
Last updated on December 19, 2023