Skip to main content

src/index.ts

This is where the client should live.
We’re adopting the naming convention of naming the class after the service, without a suffix or prefix. We prefer the exported name be Slack instead of something like SlackIntegration or SlackConnector

Example: GitHub

Comments are for instructional purposes only and should be removed in your implementation.
The TriggerIntegration interface requires three properties and one method to be implemented:
string
required
The id that uniquely identifies the Integration. This should always be passed through the constructor options.
object
required
LOCAL | HOSTED
required
“LOCAL” should be returned for API keys. “HOSTED” should be returned for OAuth.
function
required
This method is called before the run() method is called on a Job. This is important because the authentication data is dynamic, and can change (like OAuth credentials refreshing). This method should return a new instance of the Integration, with the new authentication data, io, and connectionKey set so they can be used by runTask and any Triggers.