Skip to main content

Reservation

Reservation schemas for managing resource bookings including tables, rooms, and rentals. Includes reservation settings and reservable resources.

Source: src/core/business-mgt/reservation.schema.ts, src/core/business-mgt/reservation-resource.schema.ts


ReservationSettings​

Organization-level settings for reservation types.

Schema: ReservationSettingsSchema

Attributes​

AttributeTypeRequiredDefaultDescription
idstring——Unique identifier for the settings
reservationTypeenumYes—Resource type this setting applies to. One of ROOM, TABLE, RENTAL, or OTHER.
settingTypeenumYes—Configuration category.
defaultReservationDurationnumberNo1Standard reservation length
defaultReservationDurationUnitenumNoHOURSTime unit for duration. One of MINUTES, HOURS, or DAYS.
isActivebooleanNofalseWhether configuration is active
createdAtnumber——Unix timestamp when created
updatedAtnumber——Unix timestamp when last updated

Resource​

Reservable resources (tables, rooms, rental items).

Schema: ResourceSchema

Attributes​

AttributeTypeRequiredDefaultDescription
idstring——Unique identifier for the resource
resourceTypeenumYes—Category of resource. One of ROOM, TABLE, RENTAL, or OTHER.
namestringYes—Display name (e.g., Table 5, Room 101)
descriptionstringNo—Detailed description
capacitynumberNo—Maximum occupancy or party size
isAvailablebooleanNotrueWhether resource is available
locationstringNo—Physical location or placement
amenitiesarray<string>No[]Available features or amenities
reservationDurationnumber | nullNo—Default reservation length
reservationDurationUnitenum | nullNo—Time unit for duration. One of MINUTES, HOURS, or DAYS.
calendarIdstring | nullNo—External calendar ID for sync
syncEnabledboolean | nullNofalseWhether calendar sync is active
lastSyncAtnumber | nullNo—Last sync timestamp
roomResourceRoomResource | nullNo—Hotel/accommodation-specific fields
rentalResourceRentalResource | nullNo—Rental-specific fields
metadataobjectNo—Additional custom attributes
createdAtnumber——Unix timestamp when created
updatedAtnumber——Unix timestamp when last updated

RoomResource Object​

AttributeTypeDefaultDescription
roomNumberstring—Room identifier
roomTypestring—Room category (e.g., Deluxe King)
pricePerNightnumber—Nightly rate
viewstring—Room view classification
bedTypestring—Bed configuration
isSmokingbooleanfalseWhether smoking is permitted
accessibilityFeaturesstring—ADA accommodations available

RentalResource Object​

AttributeTypeDescription
itemTypestringRental category or type
pricePerHournumberHourly rental rate

Reservation​

Individual reservation booking.

Schema: ReservationSchema

Attributes​

AttributeTypeRequiredDefaultDescription
idstring——Unique identifier for the reservation
reservationTypeenumYes—Category of reservation. One of ROOM, TABLE, RENTAL, or OTHER.
resourceIdstring | nullNo—Specific resource being reserved
customerIdstringYes—References Customer
startTimenumberYes—Unix timestamp for start
endTimenumberNo—Unix timestamp for end
durationnumberNo—Reservation length in units
personsNumbernumberNo—Party size or occupancy
totalPricenumberNo—Total reservation cost
depositPaidnumberNo0Deposit amount paid
statusenumNoPENDINGCurrent reservation status. One of PENDING, CONFIRMED, IN_PROGRESS, COMPLETED, CANCELLED, or NO_SHOW.
notesstringNo—Special requests or notes
cancelReasonstring | nullNo—Reason for cancellation
isResourceReservationbooleanNofalseWhether specific resource is assigned
serviceConversationConfigIdstring | nullNo—AI service conversation config ID
createdAtnumber——Unix timestamp when created
updatedAtnumber——Unix timestamp when last updated

Example​

Resource Example​

{
"id": "res_table5",
"resourceType": "TABLE",
"name": "Table 5",
"description": "Window table with city view",
"capacity": 4,
"isAvailable": true,
"location": "Window side, main dining area",
"amenities": ["wheelchair_accessible"],
"reservationDuration": 2,
"reservationDurationUnit": "HOURS",
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}

Room Resource Example​

{
"id": "res_room101",
"resourceType": "ROOM",
"name": "Room 101",
"capacity": 2,
"isAvailable": true,
"location": "First floor",
"amenities": ["WiFi", "TV", "Mini-bar"],
"roomResource": {
"roomNumber": "101",
"roomType": "Deluxe King",
"pricePerNight": 199.00,
"view": "City View",
"bedType": "King",
"isSmoking": false,
"accessibilityFeatures": "Roll-in shower"
},
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}

Reservation Example​

{
"id": "rsv_abc123",
"reservationType": "TABLE",
"resourceId": "res_table5",
"customerId": "cust_def456",
"startTime": 1709920800000,
"endTime": 1709928000000,
"duration": 2,
"personsNumber": 4,
"status": "CONFIRMED",
"notes": "Birthday celebration, please prepare dessert",
"isResourceReservation": true,
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}

Create / Update Schemas​

SchemaDescriptionOmits
CreateResourceSchemaFor creating resourcesid, createdAt, updatedAt, lastSyncAt, syncEnabled
UpdateResourceSchemaFor updating resourcesAll fields optional except id
CreateReservationSchemaFor creating reservationsid, createdAt, updatedAt, status, cancelReason, serviceConversationConfigId
UpdateReservationSchemaFor updating reservationsAll fields optional except id
UpdateReservationSettingsSchemaFor updating settingsAll fields optional except id