Contact Service
Component Detail
Service Layer
medium complexity
mobile
2
Dependencies
3
Dependents
1
Entities
0
Integrations
Description
Service layer responsible for all contact read and update operations via the REST API. Fetches the full contact object, submits PATCH updates, validates response shape, and propagates structured errors to the BLoC for optimistic rollback. Acts as the single integration point between the BLoC and the network layer.
contact-service
Responsibilities
- Fetch full contact profile from GET /api/v1/contacts/:id
- Submit contact field updates via PATCH /api/v1/contacts/:id
- Validate API response shape before returning data to the BLoC
- Propagate structured API errors to support optimistic rollback in the UI
Interfaces
getContact(String contactId) -> Future<Contact>
updateContact(String contactId, ContactUpdateDto dto) -> Future<Contact>
Relationships
Dependencies (2)
Components this component depends on
Dependents (3)
Components that depend on this component