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
import type { AutomationRuleForClient, AutomationRuleRow, AutomationRuleShape } from './types';
export class AutomationRuleMapper {
static toShape(row: AutomationRuleRow): AutomationRuleShape {
return {
id: row.id,
trigger: { module: row.triggerModule, event: row.triggerEvent, params: row.triggerParams as Record<string, number> },
action: { module: row.actionModule, action: row.actionName, params: row.actionParams as Record<string, number> },
};
}
static toClient(row: AutomationRuleRow): AutomationRuleForClient {
const shape = AutomationRuleMapper.toShape(row);
return {
id: row.id,
goalId: row.goalId,
creatorId: row.creatorId,
name: row.name,
enabled: row.enabled,
trigger: shape.trigger,
action: shape.action,
createdAt: row.createdAt.toISOString(),
editedAt: row.editedAt.toISOString(),
};
}
}