BeechCMS / @beechcms/core / IDeletionLedger
Interface: IDeletionLedger
Append-only erasure log. append must be durable before the caller reports success: a purge whose event was lost is a purge that a restore can silently undo.
Methods
append()
append(
event):Promise<void>
Records one erasure. Throws if the write did not land.
Parameters
event
Returns
Promise<void>
list()
list(
seedSlug,options?):Promise<{events:DeletionLedgerEvent[];nextCursor?:string; }>
Streams recorded erasures for one seed, newest-first is NOT guaranteed. cursor is opaque and comes from the previous page's nextCursor.
Parameters
seedSlug
string
options?
cursor?
string
limit?
number
Returns
Promise<{ events: DeletionLedgerEvent[]; nextCursor?: string; }>