Files
Sauci/apps/mcp/src/utils/audit.ts
T
jjbrunton 006761d3b0 feat(backend): add standalone data plane
Replace the Supabase application data plane with the Node/PostgreSQL API, migrate mobile, admin, web, and MCP callers, add controlled cutover tooling, and define hardened Dokploy infrastructure.
2026-08-28 14:42:11 +01:00

17 lines
543 B
TypeScript

export interface AuditLogEntry {
action: 'INSERT' | 'UPDATE' | 'DELETE';
table_name: string;
record_id?: string;
old_values?: Record<string, unknown> | null;
new_values?: Record<string, unknown> | null;
admin_user_id?: string;
}
/**
* Standalone admin API mutations are authorized and audited atomically by the
* API. This compatibility hook deliberately does not create a duplicate row.
*/
export async function logAudit(_entry: AuditLogEntry): Promise<void> {
// The called admin API mutation owns the audit transaction.
}