/** * Stable error codes returned from the booking engine. * * Mirrors the catalog plane's `CAPABILITY_NOT_SUPPORTED` convention: * codes are stable strings, callers branch on them, and each carries a * dedicated `Error` subclass for stack-trace clarity. */ /** No SourceAdapter was registered for the row's `source.kind`. */ export declare const NO_ADAPTER_REGISTERED: "NO_ADAPTER_REGISTERED"; /** * No OwnedBookingHandler was registered for the row's `entity_module`. * Sibling to `NO_ADAPTER_REGISTERED` — sourced rows dispatch through * adapters keyed by connection, owned rows dispatch through handlers * keyed by entity module. Per booking-journey-architecture §6. */ export declare const NO_HANDLER_REGISTERED: "NO_HANDLER_REGISTERED"; /** The supplied `quoteId` is unknown or already consumed. */ export declare const QUOTE_NOT_FOUND: "QUOTE_NOT_FOUND"; /** The quote's `expires_at` has passed; caller must re-quote. */ export declare const QUOTE_EXPIRED: "QUOTE_EXPIRED"; /** The quote's entity_module/entity_id doesn't match the book request. */ export declare const QUOTE_MISMATCH: "QUOTE_MISMATCH"; /** The adapter returned `failed` for the requested entity. */ export declare const RESERVE_FAILED: "RESERVE_FAILED"; /** No snapshot row exists for the given (booking_id, entity_*). */ export declare const ORDER_NOT_FOUND: "ORDER_NOT_FOUND"; /** The order has already been cancelled. */ export declare const ORDER_ALREADY_CANCELLED: "ORDER_ALREADY_CANCELLED"; /** * Snapshot content capture failed: neither a fresh adapter fetch nor a * cache fallback produced a content payload. Per sourced-content §5.1, * we deliberately fail the commit rather than snapshot from the * indexed projection — refunds and audit need real "what was sold" * content, not a stub. */ export declare const SNAPSHOT_CONTENT_UNAVAILABLE: "SNAPSHOT_CONTENT_UNAVAILABLE"; export type BookingEngineErrorCode = typeof NO_ADAPTER_REGISTERED | typeof NO_HANDLER_REGISTERED | typeof QUOTE_NOT_FOUND | typeof QUOTE_EXPIRED | typeof QUOTE_MISMATCH | typeof RESERVE_FAILED | typeof ORDER_NOT_FOUND | typeof ORDER_ALREADY_CANCELLED | typeof SNAPSHOT_CONTENT_UNAVAILABLE; export declare class BookingEngineError extends Error { readonly code: BookingEngineErrorCode; readonly context?: Record | undefined; constructor(code: BookingEngineErrorCode, message: string, context?: Record | undefined); } export declare class NoAdapterRegisteredError extends BookingEngineError { /** * Thrown when the registry has no adapter for the given identifier. * The identifier is a connection id when dispatched per-connection * (channel push, sourced bookings with a known connection) or a source * kind when the caller has no connection id (legacy dispatch). */ constructor(identifier: string); } export declare class NoOwnedHandlerRegisteredError extends BookingEngineError { /** Thrown when the owned-handler registry has no entry for the * given `entity_module`. */ constructor(entityModule: string); } export declare class QuoteExpiredError extends BookingEngineError { constructor(quoteId: string, expiredAt: Date); } export declare class QuoteMismatchError extends BookingEngineError { constructor(quoteId: string, expected: { entityModule: string; entityId: string; }, actual: { entityModule: string; entityId: string; }); } export declare class ReserveFailedError extends BookingEngineError { readonly upstreamPayload: unknown; readonly sourceKind: string; readonly entityId: string; constructor(upstreamPayload: unknown, sourceKind: string, entityId: string); } export declare class SnapshotContentUnavailableError extends BookingEngineError { readonly entityModule: string; readonly entityId: string; readonly fallbackReason: string; constructor(entityModule: string, entityId: string, fallbackReason: string); } //# sourceMappingURL=errors.d.ts.map