Accounting Integration Config Repository
Component Detail
Data Layer
medium complexity
Shared Component
backend
0
Dependencies
3
Dependents
1
Entities
0
Integrations
Description
Data access layer for reading and writing accounting-specific integration configuration stored in the integration_configs table. Handles encrypted credential fields (API keys, client secrets) with field-level encryption and provides typed access to expense-type-to-accounting-code mapping JSON.
accounting-integration-config-repository
Responsibilities
- Read and write accounting provider config (base URL, credentials, provider type) per org
- Retrieve expense-type-to-accounting-code mapping for a given organization
- Store and retrieve idempotency records to detect duplicate sync attempts
- Expose config existence check so sync service can skip unconfigured orgs
Interfaces
getAccountingConfig(orgId): AccountingConfig | null
saveAccountingConfig(orgId, config): void
getCodeMapping(orgId, expenseTypeId): string | null
saveCodeMappings(orgId, mappings): void
idempotencyKeyExists(key): boolean
recordIdempotencyKey(key, expenseId): void
Relationships
Dependents (3)
Components that depend on this component
Related Data Entities (1)
Data entities managed by this component