Beds24 caps each account at ~100 credits per rolling 5-minute window rather
than limiting concurrency, and a single houses-page search across 8
apartments (availability + min-stay probing) can burn through that budget
in one page load. Retrying with backoff doesn't help since the window can
take minutes to refill, so we now track the last known remaining budget per
house and fail fast to the existing fallback logic once it's exhausted,
instead of hammering the API with requests that will just 429.
Also fixes a stray let->const ESLint warning in getAvailabilityInChunks.
When a data endpoint rejects the token with 401, the cached token is now
cleared and one retry is attempted with a fresh token. This prevents a
stale token from causing a cascade of 401s while still failing cleanly if
refresh itself is rate-limited.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The /inventory/rooms/offers endpoint allows up to 99 nights, but the
chunking threshold was set to 90. This caused 90-99 night stays to be
split unnecessarily, often leaving a 1- or 2-night final chunk that fell
below the room's minimum stay and produced a false "unavailable" result.
Now the limit is 99 and chunks are split into equal-sized pieces, so
stays around 3 months (and longer) avoid tiny trailing chunks.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Deduplicate in-flight /authentication/token requests per house so
that concurrent page loads do not each trigger a separate token
refresh, which was exhausting the Beds24 rate limit on first load.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Adds the complete Next.js website including i18n routing, house and
apartment pages, Beds24 v2 integration for live availability/pricing,
Stripe checkout, contact forms, Docker setup and deployment docs.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>