Infrastructure low complexity mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Typed REST client wrapper that calls the Calculator Service benefit-config endpoint and handles authentication headers, error mapping, and response deserialization. Integrated with the app-wide HTTP client infrastructure for retry and offline detection.

Feature: Advantage Calculator

calculator-api-client

Responsibilities

  • Issue GET requests to /api/v1/organizations/:orgId/benefit-config
  • Deserialize response JSON into BenefitConfig domain model
  • Surface network errors and HTTP error codes as typed failures
  • Pass JWT auth header from Token Store on every request

Interfaces

fetchBenefitConfig(orgId: String) → Future<Result<BenefitConfig>>
fetchConfigVersion(orgId: String) → Future<Result<ConfigVersion>>