@bowlos/reservations 0.18.0 → 0.20.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.
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { w as PricingMode, u as PaymentIntentInfo, l as Customer } from './data-DkqmM-Zo.cjs';
4
- import { c as UseAccountResult } from './react-iO57k7tL.cjs';
3
+ import { N as PricingMode, J as PaymentIntentInfo, l as Customer } from './data-ymW_rWbz.cjs';
4
+ import { c as UseAccountResult } from './react-DHvo_ZHf.cjs';
5
5
  import './errors-IIK7xibp.cjs';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { w as PricingMode, u as PaymentIntentInfo, l as Customer } from './data-DkqmM-Zo.js';
4
- import { c as UseAccountResult } from './react-XT5mRVVF.js';
3
+ import { N as PricingMode, J as PaymentIntentInfo, l as Customer } from './data-ymW_rWbz.js';
4
+ import { c as UseAccountResult } from './react-Bh0z-Lnb.js';
5
5
  import './errors-IIK7xibp.js';
6
6
 
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useProducts, useEvents, usePackages, usePublicMemberships, useGameCards } from './chunk-C7RE6AXR.js';
2
- import { availableUnitCount } from './chunk-7GE2YQJV.js';
1
+ import { useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useProducts, useEvents, usePackages, usePublicMemberships, useGameCards } from './chunk-3GAXATYP.js';
2
+ import { availableUnitCount } from './chunk-32FTBLXQ.js';
3
3
  import { styles, formatCents, formatMinuteLabel, token, minutesToTime, useCountdown, formatCentsRange } from './chunk-Y3YSDO3H.js';
4
4
  export { BOWLOS_DEFAULT_THEME, BowlosTheme, formatCents, formatCentsRange } from './chunk-Y3YSDO3H.js';
5
5
  import { useState, useEffect, useMemo, useRef } from 'react';
@@ -326,6 +326,36 @@ interface GameCardStatusResult {
326
326
  }
327
327
  /** Poll a game-pass purchase to materialization (by the create's `refToken`). */
328
328
  declare function getGameCardStatus(client: BowlosClient, refToken: string): Promise<GameCardStatusResult>;
329
+ /** Inputs for an itemized game-pass quote. A pass has no config (no date/qty),
330
+ * so it's just the template (+ an optional share token for a private pass).
331
+ * The selling Center is resolved server-side from the customer's home Center. */
332
+ type GameCardPreviewArgs = {
333
+ templateId: string;
334
+ shareToken?: string;
335
+ };
336
+ /** Server-computed itemized quote for a game-pass purchase — the base price,
337
+ * tax lines, the selling Center's booking fee, and the authoritative grand
338
+ * total. Drives the headless "Review" step. Computed by the SAME engine as the
339
+ * PaymentIntent, so it never diverges from what the customer is charged. */
340
+ interface GameCardPreviewResult {
341
+ subtotalCents: number;
342
+ taxLines: {
343
+ rateId: string;
344
+ label: string;
345
+ rateBasisPoints: number;
346
+ mode: "added" | "included";
347
+ taxableBaseCents: number;
348
+ taxCents: number;
349
+ }[];
350
+ taxTotalCents: number;
351
+ reservationFeeCents: number | null;
352
+ reservationFeeLabel: string | null;
353
+ grandTotalCents: number;
354
+ }
355
+ /** Itemized quote for a game-pass purchase WITHOUT creating a PaymentIntent —
356
+ * feeds the Review step. Requires a signed-in customer (so tax exemptions +
357
+ * the resolved home Center match the eventual charge). */
358
+ declare function previewGameCard(client: BowlosClient, args: GameCardPreviewArgs): Promise<GameCardPreviewResult>;
329
359
  /** Inputs for a package purchase. The SDK generates an idempotency key if omitted.
330
360
  * `scheduledDate` is `YYYY-MM-DD` in the Center's timezone; `scheduledStartMinute`
331
361
  * is minutes-from-midnight (e.g. 1050 = 5:30 PM) and MUST be one of the package's
@@ -410,6 +440,108 @@ interface PackagePreviewResult {
410
440
  * the Review step. Requires a signed-in customer (so tax exemptions match the
411
441
  * eventual charge). */
412
442
  declare function previewPackage(client: BowlosClient, args: PackagePreviewArgs): Promise<PackagePreviewResult>;
