Tablez — Event Catalog¶
All domain events in the Tablez platform. Events are defined in tablez-contracts and shared across all services.
Reservation Events¶
Namespace: Tablez.Contracts.Events.Reservations
| Event | Fields | Published by | Consumed by |
|---|---|---|---|
ReservationRequested |
GuestId, PartySize, DateTime, Channel | reservation | notification (confirmation SMS), guest (visit tracking), ai (context update) |
ReservationConfirmed |
ReservationId, ConfirmedAt | reservation | notification (SMS), web (floor view), guest (visit count) |
ReservationCancelled |
ReservationId, Reason, CancelledBy | reservation | notification (SMS), web (floor view), guest (cancellation count) |
GuestArrived |
ReservationId, ArrivedAt | reservation | web (floor view), notification (staff alert) |
GuestSeated |
ReservationId, TableId, SeatedAt | reservation | web (floor view, table status), restaurant (table occupancy) |
GuestCompleted |
ReservationId, CompletedAt | reservation | web (floor view), guest (visit history), restaurant (table freed) |
NoShowMarked |
ReservationId, MarkedAt | reservation | guest (no-show count), notification (no-show fee SMS) |
Waitlist Events¶
Namespace: Tablez.Contracts.Events.Waitlist
| Event | Fields | Published by | Consumed by |
|---|---|---|---|
WaitlistEntryCreated |
WaitlistEntryId, GuestId, PartySize, Channel | reservation | notification (confirmation), web (waitlist view) |
WaitlistSlotOffered |
WaitlistEntryId, TableId, ExpiresAt | reservation | notification (offer SMS with expiry), web (waitlist view) |
WaitlistOfferAccepted |
WaitlistEntryId, AcceptedAt | reservation | notification (confirmation SMS), web (waitlist view) |
WaitlistOfferExpired |
WaitlistEntryId | reservation | notification (expired SMS), web (waitlist view) |
WaitlistOfferDeclined |
WaitlistEntryId, DeclinedAt | reservation | web (waitlist view) |
Guest Events¶
Namespace: Tablez.Contracts.Events.Guests
| Event | Fields | Published by | Consumed by |
|---|---|---|---|
GuestProfileCreated |
GuestId, Name, Phone, Email | guest | ai (guest context), notification (welcome) |
GuestProfileUpdated |
GuestId, Name?, Phone?, Email? | guest | ai (guest context) |
Table Events¶
Namespace: Tablez.Contracts.Events.Tables
| Event | Fields | Published by | Consumed by |
|---|---|---|---|
TableStatusChanged |
TableId, PreviousStatus, NewStatus | restaurant | web (floor view), reservation (availability recalc) |
Enums¶
Namespace: Tablez.Contracts.Enums
| Enum | Values |
|---|---|
Channel |
WalkIn, Phone, Website, App, ThirdParty, AiAgent |
ReservationStatus |
Requested, Confirmed, Arrived, Seated, Completed, Cancelled, NoShow |
TableStatus |
Available, Reserved, Occupied, Cleaning, OutOfService |
WaitlistStatus |
Waiting, Offered, Accepted, Expired, Declined |
DTOs¶
Namespace: Tablez.Contracts.DTOs
| DTO | Fields |
|---|---|
AvailabilitySlot |
StartTime, EndTime, MaxPartySize |
ReservationDto |
ReservationId, GuestId, PartySize, DateTime, Channel, Status, TableId |
GuestDto |
GuestId, Name, Phone, Email, TotalVisits, NoShows |
Cross-Service Event Flow¶
flowchart TB
subgraph Publishers
R["reservation"]
G["guest"]
REST["restaurant"]
end
VK{"Valkey<br/>pub/sub"}
subgraph Consumers
N["notification<br/>SMS / email / push"]
GS["guest<br/>visit tracking"]
W["web<br/>SignalR floor view"]
AI["ai<br/>context update"]
end
R -->|ReservationConfirmed<br/>GuestSeated<br/>NoShowMarked| VK
G -->|GuestProfileCreated| VK
REST -->|TableStatusChanged| VK
VK --> N
VK --> GS
VK --> W
VK --> AI
Events flow through Valkey pub/sub. No direct service-to-service calls.
Adding New Events¶
- Define the event record in
tablez-contractsunder the appropriate namespace - Implement
IEventinterface (providesEventIdandOccurredAt) - Add to this catalog with publisher and consumer info
- Update Marten projections in consuming services
- Create PR to
tablez-contracts— all services reference this package