import { type VoyantBindings, type VoyantVariables } from "@voyant-travel/hono"; import { departuresDocKey, readThroughDepartures } from "./departures-read-model.js"; export { departuresDocKey, readThroughDepartures }; import { type StorefrontServiceOptions } from "./service.js"; type Env = { Bindings: VoyantBindings; Variables: { userId?: string; } & VoyantVariables; }; export declare function createStorefrontPublicRoutes(options?: StorefrontServiceOptions): import("hono/hono-base").HonoBase | undefined; consent?: { marketing?: boolean | undefined; newsletter?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; } | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { contact: { name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; email?: string | undefined; phone?: string | undefined; }; kind?: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral" | undefined; source?: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking" | undefined; productId?: string | null | undefined; optionUnitId?: string | null | undefined; notes?: string | null | undefined; tags?: string[] | undefined; sourceSubmissionId?: string | null | undefined; sourceUrl?: string | null | undefined; locale?: string | undefined; payload?: Record | undefined; consent?: { marketing?: boolean | undefined; newsletter?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; } | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 403; } | { input: { json: { contact: { name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; email?: string | undefined; phone?: string | undefined; }; kind?: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral" | undefined; source?: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking" | undefined; productId?: string | null | undefined; optionUnitId?: string | null | undefined; notes?: string | null | undefined; tags?: string[] | undefined; sourceSubmissionId?: string | null | undefined; sourceUrl?: string | null | undefined; locale?: string | undefined; payload?: Record | undefined; consent?: { marketing?: boolean | undefined; newsletter?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; } | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 429; } | { input: { json: { contact: { name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; email?: string | undefined; phone?: string | undefined; }; kind?: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral" | undefined; source?: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking" | undefined; productId?: string | null | undefined; optionUnitId?: string | null | undefined; notes?: string | null | undefined; tags?: string[] | undefined; sourceSubmissionId?: string | null | undefined; sourceUrl?: string | null | undefined; locale?: string | undefined; payload?: Record | undefined; consent?: { marketing?: boolean | undefined; newsletter?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; } | undefined; }; }; output: { data: { id: string; personId: string; kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral"; source: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking"; status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired"; duplicate: boolean; }; }; outputFormat: "json"; status: 201; }; }; } & { "/newsletter/subscribe": { $post: { input: { json: { email: string; consent: { newsletter: true; marketing?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; }; name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; source?: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking" | undefined; sourceSubmissionId?: string | null | undefined; sourceUrl?: string | null | undefined; locale?: string | undefined; tags?: string[] | undefined; payload?: Record | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { email: string; consent: { newsletter: true; marketing?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; }; name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; source?: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking" | undefined; sourceSubmissionId?: string | null | undefined; sourceUrl?: string | null | undefined; locale?: string | undefined; tags?: string[] | undefined; payload?: Record | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 403; } | { input: { json: { email: string; consent: { newsletter: true; marketing?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; }; name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; source?: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking" | undefined; sourceSubmissionId?: string | null | undefined; sourceUrl?: string | null | undefined; locale?: string | undefined; tags?: string[] | undefined; payload?: Record | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 429; } | { input: { json: { email: string; consent: { newsletter: true; marketing?: boolean | undefined; gdpr?: boolean | undefined; scope?: string | null | undefined; acceptedAt?: string | null | undefined; }; name?: string | undefined; firstName?: string | undefined; lastName?: string | undefined; source?: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking" | undefined; sourceSubmissionId?: string | null | undefined; sourceUrl?: string | null | undefined; locale?: string | undefined; tags?: string[] | undefined; payload?: Record | undefined; }; }; output: { data: { id: string; personId: string; kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral"; source: "admin" | "form" | "website" | "phone" | "abandoned_cart" | "booking"; status: "new" | "contacted" | "qualified" | "converted" | "lost" | "expired"; duplicate: boolean; doubleOptIn: "not_configured" | "requested"; }; }; outputFormat: "json"; status: 202; }; }; } & { "/settings": { $get: { input: {}; output: { data: { support: { email: string | null; phone: string | null; links: { label: string; url: string; }[]; }; legal: { termsUrl: string | null; privacyUrl: string | null; cancellationUrl: string | null; defaultContractTemplateId: string | null; }; localization: { defaultLocale: string | null; currencyDisplay: "symbol" | "name" | "code"; }; forms: { billing: { fields: { key: string; label: string; type: "date" | "email" | "select" | "text" | "tel" | "textarea" | "checkbox" | "country"; required: boolean; placeholder: string | null; description: string | null; autocomplete: string | null; options: { value: string; label: string; }[]; }[]; }; travelers: { fields: { key: string; label: string; type: "date" | "email" | "select" | "text" | "tel" | "textarea" | "checkbox" | "country"; required: boolean; placeholder: string | null; description: string | null; autocomplete: string | null; options: { value: string; label: string; }[]; }[]; }; }; payment: { defaultMethod: "card" | "bank_transfer" | "cash" | "travel_credit" | "invoice" | null; methods: { code: "card" | "bank_transfer" | "cash" | "travel_credit" | "invoice"; label: string; description: string | null; enabled: boolean; }[]; structure: "split" | "full"; schedule: { percent: number; dueInDays: number; dueCondition: "after_booking" | "before_departure"; }[]; defaultSchedule: { depositPercent: number | null; balanceDueDaysBeforeDeparture: number | null; } | null; bankTransfer: { dueDays: number | null; account: { provider: string | null; currency: string | null; iban: string; beneficiary: string; bank: string; } | null; accountHolder: string | null; bankName: string | null; iban: string | null; bic: string | null; paymentReference: string | null; instructions: string | null; } | null; }; }; }; outputFormat: "json"; status: 200; }; }; } & { "/departures/:departureId": { $get: { input: { param: { departureId: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { departureId: string; }; }; output: { data: { id: string; productId: string; itineraryId: string; optionId: string | null; dateLocal: string | null; startAt: string | null; endAt: string | null; timezone: string; startTime: { id: string; label: string | null; startTimeLocal: string; durationMinutes: number | null; } | null; meetingPoint: string | null; capacity: number | null; remaining: number | null; departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request"; nights: number | null; days: number | null; ratePlans: { id: string; active: boolean; name: string; pricingModel: string; basePrices: { amount: number; currencyCode: string; }[]; roomPrices: { amount: number; currencyCode: string; roomType: { id: string; name: string; occupancy: { adultsMin: number; adultsMax: number; childrenMax: number; }; }; }[]; }[]; resourceManifest: { kinds: { kind: string; capacity: number; assigned: number; available: number; }[]; resources: { id: string; kind: string; label: string | null; refType: string | null; refId: string | null; capacity: number; assigned: number; available: number; parentId: string | null; flags: { [x: string]: import("hono/utils/types").JSONValue; }; }[]; } | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/products/:productId/departures": { $get: { input: { param: { productId: string; }; } & { query: { optionId?: string | undefined; status?: "open" | "closed" | "sold_out" | "cancelled" | undefined; dateFrom?: string | undefined; dateTo?: string | undefined; limit?: unknown; offset?: unknown; }; }; output: { data: { id: string; productId: string; itineraryId: string; optionId: string | null; dateLocal: string | null; startAt: string | null; endAt: string | null; timezone: string; startTime: { id: string; label: string | null; startTimeLocal: string; durationMinutes: number | null; } | null; meetingPoint: string | null; capacity: number | null; remaining: number | null; departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request"; nights: number | null; days: number | null; ratePlans: { id: string; active: boolean; name: string; pricingModel: string; basePrices: { amount: number; currencyCode: string; }[]; roomPrices: { amount: number; currencyCode: string; roomType: { id: string; name: string; occupancy: { adultsMin: number; adultsMax: number; childrenMax: number; }; }; }[]; }[]; resourceManifest: { kinds: { kind: string; capacity: number; assigned: number; available: number; }[]; resources: { id: string; kind: string; label: string | null; refType: string | null; refId: string | null; capacity: number; assigned: number; available: number; parentId: string | null; flags: { [x: string]: import("hono/utils/types").JSONValue; }; }[]; } | null; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/products/:productId/availability": { $get: { input: { param: { productId: string; }; } & { query: { optionId?: string | undefined; status?: "open" | "closed" | "sold_out" | "cancelled" | "on_request" | undefined; dateFrom?: string | undefined; dateTo?: string | undefined; locale?: string | undefined; limit?: unknown; offset?: unknown; }; }; output: { data: { productId: string; availabilityState: "closed" | "sold_out" | "cancelled" | "available" | "on_request" | "past_cutoff" | "too_early" | "unavailable"; counts: { total: number; open: number; closed: number; soldOut: number; cancelled: number; onRequest: number; pastCutoff: number; tooEarly: number; available: number; }; departures: { id: string; productId: string; optionId: string | null; dateLocal: string | null; startAt: string | null; endAt: string | null; timezone: string; status: "open" | "closed" | "sold_out" | "cancelled" | "on_request"; availabilityState: "closed" | "sold_out" | "cancelled" | "available" | "on_request" | "past_cutoff" | "too_early" | "unavailable"; capacity: number | null; remaining: number | null; pastCutoff: boolean; tooEarly: boolean; }[]; total: number; limit: number; offset: number; }; }; outputFormat: "json"; status: 200; }; }; } & { "/products/:productId/departures/:departureId/itinerary": { $get: { input: { param: { productId: string; departureId: string; }; } & { query: { languageTag?: string | undefined; lang?: string | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { productId: string; departureId: string; }; } & { query: { languageTag?: string | undefined; lang?: string | undefined; }; }; output: { data: { id: string; itineraryId: string; days: { id: string; title: string; description: string | null; thumbnail: { url: string; } | null; segments: { id: string; title: string; description: string | null; }[]; }[]; }; }; outputFormat: "json"; status: 200; }; }; } & { "/products/:productId/extensions": { $get: { input: { param: { productId: string; }; } & { query: { optionId?: string | undefined; }; }; output: { data: { extensions: { id: string; name: string; label: string; required: boolean; selectable: boolean; hasOptions: boolean; refProductId: string | null; thumb: string | null; pricePerPerson: number | null; currencyCode: string; pricingMode: "on_request" | "unavailable" | "included" | "per_person" | "per_booking"; defaultQuantity: number | null; minQuantity: number | null; maxQuantity: number | null; }[]; items: { id: string; name: string; label: string; required: boolean; selectable: boolean; hasOptions: boolean; refProductId: string | null; thumb: string | null; pricePerPerson: number | null; currencyCode: string; pricingMode: "on_request" | "unavailable" | "included" | "per_person" | "per_booking"; defaultQuantity: number | null; minQuantity: number | null; maxQuantity: number | null; }[]; details: { [x: string]: { description: string | null; media: { url: string; alt: string | null; }[]; }; }; currencyCode: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/departures/:departureId/price": { $post: { input: { param: { departureId: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { departureId: string; }; }; output: { data: { departureId: string; productId: string; optionId: string | null; currencyCode: string; basePrice: number; taxAmount: number; total: number; notes: string | null; lineItems: { name: string; total: number; quantity: number; unitPrice: number; }[]; allocation: { slot: { id: string; productId: string; optionId: string | null; dateLocal: string | null; startAt: string | null; endAt: string | null; timezone: string; status: import("./service-boundary-sql.js").StorefrontSlotStatus | "on_request"; availabilityState: import("./service-departures-core.js").StorefrontProductAvailabilityState; capacity: number | null; remaining: number | null; pastCutoff: boolean; tooEarly: boolean; resourceManifest: { kinds: { capacity: number; assigned: number; available: number; kind: string; }[]; resources: { id: string; kind: string; label: string | null; refType: string | null; refId: string | null; capacity: number; assigned: number; available: number; parentId: string | null; flags: { [x: string]: import("hono/utils/types").JSONValue; }; }[]; } | null; }; pax: { adults: number; children: number; infants: number; total: number; }; requestedUnits: { unitId: string | null; requestRef: string | null; name: string; unitType: string | null; quantity: number; pricingMode: string | null; unitPrice: number; total: number; currencyCode: string; tierId: string | null; }[]; rooms: { unitId: string; name: string; occupancy: number; quantity: number; pax: number; pricingMode: string | null; unitPrice: number; total: number; currencyCode: string; tierId: string | null; }[]; }; units: { unitId: string | null; requestRef: string | null; name: string; unitType: string | null; quantity: number; pricingMode: string | null; unitPrice: number; total: number; currencyCode: string; tierId: string | null; }[]; rooms: { unitId: string; name: string; occupancy: number; quantity: number; pax: number; pricingMode: string | null; unitPrice: number; total: number; currencyCode: string; tierId: string | null; }[]; extras: { extraId: string; name: string; required: boolean; selectable: boolean; selected: boolean; pricingMode: string; quantity: number; unitPrice: number; total: number; currencyCode: string; }[]; offers: { available: { offer: { id: string; name: string; slug: string | null; description: string | null; discountType: "percentage" | "fixed_amount"; discountValue: string; currency: string | null; applicableProductIds: string[]; applicableDepartureIds: string[]; validFrom: string | null; validTo: string | null; minTravelers: number | null; imageMobileUrl: string | null; imageDesktopUrl: string | null; stackable: boolean; createdAt: string; updatedAt: string; }; status: string; reason: string | null; selected: boolean; discountAppliedCents: number; discountedPriceCents: number; }[]; requested: ({ kind: "slug"; value: string; result: { status: "applied" | "not_applicable" | "invalid" | "conflict"; reason: "currency" | "conflict" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "scope" | "min_pax" | "eligibility" | "no_discount" | "booking_mismatch" | "session_mismatch" | null; offer: { id: string; name: string; slug: string | null; description: string | null; discountType: "percentage" | "fixed_amount"; discountValue: string; currency: string | null; applicableProductIds: string[]; applicableDepartureIds: string[]; validFrom: string | null; validTo: string | null; minTravelers: number | null; imageMobileUrl: string | null; imageDesktopUrl: string | null; stackable: boolean; createdAt: string; updatedAt: string; } | null; target: { bookingId: string | null; sessionId: string | null; productId: string; departureId: string | null; }; pricing: { basePriceCents: number; currency: string; discountAppliedCents: number; discountedPriceCents: number; }; appliedOffers: { offerId: string; offerName: string; discountAppliedCents: number; discountedPriceCents: number; currency: string; discountKind: "percentage" | "fixed_amount"; discountPercent: number | null; discountAmountCents: number | null; appliedCode: string | null; stackable: boolean; }[]; conflict: { policy: "best_discount_wins" | "stackable_compose"; autoAppliedOfferIds: string[]; manualOfferId: string | null; selectedOfferIds: string[]; message: string; } | null; } | null; } | { kind: "code"; value: string; result: { status: "applied" | "not_applicable" | "invalid" | "conflict"; reason: "currency" | "conflict" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "scope" | "min_pax" | "eligibility" | "no_discount" | "booking_mismatch" | "session_mismatch" | null; offer: { id: string; name: string; slug: string | null; description: string | null; discountType: "percentage" | "fixed_amount"; discountValue: string; currency: string | null; applicableProductIds: string[]; applicableDepartureIds: string[]; validFrom: string | null; validTo: string | null; minTravelers: number | null; imageMobileUrl: string | null; imageDesktopUrl: string | null; stackable: boolean; createdAt: string; updatedAt: string; } | null; target: { bookingId: string | null; sessionId: string | null; productId: string; departureId: string | null; }; pricing: { basePriceCents: number; currency: string; discountAppliedCents: number; discountedPriceCents: number; }; appliedOffers: { offerId: string; offerName: string; discountAppliedCents: number; discountedPriceCents: number; currency: string; discountKind: "percentage" | "fixed_amount"; discountPercent: number | null; discountAmountCents: number | null; appliedCode: string | null; stackable: boolean; }[]; conflict: { policy: "best_discount_wins" | "stackable_compose"; autoAppliedOfferIds: string[]; manualOfferId: string | null; selectedOfferIds: string[]; message: string; } | null; } | null; })[]; applied: { offerId: string; offerName: string; discountAppliedCents: number; discountedPriceCents: number; currency: string; discountKind: "percentage" | "fixed_amount"; discountPercent: number | null; discountAmountCents: number | null; appliedCode: string | null; stackable: boolean; }[]; conflict: { policy: "best_discount_wins" | "stackable_compose"; autoAppliedOfferIds: string[]; manualOfferId: string | null; selectedOfferIds: string[]; message: string; } | { policy: string; autoAppliedOfferIds: string[]; manualOfferId: null; selectedOfferIds: string[]; message: string; } | null; discountTotal: number; discountTotalCents: number; totalAfterDiscount: number; currencyCode: string; }; totals: { currencyCode: string; base: number; extras: number; subtotal: number; discount: number; tax: number; total: number; perPerson: number; perBooking: number; }; }; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; }; }; } & { "/departures/:departureId/eligibility": { $post: { input: { param: { departureId: string; }; }; output: { data: { departureId: string; productId: string | null; travelStartsOn: string | null; travelEndsOn: string | null; eligible: boolean; blockingIssues: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; warnings: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; travelers: { travelerRef: string; eligible: boolean; matchedRuleIds: string[]; blockingIssues: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; warnings: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; }[]; }; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; }; }; } & { "/products/:productId/departures/:departureId/eligibility": { $post: { input: { param: { departureId: string; } & { productId: string; }; }; output: { data: { departureId: string; productId: string | null; travelStartsOn: string | null; travelEndsOn: string | null; eligible: boolean; blockingIssues: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; warnings: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; travelers: { travelerRef: string; eligible: boolean; matchedRuleIds: string[]; blockingIssues: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; warnings: { code: "date_of_birth_required" | "document_required" | "document_expiry_required" | "document_validity" | "nationality_required" | "visa_required" | "minor_consent_required" | "travel_dates_required"; severity: "blocking" | "warning"; message: string; travelerRef: string; ruleId: string; destinationCountries: string[]; requiredDocumentType: "passport" | "id_card" | "none" | "passport_or_id_card"; }[]; }[]; }; }; outputFormat: "json"; status: import("hono/utils/http-status").ContentfulStatusCode; }; }; }, "/", "/products/:productId/departures/:departureId/eligibility">; export type StorefrontPublicRoutes = ReturnType;