Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Team

Hierarchy

Index

Properties

description

description: string

Description of the team

name

name: string

Name of the team

sys

sys: MetaSysProps & { memberCount: number; organization: { 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('organization_id')
    .then(org => org.getOrganizationMembership('organizationMembership_id'))
    .then((team) => {
     team.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

  • update(): Promise<Team>
  • 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('organization_id')
    .then(org => org.getTeam('team_id'))
    .then((team) => {
     team.description = 'new description';
     team.update();
    })
    .catch(console.error)

    Returns Promise<Team>

    Object returned from the server with updated changes.