Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TeamMembership

Hierarchy

Index

Properties

admin

admin: boolean

Is admin

organizationMembershipId

organizationMembershipId: string

Organization membership id

sys

sys: MetaSysProps & { organization: { sys: MetaLinkProps }; organizationMembership: { sys: MetaLinkProps }; team: { sys: MetaLinkProps } }

System metadata

Methods

delete

  • delete(): Promise<void>
  • Deletes this object on the server.

    example
    const contentful = require('contentful-management')
    
    const client = contentful.createClient({
      accessToken: '<content_management_api_key>'
    })
    
    client.getOrganization('organizationId')
    .then(org => org.getTeamMembership('teamId', 'teamMembershipId'))
    .then((teamMembership) => {
     teamMembership.delete();
    })
    .catch(console.error)

    Returns Promise<void>

    Promise for the deletion. It contains no data, but the Promise error case should be handled.

toPlainObject

update

  • Sends an update to the server with any changes made to the object's properties

    example
    const contentful = require('contentful-management')
    
    const client = contentful.createClient({
      accessToken: '<content_management_api_key>'
    })
    
    client.getOrganization('organizationId')
    .then(org => org.getTeamMembership('teamId', 'teamMembershipId'))
    .then((teamMembership) => {
     teamMembership.admin = true;
     teamMembership.update();
    })
    .catch(console.error)

    Returns Promise<TeamMembership>

    Object returned from the server with updated changes.