Module Configurations Table
Component Detail
Data Layer
low complexity
backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
PostgreSQL repository layer for the module_configurations table, scoped by organization ID and area ID. Provides typed read/write access for module enable states and optional per-module configuration values with upsert semantics.
module-configurations-table
Responsibilities
- Persist and retrieve enabled/disabled state per organization and area
- Support upsert semantics for toggle changes to avoid duplicate rows
- Provide bulk read of all module rows for a given organization for bootstrap payload assembly
Interfaces
findByOrgId(orgId: string): Promise<ModuleConfiguration[]>
findOne(orgId: string, areaId: string): Promise<ModuleConfiguration | null>
upsert(orgId: string, areaId: string, enabled: boolean, config?: Record<string, unknown>): Promise<void>
deleteByOrgAndArea(orgId: string, areaId: string): Promise<void>