@forgebuild/hotal-ui 0.23.0 → 0.23.1

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/index.d.ts CHANGED
@@ -356,6 +356,16 @@ export interface LiveSpaBookingsFeedElement extends HTMLElement {
356
356
  currency?: string;
357
357
  }
358
358
 
359
+ export interface GolfShopItem {
360
+ id?: string;
361
+ item_id?: string;
362
+ item_name: string;
363
+ quantity: number;
364
+ unit_price?: string | number;
365
+ total?: string | number;
366
+ variant?: string | null;
367
+ }
368
+
359
369
  export interface GolfBooking {
360
370
  id: string;
361
371
  first_name: string;
@@ -367,6 +377,9 @@ export interface GolfBooking {
367
377
  players: number;
368
378
  holes?: number | null;
369
379
  price?: string | number | null;
380
+ /** Pro-shop purchases attached to the booking; omit or leave empty for a
381
+ * plain tee-time booking with nothing purchased alongside it. */
382
+ items?: GolfShopItem[];
370
383
  status: string;
371
384
  created_at: string;
372
385
  }
@@ -397,6 +410,65 @@ export interface LiveGolfBookingsFeedElement extends HTMLElement {
397
410
  currency?: string;
398
411
  }
399
412
 
413
+ export interface DiningOrderItem {
414
+ id?: string;
415
+ item_id?: string;
416
+ item_name: string;
417
+ quantity: number;
418
+ unit_price?: string | number;
419
+ total?: string | number;
420
+ variant?: string | null;
421
+ }
422
+
423
+ export interface DiningOrder {
424
+ id: string;
425
+ restaurant_id: string;
426
+ booking_id?: string | null;
427
+ table_id?: string | null;
428
+ guest_id?: string | null;
429
+ status: string;
430
+ notes?: string | null;
431
+ scheduled_for?: string | null;
432
+ total_price: string | number;
433
+ created_at: string;
434
+ items: DiningOrderItem[];
435
+ }
436
+
437
+ export interface DiningOrderBookingRef {
438
+ id: string;
439
+ room_number?: string | null;
440
+ guest_name?: string | null;
441
+ }
442
+
443
+ export interface LiveDiningOrdersFeedElement extends HTMLElement {
444
+ heading?: string;
445
+ channelName?: string;
446
+ ablyAuthUrl?: string;
447
+ /** Fetches one page of order history, newest-first; Ably only delivers
448
+ * events published after the subscription starts, so history has to
449
+ * come from a REST call. Omit `cursor` for the first page; each
450
+ * subsequent call passes the `created_at` of the oldest loaded order so
451
+ * only the next page is fetched. Return fewer than `limit` items to
452
+ * signal there's nothing older left. */
453
+ fetchOrders?: (params: { cursor?: string; limit: number }) => Promise<DiningOrder[]>;
454
+ /** Resolves booking_id -> room/guest, since the order payload carries
455
+ * only the id. */
456
+ bookings?: DiningOrderBookingRef[];
457
+ maxItems?: number;
458
+ /** Set false to stop fetching further pages once the first one loads --
459
+ * disables the scroll-to-bottom sentinel entirely rather than swapping
460
+ * in a manual button. Default true. */
461
+ autoLoadMore?: boolean;
462
+ emptyLabel?: string;
463
+ /** Symbol prefixed to money amounts ('€', '$', ...); the payload carries
464
+ * no currency of its own. Default empty (bare amount). */
465
+ currency?: string;
466
+ /** Restricts the feed to one booking's orders -- `fetchOrders` should
467
+ * already be scoped server-side; this only filters the live `new-order`
468
+ * events, which otherwise arrive unfiltered off the channel. */
469
+ filterBookingId?: string;
470
+ }
471
+
400
472
  export interface VenueCarouselSlide {
401
473
  key: string;
402
474
  src: string;
@@ -841,6 +913,7 @@ declare global {
841
913
  'live-room-bookings-feed': LiveRoomBookingsFeedElement;
842
914
  'live-spa-bookings-feed': LiveSpaBookingsFeedElement;
843
915
  'live-golf-bookings-feed': LiveGolfBookingsFeedElement;
916
+ 'live-dining-orders-feed': LiveDiningOrdersFeedElement;
844
917
  'venue-carousel': VenueCarouselElement;
845
918
  'room-grid': RoomGridElement;
846
919
  'island-map': IslandMapElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgebuild/hotal-ui",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "Reusable Svelte UI components for booking and reservation experiences.",
5
5
  "type": "module",
6
6
  "license": "MIT",