@bowlos/reservations 0.43.0 → 1.0.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 (56) hide show
  1. package/AGENTS.md +14 -5
  2. package/CHANGELOG.md +22 -0
  3. package/HEADLESS.md +126 -41
  4. package/README.md +16 -0
  5. package/dist/{account-B4sZBmPI.d.cts → account-b8chVpED.d.cts} +27 -1
  6. package/dist/{account-B4sZBmPI.d.ts → account-b8chVpED.d.ts} +27 -1
  7. package/dist/{booking-change-DzYs9133.d.ts → booking-change-B-ADuVEz.d.cts} +77 -2
  8. package/dist/{booking-change-Dd4PVgd3.d.cts → booking-change-BrJ-XESC.d.ts} +77 -2
  9. package/dist/chunk-43WZ6TLQ.js +12 -0
  10. package/dist/chunk-43WZ6TLQ.js.map +1 -0
  11. package/dist/{chunk-4JMGS4YB.js → chunk-CTJODEHR.js} +27 -6
  12. package/dist/chunk-CTJODEHR.js.map +1 -0
  13. package/dist/{chunk-YAXBZJMI.js → chunk-EPYGIJRJ.js} +20 -3
  14. package/dist/chunk-EPYGIJRJ.js.map +1 -0
  15. package/dist/{chunk-YQRTBGXU.js → chunk-EXEKCMQ2.js} +57 -22
  16. package/dist/chunk-EXEKCMQ2.js.map +1 -0
  17. package/dist/{chunk-V4JRDYW4.js → chunk-IDRTMFJJ.js} +8 -3
  18. package/dist/chunk-IDRTMFJJ.js.map +1 -0
  19. package/dist/{chunk-T2E6AEC7.js → chunk-LFFANITL.js} +4 -11
  20. package/dist/chunk-LFFANITL.js.map +1 -0
  21. package/dist/components.cjs +357 -131
  22. package/dist/components.cjs.map +1 -1
  23. package/dist/components.d.cts +11 -5
  24. package/dist/components.d.ts +11 -5
  25. package/dist/components.js +200 -65
  26. package/dist/components.js.map +1 -1
  27. package/dist/index.cjs +34 -0
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +4 -4
  30. package/dist/index.d.ts +4 -4
  31. package/dist/index.js +5 -4
  32. package/dist/index.js.map +1 -1
  33. package/dist/payments.cjs.map +1 -1
  34. package/dist/payments.d.cts +1 -1
  35. package/dist/payments.d.ts +1 -1
  36. package/dist/payments.js +5 -4
  37. package/dist/payments.js.map +1 -1
  38. package/dist/{react-C6NWC80d.d.cts → react-cqGEohr0.d.cts} +4 -2
  39. package/dist/{react-DVdtpw5n.d.ts → react-s4J-e10i.d.ts} +4 -2
  40. package/dist/react.cjs +90 -19
  41. package/dist/react.cjs.map +1 -1
  42. package/dist/react.d.cts +11 -5
  43. package/dist/react.d.ts +11 -5
  44. package/dist/react.js +5 -5
  45. package/package.json +2 -1
  46. package/templates/center-site/README.md +1 -0
  47. package/templates/center-site/app/book/event-reservation-form.tsx +276 -0
  48. package/templates/center-site/app/book/page.tsx +107 -49
  49. package/templates/center-site/app/catalog/page.tsx +3 -1
  50. package/templates/center-site/app/events/[slug]/page.tsx +7 -10
  51. package/templates/center-site/package.json +1 -1
  52. package/dist/chunk-4JMGS4YB.js.map +0 -1
  53. package/dist/chunk-T2E6AEC7.js.map +0 -1
  54. package/dist/chunk-V4JRDYW4.js.map +0 -1
  55. package/dist/chunk-YAXBZJMI.js.map +0 -1
  56. package/dist/chunk-YQRTBGXU.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { F as FetchLike, B as BowlosClient, A as AddMyMembershipMemberArgs, a as AddMyMembershipMemberResult, b as ApplyMyModificationArgs, c as ApplyMyModificationResult, C as CancelCheckoutPaymentArgs, d as CancelCheckoutPaymentResult, e as CancelMyMembershipArgs, f as CancelMyMembershipResult, D as DeleteMyAccountArgs, g as DeleteMyAccountResult, E as ExportMyDataArgs, h as ExportMyDataResult, i as ExportMyDataV2Result, G as GetCenterOperatingHoursForTypeArgs, j as GetCenterOperatingHoursForTypeResult, k as GetGameCardArgs, l as GetGameCardResult, m as GetMembershipArgs, n as GetMembershipResult, o as GetMyCommunicationPrefsArgs, p as GetMyCommunicationPrefsResult, q as GetMyLoyaltyHistoryArgs, r as GetMyLoyaltyHistoryResult, s as GetMyMembershipMembersArgs, t as GetMyMembershipMembersResult, u as GetMyPackageOrderArgs, v as GetMyPackageOrderResult, w as GetMyPackageOrdersArgs, x as GetMyPackageOrdersResult, y as GetOperatingHoursArgs, z as GetOperatingHoursResult, H as GetPackagesLabelArgs, I as GetPackagesLabelResult, J as GetProductArgs, K as GetProductResult, L as GetReceiptArgs, M as GetReceiptResult, N as ListBrandMembershipsArgs, O as ListBrandMembershipsResult, P as ListCentersArgs, Q as ListCentersResult, R as ListHoursArgs, S as ListHoursResult, T as ListProductSubtypesArgs, U as ListProductSubtypesResult, V as AccountDeletionPreview, W as PreviewSlotPricesArgs, X as PreviewSlotPricesResult, Y as SetMyCommunicationPrefArgs, Z as SetMyCommunicationPrefResult, _ as SetMyMobileArgs, $ as SetMyMobileResult, a0 as SubmitSupportRequestArgs, a1 as SubmitSupportRequestResult, a2 as UpdateMyProfileArgs, a3 as UpdateMyProfileResult } from './account-B4sZBmPI.cjs';
2
- export { a4 as AuthState, a5 as AvailabilityArgs, a6 as AvailabilityResult, a7 as BookingAddonSelection, a8 as BookingCustomer, a9 as BookingHold, aa as BookingPreviewArgs, ab as BookingQuote, ac as BowlosClientConfig, ad as BrandScoped, ae as CancelPreview, af as CancelResult, ag as CardSetupResult, ah as ChangePasswordArgs, ai as CheckoutStatus, aj as CheckoutStatusResult, ak as ConnectedPaymentInput, al as CreateBookingArgs, am as CreateFlashSaleBookingArgs, an as Customer, ao as EventOrderDetailArgs, ap as EventTicketCheckoutStatus, aq as EventTicketPreviewArgs, ar as EventTicketPreviewResult, as as EventTicketPurchaseArgs, at as EventTicketPurchaseIntent, au as EventTicketStatusResult, av as FlashBookingOptionsArgs, aw as FlashSaleArgs, ax as FlashSaleBookingResult, ay as FlashSalesArgs, az as GameCardCancelArgs, aA as GameCardCheckoutStatus, aB as GameCardPreviewArgs, aC as GameCardPreviewResult, aD as GameCardPurchaseArgs, aE as GameCardPurchaseIntent, aF as GameCardStatusResult, aG as JoinWaitlistArgs, aH as JoinWaitlistResult, aI as LinkProfile, aJ as MembershipCheckoutStatus, aK as MembershipDetailArgs, aL as MembershipMember, aM as MembershipPreviewArgs, aN as MembershipPreviewResult, aO as MembershipPurchaseArgs, aP as MembershipPurchaseIntent, aQ as MembershipStatusResult, aR as MembershipSubscriptionArgs, aS as MembershipSubscriptionIntent, aT as MembershipSubscriptionPreviewResult, aU as MyGameCard, aV as MyWaitlistEntry, aW as OrderCancelArgs, aX as PackageCheckoutStatus, aY as PackagePreviewArgs, aZ as PackagePreviewResult, a_ as PackagePurchaseArgs, a$ as PackagePurchaseIntent, b0 as PackageStatusResult, b1 as PaymentIntentInfo, b2 as PingResult, b3 as PricingMode, b4 as PublicAddon, b5 as ReservationCancelArgs, b6 as ReservationDetailArgs, b7 as SavedCard, b8 as SavedCardArgs, b9 as SavedCardScope, ba as SavedCardsResult, bb as SlotFullDetails, bc as StartTimesArgs, bd as TokenStore, be as Tokens, bf as WaitlistEntryArgs, bg as WaitlistSetupIntent, bh as abandonCheckout, bi as availableUnitCount, bj as bookingPreview, bk as cancelMyEventOrder, bl as cancelMyGameCard, bm as cancelMyPackageOrder, bn as cancelMyReservation, bo as changePassword, bp as checkAvailability, bq as confirmWaitlistCard, br as createBooking, bs as createBowlosClient, bt as createCardSetup, bu as createCheckoutPaymentIntent, bv as createEventTicketOrder, bw as createFlashSaleBooking, bx as createGameCardOrder, by as createMembershipOrder, bz as createMembershipSubscriptionOrder, bA as createPackageOrder, bB as createWaitlistSetupIntent, bC as generateIdempotencyKey, bD as getCheckoutStatus, bE as getEventTicketStatus, bF as getFlashSale, bG as getFlashSaleBookingOptions, bH as getFlashSales, bI as getGameCardStatus, bJ as getMembershipStatus, bK as getMyCredits, bL as getMyEventOrder, bM as getMyEventOrders, bN as getMyGameCards, bO as getMyLoyalty, bP as getMyMembershipDetail, bQ as getMyMemberships, bR as getMyPasses, bS as getMyReservationDetail, bT as getMyReservations, bU as getPackageStatus, bV as joinWaitlist, bW as leaveWaitlist, bX as listAddons, bY as listMyWaitlist, bZ as listSavedCards, b_ as listStartTimes, b$ as localStorageTokenStore, c0 as previewEventOrderCancellation, c1 as previewEventTicket, c2 as previewGameCard, c3 as previewGameCardCancellation, c4 as previewMembership, c5 as previewMembershipSubscription, c6 as previewPackage, c7 as previewPackageOrderCancellation, c8 as previewReservationCancellation, c9 as removeSavedCard, ca as setDefaultCard } from './account-B4sZBmPI.cjs';
3
- import { C as CancelMyPendingBookingArgs, a as CancelMyPendingBookingResult, E as EmailVerificationTokenArgs, M as MyHoldArgs, G as GetCancellationPolicyArgs, b as CancellationPolicy, c as EmailVerificationSendStateArgs, d as EmailVerificationSendState, e as EmailVerificationStatus, f as GetMyGameCardArgs, g as GetMyGameCardResult, h as GetMyGameCardHistoryArgs, i as GetMyGameCardHistoryResult, j as GameCardRedemption, k as MyHold, l as GetWalletPassUrlArgs, m as GetWalletPassUrlResult, L as ListBrandEventOffersArgs, n as ListBrandEventOffersResult, o as EmailVerificationArgs, R as RequestEmailVerificationResult } from './booking-change-Dd4PVgd3.cjs';
4
- export { A as ApplyBookingChangeArgs, B as BOWLOS_ERROR_CODES, p as BookingChangePayment, q as BookingChangePaymentArgs, r as BookingChangePreview, s as BowlosApiError, t as BowlosApiErrorOptions, u as BowlosErrorCode, v as BrandCatalogArgs, w as BrandEventOffer, x as CatalogActionType, y as CatalogArgs, z as CatalogCategory, D as CatalogItem, F as CatalogResult, H as CatalogSection, I as CatalogSourceTable, J as CenterHoursArgs, K as CenterScoped, N as EventOffer, O as ListEventOffersArgs, P as MembershipBillingPortalArgs, Q as PackageDetailArgs, S as PayLink, T as PayLinkArgs, U as PayLinkPayment, V as PendingBookingChange, W as PendingBookingChangeArgs, X as PreviewBookingChangeArgs, Y as PublicSurface, Z as RetailAttraction, _ as RetailPricing, $ as RetailPricingMode, a0 as RetailSpecial, a1 as RetailWalkInRate, a2 as applyBookingChange, a3 as createBookingChangePayment, a4 as createPayLinkPayment, a5 as getCenterHours, a6 as getEventOffer, a7 as getPackage, a8 as getPayLink, a9 as getPendingBookingChange, aa as listCatalog, ab as listEventOffers, ac as listEvents, ad as listGameCards, ae as listPackages, af as listProducts, ag as listPublicMemberships, ah as listRetailPricing, ai as openMembershipBillingPortal, aj as previewBookingChange } from './booking-change-Dd4PVgd3.cjs';
1
+ import { F as FetchLike, B as BowlosClient, A as AddMyMembershipMemberArgs, a as AddMyMembershipMemberResult, b as ApplyMyModificationArgs, c as ApplyMyModificationResult, C as CancelCheckoutPaymentArgs, d as CancelCheckoutPaymentResult, e as CancelMyMembershipArgs, f as CancelMyMembershipResult, D as DeleteMyAccountArgs, g as DeleteMyAccountResult, E as ExportMyDataArgs, h as ExportMyDataResult, i as ExportMyDataV2Result, G as GetCenterOperatingHoursForTypeArgs, j as GetCenterOperatingHoursForTypeResult, k as GetGameCardArgs, l as GetGameCardResult, m as GetMembershipArgs, n as GetMembershipResult, o as GetMyCommunicationPrefsArgs, p as GetMyCommunicationPrefsResult, q as GetMyLoyaltyHistoryArgs, r as GetMyLoyaltyHistoryResult, s as GetMyMembershipMembersArgs, t as GetMyMembershipMembersResult, u as GetMyPackageOrderArgs, v as GetMyPackageOrderResult, w as GetMyPackageOrdersArgs, x as GetMyPackageOrdersResult, y as GetOperatingHoursArgs, z as GetOperatingHoursResult, H as GetPackagesLabelArgs, I as GetPackagesLabelResult, J as GetProductArgs, K as GetProductResult, L as GetReceiptArgs, M as GetReceiptResult, N as ListBrandMembershipsArgs, O as ListBrandMembershipsResult, P as ListCentersArgs, Q as ListCentersResult, R as ListHoursArgs, S as ListHoursResult, T as ListProductSubtypesArgs, U as ListProductSubtypesResult, V as AccountDeletionPreview, W as PreviewSlotPricesArgs, X as PreviewSlotPricesResult, Y as SetMyCommunicationPrefArgs, Z as SetMyCommunicationPrefResult, _ as SetMyMobileArgs, $ as SetMyMobileResult, a0 as SubmitSupportRequestArgs, a1 as SubmitSupportRequestResult, a2 as UpdateMyProfileArgs, a3 as UpdateMyProfileResult } from './account-b8chVpED.cjs';
2
+ export { a4 as AuthState, a5 as AvailabilityArgs, a6 as AvailabilityResult, a7 as BookingAddonSelection, a8 as BookingCustomer, a9 as BookingHold, aa as BookingPreviewArgs, ab as BookingQuote, ac as BowlosClientConfig, ad as BrandScoped, ae as CancelPreview, af as CancelResult, ag as CardSetupResult, ah as ChangePasswordArgs, ai as CheckoutStatus, aj as CheckoutStatusResult, ak as ConnectedPaymentInput, al as CreateBookingArgs, am as CreateFlashSaleBookingArgs, an as Customer, ao as DuplicateBookingArgs, ap as DuplicateBookingResult, aq as EventOrderDetailArgs, ar as EventTicketCheckoutStatus, as as EventTicketPreviewArgs, at as EventTicketPreviewResult, au as EventTicketPurchaseArgs, av as EventTicketPurchaseIntent, aw as EventTicketStatusResult, ax as FlashBookingOptionsArgs, ay as FlashSaleArgs, az as FlashSaleBookingResult, aA as FlashSalesArgs, aB as GameCardCancelArgs, aC as GameCardCheckoutStatus, aD as GameCardPreviewArgs, aE as GameCardPreviewResult, aF as GameCardPurchaseArgs, aG as GameCardPurchaseIntent, aH as GameCardStatusResult, aI as JoinWaitlistArgs, aJ as JoinWaitlistResult, aK as LinkProfile, aL as MembershipCheckoutStatus, aM as MembershipDetailArgs, aN as MembershipMember, aO as MembershipPreviewArgs, aP as MembershipPreviewResult, aQ as MembershipPurchaseArgs, aR as MembershipPurchaseIntent, aS as MembershipStatusResult, aT as MembershipSubscriptionArgs, aU as MembershipSubscriptionIntent, aV as MembershipSubscriptionPreviewResult, aW as MyGameCard, aX as MyWaitlistEntry, aY as OrderCancelArgs, aZ as PackageCheckoutStatus, a_ as PackagePreviewArgs, a$ as PackagePreviewResult, b0 as PackagePurchaseArgs, b1 as PackagePurchaseIntent, b2 as PackageStatusResult, b3 as PaymentIntentInfo, b4 as PingResult, b5 as PricingMode, b6 as PublicAddon, b7 as ReservationCancelArgs, b8 as ReservationDetailArgs, b9 as SavedCard, ba as SavedCardArgs, bb as SavedCardScope, bc as SavedCardsResult, bd as SlotFullDetails, be as StartTimesArgs, bf as TokenStore, bg as Tokens, bh as WaitlistEntryArgs, bi as WaitlistSetupIntent, bj as abandonCheckout, bk as availableUnitCount, bl as bookingPreview, bm as cancelMyEventOrder, bn as cancelMyGameCard, bo as cancelMyPackageOrder, bp as cancelMyReservation, bq as changePassword, br as checkAvailability, bs as checkDuplicateBooking, bt as confirmWaitlistCard, bu as createBooking, bv as createBowlosClient, bw as createCardSetup, bx as createCheckoutPaymentIntent, by as createEventTicketOrder, bz as createFlashSaleBooking, bA as createGameCardOrder, bB as createMembershipOrder, bC as createMembershipSubscriptionOrder, bD as createPackageOrder, bE as createWaitlistSetupIntent, bF as generateIdempotencyKey, bG as getCheckoutStatus, bH as getEventTicketStatus, bI as getFlashSale, bJ as getFlashSaleBookingOptions, bK as getFlashSales, bL as getGameCardStatus, bM as getMembershipStatus, bN as getMyCredits, bO as getMyEventOrder, bP as getMyEventOrders, bQ as getMyGameCards, bR as getMyLoyalty, bS as getMyMembershipDetail, bT as getMyMemberships, bU as getMyPasses, bV as getMyReservationDetail, bW as getMyReservations, bX as getPackageStatus, bY as joinWaitlist, bZ as leaveWaitlist, b_ as listAddons, b$ as listMyWaitlist, c0 as listSavedCards, c1 as listStartTimes, c2 as localStorageTokenStore, c3 as previewEventOrderCancellation, c4 as previewEventTicket, c5 as previewGameCard, c6 as previewGameCardCancellation, c7 as previewMembership, c8 as previewMembershipSubscription, c9 as previewPackage, ca as previewPackageOrderCancellation, cb as previewReservationCancellation, cc as removeSavedCard, cd as setDefaultCard } from './account-b8chVpED.cjs';
3
+ import { C as CancelMyPendingBookingArgs, a as CancelMyPendingBookingResult, E as EmailVerificationTokenArgs, M as MyHoldArgs, G as GetCancellationPolicyArgs, b as CancellationPolicy, c as EmailVerificationSendStateArgs, d as EmailVerificationSendState, e as EmailVerificationStatus, f as GetMyGameCardArgs, g as GetMyGameCardResult, h as GetMyGameCardHistoryArgs, i as GetMyGameCardHistoryResult, j as GameCardRedemption, k as MyHold, l as GetWalletPassUrlArgs, m as GetWalletPassUrlResult, L as ListBrandEventOffersArgs, n as ListBrandEventOffersResult, o as EmailVerificationArgs, R as RequestEmailVerificationResult } from './booking-change-B-ADuVEz.cjs';
4
+ export { A as ApplyBookingChangeArgs, B as BOWLOS_ERROR_CODES, p as BookingChangePayment, q as BookingChangePaymentArgs, r as BookingChangePreview, s as BowlosApiError, t as BowlosApiErrorOptions, u as BowlosErrorCode, v as BrandCatalogArgs, w as BrandEventOffer, x as CatalogActionType, y as CatalogArgs, z as CatalogCategory, D as CatalogItem, F as CatalogResult, H as CatalogSection, I as CatalogSourceTable, J as CenterHoursArgs, K as CenterScoped, N as EventOffer, O as EventOfferDetail, P as EventOfferOptionsArgs, Q as EventOfferOptionsResult, S as EventOfferSession, T as EventOfferStartOption, U as ListEventOffersArgs, V as MembershipBillingPortalArgs, W as PackageDetailArgs, X as PayLink, Y as PayLinkArgs, Z as PayLinkPayment, _ as PendingBookingChange, $ as PendingBookingChangeArgs, a0 as PreviewBookingChangeArgs, a1 as PublicSurface, a2 as RetailAttraction, a3 as RetailPricing, a4 as RetailPricingMode, a5 as RetailSpecial, a6 as RetailWalkInRate, a7 as applyBookingChange, a8 as createBookingChangePayment, a9 as createPayLinkPayment, aa as durationsForStart, ab as eventOfferOptions, ac as formatSessionRange, ad as getCenterHours, ae as getEventOffer, af as getPackage, ag as getPayLink, ah as getPendingBookingChange, ai as isFixedSession, aj as listCatalog, ak as listEventOffers, al as listEvents, am as listGameCards, an as listPackages, ao as listProducts, ap as listPublicMemberships, aq as listRetailPricing, ar as openMembershipBillingPortal, as as previewBookingChange } from './booking-change-B-ADuVEz.cjs';
5
5
  import { InquiryFormType } from '@bowlos/shared';
