TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.
TypeScript graphviewkanban-boardnodejsproductivityproject-managementself-hostedtasktask-managementtask-managertodoapp
feat: webhooks for time tracking
Nikolai Giman6cf26fdd61c4
diff --git a/api/src/tv-modules/webhooks/WebhooksDispatcher.ts b/api/src/tv-modules/webhooks/WebhooksDispatcher.tsindex 3dfa080..d816ff7 100644--- a/api/src/tv-modules/webhooks/WebhooksDispatcher.ts+++ b/api/src/tv-modules/webhooks/WebhooksDispatcher.ts@@ -23,6 +23,11 @@ export class WebhooksDispatcher implements Dispatcher {eventBus.on('task.updated', (data) => this.dispatch('task.updated', data.task.goalId, data));eventBus.on('task.deleted', (data) => this.dispatch('task.deleted', data.goalId, data));eventBus.on('task.assigneesChanged', (data) => this.dispatchAssigneesChanged(data));+ eventBus.on('time-entry.started', (data) => this.dispatch('time-entry.started', data.goalId, data));+ eventBus.on('time-entry.stopped', (data) => this.dispatch('time-entry.stopped', data.goalId, data));+ eventBus.on('time-entry.created', (data) => this.dispatch('time-entry.created', data.entry.goalId, data));+ eventBus.on('time-entry.updated', (data) => this.dispatch('time-entry.updated', data.entry.goalId, data));+ eventBus.on('time-entry.deleted', (data) => this.dispatch('time-entry.deleted', data.goalId, data));}async registerWorkers(): Promise<void> {diff --git a/api/src/tv-modules/webhooks/types.ts b/api/src/tv-modules/webhooks/types.tsindex 1e6856d..74b674d 100644--- a/api/src/tv-modules/webhooks/types.ts+++ b/api/src/tv-modules/webhooks/types.ts@@ -52,6 +52,11 @@ export const WEBHOOK_EVENTS = ['task.updated','task.deleted','task.assigneesChanged',+ 'time-entry.started',+ 'time-entry.stopped',+ 'time-entry.created',+ 'time-entry.updated',+ 'time-entry.deleted',] as const;export type WebhookEvent = typeof WEBHOOK_EVENTS[number];diff --git a/taskview-packages/taskview-api/src/api/webhooks.types.ts b/taskview-packages/taskview-api/src/api/webhooks.types.tsindex e433287..070bb89 100644--- a/taskview-packages/taskview-api/src/api/webhooks.types.ts+++ b/taskview-packages/taskview-api/src/api/webhooks.types.ts@@ -47,6 +47,11 @@ export const WEBHOOK_EVENTS = ['task.updated','task.deleted','task.assigneesChanged',+ 'time-entry.started',+ 'time-entry.stopped',+ 'time-entry.created',+ 'time-entry.updated',+ 'time-entry.deleted',] as const;export type WebhookEvent = typeof WEBHOOK_EVENTS[number];