Docs

You are viewing an archived version of the docs.Go to latest version

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.

function destroy(): Promise<OrganizationMembership>;

Deletes the membership from the organization it belongs to.

Returns

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

    The role of the new member.

Returns

TypeDescription
Promise<OrganizationMembership>This method returns a Promise which resolves to the OrganizationMembership for the updated membership.

Feedback

What did you think of this content?

Last updated on