6
6
  export { INQUIRY_FORMS, InquiryFieldDef, InquiryFormType } from '@bowlos/shared';
7
7
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { F as FetchLike, B as BowlosClient, A as AddMyMembershipMemberArgs, a as AddMyMembershipMemberResult, b as ApplyMyModificationArgs, c as ApplyMyModificationResult, C as CancelCheckoutPaymentArgs, d as CancelCheckoutPaymentResult, e as CancelMyMembershipArgs, f as CancelMyMembershipResult, D as DeleteMyAccountArgs, g as DeleteMyAccountResult, E as ExportMyDataArgs, h as ExportMyDataResult, i as ExportMyDataV2Result, G as GetCenterOperatingHoursForTypeArgs, j as GetCenterOperatingHoursForTypeResult, k as GetGameCardArgs, l as GetGameCardResult, m as GetMembershipArgs, n as GetMembershipResult, o as GetMyCommunicationPrefsArgs, p as GetMyCommunicationPrefsResult, q as GetMyLoyaltyHistoryArgs, r as GetMyLoyaltyHistoryResult, s as GetMyMembershipMembersArgs, t as GetMyMembershipMembersResult, u as GetMyPackageOrderArgs, v as GetMyPackageOrderResult, w as GetMyPackageOrdersArgs, x as GetMyPackageOrdersResult, y as GetOperatingHoursArgs, z as GetOperatingHoursResult, H as GetPackagesLabelArgs, I as GetPackagesLabelResult, J as GetProductArgs, K as GetProductResult, L as GetReceiptArgs, M as GetReceiptResult, N as ListBrandMembershipsArgs, O as ListBrandMembershipsResult, P as ListCentersArgs, Q as ListCentersResult, R as ListHoursArgs, S as ListHoursResult, T as ListProductSubtypesArgs, U as ListProductSubtypesResult, V as AccountDeletionPreview, W as PreviewSlotPricesArgs, X as PreviewSlotPricesResult, Y as SetMyCommunicationPrefArgs, Z as SetMyCommunicationPrefResult, _ as SetMyMobileArgs, $ as SetMyMobileResult, a0 as SubmitSupportRequestArgs, a1 as SubmitSupportRequestResult, a2 as UpdateMyProfileArgs, a3 as UpdateMyProfileResult } from './account-B4sZBmPI.js';
2
- export { a4 as AuthState, a5 as AvailabilityArgs, a6 as AvailabilityResult, a7 as BookingAddonSelection, a8 as BookingCustomer, a9 as BookingHold, aa as BookingPreviewArgs, ab as BookingQuote, ac as BowlosClientConfig, ad as BrandScoped, ae as CancelPreview, af as CancelResult, ag as CardSetupResult, ah as ChangePasswordArgs, ai as CheckoutStatus, aj as CheckoutStatusResult, ak as ConnectedPaymentInput, al as CreateBookingArgs, am as CreateFlashSaleBookingArgs, an as Customer, ao as EventOrderDetailArgs, ap as EventTicketCheckoutStatus, aq as EventTicketPreviewArgs, ar as EventTicketPreviewResult, as as EventTicketPurchaseArgs, at as EventTicketPurchaseIntent, au as EventTicketStatusResult, av as FlashBookingOptionsArgs, aw as FlashSaleArgs, ax as FlashSaleBookingResult, ay as FlashSalesArgs, az as GameCardCancelArgs, aA as GameCardCheckoutStatus, aB as GameCardPreviewArgs, aC as GameCardPreviewResult, aD as GameCardPurchaseArgs, aE as GameCardPurchaseIntent, aF as GameCardStatusResult, aG as JoinWaitlistArgs, aH as JoinWaitlistResult, aI as LinkProfile, aJ as MembershipCheckoutStatus, aK as MembershipDetailArgs, aL as MembershipMember, aM as MembershipPreviewArgs, aN as MembershipPreviewResult, aO as MembershipPurchaseArgs, aP as MembershipPurchaseIntent, aQ as MembershipStatusResult, aR as MembershipSubscriptionArgs, aS as MembershipSubscriptionIntent, aT as MembershipSubscriptionPreviewResult, aU as MyGameCard, aV as MyWaitlistEntry, aW as OrderCancelArgs, aX as PackageCheckoutStatus, aY as PackagePreviewArgs, aZ as PackagePreviewResult, a_ as PackagePurchaseArgs, a$ as PackagePurchaseIntent, b0 as PackageStatusResult, b1 as PaymentIntentInfo, b2 as PingResult, b3 as PricingMode, b4 as PublicAddon, b5 as ReservationCancelArgs, b6 as ReservationDetailArgs, b7 as SavedCard, b8 as SavedCardArgs, b9 as SavedCardScope, ba as SavedCardsResult, bb as SlotFullDetails, bc as StartTimesArgs, bd as TokenStore, be as Tokens, bf as WaitlistEntryArgs, bg as WaitlistSetupIntent, bh as abandonCheckout, bi as availableUnitCount, bj as bookingPreview, bk as cancelMyEventOrder, bl as cancelMyGameCard, bm as cancelMyPackageOrder, bn as cancelMyReservation, bo as changePassword, bp as checkAvailability, bq as confirmWaitlistCard, br as createBooking, bs as createBowlosClient, bt as createCardSetup, bu as createCheckoutPaymentIntent, bv as createEventTicketOrder, bw as createFlashSaleBooking, bx as createGameCardOrder, by as createMembershipOrder, bz as createMembershipSubscriptionOrder, bA as createPackageOrder, bB as createWaitlistSetupIntent, bC as generateIdempotencyKey, bD as getCheckoutStatus, bE as getEventTicketStatus, bF as getFlashSale, bG as getFlashSaleBookingOptions, bH as getFlashSales, bI as getGameCardStatus, bJ as getMembershipStatus, bK as getMyCredits, bL as getMyEventOrder, bM as getMyEventOrders, bN as getMyGameCards, bO as getMyLoyalty, bP as getMyMembershipDetail, bQ as getMyMemberships, bR as getMyPasses, bS as getMyReservationDetail, bT as getMyReservations, bU as getPackageStatus, bV as joinWaitlist, bW as leaveWaitlist, bX as listAddons, bY as listMyWaitlist, bZ as listSavedCards, b_ as listStartTimes, b$ as localStorageTokenStore, c0 as previewEventOrderCancellation, c1 as previewEventTicket, c2 as previewGameCard, c3 as previewGameCardCancellation, c4 as previewMembership, c5 as previewMembershipSubscription, c6 as previewPackage, c7 as previewPackageOrderCancellation, c8 as previewReservationCancellation, c9 as removeSavedCard, ca as setDefaultCard } from './account-B4sZBmPI.js';
3
- import { C as CancelMyPendingBookingArgs, a as CancelMyPendingBookingResult, E as EmailVerificationTokenArgs, M as MyHoldArgs, G as GetCancellationPolicyArgs, b as CancellationPolicy, c as EmailVerificationSendStateArgs, d as EmailVerificationSendState, e as EmailVerificationStatus, f as GetMyGameCardArgs, g as GetMyGameCardResult, h as GetMyGameCardHistoryArgs, i as GetMyGameCardHistoryResult, j as GameCardRedemption, k as MyHold, l as GetWalletPassUrlArgs, m as GetWalletPassUrlResult, L as ListBrandEventOffersArgs, n as ListBrandEventOffersResult, o as EmailVerificationArgs, R as RequestEmailVerificationResult } from './booking-change-DzYs9133.js';
4
- export { A as ApplyBookingChangeArgs, B as BOWLOS_ERROR_CODES, p as BookingChangePayment, q as BookingChangePaymentArgs, r as BookingChangePreview, s as BowlosApiError, t as BowlosApiErrorOptions, u as BowlosErrorCode, v as BrandCatalogArgs, w as BrandEventOffer, x as CatalogActionType, y as CatalogArgs, z as CatalogCategory, D as CatalogItem, F as CatalogResult, H as CatalogSection, I as CatalogSourceTable, J as CenterHoursArgs, K as CenterScoped, N as EventOffer, O as ListEventOffersArgs, P as MembershipBillingPortalArgs, Q as PackageDetailArgs, S as PayLink, T as PayLinkArgs, U as PayLinkPayment, V as PendingBookingChange, W as PendingBookingChangeArgs, X as PreviewBookingChangeArgs, Y as PublicSurface, Z as RetailAttraction, _ as RetailPricing, $ as RetailPricingMode, a0 as RetailSpecial, a1 as RetailWalkInRate, a2 as applyBookingChange, a3 as createBookingChangePayment, a4 as createPayLinkPayment, a5 as getCenterHours, a6 as getEventOffer, a7 as getPackage, a8 as getPayLink, a9 as getPendingBookingChange, aa as listCatalog, ab as listEventOffers, ac as listEvents, ad as listGameCards, ae as listPackages, af as listProducts, ag as listPublicMemberships, ah as listRetailPricing, ai as openMembershipBillingPortal, aj as previewBookingChange } from './booking-change-DzYs9133.js';
1
+ import { F as FetchLike, B as BowlosClient, A as AddMyMembershipMemberArgs, a as AddMyMembershipMemberResult, b as ApplyMyModificationArgs, c as ApplyMyModificationResult, C as CancelCheckoutPaymentArgs, d as CancelCheckoutPaymentResult, e as CancelMyMembershipArgs, f as CancelMyMembershipResult, D as DeleteMyAccountArgs, g as DeleteMyAccountResult, E as ExportMyDataArgs, h as ExportMyDataResult, i as ExportMyDataV2Result, G as GetCenterOperatingHoursForTypeArgs, j as GetCenterOperatingHoursForTypeResult, k as GetGameCardArgs, l as GetGameCardResult, m as GetMembershipArgs, n as GetMembershipResult, o as GetMyCommunicationPrefsArgs, p as GetMyCommunicationPrefsResult, q as GetMyLoyaltyHistoryArgs, r as GetMyLoyaltyHistoryResult, s as GetMyMembershipMembersArgs, t as GetMyMembershipMembersResult, u as GetMyPackageOrderArgs, v as GetMyPackageOrderResult, w as GetMyPackageOrdersArgs, x as GetMyPackageOrdersResult, y as GetOperatingHoursArgs, z as GetOperatingHoursResult, H as GetPackagesLabelArgs, I as GetPackagesLabelResult, J as GetProductArgs, K as GetProductResult, L as GetReceiptArgs, M as GetReceiptResult, N as ListBrandMembershipsArgs, O as ListBrandMembershipsResult, P as ListCentersArgs, Q as ListCentersResult, R as ListHoursArgs, S as ListHoursResult, T as ListProductSubtypesArgs, U as ListProductSubtypesResult, V as AccountDeletionPreview, W as PreviewSlotPricesArgs, X as PreviewSlotPricesResult, Y as SetMyCommunicationPrefArgs, Z as SetMyCommunicationPrefResult, _ as SetMyMobileArgs, $ as SetMyMobileResult, a0 as SubmitSupportRequestArgs, a1 as SubmitSupportRequestResult, a2 as UpdateMyProfileArgs, a3 as UpdateMyProfileResult } from './account-b8chVpED.js';
2
+ export { a4 as AuthState, a5 as AvailabilityArgs, a6 as AvailabilityResult, a7 as BookingAddonSelection, a8 as BookingCustomer, a9 as BookingHold, aa as BookingPreviewArgs, ab as BookingQuote, ac as BowlosClientConfig, ad as BrandScoped, ae as CancelPreview, af as CancelResult, ag as CardSetupResult, ah as ChangePasswordArgs, ai as CheckoutStatus, aj as CheckoutStatusResult, ak as ConnectedPaymentInput, al as CreateBookingArgs, am as CreateFlashSaleBookingArgs, an as Customer, ao as DuplicateBookingArgs, ap as DuplicateBookingResult, aq as EventOrderDetailArgs, ar as EventTicketCheckoutStatus, as as EventTicketPreviewArgs, at as EventTicketPreviewResult, au as EventTicketPurchaseArgs, av as EventTicketPurchaseIntent, aw as EventTicketStatusResult, ax as FlashBookingOptionsArgs, ay as FlashSaleArgs, az as FlashSaleBookingResult, aA as FlashSalesArgs, aB as GameCardCancelArgs, aC as GameCardCheckoutStatus, aD as GameCardPreviewArgs, aE as GameCardPreviewResult, aF as GameCardPurchaseArgs, aG as GameCardPurchaseIntent, aH as GameCardStatusResult, aI as JoinWaitlistArgs, aJ as JoinWaitlistResult, aK as LinkProfile, aL as MembershipCheckoutStatus, aM as MembershipDetailArgs, aN as MembershipMember, aO as MembershipPreviewArgs, aP as MembershipPreviewResult, aQ as MembershipPurchaseArgs, aR as MembershipPurchaseIntent, aS as MembershipStatusResult, aT as MembershipSubscriptionArgs, aU as MembershipSubscriptionIntent, aV as MembershipSubscriptionPreviewResult, aW as MyGameCard, aX as MyWaitlistEntry, aY as OrderCancelArgs, aZ as PackageCheckoutStatus, a_ as PackagePreviewArgs, a$ as PackagePreviewResult, b0 as PackagePurchaseArgs, b1 as PackagePurchaseIntent, b2 as PackageStatusResult, b3 as PaymentIntentInfo, b4 as PingResult, b5 as PricingMode, b6 as PublicAddon, b7 as ReservationCancelArgs, b8 as ReservationDetailArgs, b9 as SavedCard, ba as SavedCardArgs, bb as SavedCardScope, bc as SavedCardsResult, bd as SlotFullDetails, be as StartTimesArgs, bf as TokenStore, bg as Tokens, bh as WaitlistEntryArgs, bi as WaitlistSetupIntent, bj as abandonCheckout, bk as availableUnitCount, bl as bookingPreview, bm as cancelMyEventOrder, bn as cancelMyGameCard, bo as cancelMyPackageOrder, bp as cancelMyReservation, bq as changePassword, br as checkAvailability, bs as checkDuplicateBooking, bt as confirmWaitlistCard, bu as createBooking, bv as createBowlosClient, bw as createCardSetup, bx as createCheckoutPaymentIntent, by as createEventTicketOrder, bz as createFlashSaleBooking, bA as createGameCardOrder, bB as createMembershipOrder, bC as createMembershipSubscriptionOrder, bD as createPackageOrder, bE as createWaitlistSetupIntent, bF as generateIdempotencyKey, bG as getCheckoutStatus, bH as getEventTicketStatus, bI as getFlashSale, bJ as getFlashSaleBookingOptions, bK as getFlashSales, bL as getGameCardStatus, bM as getMembershipStatus, bN as getMyCredits, bO as getMyEventOrder, bP as getMyEventOrders, bQ as getMyGameCards, bR as getMyLoyalty, bS as getMyMembershipDetail, bT as getMyMemberships, bU as getMyPasses, bV as getMyReservationDetail, bW as getMyReservations, bX as getPackageStatus, bY as joinWaitlist, bZ as leaveWaitlist, b_ as listAddons, b$ as listMyWaitlist, c0 as listSavedCards, c1 as listStartTimes, c2 as localStorageTokenStore, c3 as previewEventOrderCancellation, c4 as previewEventTicket, c5 as previewGameCard, c6 as previewGameCardCancellation, c7 as previewMembership, c8 as previewMembershipSubscription, c9 as previewPackage, ca as previewPackageOrderCancellation, cb as previewReservationCancellation, cc as removeSavedCard, cd as setDefaultCard } from './account-b8chVpED.js';
3
+ import { C as CancelMyPendingBookingArgs, a as CancelMyPendingBookingResult, E as EmailVerificationTokenArgs, M as MyHoldArgs, G as GetCancellationPolicyArgs, b as CancellationPolicy, c as EmailVerificationSendStateArgs, d as EmailVerificationSendState, e as EmailVerificationStatus, f as GetMyGameCardArgs, g as GetMyGameCardResult, h as GetMyGameCardHistoryArgs, i as GetMyGameCardHistoryResult, j as GameCardRedemption, k as MyHold, l as GetWalletPassUrlArgs, m as GetWalletPassUrlResult, L as ListBrandEventOffersArgs, n as ListBrandEventOffersResult, o as EmailVerificationArgs, R as RequestEmailVerificationResult } from './booking-change-BrJ-XESC.js';
4
+ export { A as ApplyBookingChangeArgs, B as BOWLOS_ERROR_CODES, p as BookingChangePayment, q as BookingChangePaymentArgs, r as BookingChangePreview, s as BowlosApiError, t as BowlosApiErrorOptions, u as BowlosErrorCode, v as BrandCatalogArgs, w as BrandEventOffer, x as CatalogActionType, y as CatalogArgs, z as CatalogCategory, D as CatalogItem, F as CatalogResult, H as CatalogSection, I as CatalogSourceTable, J as CenterHoursArgs, K as CenterScoped, N as EventOffer, O as EventOfferDetail, P as EventOfferOptionsArgs, Q as EventOfferOptionsResult, S as EventOfferSession, T as EventOfferStartOption, U as ListEventOffersArgs, V as MembershipBillingPortalArgs, W as PackageDetailArgs, X as PayLink, Y as PayLinkArgs, Z as PayLinkPayment, _ as PendingBookingChange, $ as PendingBookingChangeArgs, a0 as PreviewBookingChangeArgs, a1 as PublicSurface, a2 as RetailAttraction, a3 as RetailPricing, a4 as RetailPricingMode, a5 as RetailSpecial, a6 as RetailWalkInRate, a7 as applyBookingChange, a8 as createBookingChangePayment, a9 as createPayLinkPayment, aa as durationsForStart, ab as eventOfferOptions, ac as formatSessionRange, ad as getCenterHours, ae as getEventOffer, af as getPackage, ag as getPayLink, ah as getPendingBookingChange, ai as isFixedSession, aj as listCatalog, ak as listEventOffers, al as listEvents, am as listGameCards, an as listPackages, ao as listProducts, ap as listPublicMemberships, aq as listRetailPricing, ar as openMembershipBillingPortal, as as previewBookingChange } from './booking-change-BrJ-XESC.js';
5
5
  import { InquiryFormType } from '@bowlos/shared';
