import type { PostgresJsDatabase } from "drizzle-orm/postgres-js"; export declare const VOYANT_BOOKINGS_MONTHLY_LIMIT_BINDING: "VOYANT_BOOKINGS_MONTHLY_LIMIT"; export declare class BookingMonthlyLimitConfigurationError extends Error { readonly value: unknown; readonly code: "invalid_monthly_booking_limit"; constructor(value: unknown); } export interface BookingMonthlyLimitReachedDetails { limit: number; current: number; periodStart: string; periodEnd: string; } export declare class BookingMonthlyLimitReachedError extends Error { readonly details: BookingMonthlyLimitReachedDetails; readonly code: "monthly_booking_limit_reached"; constructor(details: BookingMonthlyLimitReachedDetails); } /** * Resolve the managed-plan booking allowance. The limit is intentionally * opt-in so self-hosted and older deployments retain unlimited bookings. */ export declare function resolveMonthlyBookingLimit(env: Readonly>): number | null; /** * Serialize quota consumers in the current tenant database and reject the * next accepted booking once the configured allowance is exhausted. * * Callers must invoke this inside the same transaction that accepts the * booking. The transaction-scoped advisory lock makes concurrent acceptances * observe one another, while `excludeBookingId` makes status repair/replay * paths count a booking at most once. */ export declare function assertMonthlyBookingLimitAvailable(tx: PostgresJsDatabase, limit: number | null | undefined, options?: { excludeBookingId?: string | null; }): Promise;