@bowlos/reservations 0.41.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 (61) hide show
  1. package/AGENTS.md +20 -5
  2. package/CHANGELOG.md +22 -0
  3. package/HEADLESS.md +187 -41
  4. package/README.md +77 -0
  5. package/dist/{account-DEX2Lr78.d.cts → account-b8chVpED.d.cts} +892 -14
  6. package/dist/{account-DEX2Lr78.d.ts → account-b8chVpED.d.ts} +892 -14
  7. package/dist/booking-change-B-ADuVEz.d.cts +562 -0
  8. package/dist/booking-change-BrJ-XESC.d.ts +562 -0
  9. package/dist/chunk-43WZ6TLQ.js +12 -0
  10. package/dist/chunk-43WZ6TLQ.js.map +1 -0
  11. package/dist/{chunk-VJIS56OO.js → chunk-CTJODEHR.js} +119 -7
  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-BWJHRJN6.js → chunk-EXEKCMQ2.js} +57 -22
  16. package/dist/chunk-EXEKCMQ2.js.map +1 -0
  17. package/dist/{chunk-44WKP6MW.js → chunk-IDRTMFJJ.js} +36 -3
  18. package/dist/chunk-IDRTMFJJ.js.map +1 -0
  19. package/dist/{chunk-FMFHNBDH.js → chunk-LFFANITL.js} +98 -12
  20. package/dist/chunk-LFFANITL.js.map +1 -0
  21. package/dist/cli.cjs +5 -0
  22. package/dist/cli.cjs.map +1 -1
  23. package/dist/components.cjs +670 -131
  24. package/dist/components.cjs.map +1 -1
  25. package/dist/components.d.cts +19 -7
  26. package/dist/components.d.ts +19 -7
  27. package/dist/components.js +304 -66
  28. package/dist/components.js.map +1 -1
  29. package/dist/index.cjs +67 -0
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +4 -4
  32. package/dist/index.d.ts +4 -4
  33. package/dist/index.js +5 -4
  34. package/dist/index.js.map +1 -1
  35. package/dist/payments.cjs +34 -12
  36. package/dist/payments.cjs.map +1 -1
  37. package/dist/payments.d.cts +10 -2
  38. package/dist/payments.d.ts +10 -2
  39. package/dist/payments.js +6 -78
  40. package/dist/payments.js.map +1 -1
  41. package/dist/{react-CrRciA7I.d.ts → react-cqGEohr0.d.cts} +4 -2
  42. package/dist/{react-QJrsaOnN.d.cts → react-s4J-e10i.d.ts} +4 -2
  43. package/dist/react.cjs +202 -19
  44. package/dist/react.cjs.map +1 -1
  45. package/dist/react.d.cts +28 -6
  46. package/dist/react.d.ts +28 -6
  47. package/dist/react.js +5 -5
  48. package/package.json +2 -1
  49. package/templates/center-site/README.md +1 -0
  50. package/templates/center-site/app/book/event-reservation-form.tsx +276 -0
  51. package/templates/center-site/app/book/page.tsx +107 -49
  52. package/templates/center-site/app/catalog/page.tsx +3 -1
  53. package/templates/center-site/app/events/[slug]/page.tsx +7 -10
  54. package/templates/center-site/package.json +1 -1
  55. package/dist/booking-change-4DGu-B08.d.ts +0 -1282
  56. package/dist/booking-change-aK6P37FZ.d.cts +0 -1282
  57. package/dist/chunk-44WKP6MW.js.map +0 -1
  58. package/dist/chunk-BWJHRJN6.js.map +0 -1
  59. package/dist/chunk-FMFHNBDH.js.map +0 -1
  60. package/dist/chunk-VJIS56OO.js.map +0 -1
  61. package/dist/chunk-YAXBZJMI.js.map +0 -1