6
6
  export { INQUIRY_FORMS, InquiryFieldDef, InquiryFormType } from '@bowlos/shared';
7
7
 
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
- import { signInquiryBody } from './chunk-YAXBZJMI.js';
2
- export { INQUIRY_FORMS } from './chunk-YAXBZJMI.js';
1
+ import { signInquiryBody } from './chunk-EPYGIJRJ.js';
2
+ export { INQUIRY_FORMS, durationsForStart, eventOfferOptions, formatSessionRange, isFixedSession } from './chunk-EPYGIJRJ.js';
3
3
  export { addMyMembershipMember, applyBookingChange, applyMyModification, cancelCheckoutPayment, cancelMyMembership, createBookingChangePayment, createPayLinkPayment, deleteMyAccount, exportMyData, exportMyDataV2, getCenterOperatingHoursForType, getGameCard, getMembership, getMyCommunicationPrefs, getMyLoyaltyHistory, getMyMembershipMembers, getMyPackageOrder, getMyPackageOrders, getOperatingHours, getPackagesLabel, getPayLink, getPendingBookingChange, getProduct, getReceipt, listBrandMemberships, listCenters, listHours, listProductSubtypes, openMembershipBillingPortal, previewAccountDeletion, previewBookingChange, previewSlotPrices, setMyCommunicationPref, setMyMobile, submitSupportRequest, updateMyProfile } from './chunk-I37IJNYU.js';
4
- import { createBowlosClient, BOWLOS_ERROR_CODES, BowlosApiError } from './chunk-V4JRDYW4.js';
5
- export { BOWLOS_ERROR_CODES, BowlosApiError, BowlosClient, abandonCheckout, availableUnitCount, bookingPreview, checkAvailability, confirmWaitlistCard, createBooking, createBowlosClient, createCheckoutPaymentIntent, createEventTicketOrder, createGameCardOrder, createMembershipOrder, createMembershipSubscriptionOrder, createPackageOrder, createWaitlistSetupIntent, generateIdempotencyKey, getCheckoutStatus, getEventTicketStatus, getGameCardStatus, getMembershipStatus, getPackageStatus, joinWaitlist, leaveWaitlist, listAddons, listMyWaitlist, listStartTimes, localStorageTokenStore, previewEventTicket, previewGameCard, previewMembership, previewMembershipSubscription, previewPackage } from './chunk-V4JRDYW4.js';
4
+ import './chunk-43WZ6TLQ.js';
5
+ import { createBowlosClient, BOWLOS_ERROR_CODES, BowlosApiError } from './chunk-IDRTMFJJ.js';
6
+ export { BOWLOS_ERROR_CODES, BowlosApiError, BowlosClient, abandonCheckout, availableUnitCount, bookingPreview, checkAvailability, checkDuplicateBooking, confirmWaitlistCard, createBooking, createBowlosClient, createCheckoutPaymentIntent, createEventTicketOrder, createGameCardOrder, createMembershipOrder, createMembershipSubscriptionOrder, createPackageOrder, createWaitlistSetupIntent, generateIdempotencyKey, getCheckoutStatus, getEventTicketStatus, getGameCardStatus, getMembershipStatus, getPackageStatus, joinWaitlist, leaveWaitlist, listAddons, listMyWaitlist, listStartTimes, localStorageTokenStore, previewEventTicket, previewGameCard, previewMembership, previewMembershipSubscription, previewPackage } from './chunk-IDRTMFJJ.js';
6
7
 
7
8
  // src/inquiry.ts
