@suiteop/storefront 0.1.0 → 0.2.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/README.md +74 -0
  3. package/dist/astro-content-model.cjs +17 -0
  4. package/dist/astro-content-model.d.cts +4 -0
  5. package/dist/astro-content-model.d.ts +4 -0
  6. package/dist/astro-content-model.js +10 -0
  7. package/dist/astro.cjs +3 -1
  8. package/dist/astro.d.cts +38 -17
  9. package/dist/astro.d.ts +38 -17
  10. package/dist/astro.js +2 -2
  11. package/dist/{availability-CYvqeJ6X.d.cts → availability-CnzmxuV3.d.cts} +2 -2
  12. package/dist/{availability-CYvqeJ6X.d.ts → availability-CnzmxuV3.d.ts} +2 -2
  13. package/dist/checkout.cjs +3 -3
  14. package/dist/checkout.js +2 -2
  15. package/dist/chunk-2U6L33AT.cjs +19 -0
  16. package/dist/chunk-4GZBXKBU.cjs +18 -0
  17. package/dist/chunk-GJSCEBSU.js +5 -0
  18. package/dist/chunk-HLGSWF4I.js +9 -0
  19. package/dist/{chunk-ZYDFRRFU.js → chunk-HMLBMNGA.js} +1 -1
  20. package/dist/chunk-KKJCPKPY.js +8 -0
  21. package/dist/chunk-PYVUDQSQ.js +3 -0
  22. package/dist/chunk-USOISC2R.cjs +17 -0
  23. package/dist/{chunk-TBADVD2J.cjs → chunk-VV2UNVQ2.cjs} +2 -2
  24. package/dist/chunk-ZHFZ6II2.cjs +16 -0
  25. package/dist/chunk-ZI2PG7LS.js +6 -0
  26. package/dist/chunk-ZLAOY6IF.cjs +9 -0
  27. package/dist/{errors-DPtiZNoK.d.ts → client-DER7y1WE.d.cts} +111 -151
  28. package/dist/{errors-B3sinzJq.d.cts → client-goQnVoLP.d.ts} +111 -151
  29. package/dist/components.cjs +1 -1
  30. package/dist/components.d.cts +1 -1
  31. package/dist/components.d.ts +1 -1
  32. package/dist/components.js +1 -1
  33. package/dist/config.cjs +6 -2
  34. package/dist/config.d.cts +33 -1
  35. package/dist/config.d.ts +33 -1
  36. package/dist/config.js +3 -2
  37. package/dist/content.cjs +37 -0
  38. package/dist/content.d.cts +254 -0
  39. package/dist/content.d.ts +254 -0
  40. package/dist/content.js +4 -0
  41. package/dist/errors-B2eCo5Cz.d.cts +151 -0
  42. package/dist/errors-D-dULpp1.d.ts +151 -0
  43. package/dist/index.cjs +21 -20
  44. package/dist/index.d.cts +11 -3
  45. package/dist/index.d.ts +11 -3
  46. package/dist/index.js +4 -3
  47. package/dist/react.cjs +6 -5
  48. package/dist/react.d.cts +3 -2
  49. package/dist/react.d.ts +3 -2
  50. package/dist/react.js +5 -4
  51. package/package.json +22 -6
  52. package/dist/chunk-AI6STRZP.cjs +0 -18
  53. package/dist/chunk-AIQUVZEI.cjs +0 -8
  54. package/dist/chunk-MJA3R7NP.js +0 -8
  55. package/dist/chunk-NNZZWGM2.js +0 -6
  56. package/dist/chunk-SK5TD73J.js +0 -3
  57. package/dist/chunk-T2GQ3DOZ.cjs +0 -17
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { d as StorefrontStay, S as StorefrontAvailability, c as StorefrontCalendarQuery, a as StorefrontCalendar } from './availability-CYvqeJ6X.js';
2
+ import { d as StorefrontStay, S as StorefrontAvailability, c as StorefrontCalendarQuery, a as StorefrontCalendar } from './availability-CnzmxuV3.cjs';
3
3
 
