@bowlos/reservations 0.36.0 → 0.43.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 (76) hide show
  1. package/AGENTS.md +306 -0
  2. package/HEADLESS.md +595 -10
  3. package/README.md +303 -2
  4. package/dist/account-B4sZBmPI.d.cts +1837 -0
  5. package/dist/account-B4sZBmPI.d.ts +1837 -0
  6. package/dist/booking-change-Dd4PVgd3.d.cts +487 -0
  7. package/dist/booking-change-DzYs9133.d.ts +487 -0
  8. package/dist/chunk-4JMGS4YB.js +808 -0
  9. package/dist/chunk-4JMGS4YB.js.map +1 -0
  10. package/dist/chunk-I37IJNYU.js +139 -0
  11. package/dist/chunk-I37IJNYU.js.map +1 -0
  12. package/dist/{chunk-Y3YSDO3H.js → chunk-T2E6AEC7.js} +150 -6
  13. package/dist/chunk-T2E6AEC7.js.map +1 -0
  14. package/dist/{chunk-3JSVEOKG.js → chunk-V4JRDYW4.js} +61 -6
  15. package/dist/chunk-V4JRDYW4.js.map +1 -0
  16. package/dist/{chunk-TEHRROVY.js → chunk-YQRTBGXU.js} +47 -192
  17. package/dist/chunk-YQRTBGXU.js.map +1 -0
  18. package/dist/cli.cjs +34 -3
  19. package/dist/cli.cjs.map +1 -1
  20. package/dist/components.cjs +2059 -153
  21. package/dist/components.cjs.map +1 -1
  22. package/dist/components.d.cts +214 -7
  23. package/dist/components.d.ts +214 -7
  24. package/dist/components.js +1148 -7
  25. package/dist/components.js.map +1 -1
  26. package/dist/index.cjs +303 -3
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +56 -5
  29. package/dist/index.d.ts +56 -5
  30. package/dist/index.js +58 -3
  31. package/dist/index.js.map +1 -1
  32. package/dist/payments.cjs +225 -0
  33. package/dist/payments.cjs.map +1 -1
  34. package/dist/payments.d.cts +24 -2
  35. package/dist/payments.d.ts +24 -2
  36. package/dist/payments.js +4 -1
  37. package/dist/payments.js.map +1 -1
  38. package/dist/{react-CWAG4cW0.d.cts → react-C6NWC80d.d.cts} +2 -2
  39. package/dist/{react-0MyyTtE4.d.ts → react-DVdtpw5n.d.ts} +2 -2
  40. package/dist/react.cjs +870 -27
  41. package/dist/react.cjs.map +1 -1
  42. package/dist/react.d.cts +155 -12
  43. package/dist/react.d.ts +155 -12
  44. package/dist/react.js +72 -4
  45. package/dist/react.js.map +1 -1
  46. package/package.json +8 -2
  47. package/templates/center-site/README.md +5 -0
  48. package/templates/center-site/app/account/game-cards/page.tsx +17 -0
  49. package/templates/center-site/app/account/layout.tsx +16 -0
  50. package/templates/center-site/app/account/memberships/[id]/page.tsx +23 -0
  51. package/templates/center-site/app/account/memberships/page.tsx +33 -0
  52. package/templates/center-site/app/account/orders/page.tsx +17 -0
  53. package/templates/center-site/app/account/page.tsx +14 -0
  54. package/templates/center-site/app/account/payment-methods/page.tsx +23 -0
  55. package/templates/center-site/app/account/privacy/page.tsx +17 -0
  56. package/templates/center-site/app/account/profile/page.tsx +45 -0
  57. package/templates/center-site/app/account/reservations/[displayId]/change/page.tsx +46 -0
  58. package/templates/center-site/app/account/reservations/[displayId]/page.tsx +41 -0
  59. package/templates/center-site/app/account/reservations/page.tsx +35 -0
  60. package/templates/center-site/app/account/security/page.tsx +17 -0
  61. package/templates/center-site/app/events/[slug]/page.tsx +130 -0
  62. package/templates/center-site/app/events/page.tsx +57 -0
  63. package/templates/center-site/app/pay/[token]/page.tsx +53 -0
  64. package/templates/center-site/app/site-header.tsx +1 -0
  65. package/templates/center-site/lib/reservation.ts +14 -0
  66. package/templates/center-site/package.json +1 -1
  67. package/templates/center-site/tsconfig.json +7 -9
  68. package/dist/account-DfM2COaz.d.ts +0 -210
  69. package/dist/account-oCvYWmO9.d.cts +0 -210
  70. package/dist/catalog-DbhdwmnX.d.cts +0 -224
  71. package/dist/catalog-XkjgPI5C.d.ts +0 -224
  72. package/dist/chunk-3JSVEOKG.js.map +0 -1
  73. package/dist/chunk-TEHRROVY.js.map +0 -1
  74. package/dist/chunk-Y3YSDO3H.js.map +0 -1
  75. package/dist/data-BJkB-tvM.d.cts +0 -778
  76. package/dist/data-BJkB-tvM.d.ts +0 -778
