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

+22
View File
@@ -0,0 +1,22 @@
import type { DatabaseSync } from "node:sqlite";
import type { ProfileSnapshot } from "@shared/types";
import type { ReadAll, Transaction } from "./helpers";
import { buildCompanyCrudMethods } from "./company-crud";
import { buildCompanySettingsMethods } from "./company-settings";
export function buildCompanyMethods(
getDb: () => DatabaseSync,
readAll: ReadAll,
transaction: Transaction,
deps: {
getSetting: (key: string) => string | null;
setSetting: (key: string, value: string) => void;
listSnapshot: (options: { companyId?: string | null }) => ProfileSnapshot;
addComment: (input: { companyId: string; taskId: string; authorAgentId: string | null; authorName: string; body: string }) => void;
},
) {
return {
...buildCompanyCrudMethods(getDb, readAll, transaction, deps),
...buildCompanySettingsMethods(getDb, readAll, transaction, { listSnapshot: deps.listSnapshot }),
};
}