@forgebuild/hotal-ui 0.23.0 → 0.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hotal-ui.js +1728 -1673
- package/dist/index.d.ts +88 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -259,7 +259,12 @@ export interface LiveReservationsFeedElement extends HTMLElement {
|
|
|
259
259
|
* subsequent call passes the `created_at` of the oldest loaded
|
|
260
260
|
* reservation so only the next page is fetched. Return fewer than
|
|
261
261
|
* `limit` items to signal there's nothing older left. */
|
|
262
|
-
fetchReservations?: (params: {
|
|
262
|
+
fetchReservations?: (params: {
|
|
263
|
+
cursor?: string;
|
|
264
|
+
limit: number;
|
|
265
|
+
filterDateFrom?: string;
|
|
266
|
+
filterDateTo?: string;
|
|
267
|
+
}) => Promise<LiveReservation[]>;
|
|
263
268
|
restaurants?: LiveReservationRestaurantRef[];
|
|
264
269
|
maxItems?: number;
|
|
265
270
|
/** Set false to stop fetching further pages once the first one loads --
|
|
@@ -271,6 +276,15 @@ export interface LiveReservationsFeedElement extends HTMLElement {
|
|
|
271
276
|
* as a JS property to get false -- Boolean-typed custom-element
|
|
272
277
|
* attributes are presence-based. Default true. */
|
|
273
278
|
showEmail?: boolean;
|
|
279
|
+
/** Restricts the feed to reservations booked for this date range
|
|
280
|
+
* (inclusive, 'YYYY-MM-DD'), filtering by reservation_date -- not
|
|
281
|
+
* created_at, which stays reserved for pagination. Either bound can be
|
|
282
|
+
* set alone for an open-ended range. Passed through to
|
|
283
|
+
* fetchReservations so the host can scope the query server-side;
|
|
284
|
+
* changing either value triggers a full refetch. Also guards live
|
|
285
|
+
* new-reservation / reservation-status-changed events. */
|
|
286
|
+
filterDateFrom?: string;
|
|
287
|
+
filterDateTo?: string;
|
|
274
288
|
}
|
|
275
289
|
|
|
276
290
|
export interface LiveRoomBooking {
|
|
@@ -356,6 +370,16 @@ export interface LiveSpaBookingsFeedElement extends HTMLElement {
|
|
|
356
370
|
currency?: string;
|
|
357
371
|
}
|
|
358
372
|
|
|
373
|
+
export interface GolfShopItem {
|
|
374
|
+
id?: string;
|
|
375
|
+
item_id?: string;
|
|
376
|
+
item_name: string;
|
|
377
|
+
quantity: number;
|
|
378
|
+
unit_price?: string | number;
|
|
379
|
+
total?: string | number;
|
|
380
|
+
variant?: string | null;
|
|
381
|
+
}
|
|
382
|
+
|
|
359
383
|
export interface GolfBooking {
|
|
360
384
|
id: string;
|
|
361
385
|
first_name: string;
|
|
@@ -367,6 +391,9 @@ export interface GolfBooking {
|
|
|
367
391
|
players: number;
|
|
368
392
|
holes?: number | null;
|
|
369
393
|
price?: string | number | null;
|
|
394
|
+
/** Pro-shop purchases attached to the booking; omit or leave empty for a
|
|
395
|
+
* plain tee-time booking with nothing purchased alongside it. */
|
|
396
|
+
items?: GolfShopItem[];
|
|
370
397
|
status: string;
|
|
371
398
|
created_at: string;
|
|
372
399
|
}
|
|
@@ -397,6 +424,65 @@ export interface LiveGolfBookingsFeedElement extends HTMLElement {
|
|
|
397
424
|
currency?: string;
|
|
398
425
|
}
|
|
399
426
|
|
|
427
|
+
export interface DiningOrderItem {
|
|
428
|
+
id?: string;
|
|
429
|
+
item_id?: string;
|
|
430
|
+
item_name: string;
|
|
431
|
+
quantity: number;
|
|
432
|
+
unit_price?: string | number;
|
|
433
|
+
total?: string | number;
|
|
434
|
+
variant?: string | null;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface DiningOrder {
|
|
438
|
+
id: string;
|
|
439
|
+
restaurant_id: string;
|
|
440
|
+
booking_id?: string | null;
|
|
441
|
+
table_id?: string | null;
|
|
442
|
+
guest_id?: string | null;
|
|
443
|
+
status: string;
|
|
444
|
+
notes?: string | null;
|
|
445
|
+
scheduled_for?: string | null;
|
|
446
|
+
total_price: string | number;
|
|
447
|
+
created_at: string;
|
|
448
|
+
items: DiningOrderItem[];
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export interface DiningOrderBookingRef {
|
|
452
|
+
id: string;
|
|
453
|
+
room_number?: string | null;
|
|
454
|
+
guest_name?: string | null;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export interface LiveDiningOrdersFeedElement extends HTMLElement {
|
|
458
|
+
heading?: string;
|
|
459
|
+
channelName?: string;
|
|
460
|
+
ablyAuthUrl?: string;
|
|
461
|
+
/** Fetches one page of order history, newest-first; Ably only delivers
|
|
462
|
+
* events published after the subscription starts, so history has to
|
|
463
|
+
* come from a REST call. Omit `cursor` for the first page; each
|
|
464
|
+
* subsequent call passes the `created_at` of the oldest loaded order so
|
|
465
|
+
* only the next page is fetched. Return fewer than `limit` items to
|
|
466
|
+
* signal there's nothing older left. */
|
|
467
|
+
fetchOrders?: (params: { cursor?: string; limit: number }) => Promise<DiningOrder[]>;
|
|
468
|
+
/** Resolves booking_id -> room/guest, since the order payload carries
|
|
469
|
+
* only the id. */
|
|
470
|
+
bookings?: DiningOrderBookingRef[];
|
|
471
|
+
maxItems?: number;
|
|
472
|
+
/** Set false to stop fetching further pages once the first one loads --
|
|
473
|
+
* disables the scroll-to-bottom sentinel entirely rather than swapping
|
|
474
|
+
* in a manual button. Default true. */
|
|
475
|
+
autoLoadMore?: boolean;
|
|
476
|
+
emptyLabel?: string;
|
|
477
|
+
/** Symbol prefixed to money amounts ('€', '$', ...); the payload carries
|
|
478
|
+
* no currency of its own. Default empty (bare amount). */
|
|
479
|
+
currency?: string;
|
|
480
|
+
/** Restricts the feed to one booking's orders -- `fetchOrders` should
|
|
481
|
+
* already be scoped server-side; this only filters the live `new-order`
|
|
482
|
+
* events, which otherwise arrive unfiltered off the channel. */
|
|
483
|
+
filterBookingId?: string;
|
|
484
|
+
}
|
|
485
|
+
|
|
400
486
|
export interface VenueCarouselSlide {
|
|
401
487
|
key: string;
|
|
402
488
|
src: string;
|
|
@@ -841,6 +927,7 @@ declare global {
|
|
|
841
927
|
'live-room-bookings-feed': LiveRoomBookingsFeedElement;
|
|
842
928
|
'live-spa-bookings-feed': LiveSpaBookingsFeedElement;
|
|
843
929
|
'live-golf-bookings-feed': LiveGolfBookingsFeedElement;
|
|
930
|
+
'live-dining-orders-feed': LiveDiningOrdersFeedElement;
|
|
844
931
|
'venue-carousel': VenueCarouselElement;
|
|
845
932
|
'room-grid': RoomGridElement;
|
|
846
933
|
'island-map': IslandMapElement;
|