@forgebuild/hotal-ui 0.7.5 → 0.8.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
@@ -134,6 +134,23 @@ export interface EventContactFormElement extends HTMLElement {
134
134
  submitInquiry?: (payload: EventInquiryPayload) => Promise<SubmitInquiryResult>;
135
135
  }
136
136
 
137
+ export interface ReservationCancelPayload {
138
+ reservationId: string;
139
+ restaurantSlug?: string;
140
+ }
141
+ export type CancelActionResult = { ok: true } | { ok: false; status?: number };
142
+
143
+ export interface ReservationCancelElement extends HTMLElement {
144
+ mode?: 'request' | 'confirm';
145
+ reservationId?: string;
146
+ restaurantSlug?: string;
147
+ token?: string;
148
+ expiresAt?: number;
149
+ initiallyExpired?: boolean;
150
+ requestCancel?: (payload: ReservationCancelPayload) => Promise<CancelActionResult>;
151
+ confirmCancel?: (payload: { token: string }) => Promise<CancelActionResult>;
152
+ }
153
+
137
154
  declare global {
138
155
  interface HTMLElementTagNameMap {
139
156
  'reservation-bar': ReservationBarElement;
@@ -141,11 +158,14 @@ declare global {
141
158
  'menu-section': MenuSectionElement;
142
159
  'event-inquiries-feed': EventInquiriesFeedElement;
143
160
  'event-contact-form': EventContactFormElement;
161
+ 'reservation-cancel': ReservationCancelElement;
144
162
  }
145
163
 
146
164
  interface HTMLElementEventMap {
147
165
  reservationchange: CustomEvent<{ date: string; guests: number; time: string }>;
148
166
  'booking-confirmed': CustomEvent<{ date: string; time: string; guests: number }>;
149
167
  'inquiry-submitted': CustomEvent<EventInquiryPayload>;
168
+ 'cancel-requested': CustomEvent<ReservationCancelPayload>;
169
+ 'cancel-confirmed': CustomEvent<{ token: string }>;
150
170
  }
151
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgebuild/hotal-ui",
3
- "version": "0.7.5",
3
+ "version": "0.8.1",
4
4
  "description": "Reusable Svelte UI components for booking and reservation experiences.",
5
5
  "type": "module",
6
6
  "license": "MIT",