ReadonlyactionThe audited action (e.g. 'user.login').
Optional ReadonlyafterResource state after the operation, when captured.
Optional ReadonlybeforeResource state before the operation, when captured.
ReadonlyidInternally assigned unique identifier (UUID v4).
Optional ReadonlymetadataFree-form structured context attached by the caller.
ReadonlyresourceThe audited resource type (e.g. 'session').
Optional ReadonlyresourceThe affected resource instance identifier, when known.
ReadonlyresultWhether the audited operation succeeded or failed.
ReadonlytimestampWall-clock epoch milliseconds, assigned by the storage at append.
Optional ReadonlyuserThe acting principal's identifier, when authenticated.
A stored audit record extends
AuditEntrywith an internally assignedid(UUID v4) andtimestamp(wall-clock epoch ms).To work around
exactOptionalPropertyTypeswith inherited optional fields fromAuditEntry, we redeclareresourceId/userId/before/after/metadatawith| undefinedso assigning{ resourceId: undefined }compiles cleanly.