REST API Adapter Registry
Component Detail
Description
Implements the REST API adapter pattern for all supported integration types (Xledger, Dynamics, Cornerstone, Consio, Bufdir). Each adapter exposes a standard interface for formatting export payloads, handling authentication, and executing API calls, selected at runtime by integration type.
rest-api-adapter-registry
Responsibilities
- Maintain a registry of adapter implementations per integration type
- Resolve the correct adapter for a given integration type at runtime
- Enforce a uniform adapter interface across all external system connectors
Interfaces
getAdapter(integrationType: IntegrationType): IntegrationAdapter
registerAdapter(type: IntegrationType, adapter: IntegrationAdapter): void
listSupportedTypes(): IntegrationType[]
executeExport(integrationId: string, payload: ExportPayload): Promise<ExportResult>
formatPayload(integrationId: string, data: unknown): Promise<ExportPayload>
authenticateRequest(integrationId: string, request: HttpRequest): Promise<HttpRequest>
Relationships
Dependents (4)
Components that depend on this component
Sub-Components (3)
Adapter implementing the standard integration interface for Blindeforbundet's Xledger accounting system. Handles Xledger-specific API authentication, payload formatting for expense reimbursements, and response parsing.
- Format expense and reimbursement data into Xledger API payload structure
- Handle Xledger API key authentication in request headers
- Parse Xledger responses and map errors to standard error codes
Adapter for HLF's Dynamics-based 'min side' portal integration. Formats export payloads for Dynamics endpoints while respecting the excluded-features configuration to prevent overlap between the app and the portal.
- Format data payloads for HLF Dynamics API endpoints
- Apply excluded-features configuration to suppress duplicate functionality
- Handle OAuth or token-based authentication for Dynamics
Adapter implementing the standard interface for Bufdir reporting exports. Applies per-organization field mappings to produce the Bufdir-required export format, supporting grant agreement and reporting template variations per organization.
- Apply per-org field mappings to produce Bufdir-compliant export payload
- Support multiple Bufdir reporting templates per grant agreement type
- Validate export data against Bufdir schema before submission
Related Data Entities (1)
Data entities managed by this component