This commit is contained in:
ZacharyZhang-NY committed 2026-04-04 12:03:50 -04:00
1 parent 66158e222e
commit 67c757f481
314 files changed
+37945 -22962

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import type { DatabaseSync } from "node:sqlite";
import type { ReadAll, Transaction } from "./helpers";
import { buildTaskCrudMethods } from "./tasks-crud";
import { buildTaskStatusMethods } from "./tasks-status";
export function buildTaskMethods(
getDb: () => DatabaseSync,
readAll: ReadAll,
transaction: Transaction,
deps: {
addComment: (input: { companyId: string; taskId: string; authorAgentId: string | null; authorName: string; body: string }) => void;
addActivity: (input: { companyId: string; actor: string; action: string; entityType: string; entityId: string; detail: string }) => void;
},
) {
return {
...buildTaskCrudMethods(getDb, readAll, transaction, deps),
...buildTaskStatusMethods(getDb, readAll, transaction, deps),
};
}