package/AGENTS.md ADDED
@@ -0,0 +1,306 @@
1
+ # Agent build guide — complete center / brand customer website
2
+
3
+ Target: @bowlos/reservations 0.43.0. Use the installed package exports, not assumptions
4
+ about future releases. Read [HEADLESS.md](./HEADLESS.md) for contracts and patterns.
5
+ All APIs below are available. Build every listed page in the center’s own design.
6
+
7
+ ## Required pages checklist
8
+
9
+ Hooks are from `@bowlos/reservations/react`; functions/types from `@bowlos/reservations`.
10
+ Template paths are inside the npm package. Adapt reference components to the center's
11
+ own design. Where a dedicated route is absent, the checklist names an existing starter file
12
+ to adapt; create and link the required route in the consuming site.
13
+
14
+ | ID / page | Exact public APIs | HEADLESS section | Template to copy / availability |
15
+ | --- | --- | --- | --- |
16
+ | home: Home / center selection | `useCenters`, `useHours`, `useCenterHours`, `useCatalog` | [Customer toolkit routes (v0.37.0)](./HEADLESS.md#customer-toolkit-routes-v0370) | Custom home UI (no dedicated component). `templates/center-site/app/page.tsx`. Use the Center local timezone for dates, hours and receipts. |
17
+ | book: Book (date-first) | `useBookingFlow`, `useProducts`, `useStartTimes`, `useAvailability`, `useBookingPreview`, `useAddons` | [Date-first booking (v0.24.0)](./HEADLESS.md#date-first-booking-v0240) | `BookingFlow` reference. `templates/center-site/app/book/page.tsx`. Default to today; date → product → quantity → time → add-ons → review → payment → confirmation. Available: `useHoldCountdown`, `useMyHold`, `useExtendMyHold`, `useReleaseMyHold`, `useCancellationPolicy`, `useCancelMyPendingBooking` ([holds](./HEADLESS.md#holds-and-pending-cancellation-v0390)); Available: `useBookingChange` ([booking changes](./HEADLESS.md#booking-changes-v0400)). |
18
+ | events: Events index + /events/<slug> + tickets | `useEvents` (legacy pricing events), `useEventOffers`, `useEventOffer`, `useEventTicketPreview`, `useEventTicketPurchase` | [Event offers in the catalog](./HEADLESS.md#event-offers-in-the-catalog) | Available: EventList; event detail + ticket purchase. `templates/center-site/app/events/page.tsx`, `templates/center-site/app/events/[slug]/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
19
+ | buy: Catalog, packages, passes and memberships buy pages | `useCatalog`, `usePackages`, `usePackage`, `usePackagePreview`, `usePackagePurchase`, `useGameCards`, `useGameCardPreview`, `useGameCardPurchase`, `usePublicMemberships`, `useMembershipPreview`, `useMembershipPurchase`, `useMembershipSubscriptionCheckout` | [The canonical catalog (visibility-aware) — `useCatalog`](./HEADLESS.md#the-canonical-catalog-visibility-aware--usecatalog) | `BookingCatalog` reference. `templates/center-site/app/catalog/page.tsx`. Also copy `templates/center-site/app/buy/page.tsx`; preserve one-time versus recurring membership checkout and refresh status after payment. |
20
+ | flash: Flash sales index + detail | `useFlashSales`, `useFlashSale`, `useFlashSaleBookingOptions`, `createFlashSaleBooking` | [Booking a flash-sale item at the sale price (headless)](./HEADLESS.md#booking-a-flash-sale-item-at-the-sale-price-headless) | `FlashSaleIndex` / `FlashSale` reference. `templates/center-site/app/flash/page.tsx`. Also copy `templates/center-site/app/flash/[slug]/page.tsx`; carry sale context through preview/purchase. |
21
+ | pricing: Pricing | `useRetailPricing`, `listRetailPricing` | [Retail pricing page — walk-in rates + website specials (v0.31.0)](./HEADLESS.md#retail-pricing-page--walk-in-rates--website-specials-v0310) | `PricingTable`; adapt `templates/center-site/app/page.tsx` into a pricing route using the hooks. No dedicated pricing template is shipped. All prices come at runtime from the brand/center Bowl OS account via `useRetailPricing` / `listRetailPricing`, never hardcoded. |
22
+ | inquiry: Inquiry / party form | `forwardInquiry`, `INQUIRY_FORMS` | [Inquiry forms — contact / party requests into the center's inbox (v0.30.0)](./HEADLESS.md#inquiry-forms--contact--party-requests-into-the-centers-inbox-v0300) | `InquiryForm`; adapt `templates/center-site/app/page.tsx` into an inquiry route and add a server handler for `forwardInquiry`. Its secret stays server-side. No dedicated inquiry template is shipped. |
23
+ | auth: Sign-in / sign-up + email verification | `useAccount` (`signIn`, `register`, `signOut`) | [1. Login gate — browse + price open, **log in to purchase** (v0.27.0)](./HEADLESS.md#1-login-gate--browse--price-open-log-in-to-purchase-v0270) | `AuthForm` / `AuthGate` reference. `templates/center-site/app/account/page.tsx`. Use atomic register, not signUp + link. Available: `useEmailVerification`, `useRequestEmailVerification`, `useConfirmEmailVerification`, `useEmailVerificationStatus`, `useEmailVerificationSendState` ([verification](./HEADLESS.md#email-verification-v0390)); compose verification hooks into the account template. |
24
+ | recovery: Forgot password (email code) | `useAccount` (`requestPasswordReset`, `resetPassword`) | [Forgot password (v0.28.0)](./HEADLESS.md#forgot-password-v0280) | `AuthForm` reference. `templates/center-site/app/account/page.tsx`. Adapt the reference AuthForm email-code flow into an independently reachable recovery route; no dedicated recovery template is shipped. |
25
+ | account: Account dashboard: reservations, orders, credit, loyalty, passes | `useMyReservations`, `useMyEventOrders`, `useMyPackageOrders`, `useMyCredits`, `useMyLoyalty`, `useMyLoyaltyHistory`, `useMyPasses` | [Customer toolkit routes (v0.37.0)](./HEADLESS.md#customer-toolkit-routes-v0370) | Available: AccountDashboard (default five sections unchanged; opt in to the new sections). `templates/center-site/app/account/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
26
+ | memberships: Account memberships + self-cancel | `useMyMemberships`, `useMyMembershipDetail`, `useMyMembershipMembers`, `useAddMyMembershipMember`, `useCancelMyMembership`, `useOpenMembershipBillingPortal` | [Customer toolkit routes (v0.37.0)](./HEADLESS.md#customer-toolkit-routes-v0370) | Available: MembershipDetail (members, cancel and billing portal). `templates/center-site/app/account/memberships/page.tsx`, `templates/center-site/app/account/memberships/[id]/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
27
+ | game-cards: Account game cards | `useMyGameCards`, `useMyGameCard`, `useMyGameCardHistory`, `useWalletPassUrl`, `useGameCardCancelPreview`, `useCancelMyGameCard` | [Self-serve cancel (v0.23.0)](./HEADLESS.md#self-serve-cancel-v0230) | Available: AccountDashboard gameCards, GameCardHistory and AddToWalletButtons. `templates/center-site/app/account/game-cards/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
28
+ | saved-cards: Saved cards / payment methods | `useSavedCards`, `useCreateCardSetup`, `useRemoveCard`, `useSetDefaultCard`; `listSavedCards`, `createCardSetup`, `removeSavedCard`, `setDefaultCard` | [Saved cards and signed-in password changes (v0.36.0)](./HEADLESS.md#saved-cards-and-signed-in-password-changes-v0360) | Available: SavedCards from /components + AddCardForm from /payments. `templates/center-site/app/account/payment-methods/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
29
+ | password: Change password | `useChangePassword`, `changePassword`, `useAccount` | [Saved cards and signed-in password changes (v0.36.0)](./HEADLESS.md#saved-cards-and-signed-in-password-changes-v0360) | Available: ChangePasswordForm, including the email-code reset link. `templates/center-site/app/account/security/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
30
+ | profile: Profile / communications | `useAccount`, `useUpdateMyProfile`, `useSetMyMobile`, `useMyCommunicationPrefs`, `useSetMyCommunicationPref`, `useSubmitSupportRequest` | [Customer toolkit routes (v0.37.0)](./HEADLESS.md#customer-toolkit-routes-v0370) | Available: ProfileForm + CommunicationPrefs. `templates/center-site/app/account/profile/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
31
+ | privacy: Privacy: export + delete account | `useAccountDeletion`, `previewAccountDeletion`, `deleteMyAccount`, `exportMyDataV2`, `useExportMyData`, `exportMyData`, `useDeleteMyAccount` | [Account deletion and export (v0.38.0)](./HEADLESS.md#account-deletion-and-export-v0380) | Available: PrivacyCenter: deletion consequences, exact typing, retry/support and export v2. `templates/center-site/app/account/privacy/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
32
+ | detail: Order / reservation detail + cancellation | `useMyReservationDetail`, `useMyEventOrder`, `useMyPackageOrder`, `useReceipt`, `useReservationCancelPreview`, `useEventOrderCancelPreview`, `usePackageOrderCancelPreview`, `useCancelMyReservation`, `useCancelMyEventOrder`, `useCancelMyPackageOrder` | [Self-serve cancel (v0.23.0)](./HEADLESS.md#self-serve-cancel-v0230) | Available: BookingChange + AddToWalletButtons; use the loaded expectedVersion. `templates/center-site/app/account/reservations/page.tsx`, `templates/center-site/app/account/reservations/[displayId]/page.tsx`, `templates/center-site/app/account/reservations/[displayId]/change/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
33
+ | pay-links: Pay links | `getPayLink`, `createPayLinkPayment`, `usePayLink`, `useCreatePayLinkPayment` | [9. Payment (Stripe Connect)](./HEADLESS.md#9-payment-stripe-connect) | Available: BowlosPaymentForm from /payments with usePayLink and useCreatePayLinkPayment. `templates/center-site/app/pay/[token]/page.tsx`. [Reference account components](./HEADLESS.md#reference-account-components-v0410). |
34
+ | waitlist: Slot-full join + account pending entries | `joinWaitlist`, `createWaitlistSetupIntent`, `confirmWaitlistCard`, `listMyWaitlist`, `leaveWaitlist`, `useWaitlistJoin` | [0.42.0](./HEADLESS.md#0420) | `WaitlistJoin` reference; adapt booking and account templates to your own design. Center toggle controls availability; explicit amount consent required. |
35
+
36
+ ## Install and configure
37
+
38
+ Every value below comes from the shipped code: the template's `env.example`, the
39
+ `bowlos` CLI (`src/cli.ts`) and the doctor (`src/doctor.ts`). Replace `<site-dir>`
40
+ with your site's folder. Values in `.env.local` are placeholders until you paste
41
+ the real ones from the BowlOS admin.
42
+
43
+ ### 1. Install the SDK and its peers
44
+
45
+ ```bash
46
+ cd <site-dir>
47
+ npm i @bowlos/reservations@^0.43.0
48
+ npm i react@19.2.4 react-dom@19.2.4 next@16.2.4 @stripe/stripe-js@9.4.0 @stripe/react-stripe-js@6.3.0
49
+ ```
50
+
51
+ The peers are pinned to the versions the template is built and tested with
52
+ (`templates/center-site/package.json`). `react` (for `/react` and `/components`) and
53
+ `@stripe/stripe-js` + `@stripe/react-stripe-js` (for `/payments`) are optional peers.
54
+ The core entry needs none of them.
55
+
56
+ ### 2. Configure environment variables
57
+
58
+ ```bash
59
+ cd <site-dir>
60
+ cp node_modules/@bowlos/reservations/templates/center-site/env.example .env.local
61
+ ```
62
+
63
+ Fill in `.env.local`. The template needs exactly these variables:
64
+
65
+ | Variable | Exposure | Placeholder | Where it comes from |
66
+ | --- | --- | --- | --- |
67
+ | `NEXT_PUBLIC_BOWLOS_BASE_URL` | public (browser) | `https://your-deployment.convex.site/api/public/v1` | Gateway URL, including `/api/public/v1` |
68
+ | `NEXT_PUBLIC_BOWLOS_API_KEY` | public (browser) | `bpk_test_xxxxxxxxxxxx` | Brand publishable key from the admin's "Public API keys" page, shown once when it's minted |
69
+ | `NEXT_PUBLIC_BOWLOS_BRAND_ID` | public (browser) | `your-brand-id` | Raw brand ID from the admin (no `brand_` prefix) |
70
+ | `NEXT_PUBLIC_BOWLOS_CENTER_ID` | public (browser) | `your-center-id` | Raw center ID from the admin (no `center_` prefix) |
71
+ | `NEXT_PUBLIC_DEMO_PRODUCT_ID` | public (browser) | `your-product-id` | A bookable product ID |
72
+ | `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` | public (browser) | `pk_test_xxxxxxxxxxxx` | Platform Stripe publishable key |
73
+
74
+ All six are public. The brand key and the Stripe key are publishable keys, and the
75
+ gateway limits the brand key to the origins on its allow-list. The template uses no
76
+ server-only variables. Any secret you add later, such as the inquiry secret that
77
+ `forwardInquiry` needs, stays server-only: never give it a `NEXT_PUBLIC_` prefix and
78
+ never import it into browser code. Never commit `.env.local`.
79
+
80
+ ### 3. Run the doctor
81
+
82
+ ```bash
83
+ cd <site-dir>
84
+ set -a; . ./.env.local; set +a
85
+ npx bowlos doctor --api-key "$NEXT_PUBLIC_BOWLOS_API_KEY" --base-url "$NEXT_PUBLIC_BOWLOS_BASE_URL" --origin http://localhost:3000
86
+ ```
87
+
88
+ A pass exits with code 0 and prints `brand <brandId> · mode test`. It also prints ✓
89
+ for `Client configuration`, `Gateway reachable`, `API key accepted` and
90
+ `Data passthrough`, and ends with `All checks passed — ready.` (or
91
+ `Ready, with N warning(s).`). From the CLI, `Origin allow-listed` and
92
+ `Payments connected` always show `·` (skip): the doctor can only check origins from a
93
+ browser, and Stripe Connect status isn't exposed over the public API. Skips don't fail
94
+ the run. A failure exits non-zero and ends with `N check(s) failed — not ready.`.
95
+ Add `--json` to get the raw report.
96
+
97
+ ### 4. Scaffold the starter site
98
+
99
+ ```bash
100
+ cd <site-dir>
101
+ npx bowlos init . --force
102
+ npm install
103
+ ```
104
+
105
+ `init` copies the full starter into `<site-dir>`. Its `package.json` pins
106
+ `@bowlos/reservations@^0.43.0` and the peers above. `--force` is required because
107
+ step 1 already created files in the folder, and it overwrites files that share a
108
+ name with template files (your `.env.local` stays). On an existing app, skip `init`
109
+ and copy pages from `node_modules/@bowlos/reservations/templates/center-site/`
110
+ instead. To scaffold into a fresh folder, run `npx @bowlos/reservations init <site-dir>`
111
+ from its parent folder.
112
+
113
+ ### 5. Run locally, then switch from test to live
114
+
115
+ ```bash
116
+ cd <site-dir>
117
+ npm run dev
118
+ ```
119
+
120
+ The site runs at http://localhost:3000. Add `http://localhost:3000` to the test key's
121
+ allowed origins, or the browser gets `ORIGIN_NOT_ALLOWED`.
122
+
123
+ ```bash
124
+ cd <site-dir>
125
+ npm run build && npm run start
126
+ ```
127
+
128
+ Test mode means a `bpk_test_…` brand key plus a `pk_test_…` Stripe key. To go live,
129
+ put a `bpk_live_…` key in `NEXT_PUBLIC_BOWLOS_API_KEY` and a `pk_live_…` key in
130
+ `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` in the production environment, add the deployed
131
+ origin to the live key's allow-list, and rerun step 3 with that origin. The doctor
132
+ must then print `mode live`. Never mix a test key with a live key.
133
+
134
+ ### Troubleshooting (doctor output → fix)
135
+
136
+ | Doctor result | Cause | Fix |
137
+ | --- | --- | --- |
138
+ | `Missing --api-key / --base-url` | Env not loaded into the shell | Rerun `set -a; . ./.env.local; set +a` before `npx bowlos doctor`. |
139
+ | `Client configuration` ✗ (`apiKey` is empty / `baseUrl` is not a valid URL) | Bad `.env.local` value | Set `NEXT_PUBLIC_BOWLOS_API_KEY` and a full `https://…/api/public/v1` URL. |
140
+ | `Client configuration` ⚠ (doesn't end with /api/public/v1) | URL points at the site root | Append `/api/public/v1` to `NEXT_PUBLIC_BOWLOS_BASE_URL`. |
141
+ | `Gateway reachable` ✗ (`NETWORK_ERROR`) | No connection | Check the URL, that the Convex deployment is live, and your network. |
142
+ | `Gateway reachable` ✗ (`NOT_FOUND`, no public-API gateway responded) | Wrong deployment, or the public-API routes aren't deployed | Fix the base URL, or have the operator deploy the backend. |
143
+ | `API key accepted` ✗ (`API_KEY_INVALID` / `API_KEY_MISSING`) | Key revoked, mistyped, or from another deployment | Mint or rotate a brand API key in the admin and paste it. |
144
+ | `Origin allow-listed` ✗ (`ORIGIN_NOT_ALLOWED`) | Origin isn't on the key's allow-list | Add the site origin (for example `http://localhost:3000`) to the key's allowed origins. |
145
+ | `Rate-limit headroom` ⚠ (`RATE_LIMITED`) | Too many calls | Wait for the retry-after time, or raise the key's per-minute limit. |
146
+ | `Data passthrough` ⚠ | No published center, or a brand-specific read failed | Publish at least one center for the brand. If booking reads work, you can ignore it. |
147
+ | `Payments connected` · | Can't be checked over the public API | In the admin, confirm Payments → Connect is connected and charges-enabled. |
148
+
149
+ ## Build order
150
+
151
+ 1. Follow [Install and configure](#install-and-configure) step by step: install the
152
+ package and peers, then fill in `.env.local`. Keep secrets only in the server environment.
153
+ 2. Run `npx bowlos doctor` (step 3 there) and fix any failures using its troubleshooting table.
154
+ 3. Scaffold with `bowlos init` (step 4 there); copy the template's provider, layout and navigation,
155
+ then replace its reference design with the center's visual identity.
156
+ 4. Build the date-first booking funnel through a test-mode confirmation and receipt.
157
+ 5. Build auth, email-code recovery, the account pages, profile and privacy recovery paths.
158
+ 6. Build catalog/event/package/membership money flows, saved cards and cancellation.
159
+ Add future money APIs only when that version is installed and its backend is available.
160
+ 7. Polish navigation, mobile layouts, loading/empty/error states, accessibility and Center timezone display.
161
+
162
+ ## Non-negotiable rules
163
+
164
+ - Every displayed price must come at runtime from that brand's/center's Bowl OS account
165
+ through public APIs (hooks from `/react`; functions from the root): lane/slot and
166
+ product booking prices/totals via `useSlotPrices` / `previewSlotPrices` and
167
+ `useBookingPreview` / `bookingPreview`; packages via `usePackagePreview` / `previewPackage`;
168
+ events/tickets via `useEventOffers` / `listEventOffers` and `useEventTicketPreview` / `previewEventTicket`;
169
+ add-ons via `useAddons` / `listAddons`; game cards via `useGameCard` / `getGameCard`
170
+ and `useGameCardPreview` / `previewGameCard`; memberships via `useMembership` / `getMembership`,
171
+ `useMembershipPreview` / `previewMembership` and `useMembershipSubscriptionPreview` / `previewMembershipSubscription`;
172
+ flash-sale prices via `useFlashSale` / `getFlashSale` (sale/regular cents as returned;
173
+ type the result with the `FlashSaleView` type from `/components`; prices unlock only
174
+ after sign-in — never show a sale price before) and sale booking totals via
175
+ `createFlashSaleBooking`; retail walk-in rates/specials via
176
+ `useRetailPricing` / `listRetailPricing`. Never hardcode or copy prices into site content,
177
+ CMS, JSON or markdown, or compute prices, discounts, taxes, fees or totals on the site.
178
+ Display API-returned cents using only `formatCents` / `formatCentsRange` from `/components`.
179
+ Quotes/previews must use preview APIs, never site arithmetic.
180
+ - Headless-first: match the center's own design; zero BowlOS branding on customer screens.
181
+ Drop-in components are reference/fast-start code; they are not the delivered design.
182
+ - Test mode before live: use a non-live/test-mode Center and an `isTestAccount` customer.
183
+ Assert `stripeMode === "test"` on every Stripe response before confirmation. API-key
184
+ mode is cosmetic; never force mode with a public requestTestMode argument.
185
+ - Never put a secret key in the browser. Inquiry forwarding belongs on the server.
186
+ Use the returned publishableKey/stripeAccount; do not substitute a build-time key.
187
+ - Branch on `err.code`, never message text. Preserve sessions on recoverable errors.
188
+ - Type-to-confirm inputs: `autoCorrect="off"`, `autoComplete="off"`,
189
+ `spellCheck={false}`, `autoCapitalize="none"`.
190
+ - Every customer must have a self-recovery path: email-code reset from login AND
191
+ "Forgot your current password?" on change-password; clear retry/support paths.
192
+ - No dead-end delete account. With useAccountDeletion,
193
+ explain failures, keep the session and provide retry plus actionable support.
194
+ Never hide deletion because of a membership or leave a disabled button without recovery.
195
+
196
+ ## Done check
197
+
198
+ - Check for hardcoded prices in site source/content (excluding dependencies and build output):
199
+
200
+ ```bash
201
+ cd <site-dir>
202
+ grep -rnE --exclude-dir=node_modules --exclude-dir=.next --exclude-dir=.git '\$[0-9]|[0-9]+\.[0-9]{2}|priceCents:\s*[0-9]|Cents\s*[:=]\s*[0-9]' .
203
+ ```
204
+
205
+ Remove every hit or justify it as non-price; no matches exits 1. Review for site-side
206
+ price/discount/tax/fee/total math too. In test mode, change a price in the brand/center
207
+ Bowl OS account and confirm it appears on the site after a runtime refresh without a redeploy.
208
+ - `npx bowlos doctor` passes for the site's configured origin/scope.
209
+ - Every shipped checklist page builds and is reachable from navigation, including
210
+ recovery, detail links and privacy. Track future-version pages explicitly; do not claim parity early.
211
+ - Run a test-mode booking → pay → confirmation → account reservation/receipt smoke.
212
+ - Run the account smoke on a dedicated non-live SDK Smoke Brand/Center with an
213
+ `isTestAccount` customer: sign up → list cards empty → setup intent → confirm 4242 →
214
+ list → saved card visible at checkout in the same mode → set default → remove →
215
+ wrong current password (still signed in, no refresh) → change password → re-login →
216
+ multi-brand negative check → cleanup via deleteMyAccount. Assert test stripeMode
217
+ before every Stripe confirmation. Test email-code recovery and export/deletion failures too.
218
+ - Test membership self-cancel and verify Stripe cancel_at_period_end through the test
219
+ environment's authorized operator. Test deletion consequences/details now. Test wallet URL + game-card history now. Test pricier booking change → pay →
220
+ webhook applies, slot-taken refund, billing portal and pay links.
221
+
222
+ ## Public API coverage
223
+
224
+ Maintainers: every new public export needs a row here, per entry point; every new
225
+ feature also needs a Required pages checklist entry. Grouped backtick names are
226
+ machine-readable. Types and low-level utilities may be marked internal/advanced.
227
+ Do not treat internal/advanced as a recommended site integration path.
228
+
229
+ | Entry point | Exports | Checklist item or classification |
230
+ | --- | --- | --- |
231
+ | `.` | `AddMyMembershipMemberArgs`, `AddMyMembershipMemberResult`, `ApplyMyModificationArgs`, `ApplyMyModificationResult`, `AuthState`, `AvailabilityArgs`, `AvailabilityResult`, `BOWLOS_ERROR_CODES`, `BookingAddonSelection`, `BookingCustomer`, `BookingHold`, `BookingPreviewArgs`, `BookingQuote`, `BowlosApiError`, `BowlosApiErrorOptions`, `BowlosClient`, `BowlosClientConfig`, `BowlosErrorCode`, `BrandCatalogArgs`, `BrandScoped`, `CancelCheckoutPaymentArgs`, `CancelCheckoutPaymentResult`, `CancelMyMembershipArgs`, `CancelMyMembershipResult`, `CancelPreview`, `CancelResult`, `CardSetupResult`, `CatalogActionType`, `CatalogArgs`, `CatalogCategory`, `CatalogItem`, `CatalogResult`, `CatalogSection`, `CatalogSourceTable`, `CenterHoursArgs`, `CenterScoped`, `ChangePasswordArgs`, `CheckoutStatus`, `CheckoutStatusResult`, `ConnectedPaymentInput`, `CreateBookingArgs`, `CreateFlashSaleBookingArgs`, `Customer`, `DeleteMyAccountArgs`, `DeleteMyAccountResult`, `DoctorCheck`, `DoctorCheckStatus`, `DoctorOptions`, `DoctorReport`, `EventOrderDetailArgs`, `EventTicketCheckoutStatus`, `EventTicketPreviewArgs`, `EventTicketPreviewResult`, `EventTicketPurchaseArgs`, `EventTicketPurchaseIntent`, `EventTicketStatusResult`, `ExportMyDataArgs`, `ExportMyDataResult`, `FetchLike`, `FlashBookingOptionsArgs`, `FlashSaleArgs`, `FlashSaleBookingResult`, `FlashSalesArgs`, `ForwardInquiryConfig`, `ForwardInquiryInput`, `GameCardCancelArgs`, `GameCardCheckoutStatus`, `GameCardPreviewArgs`, `GameCardPreviewResult`, `GameCardPurchaseArgs`, `GameCardPurchaseIntent`, `GameCardStatusResult`, `GetCenterOperatingHoursForTypeArgs`, `GetCenterOperatingHoursForTypeResult`, `GetGameCardArgs`, `GetGameCardResult`, `GetMembershipArgs`, `GetMembershipResult`, `GetMyCommunicationPrefsArgs`, `GetMyCommunicationPrefsResult`, `GetMyLoyaltyHistoryArgs`, `GetMyLoyaltyHistoryResult`, `GetMyMembershipMembersArgs`, `GetMyMembershipMembersResult`, `GetMyPackageOrderArgs`, `GetMyPackageOrderResult`, `GetMyPackageOrdersArgs`, `GetMyPackageOrdersResult`, `GetOperatingHoursArgs`, `GetOperatingHoursResult`, `GetPackagesLabelArgs`, `GetPackagesLabelResult`, `GetProductArgs`, `GetProductResult`, `GetReceiptArgs`, `GetReceiptResult`, `InquiryFieldDef`, `InquiryFormType`, `LinkProfile`, `ListBrandMembershipsArgs`, `ListBrandMembershipsResult`, `ListCentersArgs`, `ListCentersResult`, `ListHoursArgs`, `ListHoursResult`, `ListProductSubtypesArgs`, `ListProductSubtypesResult`, `MembershipCheckoutStatus`, `MembershipDetailArgs`, `MembershipMember`, `MembershipPreviewArgs`, `MembershipPreviewResult`, `MembershipPurchaseArgs`, `MembershipPurchaseIntent`, `MembershipStatusResult`, `MembershipSubscriptionArgs`, `MembershipSubscriptionIntent`, `MembershipSubscriptionPreviewResult`, `MyGameCard`, `OrderCancelArgs`, `PackageAddon`, `PackageAddonMode`, `PackageCheckoutStatus`, `PackageDetailArgs`, `PackagePreviewArgs`, `PackagePreviewResult`, `PackagePurchaseArgs`, `PackagePurchaseIntent`, `PackageScheduleShape`, `PackageStatusResult`, `PackageWeekdayStartTimes`, `PaymentIntentInfo`, `PingResult`, `PreviewSlotPricesArgs`, `PreviewSlotPricesResult`, `PricingMode`, `PublicAddon`, `PublicSurface`, `ReservationCancelArgs`, `ReservationDetailArgs`, `RetailAttraction`, `RetailPricing`, `RetailPricingMode`, `RetailSpecial`, `RetailWalkInRate`, `SavedCard`, `SavedCardArgs`, `SavedCardScope`, `SavedCardsResult`, `SetMyCommunicationPrefArgs`, `SetMyCommunicationPrefResult`, `SetMyMobileArgs`, `SetMyMobileResult`, `StartTimesArgs`, `SubmitSupportRequestArgs`, `SubmitSupportRequestResult`, `TokenStore`, `Tokens`, `UpdateMyProfileArgs`, `UpdateMyProfileResult`, `abandonCheckout`, `addMyMembershipMember`, `applyMyModification`, `availableUnitCount`, `bookingPreview`, `cancelCheckoutPayment`, `cancelMyEventOrder`, `cancelMyGameCard`, `cancelMyMembership`, `cancelMyPackageOrder`, `cancelMyReservation`, `checkAvailability`, `createBooking`, `createBowlosClient`, `createCheckoutPaymentIntent`, `createEventTicketOrder`, `createGameCardOrder`, `createMembershipOrder`, `createMembershipSubscriptionOrder`, `createPackageOrder`, `generateIdempotencyKey`, `getCenterHours`, `getCenterOperatingHoursForType`, `getCheckoutStatus`, `getEventOffer`, `getEventTicketStatus`, `getFlashSale`, `getFlashSaleBookingOptions`, `getFlashSales`, `getGameCard`, `getGameCardStatus`, `getMembership`, `getMembershipStatus`, `getMyCommunicationPrefs`, `getMyCredits`, `getMyEventOrder`, `getMyEventOrders`, `getMyGameCards`, `getMyLoyalty`, `getMyLoyaltyHistory`, `getMyMembershipDetail`, `getMyMembershipMembers`, `getMyMemberships`, `getMyPackageOrder`, `getMyPackageOrders`, `getMyPasses`, `getMyReservationDetail`, `getMyReservations`, `getOperatingHours`, `getPackage`, `getPackageStatus`, `getPackagesLabel`, `getProduct`, `getReceipt`, `listAddons`, `listBrandMemberships`, `listCatalog`, `listCenters`, `listEventOffers`, `listEvents`, `listGameCards`, `listHours`, `listPackages`, `listProductSubtypes`, `listProducts`, `listPublicMemberships`, `listStartTimes`, `localStorageTokenStore`, `previewEventOrderCancellation`, `previewEventTicket`, `previewGameCard`, `previewGameCardCancellation`, `previewMembership`, `previewMembershipSubscription`, `previewPackage`, `previewPackageOrderCancellation`, `previewReservationCancellation`, `previewSlotPrices`, `resolvePackageStartTimesForWeekday`, `runDoctor`, `setMyCommunicationPref`, `setMyMobile`, `splitPackageAddons`, `submitSupportRequest`, `toOptionalAddonsInput`, `updateMyProfile`, `usesPerWeekdayStartTimes`, `weekdayForDateISO` | internal/advanced |
232
+ | `.` | `INQUIRY_FORMS`, `forwardInquiry` | inquiry |
233
+ | `.` | `changePassword` | password |
234
+ | `.` | `createCardSetup`, `listSavedCards`, `removeSavedCard`, `setDefaultCard` | saved-cards |
235
+ | `.` | `createFlashSaleBooking` | flash |
236
+ | `.` | `deleteMyAccount`, `exportMyData`, `previewAccountDeletion`, `exportMyDataV2`, `AccountDeletionPreview`, `ExportMyDataV2Result` | privacy |
237
+ | `.` | `listRetailPricing` | pricing |
238
+ | `/react` | `AccountStatus`, `BookingFlowStatus`, `BookingReservationRef`, `BowlosProvider`, `BowlosProviderProps`, `PurchasePaymentIntent`, `PurchaseStatus`, `UseAccountResult`, `UseBookingFlowResult`, `UseMutationResult`, `UsePurchaseResult`, `UseQueryOptions`, `UseQueryResult`, `UseSubscriptionCheckoutResult`, `useApplyMyModification`, `useBowlosClient`, `useBowlosMutation`, `useBowlosQuery`, `useBrandMemberships`, `useCenterOperatingHoursForType`, `useGameCard`, `useMembership`, `useMembershipSubscriptionPreview`, `useOperatingHours`, `usePackagesLabel`, `useProduct`, `useProductSubtypes`, `usePurchase`, `useSlotPrices`, `useTestMode` | internal/advanced |
239
+ | `/react` | `useAccount` | auth |
240
+ | `/react` | `useAddMyMembershipMember`, `useCancelMyMembership`, `useMyMembershipDetail`, `useMyMembershipMembers`, `useMyMemberships` | memberships |
241
+ | `/react` | `useAddons`, `useAvailability`, `useBookingFlow`, `useBookingPreview`, `useProducts`, `useStartTimes` | book |
242
+ | `/react` | `useCancelMyEventOrder`, `useCancelMyPackageOrder`, `useCancelMyReservation`, `useEventOrderCancelPreview`, `useMyEventOrder`, `useMyPackageOrder`, `useMyReservationDetail`, `usePackageOrderCancelPreview`, `useReceipt`, `useReservationCancelPreview` | detail |
243
+ | `/react` | `useCancelMyGameCard`, `useGameCardCancelPreview`, `useMyGameCards` | game-cards |
244
+ | `/react` | `useCatalog`, `useCenterHours`, `useCenters`, `useHours` | home |
245
+ | `/react` | `useChangePassword` | password |
246
+ | `/react` | `useCreateCardSetup`, `useRemoveCard`, `useSavedCards`, `useSetDefaultCard` | saved-cards |
247
+ | `/react` | `useDeleteMyAccount`, `useExportMyData`, `useAccountDeletion` | privacy |
248
+ | `/react` | `useEventOffer`, `useEventOffers`, `useEventTicketPreview`, `useEventTicketPurchase`, `useEvents` | events |
249
+ | `/react` | `useFlashSale`, `useFlashSaleBookingOptions`, `useFlashSales` | flash |
250
+ | `/react` | `useGameCardPreview`, `useGameCardPurchase`, `useGameCards`, `useMembershipPreview`, `useMembershipPurchase`, `useMembershipSubscriptionCheckout`, `usePackage`, `usePackagePreview`, `usePackagePurchase`, `usePackages`, `usePublicMemberships` | buy |
251
+ | `/react` | `useMyCommunicationPrefs`, `useSetMyCommunicationPref`, `useSetMyMobile`, `useSubmitSupportRequest`, `useUpdateMyProfile` | profile |
252
+ | `/react` | `useMyCredits`, `useMyEventOrders`, `useMyLoyalty`, `useMyLoyaltyHistory`, `useMyPackageOrders`, `useMyPasses`, `useMyReservations` | account |
253
+ | `/react` | `useRetailPricing` | pricing |
254
+ | `/components` | `AccountDashboard`, `AccountDashboardLabels`, `AccountDashboardProps`, `AccountMenu`, `AccountMenuLabels`, `AccountMenuProps`, `AccountSection`, `AuthForm`, `AuthGate`, `AuthGateLabels`, `AuthGateProps`, `AuthGateRenderContext`, `BOWLOS_DEFAULT_THEME`, `BookingCatalog`, `BookingCatalogLabels`, `BookingCatalogProps`, `BookingFlow`, `BookingFlowLabels`, `BookingFlowProps`, `BowlosTheme`, `BowlosThemeTokens`, `CatalogItem`, `CatalogResult`, `CatalogSection`, `FlashBrand`, `FlashSale`, `FlashSaleIndex`, `FlashSaleIndexItem`, `FlashSaleIndexLabels`, `FlashSaleIndexProps`, `FlashSaleIndexView`, `FlashSaleItem`, `FlashSaleLabels`, `FlashSaleProps`, `FlashSaleView`, `InquiryForm`, `InquiryFormProps`, `MaintenanceBanner`, `MaintenanceBannerProps`, `MyCreditEntry`, `MyCredits`, `MyLoyalty`, `MyMembershipSummary`, `MyPass`, `MyReservationSummary`, `PricingTable`, `PricingTableLabels`, `PricingTableProps`, `formatCents`, `formatCentsRange` | internal/advanced |
255
+ | `/payments` | `BowlosPaymentForm`, `BowlosPaymentFormLabels`, `BowlosPaymentFormProps` | internal/advanced |
256
+
257
+ | `.` | `EventOffer`, `ListEventOffersArgs`, `ListBrandEventOffersArgs`, `BrandEventOffer`, `ListBrandEventOffersResult`, `GetMyGameCardArgs`, `GetMyGameCardResult`, `GameCardRedemption`, `GetMyGameCardHistoryArgs`, `GetMyGameCardHistoryResult`, `GetWalletPassUrlArgs`, `GetWalletPassUrlResult`, `MyHoldArgs`, `MyHold`, `EmailVerificationArgs`, `RequestEmailVerificationResult`, `EmailVerificationTokenArgs`, `EmailVerificationStatus`, `EmailVerificationSendStateArgs`, `EmailVerificationSendState`, `GetCancellationPolicyArgs`, `CancellationPolicy`, `CancelMyPendingBookingArgs`, `CancelMyPendingBookingResult`, `listBrandEventOffers`, `getMyGameCard`, `getMyGameCardRedemptions`, `getMyGameCardHistory`, `getWalletPassUrl`, `getMyHold`, `extendMyHold`, `releaseMyHold`, `requestEmailVerification`, `confirmEmailVerification`, `getEmailVerificationStatus`, `getEmailVerificationSendState`, `getCancellationPolicy`, `cancelMyPendingBooking` | events / game-cards / book / auth |
258
+ | `/react` | `useBrandEventOffers`, `useMyGameCard`, `useMyGameCardRedemptions`, `useMyGameCardHistory`, `useWalletPassUrl`, `useMyHold`, `useExtendMyHold`, `useReleaseMyHold`, `useRequestEmailVerification`, `useConfirmEmailVerification`, `useEmailVerificationStatus`, `useEmailVerificationSendState`, `useCancellationPolicy`, `useCancelMyPendingBooking`, `useHoldCountdown`, `useEmailVerification` | events / game-cards / book / auth |
259
+ | `/components` | `EventList`, `EventListLabels`, `EventListProps` | events |
260
+
261
+ | `.` | `PreviewBookingChangeArgs`, `ApplyBookingChangeArgs`, `BookingChangePreview`, `PendingBookingChangeArgs`, `PendingBookingChange`, `BookingChangePaymentArgs`, `BookingChangePayment`, `MembershipBillingPortalArgs`, `PayLinkArgs`, `PayLink`, `PayLinkPayment`, `previewBookingChange`, `applyBookingChange`, `getPendingBookingChange`, `createBookingChangePayment`, `openMembershipBillingPortal`, `getPayLink`, `createPayLinkPayment` | detail / memberships / pay-links |
262
+ | `/react` | `BookingChangeStatus`, `useBookingChange`, `useOpenMembershipBillingPortal`, `usePayLink`, `useCreatePayLinkPayment` | detail / memberships / pay-links |
263
+
264
+ | `/components` | `SavedCards`, `SavedCardsProps` | saved-cards |
265
+ | `/components` | `ChangePasswordForm`, `ChangePasswordFormProps` | password |
266
+ | `/components` | `ProfileForm`, `ProfileFormProps` | profile |
267
+ | `/components` | `CommunicationPrefs`, `CommunicationPrefsProps` | profile |
268
+ | `/components` | `MembershipDetail`, `MembershipDetailProps` | memberships |
269
+ | `/components` | `GameCardHistory`, `GameCardHistoryProps` | game-cards |
270
+ | `/components` | `AddToWalletButtons`, `AddToWalletButtonsProps` | game-cards |
271
+ | `/components` | `PrivacyCenter`, `PrivacyCenterProps` | privacy |
272
+ | `/components` | `BookingChange`, `BookingChangeProps` | detail |
273
+ | `/payments` | `AddCardForm`, `AddCardFormProps` | saved-cards |
274
+
275
+
276
+ | `.` | `SlotFullDetails`, `JoinWaitlistArgs`, `WaitlistEntryArgs`, `JoinWaitlistResult`, `WaitlistSetupIntent`, `MyWaitlistEntry`, `joinWaitlist`, `createWaitlistSetupIntent`, `confirmWaitlistCard`, `listMyWaitlist`, `leaveWaitlist` | waitlist |
277
+ | `/react` | `WaitlistJoinStatus`, `useWaitlistJoin` | waitlist |
278
+ | `/components` | `WaitlistJoin`, `WaitlistJoinProps` | waitlist |
279
+
280
+ ## Template pages
281
+
282
+ Generated from examples/center-site; edit the source when maintaining the SDK.
283
+ Every page below must remain covered, including dynamic routes.
284
+
285
+ - `templates/center-site/app/account/page.tsx`
286
+ - `templates/center-site/app/book/page.tsx`
287
+ - `templates/center-site/app/buy/page.tsx`
288
+ - `templates/center-site/app/catalog/page.tsx`
289
+ - `templates/center-site/app/flash/[slug]/page.tsx`
290
+ - `templates/center-site/app/flash/page.tsx`
291
+ - `templates/center-site/app/page.tsx`
292
+
293
+ - `templates/center-site/app/events/page.tsx`
294
+ - `templates/center-site/app/account/game-cards/page.tsx`
295
+ - `templates/center-site/app/account/memberships/[id]/page.tsx`
296
+ - `templates/center-site/app/account/memberships/page.tsx`
297
+ - `templates/center-site/app/account/orders/page.tsx`
298
+ - `templates/center-site/app/account/payment-methods/page.tsx`
299
+ - `templates/center-site/app/account/privacy/page.tsx`
300
+ - `templates/center-site/app/account/profile/page.tsx`
301
+ - `templates/center-site/app/account/reservations/[displayId]/change/page.tsx`
302
+ - `templates/center-site/app/account/reservations/[displayId]/page.tsx`
303
+ - `templates/center-site/app/account/reservations/page.tsx`
304
+ - `templates/center-site/app/account/security/page.tsx`
305
+ - `templates/center-site/app/events/[slug]/page.tsx`
306
+ - `templates/center-site/app/pay/[token]/page.tsx`