TestAuditOptions
Defined in: src/testing.ts:90
Options for createTestAudit.
Extends
Section titled “Extends”Omit<AuditCoreOptions<A>,"storage">
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
A extends ActionMap |
ActionMap |
Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
actions? |
A |
Typed action catalog from defineActions (ADR 0012). |
Omit.actions |
src/core.ts:147 |
checkpoints? |
| false | CheckpointOptions |
Automatic checkpoints. Default { every: 1000, interval: "1h" } when a signer is set. |
Omit.checkpoints |
src/core.ts:162 |
context? |
boolean |
Merge the ambient request context (@xtandard/audit/context). Default true. |
Omit.context |
src/core.ts:156 |
hooks? |
AuditHooksInput |
Control-plane hooks (before may deny, after observes). |
Omit.hooks |
src/core.ts:166 |
maxEventBytes? |
number |
Max serialized size of an event’s free-form sections. Default 64 KiB. | Omit.maxEventBytes |
src/core.ts:180 |
now? |
() => number |
Injectable clock (unix millis) for tests. Default Date.now. |
Omit.now |
src/core.ts:184 |
onHookError? |
HookErrorReporter |
Reporter invoked when an after hook throws. Default console.warn. |
Omit.onHookError |
src/core.ts:168 |
onRecord? |
(events) => void |
Fire-and-forget tap invoked with every committed batch (metrics, cache busting). | Omit.onRecord |
src/core.ts:170 |
panel? |
| boolean | Omit<AuditPanelOptions, "storage" | "core" | "streams" | "streamRunner"> |
Also build a panel over the same core (true for defaults). Its stream runner is not started. |
- | src/testing.ts:95 |
readonly? |
boolean |
Block every mutation except recording when true (a read-only panel). | Omit.readonly |
src/core.ts:182 |
retention? |
RetentionOptions |
Retention. Pruning runs on demand (AuditCore.prune) or via the panel/CLI schedule. | Omit.retention |
src/core.ts:164 |
selfAudit? |
boolean |
Record the log’s own sensitive operations (exports, erasures, prunes) into the affected tenant’s log, and catalog changes into systemTenant. Default true. |
Omit.selfAudit |
src/core.ts:176 |
signer? |
AuditSigner |
Checkpoint signer (ADR 0004). Without one, checkpoints are unavailable. | Omit.signer |
src/core.ts:158 |
streams? |
StreamDefinition[] |
Extra streams beside the built-in "test" stream feeding TestAudit.sink. |
- | src/testing.ts:97 |
strictActions? |
boolean |
Reject actions that are not in actions. Default: true when actions is given, false otherwise. |
Omit.strictActions |
src/core.ts:152 |
systemTenant? |
string |
Tenant receiving self-audit events that belong to no tenant. Default "_system". |
Omit.systemTenant |
src/core.ts:178 |
transforms? |
AuditTransform[] |
Redact / mask / hash / omit before chaining (see @xtandard/audit transforms). |
Omit.transforms |
src/core.ts:154 |
verificationKeys? |
AuditVerificationKey[] |
Extra keys verify accepts (e.g. retired signing keys). |
Omit.verificationKeys |
src/core.ts:160 |