feat(core-audit): createAuditErasureHook Payload afterDelete factory
Adds createAuditErasureHook in core-audit/src/hooks/. The factory returns a CollectionAfterDeleteHook that calls auditLog.eraseSubject() when a document is deleted. Defaults to "pseudonymize" mode; coerces numeric ids to string; skips undefined/null/object ids. Barrel at hooks/index.ts. 6 unit tests cover all guard branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
packages/core-audit/src/hooks/index.ts
Normal file
4
packages/core-audit/src/hooks/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
createAuditErasureHook,
|
||||
type AuditErasureHookOpts,
|
||||
} from "./audit-erasure-hook";
|
||||
Reference in New Issue
Block a user