@forgebuild/hotal-ui 0.23.141 → 0.23.156
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 +9660 -9489
- package/dist/index.d.ts +46 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -387,6 +387,11 @@ export interface SpaTreatment {
|
|
|
387
387
|
price: number;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
+
export interface SpaTherapist {
|
|
391
|
+
id: string;
|
|
392
|
+
name: string;
|
|
393
|
+
}
|
|
394
|
+
|
|
390
395
|
export interface SpaAvailabilityDay {
|
|
391
396
|
date: string;
|
|
392
397
|
slots: { time: string }[];
|
|
@@ -396,6 +401,9 @@ export interface SpaBookingPayload {
|
|
|
396
401
|
treatmentId: string;
|
|
397
402
|
date: string;
|
|
398
403
|
time: string;
|
|
404
|
+
/** The Therapist filter's selection at submit time, if any -- omitted on
|
|
405
|
+
* "Any therapist" or when no therapist list was ever provided. */
|
|
406
|
+
therapistId?: string;
|
|
399
407
|
name: string;
|
|
400
408
|
email: string;
|
|
401
409
|
phone: string;
|
|
@@ -415,6 +423,9 @@ export interface SpaBookingWidgetStrings {
|
|
|
415
423
|
eveningLabel: string;
|
|
416
424
|
pickDayHint: string;
|
|
417
425
|
noSlotsForDay: string;
|
|
426
|
+
noChangeHint: string;
|
|
427
|
+
therapistFilterLabel: string;
|
|
428
|
+
anyTherapistLabel: string;
|
|
418
429
|
staffRowLabel: string;
|
|
419
430
|
totalLabel: string;
|
|
420
431
|
continueLabel: string;
|
|
@@ -431,6 +442,7 @@ export interface SpaBookingWidgetStrings {
|
|
|
431
442
|
notesPlaceholder: string;
|
|
432
443
|
confirmingLabel: string;
|
|
433
444
|
confirmLabel: string;
|
|
445
|
+
confirmRescheduleLabel: string;
|
|
434
446
|
notWiredError: string;
|
|
435
447
|
genericSubmitError: string;
|
|
436
448
|
successMessage: string;
|
|
@@ -447,6 +459,12 @@ export interface SpaBookingWidgetElement extends HTMLElement {
|
|
|
447
459
|
* a free service (e.g. a consultation call) where showing "£0.00"
|
|
448
460
|
* throughout would read oddly. */
|
|
449
461
|
hidePrice?: boolean;
|
|
462
|
+
/** Skips the "Details" (name/email/phone/notes) step -- for editing an
|
|
463
|
+
* existing booking (a reschedule) rather than collecting a new guest's
|
|
464
|
+
* contact info. "Continue" on the datetime step submits directly using
|
|
465
|
+
* initialName/initialEmail/initialPhone (if set) and empty notes; the
|
|
466
|
+
* "← Change service" link is hidden. */
|
|
467
|
+
skipDetailsStep?: boolean;
|
|
450
468
|
/** JS `Date#getDay()` values (0 = Sunday) to gray out on the calendar,
|
|
451
469
|
* e.g. `[2]` for a Tuesday closure. Visual hint only -- fetchAvailability
|
|
452
470
|
* is the real source of truth for what's bookable. */
|
|
@@ -458,6 +476,13 @@ export interface SpaBookingWidgetElement extends HTMLElement {
|
|
|
458
476
|
* treatment's name matches this, once treatments have loaded. Re-fires on
|
|
459
477
|
* every change, even mid-flow on a different service or step. */
|
|
460
478
|
initialTreatmentTitle?: string;
|
|
479
|
+
/** The booking's *current* date (YYYY-MM-DD) and time (HH:MM), for
|
|
480
|
+
* skipDetailsStep/reschedule mode only -- disables the confirm button
|
|
481
|
+
* when the visitor lands back on the exact slot this booking already
|
|
482
|
+
* has, instead of letting them submit a no-op change. No effect
|
|
483
|
+
* without skipDetailsStep. */
|
|
484
|
+
initialDate?: string;
|
|
485
|
+
initialTime?: string;
|
|
461
486
|
/** Pre-fills the matching contact-details field once a (truthy) value is
|
|
462
487
|
* available, but only while that field is still empty -- never overwrites
|
|
463
488
|
* something the visitor already typed. Applied once per field, no re-fire
|
|
@@ -467,9 +492,14 @@ export interface SpaBookingWidgetElement extends HTMLElement {
|
|
|
467
492
|
initialPhone?: string;
|
|
468
493
|
strings?: Partial<SpaBookingWidgetStrings>;
|
|
469
494
|
fetchTreatments?: () => Promise<SpaTreatment[]>;
|
|
495
|
+
/** Optional therapist list for the datetime step's "Therapist" filter.
|
|
496
|
+
* Omit to hide the filter entirely. */
|
|
497
|
+
fetchTherapists?: () => Promise<SpaTherapist[]>;
|
|
470
498
|
/** Host-provided loader for one calendar month at a time:
|
|
471
|
-
* (fromISO, toISO, treatmentId) => per-day bookable start
|
|
472
|
-
|
|
499
|
+
* (fromISO, toISO, treatmentId, therapistId) => per-day bookable start
|
|
500
|
+
* times. therapistId is the "Therapist" filter's current selection --
|
|
501
|
+
* undefined on "Any therapist" or when fetchTherapists was never provided. */
|
|
502
|
+
fetchAvailability?: (fromISO: string, toISO: string, treatmentId: string, therapistId?: string) => Promise<SpaAvailabilityDay[]>;
|
|
473
503
|
submitBooking?: (payload: SpaBookingPayload) => Promise<SpaBookingResult>;
|
|
474
504
|
}
|
|
475
505
|
|
|
@@ -635,6 +665,7 @@ export interface LiveSpaBooking {
|
|
|
635
665
|
duration_minutes: number;
|
|
636
666
|
price?: string | number | null;
|
|
637
667
|
status: string;
|
|
668
|
+
payment_status?: string | null;
|
|
638
669
|
created_at: string;
|
|
639
670
|
}
|
|
640
671
|
|
|
@@ -662,6 +693,19 @@ export interface LiveSpaBookingsFeedElement extends HTMLElement {
|
|
|
662
693
|
/** Symbol prefixed to price ('€', '$', ...); the payload carries no
|
|
663
694
|
* currency of its own. Default empty (bare amount). */
|
|
664
695
|
currency?: string;
|
|
696
|
+
/** Forwarded straight through to the <spa-booking-widget> rendered in
|
|
697
|
+
* the "change booking" sheet -- see SpaBookingWidgetElement's own
|
|
698
|
+
* fetchTreatments/fetchTherapists/fetchAvailability for what each
|
|
699
|
+
* receives/returns. This component never calls the API itself, same
|
|
700
|
+
* reasoning as fetchBookings above. */
|
|
701
|
+
fetchTreatments?: () => Promise<SpaTreatment[]>;
|
|
702
|
+
fetchTherapists?: () => Promise<SpaTherapist[]>;
|
|
703
|
+
fetchAvailability?: (fromISO: string, toISO: string, treatmentId: string, therapistId?: string) => Promise<SpaAvailabilityDay[]>;
|
|
704
|
+
/** Unlike the widget's own submitBooking (which books a *new*
|
|
705
|
+
* appointment), this one is rescheduling an *existing* one -- the
|
|
706
|
+
* payload is SpaBookingPayload plus appointmentId, which this
|
|
707
|
+
* component injects itself (the booking being edited's id). */
|
|
708
|
+
submitBooking?: (payload: SpaBookingPayload & { appointmentId: string }) => Promise<SpaBookingResult>;
|
|
665
709
|
}
|
|
666
710
|
|
|
667
711
|
export interface GolfShopItem {
|