@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
@@ -0,0 +1,487 @@
1
+ import { bb as SlotFullDetails, B as BowlosClient, b as ApplyMyModificationArgs, c as ApplyMyModificationResult } from './account-B4sZBmPI.js';
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
+ /** Gateway wire contracts, derived from the PR-6/7/8 backend validators and handlers. */
68
+ type EventOffer = {
69
+ id: string;
70
+ pricingEventId: string;
71
+ displayId: string;
72
+ slug: string;
73
+ title: string;
74
+ subtitle: string | null;
75
+ description: string | null;
76
+ heroImageUrl: string | null;
77
+ date: string;
78
+ startMinuteOfDay: number | null;
79
+ endMinuteOfDay: number | null;
80
+ purchaseMode: "reservation" | "ticket";
81
+ productId: string | null;
82
+ pricePlanId: string | null;
83
+ pricePlanShoeIncluded: boolean;
84
+ priceCents: number | null;
85
+ };
86
+ type ListEventOffersArgs = {
87
+ centerId: string;
88
+ includeWithoutLandingPage?: boolean;
89
+ };
90
+ type ListBrandEventOffersArgs = {
91
+ brandId: string;
92
+ includeWithoutLandingPage?: boolean;
93
+ limit?: number;
94
+ cursor?: string;
95
+ };
96
+ type BrandEventOffer = EventOffer & {
97
+ centerId: string;
98
+ centerName: string;
99
+ centerSlug: string | null;
100
+ };
101
+ type ListBrandEventOffersResult = {
102
+ items: BrandEventOffer[];
103
+ isDone: boolean;
104
+ continueCursor: string;
105
+ };
106
+ type GetMyGameCardArgs = {
107
+ cardId: string;
108
+ brandId?: string;
109
+ centerId?: string;
110
+ };
111
+ type GetMyGameCardResult = {
112
+ _id: string;
113
+ displayId: string;
114
+ cardName: string;
115
+ totalGames: number;
116
+ remainingGames: number;
117
+ shoesIncluded: boolean;
118
+ status: "pending_payment" | "active" | "depleted" | "expired" | "cancelled" | "refunded";
119
+ purchasedAt: number;
120
+ expiresAt: number;
121
+ pricePaidCents: number;
122
+ subtotalCents?: number;
123
+ taxLines?: {
124
+ label: string;
125
+ rateBasisPoints: number;
126
+ mode: "included" | "added";
127
+ rateId: string;
128
+ taxableBaseCents: number;
129
+ taxCents: number;
130
+ }[];
131
+ taxTotalCents?: number;
132
+ taxExemptApplied?: boolean;
133
+ reservationFeeCents?: number;
134
+ reservationFeeLabel?: string;
135
+ grandTotalCents?: number;
136
+ };
137
+ type GameCardRedemption = {
138
+ _id: string;
139
+ redeemedAt: number;
140
+ gamesConsumed: number;
141
+ includesShoes: boolean;
142
+ centerName: string;
143
+ notes?: string;
144
+ };
145
+ type GetMyGameCardHistoryArgs = {
146
+ brandId: string;
147
+ centerId?: string;
148
+ gameCardId?: string;
149
+ cursor?: string | null;
150
+ numItems: number;
151
+ };
152
+ type GetMyGameCardHistoryResult = {
153
+ page: GameCardRedemption[];
154
+ isDone: boolean;
155
+ continueCursor: string;
156
+ splitCursor?: string | null;
157
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
158
+ };
159
+ type GetWalletPassUrlArgs = {
160
+ brandId: string;
161
+ centerId?: string;
162
+ kind: "reservation" | "membership" | "package" | "game_card";
163
+ id: string;
164
+ platform: "apple" | "google";
165
+ };
166
+ type GetWalletPassUrlResult = {
167
+ url: string;
168
+ platform: "apple" | "google";
169
+ };
170
+ type MyHoldArgs = {
171
+ groupId: string;
172
+ brandId?: string;
173
+ };
174
+ type MyHold = {
175
+ groupId: string;
176
+ expiresAt: number;
177
+ serverNowMs: number;
178
+ extensionUsed: boolean;
179
+ extendable: boolean;
180
+ holdCount: number;
181
+ status: "active" | "consumed" | "released" | "expired";
182
+ };
183
+ type EmailVerificationArgs = {
184
+ brandId?: string;
185
+ };
186
+ type RequestEmailVerificationResult = {
187
+ ok: boolean;
188
+ alreadyVerified: boolean;
189
+ verifyId?: string;
190
+ };
191
+ type EmailVerificationTokenArgs = EmailVerificationArgs & {
192
+ token: string;
193
+ };
194
+ type EmailVerificationStatus = {
195
+ status: "not_found" | "used" | "expired";
196
+ } | {
197
+ status: "valid";
198
+ email: string;
199
+ };
200
+ type EmailVerificationSendStateArgs = EmailVerificationArgs & {
201
+ verifyId: string;
202
+ };
203
+ type EmailVerificationSendState = {
204
+ status: "pending" | "sent";
205
+ } | {
206
+ status: "failed";
207
+ error: string;
208
+ };
209
+ type GetCancellationPolicyArgs = {
210
+ brandId: string;
211
+ centerId: string;
212
+ productId: string;
213
+ };
214
+ type CancellationPolicy = {
215
+ scope: "brand" | "center" | "product";
216
+ centerId?: string;
217
+ productId?: string;
218
+ fullCreditHoursBeforeStart: number;
219
+ partialCreditHoursBeforeStart: number;
220
+ partialCreditPercent: number;
221
+ cancellationPolicyUrl: string | null;
222
+ } | null;
223
+ type CancelMyPendingBookingArgs = {
224
+ reservationId: string;
225
+ brandId?: string;
226
+ };
227
+ type CancelMyPendingBookingResult = {
228
+ kind: "not_found";
229
+ } | {
230
+ kind: "cancelled";
231
+ reservationId: string;
232
+ } | {
233
+ kind: "skipped";
234
+ status: "pending" | "confirmed" | "confirmed_awaiting_payment" | "pending_review" | "checked_in" | "completed" | "cancelled_forfeited" | "cancelled_credited" | "no_show";
235
+ reservationId: string;
236
+ };
237
+
238
+ type CenterScoped = {
239
+ centerId: string;
240
+ };
241
+ type BrandCatalogArgs = {
242
+ brandId: string;
243
+ centerId?: string;
244
+ };
245
+ /** Which public surface is asking — the backend applies that surface's
246
+ * per-category + per-offer visibility before returning. */
247
+ type PublicSurface = "sdk_custom_site" | "white_label_web" | "mobile_app";
248
+ type CatalogCategory = "bowling" | "other_attractions" | "events" | "packages" | "memberships" | "game_passes";
249
+ type CatalogActionType = "book_reservation" | "view_event" | "buy_ticket" | "buy_package" | "buy_membership" | "buy_game_pass";
250
+ type CatalogSourceTable = "products" | "event_offers" | "packages" | "membership_templates" | "game_card_templates";
251
+ /** A normalized, surface-agnostic catalog item. Route by `action.type`, using
252
+ * the IDs in `action.payload` (e.g. `productId`, `slug`, `packageId`,
253
+ * `templateId`). `priceLabel` is an indicative "from $X" only (null for
254
+ * products — show "See times & pricing"); the binding price comes from the
255
+ * per-category preview after login. */
256
+ interface CatalogItem {
257
+ id: string;
258
+ category: CatalogCategory;
259
+ sourceTable: CatalogSourceTable;
260
+ sourceId: string;
261
+ title: string;
262
+ subtitle?: string | null;
263
+ description?: string | null;
264
+ priceLabel?: string | null;
265
+ imageUrl?: string | null;
266
+ badgeLabel?: string | null;
267
+ action: {
268
+ type: CatalogActionType;
269
+ payload: Record<string, string>;
270
+ };
271
+ }
272
+ interface CatalogSection {
273
+ key: CatalogCategory;
274
+ label: string;
275
+ items: CatalogItem[];
276
+ }
277
+ interface CatalogResult {
278
+ sections: CatalogSection[];
279
+ /**
280
+ * Date-first booking (v0.24.0): the Center's default booking entry point.
281
+ * Open your funnel on this; let the customer toggle to the other. Optional —
282
+ * older gateways omit it (treat absent as `"product_first"`).
283
+ */
284
+ bookingEntryDefault?: "product_first" | "date_first";
285
+ /** Center-local "today" (YYYY-MM-DD) — default + minimum for a date-first
286
+ * date picker, so you don't guess the Center's timezone. Optional. */
287
+ todayISO?: string;
288
+ /**
289
+ * Full Test Mode (2026-06-23): true when the operator has put this Center in
290
+ * test mode. Render a customer-facing "Maintenance mode" notice (use
291
+ * `<MaintenanceBanner>` or `useTestMode()`); normal customers' bookings are
292
+ * server-refused (`CENTER_IN_MAINTENANCE`) — only admin Test-Account customers
293
+ * transact. Absent on older gateways → false.
294
+ */
295
+ maintenanceMode?: boolean;
296
+ }
297
+ /** Args for the canonical catalog read. `surface` selects which visibility
298
+ * rules the backend applies. */
299
+ type CatalogArgs = {
300
+ brandId: string;
301
+ centerId: string;
302
+ surface: PublicSurface;
303
+ };
304
+ /**
305
+ * The canonical public catalog for a surface — every active, public,
306
+ * bookable/sellable item grouped into the six first-class categories, with the
307
+ * Center admin's per-surface category + offer visibility already applied.
308
+ * Anonymous. This is the recommended way to list "everything bookable here":
309
+ * one call, all categories, visibility-aware, consistent with the white-label
310
+ * web + mobile surfaces.
311
+ */
312
+ declare function listCatalog<T = CatalogResult>(client: BowlosClient, args: CatalogArgs): Promise<T>;
313
+ /** One package's full detail. `shareToken` reveals a hidden/unlisted package. */
314
+ type PackageDetailArgs = {
315
+ packageId: string;
316
+ shareToken?: string;
317
+ };
318
+ /** Args for a Center's operating-hours window on a date, across attraction types. */
319
+ type CenterHoursArgs = {
320
+ centerId: string;
321
+ attractionTypeKeys: string[];
322
+ dateISO: string;
323
+ };
324
+ /** Bookable products at a Center (each carries its attraction + `attractionTypeKey`). */
325
+ declare function listProducts<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T>;
326
+ /** Upcoming pricing events (NYE Bash, tournaments…) at a Center. */
327
+ declare function listEvents<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T>;
328
+ /** Sellable event offers at a Center. These are the public lineup + event
329
+ * landing-page records; use this instead of `listEvents` when routing a
330
+ * customer to an event purchase flow. */
331
+ declare function listEventOffers<T = EventOffer[]>(client: BowlosClient, args: CenterScoped & {
332
+ includeWithoutLandingPage?: boolean;
333
+ }): Promise<T>;
334
+ /** One sellable event offer by landing-page slug. */
335
+ declare function getEventOffer<T = unknown>(client: BowlosClient, args: {
336
+ slug: string;
337
+ }): Promise<T>;
338
+ /** Purchasable packages at a Brand. */
339
+ declare function listPackages<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T>;
340
+ /** Full detail for one package — components, optional add-ons, allowed start
341
+ * times, duration, and quantity bounds. Drives the headless package config UI
342
+ * (see HEADLESS.md → "Buying a package"). */
343
+ declare function getPackage<T = unknown>(client: BowlosClient, args: PackageDetailArgs): Promise<T>;
344
+ /** A Center's combined open/close window (minutes-from-midnight) for the given
345
+ * attraction types on a date — the intersection across types; `null` if closed.
346
+ * Bound a package's start times with its component attraction-type keys. */
347
+ declare function getCenterHours<T = unknown>(client: BowlosClient, args: CenterHoursArgs): Promise<T>;
348
+ /** Purchasable memberships at a Center. */
349
+ declare function listPublicMemberships<T = unknown>(client: BowlosClient, args: CenterScoped): Promise<T>;
350
+ /** Purchasable game cards / passes at a Brand. */
351
+ declare function listGameCards<T = unknown>(client: BowlosClient, args: BrandCatalogArgs): Promise<T>;
352
+ /** A pricing mode an attraction charges in. */
353
+ type RetailPricingMode = "per_unit_per_hour" | "per_person_per_hour" | "per_game";
354
+ /** One matrix row — a day-of-week + time band with per-mode rates. */
355
+ interface RetailWalkInRate {
356
+ dayOfWeek: number;
357
+ startMinuteOfDay: number;
358
+ endMinuteOfDay: number;
359
+ label: string | null;
360
+ rateUnitHourCents: number | null;
361
+ ratePersonHourCents: number | null;
362
+ rateGameCents: number | null;
363
+ }
364
+ /** Walk-in rates grouped by attraction. */
365
+ interface RetailAttraction {
366
+ attractionId: string;
367
+ name: string;
368
+ typeKey: string;
369
+ enabledModes: RetailPricingMode[];
370
+ unitLabelSingular: string;
371
+ unitLabelPlural: string;
372
+ walkInRates: RetailWalkInRate[];
373
+ }
374
+ /** A featured "website special" (an opted-in price plan). */
375
+ interface RetailSpecial {
376
+ planId: string;
377
+ name: string;
378
+ description: string;
379
+ priceCents: number | null;
380
+ attractionId: string;
381
+ attractionName: string;
382
+ /** Seasonal window (YYYY-MM-DD) when set — label/hide out of season. */
383
+ effectiveStartDate: string | null;
384
+ effectiveEndDate: string | null;
385
+ }
386
+ /** The full retail-pricing payload for a Center. */
387
+ interface RetailPricing {
388
+ centerName: string;
389
+ attractions: RetailAttraction[];
390
+ specials: RetailSpecial[];
391
+ }
392
+ /** A Center's public price list: walk-in (matrix) rates + website specials.
393
+ * Read-only, anonymous — drives a printed-menu-style pricing page that always
394
+ * matches the operator's live config. Not a booking surface. */
395
+ declare function listRetailPricing<T = RetailPricing>(client: BowlosClient, args: CenterScoped): Promise<T>;
396
+
397
+ type PreviewBookingChangeArgs = Omit<ApplyMyModificationArgs, "expectedVersion" | "idempotencyKey" | "refundMode" | "applyCredit"> & {
398
+ centerId?: string;
399
+ };
400
+ type ApplyBookingChangeArgs = ApplyMyModificationArgs & {
401
+ centerId?: string;
402
+ };
403
+ type BookingChangePreview = {
404
+ eligible: boolean;
405
+ reason: string | null;
406
+ diffCents: number;
407
+ oldFinalCents: number;
408
+ newFinalCents: number;
409
+ newSnapshot: Record<string, unknown>;
410
+ newUnitIds: string[];
411
+ newPricePlanId?: string | null;
412
+ };
413
+ type PendingBookingChangeArgs = {
414
+ brandId: string;
415
+ centerId?: string;
416
+ pendingModificationId: string;
417
+ };
418
+ type PendingBookingChange = {
419
+ id: string;
420
+ reservationId: string;
421
+ status: "pending_payment" | "applied" | "expired" | "cancelled" | "failed_slot_taken";
422
+ diffCents: number;
423
+ expiresAt: number;
424
+ appliedAt: number | null;
425
+ };
426
+ type BookingChangePaymentArgs = {
427
+ pendingModificationId: string;
428
+ brandId?: string;
429
+ centerId?: string;
430
+ };
431
+ type BookingChangePayment = {
432
+ paymentIntentId: string;
433
+ clientSecret: string;
434
+ amountCents: number;
435
+ customerSessionClientSecret: string;
436
+ stripeAccount: string;
437
+ stripeMode: "test" | "live";
438
+ merchantDisplayName: string;
439
+ publishableKey: string;
440
+ };
441
+ type MembershipBillingPortalArgs = {
442
+ membershipId: string;
443
+ returnUrl: string;
444
+ brandId?: string;
445
+ centerId?: string;
446
+ };
447
+ type PayLinkArgs = {
448
+ token: string;
449
+ brandId?: string;
450
+ centerId?: string;
451
+ };
452
+ type PayLink = {
453
+ status: PendingBookingChange["status"];
454
+ diffCents: number;
455
+ appliedCreditCents: number;
456
+ remainingDueCents: number;
457
+ expiresAt: number;
458
+ appliedAt: number | null;
459
+ reservation: {
460
+ displayId: string;
461
+ dateISO: string;
462
+ startMinuteOfDay: number;
463
+ endMinuteOfDay: number;
464
+ newFinalCents: number;
465
+ oldFinalCents: number;
466
+ };
467
+ brand: {
468
+ name: string | null;
469
+ primaryColor: string | null;
470
+ };
471
+ };
472
+ type PayLinkPayment = Omit<BookingChangePayment, "stripeAccount"> & {
473
+ connectedAccountId: string;
474
+ };
475
+ declare function previewBookingChange(client: BowlosClient, args: PreviewBookingChangeArgs): Promise<BookingChangePreview>;
476
+ /** Keep the same idempotencyKey when retrying one apply action. */
477
+ declare function applyBookingChange(client: BowlosClient, args: ApplyBookingChangeArgs): Promise<ApplyMyModificationResult>;
478
+ declare function getPendingBookingChange(client: BowlosClient, args: PendingBookingChangeArgs): Promise<PendingBookingChange>;
479
+ declare function createBookingChangePayment(client: BowlosClient, args: BookingChangePaymentArgs): Promise<BookingChangePayment>;
480
+ /** Returns the hosted URL; the site decides when to navigate. */
481
+ declare function openMembershipBillingPortal(client: BowlosClient, args: MembershipBillingPortalArgs): Promise<{
482
+ url: string;
483
+ }>;
484
+ declare function getPayLink(client: BowlosClient, args: PayLinkArgs): Promise<PayLink>;
485
+ declare function createPayLinkPayment(client: BowlosClient, args: PayLinkArgs): Promise<PayLinkPayment>;
486
+
487
+ export { type RetailPricingMode 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 ListEventOffersArgs as O, type MembershipBillingPortalArgs as P, type PackageDetailArgs as Q, type RequestEmailVerificationResult as R, type PayLink as S, type PayLinkArgs as T, type PayLinkPayment as U, type PendingBookingChange as V, type PendingBookingChangeArgs as W, type PreviewBookingChangeArgs as X, type PublicSurface as Y, type RetailAttraction as Z, type RetailPricing as _, type CancelMyPendingBookingResult as a, type RetailSpecial as a0, type RetailWalkInRate as a1, applyBookingChange as a2, createBookingChangePayment as a3, createPayLinkPayment as a4, getCenterHours as a5, getEventOffer as a6, getPackage as a7, getPayLink as a8, getPendingBookingChange as a9, listCatalog as aa, listEventOffers as ab, listEvents as ac, listGameCards as ad, listPackages as ae, listProducts as af, listPublicMemberships as ag, listRetailPricing as ah, openMembershipBillingPortal as ai, previewBookingChange as aj, 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 };