Skip to main content
zerotal

Documentation


Documentation / @zerotal/audit / AuditableOptions

Interface: AuditableOptions

Defined in: audit/src/types.ts:77

Audit configuration. Set these as overridable static fields on a Auditable model — auditOnly / auditExcept / auditType — read per event from the concrete subclass:

class User extends Auditable(AuthUser) {
  protected static auditExcept = ["password"];
}

Properties

only?

optional only?: string[]

Defined in: audit/src/types.ts:82

Allowlist of column names to include in old_values / new_values. If set, only listed columns are audited. (static auditOnly)


except?

optional except?: string[]

Defined in: audit/src/types.ts:87

Denylist of column names to exclude. Applied after only (if both are provided, only wins). (static auditExcept)


type?

optional type?: string

Defined in: audit/src/types.ts:92

Override the auditable_type string stored in the log. Defaults to the model's class name. (static auditType)