wip: webhooks and fixes

This commit is contained in:
Nikolai Giman
2026-05-12 22:02:13 +02:00
parent 6cf26fdd61
commit 1706a3124b
11 changed files with 129 additions and 48 deletions
+6 -5
View File
@@ -1,5 +1,6 @@
import { EventEmitter } from 'node:events';
import type { TasksSchemaTypeForSelect, TimeEntriesSchemaTypeForSelect } from 'taskview-db-schemas';
import type { TasksSchemaTypeForSelect } from 'taskview-db-schemas';
import type { TimeEntryWithUser } from '../tv-modules/time-tracking/types';
import { $logger } from '../modules/logget';
export interface AppEvents {
@@ -10,10 +11,10 @@ export interface AppEvents {
'collaboration.userAdded': { goalId: number; email: string; initiatorId: number };
'collaboration.userRemoved': { goalId: number; collaborationUserId: number; initiatorId: number };
'collaboration.rolesChanged': { goalId: number; collaborationUserId: number; initiatorId: number };
'time-entry.started': { entry: TimeEntriesSchemaTypeForSelect; taskId: number; userId: number; goalId: number };
'time-entry.stopped': { entry: TimeEntriesSchemaTypeForSelect; taskId: number; userId: number; goalId: number; durationSeconds: number };
'time-entry.created': { entry: TimeEntriesSchemaTypeForSelect; initiatorId: number };
'time-entry.updated': { entry: TimeEntriesSchemaTypeForSelect; changes: Record<string, unknown>; initiatorId: number };
'time-entry.started': { entry: TimeEntryWithUser; taskId: number; userId: number; goalId: number };
'time-entry.stopped': { entry: TimeEntryWithUser; taskId: number; userId: number; goalId: number; durationSeconds: number };
'time-entry.created': { entry: TimeEntryWithUser; initiatorId: number };
'time-entry.updated': { entry: TimeEntryWithUser; changes: Record<string, unknown>; initiatorId: number };
'time-entry.deleted': { entryId: number; taskId: number; goalId: number; userId: number; initiatorId: number };
}