443
+ /** Inputs for an itemized membership quote. A membership has no config (no
444
+ * date/qty), so it's just the template (+ an optional share token for a private
445
+ * membership). The selling Center is resolved server-side from the customer's
446
+ * home Center. Shared by the one-time and recurring previews. */
447
+ type MembershipPreviewArgs = {
448
+ templateId: string;
449
+ shareToken?: string;
450
+ };
451
+ /** Server-computed itemized quote for a one-time membership purchase — the dues,
452
+ * the one-time setup (joining) fee, tax lines, the selling Center's booking fee,
453
+ * and the authoritative grand total. Drives the headless "Review" step. Computed
454
+ * by the SAME engine as the PaymentIntent, so it never diverges from what the
455
+ * customer is charged. */
456
+ interface MembershipPreviewResult {
457
+ duesCents: number;
458
+ setupFeeCents: number;
459
+ subtotalCents: number;
460
+ taxLines: {
461
+ rateId: string;
462
+ label: string;
463
+ rateBasisPoints: number;
464
+ mode: "added" | "included";
465
+ taxableBaseCents: number;
466
+ taxCents: number;
467
+ }[];
468
+ taxTotalCents: number;
469
+ reservationFeeCents: number | null;
470
+ reservationFeeLabel: string | null;
471
+ grandTotalCents: number;
472
+ }
473
+ /** Itemized quote for a one-time membership purchase WITHOUT creating a
474
+ * PaymentIntent — feeds the Review step. Requires a signed-in customer (so tax
475
+ * exemptions + the resolved home Center match the eventual charge). */
476
+ declare function previewMembership(client: BowlosClient, args: MembershipPreviewArgs): Promise<MembershipPreviewResult>;
477
+ /** Inputs for a one-time membership purchase. The SDK generates an idempotency
478
+ * key if omitted. */
479
+ type MembershipPurchaseArgs = {
480
+ templateId: string;
481
+ idempotencyKey?: string;
482
+ shareToken?: string;
483
+ };
484
+ /** The connected-account PaymentIntent for a one-time membership purchase.
485
+ * Confirm it with `<BowlosPaymentForm>` — it carries `connectedAccountId` + the
486
+ * customer session. Poll `getMembershipStatus(refToken)` for materialization. */
487
+ interface MembershipPurchaseIntent {
488
+ paymentIntentId: string;
489
+ clientSecret: string;
490
+ amountCents: number;
491
+ refToken: string | null;
492
+ customerSessionClientSecret: string;
493
+ connectedAccountId: string;
494
+ }
495
+ /** Buy a one-time membership — mints the connected-account PaymentIntent
496
+ * (requires a signed-in customer; the charge lands on the operator's connected
497
+ * account). */
498
+ declare function createMembershipOrder(client: BowlosClient, args: MembershipPurchaseArgs): Promise<MembershipPurchaseIntent>;
499
+ type MembershipCheckoutStatus = "not_found" | "pending_payment" | "paid_materialized" | "expired" | "payment_failed_retryable" | "abandoned";
500
+ interface MembershipStatusResult {
501
+ status: MembershipCheckoutStatus;
502
+ membershipId: string | null;
503
+ }
504
+ /** Poll a one-time membership purchase to materialization (by the create's
505
+ * `refToken`). */
506
+ declare function getMembershipStatus(client: BowlosClient, refToken: string): Promise<MembershipStatusResult>;
507
+ /** Server-computed itemized quote for a RECURRING membership subscription — the
508
+ * same fields as the one-time quote (what's charged today: dues + one-time setup
509
+ * fee + tax + the selling Center's fee), PLUS `recurringTotalCents` (what each
510
+ * renewal charges) and the `cadence`. Drives the recurring "Review" step's
511
+ * "Due today" + "Auto-renews at" lines. Computed by the SAME engine as the
512
+ * subscription's first invoice, so it never diverges. */
513
+ interface MembershipSubscriptionPreviewResult extends MembershipPreviewResult {
514
+ recurringTotalCents: number;
515
+ cadence: "monthly" | "annual" | "one_time";
516
+ }
517
+ /** Itemized quote for a recurring membership subscription WITHOUT creating the
518
+ * subscription — feeds the Review step. Requires a signed-in customer (so tax
519
+ * exemptions + the resolved home Center match the eventual charge). */
520
+ declare function previewMembershipSubscription(client: BowlosClient, args: MembershipPreviewArgs): Promise<MembershipSubscriptionPreviewResult>;
521
+ /** Inputs for a recurring membership subscription. (No idempotency key — the
522
+ * subscription itself is the dedupe anchor; the buy is gated to one active
523
+ * membership per customer.) */
524
+ type MembershipSubscriptionArgs = {
525
+ templateId: string;
526
+ shareToken?: string;
527
+ };
528
+ /** The connected-account first-invoice payment for a recurring membership
529
+ * subscription. Confirm `clientSecret` with `<BowlosPaymentForm>` — it carries
530
+ * `connectedAccountId` + the customer session. There is NO refToken: the
531
+ * subscription materializes via webhook, so re-query `useMyMemberships` after
532
+ * payment rather than polling. */
533
+ interface MembershipSubscriptionIntent {
534
+ subscriptionId: string;
535
+ clientSecret: string;
536
+ amountCents: number;
537
+ customerSessionClientSecret: string;
538
+ connectedAccountId: string;
539
+ }
540
+ /** Start a recurring membership subscription — mints the subscription + its
541
+ * first-invoice PaymentIntent on the operator's connected account (requires a
542
+ * signed-in customer). Confirm the returned `clientSecret`; the subscription
543
+ * materializes via webhook. */
544
+ declare function createMembershipSubscriptionOrder(client: BowlosClient, args: MembershipSubscriptionArgs): Promise<MembershipSubscriptionIntent>;
413
545
  /** Browser/Node-safe idempotency key for booking creates. */
