@bowlos/reservations 0.21.0 → 0.22.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 +5 -3
- package/README.md +23 -16
- package/dist/account-CO8xzUs_.d.ts +54 -0
- package/dist/account-SqT7et4C.d.cts +54 -0
- package/dist/{catalog-bpCn9klL.d.ts → catalog-BxyPJdBL.d.ts} +49 -47
- package/dist/{catalog-BuafmB8y.d.cts → catalog-D1VoVaNe.d.cts} +49 -47
- package/dist/components.cjs +32 -96
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +35 -62
- package/dist/components.d.ts +35 -62
- package/dist/components.js +31 -83
- package/dist/components.js.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{react-BI2RKM5p.d.ts → react-B1uSOozS.d.ts} +1 -1
- package/dist/{react-D2mBw_-l.d.cts → react-Bc_6yi9q.d.cts} +1 -1
- package/dist/react.d.cts +4 -4
- package/dist/react.d.ts +4 -4
- package/package.json +2 -2
- package/templates/center-site/package.json +1 -1
- package/dist/errors-IIK7xibp.d.cts +0 -54
- package/dist/errors-IIK7xibp.d.ts +0 -54
package/dist/react.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { U as UseQueryOptions, a as UseQueryResult } from './react-
|
|
2
|
-
export { A as AccountStatus, B as BowlosProvider, b as BowlosProviderProps, c as UseAccountResult, u as useAccount, d as useBowlosClient, e as useBowlosQuery } from './react-
|
|
1
|
+
import { U as UseQueryOptions, a as UseQueryResult } from './react-Bc_6yi9q.cjs';
|
|
2
|
+
export { A as AccountStatus, B as BowlosProvider, b as BowlosProviderProps, c as UseAccountResult, u as useAccount, d as useBowlosClient, e as useBowlosQuery } from './react-Bc_6yi9q.cjs';
|
|
3
3
|
import { V as PublicAddon, a as AvailabilityArgs, b as AvailabilityResult, e as BookingPreviewArgs, f as BookingQuote, n as EventTicketPreviewResult, m as EventTicketPreviewArgs, s as GameCardPreviewResult, r as GameCardPreviewArgs, x as MembershipPreviewResult, w as MembershipPreviewArgs, J as MembershipSubscriptionPreviewResult, N as PackagePreviewResult, K as PackagePreviewArgs, W as StartTimesArgs, d as BookingHold, S as PaymentIntentInfo, k as CreateBookingArgs, i as CheckoutStatusResult, I as MembershipSubscriptionIntent, H as MembershipSubscriptionArgs, o as EventTicketPurchaseArgs, t as GameCardPurchaseArgs, y as MembershipPurchaseArgs, O as PackagePurchaseArgs } from './data-BKlgn8Ln.cjs';
|
|
4
|
-
import {
|
|
5
|
-
import { a as BowlosApiError } from './
|
|
4
|
+
import { a as FlashSaleArgs, F as FlashBookingOptionsArgs, b as FlashSalesArgs, B as BrandScoped, E as EventOrderDetailArgs, M as MembershipDetailArgs, R as ReservationDetailArgs } from './account-SqT7et4C.cjs';
|
|
5
|
+
import { h as CatalogResult, e as CatalogArgs, k as CenterHoursArgs, l as CenterScoped, d as BrandCatalogArgs, P as PackageDetailArgs, a as BowlosApiError } from './catalog-D1VoVaNe.cjs';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import 'react';
|
|
8
8
|
|
package/dist/react.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { U as UseQueryOptions, a as UseQueryResult } from './react-
|
|
2
|
-
export { A as AccountStatus, B as BowlosProvider, b as BowlosProviderProps, c as UseAccountResult, u as useAccount, d as useBowlosClient, e as useBowlosQuery } from './react-
|
|
1
|
+
import { U as UseQueryOptions, a as UseQueryResult } from './react-B1uSOozS.js';
|
|
2
|
+
export { A as AccountStatus, B as BowlosProvider, b as BowlosProviderProps, c as UseAccountResult, u as useAccount, d as useBowlosClient, e as useBowlosQuery } from './react-B1uSOozS.js';
|
|
3
3
|
import { V as PublicAddon, a as AvailabilityArgs, b as AvailabilityResult, e as BookingPreviewArgs, f as BookingQuote, n as EventTicketPreviewResult, m as EventTicketPreviewArgs, s as GameCardPreviewResult, r as GameCardPreviewArgs, x as MembershipPreviewResult, w as MembershipPreviewArgs, J as MembershipSubscriptionPreviewResult, N as PackagePreviewResult, K as PackagePreviewArgs, W as StartTimesArgs, d as BookingHold, S as PaymentIntentInfo, k as CreateBookingArgs, i as CheckoutStatusResult, I as MembershipSubscriptionIntent, H as MembershipSubscriptionArgs, o as EventTicketPurchaseArgs, t as GameCardPurchaseArgs, y as MembershipPurchaseArgs, O as PackagePurchaseArgs } from './data-BKlgn8Ln.js';
|
|
4
|
-
import {
|
|
5
|
-
import { a as BowlosApiError } from './
|
|
4
|
+
import { a as FlashSaleArgs, F as FlashBookingOptionsArgs, b as FlashSalesArgs, B as BrandScoped, E as EventOrderDetailArgs, M as MembershipDetailArgs, R as ReservationDetailArgs } from './account-CO8xzUs_.js';
|
|
5
|
+
import { h as CatalogResult, e as CatalogArgs, k as CenterHoursArgs, l as CenterScoped, d as BrandCatalogArgs, P as PackageDetailArgs, a as BowlosApiError } from './catalog-BxyPJdBL.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import 'react';
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bowlos/reservations",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "BowlOS Reservations SDK
|
|
3
|
+
"version": "0.22.0",
|
|
4
|
+
"description": "BowlOS Reservations SDK \u2014 headless client + React hooks for the Module 14 public API gateway. White-label booking, account, and flash-sale reads for third-party-hosted center sites.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "BowlOS",
|
|
7
7
|
"keywords": [
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error model for the BowlOS Reservations SDK.
|
|
3
|
-
*
|
|
4
|
-
* Every failed gateway call surfaces as a single `BowlosApiError` carrying a
|
|
5
|
-
* stable `code` (string), the HTTP `status`, and — for rate limits — a
|
|
6
|
-
* `retryAfterSeconds`. The gateway normalizes the backend's two error
|
|
7
|
-
* conventions (thrown ConvexError + `{ ok:false }` envelopes) into one JSON
|
|
8
|
-
* shape; this class is the client-side mirror of that shape, so consumers
|
|
9
|
-
* branch on `error.code`, never on message text.
|
|
10
|
-
*/
|
|
11
|
-
/** Stable error codes the gateway / backend can return. Open set — treat
|
|
12
|
-
* `code` as a string and match against these for known cases. */
|
|
13
|
-
declare const BOWLOS_ERROR_CODES: {
|
|
14
|
-
readonly API_KEY_MISSING: "API_KEY_MISSING";
|
|
15
|
-
readonly API_KEY_INVALID: "API_KEY_INVALID";
|
|
16
|
-
readonly ORIGIN_NOT_ALLOWED: "ORIGIN_NOT_ALLOWED";
|
|
17
|
-
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
18
|
-
readonly INVALID_CREDENTIALS: "INVALID_CREDENTIALS";
|
|
19
|
-
readonly SIGNUP_FAILED: "SIGNUP_FAILED";
|
|
20
|
-
readonly VALIDATION_FAILED: "VALIDATION_FAILED";
|
|
21
|
-
readonly PERMISSION_DENIED: "PERMISSION_DENIED";
|
|
22
|
-
readonly SCOPE_REVOKED: "SCOPE_REVOKED";
|
|
23
|
-
readonly NOT_FOUND: "NOT_FOUND";
|
|
24
|
-
readonly VERSION_CONFLICT: "VERSION_CONFLICT";
|
|
25
|
-
readonly PRICING_SNAPSHOT_STALE: "PRICING_SNAPSHOT_STALE";
|
|
26
|
-
readonly PAYMENTS_NOT_CONNECTED: "PAYMENTS_NOT_CONNECTED";
|
|
27
|
-
readonly CONNECT_ACCOUNT_RESTRICTED: "CONNECT_ACCOUNT_RESTRICTED";
|
|
28
|
-
readonly CHECKOUT_EXPIRED: "CHECKOUT_EXPIRED";
|
|
29
|
-
readonly NETWORK_ERROR: "NETWORK_ERROR";
|
|
30
|
-
readonly UNKNOWN: "ERROR";
|
|
31
|
-
};
|
|
32
|
-
type BowlosErrorCode = (typeof BOWLOS_ERROR_CODES)[keyof typeof BOWLOS_ERROR_CODES] | (string & {});
|
|
33
|
-
interface BowlosApiErrorOptions {
|
|
34
|
-
retryAfterSeconds?: number;
|
|
35
|
-
cause?: unknown;
|
|
36
|
-
}
|
|
37
|
-
declare class BowlosApiError extends Error {
|
|
38
|
-
/** Stable, machine-readable code. Branch on this, not on `message`. */
|
|
39
|
-
readonly code: BowlosErrorCode;
|
|
40
|
-
/** HTTP status (0 for a network failure before any response). */
|
|
41
|
-
readonly status: number;
|
|
42
|
-
/** Seconds to wait before retrying — present only on `RATE_LIMITED`. */
|
|
43
|
-
readonly retryAfterSeconds?: number;
|
|
44
|
-
constructor(code: BowlosErrorCode, message: string, status: number, options?: BowlosApiErrorOptions);
|
|
45
|
-
/** Too many requests — caller should back off `retryAfterSeconds`. */
|
|
46
|
-
get isRateLimited(): boolean;
|
|
47
|
-
/** Bad/expired login. The session could not be established or has lapsed. */
|
|
48
|
-
get isAuthError(): boolean;
|
|
49
|
-
/** Wrong/missing API key or a disallowed origin — a site-config problem,
|
|
50
|
-
* not something the end customer can fix. */
|
|
51
|
-
get isConfigError(): boolean;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { BOWLOS_ERROR_CODES as B, BowlosApiError as a, type BowlosApiErrorOptions as b, type BowlosErrorCode as c };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error model for the BowlOS Reservations SDK.
|
|
3
|
-
*
|
|
4
|
-
* Every failed gateway call surfaces as a single `BowlosApiError` carrying a
|
|
5
|
-
* stable `code` (string), the HTTP `status`, and — for rate limits — a
|
|
6
|
-
* `retryAfterSeconds`. The gateway normalizes the backend's two error
|
|
7
|
-
* conventions (thrown ConvexError + `{ ok:false }` envelopes) into one JSON
|
|
8
|
-
* shape; this class is the client-side mirror of that shape, so consumers
|
|
9
|
-
* branch on `error.code`, never on message text.
|
|
10
|
-
*/
|
|
11
|
-
/** Stable error codes the gateway / backend can return. Open set — treat
|
|
12
|
-
* `code` as a string and match against these for known cases. */
|
|
13
|
-
declare const BOWLOS_ERROR_CODES: {
|
|
14
|
-
readonly API_KEY_MISSING: "API_KEY_MISSING";
|
|
15
|
-
readonly API_KEY_INVALID: "API_KEY_INVALID";
|
|
16
|
-
readonly ORIGIN_NOT_ALLOWED: "ORIGIN_NOT_ALLOWED";
|
|
17
|
-
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
18
|
-
readonly INVALID_CREDENTIALS: "INVALID_CREDENTIALS";
|
|
19
|
-
readonly SIGNUP_FAILED: "SIGNUP_FAILED";
|
|
20
|
-
readonly VALIDATION_FAILED: "VALIDATION_FAILED";
|
|
21
|
-
readonly PERMISSION_DENIED: "PERMISSION_DENIED";
|
|
22
|
-
readonly SCOPE_REVOKED: "SCOPE_REVOKED";
|
|
23
|
-
readonly NOT_FOUND: "NOT_FOUND";
|
|
24
|
-
readonly VERSION_CONFLICT: "VERSION_CONFLICT";
|
|
25
|
-
readonly PRICING_SNAPSHOT_STALE: "PRICING_SNAPSHOT_STALE";
|
|
26
|
-
readonly PAYMENTS_NOT_CONNECTED: "PAYMENTS_NOT_CONNECTED";
|
|
27
|
-
readonly CONNECT_ACCOUNT_RESTRICTED: "CONNECT_ACCOUNT_RESTRICTED";
|
|
28
|
-
readonly CHECKOUT_EXPIRED: "CHECKOUT_EXPIRED";
|
|
29
|
-
readonly NETWORK_ERROR: "NETWORK_ERROR";
|
|
30
|
-
readonly UNKNOWN: "ERROR";
|
|
31
|
-
};
|
|
32
|
-
type BowlosErrorCode = (typeof BOWLOS_ERROR_CODES)[keyof typeof BOWLOS_ERROR_CODES] | (string & {});
|
|
33
|
-
interface BowlosApiErrorOptions {
|
|
34
|
-
retryAfterSeconds?: number;
|
|
35
|
-
cause?: unknown;
|
|
36
|
-
}
|
|
37
|
-
declare class BowlosApiError extends Error {
|
|
38
|
-
/** Stable, machine-readable code. Branch on this, not on `message`. */
|
|
39
|
-
readonly code: BowlosErrorCode;
|
|
40
|
-
/** HTTP status (0 for a network failure before any response). */
|
|
41
|
-
readonly status: number;
|
|
42
|
-
/** Seconds to wait before retrying — present only on `RATE_LIMITED`. */
|
|
43
|
-
readonly retryAfterSeconds?: number;
|
|
44
|
-
constructor(code: BowlosErrorCode, message: string, status: number, options?: BowlosApiErrorOptions);
|
|
45
|
-
/** Too many requests — caller should back off `retryAfterSeconds`. */
|
|
46
|
-
get isRateLimited(): boolean;
|
|
47
|
-
/** Bad/expired login. The session could not be established or has lapsed. */
|
|
48
|
-
get isAuthError(): boolean;
|
|
49
|
-
/** Wrong/missing API key or a disallowed origin — a site-config problem,
|
|
50
|
-
* not something the end customer can fix. */
|
|
51
|
-
get isConfigError(): boolean;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { BOWLOS_ERROR_CODES as B, BowlosApiError as a, type BowlosApiErrorOptions as b, type BowlosErrorCode as c };
|