StaticenableEnable audit logging on a model. Call once per model at app startup.
The Prorm instance
The model class to audit
Optional configuration
A ComplianceAuditTrail instance for querying history
Query the audit history for a table.
The table/model name to query
OptionalrecordId: string | number
Optional: filter to a specific record ID
Optionaloptions: { limit?: number; offset?: number; startDate?: Date; endDate?: Date }
Pagination and date range filters
Get the audit history for the model this trail is attached to.
OptionalrecordId: string | numberOptionaloptions: { limit?: number; offset?: number; startDate?: Date; endDate?: Date }Expose the underlying AuditLogger for advanced use.
Compliance Module
A set of 12 reusable classes for addressing data storage requirements from 218+ security and compliance frameworks.
Each class wraps existing ORM infrastructure (hooks, decorators, scopes) into simple one-liner APIs.
Quick reference:
// 1. Audit trail for all CRUD operations import { ComplianceAuditTrail } from './compliance/audit-trail'; ComplianceAuditTrail.enable(prorm, UserModel, { getUserId: () => user.id });