414
546
  declare function generateIdempotencyKey(): string;
415
547
  /** Place the inventory hold + open a checkout. Sends the session when present
@@ -424,4 +556,4 @@ declare function abandonCheckout(client: BowlosClient, refToken: string): Promis
424
556
  ok: boolean;
425
557
  }>;
426
558
 
427
- export { type AuthState as A, type BookingAddonSelection as B, type CheckoutStatus as C, availableUnitCount as D, bookingPreview as E, type FetchLike as F, type GameCardCheckoutStatus as G, checkAvailability as H, createBooking as I, createBowlosClient as J, createCheckoutPaymentIntent as K, type LinkProfile as L, createGameCardOrder as M, createPackageOrder as N, generateIdempotencyKey as O, type PackageCheckoutStatus as P, getCheckoutStatus as Q, getGameCardStatus as R, type StartTimesArgs as S, type TokenStore as T, getPackageStatus as U, listAddons as V, listStartTimes as W, localStorageTokenStore as X, previewPackage as Y, type AvailabilityArgs as a, type AvailabilityResult as b, type BookingCustomer as c, type BookingHold as d, type BookingPreviewArgs as e, type BookingQuote as f, BowlosClient as g, type BowlosClientConfig as h, type CheckoutStatusResult as i, type ConnectedPaymentInput as j, type CreateBookingArgs as k, type Customer as l, type GameCardPurchaseArgs as m, type GameCardPurchaseIntent as n, type GameCardStatusResult as o, type PackagePreviewArgs as p, type PackagePreviewResult as q, type PackagePurchaseArgs as r, type PackagePurchaseIntent as s, type PackageStatusResult as t, type PaymentIntentInfo as u, type PingResult as v, type PricingMode as w, type PublicAddon as x, type Tokens as y, abandonCheckout as z };
559
+ export { createMembershipOrder as $, type AuthState as A, type BookingAddonSelection as B, type CheckoutStatus as C, type PackagePreviewResult as D, type PackagePurchaseArgs as E, type FetchLike as F, type GameCardCheckoutStatus as G, type PackagePurchaseIntent as H, type PackageStatusResult as I, type PaymentIntentInfo as J, type PingResult as K, type LinkProfile as L, type MembershipCheckoutStatus as M, type PricingMode as N, type PublicAddon as O, type PackageCheckoutStatus as P, type Tokens as Q, abandonCheckout as R, type StartTimesArgs as S, type TokenStore as T, availableUnitCount as U, bookingPreview as V, checkAvailability as W, createBooking as X, createBowlosClient as Y, createCheckoutPaymentIntent as Z, createGameCardOrder as _, type AvailabilityArgs as a, createMembershipSubscriptionOrder as a0, createPackageOrder as a1, generateIdempotencyKey as a2, getCheckoutStatus as a3, getGameCardStatus as a4, getMembershipStatus as a5, getPackageStatus as a6, listAddons as a7, listStartTimes as a8, localStorageTokenStore as a9, previewGameCard as aa, previewMembership as ab, previewMembershipSubscription as ac, previewPackage as ad, type AvailabilityResult as b, type BookingCustomer as c, type BookingHold as d, type BookingPreviewArgs as e, type BookingQuote as f, BowlosClient as g, type BowlosClientConfig as h, type CheckoutStatusResult as i, type ConnectedPaymentInput as j, type CreateBookingArgs as k, type Customer as l, type GameCardPreviewArgs as m, type GameCardPreviewResult as n, type GameCardPurchaseArgs as o, type GameCardPurchaseIntent as p, type GameCardStatusResult as q, type MembershipPreviewArgs as r, type MembershipPreviewResult as s, type MembershipPurchaseArgs as t, type MembershipPurchaseIntent as u, type MembershipStatusResult as v, type MembershipSubscriptionArgs as w, type MembershipSubscriptionIntent as x, type MembershipSubscriptionPreviewResult as y, type PackagePreviewArgs as z };
@@ -326,6 +326,36 @@ interface GameCardStatusResult {
326
326
  }
327
327
  /** Poll a game-pass purchase to materialization (by the create's `refToken`). */
