import { R as LockerverseResourceEnvironmentOptions, z as LockerverseSdkError } from "./types.js"; //#region src/booking-types.d.ts type LockerverseBookingService = { name: string; amountCents: number; currency: "USD"; durationMinutes: number; }; type LockerverseBookingCatalogService = LockerverseBookingService & { serviceVariationId: string; /** * A lower price for customers whose email is on the business's list. Show it * as an offer; call `price` with the customer's email to know who pays it. */ memberPrice?: LockerverseBookingMemberPrice | undefined; }; type LockerverseBookingMemberPrice = { /** Who qualifies, for example "ASU athlete price". */ label: string; amountCents: number; /** The first this-many qualifying customers book free, with no card. */ freeFirst?: number | undefined; /** Free bookings left. When 0, qualifying customers pay `amountCents`. */ freeRemaining?: number | undefined; }; /** The price one customer pays for one service, before the attempt exists. */ type LockerverseBookingPrice = { serviceVariationId: string; /** Show this as the total and on the Pay button. */ amountCents: number; regularAmountCents: number; currency: "USD"; /** * Present when this email gets the member price. Each email can use it once. * `free` is true when this customer gets one of the free bookings * (`amountCents` is 0): book with `confirmFree`, with no card. */ memberPrice: { label: string; free?: boolean | undefined; } | null; }; type LockerverseBookingBusiness = { key: string; /** The community of the business (for analytics); absent from older APIs. */ communityId?: string | undefined; name: string; /** The Square mode, independent of the SDK API environment. */ environment?: "sandbox" | "production" | undefined; timeZone: string; service: LockerverseBookingService; /** When present, the customer must select one of these variations. */ services?: LockerverseBookingCatalogService[] | undefined; }; type LockerverseBookingConfiguration = { business: LockerverseBookingBusiness; reviewer: boolean; square: boolean; lockerverse: boolean; ready: boolean; message: string; diagnosticCode?: string | undefined; /** * Public card-entry settings, present while `ready` is true. Use them to show * `LockerverseBookingPayment` before the attempt exists, for example next to * the contact fields. The saved attempt returns the same values. */ payment?: LockerverseBookingPaymentConfiguration | undefined; }; type LockerverseBookingPaymentConfiguration = { publishableKey: string; stripeAccountId: string | null; }; type LockerverseBookingStatus = "review" | "payment_pending" | "payment_action_required" | "payment_failed" | "paid" | "booking_pending" | "booking_created" | "external_payment_pending" | "complete" | "manual_refund_required"; type LockerverseBookingAttempt = { id: string; status: LockerverseBookingStatus; start: string; message: string; publishableKey: string; /** Saved checkout amount. Use this for review and payment after initialization. */ amountCents?: number | undefined; currency?: "USD" | undefined; serviceName?: string | undefined; /** Present when the saved checkout uses a member price. */ priceLabel?: string | undefined; /** The regular service price when `priceLabel` is present. */ regularAmountCents?: number | undefined; /** A free booking: `amountCents` is 0. Confirm with `confirmFree`, no card. */ free?: boolean | undefined; /** The saved appointment's local time zone, retained after owner setup changes. */ timeZone?: string | undefined; bookingId?: string | undefined; bookingStatus?: string | undefined; squarePaymentId?: string | undefined; /** Use the same account for card entry and any required payment action. */ stripeAccountId?: string | null | undefined; /** Private payment credential. Keep it out of URLs, logs and analytics. */ clientSecret?: string | undefined; }; type LockerverseBookingAvailability = { slots: string[]; message: string; }; type LockerverseBookingCustomer = { name: string; email: string; phone: string; }; /** Private browser capability. Do not put it in public configuration or URLs. */ type LockerverseBookingSession = { accessToken: string; expiresAt: string; }; type LockerverseBookingSelection = { serviceVariationId?: string | undefined; date: string; start: string; /** Required by live businesses; old sandbox hosts can omit this field. */ customer?: LockerverseBookingCustomer | undefined; }; type CreateLockerverseBookingsOptions = LockerverseResourceEnvironmentOptions & { businessKey: string; /** Return the limited business-scoped token. Never supply an admin token. */ getAccessToken: () => string | null | Promise; fetch?: typeof globalThis.fetch; onError?: (error: LockerverseSdkError) => void; requestTimeoutMs?: number; sentryDsn?: string | null; }; type LockerverseBookingsClient = { readonly businessKey: string; /** Issue a session, or renew an explicitly supplied existing session. */ createSession: (previousAccessToken?: string) => Promise; configuration: () => Promise; availability: (date: string, serviceVariationId?: string) => Promise; initialize: (selection: LockerverseBookingSelection) => Promise; confirm: (confirmationToken: string) => Promise; /** Books a free attempt (`attempt.free`) with no card. */ confirmFree: () => Promise; recover: () => Promise; /** * The price for this customer's email. Call it when the email changes, before * `initialize`. The email goes in the request body, never in the URL. */ price: (serviceVariationId: string, email: string) => Promise; }; //#endregion //#region src/booking-client.d.ts /** Business identity is public; the token is obtained only at request time. */ declare function createLockerverseBookingsClient(options: CreateLockerverseBookingsOptions): LockerverseBookingsClient; //#endregion export { type CreateLockerverseBookingsOptions, type LockerverseBookingAttempt, type LockerverseBookingAvailability, type LockerverseBookingBusiness, type LockerverseBookingCatalogService, type LockerverseBookingConfiguration, type LockerverseBookingCustomer, type LockerverseBookingMemberPrice, type LockerverseBookingPaymentConfiguration, type LockerverseBookingPrice, type LockerverseBookingSelection, type LockerverseBookingService, type LockerverseBookingSession, type LockerverseBookingStatus, type LockerverseBookingsClient, LockerverseSdkError, createLockerverseBookingsClient }; //# sourceMappingURL=bookings.d.ts.map