Skip to content

DrizzleAuditStorageOptions

Defined in: src/bridges/drizzle-audit.ts:91

Options for createDrizzleAuditStorage.

Property Type Description Inherited from Defined in
action? (entry) => string Override the action name. Default: see the module docs. DrizzleAuditMapping.action src/bridges/drizzle-audit.ts:78
actor? (entry) => AuditActor Override the actor. Default: { id: userId, type: "user" }, else the ambient context’s actor, else { id: "system", type: "system" }. DrizzleAuditMapping.actor src/bridges/drizzle-audit.ts:83
include? (entry) => boolean Only forward entries for which this returns true (default: all). DrizzleAuditMapping.include src/bridges/drizzle-audit.ts:87
recorder? Recorder<ActionMap> Send through a buffered recorder instead of core.recordMany (ADR 0002): write returns immediately and flush / close drain the recorder. Default: synchronous commit, so drizzle-audit’s onError sees failures. - src/bridges/drizzle-audit.ts:97
targets? (entry) => AuditTarget[] Override the targets. Default: [{ type: tableName, id: rowId }] (none without both). DrizzleAuditMapping.targets src/bridges/drizzle-audit.ts:85
tenant? string | ((entry) => string | null | undefined) The tenant of an entry: a fixed key, or a function. Return null / undefined (or omit the option) to fall back to entry.tenantId, then entry.metadata.tenantId, then the ambient audit context’s tenant; entries with no tenant at all throw. DrizzleAuditMapping.tenant src/bridges/drizzle-audit.ts:76