Events
Events
App lifecycle events
Events allow developers to perform setup or teardown tasks, such as registering or unregistering a webhook in a third-party system or validating a user’s connections.
Event files MUST:
- Live in
src/events
- Have a
.event.ts
(or.event.js
) suffix. - Contain an
export default async function
that:- Takes a
{ connection: Connection }
argument - Returns
void
- Takes a
The arguments passed to the handler function depend on the type of event and are documented below.
Available Events:
connection-added
– called when a connection is addedconnection-removed
– called when a connection is removed
Was this page helpful?