Integration Config Repository
Component Detail
Data Layer
medium complexity
Shared Component
backend
0
Dependencies
3
Dependents
1
Entities
0
Integrations
Description
Persists and retrieves organization-scoped integration configuration including encrypted OAuth secrets or API keys, field mapping definitions, sync toggles, and last-sync state. Serves as the single source of truth for all integration settings.
integration-config-repository
Responsibilities
- Store and retrieve integration_configs records scoped to organization ID
- Encrypt credentials at rest and decrypt on authenticated retrieval
- Persist field mapping and sync rule definitions
- Track last successful sync timestamps and connection health state
Interfaces
getByOrgId(orgId: string): Promise<IntegrationConfig | null>
save(config: IntegrationConfig): Promise<IntegrationConfig>
updateCredentials(orgId: string, credentials: EncryptedCredentials): Promise<void>
updateSyncState(orgId: string, state: SyncState): Promise<void>
updateFieldMappings(orgId: string, mappings: FieldMapping[]): Promise<void>
delete(orgId: string): Promise<void>
Relationships
Dependents (3)
Components that depend on this component
Related Data Entities (1)
Data entities managed by this component