harbor run -t openthoughts/tasktrove-exp-rpt-stack-jest-large-stack-jest-2984harbor download openthoughts/tasktrove-exp-rpt-stack-jest-large-stack-jest-2984Task: Implement a complete Offer CRUD API in /app with authentication, validation, data population, and business rules as exercised by the tests.
What to implement
User (simplified)
Tribe
Offer
Fields:
Timestamps enabled.
Virtuals (no need to expose in JSON by default):
read(req, res): GET /api/offers/:offerId
listByUser(req, res): GET /api/offers-by/:userId
create(req, res): POST /api/offers
update(req, res): PUT /api/offers/:offerId
delete(req, res): DELETE /api/offers/:offerId
Authentication:
Data population:
Validation and defaults:
Update constraints:
Deletion:
Acceptance