Audit Log
Source: src/data/audit-log/
Service
The audit-log service is a stub (export {}). Not yet implemented.
Repository
AuditLogRepository
| Method | Parameters | Returns |
|---|---|---|
| getById | (ctx: RequestContext, id: string) | Promise<AuditLogRecord | null> |
| listByTenant | (ctx: RequestContext) | Promise<AuditLogRecord[]> |
| create | (ctx: RequestContext, record: AuditLogRecord) | Promise<void> |
| update | (ctx: RequestContext, id: string, patch: Partial<Omit<AuditLogRecord, 'id' | 'tenantId'>>) | Promise<AuditLogRecord> |
| delete | (ctx: RequestContext, id: string) | Promise<void> |
AuditLogRecord
| Field | Type |
|---|---|
| id | string |
| tenantId | string |
| createdAt | Date |
| updatedAt | Date |
| data | Record<string, unknown> (optional) |
Validators
auditLogSchema
| Field | Type | Required | Default |
|---|---|---|---|
| tenantId | string | Yes | — |
| actorId | string | Yes | — |
| action | string | Yes | — |
| entityType | string | Yes | — |
| entityId | string | Yes | — |
| meta | Record<string, unknown> | No | {} |
| createdAt | Date (coerced) | Yes | — |
Inferred Types
AuditLog—z.infer<typeof auditLogSchema>