4
4
  declare const storefrontGuestInputSchema: z.ZodObject<{
5
5
  firstName: z.ZodString;
@@ -27,13 +27,13 @@ type ConfirmCheckoutSessionInput = z.infer<typeof confirmCheckoutSessionInputSch
27
27
  declare const bookingResultSchema: z.ZodObject<{
28
28
  bookingRequestId: z.ZodUUID;
29
29
  confirmationToken: z.ZodString;
30
- status: z.ZodType<(string & {}) | "inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled", unknown, z.core.$ZodTypeInternals<(string & {}) | "inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled", unknown>>;
30
+ status: z.ZodType<"inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled" | (string & {}), unknown, z.core.$ZodTypeInternals<"inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled" | (string & {}), unknown>>;
31
31
  confirmationCode: z.ZodNullable<z.ZodString>;
32
32
  }, z.core.$strip>;
33
33
  type BookingResult = z.infer<typeof bookingResultSchema>;
34
34
  declare const storefrontBookingSchema: z.ZodObject<{
35
35
  id: z.ZodUUID;
36
- status: z.ZodType<(string & {}) | "inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled", unknown, z.core.$ZodTypeInternals<(string & {}) | "inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled", unknown>>;
36
+ status: z.ZodType<"inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled" | (string & {}), unknown, z.core.$ZodTypeInternals<"inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled" | (string & {}), unknown>>;
37
37
  propertyId: z.ZodNullable<z.ZodUUID>;
38
38
  checkIn: z.ZodNullable<z.ZodISODate>;
39
39
  checkOut: z.ZodNullable<z.ZodISODate>;
@@ -42,6 +42,11 @@ declare const storefrontBookingSchema: z.ZodObject<{
42
42
  totalMinor: z.ZodNullable<z.ZodNumber>;
43
43
  currency: z.ZodNullable<z.ZodString>;
44
44
  confirmationCode: z.ZodNullable<z.ZodString>;
45
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
+ title: z.ZodString;
47
+ quantity: z.ZodNumber;
48
+ totalMinor: z.ZodNumber;
49
+ }, z.core.$strip>>>;
45
50
  }, z.core.$strip>;
46
51
  type StorefrontBooking = z.infer<typeof storefrontBookingSchema>;
47
52
 
@@ -53,6 +58,7 @@ declare const storefrontSiteSchema: z.ZodObject<{
53
58
  enableWebChat: z.ZodBoolean;
54
59
  mapEmbedHost: z.ZodNullable<z.ZodString>;
55
60
  countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ bookingsOpen: z.ZodOptional<z.ZodBoolean>;
56
62
  }, z.core.$strip>;
57
63
  type StorefrontSite = z.infer<typeof storefrontSiteSchema>;
58
64
  declare const storefrontListingSummarySchema: z.ZodObject<{
@@ -109,6 +115,13 @@ declare const storefrontListingsQuerySchema: z.ZodObject<{
109
115
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
110
116
  }, z.core.$strip>;
111
117
  type StorefrontListingsQuery = z.infer<typeof storefrontListingsQuerySchema>;
118
+ declare const storefrontImageSchema: z.ZodObject<{
119
+ url: z.ZodString;
120
+ alt: z.ZodNullable<z.ZodString>;
121
+ width: z.ZodNullable<z.ZodNumber>;
122
+ height: z.ZodNullable<z.ZodNumber>;
123
+ }, z.core.$strip>;
124
+ type StorefrontImage = z.infer<typeof storefrontImageSchema>;
112
125
  declare const storefrontBuildingSchema: z.ZodObject<{
113
126
  id: z.ZodUUID;
114
127
  locationId: z.ZodNullable<z.ZodUUID>;
@@ -119,6 +132,18 @@ declare const storefrontBuildingSchema: z.ZodObject<{
119
132
  latitude: z.ZodNullable<z.ZodNumber>;
120
133
  longitude: z.ZodNullable<z.ZodNumber>;
121
134
  address: z.ZodUnknown;
135
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
+ imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ images: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
139
+ url: z.ZodString;
140
+ alt: z.ZodNullable<z.ZodString>;
141
+ width: z.ZodNullable<z.ZodNumber>;
142
+ height: z.ZodNullable<z.ZodNumber>;
143
+ }, z.core.$strip>>>>;
144
+ sortOrder: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
145
+ listingCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
146
+ fields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
122
147
  }, z.core.$strip>;
123
148
  type StorefrontBuilding = z.infer<typeof storefrontBuildingSchema>;
124
149
  declare const storefrontLocationSchema: z.ZodObject<{
@@ -132,6 +157,17 @@ declare const storefrontLocationSchema: z.ZodObject<{
132
157
  longitude: z.ZodNullable<z.ZodNumber>;
133
158
  address: z.ZodUnknown;
134
159
  sortOrder: z.ZodNumber;
160
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
161
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ images: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
164
+ url: z.ZodString;
165
+ alt: z.ZodNullable<z.ZodString>;
166
+ width: z.ZodNullable<z.ZodNumber>;
167
+ height: z.ZodNullable<z.ZodNumber>;
168
+ }, z.core.$strip>>>>;
169
+ buildingCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
170
+ fields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
135
171
  }, z.core.$strip>;
136
172
  type StorefrontLocation = z.infer<typeof storefrontLocationSchema>;
137
173
  declare const storefrontReviewSchema: z.ZodObject<{
@@ -242,6 +278,10 @@ declare const createCheckoutSessionInputSchema: z.ZodObject<{
242
278
  region: "restricted" | "other";
243
279
  decidedAt: string | null;
244
280
  };
281
+ experiment?: {
282
+ id: string;
283
+ variant: "a" | "b";
284
+ } | undefined;
245
285
  } | null, {
246
286
  first: {
247
287
  ts: string;
@@ -288,12 +328,24 @@ declare const createCheckoutSessionInputSchema: z.ZodObject<{
288
328
  region: "restricted" | "other";
289
329
  decidedAt: string | null;
290
330
  };
331
+ experiment?: {
332
+ id: string;
333
+ variant: "a" | "b";
334
+ } | undefined;
291
335
  } | null>>;
336
+ extras: z.ZodOptional<z.ZodObject<{
337
+ customFields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
338
+ upsells: z.ZodDefault<z.ZodArray<z.ZodObject<{
339
+ portalUpsellId: z.ZodUUID;
340
+ quantity: z.ZodNumber;
341
+ }, z.core.$strip>>>;
342
+ }, z.core.$strip>>;
343
+ hostSessionId: z.ZodOptional<z.ZodUUID>;
292
344
  }, z.core.$strip>;
293
345
  type CreateCheckoutSessionInput = z.infer<typeof createCheckoutSessionInputSchema>;
294
346
  declare const checkoutSessionSchema: z.ZodObject<{
295
347
  id: z.ZodUUID;
296
- status: z.ZodType<(string & {}) | "inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled", unknown, z.core.$ZodTypeInternals<(string & {}) | "inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled", unknown>>;
348
+ status: z.ZodType<"inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled" | (string & {}), unknown, z.core.$ZodTypeInternals<"inquiry" | "processing" | "confirmed" | "failed" | "expired" | "pending_pms_sync" | "pending_payment" | "authorized" | "reserved" | "cancelled" | (string & {}), unknown>>;
297
349
  quote: z.ZodObject<{
298
350
  listingId: z.ZodUUID;
299
351
  checkIn: z.ZodISODate;
@@ -339,81 +391,50 @@ declare const checkoutSessionSchema: z.ZodObject<{
339
391
  provider: z.ZodString;
340
392
  }, z.core.$loose>]>>;
341
393
  chargedBy: z.ZodOptional<z.ZodLiteral<"host">>;
394
+ guestSaved: z.ZodOptional<z.ZodLiteral<true>>;
395
+ extras: z.ZodOptional<z.ZodObject<{
396
+ lines: z.ZodArray<z.ZodObject<{
397
+ portalUpsellId: z.ZodNullable<z.ZodUUID>;
398
+ title: z.ZodString;
399
+ quantity: z.ZodNumber;
400
+ totalMinor: z.ZodNumber;
401
+ }, z.core.$strip>>;
402
+ extrasTotalMinor: z.ZodNumber;
403
+ heldTotalMinor: z.ZodNumber;
404
+ }, z.core.$strip>>;
405
+ extrasSessionId: z.ZodOptional<z.ZodUUID>;
342
406
  expiresAt: z.ZodISODateTime;
343
407
  }, z.core.$strip>;
344
408
  type CheckoutSession = z.infer<typeof checkoutSessionSchema>;
345
409
 
346
- declare const storefrontClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
347
- name: z.ZodLiteral<"page_view">;
348
- eventId: z.ZodUUID;
349
- ts: z.ZodNumber;
350
- path: z.ZodString;
351
- referrerHost: z.ZodNullable<z.ZodString>;
352
- }, z.core.$strip>, z.ZodObject<{
353
- name: z.ZodLiteral<"view_search_results">;
354
- checkIn: z.ZodOptional<z.ZodISODate>;
355
- checkOut: z.ZodOptional<z.ZodISODate>;
356
- guests: z.ZodOptional<z.ZodNumber>;
357
- locationId: z.ZodOptional<z.ZodUUID>;
358
- eventId: z.ZodUUID;
359
- ts: z.ZodNumber;
360
- path: z.ZodString;
361
- referrerHost: z.ZodNullable<z.ZodString>;
362
- }, z.core.$strip>, z.ZodObject<{
363
- name: z.ZodLiteral<"view_item_list">;
364
- listName: z.ZodString;
365
- itemCount: z.ZodNumber;
366
- eventId: z.ZodUUID;
367
- ts: z.ZodNumber;
368
- path: z.ZodString;
369
- referrerHost: z.ZodNullable<z.ZodString>;
370
- }, z.core.$strip>, z.ZodObject<{
371
- name: z.ZodLiteral<"view_item">;
372
- listingId: z.ZodUUID;
373
- eventId: z.ZodUUID;
374
- ts: z.ZodNumber;
375
- path: z.ZodString;
376
- referrerHost: z.ZodNullable<z.ZodString>;
377
- }, z.core.$strip>, z.ZodObject<{
378
- name: z.ZodLiteral<"view_quote">;
379
- listingId: z.ZodUUID;
380
- valueMinor: z.ZodNumber;
381
- currency: z.ZodString;
382
- nights: z.ZodNumber;
383
- eventId: z.ZodUUID;
384
- ts: z.ZodNumber;
385
- path: z.ZodString;
386
- referrerHost: z.ZodNullable<z.ZodString>;
387
- }, z.core.$strip>, z.ZodObject<{
388
- name: z.ZodLiteral<"begin_checkout">;
389
- checkoutSessionId: z.ZodUUID;
390
- eventId: z.ZodUUID;
391
- ts: z.ZodNumber;
392
- path: z.ZodString;
393
- referrerHost: z.ZodNullable<z.ZodString>;
394
- }, z.core.$strip>, z.ZodObject<{
395
- name: z.ZodLiteral<"add_payment_info">;
396
- checkoutSessionId: z.ZodUUID;
397
- eventId: z.ZodUUID;
398
- ts: z.ZodNumber;
399
- path: z.ZodString;
400
- referrerHost: z.ZodNullable<z.ZodString>;
401
- }, z.core.$strip>, z.ZodObject<{
402
- name: z.ZodLiteral<"generate_lead">;
403
- formId: z.ZodOptional<z.ZodString>;
404
- eventId: z.ZodUUID;
405
- ts: z.ZodNumber;
406
- path: z.ZodString;
407
- referrerHost: z.ZodNullable<z.ZodString>;
408
- }, z.core.$strip>, z.ZodObject<{
409
- name: z.ZodLiteral<"sign_up">;
410
- method: z.ZodLiteral<"newsletter">;
411
- eventId: z.ZodUUID;
412
- ts: z.ZodNumber;
413
- path: z.ZodString;
414
- referrerHost: z.ZodNullable<z.ZodString>;
415
- }, z.core.$strip>], "name">;
416
- type StorefrontClientEvent = z.infer<typeof storefrontClientEventSchema>;
410
+ declare const storefrontContentRefSchema: z.ZodObject<{
411
+ kind: z.ZodString;
412
+ id: z.ZodUUID;
413
+ slug: z.ZodNullable<z.ZodString>;
414
+ }, z.core.$strip>;
415
+ type StorefrontContentRef = z.infer<typeof storefrontContentRefSchema>;
416
+ declare const storefrontContentItemSchema: z.ZodObject<{
417
+ id: z.ZodUUID;
418
+ type: z.ZodString;
419
+ slug: z.ZodNullable<z.ZodString>;
420
+ publishedAt: z.ZodNullable<z.ZodString>;
421
+ updatedAt: z.ZodString;
422
+ sortOrder: z.ZodNumber;
423
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
424
+ }, z.core.$strip>;
425
+ type StorefrontContentItem = z.infer<typeof storefrontContentItemSchema>;
426
+ declare const storefrontContentModelSchema: z.ZodObject<{
427
+ version: z.ZodNumber;
428
+ types: z.ZodArray<z.ZodObject<{
429
+ key: z.ZodString;
430
+ kind: z.ZodString;
431
+ fields: z.ZodArray<z.ZodObject<{
432
+ key: z.ZodString;
433
+ type: z.ZodString;
434
+ }, z.core.$catchall<z.ZodUnknown>>>;
435
+ }, z.core.$catchall<z.ZodUnknown>>>;
436
+ }, z.core.$strip>;
437
+ type StorefrontContentModel = z.infer<typeof storefrontContentModelSchema>;
417
438
 
