@bowlos/reservations 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/HEADLESS.md
CHANGED
|
@@ -996,6 +996,24 @@ as done and re-read the list.
|
|
|
996
996
|
`getMyGameCards(client, { brandId })`, etc. (generate the key with
|
|
997
997
|
`generateIdempotencyKey()`).
|
|
998
998
|
|
|
999
|
+
## Wallet passes — hide the add-to-wallet once a pass is stale
|
|
1000
|
+
|
|
1001
|
+
`useMyPasses({ brandId })` (core: `getMyPasses(client, { brandId })`) lists the
|
|
1002
|
+
signed-in customer's issued passes. Each row now carries **`walletEligible:
|
|
1003
|
+
boolean`** — surface "Add to Apple Wallet" / "Save to Google Wallet" only while
|
|
1004
|
+
it is `true`. It goes `false` once the pass is no longer worth adding:
|
|
1005
|
+
|
|
1006
|
+
- **reservation / package** — the booking's Center-local **day is over** (a
|
|
1007
|
+
same-day pass stays eligible all day, in the Center's timezone).
|
|
1008
|
+
- **game card** — not `active`, or past its expiry.
|
|
1009
|
+
- **membership** — lapsed (`terminated` / `reactivatable`); `active` /
|
|
1010
|
+
`cancel_at_period_end` / `grace` stay eligible.
|
|
1011
|
+
|
|
1012
|
+
The server enforces this regardless of the client: the pass-URL endpoints return
|
|
1013
|
+
no link for an ineligible pass, so a stale "Add to Wallet" button is a dead
|
|
1014
|
+
action — gate on `walletEligible` to avoid showing it. Row shape:
|
|
1015
|
+
`{ id, displayId, kind, state, generation, walletEligible }`.
|
|
1016
|
+
|
|
999
1017
|
## Date-first booking (v0.24.0)
|
|
1000
1018
|
|
|
1001
1019
|
A Center can default its booking entry to **date-first** ("pick a day → see
|
|
@@ -1114,6 +1132,7 @@ Headless sites do **not** get these from a version bump — apply them by hand.
|
|
|
1114
1132
|
| **0.26.0** | **Atomic sign-up** — `account.register(email, password, { fullName, marketingOptIn? })` / `client.register(...)` creates the Convex Auth login **and** the brand-scoped customer profile in one server call. | §1 sub-section. Build sign-up from `register` (collect the name on the form). Stop using `signUp()` + a separate `link()` (a missed `link` leaves a login with no customer profile). `signUp`/`link` remain only for `authed_no_customer` recovery. |
|
|
1115
1133
|
| **0.27.0** | **Pricing before login** — the funnel now mirrors the white-label: browse + see pricing **signed out**, log in only at **Review** before payment. Reads are no longer gated on `signedIn`; `useBookingPreview` / core `bookingPreview(client, args, { auth })` send the bearer when a session exists (member rate + credit); `<BookingFlow>` gates at Review and disables "Continue" until the post-login re-quote resolves. (Server still enforces login on the booking-create mutation.) | §1 (rewritten), §4, §7. Drop `signedIn` from the read `enabled` gates; pass `auth: signedIn` to the preview (or `{ auth }` to the core fn); move your sign-in / create-account form to the Review step (replace "Continue to payment" when signed out); re-quote after login and keep "Continue" disabled while `preview.loading`. Private (share-token) + tier pricing are unaffected — the token/tier gates still hold for anonymous callers. |
|
|
1116
1134
|
|
|
1135
|
+
| **0.29.0** | **Wallet eligibility on `useMyPasses`** — each pass row from `useMyPasses` / `getMyPasses` now carries `walletEligible: boolean`. It's `false` once a pass is stale (reservation/package day is over in the Center's timezone; game card inactive/expired; membership lapsed). The server also returns no pass URL for an ineligible pass, so a stale "Add to Wallet" button is a dead action either way. | New "Wallet passes" section. If your site shows "Add to Apple/Google Wallet", gate the buttons on `pass.walletEligible`. No change if you don't surface wallet passes. The `MyPass` type gained the field. |
|
|
1117
1136
|
| **0.28.0** | **Per-brand logins + forgot-password** — customer auth is now scoped to the brand (same email = independent account/password per center business; server-side, the gateway encodes the brand into the credential). New `account.requestPasswordReset(email)` + `account.resetPassword(email, code, newPassword)` (and `client.*`); the reset emails a 6-digit code from the center's white-label sending domain, and a successful reset signs the customer in. `<AuthForm>`/`<AuthGate>` gained the "Forgot password?" flow. | §1 sub-sections "Per-brand logins" + "Forgot password". No change for sites on the drop-in `<AuthForm>`. Headless sign-in screens: add a "Forgot password?" affordance calling the two methods; reword `EMAIL_IN_USE` to "account at this center." A center needs a verified sending domain for reset codes to send. |
|
|
1118
1137
|
|
|
1119
1138
|
When you add the next release here, add its row **and** any new capability-map
|