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.

Feature: Event Sign-up

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>>

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component