Product Documentation
Events are a great way to build and develop extensions in FaxTrack. Events are always being added and are documented here for your use in extensions or development of FaxTrack. Events allow the developers to capture activities on FaxTrack to use in automation flows and extensions.
There are two types of event in FaxTrack
on event which is an event to listen for, allowing functions to trigger when an action is performed
emit events which are executed by us to perform an action within FaxTrack's backend code.
The below example listens for when a project is created and logs the details into the console. This can be used to trigger a webhook extension or anything alike.
faxtrack.on('projectCreated', function(userObject, projectObject) {
// Do as you wish in the event, you can fetch data and even do other actions like make an automated webhook post.
console.log(userObject);
// userObject is the data passed in the users session (in an object), this will contain some login service data like their ID, avatar, and possibly guilds.
console.log(projectObject);
// This is an SQL object which contains the users database information.
});By using faxtrack.on() any on events can be captured from the below table.
Name | Arguments | Description | Type |
|---|---|---|---|
| userObject, projectObject | Emits when a new project is created | on |
| userObject, projectObject | Emits when a project is edited | on |
| userObject, projectObject | Emits when a project is deleted | on |
| userId, issueObject | Emits when an issue is created | on |
| userObject, solveObject, issueObject | Emits when an issue is marked as solved | on |
| userObject, issueObject | Emits when an issue is deleted | on |
| userObject, comment, issueObject | Emits when an issue is commented on | on |
| userId, feedbackObject | Emits when a feedback topic is created | on |
| userObject, solveObject, feedbackObject | Emits when a feedback topic is marked as solved | on |
| userObject, feedbackObject | Emits when a feedback topic is deleted | on |
| userObject, comment, feedbackObject | Emits when a feedback topic is commented on | on |