328
328
  declare function getGameCardStatus(client: BowlosClient, refToken: string): Promise<GameCardStatusResult>;
329
+ /** Inputs for an itemized game-pass quote. A pass has no config (no date/qty),
330
+ * so it's just the template (+ an optional share token for a private pass).
331
+ * The selling Center is resolved server-side from the customer's home Center. */
332
+ type GameCardPreviewArgs = {
333
+ templateId: string;
334
+ shareToken?: string;
335
+ };
336
+ /** Server-computed itemized quote for a game-pass purchase — the base price,
337
+ * tax lines, the selling Center's booking fee, and the authoritative grand
338
+ * total. Drives the headless "Review" step. Computed by the SAME engine as the
339
+ * PaymentIntent, so it never diverges from what the customer is charged. */
340
+ interface GameCardPreviewResult {
341
+ subtotalCents: number;
342
+ taxLines: {
343
+ rateId: string;
344
+ label: string;
345
+ rateBasisPoints: number;
346
+ mode: "added" | "included";
347
+ taxableBaseCents: number;
348
+ taxCents: number;
349
+ }[];
350
+ taxTotalCents: number;
351
+ reservationFeeCents: number | null;
352
+ reservationFeeLabel: string | null;
353
+ grandTotalCents: number;
354
+ }
355
+ /** Itemized quote for a game-pass purchase WITHOUT creating a PaymentIntent —
356
+ * feeds the Review step. Requires a signed-in customer (so tax exemptions +
357
+ * the resolved home Center match the eventual charge). */
358
+ declare function previewGameCard(client: BowlosClient, args: GameCardPreviewArgs): Promise<GameCardPreviewResult>;
329
359
  /** Inputs for a package purchase. The SDK generates an idempotency key if omitted.
330
360
  * `scheduledDate` is `YYYY-MM-DD` in the Center's timezone; `scheduledStartMinute`
331
361
  * is minutes-from-midnight (e.g. 1050 = 5:30 PM) and MUST be one of the package's
@@ -410,6 +440,108 @@ interface PackagePreviewResult {
410
440
  * the Review step. Requires a signed-in customer (so tax exemptions match the
411
441
  * eventual charge). */
412
442
  declare function previewPackage(client: BowlosClient, args: PackagePreviewArgs): Promise<PackagePreviewResult>;
