ExtensionConfig

Extend MindDrop's features.

PropertyTypeDescription
id*stringThe extension ID, must be unique accross the app.
name*stringThe extension's name as displayed to users.
description*stringA short description of the extension which will be displayed to users.
scopes*('app' | 'topic')[]
The scopes within which the extension operates.
  • 'app': the extension provides app wide functionality

  • 'topic': the extension provides topic specific functionality

onRun*functionCalled when the app initializes the extension on startup. See below for details.
onInstallfunctionCalled when the extension is installed. See below for details.
onEnablefunctionCalled when the extension is enabled globally. See below for details.
onEnableTopicsfunctionCalled when the extension is enabled for given topics. See below for details.
onUpdatefunctionCalled when the extension has been updated. See below for details.
onDisablefunctionCalled when the extension is disabled globally. See below for details.
onDisableTopicsfunctionCalled when the extension is disabled for given topics. See below for details.
onUninstanllfunctionCalled when the extension is uninstalled. See below for details.

MindDrop extensions are defined using a set of lifecycle methods. The app calls these methods at given stages of the extension's life or in response to certain events.

The main extension method called when the app initializes the extension on startup. Use to set up event listeners, register drop types, register views, etc...

onRun(core: Core) => void
ArgumentTypeDescription
core*CoreA MindDrop core instance.

Called once when the extension is installed. Directly followed by a call to onEnable.

onInstall(core: Core) => void | Promise<void>
ArgumentTypeDescription
core*CoreA MindDrop core instance.

Called once when the extension is enabled globally. Called directly after onInstall, but can also be called independently at a later stage if the extension was temporarily disabled.

onEnable(core: Core) => void | Promise<void>
ArgumentTypeDescription
core*CoreA MindDrop core instance.

Called when the extension is enabled in given topics.

onEnableTopics(core: Core, topics: Topic[]) => void | Promise<void>
ArgumentTypeDescription
core*CoreA MindDrop core instance.
topics*Topic[]The topics for which the extension was enabled.

Called once when the extension has been updated to a new version. Directly followed by a call to onEnable.

onUpdate(core: Core) => void | Promise<void>
ArgumentTypeDescription
core*CoreA MindDrop core instance.

Called once when the extension is deenabled globally. Called directly before onUninstall, but can also be called independently if the user disables the extension without uninstalling it.

onDisable(core: Core) => void | Promise<void>
ArgumentTypeDescription
core*CoreA MindDrop core instance.

Called when the extension is disabled in given topics.

onDisableTopics(core: Core) => void | Promise<void>
ArgumentTypeDescription
core*CoreA MindDrop core instance.
topics*Topic[]The topics for which the extension was disabled.

Called once when the extension is uninstalled. Use to clean up any data stored by your extension. Always directly preceeded by a call to onDisable.

onUninstall(core: Core) => void | Promise<void>
ArgumentTypeDescription
core*CoreA MindDrop core instance.