8
9
  async function forwardInquiry(input, config) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/inquiry.ts","../src/doctor.ts","../src/account.ts","../src/catalog.ts","../src/packages.ts","../src/toolkit.ts"],"names":[],"mappings":";;;;;;;AAmCA,eAAsB,cAAA,CACpB,OACA,MAAA,EAC0C;AAC1C,EAAA,MAAM,IAAA,GAAO,OAAO,OAAA,CACjB,OAAA,CAAQ,QAAQ,EAAE,CAAA,CAClB,OAAA,CAAQ,oBAAA,EAAsB,EAAE,CAAA;AACnC,EAAA,MAAM,IAAA,GAAO,KAAK,SAAA,CAAU;AAAA,IAC1B,SAAS,MAAA,CAAO,OAAA;AAAA,IAChB,UAAU,MAAA,CAAO,QAAA;AAAA,IACjB,UAAU,KAAA,CAAM,QAAA;AAAA,IAChB,QAAQ,KAAA,CAAM;AAAA,GACf,CAAA;AACD,EAAA,MAAM,SAAA,GAAY,MAAM,eAAA,CAAgB,MAAA,CAAO,QA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AA,CAA4B,sBAAA,EAAwB,MAAM,EAAE,IAAA,EAAM,MAAM,CAAA;AACxF;AAEO,SAAS,aAAA,CAAc,QAAsB,IAAA,EAAmC;AACrF,EAAA,OAAO,OAAO,IAAA,CAAW,uBAAA,EAAyB,MAAM,EAAE,IAAA,EAAM,MAAM,CAAA;AACxE;AAEO,SAAS,wBAAA,CACd,QACA,IAAA,EAC2C;AAC3C,EAAA,OAAO,MAAA,CAAO,IAAA,CAAuC,0BAAA,EAA4B,IAAA,EAAM;AAAA,IACrF,IAAA,EAAM;AAAA,GACP,CAAA;AACH;AAEO,SAAS,wBAAA,CACd,QACA,IAAA,EACuB;AACvB,EAAA,OAAO,OAAO,IAAA,CAAmB,0BAAA,EAA4B,MAAM,EAAE,IAAA,EAAM,MAAM,CAAA;AACnF;AAEO,SAAS,0BAAA,CACd,QACA,IAAA,EACoC;AACpC,EAAA,OAAO,OAAO,IAAA,CAAgC,4BAAA,EAA8B,MAAM,EAAE,IAAA,EAAM,MAAM,CAAA;AAClG;AAEO,SAAS,6BAAA,CACd,QACA,IAAA,EACuC;AACvC,EAAA,OAAO,MAAA,CAAO,IAAA,CAAmC,+BAAA,EAAiC,IAAA,EAAM;AAAA,IACtF,IAAA,EAAM;AAAA,GACP,CAAA;AACH;AAEO,SAAS,qBAAA,CACd,QACA,IAAA,EAC+B;AAC/B,EAAA,OAAO,OAAO,IAAA,CAA2B,uBAAA,EAAyB,MAAM,EAAE,IAAA,EAAM,OAAO,CAAA;AACzF;AAEO,SAAS,sBAAA,CACd,QACA,IAAA,EACyC;AACzC,EAAA,OAAO,MAAA,CAAO,IAAA,CAAqC,4BAAA,EAA8B,IAAA,EAAM;AAAA,IACrF,IAAA,EAAM;AAAA,GACP,CAAA;AACH","file":"index.js","sourcesContent":["import { signInquiryBody, type InquiryFormType } from \"@bowlos/shared\";\n\n/**\n * Inquiry forms (\"No Dead Ends\" #3) — the framework-free forwarder. A center\n * site's OWN server route (e.g. a Next.js Route Handler) receives the form\n * submission from `<InquiryForm>`, then calls `forwardInquiry` to HMAC-sign it\n * with the Center's secret and POST it to BowlOS. The secret lives only on the\n * server — never shipped to the browser — which is what makes the inbox\n * spam-proof. Re-exports the form registry so a headless site can build its own\n * form fields from the same source of truth the inbox formats.\n */\n\nexport { INQUIRY_FORMS } from \"@bowlos/shared\";\nexport type { InquiryFormType, InquiryFieldDef } from \"@bowlos/shared\";\n\nexport interface ForwardInquiryConfig {\n /** The Center's inquiry signing secret (from BowlOS admin). SERVER-SIDE ONLY. */\n secret: string;\n /** The same BowlOS base URL the SDK client uses (gateway base or convex.site root). */\n baseUrl: string;\n brandId: string;\n centerId: string;\n}\n\nexport interface ForwardInquiryInput {\n formType: InquiryFormType;\n fields: Record<string, unknown>;\n}\n\n/**\n * Sign + forward an inquiry to BowlOS. Returns the upstream `{ ok, status }`.\n * Throws only on a network failure (the caller maps a non-ok status to a\n * user-facing error). Derives the `/forms/inbound` endpoint from the gateway\n * base URL, so the integrator reuses values they already have plus the secret.\n */\nexport async function forwardInquiry(\n input: ForwardInquiryInput,\n config: ForwardInquiryConfig,\n): Promise<{ ok: boolean; status: number }> {\n const root = config.baseUrl\n .replace(/\\/+$/, \"\")\n .replace(/\\/api\\/public\\/v1$/, \"\");\n const body = JSON.stringify({\n brandId: config.brandId,\n centerId: config.centerId,\n formType: input.formType,\n fields: input.fields,\n });\n const signature = await signInquiryBody(config.secret, body);\n const res = await fetch(`${root}/forms/inbound`, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n \"X-Bowlos-Signature\": signature,\n },\n body,\n });\n return { ok: res.ok, status: res.status };\n}\n","/**\n * `runDoctor` — a setup-readiness oracle for a site built on @bowlos/reservations.\n *\n * It runs a short sequence of checks against a configured gateway + API key and\n * returns a structured report (pass / warn / fail / skip), each with a one-line\n * fix when it isn't a pass. The point is to make per-site setup self-debuggable\n * — it walks the failure modes a new center site actually hits, in order:\n * config → gateway reachable → API key valid → origin allow-listed → data plane.\n *\n * Framework-agnostic and dependency-free: it builds a `BowlosClient`, leans on\n * `client.ping()` (one call covers reachability + key + origin + rate-limit),\n * and reports honestly — checks it can't run from the current environment are\n * `skip`ped with guidance rather than faked. The `bowlos doctor` CLI is a thin\n * wrapper that pretty-prints the report.\n */\nimport { createBowlosClient } from \"./client\";\nimport { BowlosApiError, BOWLOS_ERROR_CODES } from \"./errors\";\nimport type { FetchLike, PingResult } from \"./types\";\n\nexport type DoctorCheckStatus = \"pass\" | \"warn\" | \"fail\" | \"skip\";\n\nexport interface DoctorCheck {\n /** Stable id (`config` | `gateway` | `api-key` | `origin` | `rate-limit` | `data-read` | `payments`). */\n id: string;\n title: string;\n status: DoctorCheckStatus;\n detail: string;\n /** One-line remediation, present when `status` isn't `pass`. */\n fix?: string;\n}\n\nexport interface DoctorReport {\n /** True when no check failed (warnings and skips are tolerated). */\n ok: boolean;\n checks: DoctorCheck[];\n /** Echoed back so the CLI can show what it probed. */\n baseUrl: string;\n /** From a successful ping — the key's brand + mode. */\n brandId?: string;\n mode?: \"live\" | \"test\";\n}\n\nexport interface DoctorOptions {\n apiKey: string;\n baseUrl: string;\n /**\n * The deployed site origin. Origin allow-listing is enforced by the gateway\n * only for browser requests (Origin is a forbidden header from Node), so this\n * can be actively verified only in a browser; from Node it informs the\n * skip-guidance message.\n */\n origin?: string;\n /** Skip the (anonymous) data-plane read even when a brand is known. */\n skipDataRead?: boolean;\n /** Injectable transport (tests / SSR polyfills). */\n fetch?: FetchLike;\n}\n\nconst GATEWAY_SUFFIX = \"/api/public/v1\";\n\n/** Run the readiness checks and return a structured report. Never throws — every\n * failure mode is captured as a check. */\nexport async function runDoctor(options: DoctorOptions): Promise<DoctorReport> {\n const checks: DoctorCheck[] = [];\n const report: DoctorReport = { ok: true, checks, baseUrl: options.baseUrl };\n\n // 1) config — can we even build a client?\n const configIssues: string[] = [];\n if (!options.apiKey) configIssues.push(\"`apiKey` is empty\");\n let parsedUrl: URL | null = null;\n try {\n parsedUrl = new URL(options.baseUrl);\n } catch {\n configIssues.push(\"`baseUrl` is not a valid URL\");\n }\n if (configIssues.length > 0) {\n checks.push({\n id: \"config\",\n title: \"Client configuration\",\n status: \"fail\",\n detail: `${configIssues.join(\"; \")}.`,\n fix: \"Pass a brand API key and the gateway base URL, e.g. https://<deployment>.convex.site/api/public/v1\",\n });\n report.ok = false;\n return report; // can't probe without a valid client config\n }\n\n const urlMisaimed =\n parsedUrl !== null && !parsedUrl.pathname.replace(/\\/+$/, \"\").endsWith(GATEWAY_SUFFIX);\n checks.push({\n id: \"config\",\n title: \"Client configuration\",\n status: urlMisaimed ? \"warn\" : \"pass\",\n detail: urlMisaimed\n ? `baseUrl \"${options.baseUrl}\" doesn't end with ${GATEWAY_SUFFIX} — it should point at the gateway, not the site root.`\n : \"API key present; base URL well-formed.\",\n fix: urlMisaimed ? `Use the gateway URL, e.g. ${parsedUrl?.origin}${GATEWAY_SUFFIX}` : undefined,\n });\n\n const client = createBowlosClient({\n apiKey: options.apiKey,\n baseUrl: options.baseUrl,\n fetch: options.fetch,\n });\n\n // 2) one ping covers: gateway reachable + key valid + (browser) origin + rate-limit.\n let ping: PingResult | null = null;\n try {\n ping = await client.ping();\n report.brandId = ping.brandId;\n report.mode = ping.mode;\n checks.push({\n id: \"gateway\",\n title: \"Gateway reachable\",\n status: \"pass\",\n detail: `Reached ${options.baseUrl} (service \"${ping.service}\", ${ping.version}).`,\n });\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"pass\",\n detail: `Key valid for brand ${ping.brandId} — mode: ${ping.mode}.`,\n });\n } catch (e) {\n const err = e instanceof BowlosApiError ? e : null;\n const code = err?.code ?? BOWLOS_ERROR_CODES.UNKNOWN;\n // A network error (status 0) or a router 404 means no real gateway answered;\n // any other coded envelope means the gateway responded (and judged the key).\n const reached =\n err !== null && err.status !== 0 && code !== BOWLOS_ERROR_CODES.NETWORK_ERROR && code !== BOWLOS_ERROR_CODES.NOT_FOUND;\n\n checks.push({\n id: \"gateway\",\n title: \"Gateway reachable\",\n status: reached ? \"pass\" : \"fail\",\n detail: reached\n ? `Reached ${options.baseUrl}.`\n : code === BOWLOS_ERROR_CODES.NETWORK_ERROR\n ? `Could not reach ${options.baseUrl} (network error).`\n : `No public-API gateway responded at ${options.baseUrl}.`,\n fix: reached\n ? undefined\n : \"Check the base URL, that the Convex deployment is live, and that the public-API routes are deployed.\",\n });\n\n if (code === BOWLOS_ERROR_CODES.RATE_LIMITED) {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"pass\",\n detail: \"Key accepted (this probe was rate-limited).\",\n });\n checks.push({\n id: \"rate-limit\",\n title: \"Rate-limit headroom\",\n status: \"warn\",\n detail: `Currently rate-limited${err?.retryAfterSeconds ? ` — retry after ${err.retryAfterSeconds}s` : \"\"}.`,\n fix: \"Back off and retry; raise the key's per-minute limit if your real traffic is higher.\",\n });\n } else if (code === BOWLOS_ERROR_CODES.ORIGIN_NOT_ALLOWED) {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"pass\",\n detail: \"Key accepted; the request was blocked on origin.\",\n });\n checks.push({\n id: \"origin\",\n title: \"Origin allow-listed\",\n status: \"fail\",\n detail: \"The request origin is not on the key's allow-list.\",\n fix: `Add your site origin${options.origin ? ` (${options.origin})` : \"\"} to the API key's allowed origins.`,\n });\n } else if (reached) {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"fail\",\n detail:\n code === BOWLOS_ERROR_CODES.API_KEY_INVALID || code === BOWLOS_ERROR_CODES.API_KEY_MISSING\n ? \"The gateway rejected the API key.\"\n : `The gateway returned ${code}.`,\n fix: \"Mint or rotate a brand API key in the operator admin (Super-Admin → API keys) and use that value.\",\n });\n } else {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"skip\",\n detail: \"Skipped — the gateway wasn't reachable.\",\n });\n }\n }\n\n // 3) origin — only actively verifiable in a browser (Origin is a forbidden\n // header from Node). A successful ping in a browser means the current\n // origin IS allow-listed; otherwise skip with guidance.\n if (!checks.some((c) => c.id === \"origin\")) {\n const browserOrigin =\n typeof window !== \"undefined\" && typeof window.location?.origin === \"string\"\n ? window.location.origin\n : null;\n if (ping !== null && browserOrigin !== null) {\n checks.push({\n id: \"origin\",\n title: \"Origin allow-listed\",\n status: \"pass\",\n detail: `This origin (${browserOrigin}) is allow-listed for the key.`,\n });\n } else {\n checks.push({\n id: \"origin\",\n title: \"Origin allow-listed\",\n status: \"skip\",\n detail: \"Origin allow-listing is enforced only for browser requests, so it can't be verified from a CLI.\",\n fix: `Ensure your deployed site origin${options.origin ? ` (${options.origin})` : \"\"} is on the key's allowed-origins list; load the site and watch for ORIGIN_NOT_ALLOWED.`,\n });\n }\n }\n\n // 4) data plane — a cheap anonymous read proves gateway → manifest → query → scope.\n if (ping !== null && options.skipDataRead !== true) {\n try {\n const data = await client.call<unknown>(\"listPublicCenters\", { brandId: ping.brandId });\n const innerError = typeof data === \"object\" && data !== null && (data as { ok?: boolean }).ok === false;\n checks.push({\n id: \"data-read\",\n title: \"Data passthrough\",\n status: innerError ? \"warn\" : \"pass\",\n detail: innerError\n ? \"Reached the data plane, but listPublicCenters returned an error envelope.\"\n : \"Anonymous read (listPublicCenters) succeeded — gateway → query passthrough works.\",\n fix: innerError ? \"Confirm the brand has at least one published center.\" : undefined,\n });\n } catch (e) {\n const err = e instanceof BowlosApiError ? e : null;\n checks.push({\n id: \"data-read\",\n title: \"Data passthrough\",\n status: \"warn\",\n detail: `An anonymous read failed${err ? ` (${err.code})` : \"\"}.`,\n fix: \"Key + gateway are fine; this read may need a published center or differ by brand. Safe to ignore if your booking reads work.\",\n });\n }\n } else if (ping === null) {\n checks.push({\n id: \"data-read\",\n title: \"Data passthrough\",\n status: \"skip\",\n detail: \"Skipped — needs a reachable gateway.\",\n });\n }\n\n // 5) payments — Stripe Connect status isn't exposed over the public API yet.\n // Honest skip (no faked pass) so the operator knows to verify it elsewhere.\n checks.push({\n id: \"payments\",\n title: \"Payments connected\",\n status: \"skip\",\n detail: \"Stripe Connect status isn't exposed over the public API yet, so the doctor can't verify it here.\",\n fix: \"Confirm the operator's Stripe account is connected + charges-enabled in the admin (Payments → Connect).\",\n });\n\n report.ok = !checks.some((c) => c.status === \"fail\");\n return report;\n}\n","/**\n * Typed account + flash reads for @bowlos/reservations.\n *\n * Session-scoped account reads (require a signed-in customer) and the\n * session-aware flash-sale reads. Args are typed precisely — every account read\n * is brand-scoped. Results are generic (`<T = unknown>`): parameterize with your\n * own shape, or read `unknown` and narrow. (The backend return shapes are rich\n * and evolving; the SDK doesn't pin them here.) Each read has a framework-agnostic\n * function here and a React hook in `hooks.tsx`.\n */\nimport type { BowlosClient } from \"./client\";\n\n/** Every account read is scoped to the customer's Brand. */\nexport type BrandScoped = { brandId: string };\nexport type ReservationDetailArgs = { brandId: string; displayId: string };\nexport type EventOrderDetailArgs = { brandId: string; orderId: string };\nexport type MembershipDetailArgs = { brandId: string; membershipId: string };\nexport type FlashSaleArgs = { slug: string };\nexport type FlashBookingOptionsArgs = { slug: string; itemId: string };\nexport type FlashSalesArgs = { brandId: string };\n\n// ── account (require a signed-in customer) ───────────────────────────────────\n\nexport function getMyReservations<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyReservations\", args, { auth: true });\n}\n\nexport function getMyReservationDetail<T = unknown>(\n client: BowlosClient,\n args: ReservationDetailArgs,\n): Promise<T> {\n return client.call<T>(\"getMyReservationDetail\", args, { auth: true });\n}\n\nexport function getMyEventOrders<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyEventOrders\", args, { auth: true });\n}\n\nexport function getMyEventOrder<T = unknown>(\n client: BowlosClient,\n args: EventOrderDetailArgs,\n): Promise<T> {\n return client.call<T>(\"getMyEventOrder\", args, { auth: true });\n}\n\nexport function getMyMemberships<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyMemberships\", args, { auth: true });\n}\n\nexport function getMyMembershipDetail<T = unknown>(\n client: BowlosClient,\n args: MembershipDetailArgs,\n): Promise<T> {\n return client.call<T>(\"getMyMembershipDetail\", args, { auth: true });\n}\n\nexport function getMyLoyalty<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"getMyLoyalty\", args, { auth: true });\n}\n\nexport function getMyCredits<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyCredits\", args, { auth: true });\n}\n\nexport function getMyPasses<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyPasses\", args, { auth: true });\n}\n\nexport function getMyGameCards<T = MyGameCard[]>(\n client: BowlosClient,\n args: BrandScoped,\n): Promise<T> {\n return client.call<T>(\"listMyGameCards\", args, { auth: true });\n}\n\n// ── self-serve cancel (v0.23.0): preview + cancel for all four types ─────────\n//\n// Flow per type: preview(\"what you'll get back\") → confirm → cancel.\n// Money rule: store credit per the Center's cancellation policy; card refunds\n// are staff-only. Game cards are cancellable ONLY while fully unused (locked\n// rule) → full credit. The previewed amount is advisory (computed at view\n// time); the cancel re-computes authoritatively at confirm — re-preview right\n// before confirming if the page sat open. Cancel is safe to retry: a second\n// call on an already-cancelled item returns a NOT/​VALIDATION error (the credit\n// ledger dedupes, so no double credit), which the hooks surface as such.\n\n/** Outcome preview shared by all four cancel types. `bucket`/`hoursBeforeStart`/\n * `forfeitCents` are inert (null/0) for game cards (no time policy). */\nexport interface CancelPreview {\n cancellable: boolean;\n reason: string | null;\n bucket: string | null;\n hoursBeforeStart: number;\n creditCents: number;\n forfeitCents: number;\n paidCents: number;\n}\n\nexport interface CancelResult {\n id: string;\n status: string;\n creditCents: number;\n bucket?: string | null;\n hoursBeforeStart?: number;\n forfeitCents?: number;\n version?: number;\n}\n\nexport interface MyGameCard {\n id: string;\n displayId: string;\n cardName: string;\n status: \"active\" | \"depleted\" | \"expired\" | \"cancelled\" | \"refunded\";\n totalGames: number;\n remainingGames: number;\n shoesIncluded: boolean;\n purchasedAt: number;\n expiresAt: number;\n paidCents: number;\n /** Precomputed unused-only rule; the per-card preview is the source of truth. */\n cancellable: boolean;\n}\n\nexport type ReservationCancelArgs = {\n brandId: string;\n reservationId: string;\n expectedVersion: number;\n reason?: string;\n /** Per-attempt key; safe to retry. */\n idempotencyKey: string;\n};\nexport type OrderCancelArgs = {\n brandId: string;\n orderId: string;\n reason?: string;\n idempotencyKey: string;\n};\nexport type GameCardCancelArgs = {\n brandId: string;\n cardId: string;\n reason?: string;\n idempotencyKey: string;\n};\n\nexport function previewReservationCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; reservationId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyCancellation\", args, { auth: true });\n}\nexport function previewEventOrderCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; orderId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyEventOrderCancellation\", args, { auth: true });\n}\nexport function previewPackageOrderCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; orderId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyPackageOrderCancellation\", args, { auth: true });\n}\nexport function previewGameCardCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; cardId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyGameCardCancellation\", args, { auth: true });\n}\n\nexport function cancelMyReservation<T = CancelResult>(\n client: BowlosClient,\n args: ReservationCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyReservation\", args, { auth: true });\n}\nexport function cancelMyEventOrder<T = CancelResult>(\n client: BowlosClient,\n args: OrderCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyEventOrder\", args, { auth: true });\n}\nexport function cancelMyPackageOrder<T = CancelResult>(\n client: BowlosClient,\n args: OrderCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyPackageOrder\", args, { auth: true });\n}\nexport function cancelMyGameCard<T = CancelResult>(\n client: BowlosClient,\n args: GameCardCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyGameCard\", args, { auth: true });\n}\n\n// ── flash sales (session-aware: members see prices) ──────────────────────────\n\nexport function getFlashSale<T = unknown>(client: BowlosClient, args: FlashSaleArgs): Promise<T> {\n return client.call<T>(\"getPublicFlashSaleBySlug\", args, { auth: true });\n}\n\n/** The public flash-sale index for a Brand (live + upcoming; no prices). Public. */\nexport function getFlashSales<T = unknown>(client: BowlosClient, args: FlashSalesArgs): Promise<T> {\n return client.call<T>(\"listPublicFlashSales\", args);\n}\n\nexport function getFlashSaleBookingOptions<T = unknown>(\n client: BowlosClient,\n args: FlashBookingOptionsArgs,\n): Promise<T> {\n return client.call<T>(\"getFlashSaleBookingOptions\", args, { auth: true });\n}\n\nexport type CreateFlashSaleBookingArgs = {\n slug: string;\n itemId: string;\n dateISO: string;\n startMinuteOfDay: number;\n durationMinutes: number;\n units: number;\n /** Per-attempt key; replays return the original checkout. */\n idempotencyKey: string;\n};\n\nexport interface FlashSaleBookingResult {\n /** Handle for the rest of the checkout: mint the PaymentIntent with\n * `createCheckoutPaymentIntent(client, { refToken })`, then poll\n * `getCheckoutStatus(client, refToken)` to materialization. */\n refToken: string;\n /** The SALE-priced total the PaymentIntent charges (base at the flash\n * price + tax + the Center fee). */\n amountDueCents: number;\n holdExpiresAt: number;\n breakdown: {\n /** Tier savings already removed from baseSubtotalCents; do not subtract again. */\n tierDiscountCents: number;\n baseSubtotalCents: number;\n reservationFeeCents: number;\n reservationFeeLabel: string | null;\n taxAddedCents: number;\n taxIncludedCents: number;\n totalCents: number;\n };\n}\n\n/**\n * v0.22.1 — book a flash-sale reservation item at its SALE price (the flash\n * analog of `eventOfferSlug`: the server binds the item's sale price, holds\n * the inventory, and opens a checkout). Signed-in customers only. Pick the\n * date/time from `getFlashSaleBookingOptions` — the purpose-built option\n * list — never the regular booking calendar.\n */\nexport function createFlashSaleBooking(\n client: BowlosClient,\n args: CreateFlashSaleBookingArgs,\n): Promise<FlashSaleBookingResult> {\n return client.call<FlashSaleBookingResult>(\"createFlashSaleBooking\", args, {\n auth: true,\n });\n}\n\n/** Saved cards belong to the active location's connected Stripe account. */\nexport type SavedCardScope = { brandId: string; centerId: string };\nexport type SavedCardArgs = SavedCardScope & { paymentMethodId: string };\nexport interface SavedCard {\n id: string;\n brand: string;\n last4: string;\n expMonth: number;\n expYear: number;\n isDefault: boolean;\n}\nexport interface SavedCardsResult {\n methods: SavedCard[];\n chargeable: boolean;\n}\nexport interface CardSetupResult {\n clientSecret: string;\n publishableKey: string;\n stripeAccount: string;\n stripeMode: \"test\" | \"live\";\n merchantDisplayName: string;\n}\nexport type ChangePasswordArgs = { currentPassword: string; newPassword: string };\n\nexport function listSavedCards(\n client: BowlosClient,\n args: SavedCardScope,\n): Promise<SavedCardsResult> {\n return client.call(\"listMyPaymentMethods\", args, { auth: true });\n}\nexport function createCardSetup(\n client: BowlosClient,\n args: SavedCardScope,\n): Promise<CardSetupResult> {\n return client.call(\"createSetupIntentForAddingCard\", args, { auth: true });\n}\nexport function removeSavedCard(\n client: BowlosClient,\n args: SavedCardArgs,\n): Promise<{ detached: boolean }> {\n return client.call(\"detachPaymentMethod\", args, { auth: true });\n}\nexport function setDefaultCard(\n client: BowlosClient,\n args: SavedCardArgs,\n): Promise<{ ok: boolean }> {\n return client.call(\"setDefaultPaymentMethod\", args, { auth: true });\n}\n/** Success invalidates all sessions; discard local tokens and show sign-in. */\nexport async function changePassword(\n client: BowlosClient,\n args: ChangePasswordArgs,\n): Promise<{ ok: true }> {\n const result = await client.call<{ ok: true }>(\"changeMyPassword\", args, { auth: true });\n await client.signOut();\n return result;\n}\n","/**\n * Public catalog reads for @bowlos/reservations — the \"what can I book/buy here\"\n * surface that powers `<BookingCatalog>`. All anonymous (no customer login).\n * Products + events + memberships are Center-scoped; packages + game cards are\n * Brand-scoped (with an optional Center filter). Results are generic (`<T>`);\n * the component types the display fields it needs.\n */\nimport type { BowlosClient } from \"./client\";\n\nexport type CenterScoped = { centerId: string };\nexport type BrandCatalogArgs = { brandId: string; centerId?: string };\n\n// ── canonical catalog (listPublicCatalog) ─────────────────────────────────────\n// The one read that returns every category grouped + per-surface visibility\n// already applied. Prefer this over the per-category lists below when you want\n// the full, admin-controlled catalog for a surface. Types mirror the backend\n// wire shape (`@bowlos/shared` public-catalog).\n\n/** Which public surface is asking — the backend applies that surface's\n * per-category + per-offer visibility before returning. */\nexport type PublicSurface = \"sdk_custom_site\" | \"white_label_web\" | \"mobile_app\";\n\nexport type CatalogCategory =\n | \"bowling\"\n | \"other_attractions\"\n | \"events\"\n | \"packages\"\n | \"memberships\"\n | \"game_passes\";\n\nexport type CatalogActionType =\n | \"book_reservation\"\n | \"view_event\"\n | \"buy_ticket\"\n | \"buy_package\"\n | \"buy_membership\"\n | \"buy_game_pass\";\n\nexport type CatalogSourceTable =\n | \"products\"\n | \"event_offers\"\n | \"packages\"\n | \"membership_templates\"\n | \"game_card_templates\";\n\n/** A normalized, surface-agnostic catalog item. Route by `action.type`, using\n * the IDs in `action.payload` (e.g. `productId`, `slug`, `packageId`,\n * `templateId`). `priceLabel` is an indicative \"from $X\" only (null for\n * products — show \"See times & pricing\"); the binding price comes from the\n * per-category preview after login. */\nexport interface CatalogItem {\n id: string;\n category: CatalogCategory;\n sourceTable: CatalogSourceTable;\n sourceId: string;\n title: string;\n subtitle?: string | null;\n description?: string | null;\n priceLabel?: string | null;\n imageUrl?: string | null;\n badgeLabel?: string | null;\n action: { type: CatalogActionType; payload: Record<string, string> };\n}\n\nexport interface CatalogSection {\n key: CatalogCategory;\n label: string;\n items: CatalogItem[];\n}\n\nexport interface CatalogResult {\n sections: CatalogSection[];\n /**\n * Date-first booking (v0.24.0): the Center's default booking entry point.\n * Open your funnel on this; let the customer toggle to the other. Optional —\n * older gateways omit it (treat absent as `\"product_first\"`).\n */\n bookingEntryDefault?: \"product_first\" | \"date_first\";\n /** Center-local \"today\" (YYYY-MM-DD) — default + minimum for a date-first\n * date picker, so you don't guess the Center's timezone. Optional. */\n todayISO?: string;\n /**\n * Full Test Mode (2026-06-23): true when the operator has put this Center in\n * test mode. Render a customer-facing \"Maintenance mode\" notice (use\n * `<MaintenanceBanner>` or `useTestMode()`); normal customers' bookings are\n * server-refused (`CENTER_IN_MAINTENANCE`) — only admin Test-Account customers\n * transact. Absent on older gateways → false.\n */\n maintenanceMode?: boolean;\n}\n\n/** Args for the canonical catalog read. `surface` selects which visibility\n * rules the backend applies. */\nexport type CatalogArgs = {\n brandId: string;\n centerId: string;\n surface: PublicSurface;\n};\n\n/**\n * The canonical public catalog for a surface — every active, public,\n * bookable/sellable item grouped into the six first-class categories, with the\n * Center admin's per-surface category + offer visibility already applied.\n * Anonymous. This is the recommended way to list \"everything bookable here\":\n * one call, all categories, visibility-aware, consistent with the white-label\n * web + mobile surfaces.\n */\nexport function listCatalog<T = CatalogResult>(\n client: BowlosClient,\n args: CatalogArgs,\n): Promise<T> {\n return client.call<T>(\"listPublicCatalog\", args);\n}\n/** One package's full detail. `shareToken` reveals a hidden/unlisted package. */\nexport type PackageDetailArgs = { packageId: string; shareToken?: string };\n/** Args for a Center's operating-hours window on a date, across attraction types. */\nexport type CenterHoursArgs = { centerId: string; attractionTypeKeys: string[]; dateISO: string };\n\n/** Bookable products at a Center (each carries its attraction + `attractionTypeKey`). */\nexport function listProducts<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T> {\n return client.call<T>(\"listPublicProducts\", args);\n}\n\n/** Upcoming pricing events (NYE Bash, tournaments…) at a Center. */\nexport function listEvents<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T> {\n return client.call<T>(\"listPublicEvents\", args);\n}\n\n/** Sellable event offers at a Center. These are the public lineup + event\n * landing-page records; use this instead of `listEvents` when routing a\n * customer to an event purchase flow. */\nexport function listEventOffers<T = import(\"./toolkit-types\").EventOffer[]>(\n client: BowlosClient,\n args: CenterScoped & { includeWithoutLandingPage?: boolean },\n): Promise<T> {\n return client.call<T>(\"listPublicEventOffers\", args);\n}\n\n/** One sellable event offer by landing-page slug. */\nexport function getEventOffer<T = unknown>(\n client: BowlosClient,\n args: { slug: string },\n): Promise<T> {\n return client.call<T>(\"getPublicEventOffer\", args);\n}\n\n/** Purchasable packages at a Brand. */\nexport function listPackages<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T> {\n return client.call<T>(\"listPublicPackages\", args);\n}\n\n/** Full detail for one package — components, optional add-ons, allowed start\n * times, duration, and quantity bounds. Drives the headless package config UI\n * (see HEADLESS.md → \"Buying a package\"). */\nexport function getPackage<T = unknown>(client: BowlosClient, args: PackageDetailArgs): Promise<T> {\n return client.call<T>(\"getPublicPackage\", args);\n}\n\n/** A Center's combined open/close window (minutes-from-midnight) for the given\n * attraction types on a date — the intersection across types; `null` if closed.\n * Bound a package's start times with its component attraction-type keys. */\nexport function getCenterHours<T = unknown>(client: BowlosClient, args: CenterHoursArgs): Promise<T> {\n return client.call<T>(\"getCenterOperatingHoursForTypes\", args);\n}\n\n/** Purchasable memberships at a Center. */\nexport function listPublicMemberships<T = unknown>(\n client: BowlosClient,\n args: CenterScoped,\n): Promise<T> {\n return client.call<T>(\"listPublicMemberships\", args);\n}\n\n/** Purchasable game cards / passes at a Brand. */\nexport function listGameCards<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T> {\n return client.call<T>(\"listPublicGameCards\", args);\n}\n\n// ── retail pricing (listRetailPricing) ────────────────────────────────────────\n// v0.31.0: a center's public price list — \"walk-in\" rates (the pricing matrix,\n// grouped by attraction) plus opted-in \"website specials\". Read-only, anonymous.\n// Drives the headless `useRetailPricing` hook + the reference `<PricingTable>`.\n\n/** A pricing mode an attraction charges in. */\nexport type RetailPricingMode =\n | \"per_unit_per_hour\"\n | \"per_person_per_hour\"\n | \"per_game\";\n\n/** One matrix row — a day-of-week + time band with per-mode rates. */\nexport interface RetailWalkInRate {\n dayOfWeek: number; // 0=Sun..6=Sat\n startMinuteOfDay: number;\n endMinuteOfDay: number;\n label: string | null;\n rateUnitHourCents: number | null;\n ratePersonHourCents: number | null;\n rateGameCents: number | null;\n}\n\n/** Walk-in rates grouped by attraction. */\nexport interface RetailAttraction {\n attractionId: string;\n name: string;\n typeKey: string;\n enabledModes: RetailPricingMode[];\n unitLabelSingular: string;\n unitLabelPlural: string;\n walkInRates: RetailWalkInRate[];\n}\n\n/** A featured \"website special\" (an opted-in price plan). */\nexport interface RetailSpecial {\n planId: string;\n name: string;\n description: string;\n priceCents: number | null;\n attractionId: string;\n attractionName: string;\n /** Seasonal window (YYYY-MM-DD) when set — label/hide out of season. */\n effectiveStartDate: string | null;\n effectiveEndDate: string | null;\n}\n\n/** The full retail-pricing payload for a Center. */\nexport interface RetailPricing {\n centerName: string;\n attractions: RetailAttraction[];\n specials: RetailSpecial[];\n}\n\n/** A Center's public price list: walk-in (matrix) rates + website specials.\n * Read-only, anonymous — drives a printed-menu-style pricing page that always\n * matches the operator's live config. Not a booking surface. */\nexport function listRetailPricing<T = RetailPricing>(\n client: BowlosClient,\n args: CenterScoped,\n): Promise<T> {\n return client.call<T>(\"listRetailPricing\", args);\n}\n","/**\n * Package scheduling helpers — start-time resolution for headless sites.\n *\n * A package can offer different discrete start times per weekday (e.g.\n * Sun 2:30/5:00, M–Th 5:30, Fri 5:30/8:00, Sat 12/3/6). `getPublicPackage`\n * returns that as `startTimesByWeekday`; this resolves a booking date's\n * weekday to the exact bookable minutes so your slot picker shows only\n * that day's times.\n *\n * Mirrors the server's canonical rule (`@bowlos/shared`\n * resolvePackageStartTimesForWeekday) — kept as an independent copy\n * because the SDK ships with no `@bowlos/shared` runtime dependency. The\n * buy mutation enforces the same rule, so a stale/tampered start time is\n * rejected server-side regardless.\n */\n\nexport type PackageAddonMode = \"included\" | \"optional\";\n\n/**\n * A package add-on as returned by `getPublicPackage` / `usePackage`\n * (`pkg.addons[]`). The load-bearing field is **`mode`**:\n *\n * - `\"included\"` — comes with the package at `includedQuantity` and is already\n * inside the base price. Render it read-only; it is NOT customer-adjustable\n * and must NOT be sent in `optionalAddons`.\n * - `\"optional\"` — a paid up-sell the customer may add (0..`maxOptionalQuantity`).\n * These, and only these, go in the `optionalAddons` argument.\n */\nexport interface PackageAddon {\n id: string;\n name: string;\n description?: string | null;\n mode: PackageAddonMode;\n quantityRule?: \"fixed\" | \"per_guest\" | null;\n includedQuantity?: number | null;\n pricePerUnitCents?: number | null;\n maxOptionalQuantity?: number | null;\n inventoryAttractionTypeKey?: string | null;\n inventoryUnitsPerQuantity?: number | null;\n}\n\n/**\n * Split a package's add-ons for rendering: `included` are part of the base\n * (show read-only, e.g. \"Included: 2× Pizza\"), `optional` are the paid extras\n * (show a 0..`maxOptionalQuantity` stepper). Never render an `included` add-on\n * as an editable/priced stepper.\n */\nexport function splitPackageAddons(addons: readonly PackageAddon[] | null | undefined): {\n included: PackageAddon[];\n optional: PackageAddon[];\n} {\n const included: PackageAddon[] = [];\n const optional: PackageAddon[] = [];\n for (const a of addons ?? []) {\n (a.mode === \"optional\" ? optional : included).push(a);\n }\n return { included, optional };\n}\n\n/**\n * Build the `optionalAddons` argument for `previewPackageOrder` /\n * `createPackageOrder` from a `{ addonId -> quantity }` map — SAFELY. Only\n * `\"optional\"`-mode add-ons of this package pass; quantities are coerced to\n * positive integers and capped at `maxOptionalQuantity`; included add-ons,\n * unknown ids, and zero/negative/non-finite quantities are dropped.\n *\n * This makes the `VALIDATION_FAILED — Add-on \"X\" is not optional` failure\n * impossible from the client: even if your UI wires a quantity for an included\n * add-on, it never reaches the request. Always build the request through this\n * helper rather than hand-mapping the quantity state.\n */\nexport function toOptionalAddonsInput(\n addons: readonly PackageAddon[] | null | undefined,\n quantities: Record<string, number> | null | undefined,\n): Array<{ addonId: string; quantity: number }> {\n const optionalById = new Map(\n (addons ?? []).filter((a) => a.mode === \"optional\").map((a) => [a.id, a]),\n );\n const out: Array<{ addonId: string; quantity: number }> = [];\n for (const [addonId, raw] of Object.entries(quantities ?? {})) {\n const a = optionalById.get(addonId);\n if (!a) continue; // not an optional add-on of this package → drop\n let q = Math.floor(Number(raw));\n if (!Number.isFinite(q) || q <= 0) continue;\n if (typeof a.maxOptionalQuantity === \"number\" && a.maxOptionalQuantity > 0) {\n q = Math.min(q, a.maxOptionalQuantity);\n }\n out.push({ addonId, quantity: q });\n }\n return out;\n}\n\nexport interface PackageWeekdayStartTimes {\n /** 0=Sun .. 6=Sat. */\n dayOfWeek: number;\n /** Allowed start minutes-of-day for that weekday ([0, 1439]). */\n startTimes: number[];\n}\n\nexport interface PackageScheduleShape {\n startTimesByWeekday?: PackageWeekdayStartTimes[] | null;\n allowedStartTimes?: number[] | null;\n applicabilityDays?: number[] | null;\n}\n\n/** True when the package opts into the per-weekday start-time model. */\nexport function usesPerWeekdayStartTimes(\n pkg: Pick<PackageScheduleShape, \"startTimesByWeekday\">,\n): boolean {\n return !!pkg.startTimesByWeekday && pkg.startTimesByWeekday.length > 0;\n}\n\n/**\n * Weekday (0=Sun..6=Sat) for a YYYY-MM-DD date string, parsed at UTC\n * midnight so the result is stable regardless of the browser's zone —\n * the same convention the server uses for Center-local dates.\n */\nexport function weekdayForDateISO(dateISO: string): number {\n const [y, m, d] = dateISO.split(\"-\").map(Number);\n return new Date(Date.UTC(y, m - 1, d)).getUTCDay();\n}\n\n/**\n * Resolve the discrete bookable start minutes for a weekday.\n *\n * - `null` — no discrete restriction (continuous grid); apply the\n * Center's open window yourself.\n * - `[]` — explicitly NOT bookable that weekday.\n * - `number[]` — the exact allowed start minutes (sorted ascending).\n */\nexport function resolvePackageStartTimesForWeekday(\n pkg: PackageScheduleShape,\n dayOfWeek: number,\n): number[] | null {\n if (pkg.startTimesByWeekday && pkg.startTimesByWeekday.length > 0) {\n const entry = pkg.startTimesByWeekday.find((e) => e.dayOfWeek === dayOfWeek);\n if (!entry || entry.startTimes.length === 0) return [];\n return [...entry.startTimes].sort((a, b) => a - b);\n }\n if (\n pkg.applicabilityDays &&\n pkg.applicabilityDays.length > 0 &&\n !pkg.applicabilityDays.includes(dayOfWeek)\n ) {\n return [];\n }\n if (pkg.allowedStartTimes && pkg.allowedStartTimes.length > 0) {\n return [...pkg.allowedStartTimes].sort((a, b) => a - b);\n }\n return null;\n}\n","import type { BowlosClient } from \"./client\";\nimport type * as T from \"./toolkit-types\";\nexport type * from \"./toolkit-types\";\n\nexport function listBrandEventOffers(\n client: BowlosClient,\n args: T.ListBrandEventOffersArgs,\n): Promise<T.ListBrandEventOffersResult> {\n return client.call<T.ListBrandEventOffersResult>(\"listPublicEventOffersForBrand\", args, {\n auth: false,\n });\n}\n\nexport function getMyGameCard(\n client: BowlosClient,\n args: T.GetMyGameCardArgs,\n): Promise<T.GetMyGameCardResult> {\n return client.call<T.GetMyGameCardResult>(\"getMyGameCard\", args, { auth: true });\n}\n\nexport function getMyGameCardRedemptions(\n client: BowlosClient,\n args: T.GetMyGameCardArgs,\n): Promise<T.GameCardRedemption[]> {\n return client.call<T.GameCardRedemption[]>(\"getMyGameCardRedemptions\", args, { auth: true });\n}\n\nexport function getMyGameCardHistory(\n client: BowlosClient,\n args: T.GetMyGameCardHistoryArgs,\n): Promise<T.GetMyGameCardHistoryResult> {\n return client.call<T.GetMyGameCardHistoryResult>(\"getMyGameCardRedemptionsPage\", args, {\n auth: true,\n });\n}\n\nexport function getWalletPassUrl(\n client: BowlosClient,\n args: T.GetWalletPassUrlArgs,\n): Promise<T.GetWalletPassUrlResult> {\n return client.call<T.GetWalletPassUrlResult>(\"getMyWalletPassUrl\", args, { auth: true });\n}\n\nexport function getMyHold(client: BowlosClient, args: T.MyHoldArgs): Promise<T.MyHold> {\n return client.call<T.MyHold>(\"getMyHoldGroup\", args, { auth: true });\n}\n\nexport function extendMyHold(\n client: BowlosClient,\n args: T.MyHoldArgs,\n): Promise<{ expiresAt: number }> {\n return client.call<{ expiresAt: number }>(\"customerExtendMyHold\", args, { auth: true });\n}\n\nexport function releaseMyHold(client: BowlosClient, args: T.MyHoldArgs): Promise<null> {\n return client.call<null>(\"customerReleaseMyHold\", args, { auth: true });\n}\n\nexport function requestEmailVerification(\n client: BowlosClient,\n args: T.EmailVerificationArgs,\n): Promise<T.RequestEmailVerificationResult> {\n return client.call<T.RequestEmailVerificationResult>(\"requestEmailVerification\", args, {\n auth: true,\n });\n}\n\nexport function confirmEmailVerification(\n client: BowlosClient,\n args: T.EmailVerificationTokenArgs,\n): Promise<{ ok: true }> {\n return client.call<{ ok: true }>(\"confirmEmailVerification\", args, { auth: true });\n}\n\nexport function getEmailVerificationStatus(\n client: BowlosClient,\n args: T.EmailVerificationTokenArgs,\n): Promise<T.EmailVerificationStatus> {\n return client.call<T.EmailVerificationStatus>(\"getEmailVerificationStatus\", args, { auth: true });\n}\n\nexport function getEmailVerificationSendState(\n client: BowlosClient,\n args: T.EmailVerificationSendStateArgs,\n): Promise<T.EmailVerificationSendState> {\n return client.call<T.EmailVerificationSendState>(\"getEmailVerificationSendState\", args, {\n auth: true,\n });\n}\n\nexport function getCancellationPolicy(\n client: BowlosClient,\n args: T.GetCancellationPolicyArgs,\n): Promise<T.CancellationPolicy> {\n return client.call<T.CancellationPolicy>(\"getCancellationPolicy\", args, { auth: false });\n}\n\nexport function cancelMyPendingBooking(\n client: BowlosClient,\n args: T.CancelMyPendingBookingArgs,\n): Promise<T.CancelMyPendingBookingResult> {\n return client.call<T.CancelMyPendingBookingResult>(\"cancelMyPendingReservation\", args, {\n auth: true,\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/inquiry.ts","../src/doctor.ts","../src/account.ts","../src/catalog.ts","../src/packages.ts","../src/toolkit.ts"],"names":[],"mappings":";;;;;;;;AAmCA,eAAsB,cAAA,CACpB,OACA,MAAA,EAC0C;AAC1C,EAAA,MAAM,IAAA,GAAO,OAAO,OAAA,CACjB,OAAA,CAAQ,QAAQ,EAAE,CAAA,CAClB,OAAA,CAAQ,oBAAA,EAAsB,EAAE,CAAA;AACnC,EAAA,MAAM,IAAA,GAAO,KAAK,SAAA,CAAU;AAAA,IAC1B,SAAS,MAAA,CAAO,OAAA;AAAA,IAChB,UAAU,MAAA,CAAO,QAAA;AAAA,IACjB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Content":["import { signInquiryBody, type InquiryFormType } from \"@bowlos/shared\";\n\n/**\n * Inquiry forms (\"No Dead Ends\" #3) — the framework-free forwarder. A center\n * site's OWN server route (e.g. a Next.js Route Handler) receives the form\n * submission from `<InquiryForm>`, then calls `forwardInquiry` to HMAC-sign it\n * with the Center's secret and POST it to BowlOS. The secret lives only on the\n * server — never shipped to the browser — which is what makes the inbox\n * spam-proof. Re-exports the form registry so a headless site can build its own\n * form fields from the same source of truth the inbox formats.\n */\n\nexport { INQUIRY_FORMS } from \"@bowlos/shared\";\nexport type { InquiryFormType, InquiryFieldDef } from \"@bowlos/shared\";\n\nexport interface ForwardInquiryConfig {\n /** The Center's inquiry signing secret (from BowlOS admin). SERVER-SIDE ONLY. */\n secret: string;\n /** The same BowlOS base URL the SDK client uses (gateway base or convex.site root). */\n baseUrl: string;\n brandId: string;\n centerId: string;\n}\n\nexport interface ForwardInquiryInput {\n formType: InquiryFormType;\n fields: Record<string, unknown>;\n}\n\n/**\n * Sign + forward an inquiry to BowlOS. Returns the upstream `{ ok, status }`.\n * Throws only on a network failure (the caller maps a non-ok status to a\n * user-facing error). Derives the `/forms/inbound` endpoint from the gateway\n * base URL, so the integrator reuses values they already have plus the secret.\n */\nexport async function forwardInquiry(\n input: ForwardInquiryInput,\n config: ForwardInquiryConfig,\n): Promise<{ ok: boolean; status: number }> {\n const root = config.baseUrl\n .replace(/\\/+$/, \"\")\n .replace(/\\/api\\/public\\/v1$/, \"\");\n const body = JSON.stringify({\n brandId: config.brandId,\n centerId: config.centerId,\n formType: input.formType,\n fields: input.fields,\n });\n const signature = await signInquiryBody(config.secret, body);\n const res = await fetch(`${root}/forms/inbound`, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n \"X-Bowlos-Signature\": signature,\n },\n body,\n });\n return { ok: res.ok, status: res.status };\n}\n","/**\n * `runDoctor` — a setup-readiness oracle for a site built on @bowlos/reservations.\n *\n * It runs a short sequence of checks against a configured gateway + API key and\n * returns a structured report (pass / warn / fail / skip), each with a one-line\n * fix when it isn't a pass. The point is to make per-site setup self-debuggable\n * — it walks the failure modes a new center site actually hits, in order:\n * config → gateway reachable → API key valid → origin allow-listed → data plane.\n *\n * Framework-agnostic and dependency-free: it builds a `BowlosClient`, leans on\n * `client.ping()` (one call covers reachability + key + origin + rate-limit),\n * and reports honestly — checks it can't run from the current environment are\n * `skip`ped with guidance rather than faked. The `bowlos doctor` CLI is a thin\n * wrapper that pretty-prints the report.\n */\nimport { createBowlosClient } from \"./client\";\nimport { BowlosApiError, BOWLOS_ERROR_CODES } from \"./errors\";\nimport type { FetchLike, PingResult } from \"./types\";\n\nexport type DoctorCheckStatus = \"pass\" | \"warn\" | \"fail\" | \"skip\";\n\nexport interface DoctorCheck {\n /** Stable id (`config` | `gateway` | `api-key` | `origin` | `rate-limit` | `data-read` | `payments`). */\n id: string;\n title: string;\n status: DoctorCheckStatus;\n detail: string;\n /** One-line remediation, present when `status` isn't `pass`. */\n fix?: string;\n}\n\nexport interface DoctorReport {\n /** True when no check failed (warnings and skips are tolerated). */\n ok: boolean;\n checks: DoctorCheck[];\n /** Echoed back so the CLI can show what it probed. */\n baseUrl: string;\n /** From a successful ping — the key's brand + mode. */\n brandId?: string;\n mode?: \"live\" | \"test\";\n}\n\nexport interface DoctorOptions {\n apiKey: string;\n baseUrl: string;\n /**\n * The deployed site origin. Origin allow-listing is enforced by the gateway\n * only for browser requests (Origin is a forbidden header from Node), so this\n * can be actively verified only in a browser; from Node it informs the\n * skip-guidance message.\n */\n origin?: string;\n /** Skip the (anonymous) data-plane read even when a brand is known. */\n skipDataRead?: boolean;\n /** Injectable transport (tests / SSR polyfills). */\n fetch?: FetchLike;\n}\n\nconst GATEWAY_SUFFIX = \"/api/public/v1\";\n\n/** Run the readiness checks and return a structured report. Never throws — every\n * failure mode is captured as a check. */\nexport async function runDoctor(options: DoctorOptions): Promise<DoctorReport> {\n const checks: DoctorCheck[] = [];\n const report: DoctorReport = { ok: true, checks, baseUrl: options.baseUrl };\n\n // 1) config — can we even build a client?\n const configIssues: string[] = [];\n if (!options.apiKey) configIssues.push(\"`apiKey` is empty\");\n let parsedUrl: URL | null = null;\n try {\n parsedUrl = new URL(options.baseUrl);\n } catch {\n configIssues.push(\"`baseUrl` is not a valid URL\");\n }\n if (configIssues.length > 0) {\n checks.push({\n id: \"config\",\n title: \"Client configuration\",\n status: \"fail\",\n detail: `${configIssues.join(\"; \")}.`,\n fix: \"Pass a brand API key and the gateway base URL, e.g. https://<deployment>.convex.site/api/public/v1\",\n });\n report.ok = false;\n return report; // can't probe without a valid client config\n }\n\n const urlMisaimed =\n parsedUrl !== null && !parsedUrl.pathname.replace(/\\/+$/, \"\").endsWith(GATEWAY_SUFFIX);\n checks.push({\n id: \"config\",\n title: \"Client configuration\",\n status: urlMisaimed ? \"warn\" : \"pass\",\n detail: urlMisaimed\n ? `baseUrl \"${options.baseUrl}\" doesn't end with ${GATEWAY_SUFFIX} — it should point at the gateway, not the site root.`\n : \"API key present; base URL well-formed.\",\n fix: urlMisaimed ? `Use the gateway URL, e.g. ${parsedUrl?.origin}${GATEWAY_SUFFIX}` : undefined,\n });\n\n const client = createBowlosClient({\n apiKey: options.apiKey,\n baseUrl: options.baseUrl,\n fetch: options.fetch,\n });\n\n // 2) one ping covers: gateway reachable + key valid + (browser) origin + rate-limit.\n let ping: PingResult | null = null;\n try {\n ping = await client.ping();\n report.brandId = ping.brandId;\n report.mode = ping.mode;\n checks.push({\n id: \"gateway\",\n title: \"Gateway reachable\",\n status: \"pass\",\n detail: `Reached ${options.baseUrl} (service \"${ping.service}\", ${ping.version}).`,\n });\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"pass\",\n detail: `Key valid for brand ${ping.brandId} — mode: ${ping.mode}.`,\n });\n } catch (e) {\n const err = e instanceof BowlosApiError ? e : null;\n const code = err?.code ?? BOWLOS_ERROR_CODES.UNKNOWN;\n // A network error (status 0) or a router 404 means no real gateway answered;\n // any other coded envelope means the gateway responded (and judged the key).\n const reached =\n err !== null && err.status !== 0 && code !== BOWLOS_ERROR_CODES.NETWORK_ERROR && code !== BOWLOS_ERROR_CODES.NOT_FOUND;\n\n checks.push({\n id: \"gateway\",\n title: \"Gateway reachable\",\n status: reached ? \"pass\" : \"fail\",\n detail: reached\n ? `Reached ${options.baseUrl}.`\n : code === BOWLOS_ERROR_CODES.NETWORK_ERROR\n ? `Could not reach ${options.baseUrl} (network error).`\n : `No public-API gateway responded at ${options.baseUrl}.`,\n fix: reached\n ? undefined\n : \"Check the base URL, that the Convex deployment is live, and that the public-API routes are deployed.\",\n });\n\n if (code === BOWLOS_ERROR_CODES.RATE_LIMITED) {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"pass\",\n detail: \"Key accepted (this probe was rate-limited).\",\n });\n checks.push({\n id: \"rate-limit\",\n title: \"Rate-limit headroom\",\n status: \"warn\",\n detail: `Currently rate-limited${err?.retryAfterSeconds ? ` — retry after ${err.retryAfterSeconds}s` : \"\"}.`,\n fix: \"Back off and retry; raise the key's per-minute limit if your real traffic is higher.\",\n });\n } else if (code === BOWLOS_ERROR_CODES.ORIGIN_NOT_ALLOWED) {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"pass\",\n detail: \"Key accepted; the request was blocked on origin.\",\n });\n checks.push({\n id: \"origin\",\n title: \"Origin allow-listed\",\n status: \"fail\",\n detail: \"The request origin is not on the key's allow-list.\",\n fix: `Add your site origin${options.origin ? ` (${options.origin})` : \"\"} to the API key's allowed origins.`,\n });\n } else if (reached) {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"fail\",\n detail:\n code === BOWLOS_ERROR_CODES.API_KEY_INVALID || code === BOWLOS_ERROR_CODES.API_KEY_MISSING\n ? \"The gateway rejected the API key.\"\n : `The gateway returned ${code}.`,\n fix: \"Mint or rotate a brand API key in the operator admin (Super-Admin → API keys) and use that value.\",\n });\n } else {\n checks.push({\n id: \"api-key\",\n title: \"API key accepted\",\n status: \"skip\",\n detail: \"Skipped — the gateway wasn't reachable.\",\n });\n }\n }\n\n // 3) origin — only actively verifiable in a browser (Origin is a forbidden\n // header from Node). A successful ping in a browser means the current\n // origin IS allow-listed; otherwise skip with guidance.\n if (!checks.some((c) => c.id === \"origin\")) {\n const browserOrigin =\n typeof window !== \"undefined\" && typeof window.location?.origin === \"string\"\n ? window.location.origin\n : null;\n if (ping !== null && browserOrigin !== null) {\n checks.push({\n id: \"origin\",\n title: \"Origin allow-listed\",\n status: \"pass\",\n detail: `This origin (${browserOrigin}) is allow-listed for the key.`,\n });\n } else {\n checks.push({\n id: \"origin\",\n title: \"Origin allow-listed\",\n status: \"skip\",\n detail: \"Origin allow-listing is enforced only for browser requests, so it can't be verified from a CLI.\",\n fix: `Ensure your deployed site origin${options.origin ? ` (${options.origin})` : \"\"} is on the key's allowed-origins list; load the site and watch for ORIGIN_NOT_ALLOWED.`,\n });\n }\n }\n\n // 4) data plane — a cheap anonymous read proves gateway → manifest → query → scope.\n if (ping !== null && options.skipDataRead !== true) {\n try {\n const data = await client.call<unknown>(\"listPublicCenters\", { brandId: ping.brandId });\n const innerError = typeof data === \"object\" && data !== null && (data as { ok?: boolean }).ok === false;\n checks.push({\n id: \"data-read\",\n title: \"Data passthrough\",\n status: innerError ? \"warn\" : \"pass\",\n detail: innerError\n ? \"Reached the data plane, but listPublicCenters returned an error envelope.\"\n : \"Anonymous read (listPublicCenters) succeeded — gateway → query passthrough works.\",\n fix: innerError ? \"Confirm the brand has at least one published center.\" : undefined,\n });\n } catch (e) {\n const err = e instanceof BowlosApiError ? e : null;\n checks.push({\n id: \"data-read\",\n title: \"Data passthrough\",\n status: \"warn\",\n detail: `An anonymous read failed${err ? ` (${err.code})` : \"\"}.`,\n fix: \"Key + gateway are fine; this read may need a published center or differ by brand. Safe to ignore if your booking reads work.\",\n });\n }\n } else if (ping === null) {\n checks.push({\n id: \"data-read\",\n title: \"Data passthrough\",\n status: \"skip\",\n detail: \"Skipped — needs a reachable gateway.\",\n });\n }\n\n // 5) payments — Stripe Connect status isn't exposed over the public API yet.\n // Honest skip (no faked pass) so the operator knows to verify it elsewhere.\n checks.push({\n id: \"payments\",\n title: \"Payments connected\",\n status: \"skip\",\n detail: \"Stripe Connect status isn't exposed over the public API yet, so the doctor can't verify it here.\",\n fix: \"Confirm the operator's Stripe account is connected + charges-enabled in the admin (Payments → Connect).\",\n });\n\n report.ok = !checks.some((c) => c.status === \"fail\");\n return report;\n}\n","/**\n * Typed account + flash reads for @bowlos/reservations.\n *\n * Session-scoped account reads (require a signed-in customer) and the\n * session-aware flash-sale reads. Args are typed precisely — every account read\n * is brand-scoped. Results are generic (`<T = unknown>`): parameterize with your\n * own shape, or read `unknown` and narrow. (The backend return shapes are rich\n * and evolving; the SDK doesn't pin them here.) Each read has a framework-agnostic\n * function here and a React hook in `hooks.tsx`.\n */\nimport type { BowlosClient } from \"./client\";\n\n/** Every account read is scoped to the customer's Brand. */\nexport type BrandScoped = { brandId: string };\nexport type ReservationDetailArgs = { brandId: string; displayId: string };\nexport type EventOrderDetailArgs = { brandId: string; orderId: string };\nexport type MembershipDetailArgs = { brandId: string; membershipId: string };\nexport type FlashSaleArgs = { slug: string };\nexport type FlashBookingOptionsArgs = { slug: string; itemId: string };\nexport type FlashSalesArgs = { brandId: string };\n\n// ── account (require a signed-in customer) ───────────────────────────────────\n\nexport function getMyReservations<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyReservations\", args, { auth: true });\n}\n\nexport function getMyReservationDetail<T = unknown>(\n client: BowlosClient,\n args: ReservationDetailArgs,\n): Promise<T> {\n return client.call<T>(\"getMyReservationDetail\", args, { auth: true });\n}\n\nexport function getMyEventOrders<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyEventOrders\", args, { auth: true });\n}\n\nexport function getMyEventOrder<T = unknown>(\n client: BowlosClient,\n args: EventOrderDetailArgs,\n): Promise<T> {\n return client.call<T>(\"getMyEventOrder\", args, { auth: true });\n}\n\nexport function getMyMemberships<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyMemberships\", args, { auth: true });\n}\n\nexport function getMyMembershipDetail<T = unknown>(\n client: BowlosClient,\n args: MembershipDetailArgs,\n): Promise<T> {\n return client.call<T>(\"getMyMembershipDetail\", args, { auth: true });\n}\n\nexport function getMyLoyalty<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"getMyLoyalty\", args, { auth: true });\n}\n\nexport function getMyCredits<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyCredits\", args, { auth: true });\n}\n\nexport function getMyPasses<T = unknown>(client: BowlosClient, args: BrandScoped): Promise<T> {\n return client.call<T>(\"listMyPasses\", args, { auth: true });\n}\n\nexport function getMyGameCards<T = MyGameCard[]>(\n client: BowlosClient,\n args: BrandScoped,\n): Promise<T> {\n return client.call<T>(\"listMyGameCards\", args, { auth: true });\n}\n\n// ── self-serve cancel (v0.23.0): preview + cancel for all four types ─────────\n//\n// Flow per type: preview(\"what you'll get back\") → confirm → cancel.\n// Money rule: store credit per the Center's cancellation policy; card refunds\n// are staff-only. Game cards are cancellable ONLY while fully unused (locked\n// rule) → full credit. The previewed amount is advisory (computed at view\n// time); the cancel re-computes authoritatively at confirm — re-preview right\n// before confirming if the page sat open. Cancel is safe to retry: a second\n// call on an already-cancelled item returns a NOT/​VALIDATION error (the credit\n// ledger dedupes, so no double credit), which the hooks surface as such.\n\n/** Outcome preview shared by all four cancel types. `bucket`/`hoursBeforeStart`/\n * `forfeitCents` are inert (null/0) for game cards (no time policy). */\nexport interface CancelPreview {\n cancellable: boolean;\n reason: string | null;\n bucket: string | null;\n hoursBeforeStart: number;\n creditCents: number;\n forfeitCents: number;\n paidCents: number;\n}\n\nexport interface CancelResult {\n id: string;\n status: string;\n creditCents: number;\n bucket?: string | null;\n hoursBeforeStart?: number;\n forfeitCents?: number;\n version?: number;\n}\n\nexport interface MyGameCard {\n id: string;\n displayId: string;\n cardName: string;\n status: \"active\" | \"depleted\" | \"expired\" | \"cancelled\" | \"refunded\";\n totalGames: number;\n remainingGames: number;\n shoesIncluded: boolean;\n purchasedAt: number;\n expiresAt: number;\n paidCents: number;\n /** Precomputed unused-only rule; the per-card preview is the source of truth. */\n cancellable: boolean;\n}\n\nexport type ReservationCancelArgs = {\n brandId: string;\n reservationId: string;\n expectedVersion: number;\n reason?: string;\n /** Per-attempt key; safe to retry. */\n idempotencyKey: string;\n};\nexport type OrderCancelArgs = {\n brandId: string;\n orderId: string;\n reason?: string;\n idempotencyKey: string;\n};\nexport type GameCardCancelArgs = {\n brandId: string;\n cardId: string;\n reason?: string;\n idempotencyKey: string;\n};\n\nexport function previewReservationCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; reservationId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyCancellation\", args, { auth: true });\n}\nexport function previewEventOrderCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; orderId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyEventOrderCancellation\", args, { auth: true });\n}\nexport function previewPackageOrderCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; orderId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyPackageOrderCancellation\", args, { auth: true });\n}\nexport function previewGameCardCancellation<T = CancelPreview>(\n client: BowlosClient,\n args: { brandId: string; cardId: string },\n): Promise<T> {\n return client.call<T>(\"previewMyGameCardCancellation\", args, { auth: true });\n}\n\nexport function cancelMyReservation<T = CancelResult>(\n client: BowlosClient,\n args: ReservationCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyReservation\", args, { auth: true });\n}\nexport function cancelMyEventOrder<T = CancelResult>(\n client: BowlosClient,\n args: OrderCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyEventOrder\", args, { auth: true });\n}\nexport function cancelMyPackageOrder<T = CancelResult>(\n client: BowlosClient,\n args: OrderCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyPackageOrder\", args, { auth: true });\n}\nexport function cancelMyGameCard<T = CancelResult>(\n client: BowlosClient,\n args: GameCardCancelArgs,\n): Promise<T> {\n return client.call<T>(\"cancelMyGameCard\", args, { auth: true });\n}\n\n// ── flash sales (session-aware: members see prices) ──────────────────────────\n\nexport function getFlashSale<T = unknown>(client: BowlosClient, args: FlashSaleArgs): Promise<T> {\n return client.call<T>(\"getPublicFlashSaleBySlug\", args, { auth: true });\n}\n\n/** The public flash-sale index for a Brand (live + upcoming; no prices). Public. */\nexport function getFlashSales<T = unknown>(client: BowlosClient, args: FlashSalesArgs): Promise<T> {\n return client.call<T>(\"listPublicFlashSales\", args);\n}\n\nexport function getFlashSaleBookingOptions<T = unknown>(\n client: BowlosClient,\n args: FlashBookingOptionsArgs,\n): Promise<T> {\n return client.call<T>(\"getFlashSaleBookingOptions\", args, { auth: true });\n}\n\nexport type CreateFlashSaleBookingArgs = {\n slug: string;\n itemId: string;\n dateISO: string;\n startMinuteOfDay: number;\n durationMinutes: number;\n units: number;\n /** Per-attempt key; replays return the original checkout. */\n idempotencyKey: string;\n};\n\nexport interface FlashSaleBookingResult {\n /** Handle for the rest of the checkout: mint the PaymentIntent with\n * `createCheckoutPaymentIntent(client, { refToken })`, then poll\n * `getCheckoutStatus(client, refToken)` to materialization. */\n refToken: string;\n /** The SALE-priced total the PaymentIntent charges (base at the flash\n * price + tax + the Center fee). */\n amountDueCents: number;\n holdExpiresAt: number;\n breakdown: {\n /** Tier savings already removed from baseSubtotalCents; do not subtract again. */\n tierDiscountCents: number;\n baseSubtotalCents: number;\n reservationFeeCents: number;\n reservationFeeLabel: string | null;\n taxAddedCents: number;\n taxIncludedCents: number;\n totalCents: number;\n };\n}\n\n/**\n * v0.22.1 — book a flash-sale reservation item at its SALE price (the flash\n * analog of `eventOfferSlug`: the server binds the item's sale price, holds\n * the inventory, and opens a checkout). Signed-in customers only. Pick the\n * date/time from `getFlashSaleBookingOptions` — the purpose-built option\n * list — never the regular booking calendar.\n */\nexport function createFlashSaleBooking(\n client: BowlosClient,\n args: CreateFlashSaleBookingArgs,\n): Promise<FlashSaleBookingResult> {\n return client.call<FlashSaleBookingResult>(\"createFlashSaleBooking\", args, {\n auth: true,\n });\n}\n\n/** Saved cards belong to the active location's connected Stripe account. */\nexport type SavedCardScope = { brandId: string; centerId: string };\nexport type SavedCardArgs = SavedCardScope & { paymentMethodId: string };\nexport interface SavedCard {\n id: string;\n brand: string;\n last4: string;\n expMonth: number;\n expYear: number;\n isDefault: boolean;\n}\nexport interface SavedCardsResult {\n methods: SavedCard[];\n chargeable: boolean;\n}\nexport interface CardSetupResult {\n clientSecret: string;\n publishableKey: string;\n stripeAccount: string;\n stripeMode: \"test\" | \"live\";\n merchantDisplayName: string;\n}\nexport type ChangePasswordArgs = { currentPassword: string; newPassword: string };\n\nexport function listSavedCards(\n client: BowlosClient,\n args: SavedCardScope,\n): Promise<SavedCardsResult> {\n return client.call(\"listMyPaymentMethods\", args, { auth: true });\n}\nexport function createCardSetup(\n client: BowlosClient,\n args: SavedCardScope,\n): Promise<CardSetupResult> {\n return client.call(\"createSetupIntentForAddingCard\", args, { auth: true });\n}\nexport function removeSavedCard(\n client: BowlosClient,\n args: SavedCardArgs,\n): Promise<{ detached: boolean }> {\n return client.call(\"detachPaymentMethod\", args, { auth: true });\n}\nexport function setDefaultCard(\n client: BowlosClient,\n args: SavedCardArgs,\n): Promise<{ ok: boolean }> {\n return client.call(\"setDefaultPaymentMethod\", args, { auth: true });\n}\n/** Success invalidates all sessions; discard local tokens and show sign-in. */\nexport async function changePassword(\n client: BowlosClient,\n args: ChangePasswordArgs,\n): Promise<{ ok: true }> {\n const result = await client.call<{ ok: true }>(\"changeMyPassword\", args, { auth: true });\n await client.signOut();\n return result;\n}\n","/**\n * Public catalog reads for @bowlos/reservations — the \"what can I book/buy here\"\n * surface that powers `<BookingCatalog>`. All anonymous (no customer login).\n * Products + events + memberships are Center-scoped; packages + game cards are\n * Brand-scoped (with an optional Center filter). Results are generic (`<T>`);\n * the component types the display fields it needs.\n */\nimport type { BowlosClient } from \"./client\";\nimport type { EventOfferSession } from \"./event-offers\";\n\nexport type CenterScoped = { centerId: string };\nexport type BrandCatalogArgs = { brandId: string; centerId?: string };\n\n// ── canonical catalog (listPublicCatalog) ─────────────────────────────────────\n// The one read that returns every category grouped + per-surface visibility\n// already applied. Prefer this over the per-category lists below when you want\n// the full, admin-controlled catalog for a surface. Types mirror the backend\n// wire shape (`@bowlos/shared` public-catalog).\n\n/** Which public surface is asking — the backend applies that surface's\n * per-category + per-offer visibility before returning. */\nexport type PublicSurface = \"sdk_custom_site\" | \"white_label_web\" | \"mobile_app\";\n\nexport type CatalogCategory =\n | \"bowling\"\n | \"other_attractions\"\n | \"events\"\n | \"packages\"\n | \"memberships\"\n | \"game_passes\";\n\nexport type CatalogActionType =\n | \"book_reservation\"\n | \"view_event\"\n | \"buy_ticket\"\n | \"buy_package\"\n | \"buy_membership\"\n | \"buy_game_pass\";\n\nexport type CatalogSourceTable =\n | \"products\"\n | \"event_offers\"\n | \"packages\"\n | \"membership_templates\"\n | \"game_card_templates\";\n\n/** A normalized, surface-agnostic catalog item. Route by `action.type`, using\n * the IDs in `action.payload` (e.g. `productId`, `slug`, `packageId`,\n * `templateId`). `priceLabel` is an indicative \"from $X\" only (null for\n * products — show \"See times & pricing\"); the binding price comes from the\n * per-category preview after login. */\nexport interface CatalogItem {\n id: string;\n category: CatalogCategory;\n sourceTable: CatalogSourceTable;\n sourceId: string;\n title: string;\n subtitle?: string | null;\n description?: string | null;\n priceLabel?: string | null;\n imageUrl?: string | null;\n badgeLabel?: string | null;\n session?: EventOfferSession | null;\n action: { type: CatalogActionType; payload: Record<string, string> };\n}\n\nexport interface CatalogSection {\n key: CatalogCategory;\n label: string;\n items: CatalogItem[];\n}\n\nexport interface CatalogResult {\n sections: CatalogSection[];\n /**\n * Date-first booking (v0.24.0): the Center's default booking entry point.\n * Open your funnel on this; let the customer toggle to the other. Optional —\n * older gateways omit it (treat absent as `\"product_first\"`).\n */\n bookingEntryDefault?: \"product_first\" | \"date_first\";\n /** Center-local \"today\" (YYYY-MM-DD) — default + minimum for a date-first\n * date picker, so you don't guess the Center's timezone. Optional. */\n todayISO?: string;\n /**\n * Full Test Mode (2026-06-23): true when the operator has put this Center in\n * test mode. Render a customer-facing \"Maintenance mode\" notice (use\n * `<MaintenanceBanner>` or `useTestMode()`); normal customers' bookings are\n * server-refused (`CENTER_IN_MAINTENANCE`) — only admin Test-Account customers\n * transact. Absent on older gateways → false.\n */\n maintenanceMode?: boolean;\n}\n\n/** Args for the canonical catalog read. `surface` selects which visibility\n * rules the backend applies. */\nexport type CatalogArgs = {\n brandId: string;\n centerId: string;\n surface: PublicSurface;\n};\n\n/**\n * The canonical public catalog for a surface — every active, public,\n * bookable/sellable item grouped into the six first-class categories, with the\n * Center admin's per-surface category + offer visibility already applied.\n * Anonymous. This is the recommended way to list \"everything bookable here\":\n * one call, all categories, visibility-aware, consistent with the white-label\n * web + mobile surfaces.\n */\nexport function listCatalog<T = CatalogResult>(\n client: BowlosClient,\n args: CatalogArgs,\n): Promise<T> {\n return client.call<T>(\"listPublicCatalog\", args);\n}\n/** One package's full detail. `shareToken` reveals a hidden/unlisted package. */\nexport type PackageDetailArgs = { packageId: string; shareToken?: string };\n/** Args for a Center's operating-hours window on a date, across attraction types. */\nexport type CenterHoursArgs = { centerId: string; attractionTypeKeys: string[]; dateISO: string };\n\n/** Bookable products at a Center (each carries its attraction + `attractionTypeKey`). */\nexport function listProducts<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T> {\n return client.call<T>(\"listPublicProducts\", args);\n}\n\n/** Upcoming pricing events (NYE Bash, tournaments…) at a Center. */\nexport function listEvents<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T> {\n return client.call<T>(\"listPublicEvents\", args);\n}\n\n/** Sellable event offers at a Center. These are the public lineup + event\n * landing-page records; use this instead of `listEvents` when routing a\n * customer to an event purchase flow. */\nexport function listEventOffers<T = import(\"./toolkit-types\").EventOffer[]>(\n client: BowlosClient,\n args: CenterScoped & { includeWithoutLandingPage?: boolean },\n): Promise<T> {\n return client.call<T>(\"listPublicEventOffers\", args);\n}\n\n/** One sellable event offer by landing-page slug. */\nexport function getEventOffer<T = unknown>(\n client: BowlosClient,\n args: { slug: string },\n): Promise<T> {\n return client.call<T>(\"getPublicEventOffer\", args);\n}\n\n/** Purchasable packages at a Brand. */\nexport function listPackages<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T> {\n return client.call<T>(\"listPublicPackages\", args);\n}\n\n/** Full detail for one package — components, optional add-ons, allowed start\n * times, duration, and quantity bounds. Drives the headless package config UI\n * (see HEADLESS.md → \"Buying a package\"). */\nexport function getPackage<T = unknown>(client: BowlosClient, args: PackageDetailArgs): Promise<T> {\n return client.call<T>(\"getPublicPackage\", args);\n}\n\n/** A Center's combined open/close window (minutes-from-midnight) for the given\n * attraction types on a date — the intersection across types; `null` if closed.\n * Bound a package's start times with its component attraction-type keys. */\nexport function getCenterHours<T = unknown>(client: BowlosClient, args: CenterHoursArgs): Promise<T> {\n return client.call<T>(\"getCenterOperatingHoursForTypes\", args);\n}\n\n/** Purchasable memberships at a Center. */\nexport function listPublicMemberships<T = unknown>(\n client: BowlosClient,\n args: CenterScoped,\n): Promise<T> {\n return client.call<T>(\"listPublicMemberships\", args);\n}\n\n/** Purchasable game cards / passes at a Brand. */\nexport function listGameCards<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T> {\n return client.call<T>(\"listPublicGameCards\", args);\n}\n\n// ── retail pricing (listRetailPricing) ────────────────────────────────────────\n// v0.31.0: a center's public price list — \"walk-in\" rates (the pricing matrix,\n// grouped by attraction) plus opted-in \"website specials\". Read-only, anonymous.\n// Drives the headless `useRetailPricing` hook + the reference `<PricingTable>`.\n\n/** A pricing mode an attraction charges in. */\nexport type RetailPricingMode =\n | \"per_unit_per_hour\"\n | \"per_person_per_hour\"\n | \"per_game\";\n\n/** One matrix row — a day-of-week + time band with per-mode rates. */\nexport interface RetailWalkInRate {\n dayOfWeek: number; // 0=Sun..6=Sat\n startMinuteOfDay: number;\n endMinuteOfDay: number;\n label: string | null;\n rateUnitHourCents: number | null;\n ratePersonHourCents: number | null;\n rateGameCents: number | null;\n}\n\n/** Walk-in rates grouped by attraction. */\nexport interface RetailAttraction {\n attractionId: string;\n name: string;\n typeKey: string;\n enabledModes: RetailPricingMode[];\n unitLabelSingular: string;\n unitLabelPlural: string;\n walkInRates: RetailWalkInRate[];\n}\n\n/** A featured \"website special\" (an opted-in price plan). */\nexport interface RetailSpecial {\n planId: string;\n name: string;\n description: string;\n priceCents: number | null;\n attractionId: string;\n attractionName: string;\n /** Seasonal window (YYYY-MM-DD) when set — label/hide out of season. */\n effectiveStartDate: string | null;\n effectiveEndDate: string | null;\n}\n\n/** The full retail-pricing payload for a Center. */\nexport interface RetailPricing {\n centerName: string;\n attractions: RetailAttraction[];\n specials: RetailSpecial[];\n}\n\n/** A Center's public price list: walk-in (matrix) rates + website specials.\n * Read-only, anonymous — drives a printed-menu-style pricing page that always\n * matches the operator's live config. Not a booking surface. */\nexport function listRetailPricing<T = RetailPricing>(\n client: BowlosClient,\n args: CenterScoped,\n): Promise<T> {\n return client.call<T>(\"listRetailPricing\", args);\n}\n","/**\n * Package scheduling helpers — start-time resolution for headless sites.\n *\n * A package can offer different discrete start times per weekday (e.g.\n * Sun 2:30/5:00, M–Th 5:30, Fri 5:30/8:00, Sat 12/3/6). `getPublicPackage`\n * returns that as `startTimesByWeekday`; this resolves a booking date's\n * weekday to the exact bookable minutes so your slot picker shows only\n * that day's times.\n *\n * Mirrors the server's canonical rule (`@bowlos/shared`\n * resolvePackageStartTimesForWeekday) — kept as an independent copy\n * because the SDK ships with no `@bowlos/shared` runtime dependency. The\n * buy mutation enforces the same rule, so a stale/tampered start time is\n * rejected server-side regardless.\n */\n\nexport type PackageAddonMode = \"included\" | \"optional\";\n\n/**\n * A package add-on as returned by `getPublicPackage` / `usePackage`\n * (`pkg.addons[]`). The load-bearing field is **`mode`**:\n *\n * - `\"included\"` — comes with the package at `includedQuantity` and is already\n * inside the base price. Render it read-only; it is NOT customer-adjustable\n * and must NOT be sent in `optionalAddons`.\n * - `\"optional\"` — a paid up-sell the customer may add (0..`maxOptionalQuantity`).\n * These, and only these, go in the `optionalAddons` argument.\n */\nexport interface PackageAddon {\n id: string;\n name: string;\n description?: string | null;\n mode: PackageAddonMode;\n quantityRule?: \"fixed\" | \"per_guest\" | null;\n includedQuantity?: number | null;\n pricePerUnitCents?: number | null;\n maxOptionalQuantity?: number | null;\n inventoryAttractionTypeKey?: string | null;\n inventoryUnitsPerQuantity?: number | null;\n}\n\n/**\n * Split a package's add-ons for rendering: `included` are part of the base\n * (show read-only, e.g. \"Included: 2× Pizza\"), `optional` are the paid extras\n * (show a 0..`maxOptionalQuantity` stepper). Never render an `included` add-on\n * as an editable/priced stepper.\n */\nexport function splitPackageAddons(addons: readonly PackageAddon[] | null | undefined): {\n included: PackageAddon[];\n optional: PackageAddon[];\n} {\n const included: PackageAddon[] = [];\n const optional: PackageAddon[] = [];\n for (const a of addons ?? []) {\n (a.mode === \"optional\" ? optional : included).push(a);\n }\n return { included, optional };\n}\n\n/**\n * Build the `optionalAddons` argument for `previewPackageOrder` /\n * `createPackageOrder` from a `{ addonId -> quantity }` map — SAFELY. Only\n * `\"optional\"`-mode add-ons of this package pass; quantities are coerced to\n * positive integers and capped at `maxOptionalQuantity`; included add-ons,\n * unknown ids, and zero/negative/non-finite quantities are dropped.\n *\n * This makes the `VALIDATION_FAILED — Add-on \"X\" is not optional` failure\n * impossible from the client: even if your UI wires a quantity for an included\n * add-on, it never reaches the request. Always build the request through this\n * helper rather than hand-mapping the quantity state.\n */\nexport function toOptionalAddonsInput(\n addons: readonly PackageAddon[] | null | undefined,\n quantities: Record<string, number> | null | undefined,\n): Array<{ addonId: string; quantity: number }> {\n const optionalById = new Map(\n (addons ?? []).filter((a) => a.mode === \"optional\").map((a) => [a.id, a]),\n );\n const out: Array<{ addonId: string; quantity: number }> = [];\n for (const [addonId, raw] of Object.entries(quantities ?? {})) {\n const a = optionalById.get(addonId);\n if (!a) continue; // not an optional add-on of this package → drop\n let q = Math.floor(Number(raw));\n if (!Number.isFinite(q) || q <= 0) continue;\n if (typeof a.maxOptionalQuantity === \"number\" && a.maxOptionalQuantity > 0) {\n q = Math.min(q, a.maxOptionalQuantity);\n }\n out.push({ addonId, quantity: q });\n }\n return out;\n}\n\nexport interface PackageWeekdayStartTimes {\n /** 0=Sun .. 6=Sat. */\n dayOfWeek: number;\n /** Allowed start minutes-of-day for that weekday ([0, 1439]). */\n startTimes: number[];\n}\n\nexport interface PackageScheduleShape {\n startTimesByWeekday?: PackageWeekdayStartTimes[] | null;\n allowedStartTimes?: number[] | null;\n applicabilityDays?: number[] | null;\n}\n\n/** True when the package opts into the per-weekday start-time model. */\nexport function usesPerWeekdayStartTimes(\n pkg: Pick<PackageScheduleShape, \"startTimesByWeekday\">,\n): boolean {\n return !!pkg.startTimesByWeekday && pkg.startTimesByWeekday.length > 0;\n}\n\n/**\n * Weekday (0=Sun..6=Sat) for a YYYY-MM-DD date string, parsed at UTC\n * midnight so the result is stable regardless of the browser's zone —\n * the same convention the server uses for Center-local dates.\n */\nexport function weekdayForDateISO(dateISO: string): number {\n const [y, m, d] = dateISO.split(\"-\").map(Number);\n return new Date(Date.UTC(y, m - 1, d)).getUTCDay();\n}\n\n/**\n * Resolve the discrete bookable start minutes for a weekday.\n *\n * - `null` — no discrete restriction (continuous grid); apply the\n * Center's open window yourself.\n * - `[]` — explicitly NOT bookable that weekday.\n * - `number[]` — the exact allowed start minutes (sorted ascending).\n */\nexport function resolvePackageStartTimesForWeekday(\n pkg: PackageScheduleShape,\n dayOfWeek: number,\n): number[] | null {\n if (pkg.startTimesByWeekday && pkg.startTimesByWeekday.length > 0) {\n const entry = pkg.startTimesByWeekday.find((e) => e.dayOfWeek === dayOfWeek);\n if (!entry || entry.startTimes.length === 0) return [];\n return [...entry.startTimes].sort((a, b) => a - b);\n }\n if (\n pkg.applicabilityDays &&\n pkg.applicabilityDays.length > 0 &&\n !pkg.applicabilityDays.includes(dayOfWeek)\n ) {\n return [];\n }\n if (pkg.allowedStartTimes && pkg.allowedStartTimes.length > 0) {\n return [...pkg.allowedStartTimes].sort((a, b) => a - b);\n }\n return null;\n}\n","import type { BowlosClient } from \"./client\";\nimport type * as T from \"./toolkit-types\";\nexport type * from \"./toolkit-types\";\n\nexport function listBrandEventOffers(\n client: BowlosClient,\n args: T.ListBrandEventOffersArgs,\n): Promise<T.ListBrandEventOffersResult> {\n return client.call<T.ListBrandEventOffersResult>(\"listPublicEventOffersForBrand\", args, {\n auth: false,\n });\n}\n\nexport function getMyGameCard(\n client: BowlosClient,\n args: T.GetMyGameCardArgs,\n): Promise<T.GetMyGameCardResult> {\n return client.call<T.GetMyGameCardResult>(\"getMyGameCard\", args, { auth: true });\n}\n\nexport function getMyGameCardRedemptions(\n client: BowlosClient,\n args: T.GetMyGameCardArgs,\n): Promise<T.GameCardRedemption[]> {\n return client.call<T.GameCardRedemption[]>(\"getMyGameCardRedemptions\", args, { auth: true });\n}\n\nexport function getMyGameCardHistory(\n client: BowlosClient,\n args: T.GetMyGameCardHistoryArgs,\n): Promise<T.GetMyGameCardHistoryResult> {\n return client.call<T.GetMyGameCardHistoryResult>(\"getMyGameCardRedemptionsPage\", args, {\n auth: true,\n });\n}\n\nexport function getWalletPassUrl(\n client: BowlosClient,\n args: T.GetWalletPassUrlArgs,\n): Promise<T.GetWalletPassUrlResult> {\n return client.call<T.GetWalletPassUrlResult>(\"getMyWalletPassUrl\", args, { auth: true });\n}\n\nexport function getMyHold(client: BowlosClient, args: T.MyHoldArgs): Promise<T.MyHold> {\n return client.call<T.MyHold>(\"getMyHoldGroup\", args, { auth: true });\n}\n\nexport function extendMyHold(\n client: BowlosClient,\n args: T.MyHoldArgs,\n): Promise<{ expiresAt: number }> {\n return client.call<{ expiresAt: number }>(\"customerExtendMyHold\", args, { auth: true });\n}\n\nexport function releaseMyHold(client: BowlosClient, args: T.MyHoldArgs): Promise<null> {\n return client.call<null>(\"customerReleaseMyHold\", args, { auth: true });\n}\n\nexport function requestEmailVerification(\n client: BowlosClient,\n args: T.EmailVerificationArgs,\n): Promise<T.RequestEmailVerificationResult> {\n return client.call<T.RequestEmailVerificationResult>(\"requestEmailVerification\", args, {\n auth: true,\n });\n}\n\nexport function confirmEmailVerification(\n client: BowlosClient,\n args: T.EmailVerificationTokenArgs,\n): Promise<{ ok: true }> {\n return client.call<{ ok: true }>(\"confirmEmailVerification\", args, { auth: true });\n}\n\nexport function getEmailVerificationStatus(\n client: BowlosClient,\n args: T.EmailVerificationTokenArgs,\n): Promise<T.EmailVerificationStatus> {\n return client.call<T.EmailVerificationStatus>(\"getEmailVerificationStatus\", args, { auth: true });\n}\n\nexport function getEmailVerificationSendState(\n client: BowlosClient,\n args: T.EmailVerificationSendStateArgs,\n): Promise<T.EmailVerificationSendState> {\n return client.call<T.EmailVerificationSendState>(\"getEmailVerificationSendState\", args, {\n auth: true,\n });\n}\n\nexport function getCancellationPolicy(\n client: BowlosClient,\n args: T.GetCancellationPolicyArgs,\n): Promise<T.CancellationPolicy> {\n return client.call<T.CancellationPolicy>(\"getCancellationPolicy\", args, { auth: false });\n}\n\nexport function cancelMyPendingBooking(\n client: BowlosClient,\n args: T.CancelMyPendingBookingArgs,\n): Promise<T.CancelMyPendingBookingResult> {\n return client.call<T.CancelMyPendingBookingResult>(\"cancelMyPendingReservation\", args, {\n auth: true,\n });\n}\n"]}