@@ -0,0 +1,562 @@
1
+ import { bd as SlotFullDetails, b5 as PricingMode, B as BowlosClient, b as ApplyMyModificationArgs, c as ApplyMyModificationResult } from './account-b8chVpED.cjs';
2
+
3
+ /**
4
+ * Error model for the BowlOS Reservations SDK.
5
+ *
6
+ * Every failed gateway call surfaces as a single `BowlosApiError` carrying a
7
+ * stable `code` (string), the HTTP `status`, and — for rate limits — a
8
+ * `retryAfterSeconds`. The gateway normalizes the backend's two error
9
+ * conventions (thrown ConvexError + `{ ok:false }` envelopes) into one JSON
10
+ * shape; this class is the client-side mirror of that shape, so consumers
11
+ * branch on `error.code`, never on message text.
12
+ */
13
+ /** Stable error codes the gateway / backend can return. Open set — treat
14
+ * `code` as a string and match against these for known cases. */
15
+ declare const BOWLOS_ERROR_CODES: {
16
+ readonly API_KEY_MISSING: "API_KEY_MISSING";
17
+ readonly API_KEY_INVALID: "API_KEY_INVALID";
18
+ readonly ORIGIN_NOT_ALLOWED: "ORIGIN_NOT_ALLOWED";
19
+ readonly RATE_LIMITED: "RATE_LIMITED";
20
+ readonly PASSWORD_TOO_WEAK: "PASSWORD_TOO_WEAK";
21
+ readonly CURRENT_PASSWORD_INCORRECT: "CURRENT_PASSWORD_INCORRECT";
22
+ readonly CURRENT_PASSWORD_REQUIRED: "CURRENT_PASSWORD_REQUIRED";
23
+ readonly INVALID_CREDENTIALS: "INVALID_CREDENTIALS";
24
+ readonly SIGNUP_FAILED: "SIGNUP_FAILED";
25
+ readonly VALIDATION_FAILED: "VALIDATION_FAILED";
26
+ readonly PERMISSION_DENIED: "PERMISSION_DENIED";
27
+ readonly SCOPE_REVOKED: "SCOPE_REVOKED";
28
+ readonly NOT_FOUND: "NOT_FOUND";
29
+ readonly VERSION_CONFLICT: "VERSION_CONFLICT";
30
+ readonly PRICING_SNAPSHOT_STALE: "PRICING_SNAPSHOT_STALE";
31
+ readonly PAYMENTS_NOT_CONNECTED: "PAYMENTS_NOT_CONNECTED";
32
+ readonly CONNECT_ACCOUNT_RESTRICTED: "CONNECT_ACCOUNT_RESTRICTED";
33
+ readonly BILLING_PORTAL_UNAVAILABLE: "BILLING_PORTAL_UNAVAILABLE";
34
+ readonly RETURN_URL_NOT_ALLOWED: "RETURN_URL_NOT_ALLOWED";
35
+ readonly CONFLICT_RETRY: "CONFLICT_RETRY";
36
+ readonly CHECKOUT_EXPIRED: "CHECKOUT_EXPIRED";
37
+ readonly ROUTE_NOT_FOUND: "ROUTE_NOT_FOUND";
38
+ readonly NETWORK_ERROR: "NETWORK_ERROR";
39
+ readonly UNKNOWN: "ERROR";
40
+ };
41
+ type BowlosErrorCode = (typeof BOWLOS_ERROR_CODES)[keyof typeof BOWLOS_ERROR_CODES] | (string & {});
42
+ interface BowlosApiErrorOptions {
43
+ retryAfterSeconds?: number;
44
+ cause?: unknown;
45
+ details?: Record<string, string | number | boolean>;
46
+ }
47
+ declare class BowlosApiError extends Error {
48
+ /** Stable, machine-readable code. Branch on this, not on `message`. */
49
+ readonly code: BowlosErrorCode;
50
+ /** HTTP status (0 for a network failure before any response). */
51
+ readonly status: number;
52
+ readonly details?: Record<string, string | number | boolean>;
53
+ /** Seconds to wait before retrying — present only on `RATE_LIMITED`. */
54
+ readonly retryAfterSeconds?: number;
55
+ constructor(code: BowlosErrorCode, message: string, status: number, options?: BowlosApiErrorOptions);
56
+ /** Typed additive createAnonymousBooking slot-full details, when present. */
57
+ get slotFullDetails(): SlotFullDetails | undefined;
58
+ /** Too many requests — caller should back off `retryAfterSeconds`. */
59
+ get isRateLimited(): boolean;
60
+ /** Bad/expired login. The session could not be established or has lapsed. */
61
+ get isAuthError(): boolean;
62
+ /** Wrong/missing API key or a disallowed origin — a site-config problem,
63
+ * not something the end customer can fix. */
64
+ get isConfigError(): boolean;
65
+ }
66
+
67
+ type EventOfferSession = {
68
+ dateISO: string;
69
+ timezone: string;
70
+ offerDescription: string | null;
71
+ planName: string;
72
+ planDescription: string | null;
73
+ earliestStartMinute: number;
74
+ latestEndMinute: number | null;
75
+ allowedStartTimes: number[] | null;
76
+ startIncrementMinutes: number;
77
+ minDurationMinutes: number;
78
+ maxDurationMinutes: number;
79
+ fixedDurationMinutes: number | null;
80
+ durationIncrementMinutes: number;
81
+ pricingMode: PricingMode | null;
82
+ /** Configured rate metadata. Fetch a booking preview for the order total. */
83
+ basePrice: {
84
+ cents: number;
85
+ basis: "fixed_block" | "hour" | "game" | "mode_dependent";
86
+ } | null;
87
+ shoeMode: "included" | "addon" | "per_offer";
88
+ /** Configured shoe add-on. Older session payloads may omit this field. */
89
+ defaultShoeAddonId?: string | null;
90
+ planShoesIncluded: boolean;
91
+ shoesIncluded: boolean;
92
+ maxPartySizePerUnit: number | null;
93
+ };
94
+ type EventOfferOptionsArgs = {
95
+ centerId: string;
96
+ brandId?: string;
97
+ productId: string;
98
+ dateISO: string;
99
+ eventOfferSlug: string;
100
+ mode?: PricingMode;
101
+ units?: number;
102
+ persons?: number;
103
+ games?: number;
104
+ subtypeId?: string;
105
+ };
106
+ type EventOfferStartOption = {
107
+ startMinuteOfDay: number;
108
+ durationMinutes: number[];
109
+ };
110
+ type EventOfferOptionsResult = EventOfferStartOption[];
111
+ /** Bookable start/duration pairs for the offer and requested party. */
112
+ declare function eventOfferOptions(client: BowlosClient, args: EventOfferOptionsArgs): Promise<EventOfferOptionsResult>;
113
+ /** True when the session duration is fixed, independent of price basis. */
114
+ declare function isFixedSession(session: EventOfferSession): boolean;
115
+ /** The server's bookable durations for this start, in server order. */
116
+ declare function durationsForStart(options: readonly EventOfferStartOption[], startMinuteOfDay: number): readonly number[];
117
+ /** Format Center-local minute offsets, including a next-day end at or after midnight. */
118
+ declare function formatSessionRange(startMinuteOfDay: number, endMinuteOfDay: number): string;
119
+
120
+ /** Gateway wire contracts, derived from the PR-6/7/8 backend validators and handlers. */
121
+ type EventOffer = {
122
+ id: string;
123
+ pricingEventId: string;
124
+ displayId: string;
125
+ slug: string;
126
+ title: string;
127
+ subtitle: string | null;
128
+ description: string | null;
129
+ heroImageUrl: string | null;
130
+ date: string;
131
+ startMinuteOfDay: number | null;
132
+ endMinuteOfDay: number | null;
133
+ purchaseMode: "reservation" | "ticket";
134
+ productId: string | null;
135
+ pricePlanId: string | null;
136
+ pricePlanShoeIncluded: boolean;
137
+ priceCents: number | null;
138
+ session?: EventOfferSession | null;
139
+ };
140
+ type EventOfferDetail = EventOffer & {
141
+ minQuantity: number | null;
142
+ maxQuantity: number | null;
143
+ includedAddons: {
144
+ addonId: string;
145
+ name: string;
146
+ quantity: number;
147
+ }[];
148
+ brand: {
149
+ id: string;
150
+ name: string;
151
+ primaryColor: string | null;
152
+ bannerImageUrl: string | null;
153
+ };
154
+ center: {
155
+ id: string;
156
+ name: string;
157
+ timezone: string;
158
+ };
159
+ };
160
+ type ListEventOffersArgs = {
161
+ centerId: string;
162
+ includeWithoutLandingPage?: boolean;
163
+ };
164
+ type ListBrandEventOffersArgs = {
165
+ brandId: string;
166
+ includeWithoutLandingPage?: boolean;
167
+ limit?: number;
168
+ cursor?: string;
169
+ };
170
+ type BrandEventOffer = EventOffer & {
171
+ centerId: string;
172
+ centerName: string;
173
+ centerSlug: string | null;
174
+ };
175
+ type ListBrandEventOffersResult = {
176
+ items: BrandEventOffer[];
177
+ isDone: boolean;
178
+ continueCursor: string;
179
+ };
180
+ type GetMyGameCardArgs = {
181
+ cardId: string;
182
+ brandId?: string;
183
+ centerId?: string;
184
+ };
185
+ type GetMyGameCardResult = {
186
+ _id: string;
187
+ displayId: string;
188
+ cardName: string;
189
+ totalGames: number;
190
+ remainingGames: number;
191
+ shoesIncluded: boolean;
192
+ status: "pending_payment" | "active" | "depleted" | "expired" | "cancelled" | "refunded";
193
+ purchasedAt: number;
194
+ expiresAt: number;
195
+ pricePaidCents: number;
196
+ subtotalCents?: number;
197
+ taxLines?: {
198
+ label: string;
199
+ rateBasisPoints: number;
200
+ mode: "included" | "added";
201
+ rateId: string;
202
+ taxableBaseCents: number;
203
+ taxCents: number;
204
+ }[];
205
+ taxTotalCents?: number;
206
+ taxExemptApplied?: boolean;
207
+ reservationFeeCents?: number;
208
+ reservationFeeLabel?: string;
209
+ grandTotalCents?: number;
210
+ };
211
+ type GameCardRedemption = {
212
+ _id: string;
213
+ redeemedAt: number;
214
+ gamesConsumed: number;
215
+ includesShoes: boolean;
216
+ centerName: string;
217
+ notes?: string;
218
+ };
219
+ type GetMyGameCardHistoryArgs = {
220
+ brandId: string;
221
+ centerId?: string;
222
+ gameCardId?: string;
223
+ cursor?: string | null;
224
+ numItems: number;
225
+ };
226
+ type GetMyGameCardHistoryResult = {
227
+ page: GameCardRedemption[];
228
+ isDone: boolean;
229
+ continueCursor: string;
230
+ splitCursor?: string | null;
231
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
232
+ };
233
+ type GetWalletPassUrlArgs = {
234
+ brandId: string;
235
+ centerId?: string;
236
+ kind: "reservation" | "membership" | "package" | "game_card";
237
+ id: string;
238
+ platform: "apple" | "google";
239
+ };
240
+ type GetWalletPassUrlResult = {
241
+ url: string;
242
+ platform: "apple" | "google";
243
+ };
244
+ type MyHoldArgs = {
245
+ groupId: string;
246
+ brandId?: string;
247
+ };
248
+ type MyHold = {
249
+ groupId: string;
250
+ expiresAt: number;
251
+ serverNowMs: number;
252
+ extensionUsed: boolean;
253
+ extendable: boolean;
254
+ holdCount: number;
255
+ status: "active" | "consumed" | "released" | "expired";
256
+ };
257
+ type EmailVerificationArgs = {
258
+ brandId?: string;
259
+ };
260
+ type RequestEmailVerificationResult = {
261
+ ok: boolean;
262
+ alreadyVerified: boolean;
263
+ verifyId?: string;
264
+ };
265
+ type EmailVerificationTokenArgs = EmailVerificationArgs & {
266
+ token: string;
267
+ };
268
+ type EmailVerificationStatus = {
269
+ status: "not_found" | "used" | "expired";
270
+ } | {
271
+ status: "valid";
272
+ email: string;
273
+ };
274
+ type EmailVerificationSendStateArgs = EmailVerificationArgs & {
275
+ verifyId: string;
276
+ };
277
+ type EmailVerificationSendState = {
278
+ status: "pending" | "sent";
279
+ } | {
280
+ status: "failed";
281
+ error: string;
282
+ };
283
+ type GetCancellationPolicyArgs = {
284
+ brandId: string;
285
+ centerId: string;
286
+ productId: string;
287
+ };
288
+ type CancellationPolicy = {
289
+ scope: "brand" | "center" | "product";
290
+ centerId?: string;
291
+ productId?: string;
292
+ fullCreditHoursBeforeStart: number;
293
+ partialCreditHoursBeforeStart: number;
294
+ partialCreditPercent: number;
295
+ cancellationPolicyUrl: string | null;
296
+ } | null;
297
+ type CancelMyPendingBookingArgs = {
298
+ reservationId: string;
299
+ brandId?: string;
300
+ };
301
+ type CancelMyPendingBookingResult = {
302
+ kind: "not_found";
303
+ } | {
304
+ kind: "cancelled";
305
+ reservationId: string;
306
+ } | {
307
+ kind: "skipped";
308
+ status: "pending" | "confirmed" | "confirmed_awaiting_payment" | "pending_review" | "checked_in" | "completed" | "cancelled_forfeited" | "cancelled_credited" | "no_show";
309
+ reservationId: string;
310
+ };
311
+
312
+ type CenterScoped = {
313
+ centerId: string;
314
+ };
315
+ type BrandCatalogArgs = {
316
+ brandId: string;
317
+ centerId?: string;
318
+ };
319
+ /** Which public surface is asking — the backend applies that surface's
320
+ * per-category + per-offer visibility before returning. */
321
+ type PublicSurface = "sdk_custom_site" | "white_label_web" | "mobile_app";
322
+ type CatalogCategory = "bowling" | "other_attractions" | "events" | "packages" | "memberships" | "game_passes";
323
+ type CatalogActionType = "book_reservation" | "view_event" | "buy_ticket" | "buy_package" | "buy_membership" | "buy_game_pass";
324
+ type CatalogSourceTable = "products" | "event_offers" | "packages" | "membership_templates" | "game_card_templates";
325
+ /** A normalized, surface-agnostic catalog item. Route by `action.type`, using
326
+ * the IDs in `action.payload` (e.g. `productId`, `slug`, `packageId`,
327
+ * `templateId`). `priceLabel` is an indicative "from $X" only (null for
328
+ * products — show "See times & pricing"); the binding price comes from the
329
+ * per-category preview after login. */
330
+ interface CatalogItem {
331
+ id: string;
332
+ category: CatalogCategory;
333
+ sourceTable: CatalogSourceTable;
334
+ sourceId: string;
335
+ title: string;
336
+ subtitle?: string | null;
337
+ description?: string | null;
338
+ priceLabel?: string | null;
339
+ imageUrl?: string | null;
340
+ badgeLabel?: string | null;
341
+ session?: EventOfferSession | null;
342
+ action: {
343
+ type: CatalogActionType;
344
+ payload: Record<string, string>;
345
+ };
346
+ }
347
+ interface CatalogSection {
348
+ key: CatalogCategory;
349
+ label: string;
350
+ items: CatalogItem[];
351
+ }
352
+ interface CatalogResult {
353
+ sections: CatalogSection[];
354
+ /**
355
+ * Date-first booking (v0.24.0): the Center's default booking entry point.
356
+ * Open your funnel on this; let the customer toggle to the other. Optional —
357
+ * older gateways omit it (treat absent as `"product_first"`).
358
+ */
359
+ bookingEntryDefault?: "product_first" | "date_first";
360
+ /** Center-local "today" (YYYY-MM-DD) — default + minimum for a date-first
361
+ * date picker, so you don't guess the Center's timezone. Optional. */
362
+ todayISO?: string;
363
+ /**
364
+ * Full Test Mode (2026-06-23): true when the operator has put this Center in
365
+ * test mode. Render a customer-facing "Maintenance mode" notice (use
366
+ * `<MaintenanceBanner>` or `useTestMode()`); normal customers' bookings are
367
+ * server-refused (`CENTER_IN_MAINTENANCE`) — only admin Test-Account customers
368
+ * transact. Absent on older gateways → false.
369
+ */
370
+ maintenanceMode?: boolean;
371
+ }
372
+ /** Args for the canonical catalog read. `surface` selects which visibility
373
+ * rules the backend applies. */
374
+ type CatalogArgs = {
375
+ brandId: string;
376
+ centerId: string;
377
+ surface: PublicSurface;
378
+ };
379
+ /**
380
+ * The canonical public catalog for a surface — every active, public,
381
+ * bookable/sellable item grouped into the six first-class categories, with the
382
+ * Center admin's per-surface category + offer visibility already applied.
383
+ * Anonymous. This is the recommended way to list "everything bookable here":
384
+ * one call, all categories, visibility-aware, consistent with the white-label
385
+ * web + mobile surfaces.
386
+ */
387
+ declare function listCatalog<T = CatalogResult>(client: BowlosClient, args: CatalogArgs): Promise<T>;
388
+ /** One package's full detail. `shareToken` reveals a hidden/unlisted package. */
389
+ type PackageDetailArgs = {
390
+ packageId: string;
391
+ shareToken?: string;
392
+ };
393
+ /** Args for a Center's operating-hours window on a date, across attraction types. */
394
+ type CenterHoursArgs = {
395
+ centerId: string;
396
+ attractionTypeKeys: string[];
397
+ dateISO: string;
398
+ };
399
+ /** Bookable products at a Center (each carries its attraction + `attractionTypeKey`). */
400
+ declare function listProducts<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T>;
401
+ /** Upcoming pricing events (NYE Bash, tournaments…) at a Center. */
402
+ declare function listEvents<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T>;
403
+ /** Sellable event offers at a Center. These are the public lineup + event
404
+ * landing-page records; use this instead of `listEvents` when routing a
405
+ * customer to an event purchase flow. */
406
+ declare function listEventOffers<T = EventOffer[]>(client: BowlosClient, args: CenterScoped & {
407
+ includeWithoutLandingPage?: boolean;
408
+ }): Promise<T>;
409
+ /** One sellable event offer by landing-page slug. */
410
+ declare function getEventOffer<T = unknown>(client: BowlosClient, args: {
411
+ slug: string;
412
+ }): Promise<T>;
413
+ /** Purchasable packages at a Brand. */
414
+ declare function listPackages<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T>;
415
+ /** Full detail for one package — components, optional add-ons, allowed start
416
+ * times, duration, and quantity bounds. Drives the headless package config UI
417
+ * (see HEADLESS.md → "Buying a package"). */
418
+ declare function getPackage<T = unknown>(client: BowlosClient, args: PackageDetailArgs): Promise<T>;
419
+ /** A Center's combined open/close window (minutes-from-midnight) for the given
420
+ * attraction types on a date — the intersection across types; `null` if closed.
421
+ * Bound a package's start times with its component attraction-type keys. */
422
+ declare function getCenterHours<T = unknown>(client: BowlosClient, args: CenterHoursArgs): Promise<T>;
423
+ /** Purchasable memberships at a Center. */
424
+ declare function listPublicMemberships<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T>;
425
+ /** Purchasable game cards / passes at a Brand. */
426
+ declare function listGameCards<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T>;
427
+ /** A pricing mode an attraction charges in. */
428
+ type RetailPricingMode = "per_unit_per_hour" | "per_person_per_hour" | "per_game";
429
+ /** One matrix row — a day-of-week + time band with per-mode rates. */
430
+ interface RetailWalkInRate {
431
+ dayOfWeek: number;
432
+ startMinuteOfDay: number;
433
+ endMinuteOfDay: number;
434
+ label: string | null;
435
+ rateUnitHourCents: number | null;
436
+ ratePersonHourCents: number | null;
437
+ rateGameCents: number | null;
438
+ }
439
+ /** Walk-in rates grouped by attraction. */
440
+ interface RetailAttraction {
441
+ attractionId: string;
442
+ name: string;
443
+ typeKey: string;
444
+ enabledModes: RetailPricingMode[];
445
+ unitLabelSingular: string;
446
+ unitLabelPlural: string;
447
+ walkInRates: RetailWalkInRate[];
448
+ }
449
+ /** A featured "website special" (an opted-in price plan). */
450
+ interface RetailSpecial {
451
+ planId: string;
452
+ name: string;
453
+ description: string;
454
+ priceCents: number | null;
455
+ attractionId: string;
456
+ attractionName: string;
457
+ /** Seasonal window (YYYY-MM-DD) when set — label/hide out of season. */
458
+ effectiveStartDate: string | null;
459
+ effectiveEndDate: string | null;
460
+ }
461
+ /** The full retail-pricing payload for a Center. */
462
+ interface RetailPricing {
463
+ centerName: string;
464
+ attractions: RetailAttraction[];
465
+ specials: RetailSpecial[];
466
+ }
467
+ /** A Center's public price list: walk-in (matrix) rates + website specials.
468
+ * Read-only, anonymous — drives a printed-menu-style pricing page that always
469
+ * matches the operator's live config. Not a booking surface. */
470
+ declare function listRetailPricing<T = RetailPricing>(client: BowlosClient, args: CenterScoped): Promise<T>;
471
+
472
+ type PreviewBookingChangeArgs = Omit<ApplyMyModificationArgs, "expectedVersion" | "idempotencyKey" | "refundMode" | "applyCredit"> & {
473
+ centerId?: string;
474
+ };
475
+ type ApplyBookingChangeArgs = ApplyMyModificationArgs & {
476
+ centerId?: string;
477
+ };
478
+ type BookingChangePreview = {
479
+ eligible: boolean;
480
+ reason: string | null;
481
+ diffCents: number;
482
+ oldFinalCents: number;
483
+ newFinalCents: number;
484
+ newSnapshot: Record<string, unknown>;
485
+ newUnitIds: string[];
486
+ newPricePlanId?: string | null;
487
+ };
488
+ type PendingBookingChangeArgs = {
489
+ brandId: string;
490
+ centerId?: string;
491
+ pendingModificationId: string;
492
+ };
493
+ type PendingBookingChange = {
494
+ id: string;
495
+ reservationId: string;
496
+ status: "pending_payment" | "applied" | "expired" | "cancelled" | "failed_slot_taken";
497
+ diffCents: number;
498
+ expiresAt: number;
499
+ appliedAt: number | null;
500
+ };
501
+ type BookingChangePaymentArgs = {
502
+ pendingModificationId: string;
503
+ brandId?: string;
504
+ centerId?: string;
505
+ };
506
+ type BookingChangePayment = {
507
+ paymentIntentId: string;
508
+ clientSecret: string;
509
+ amountCents: number;
510
+ customerSessionClientSecret: string;
511
+ stripeAccount: string;
512
+ stripeMode: "test" | "live";
513
+ merchantDisplayName: string;
514
+ publishableKey: string;
515
+ };
516
+ type MembershipBillingPortalArgs = {
517
+ membershipId: string;
518
+ returnUrl: string;
519
+ brandId?: string;
520
+ centerId?: string;
521
+ };
522
+ type PayLinkArgs = {
523
+ token: string;
524
+ brandId?: string;
525
+ centerId?: string;
526
+ };
527
+ type PayLink = {
528
+ status: PendingBookingChange["status"];
529
+ diffCents: number;
530
+ appliedCreditCents: number;
531
+ remainingDueCents: number;
532
+ expiresAt: number;
533
+ appliedAt: number | null;
534
+ reservation: {
535
+ displayId: string;
536
+ dateISO: string;
537
+ startMinuteOfDay: number;
538
+ endMinuteOfDay: number;
539
+ newFinalCents: number;
540
+ oldFinalCents: number;
541
+ };
542
+ brand: {
543
+ name: string | null;
544
+ primaryColor: string | null;
545
+ };
546
+ };
547
+ type PayLinkPayment = Omit<BookingChangePayment, "stripeAccount"> & {
548
+ connectedAccountId: string;
549
+ };
550
+ declare function previewBookingChange(client: BowlosClient, args: PreviewBookingChangeArgs): Promise<BookingChangePreview>;
551
+ /** Keep the same idempotencyKey when retrying one apply action. */
552
+ declare function applyBookingChange(client: BowlosClient, args: ApplyBookingChangeArgs): Promise<ApplyMyModificationResult>;
553
+ declare function getPendingBookingChange(client: BowlosClient, args: PendingBookingChangeArgs): Promise<PendingBookingChange>;
554
+ declare function createBookingChangePayment(client: BowlosClient, args: BookingChangePaymentArgs): Promise<BookingChangePayment>;
555
+ /** Returns the hosted URL; the site decides when to navigate. */
556
+ declare function openMembershipBillingPortal(client: BowlosClient, args: MembershipBillingPortalArgs): Promise<{
557
+ url: string;
558
+ }>;
559
+ declare function getPayLink(client: BowlosClient, args: PayLinkArgs): Promise<PayLink>;
560
+ declare function createPayLinkPayment(client: BowlosClient, args: PayLinkArgs): Promise<PayLinkPayment>;
561
+
562
+ export { type PendingBookingChangeArgs as $, type ApplyBookingChangeArgs as A, BOWLOS_ERROR_CODES as B, type CancelMyPendingBookingArgs as C, type CatalogItem as D, type EmailVerificationTokenArgs as E, type CatalogResult as F, type GetCancellationPolicyArgs as G, type CatalogSection as H, type CatalogSourceTable as I, type CenterHoursArgs as J, type CenterScoped as K, type ListBrandEventOffersArgs as L, type MyHoldArgs as M, type EventOffer as N, type EventOfferDetail as O, type EventOfferOptionsArgs as P, type EventOfferOptionsResult as Q, type RequestEmailVerificationResult as R, type EventOfferSession as S, type EventOfferStartOption as T, type ListEventOffersArgs as U, type MembershipBillingPortalArgs as V, type PackageDetailArgs as W, type PayLink as X, type PayLinkArgs as Y, type PayLinkPayment as Z, type PendingBookingChange as _, type CancelMyPendingBookingResult as a, type PreviewBookingChangeArgs as a0, type PublicSurface as a1, type RetailAttraction as a2, type RetailPricing as a3, type RetailPricingMode as a4, type RetailSpecial as a5, type RetailWalkInRate as a6, applyBookingChange as a7, createBookingChangePayment as a8, createPayLinkPayment as a9, durationsForStart as aa, eventOfferOptions as ab, formatSessionRange as ac, getCenterHours as ad, getEventOffer as ae, getPackage as af, getPayLink as ag, getPendingBookingChange as ah, isFixedSession as ai, listCatalog as aj, listEventOffers as ak, listEvents as al, listGameCards as am, listPackages as an, listProducts as ao, listPublicMemberships as ap, listRetailPricing as aq, openMembershipBillingPortal as ar, previewBookingChange as as, type CancellationPolicy as b, type EmailVerificationSendStateArgs as c, type EmailVerificationSendState as d, type EmailVerificationStatus as e, type GetMyGameCardArgs as f, type GetMyGameCardResult as g, type GetMyGameCardHistoryArgs as h, type GetMyGameCardHistoryResult as i, type GameCardRedemption as j, type MyHold as k, type GetWalletPassUrlArgs as l, type GetWalletPassUrlResult as m, type ListBrandEventOffersResult as n, type EmailVerificationArgs as o, type BookingChangePayment as p, type BookingChangePaymentArgs as q, type BookingChangePreview as r, BowlosApiError as s, type BowlosApiErrorOptions as t, type BowlosErrorCode as u, type BrandCatalogArgs as v, type BrandEventOffer as w, type CatalogActionType as x, type CatalogArgs as y, type CatalogCategory as z };