Service Layer high complexity backend
1
Dependencies
4
Dependents
1
Entities
0
Integrations

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.

Feature: External System Integration Configuration

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>

Sub-Components (3)

Xledger Adapter
component high

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
Dynamics Adapter
component high

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
Bufdir Adapter
component high

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