Skip to content

Add "supplier calendar sync" webhook to push slot changes to their external calendar #602

Description

@thlpkee20-wq

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
    • npm test
  • 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

Metadata

Metadata

Assignees

Labels

Stellar WaveStellar Wave issue batchapiAPI endpoints and request/response behaviorbackendBackend scopefeatureNew feature work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions