Optionalopts: AuditLogOptionsApproximate in-memory footprint, in JSON bytes.
Reset everything.
Counter snapshot by kind — useful for dashboards.
Optionalfilter: AuditFilterExport the entire log as a pretty-printed JSON string.
Hydrate the log from a prior snapshot (typically from IDB). Used when the viewer's host service restores state on app boot. The eviction policy still runs after hydration so an over-cap import gets trimmed.
List events matching the filter, oldest first.
Optionalfilter: AuditFilterCurrent event count.
Subscribe to new audit events; returns an unsubscribe.
Append an event.
seqandtsare assigned by the log; any caller-supplied values are overwritten. The input type uses distributive Omit so each event-kind's unique fields stay visible to TypeScript (no need forascasts at call sites).