feat(api): keyless unavailable-ranges feed for the guest calendar
GET /api/v1/public/rooms/{id}/unavailable?start=&end= and its RPC twin
chatelet_room_unavailable return the nights a guest cannot book over a
window (default today → +365 d, capped at 400 d): occupying bookings —
live holds included, so the feed always agrees with POST /availability —
and manual blocks, clipped, sorted and coalesced into anonymous half-open
spans. Adjacent spans merge on purpose so a guest cannot tell where one
occupant's dates end and the next begin, nor a block from a stay.
is_available now uses the OCCUPYING_STATUSES constant it was inlining.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
64607a00bc
commit
feaaef93e3
8 changed files with 278 additions and 8 deletions
|
|
@ -26,6 +26,7 @@ flow runs over relays with no HTTP:
|
|||
| `chatelet_block_create` | wallet | operator blocks a range |
|
||||
| `chatelet_room_list_mine` | account | operator's rooms across their wallets |
|
||||
| `chatelet_room_list` / `_get` | none | public discovery (active rooms, wallet id stripped) |
|
||||
| `chatelet_room_unavailable` | none | merged occupied/blocked spans over a window — the guest calendar feed (HTTP twin: `GET /api/v1/public/rooms/{id}/unavailable`) |
|
||||
| `chatelet_availability` | none | is a range free + a quote |
|
||||
| `chatelet_booking_request` | none | guest requests a stay (guest id = signed `sender_pubkey`) |
|
||||
| `chatelet_booking_get` | none | guest reads back their booking (ownership by `sender_pubkey`) |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue