import type { AnyDrizzleDb } from "@voyantjs/db"; import type { Context } from "hono"; import { z } from "zod"; import type { SourceAdapterContext } from "../adapter/contract.js"; import type { BookEntityResult } from "./book.js"; import type { OwnedBookingHandlerRegistry } from "./owned-handler.js"; import type { QuoteEntityDeps, QuoteEntityResult } from "./quote.js"; import type { SourceAdapterRegistry } from "./registry.js"; import type { SnapshotContentCapturer } from "./snapshot-content.js"; export declare const quoteBodySchema: z.ZodObject<{ entityModule: z.ZodString; entityId: z.ZodString; sourceKind: z.ZodOptional; sourceProvider: z.ZodOptional; sourceConnectionId: z.ZodOptional; sourceRef: z.ZodOptional; scope: z.ZodOptional; audience: z.ZodOptional>; market: z.ZodOptional; currency: z.ZodOptional; }, z.core.$strip>>; parameters: z.ZodOptional>; draft: z.ZodOptional>; ttlMs: z.ZodOptional; }, z.core.$strip>; export declare const bookBodySchema: z.ZodObject<{ quoteId: z.ZodOptional; bookingId: z.ZodOptional; party: z.ZodOptional>; paymentIntent: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"card">; tokenizedCard: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"ticket_on_credit">; agencyAccount: z.ZodString; }, z.core.$strip>]>>; parameters: z.ZodOptional>; draftId: z.ZodOptional; idempotencyKey: z.ZodOptional; }, z.core.$strip>; export declare const draftBodySchema: z.ZodObject<{ entityModule: z.ZodOptional; entityId: z.ZodOptional; sourceKind: z.ZodOptional; sourceConnectionId: z.ZodOptional; sourceRef: z.ZodOptional; draftPayload: z.ZodRecord; currentStep: z.ZodOptional; currentQuoteId: z.ZodOptional; ttlMs: z.ZodOptional; }, z.core.$strip>; export declare const holdPlaceBodySchema: z.ZodObject<{ entityModule: z.ZodString; entityId: z.ZodString; draftId: z.ZodString; ttlMs: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strip>; export declare const holdReleaseBodySchema: z.ZodObject<{ entityModule: z.ZodString; holdToken: z.ZodString; }, z.core.$strip>; export type CatalogBookingQuoteBody = z.infer; export type CatalogBookingBookBody = z.infer; export type CatalogBookingDraftBody = z.infer; export type CatalogBookingHoldPlaceBody = z.infer; export type CatalogBookingHoldReleaseBody = z.infer; export interface CatalogBookingProvenance { sourceKind: string; sourceProvider?: string; sourceConnectionId?: string; sourceRef?: string; } export interface CatalogBookingProvenanceInput { c: Context; db: AnyDrizzleDb; entityModule: string; entityId: string; } export interface CatalogBookingAdapterContextInput { c: Context; db: AnyDrizzleDb; operation: "quote" | "book" | "hold"; entityModule?: string; entityId?: string; sourceKind: string; sourceConnectionId?: string; correlationId: string; } export interface CatalogBookingHoldTtlInput { c: Context; db: AnyDrizzleDb; entityModule: string; entityId: string; } export interface CatalogBookingContentScopeInput { c: Context; db: AnyDrizzleDb; body: CatalogBookingBookBody; draftPayload?: Record; } export interface CatalogBookingQuoteTransformInput { c: Context; db: AnyDrizzleDb; request: CatalogBookingQuoteBody; provenance: CatalogBookingProvenance; result: QuoteEntityResult; } export interface CatalogBookingBookTransformInput { c: Context; db: AnyDrizzleDb; request: CatalogBookingBookBody; result: BookEntityResult; } export interface CatalogBookingDraftConsumedError { c: Context; db: AnyDrizzleDb; draftId: string; bookingId: string; error: unknown; } export interface CatalogBookingCommittedEvent { c: Context; db: AnyDrizzleDb; request: CatalogBookingBookBody; result: BookEntityResult; } export interface CatalogBookingRoutesOptions { resolveDb(c: Context): AnyDrizzleDb; resolveSourceRegistry(c: Context): SourceAdapterRegistry; resolveOwnedHandlers?(c: Context): OwnedBookingHandlerRegistry | undefined; resolveActorId?(c: Context): string | null; resolveCorrelationId?(c: Context): string; resolveAdapterContext?(input: CatalogBookingAdapterContextInput): SourceAdapterContext; resolveEntityProvenance?(input: CatalogBookingProvenanceInput): Promise; resolveHoldTtlMs?(input: CatalogBookingHoldTtlInput): Promise; resolveContentScope?(input: CatalogBookingContentScopeInput): { locale: string; market?: string; currency?: string; } | undefined; contentEnricher?: QuoteEntityDeps["contentEnricher"]; onContentEnricherError?: QuoteEntityDeps["onEnricherError"]; /** * Resolve a per-request `evaluatePromotions` hook. Returning `undefined` * skips promotion evaluation. Templates typically wire * `createCatalogPromotionEvaluator(db)` from `@voyantjs/promotions`. * * Per docs/architecture/promotions-architecture.md §3.6 + §7.1. */ resolveEvaluatePromotions?(input: { c: Context; db: AnyDrizzleDb; }): QuoteEntityDeps["evaluatePromotions"]; captureSnapshotContent?: SnapshotContentCapturer; transformQuoteResult?(input: CatalogBookingQuoteTransformInput): Promise; transformBookResult?(input: CatalogBookingBookTransformInput): Promise; onDraftConsumedError?(event: CatalogBookingDraftConsumedError): void; onCommitted?(event: CatalogBookingCommittedEvent): Promise | void; } //# sourceMappingURL=routes-contracts.d.ts.map