Creation

The code of your plugin should implement specific routes, depending on the plugin type. In order to help you, we provide you with starter projects and our Plugin SDK.

Starter projects

Each plugin type has a different starter project.

You can ask your Account manager for the starter project of the plugin you wish to create if you don't already have access.

Plugins have the following general structure:

  • src Folder containing the plugin code

    • index.ts Root declaration of your plugin

    • MyPluginImpl.ts Extends the correct Plugin SDK class

    • tests Tests declaration

    • ... Other folders and files as you wish

  • build.sh Build script

  • package.json

  • run.sh Run script

Plugin SDK

Our Plugin SDK handles common operations like building the required routes. It is already being used in starter projects, and you only have to override specific functions and ensure it returns the right response.

Testing your project

Testing your project relies heavily on unit tests. You should aim at maximizing the code coverage of your tests, and mocking possible inbound queries.

To build the project and run unit tests, simply launch the build.sh script in the root folder of your project.

Getting user properties

It is frequent to get properties about a user, like the profile of someone at the origin of an activity processed by an activity analyzer. It is recommended to use the new GraphQL API for this purpose, as all the data linked to a user is retrievable through a single query.

Last updated