Description
Emit slot.changed webhooks to suppliers containing the calendar payload (start, duration, status) so they can sync into their own systems, with the calendar.mode field indicating whether it was an add/update/delete.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/webhooks/dispatch.ts, src/services/slotInventory.ts
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/supplier-calendar-webhook
- Implement changes
- Add
slot.changed webhook event with schema
- Attach to slot service create/update/delete transitions
- Add supplier setting to opt in/out
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- transactional rollback (no dispatch), receiver 4xx (do not retry), receiver 5xx (retry per policy)
- Include test output and notes
Example commit message
feat: slot.changed webhook
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Emit
slot.changedwebhooks to suppliers containing the calendar payload (start, duration, status) so they can sync into their own systems, with thecalendar.modefield indicating whether it was an add/update/delete.Requirements and context
src/webhooks/dispatch.ts,src/services/slotInventory.tsSuggested execution
git checkout -b feat/supplier-calendar-webhookslot.changedwebhook event with schemaTest and commit
npm testExample commit message
feat: slot.changed webhookGuidelines