Μετάβαση στο περιεχόμενο

AuditRecord

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:41

A single audit-trail entry for one pipeline operation (who did what, when, and with what outcome), forwarded to an AuditSink.

Unlike a dead letter (failures only), an audit record is written for both successful and failed operations, so denied/rejected attempts are captured too.

action: string

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:49

Logical action name, e.g. user.create. Defaults to the request name.


optional actor?: AuditActor

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:55

The principal that performed the action, if resolvable.


correlationId: string

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:45

Correlation ID of the pipeline run (for cross-system tracing).


durationMs: number

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:69

Wall-clock duration of the operation in milliseconds.


optional error?: AuditError

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:67

Error details — present only when outcome is 'failure'.


handlerName: string

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:61

Handler class name, e.g. CreateUserHandler.


id: string

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:43

Unique id for this entry (UUIDv7, so ids sort in start order).


optional metadata?: Record<string, unknown>

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:73

Metadata from the metadata factory, plus tenantId when present.


outcome: AuditOutcome

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:53

Whether the operation succeeded or failed.


optional payload?: unknown

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:63

The request payload (redacted), unless captureRequest: false.


requestKind: AuditRequestKind

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:57

Whether the request was a command, query, event, or unknown.


requestName: string

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:59

Request class name, e.g. CreateUserCommand.


optional response?: unknown

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:65

The handler response (redacted), only when captureResponse: true.


severity: AuditSeverity

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:51

Severity of the action. Defaults to 'medium' ('low' for queries).


optional tenantId?: string

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:47

Active tenant identifier if execution occurred within a multi-tenant context.


timestamp: string

Defined in: pipeline-audit/src/interfaces/audit-record.interface.ts:71

ISO-8601 timestamp of when the operation started.