443
+ /** Inputs for an itemized membership quote. A membership has no config (no
444
+ * date/qty), so it's just the template (+ an optional share token for a private
445
+ * membership). The selling Center is resolved server-side from the customer's
446
+ * home Center. Shared by the one-time and recurring previews. */
447
+ type MembershipPreviewArgs = {
448
+ templateId: string;
449
+ shareToken?: string;
450
+ };
451
+ /** Server-computed itemized quote for a one-time membership purchase — the dues,
452
+ * the one-time setup (joining) fee, tax lines, the selling Center's booking fee,
453
+ * and the authoritative grand total. Drives the headless "Review" step. Computed
454
+ * by the SAME engine as the PaymentIntent, so it never diverges from what the
455
+ * customer is charged. */
456
+ interface MembershipPreviewResult {
457
+ duesCents: number;
458
+ setupFeeCents: number;
459
+ subtotalCents: number;
460
+ taxLines: {
461
+ rateId: string;
462
+ label: string;
463
+ rateBasisPoints: number;
464
+ mode: "added" | "included";
465
+ taxableBaseCents: number;
466
+ taxCents: number;
467
+ }[];
468
+ taxTotalCents: number;
469
+ reservationFeeCents: number | null;
470
+ reservationFeeLabel: string | null;
471
+ grandTotalCents: number;
472
+ }
473
+ /** Itemized quote for a one-time membership purchase WITHOUT creating a
474
+ * PaymentIntent — feeds the Review step. Requires a signed-in customer (so tax
475
+ * exemptions + the resolved home Center match the eventual charge). */
476
+ declare function previewMembership(client: BowlosClient, args: MembershipPreviewArgs): Promise<MembershipPreviewResult>;
477
+ /** Inputs for a one-time membership purchase. The SDK generates an idempotency
478
+ * key if omitted. */
479
+ type MembershipPurchaseArgs = {
480
+ templateId: string;
481
+ idempotencyKey?: string;
482
+ shareToken?: string;
483
+ };
484
+ /** The connected-account PaymentIntent for a one-time membership purchase.
485
+ * Confirm it with `<BowlosPaymentForm>` — it carries `connectedAccountId` + the
486
+ * customer session. Poll `getMembershipStatus(refToken)` for materialization. */
487
+ interface MembershipPurchaseIntent {
488
+ paymentIntentId: string;
489
+ clientSecret: string;
490
+ amountCents: number;
491
+ refToken: string | null;
492
+ customerSessionClientSecret: string;
493
+ connectedAccountId: string;
494
+ }
495
+ /** Buy a one-time membership — mints the connected-account PaymentIntent
496
+ * (requires a signed-in customer; the charge lands on the operator's connected
497
+ * account). */
498
+ declare function createMembershipOrder(client: BowlosClient, args: MembershipPurchaseArgs): Promise<MembershipPurchaseIntent>;
499
+ type MembershipCheckoutStatus = "not_found" | "pending_payment" | "paid_materialized" | "expired" | "payment_failed_retryable" | "abandoned";
500
+ interface MembershipStatusResult {
501
+ status: MembershipCheckoutStatus;
502
+ membershipId: string | null;
503
+ }
504
+ /** Poll a one-time membership purchase to materialization (by the create's
505
+ * `refToken`). */
506
+ declare function getMembershipStatus(client: BowlosClient, refToken: string): Promise<MembershipStatusResult>;
507
+ /** Server-computed itemized quote for a RECURRING membership subscription — the
508
+ * same fields as the one-time quote (what's charged today: dues + one-time setup
509
+ * fee + tax + the selling Center's fee), PLUS `recurringTotalCents` (what each
510
+ * renewal charges) and the `cadence`. Drives the recurring "Review" step's
511
+ * "Due today" + "Auto-renews at" lines. Computed by the SAME engine as the
512
+ * subscription's first invoice, so it never diverges. */
513
+ interface MembershipSubscriptionPreviewResult extends MembershipPreviewResult {
514
+ recurringTotalCents: number;
515
+ cadence: "monthly" | "annual" | "one_time";
516
+ }
517
+ /** Itemized quote for a recurring membership subscription WITHOUT creating the
518
+ * subscription — feeds the Review step. Requires a signed-in customer (so tax
519
+ * exemptions + the resolved home Center match the eventual charge). */
520
+ declare function previewMembershipSubscription(client: BowlosClient, args: MembershipPreviewArgs): Promise<MembershipSubscriptionPreviewResult>;
521
+ /** Inputs for a recurring membership subscription. (No idempotency key — the
522
+ * subscription itself is the dedupe anchor; the buy is gated to one active
523
+ * membership per customer.) */
524
+ type MembershipSubscriptionArgs = {
525
+ templateId: string;
526
+ shareToken?: string;
527
+ };
528
+ /** The connected-account first-invoice payment for a recurring membership
529
+ * subscription. Confirm `clientSecret` with `<BowlosPaymentForm>` — it carries
530
+ * `connectedAccountId` + the customer session. There is NO refToken: the
531
+ * subscription materializes via webhook, so re-query `useMyMemberships` after
532
+ * payment rather than polling. */
533
+ interface MembershipSubscriptionIntent {
534
+ subscriptionId: string;
535
+ clientSecret: string;
536
+ amountCents: number;
537
+ customerSessionClientSecret: string;
538
+ connectedAccountId: string;
539
+ }
540
+ /** Start a recurring membership subscription — mints the subscription + its
541
+ * first-invoice PaymentIntent on the operator's connected account (requires a
542
+ * signed-in customer). Confirm the returned `clientSecret`; the subscription
543
+ * materializes via webhook. */
544
+ declare function createMembershipSubscriptionOrder(client: BowlosClient, args: MembershipSubscriptionArgs): Promise<MembershipSubscriptionIntent>;
413
545
  /** Browser/Node-safe idempotency key for booking creates. */
