Data Layer low complexity backend
0
Dependencies
2
Dependents
1
Entities
0
Integrations

Description

Data access layer for the audit_logs PostgreSQL table. Provides insert-only write access and read access with composable filter predicates. Never exposes update or delete operations - retention cleanup is handled exclusively by scheduled jobs with admin approval.

Feature: Audit Log

audit-log-repository

Responsibilities

  • Insert new audit log entries with full schema validation
  • Execute paginated queries with composable WHERE predicates
  • Enforce organization-scoped tenant isolation on all reads
  • Stream rows for export without loading full result sets into memory

Interfaces

insert(entry: AuditLogRow): Promise<void>
findMany(filters: AuditLogFilters, pagination: Pagination): Promise<AuditLogRow[]>
count(filters: AuditLogFilters): Promise<number>
stream(filters: AuditLogFilters): AsyncIterable<AuditLogRow>

Relationships

Dependents (2)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component