Skip to main content

Audit Log

Source: src/data/audit-log/

Service​

The audit-log service is a stub (export {}). Not yet implemented.

Repository​

AuditLogRepository​

MethodParametersReturns
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​

FieldType
idstring
tenantIdstring
createdAtDate
updatedAtDate
dataRecord<string, unknown> (optional)

Validators​

auditLogSchema​

FieldTypeRequiredDefault
tenantIdstringYes—
actorIdstringYes—
actionstringYes—
entityTypestringYes—
entityIdstringYes—
metaRecord<string, unknown>No{}
createdAtDate (coerced)Yes—

Inferred Types​

  • AuditLog — z.infer<typeof auditLogSchema>