Hierarchy

Properties

extension: {
    fieldTypes: FieldType[];
    name: string;
    parameters?: {
        installation?: ParameterDefinition<InstallationParameterType>[];
        instance?: ParameterDefinition<ParameterType>[];
    };
    sidebar?: boolean;
    src?: string;
    srcdoc?: string;
}

Type declaration

parameters?: DefinedParameters

Values for installation parameters

sys: ExtensionSysProps

Methods

  • Deletes this object on the server.

    Returns

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

    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.getUiExtension('<ui_extension_id>'))
    .then((extension) => extension.delete())
    .then(() => console.log(`UI Extension deleted.`))
    .catch(console.error)

    Returns Promise<void>

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

    Returns

    Object returned from the server with updated changes.

    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.getUiExtension('<ui_extension_id>'))
    .then((extension) => {
    extension.extension.name = 'New UI Extension name'
    return extension.update()
    })
    .then((extension) => console.log(`UI Extension ${extension.sys.id} updated.`))
    .catch(console.error)

    Returns Promise<UIExtension>