Skip to content

PluginContextGenerator ​

Methods ​

createV1Context() ​

createV1Context(pluginName: string, plugin: object): PluginContext

Parameters ​

• pluginName: string

• plugin

• plugin.capabilities: ("query:read" | "query:write" | "header:read" | "header:write" | "environment:read" | "environment:write")[]= undefined

• plugin.display_name: string= undefined

• plugin.manifest= undefined

• plugin.manifest.author?: string= undefined

Author of the plugin

• plugin.manifest.author_email?: string= undefined

Author email of the plugin

• plugin.manifest.capabilities?: ("query:read" | "query:write" | "header:read" | "header:write" | "environment:read" | "environment:write")[]= undefined

Specifies the capabilities (functionalities) available to the plugin. In the future, this would be used to request the necessary permissions from the user

• plugin.manifest.description: string= undefined

Description of the plugin

• plugin.manifest.display_name: string= undefined

Display name of the plugin

• plugin.manifest.manifest_version: 1 | 2= undefined

Version of manifest. Should be 1 or 2.

• plugin.manifest.name: string= undefined

Name of the plugin

• plugin.manifest.plugin_class?: string= undefined

This specifies the class name of the plugin, for discovery

• plugin.manifest.scripts: string[]= undefined

An array containing the list of scripts (relative to the plugin root directory) that need to be loaded for the plugin to function.

• plugin.manifest.styles?: string[]= undefined

An array containing the list of styles (relative to the plugin root directory) that need to be loaded for the plugin to function.

• plugin.manifest.type?: "header" | "sidebar" | "action_button"= undefined

This specifies the type of plugin. This determines how the plugin would interact with Altair. For now there is just the typical plugin type (registered plugin class). In the future, this would include other plugins like themes.

• plugin.manifest.version: string= undefined

Version of the plugin

• plugin.name: string= undefined

• plugin.plugin_class?: string= undefined

• plugin.type?: "header" | "sidebar" | "action_button"= undefined

Returns ​

PluginContext