/** * Shared OpenAPI response schemas for the cruise admin routes (voyant#2114). * * Authored from the Drizzle `$inferSelect` shapes of the cruise tables. Wire * conventions (§17): `timestamp` columns serialize to ISO strings; `date` * columns are already strings; `numeric` money/measurement columns are decimal * strings (`lowestPriceCached` is in MAJOR units, not cents); jsonb arrays / * records are nullable because the columns carry a `.default(...)` without * `.notNull()`. Opaque jsonb policy blobs are documented as pass-throughs. */ import { z } from "@hono/zod-openapi"; /** Permissive error envelope — every cruise error leg returns `{ error, ... }`. */ export declare const errorResponseSchema: z.ZodObject<{ error: z.ZodString; }, z.core.$catchall>; /** `cruises` row. */ export declare const cruiseRowSchema: z.ZodObject<{ id: z.ZodString; slug: z.ZodString; name: z.ZodString; cruiseType: z.ZodEnum<{ ocean: "ocean"; river: "river"; expedition: "expedition"; coastal: "coastal"; }>; lineSupplierId: z.ZodNullable; defaultShipId: z.ZodNullable; nights: z.ZodNumber; embarkPortFacilityId: z.ZodNullable; embarkPortCanonicalPlaceId: z.ZodNullable; disembarkPortFacilityId: z.ZodNullable; disembarkPortCanonicalPlaceId: z.ZodNullable; description: z.ZodNullable; shortDescription: z.ZodNullable; highlights: z.ZodNullable>; inclusionsHtml: z.ZodNullable; exclusionsHtml: z.ZodNullable; regionIds: z.ZodNullable>; waterwayIds: z.ZodNullable>; portIds: z.ZodNullable>; countryIso: z.ZodNullable>; regions: z.ZodNullable>; waterways: z.ZodNullable>; ports: z.ZodNullable>; countries: z.ZodNullable>; themes: z.ZodNullable>; heroImageUrl: z.ZodNullable; mapImageUrl: z.ZodNullable; status: z.ZodEnum<{ draft: "draft"; awaiting_review: "awaiting_review"; live: "live"; archived: "archived"; }>; lowestPriceCached: z.ZodNullable; lowestPriceCurrencyCached: z.ZodNullable; earliestDepartureCached: z.ZodNullable; latestDepartureCached: z.ZodNullable; externalRefs: z.ZodNullable>; customerPaymentPolicy: z.ZodNullable; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_sailings` row. */ export declare const cruiseSailingRowSchema: z.ZodObject<{ id: z.ZodString; cruiseId: z.ZodString; shipId: z.ZodString; departureDate: z.ZodString; returnDate: z.ZodString; embarkPortFacilityId: z.ZodNullable; embarkPortCanonicalPlaceId: z.ZodNullable; disembarkPortFacilityId: z.ZodNullable; disembarkPortCanonicalPlaceId: z.ZodNullable; direction: z.ZodNullable>; availabilityNote: z.ZodNullable; isCharter: z.ZodBoolean; salesStatus: z.ZodEnum<{ open: "open"; on_request: "on_request"; wait_list: "wait_list"; sold_out: "sold_out"; closed: "closed"; }>; externalRefs: z.ZodNullable>; customerPaymentPolicy: z.ZodNullable; lastSyncedAt: z.ZodNullable; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_ships` row. */ export declare const cruiseShipRowSchema: z.ZodObject<{ id: z.ZodString; lineSupplierId: z.ZodNullable; name: z.ZodString; slug: z.ZodString; shipType: z.ZodEnum<{ ocean: "ocean"; river: "river"; expedition: "expedition"; coastal: "coastal"; yacht: "yacht"; sailing: "sailing"; }>; capacityGuests: z.ZodNullable; capacityCrew: z.ZodNullable; cabinCount: z.ZodNullable; deckCount: z.ZodNullable; lengthMeters: z.ZodNullable; cruisingSpeedKnots: z.ZodNullable; yearBuilt: z.ZodNullable; yearRefurbished: z.ZodNullable; imo: z.ZodNullable; description: z.ZodNullable; deckPlanUrl: z.ZodNullable; gallery: z.ZodNullable>; amenities: z.ZodNullable>; externalRefs: z.ZodNullable>; isActive: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_decks` row. */ export declare const cruiseDeckRowSchema: z.ZodObject<{ id: z.ZodString; shipId: z.ZodString; name: z.ZodString; level: z.ZodNullable; planImageUrl: z.ZodNullable; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_cabin_categories` row. */ export declare const cruiseCabinCategoryRowSchema: z.ZodObject<{ id: z.ZodString; shipId: z.ZodString; code: z.ZodString; name: z.ZodString; roomType: z.ZodEnum<{ inside: "inside"; oceanview: "oceanview"; balcony: "balcony"; suite: "suite"; penthouse: "penthouse"; single: "single"; }>; description: z.ZodNullable; minOccupancy: z.ZodNumber; maxOccupancy: z.ZodNumber; squareFeet: z.ZodNullable; wheelchairAccessible: z.ZodBoolean; amenities: z.ZodNullable>; featureCodes: z.ZodNullable>; bedConfigurations: z.ZodNullable>; accessibilityFeatures: z.ZodNullable>; viewType: z.ZodNullable; images: z.ZodNullable>; floorplanImages: z.ZodNullable>; gradeCodes: z.ZodNullable>; externalRefs: z.ZodNullable>; customerPaymentPolicy: z.ZodNullable; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_cabins` row. */ export declare const cruiseCabinRowSchema: z.ZodObject<{ id: z.ZodString; categoryId: z.ZodString; cabinNumber: z.ZodString; deckId: z.ZodNullable; position: z.ZodNullable; connectsTo: z.ZodNullable; notes: z.ZodNullable; isActive: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_days` row. */ export declare const cruiseDayRowSchema: z.ZodObject<{ id: z.ZodString; cruiseId: z.ZodString; dayNumber: z.ZodNumber; title: z.ZodNullable; description: z.ZodNullable; portFacilityId: z.ZodNullable; portCanonicalPlaceId: z.ZodNullable; arrivalTime: z.ZodNullable; departureTime: z.ZodNullable; isOvernight: z.ZodBoolean; isSeaDay: z.ZodBoolean; isExpeditionLanding: z.ZodBoolean; meals: z.ZodNullable; lunch: z.ZodOptional; dinner: z.ZodOptional; }, z.core.$strip>>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_enrichment_programs` row. */ export declare const enrichmentProgramRowSchema: z.ZodObject<{ id: z.ZodString; cruiseId: z.ZodString; kind: z.ZodEnum<{ other: "other"; naturalist: "naturalist"; historian: "historian"; photographer: "photographer"; lecturer: "lecturer"; expert: "expert"; }>; name: z.ZodString; title: z.ZodNullable; description: z.ZodNullable; bioImageUrl: z.ZodNullable; sortOrder: z.ZodNumber; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_prices` row. All `numeric` money columns serialize to decimal strings. */ export declare const cruisePriceRowSchema: z.ZodObject<{ id: z.ZodString; sailingId: z.ZodString; cabinCategoryId: z.ZodString; occupancy: z.ZodNumber; fareCode: z.ZodNullable; fareCodeName: z.ZodNullable; fareVariant: z.ZodEnum<{ cruise_only: "cruise_only"; air_inclusive: "air_inclusive"; }>; currency: z.ZodString; pricePerPerson: z.ZodString; originalPricePerPerson: z.ZodNullable; secondGuestPricePerPerson: z.ZodNullable; singlePricePerPerson: z.ZodNullable; singleSupplementPercent: z.ZodNullable; availability: z.ZodEnum<{ on_request: "on_request"; wait_list: "wait_list"; sold_out: "sold_out"; available: "available"; limited: "limited"; }>; availabilityCount: z.ZodNullable; priceCatalogId: z.ZodNullable; priceScheduleId: z.ZodNullable; bookingDeadline: z.ZodNullable; earlyBookingDeadline: z.ZodNullable; earlyBookingBonusDescription: z.ZodNullable; requiresRequest: z.ZodBoolean; notes: z.ZodNullable; externalRefs: z.ZodNullable>; lastSyncedAt: z.ZodNullable; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** * `cruise_sailing_days` row (per-sailing itinerary override). The `is*` booleans * carry no `.notNull()`, so they are nullable on the wire; `time` columns are * already strings. */ export declare const cruiseSailingDayRowSchema: z.ZodObject<{ id: z.ZodString; sailingId: z.ZodString; dayNumber: z.ZodNumber; title: z.ZodNullable; description: z.ZodNullable; portFacilityId: z.ZodNullable; portCanonicalPlaceId: z.ZodNullable; arrivalTime: z.ZodNullable; departureTime: z.ZodNullable; isOvernight: z.ZodNullable; isSeaDay: z.ZodNullable; isExpeditionLanding: z.ZodNullable; isSkipped: z.ZodBoolean; meals: z.ZodNullable; lunch: z.ZodOptional; dinner: z.ZodOptional; }, z.core.$strip>>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_voyage_groups` row. */ export declare const cruiseVoyageGroupRowSchema: z.ZodObject<{ id: z.ZodString; slug: z.ZodString; name: z.ZodString; groupKind: z.ZodEnum<{ combination: "combination"; grand_voyage: "grand_voyage"; world_cruise: "world_cruise"; cruise_tour: "cruise_tour"; }>; lineSupplierId: z.ZodNullable; nights: z.ZodNumber; embarkPortFacilityId: z.ZodNullable; embarkPortCanonicalPlaceId: z.ZodNullable; disembarkPortFacilityId: z.ZodNullable; disembarkPortCanonicalPlaceId: z.ZodNullable; description: z.ZodNullable; shortDescription: z.ZodNullable; highlights: z.ZodNullable>; regions: z.ZodNullable>; themes: z.ZodNullable>; heroImageUrl: z.ZodNullable; mapImageUrl: z.ZodNullable; status: z.ZodEnum<{ draft: "draft"; awaiting_review: "awaiting_review"; live: "live"; archived: "archived"; }>; lowestPriceCached: z.ZodNullable; lowestPriceCurrencyCached: z.ZodNullable; earliestDepartureCached: z.ZodNullable; latestDepartureCached: z.ZodNullable; externalRefs: z.ZodNullable>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `cruise_voyage_group_segments` row. */ export declare const cruiseVoyageGroupSegmentRowSchema: z.ZodObject<{ id: z.ZodString; voyageGroupId: z.ZodString; sortOrder: z.ZodNumber; segmentKind: z.ZodEnum<{ cruise: "cruise"; land: "land"; hotel: "hotel"; transfer: "transfer"; rail: "rail"; air: "air"; other: "other"; }>; segmentRole: z.ZodEnum<{ core: "core"; pre_extension: "pre_extension"; post_extension: "post_extension"; }>; title: z.ZodString; description: z.ZodNullable; cruiseId: z.ZodNullable; sailingId: z.ZodNullable; startDay: z.ZodNullable; endDay: z.ZodNullable; startDate: z.ZodNullable; endDate: z.ZodNullable; embarkPortFacilityId: z.ZodNullable; embarkPortCanonicalPlaceId: z.ZodNullable; disembarkPortFacilityId: z.ZodNullable; disembarkPortCanonicalPlaceId: z.ZodNullable; nights: z.ZodNullable; externalRefs: z.ZodNullable>; metadata: z.ZodNullable>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** * `cruise_search_index` row (denormalized read model). Note `lowestPriceCents` * is an integer in MINOR units here — the search index predates the major-unit * `lowestPriceCached` convention on the canonical `cruises` row. */ export declare const cruiseSearchIndexRowSchema: z.ZodObject<{ id: z.ZodString; source: z.ZodEnum<{ local: "local"; external: "external"; }>; sourceProvider: z.ZodNullable; sourceRef: z.ZodNullable; localCruiseId: z.ZodNullable; slug: z.ZodString; name: z.ZodString; cruiseType: z.ZodEnum<{ ocean: "ocean"; river: "river"; expedition: "expedition"; coastal: "coastal"; }>; lineName: z.ZodString; shipName: z.ZodString; nights: z.ZodNumber; embarkPortName: z.ZodNullable; embarkPortCanonicalPlaceId: z.ZodNullable; disembarkPortName: z.ZodNullable; disembarkPortCanonicalPlaceId: z.ZodNullable; regionIds: z.ZodNullable>; waterwayIds: z.ZodNullable>; portIds: z.ZodNullable>; countryIso: z.ZodNullable>; regions: z.ZodNullable>; waterways: z.ZodNullable>; ports: z.ZodNullable>; countries: z.ZodNullable>; themes: z.ZodNullable>; earliestDeparture: z.ZodNullable; latestDeparture: z.ZodNullable; departureCount: z.ZodNullable; lowestPriceCents: z.ZodNullable; lowestPriceCurrency: z.ZodNullable; salesStatus: z.ZodNullable; heroImageUrl: z.ZodNullable; refreshedAt: z.ZodString; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; /** `{ data: }` envelope used by single-entity reads/mutations. */ export declare function dataEnvelope(schema: T): z.ZodObject<{ data: T; }, z.core.$strip>;