418
439
  declare const storefrontRatePlanQuoteSchema: z.ZodObject<{
419
440
  ratePlanId: z.ZodString;
@@ -457,28 +478,6 @@ declare const storefrontQuoteSchema: z.ZodObject<{
457
478
  }, z.core.$strip>;
458
479
  type StorefrontQuote = z.infer<typeof storefrontQuoteSchema>;
459
480
 
460
- type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
461
- type TrackEvent = DistributiveOmit<StorefrontClientEvent, 'eventId' | 'ts' | 'path' | 'referrerHost'>;
462
- type AnalyticsReporter = (err: unknown) => void;
463
- interface AnalyticsOptions {
464
- publishableKey: string;
465
- report?: AnalyticsReporter;
466
- }
467
- interface StorefrontAnalytics {
468
- track(event: TrackEvent): void;
469
- pageView(): void;
470
- flush(opts?: {
471
- beacon?: boolean;
472
- }): void;
473
- dispose(): void;
474
- }
475
- declare function trackPurchasePixel(booking: Pick<BookingResult, 'bookingRequestId'> & {
476
- totalMinor?: number | null;
477
- currency?: string | null;
478
- }): void;
479
- declare function createAnalytics(opts: AnalyticsOptions): StorefrontAnalytics;
480
- declare function analyticsFor(publishableKey: string): StorefrontAnalytics;
481
-
482
481
  declare const STOREFRONT_API_PATH = "/api/storefront/v1";
483
482
  interface StorefrontClientOptions {
484
483
  publishableKey: string;
@@ -493,6 +492,10 @@ interface RequestOptions {
493
492
  interface CreateCheckoutSessionOptions extends RequestOptions {
494
493
  idempotencyKey?: string;
495
494
  }
495
+ interface ContentListQuery {
496
+ limit?: number;
497
+ offset?: number;
498
+ }
496
499
  interface Page<T> {
497
500
  items: T[];
498
501
  total: number;
@@ -520,6 +523,16 @@ interface StorefrontClient {
520
523
  locations: {
521
524
  list(opts?: RequestOptions): Promise<StorefrontLocation[]>;
522
525
  };
526
+ contentModel: {
527
+ get(opts?: RequestOptions): Promise<StorefrontContentModel>;
528
+ };
529
+ collections: {
530
+ list(key: string, query?: ContentListQuery, opts?: RequestOptions): Promise<Page<StorefrontContentItem>>;
531
+ get(key: string, slugOrId: string, opts?: RequestOptions): Promise<StorefrontContentItem | null>;
532
+ };
533
+ sections: {
534
+ get(key: string, opts?: RequestOptions): Promise<StorefrontContentItem>;
535
+ };
523
536
  amenities: {
524
537
  list(opts?: RequestOptions): Promise<string[]>;
525
538
  };
@@ -550,57 +563,4 @@ interface StorefrontClient {
550
563
  }
551
564
  declare function createStorefrontClient(options: StorefrontClientOptions): StorefrontClient;
552
565
 
553
- declare const STOREFRONT_ERROR_CODES: readonly ["wrong_region", "origin_not_allowed", "origin_required", "site_archived", "not_bookable", "quote_invalid", "quote_expired", "price_changed", "currency_unsupported", "payment_declined", "session_expired", "rate_limited", "contact_not_configured", "payment_account_unavailable", "idempotency_key_required", "idempotency_key_reused", "payment_mode_unsupported", "payment_not_authorized", "payment_method_required", "site_not_published", "UNAUTHORIZED", "VALIDATION_ERROR", "NOT_FOUND", "site_not_found", "upstream_timeout", "timeout", "network", "invalid_response", "internal_error", "checkout_unavailable"];
554
- type StorefrontErrorCode = (typeof STOREFRONT_ERROR_CODES)[number];
555
- type StorefrontRegion = 'us' | 'eu' | 'apac';
556
- interface StorefrontErrorInit {
557
- status: number;
558
- code: string;
559
- message: string;
560
- type?: string;
561
- requestId?: string | null;
562
- details?: Record<string, unknown>;
563
- cause?: unknown;
564
- }
565
- declare class StorefrontError extends Error {
566
- name: string;
567
- readonly status: number;
568
- readonly type: string;
569
- readonly code: StorefrontErrorCode | (string & {});
570
- readonly requestId: string | null;
571
- readonly details: Record<string, unknown>;
572
- constructor(init: StorefrontErrorInit);
573
- }
574
- declare class PriceChangedError extends StorefrontError {
575
- name: string;
576
- readonly quote: StorefrontQuote | null;
577
- readonly requiresNewSession: boolean;
578
- constructor(init: StorefrontErrorInit);
579
- }
580
- declare class WrongRegionError extends StorefrontError {
581
- name: string;
582
- readonly region: StorefrontRegion | null;
583
- readonly baseUrl: string | null;
584
- constructor(init: StorefrontErrorInit);
585
- }
586
- declare class RateLimitedError extends StorefrontError {
587
- name: string;
588
- readonly retryAfterSec: number | null;
589
- readonly scope: 'key' | 'ip' | 'pms' | null;
590
- constructor(init: StorefrontErrorInit & {
591
- retryAfterSec: number | null;
592
- });
593
- }
594
- declare class StorefrontTimeoutError extends StorefrontError {
595
- name: string;
596
- constructor(timeoutMs: number, requestId?: string | null);
597
- }
598
- declare class StorefrontNetworkError extends StorefrontError {
599
- name: string;
600
- constructor(cause: unknown);
601
- }
602
- declare class StorefrontConfigError extends Error {
603
- name: string;
604
- }
605
-
606
- export { type AnalyticsOptions as A, type BookingResult as B, type CheckoutMountDescriptor as C, StorefrontNetworkError as D, type StorefrontQuote as E, type StorefrontQuoteInput as F, type StorefrontRatePlanQuote as G, type StorefrontReview as H, type StorefrontReviewsQuery as I, type StorefrontSite as J, StorefrontTimeoutError as K, analyticsFor as L, createAnalytics as M, createStorefrontClient as N, trackPurchasePixel as O, type Page as P, RateLimitedError as R, type StorefrontRegion as S, type TrackEvent as T, WrongRegionError as W, type AnalyticsReporter as a, type CheckoutSession as b, type ConfirmCheckoutSessionInput as c, type ConfirmCheckoutSessionRequest as d, type CreateCheckoutSessionInput as e, type CreateCheckoutSessionOptions as f, type CreatedCheckoutSession as g, PriceChangedError as h, type RequestOptions as i, STOREFRONT_API_PATH as j, STOREFRONT_ERROR_CODES as k, type StorefrontAnalytics as l, type StorefrontBooking as m, type StorefrontBuilding as n, type StorefrontClient as o, type StorefrontClientOptions as p, StorefrontConfigError as q, type StorefrontContactInput as r, StorefrontError as s, type StorefrontErrorCode as t, type StorefrontErrorInit as u, type StorefrontGuestInput as v, type StorefrontListing as w, type StorefrontListingSummary as x, type StorefrontListingsQuery as y, type StorefrontLocation as z };
566
+ export { type StorefrontSite as A, type BookingResult as B, type CheckoutMountDescriptor as C, createStorefrontClient as D, type Page as P, type RequestOptions as R, STOREFRONT_API_PATH as S, type CheckoutSession as a, type ConfirmCheckoutSessionInput as b, type ConfirmCheckoutSessionRequest as c, type ContentListQuery as d, type CreateCheckoutSessionInput as e, type CreateCheckoutSessionOptions as f, type CreatedCheckoutSession as g, type StorefrontBooking as h, type StorefrontBuilding as i, type StorefrontClient as j, type StorefrontClientOptions as k, type StorefrontContactInput as l, type StorefrontContentItem as m, type StorefrontContentModel as n, type StorefrontContentRef as o, type StorefrontGuestInput as p, type StorefrontImage as q, type StorefrontListing as r, type StorefrontListingSummary as s, type StorefrontListingsQuery as t, type StorefrontLocation as u, type StorefrontQuote as v, type StorefrontQuoteInput as w, type StorefrontRatePlanQuote as x, type StorefrontReview as y, type StorefrontReviewsQuery as z };