Core
Framework v2.x
2

constructor #

Constructor method of the Plugin abstract class. It must be called with a PluginManifest.

Arguments #

constructor (manifest: PluginManifest);

ArgumentTypeDescription
manifest
PluginManifest
PluginManifest instance

The manifest contains the following properties:

  • kuzzleVersion: a non-empty string describing a semver range, limiting the range of Kuzzle versions supported by this plugin. It is required: the constructor throws a plugin.manifest.missing_version error if the property is missing.

Usage #

import { Plugin } from 'kuzzle';

class EmailPlugin extends Plugin {
  constructor () {
    super({ kuzzleVersion: '>=2.8.0 <3' });
  }
}