Registration API Client
Component Detail
Infrastructure
low complexity
Shared Component
mobile
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Thin HTTP client adapter responsible for serializing and dispatching registration requests to the REST API endpoint POST /api/v1/events/{eventId}/registrations. Handles JWT authorization header injection, response deserialization, and HTTP error code mapping (409 conflict, 422 unprocessable entity, 403 forbidden). Shared with other features that interact with the event_registrations resource.
registration-api-client
Responsibilities
- Serialize registration request payload (userId, proxyUserId) and dispatch POST request
- Inject JWT bearer token from Token Store into Authorization header
- Deserialize successful registration response into EventRegistration model
- Map HTTP 409 to DuplicateRegistrationError, 422 to CapacityExceededError, 403 to UnauthorizedProxyError
Interfaces
postRegistration(eventId: string, payload: RegistrationPayload): Future<EventRegistration>
deleteRegistration(eventId: string, registrationId: string): Future<void>
getRegistration(eventId: string, userId: string): Future<EventRegistration?>
listRegistrations(eventId: string): Future<List<EventRegistration>>