import { NonNullablePaths } from '@wix/sdk-types'; interface TimeSlot { /** Start date and time of this time slot. */ startDate?: Date | null; /** Duration in minutes of this time slot. */ duration?: number; /** Availability status of this time slot. */ status?: StatusWithLiterals; /** Whether manual approval is required to make a reservation in this time slot. */ manualApproval?: boolean | null; } /** Table combination. */ interface TimeSlotTableCombination { /** * Table IDs of the tables in the combination. * @format GUID * @maxSize 100 */ tableIds?: string[]; } declare enum Status { /** The restaurant can accommodate a party of the given size in this time slot. */ AVAILABLE = "AVAILABLE", /** The restaurant can't accommodate a party of the given size in this time slot. */ UNAVAILABLE = "UNAVAILABLE", /** The restaurant is not open during this time slot. Time slots retrieved by Get Scheduled Time Slots never have this status. */ NON_WORKING_HOURS = "NON_WORKING_HOURS" } /** @enumType */ type StatusWithLiterals = Status | 'AVAILABLE' | 'UNAVAILABLE' | 'NON_WORKING_HOURS'; /** Wrapper for table combinations. */ interface MaybeTableCombinations { } interface GetTimeSlotsRequest { /** * ID of the reservation location for which to retrieve time slots. * @format GUID */ reservationLocationId: string; /** Date and time for which to retrieve a time slot in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. */ date: Date | null; /** * Duration in minutes of the time slot. * * Min: `5` * @min 5 * @max 1000 */ duration?: number | null; /** * Size of the party that needs to be seated during this time slot. * * Min: `1` * @min 1 * @max 10000 */ partySize: number | null; /** * The number of time slots to retrieve before the specified `date`. * @max 50 */ slotsBefore?: number | null; /** * The number of time slots to retrieve after the specified `date`. * @max 50 */ slotsAfter?: number | null; } interface GetTimeSlotsResponse { /** A list of time slots and their availability according to the specified party size. */ timeSlots?: TimeSlot[]; } interface CheckReservationDetailsRequest { /** * Reservation location ID. * @format GUID */ reservationLocationId?: string; /** Date. */ date?: Date | null; /** * Duration. * @min 5 * @max 1000 */ duration?: number | null; /** * Party size. * @min 1 * @max 10000 */ partySize?: number | null; /** * Reservation, that should be ignored during the check. * @format GUID */ excludeReservationId?: string | null; /** * Requested table combination. * @format GUID * @deprecated * @replacedBy maybe_table_ids * @targetRemovalDate 2025-12-05 */ tableIds?: string[]; } interface MaybeTableIds { /** * @format GUID * @maxSize 2000 */ tableIds?: string[]; } interface CheckReservationDetailsResponse { /** * Tables states. * @deprecated * @targetRemovalDate 2025-12-05 */ tables?: Table[]; /** * Table combinations states. * @deprecated * @replacedBy time_slot_availability * @targetRemovalDate 2025-12-05 */ tableCombinations?: TableCombination[]; /** * Reservation location conflicts. * @deprecated * @replacedBy time_slot_availability * @targetRemovalDate 2025-12-05 */ reservationLocationConflicts?: ReservationLocationConflict[]; /** * Requested table combination state. * @deprecated * @replacedBy time_slot_availability * @targetRemovalDate 2025-12-05 */ requestedTableCombination?: TableCombination; /** * List of reserved tables with corresponding reservation ids. * @maxSize 100 * @deprecated * @replacedBy time_slot_availability * @targetRemovalDate 2025-12-05 */ tableReservedConflicts?: TableReservedConflict[]; /** Whether manual approval is required to make a reservation in this time slot. */ manualApproval?: boolean | null; /** Whether payment is required to make a reservation in this time slot. */ paymentRequired?: boolean | null; /** Time slot availability. */ timeSlotAvailability?: TimeSlotAvailability; } interface TableCombinationAvailability { /** * IDs of the tables in the table combination. * @format GUID * @maxSize 2000 */ tableIds?: string[]; /** * Conflicts that would be generated by attempting to accommodate the proposed reservation using the table combination. * @maxSize 2 */ tableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[]; } declare enum TableCombinationConflictType { /** Undefined conflict type. */ UNKNOWN = "UNKNOWN", /** One or more of the chosen tables are already reserved. */ RESERVED = "RESERVED", /** The party is too big for the selected table. */ TOO_BIG = "TOO_BIG", /** The party is too small for the selected table. */ TOO_SMALL = "TOO_SMALL", /** The restaurant does not allow online reservations. */ OFFLINE_ONLY = "OFFLINE_ONLY", /** The table is reserved for an active experience. */ RESERVED_FOR_EXPERIENCE = "RESERVED_FOR_EXPERIENCE", /** The table is not in the requested area. */ TABLE_NOT_IN_AREA = "TABLE_NOT_IN_AREA" } /** @enumType */ type TableCombinationConflictTypeWithLiterals = TableCombinationConflictType | 'UNKNOWN' | 'RESERVED' | 'TOO_BIG' | 'TOO_SMALL' | 'OFFLINE_ONLY' | 'RESERVED_FOR_EXPERIENCE' | 'TABLE_NOT_IN_AREA'; declare enum ReservationLocationConflictType { /** Undefined reservation location conflict type. */ UNKNOWN = "UNKNOWN", /** The restaurant cannot accommodate a party of the given size according to party pacing settings. */ PARTY_PACING = "PARTY_PACING", /** The required number of seats are unavailable according to seat pacing settings. */ SEAT_PACING = "SEAT_PACING" } /** @enumType */ type ReservationLocationConflictTypeWithLiterals = ReservationLocationConflictType | 'UNKNOWN' | 'PARTY_PACING' | 'SEAT_PACING'; declare enum Type { /** Undefined experience blocking conflict type. */ UNKNOWN = "UNKNOWN", /** Standard reservations are blocked by an active experience schedule. */ BLOCKED_BY_EXPERIENCE = "BLOCKED_BY_EXPERIENCE" } /** @enumType */ type TypeWithLiterals = Type | 'UNKNOWN' | 'BLOCKED_BY_EXPERIENCE'; interface ExperienceTableCombinationAvailability { /** * IDs of the tables in the table combination. * @format GUID * @maxSize 2000 */ tableIds?: string[]; /** * Conflicts that would be generated by attempting to accommodate the proposed reservation using the table combination. * @maxSize 2 */ experienceTableCombinationConflicts?: ExperienceTableCombinationConflictTypeWithLiterals[]; } declare enum ExperienceTableCombinationConflictType { /** Undefined conflict type. */ UNKNOWN = "UNKNOWN", /** One or more of the chosen tables are already reserved. */ RESERVED = "RESERVED", /** The party is too big for the selected table. */ TOO_BIG = "TOO_BIG", /** The party is too small for the selected table. */ TOO_SMALL = "TOO_SMALL", /** The table or combination is not in the experience's specific table list. */ OUTSIDE_EXPERIENCE_TABLE_LIST = "OUTSIDE_EXPERIENCE_TABLE_LIST", /** The table is not in the requested area. */ TABLE_NOT_IN_AREA = "TABLE_NOT_IN_AREA" } /** @enumType */ type ExperienceTableCombinationConflictTypeWithLiterals = ExperienceTableCombinationConflictType | 'UNKNOWN' | 'RESERVED' | 'TOO_BIG' | 'TOO_SMALL' | 'OUTSIDE_EXPERIENCE_TABLE_LIST' | 'TABLE_NOT_IN_AREA'; declare enum ExperienceConflictType { /** Undefined reservation location conflict type. */ UNKNOWN = "UNKNOWN", /** The number of guests exceeds the allowed limit. */ MAXIMUM_NUMBER_OF_GUESTS = "MAXIMUM_NUMBER_OF_GUESTS" } /** @enumType */ type ExperienceConflictTypeWithLiterals = ExperienceConflictType | 'UNKNOWN' | 'MAXIMUM_NUMBER_OF_GUESTS'; declare enum TimeSlotAvailabilityType { STANDARD = "STANDARD", EXPERIENCE = "EXPERIENCE" } /** @enumType */ type TimeSlotAvailabilityTypeWithLiterals = TimeSlotAvailabilityType | 'STANDARD' | 'EXPERIENCE'; interface StandardOptions { /** * Table combinations and their availability information. * @maxSize 2000 */ tableCombinationAvailabilities?: TableCombinationAvailability[]; /** * Requested table combinations. * @maxSize 2000 */ requestedTableCombinations?: TableCombinationAvailability[]; /** * Reservation location conflicts that would occur by making a reservation for the specified party size in the specified time slot. * @maxSize 3 */ reservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[]; /** * Experience blocking conflicts that would occur by making a standard reservation when an experience is active. * @maxSize 3 */ experienceBlockingConflicts?: TypeWithLiterals[]; } interface ExperienceOptions { /** * Table combinations and their availability information. * @maxSize 2000 */ tableCombinationAvailabilities?: ExperienceTableCombinationAvailability[]; /** * Requested table combinations. * @maxSize 2000 */ requestedTableCombinations?: ExperienceTableCombinationAvailability[]; /** * Experience availability conflicts that would occur by making a reservation for the specified party size in the specified time slot. * @maxSize 5 */ experienceConflicts?: ExperienceConflictTypeWithLiterals[]; } interface Table { /** @format GUID */ _id?: string; /** * Table conflicts. * @maxSize 1000 */ tableConflicts?: TableConflict[]; } interface TableConflict { /** Conflict type. */ type?: TableConflictTypeWithLiterals; } declare enum TableConflictType { UNKNOWN = "UNKNOWN", TABLE_RESERVED = "TABLE_RESERVED", TABLE_TOO_BIG = "TABLE_TOO_BIG", TABLE_TOO_SMALL = "TABLE_TOO_SMALL", OFFLINE_ONLY = "OFFLINE_ONLY", RESERVED_FOR_EXPERIENCE = "RESERVED_FOR_EXPERIENCE", TABLE_NOT_IN_AREA = "TABLE_NOT_IN_AREA" } /** @enumType */ type TableConflictTypeWithLiterals = TableConflictType | 'UNKNOWN' | 'TABLE_RESERVED' | 'TABLE_TOO_BIG' | 'TABLE_TOO_SMALL' | 'OFFLINE_ONLY' | 'RESERVED_FOR_EXPERIENCE' | 'TABLE_NOT_IN_AREA'; interface TableCombination { /** @format GUID */ tableIds?: string[]; /** @maxSize 2 */ tableCombinationConflicts?: TableCombinationConflict[]; } interface TableCombinationConflict { /** Conflict type. */ type?: TableCombinationConflictTypeWithLiterals; } interface ReservationLocationConflict { /** Reservation location conflict type. */ type?: ReservationLocationConflictTypeWithLiterals; } interface TableReservedConflict { /** * Table id. * @format GUID */ tableId?: string; /** * List of reservation ids. * @format GUID * @maxSize 1000 */ reservationIds?: string[]; } interface TimeSlotAvailability extends TimeSlotAvailabilityOptionsOneOf { /** Response for standard reservation. */ standardOptions?: StandardOptions; /** Response for a reservation that contains experience. */ experienceOptions?: ExperienceOptions; /** Type of availability. */ timeSlotAvailabilityType?: TimeSlotAvailabilityTypeWithLiterals; } /** @oneof */ interface TimeSlotAvailabilityOptionsOneOf { /** Response for standard reservation. */ standardOptions?: StandardOptions; /** Response for a reservation that contains experience. */ experienceOptions?: ExperienceOptions; } interface CheckTimeSlotRequest { /** * ID of the reservation location for which to check the time slot. * @format GUID */ reservationLocationId: string; /** Date and time of the time slot to check. */ date: Date | null; /** * Duration of the time slot in minutes . * * Min: `5` * @min 5 * @max 1000 */ duration: number | null; /** * Party size to check the restaurant's availability for. * @min 1 * @max 10000 */ partySize: number | null; /** * ID of a reservation to ignore during the check. * * Use this when rescheduling a reservation to exclude it in its current state from the availability calculations. * @format GUID */ excludeReservationId?: string | null; } interface CheckTimeSlotResponse { /** * Table combinations and their availability information. * @deprecated * @replacedBy time_slot_availability * @targetRemovalDate 2025-12-05 */ tableCombinationAvailabilities?: TableCombinationAvailability[]; /** * Reservation location conflicts that would occur by making a reservation for the specified party size in the specified time slot. * @deprecated * @replacedBy time_slot_availability * @targetRemovalDate 2025-12-05 */ reservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[]; /** Time slot availability */ timeSlotAvailability?: V1TimeSlotAvailability; } interface V1TimeSlotAvailability extends V1TimeSlotAvailabilityOptionsOneOf { /** Response for standard reservation. */ standardOptions?: TimeSlotAvailabilityStandardOptions; /** Response for a reservation that contains experience. */ experienceOptions?: TimeSlotAvailabilityExperienceOptions; /** Type of availability. */ timeSlotAvailabilityType?: TimeSlotAvailabilityTimeSlotAvailabilityTypeWithLiterals; } /** @oneof */ interface V1TimeSlotAvailabilityOptionsOneOf { /** Response for standard reservation. */ standardOptions?: TimeSlotAvailabilityStandardOptions; /** Response for a reservation that contains experience. */ experienceOptions?: TimeSlotAvailabilityExperienceOptions; } declare enum TimeSlotAvailabilityTimeSlotAvailabilityType { STANDARD = "STANDARD", EXPERIENCE = "EXPERIENCE" } /** @enumType */ type TimeSlotAvailabilityTimeSlotAvailabilityTypeWithLiterals = TimeSlotAvailabilityTimeSlotAvailabilityType | 'STANDARD' | 'EXPERIENCE'; interface TimeSlotAvailabilityStandardOptions { /** * Table combinations and their availability information. * @maxSize 2000 */ tableCombinationAvailabilities?: TableCombinationAvailability[]; /** * Reservation location conflicts that would occur by making a reservation for the specified party size in the specified time slot. * @maxSize 3 */ reservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[]; /** * Experience blocking conflicts that would occur by making a standard reservation when an experience is active. * @maxSize 3 */ experienceBlockingConflicts?: TypeWithLiterals[]; } interface TimeSlotAvailabilityExperienceOptions { /** * Table combinations and their availability information. * @maxSize 2000 */ tableCombinationAvailabilities?: ExperienceTableCombinationAvailability[]; /** * Experience availability conflicts that would occur by making a reservation for the specified party size in the specified time slot. * @maxSize 5 */ experienceConflicts?: ExperienceConflictTypeWithLiterals[]; } interface GetScheduledTimeSlotsRequest { /** * ID of the reservation location for which to retrieve time slots. * @format GUID */ reservationLocationId: string; /** Time range from which to retrieve time slots. */ timeRange: TimeRange; /** * Size of the party that needs to be seated during this time slot. * * Min: `1` * @min 1 * @max 10000 */ partySize: number | null; } interface TimeRange { /** Date and time from which to retrieve time slots in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. */ startDate?: Date | null; /** Date and time to which to retrieve time slots in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. */ endDate?: Date | null; } interface GetScheduledTimeSlotsResponse { /** * A list of time slots and their availability according to the specified party size. * @maxSize 100 */ timeSlots?: TimeSlot[]; } /** * Returns a list of time slots at a specified reservation location on a specified `date`, and their availability for a specified `partySize`. * * Without passing optional parameters, the list will contain a single time slot at the specified `date`. * Use `slotsBefore` and `slotsAfter` to get additional time slots before and after the specified `date`. * * If you do not provide a `duration`, the duration will be calculated automatically based on the reservation location's configuration. * The reservation location's settings used to determine the duration are its `defaultTurnoverTime` and `turnoverTimeRules`. These specify how much time should be allotted for a reservation of a party of a specified size. * * The interval between `startDate`s of time slots in the response is determined by the reservation location's `timeSlotInterval`. This interval is not affected by the `duration` provided. * @param reservationLocationId - ID of the reservation location for which to retrieve time slots. * @param date - Date and time for which to retrieve a time slot in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. * @param partySize - Size of the party that needs to be seated during this time slot. * * Min: `1` * @public * @documentationMaturity preview * @requiredField date * @requiredField partySize * @requiredField reservationLocationId * @param options - Options for retrieving the time slots. * @permissionId TABLE_RESERVATIONS.TIME_SLOT_READ * @applicableIdentity APP * @fqn wix.table_reservations.time_slot.v1.TimeSlotsService.GetTimeSlots */ declare function getTimeSlots(reservationLocationId: string, date: Date, partySize: number, options?: GetTimeSlotsOptions): Promise>; interface GetTimeSlotsOptions { /** * Duration in minutes of the time slot. * * Min: `5` * @min 5 * @max 1000 */ duration?: number | null; /** * The number of time slots to retrieve before the specified `date`. * @max 50 */ slotsBefore?: number | null; /** * The number of time slots to retrieve after the specified `date`. * @max 50 */ slotsAfter?: number | null; } /** * Checks a restaurant's availability to accommodate a reservation for a given party size in a given time slot. * * `checkTimeSlot()` returns availability information for the restaurant's table combinations, and flags any party pacing or seat pacing conflicts that the proposed reservation would cause. * @param reservationLocationId - ID of the reservation location for which to check the time slot. * @public * @documentationMaturity preview * @requiredField options.date * @requiredField options.duration * @requiredField options.partySize * @requiredField reservationLocationId * @permissionId TABLE_RESERVATIONS.TIME_SLOT_CHECK * @applicableIdentity APP * @fqn wix.table_reservations.time_slot.v1.TimeSlotsService.CheckTimeSlot */ declare function checkTimeSlot(reservationLocationId: string, options?: NonNullablePaths): Promise>; interface CheckTimeSlotOptions { /** Date and time of the time slot to check. */ date: Date | null; /** * Duration of the time slot in minutes . * * Min: `5` * @min 5 * @max 1000 */ duration: number | null; /** * Party size to check the restaurant's availability for. * @min 1 * @max 10000 */ partySize: number | null; /** * ID of a reservation to ignore during the check. * * Use this when rescheduling a reservation to exclude it in its current state from the availability calculations. * @format GUID */ excludeReservationId?: string | null; } /** * Returns a list of scheduled time slots at a specified reservation location for a specified time range, and their availability for a specified `partySize`. * * Scheduled time slots are sequential time periods whose start times fall within a restaurant's opening hours. Opening hours are defined in the reservation location's `businessSchedule`. * * [Experiences](https://dev.wix.com/docs/api-reference/business-solutions/restaurants/wix-restaurants-new/reservations/experiences/introduction) have their own business schedules that override that of the reservation location. To get scheduled time slots for an experience, pass the ID of that experience to this method. * * If a restaurant is open during distinct time periods throughout the week, the `startDate` of the first scheduled time slot returned for each period is the same as starting time of that time period. * If a restaurant is always open, the `startDate` of the first returned scheduled time slot for each week is Sunday at `00:00`. * * The duration of scheduled time slots and the interval between their `startDate`s is determined by the reservation location's `timeSlotInterval`. * * For example: * * A restaurant is open every night from `22:30` to `03:55` with a `timeSlotInterval` of 1 hour. * If you called this method with the time range `23:00` to `02:50`, it would return time slots starting at `23:30`, `00:30`, `01:30`, and `02:30`. * @param reservationLocationId - ID of the reservation location for which to retrieve time slots. * @param partySize - Size of the party that needs to be seated during this time slot. * * Min: `1` * @public * @documentationMaturity preview * @requiredField options * @requiredField options.timeRange * @requiredField options.timeRange.endDate * @requiredField options.timeRange.startDate * @requiredField partySize * @requiredField reservationLocationId * @permissionId TABLE_RESERVATIONS.SCHEDULED_TIME_SLOT_READ * @applicableIdentity APP * @fqn wix.table_reservations.time_slot.v1.TimeSlotsService.GetScheduledTimeSlots */ declare function getScheduledTimeSlots(reservationLocationId: string, partySize: number, options: NonNullablePaths): Promise>; interface GetScheduledTimeSlotsOptions { /** Time range from which to retrieve time slots. */ timeRange: TimeRange; } export { type CheckReservationDetailsRequest, type CheckReservationDetailsResponse, type CheckTimeSlotOptions, type CheckTimeSlotRequest, type CheckTimeSlotResponse, ExperienceConflictType, type ExperienceConflictTypeWithLiterals, type ExperienceOptions, type ExperienceTableCombinationAvailability, ExperienceTableCombinationConflictType, type ExperienceTableCombinationConflictTypeWithLiterals, type GetScheduledTimeSlotsOptions, type GetScheduledTimeSlotsRequest, type GetScheduledTimeSlotsResponse, type GetTimeSlotsOptions, type GetTimeSlotsRequest, type GetTimeSlotsResponse, type MaybeTableCombinations, type MaybeTableIds, type ReservationLocationConflict, ReservationLocationConflictType, type ReservationLocationConflictTypeWithLiterals, type StandardOptions, Status, type StatusWithLiterals, type Table, type TableCombination, type TableCombinationAvailability, type TableCombinationConflict, TableCombinationConflictType, type TableCombinationConflictTypeWithLiterals, type TableConflict, TableConflictType, type TableConflictTypeWithLiterals, type TableReservedConflict, type TimeRange, type TimeSlot, type TimeSlotAvailability, type TimeSlotAvailabilityExperienceOptions, type TimeSlotAvailabilityOptionsOneOf, type TimeSlotAvailabilityStandardOptions, TimeSlotAvailabilityTimeSlotAvailabilityType, type TimeSlotAvailabilityTimeSlotAvailabilityTypeWithLiterals, TimeSlotAvailabilityType, type TimeSlotAvailabilityTypeWithLiterals, type TimeSlotTableCombination, Type, type TypeWithLiterals, type V1TimeSlotAvailability, type V1TimeSlotAvailabilityOptionsOneOf, checkTimeSlot, getScheduledTimeSlots, getTimeSlots };