type ActionHandler = (payload: Record, respondingUserId: number) => Promise; const actionRegistry = new Map(); function registerAction(actionType: string, handler: ActionHandler): void { actionRegistry.set(actionType, handler); } function getAction(actionType: string): ActionHandler | undefined { return actionRegistry.get(actionType); } // Dev/test actions registerAction('test_approve', async () => { console.log('[notifications] Test approve action executed'); }); registerAction('test_deny', async () => { console.log('[notifications] Test deny action executed'); }); export { registerAction, getAction };