414
546
  declare function generateIdempotencyKey(): string;
415
547
  /** Place the inventory hold + open a checkout. Sends the session when present
@@ -424,4 +556,4 @@ declare function abandonCheckout(client: BowlosClient, refToken: string): Promis
424
556
  ok: boolean;
425
557
  }>;
426
558
 
427
- export { type AuthState as A, type BookingAddonSelection as B, type CheckoutStatus as C, availableUnitCount as D, bookingPreview as E, type FetchLike as F, type GameCardCheckoutStatus as G, checkAvailability as H, createBooking as I, createBowlosClient as J, createCheckoutPaymentIntent as K, type LinkProfile as L, createGameCardOrder as M, createPackageOrder as N, generateIdempotencyKey as O, type PackageCheckoutStatus as P, getCheckoutStatus as Q, getGameCardStatus as R, type StartTimesArgs as S, type TokenStore as T, getPackageStatus as U, listAddons as V, listStartTimes as W, localStorageTokenStore as X, previewPackage as Y, type AvailabilityArgs as a, type AvailabilityResult as b, type BookingCustomer as c, type BookingHold as d, type BookingPreviewArgs as e, type BookingQuote as f, BowlosClient as g, type BowlosClientConfig as h, type CheckoutStatusResult as i, type ConnectedPaymentInput as j, type CreateBookingArgs as k, type Customer as l, type GameCardPurchaseArgs as m, type GameCardPurchaseIntent as n, type GameCardStatusResult as o, type PackagePreviewArgs as p, type PackagePreviewResult as q, type PackagePurchaseArgs as r, type PackagePurchaseIntent as s, type PackageStatusResult as t, type PaymentIntentInfo as u, type PingResult as v, type PricingMode as w, type PublicAddon as x, type Tokens as y, abandonCheckout as z };
559
+ export { createMembershipOrder as $, type AuthState as A, type BookingAddonSelection as B, type CheckoutStatus as C, type PackagePreviewResult as D, type PackagePurchaseArgs as E, type FetchLike as F, type GameCardCheckoutStatus as G, type PackagePurchaseIntent as H, type PackageStatusResult as I, type PaymentIntentInfo as J, type PingResult as K, type LinkProfile as L, type MembershipCheckoutStatus as M, type PricingMode as N, type PublicAddon as O, type PackageCheckoutStatus as P, type Tokens as Q, abandonCheckout as R, type StartTimesArgs as S, type TokenStore as T, availableUnitCount as U, bookingPreview as V, checkAvailability as W, createBooking as X, createBowlosClient as Y, createCheckoutPaymentIntent as Z, createGameCardOrder as _, type AvailabilityArgs as a, createMembershipSubscriptionOrder as a0, createPackageOrder as a1, generateIdempotencyKey as a2, getCheckoutStatus as a3, getGameCardStatus as a4, getMembershipStatus as a5, getPackageStatus as a6, listAddons as a7, listStartTimes as a8, localStorageTokenStore as a9, previewGameCard as aa, previewMembership as ab, previewMembershipSubscription as ac, previewPackage as ad, type AvailabilityResult as b, type BookingCustomer as c, type BookingHold as d, type BookingPreviewArgs as e, type BookingQuote as f, BowlosClient as g, type BowlosClientConfig as h, type CheckoutStatusResult as i, type ConnectedPaymentInput as j, type CreateBookingArgs as k, type Customer as l, type GameCardPreviewArgs as m, type GameCardPreviewResult as n, type GameCardPurchaseArgs as o, type GameCardPurchaseIntent as p, type GameCardStatusResult as q, type MembershipPreviewArgs as r, type MembershipPreviewResult as s, type MembershipPurchaseArgs as t, type MembershipPurchaseIntent as u, type MembershipStatusResult as v, type MembershipSubscriptionArgs as w, type MembershipSubscriptionIntent as x, type MembershipSubscriptionPreviewResult as y, type PackagePreviewArgs as z };
package/dist/index.cjs CHANGED
@@ -484,6 +484,13 @@ function getGameCardStatus(client, refToken) {
484
484
  { auth: true }
485
485
  );
486
486
  }
487
+ function previewGameCard(client, args) {
488
+ return client.call(
489
+ "previewGameCardOrder",
490
+ args,
491
+ { auth: true }
492
+ );
493
+ }
487
494
  function createPackageOrder(client, args) {
488
495
  const idempotencyKey = args.idempotencyKey ?? generateIdempotencyKey();
489
496
  return client.call(
@@ -506,6 +513,42 @@ function previewPackage(client, args) {
506
513
  { auth: true }
507
514
  );
508
515
  }
516
+ function previewMembership(client, args) {
517
+ return client.call(
518
+ "previewMembershipOrder",
519
+ args,
520
+ { auth: true }
521
+ );
522
+ }
523
+ function createMembershipOrder(client, args) {
524
+ const idempotencyKey = args.idempotencyKey ?? generateIdempotencyKey();
525
+ return client.call(
526
+ "createMembershipPaymentIntent",
527
+ { ...args, idempotencyKey },
528
+ { auth: true }
529
+ );
530
+ }
531
+ function getMembershipStatus(client, refToken) {
532
+ return client.call(
533
+ "getMembershipCheckoutStatus",
534
+ { refToken },
535
+ { auth: true }
536
+ );
537
+ }
538
+ function previewMembershipSubscription(client, args) {
539
+ return client.call(
540
+ "previewMembershipSubscriptionOrder",
541
+ args,
542
+ { auth: true }
543
+ );
544
+ }
545
+ function createMembershipSubscriptionOrder(client, args) {
546
+ return client.call(
547
+ "createMembershipSubscription",
548
+ args,
549
+ { auth: true }
550
+ );
551
+ }
509
552
  function generateIdempotencyKey() {
510
553
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
511
554
  return crypto.randomUUID();
@@ -600,6 +643,8 @@ exports.createBooking = createBooking;
600
643
  exports.createBowlosClient = createBowlosClient;
601
644
  exports.createCheckoutPaymentIntent = createCheckoutPaymentIntent;
602
645
  exports.createGameCardOrder = createGameCardOrder;
646
+ exports.createMembershipOrder = createMembershipOrder;
647
+ exports.createMembershipSubscriptionOrder = createMembershipSubscriptionOrder;
603
648
  exports.createPackageOrder = createPackageOrder;
604
649
  exports.generateIdempotencyKey = generateIdempotencyKey;
605
650
  exports.getCenterHours = getCenterHours;
@@ -608,6 +653,7 @@ exports.getFlashSale = getFlashSale;
608
653
  exports.getFlashSaleBookingOptions = getFlashSaleBookingOptions;
609
654
  exports.getFlashSales = getFlashSales;
610
655
  exports.getGameCardStatus = getGameCardStatus;
656
+ exports.getMembershipStatus = getMembershipStatus;
611
657
  exports.getMyCredits = getMyCredits;
612
658
  exports.getMyLoyalty = getMyLoyalty;
613
659
  exports.getMyMembershipDetail = getMyMembershipDetail;
@@ -625,6 +671,9 @@ exports.listProducts = listProducts;
625
671
  exports.listPublicMemberships = listPublicMemberships;
626
672
  exports.listStartTimes = listStartTimes;
627
673
  exports.localStorageTokenStore = localStorageTokenStore;
674
+ exports.previewGameCard = previewGameCard;
675
+ exports.previewMembership = previewMembership;
676
+ exports.previewMembershipSubscription = previewMembershipSubscription;
628
677
  exports.previewPackage = previewPackage;
629
678
  exports.runDoctor = runDoctor;
630
679
  //# sourceMappingURL=index.cjs.map