Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AppInstallation

Hierarchy

Index

Properties

Optional parameters

parameters: FreeFormParameters

Free-form installation parameters (API limits stringified length to 16kB)

sys

sys: BasicMetaSysProps & { appDefinition: SysLink; environment: SysLink; space: SysLink }

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.getSpace('<space_id>')
    .then((space) => space.getEnvironment('<environment_id>'))
    .then((environment) => environment.getAppInstallation('<app_definition_id>'))
    .then((appInstallation) => appInstallation.delete())
    .then(() => console.log(`App installation deleted.`))
    .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.getSpace('<space_id>')
    .then((space) => space.getEnvironment('<environment_id>'))
    .then((environment) => environment.getAppInstallation('<app_definition_id>'))
    .then((appInstallation) => {
       appInstallation.parameters.someParameter = 'New Value'
       return appInstallation.update()
    })
    .then((appInstallation) => console.log(`App installation ${appInstallation.sys.id} was updated`))
    .catch(console.error)
    

    Returns Promise<AppInstallation>

    Object returned from the server with updated changes.