Core
Framework v2.x
2

PluginContext #

The PluginContext class is passed to the plugins as an argument of the init method.

It contains various accessors, constructors and helpers that allow to interact with Kuzzle.

accessors #

This property is an instance of the PluginContextAccessors and contains various methods to interact with Kuzzle.

Type Description
PluginContextAccessors
PluginContextAccessors instance

constructors #

This property is an instance of the PluginContextConstructors and contains various constructors to interact with Kuzzle.

Type Description
PluginContextConstructors
PluginContextConstructors instance

errors #

Deprecated since 2.8.0

This property contains constructors that represent Kuzzle Errors Types.

The usage of this property is deprecated and Kuzzle Errors should be required from the kuzzle package instead.

This property is not available in Typescript.

Available errors:

Copied to clipboard!
BadRequestError
ExternalServiceError
ForbiddenError
GatewayTimeoutError
InternalError
KuzzleError
NotFoundError
PartialError
PluginImplementationError
PreconditionError
ServiceUnavailableError
SizeLimitError
TooManyRequestsError
UnauthorizedError

log #

This property is an instance of the InternalLogger and allows to log messages.

Type Description
InternalLogger
PluginContextConstructors instance

See also the Internal Logger guide.

secrets #

This property contains the application secrets that have been made available with the Secrets Vault.

Type Description
JSONObject
Decrypted application secrets