Infrastructure low complexity Shared Component backend
0
Dependencies
1
Dependents
3
Entities
0
Integrations

Description

Infrastructure utility that writes structured audit log entries to the audit_logs table. Used by the Auto-Approval Rule Engine to record every auto-approval decision with source 'auto', the matched rule ID, and the full threshold comparison result, enabling compliance auditing and differentiation from manual approvals.

Feature: Auto-Approval Rules

audit-log-writer

Responsibilities

  • Write structured audit entries to audit_logs with consistent schema
  • Attach source field ('auto' vs 'manual') to expense approval events
  • Include actor context (system) and organization scoping on every entry

Interfaces

log(entry: AuditLogEntry): Promise<void>
logAutoApproval(expenseId: string, orgId: string, ruleId: string, decision: string): Promise<void>

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component