Declaration Service
Component Detail
Service Layer
low complexity
mobilebackend
1
Dependencies
1
Dependents
2
Entities
0
Integrations
Description
Business logic layer for confidentiality declarations. Retrieves the applicable declaration template for the user's organisation, posts signed declaration records to the REST API with UTC timestamp and references to the user, organisation, and linked activity or assignment, and exposes a query method for coordinator-side status checks.
declaration-service
Responsibilities
- Fetch the active declaration template for the current organisation
- Submit a signed declaration record with UTC timestamp, userId, orgId, activityId or assignmentId
- Expose declaration status query for admin and coordinator review
- Cache template locally to avoid redundant network requests
Interfaces
getDeclarationTemplate(orgId): Future<DeclarationTemplate>
submitDeclaration(userId, orgId, activityId, assignmentId): Future<SignedDeclaration>
getDeclarationStatus(userId, activityId): Future<DeclarationStatus>
hasSignedDeclaration(userId, activityId): Future<bool>
Relationships
Related Data Entities (2)
Data entities managed by this component