Initial commit — eLegal Software monorepo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Leon Serfaty
2026-04-26 02:42:42 -04:00
co-authored by Claude Sonnet 4.6
commit 0700d54225
160 changed files with 22771 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import { getDb, auditLog } from '@lawdesk/db';
export interface AuditEntry {
userId?: string | null;
firmId?: string | null;
action: string;
meta?: unknown;
ip?: string | null;
}
export async function logAudit(entry: AuditEntry): Promise<void> {
await getDb().insert(auditLog).values({
userId: entry.userId ?? null,
firmId: entry.firmId ?? null,
action: entry.action,
meta: entry.meta == null ? null : JSON.stringify(entry.meta),
ip: entry.ip ?? null,
});
}