DrizzleAuditMapping
Defined in: src/bridges/drizzle-audit.ts:69
How a drizzle-audit entry maps to an audit event.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
action? |
(entry) => string |
Override the action name. Default: see the module docs. | 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" }. |
src/bridges/drizzle-audit.ts:83 |
include? |
(entry) => boolean |
Only forward entries for which this returns true (default: all). |
src/bridges/drizzle-audit.ts:87 |
targets? |
(entry) => AuditTarget[] |
Override the targets. Default: [{ type: tableName, id: rowId }] (none without both). |
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. |
src/bridges/drizzle-audit.ts:76 |