StayBindDevelopers
Reference

Canonical model

The provider-agnostic types every integration translates to and from. These are the atoms that flow in and out of the availability ledger.

Every adapter translates its provider's payloads to and from these canonical shapes at its boundary, so nothing provider-specific reaches the StayBind core. All types are validated with Zod on the way in.

Primitives

Money

Always integer minor units (paise), currency INR. ₹7,500.00 is 750000. Never a float.

Prop

Type

DateRange

Property-local dates, YYYY-MM-DD. Check-out is exclusive.

Prop

Type

GuestInfo

Prop

Type

ProviderCode

Which adapter handles a connection. Small and additive, a new partner is a new connection, not a new code.

type ProviderCode = "direct" | "partner" | "channex" | "ical" | "mock";

ReservationStatus

type ReservationStatus = "new" | "modified" | "cancelled";

ChannelListing

The explicit mapping between an internal unit/rate-plan and a provider's ids.

Prop

Type

AvailabilityUpdate

One availability atom (the "A" in ARI). available is the sellable count for the unit on that date; 0 means blocked.

Prop

Type

RateUpdate

One rate atom (the "R"). amount is integer paise.

Prop

Type

Restriction

One restriction atom (the "I", inventory/stay rules). All rule fields are optional, send only what changed.

Prop

Type

CanonicalReservation

A booking normalized from any channel. The two id fields carry the idempotency contract (see errors & reliability).

Prop

Type

SyncResult

The uniform result of any outbound push. retryable drives back-off.

Prop

Type

WebhookEvent

The raw inbound envelope before an adapter parses and verifies it.

Prop

Type

On this page