Docs

OrganizationMembership

The OrganizationMembership object is the model around an organization membership entity and describes the relationship between users and organizations.

Properties

  • Name
    id
    Type
    string
    Description

    A unique identifier for this organization membership.

  • Name
    publicMetadata
    Type
    object
    Description

    Custom metadata that are visible to the frontend.

  • Name
    role
    Type
    string
    Description

    The role of the current user in the organization.

  • Name
    publicUserData
    Type
    PublicUserData
    Description

    Public information about the user that this membership belongs to.

  • Name
    organization
    Type
    Organization
    Description

    The Organization object the membership belongs to.

  • Name
    createdAt
    Type
    Date
    Description

    Date of the time the membership was created.

  • Name
    updatedAt
    Type
    Date
    Description

    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

TypeDescription
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
    role
    Type
    string
    Description

    The role of the new member.

update() returns

TypeDescription
Promise<OrganizationMembership>A Promise which resolves to the OrganizationMembership for the updated membership.

Feedback

What did you think of this content?