@forgebuild/hotal-ui 0.8.2 → 0.10.0
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 +2785 -2460
- package/dist/index.d.ts +39 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,17 +31,25 @@ export interface BookingDetails {
|
|
|
31
31
|
contactEmail?: string;
|
|
32
32
|
contactPhone?: string;
|
|
33
33
|
notes?: string;
|
|
34
|
+
customFieldValues?: Record<string, string>;
|
|
34
35
|
stripePaymentIntentId: string;
|
|
35
36
|
clerkUserId?: string;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export type BookResult = { ok: true } | { ok: false; status: number; message: string };
|
|
39
40
|
|
|
41
|
+
export interface BookingFlowCustomField {
|
|
42
|
+
key: string;
|
|
43
|
+
label: string;
|
|
44
|
+
options: string[];
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
export interface BookingFlowElement extends HTMLElement {
|
|
41
48
|
date?: string;
|
|
42
49
|
guests?: number;
|
|
43
50
|
preferredTime?: string;
|
|
44
51
|
closedWeekdays?: number[];
|
|
52
|
+
customFields?: BookingFlowCustomField[];
|
|
45
53
|
fetchAvailableDates?: (partySize: number) => Promise<string[]>;
|
|
46
54
|
searchSlots?: (date: string, guests: number) => Promise<BookingSlot[]>;
|
|
47
55
|
createPaymentIntent?: (date: string, guests: number) => Promise<PaymentIntentResult>;
|
|
@@ -152,6 +160,36 @@ export interface ReservationCancelElement extends HTMLElement {
|
|
|
152
160
|
confirmCancel?: (payload: { token: string }) => Promise<CancelActionResult>;
|
|
153
161
|
}
|
|
154
162
|
|
|
163
|
+
export interface LiveReservation {
|
|
164
|
+
id: string;
|
|
165
|
+
restaurant_id?: string | null;
|
|
166
|
+
reservation_date: string;
|
|
167
|
+
start_time: string;
|
|
168
|
+
party_size: number;
|
|
169
|
+
status: string;
|
|
170
|
+
contact_name: string;
|
|
171
|
+
contact_email?: string | null;
|
|
172
|
+
contact_phone?: string | null;
|
|
173
|
+
table_number?: string | null;
|
|
174
|
+
location?: string | null;
|
|
175
|
+
created_at: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface LiveReservationRestaurantRef {
|
|
179
|
+
id: string;
|
|
180
|
+
name: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface LiveReservationsFeedElement extends HTMLElement {
|
|
184
|
+
heading?: string;
|
|
185
|
+
channelName?: string;
|
|
186
|
+
ablyAuthUrl?: string;
|
|
187
|
+
fetchReservations?: () => Promise<LiveReservation[]>;
|
|
188
|
+
restaurants?: LiveReservationRestaurantRef[];
|
|
189
|
+
maxItems?: number;
|
|
190
|
+
emptyLabel?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
155
193
|
declare global {
|
|
156
194
|
interface HTMLElementTagNameMap {
|
|
157
195
|
'reservation-bar': ReservationBarElement;
|
|
@@ -160,6 +198,7 @@ declare global {
|
|
|
160
198
|
'event-inquiries-feed': EventInquiriesFeedElement;
|
|
161
199
|
'event-contact-form': EventContactFormElement;
|
|
162
200
|
'reservation-cancel': ReservationCancelElement;
|
|
201
|
+
'live-reservations-feed': LiveReservationsFeedElement;
|
|
163
202
|
}
|
|
164
203
|
|
|
165
204
|
interface HTMLElementEventMap {
|