/** * Booking snapshot graph โ€” immutable frozen views of CatalogEntries captured * at booking commit time. * * One booking can produce multiple snapshot rows (one per participating * CatalogEntry โ€” a TUI package booking captures the package, the referenced * hotel, each selected excursion, the chosen departure, the selected flight). * Snapshots are never mutated and are preserved through source disconnection. * * See `docs/architecture/catalog-architecture.md` ยง5.3 for the full design. */ import type { PricingBasis } from "@voyantjs/catalog-contracts/snapshot"; import type { AppliedOffer } from "../booking-engine/promotions-contract.js"; export type { PricingBasis }; /** * `booking_catalog_snapshot` โ€” frozen view of a CatalogEntry captured at * booking commit. One booking may produce many snapshot rows (one per * participating CatalogEntry). */ export declare const bookingCatalogSnapshotTable: import("drizzle-orm/pg-core").PgTableWithColumns<{ name: "booking_catalog_snapshot"; schema: undefined; columns: { id: import("drizzle-orm/pg-core").PgColumn<{ name: string; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: true; isAutoincrement: false; hasRuntimeDefault: true; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; booking_id: import("drizzle-orm/pg-core").PgColumn<{ name: "booking_id"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; entity_module: import("drizzle-orm/pg-core").PgColumn<{ name: "entity_module"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; entity_id: import("drizzle-orm/pg-core").PgColumn<{ name: "entity_id"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; source_kind: import("drizzle-orm/pg-core").PgColumn<{ name: "source_kind"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; source_provider: import("drizzle-orm/pg-core").PgColumn<{ name: "source_provider"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; source_connection_id: import("drizzle-orm/pg-core").PgColumn<{ name: "source_connection_id"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; source_ref: import("drizzle-orm/pg-core").PgColumn<{ name: "source_ref"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; frozen_payload: import("drizzle-orm/pg-core").PgColumn<{ name: "frozen_payload"; tableName: "booking_catalog_snapshot"; dataType: "json"; columnType: "PgJsonb"; data: unknown; driverParam: unknown; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; overlay_state_at_capture: import("drizzle-orm/pg-core").PgColumn<{ name: "overlay_state_at_capture"; tableName: "booking_catalog_snapshot"; dataType: "json"; columnType: "PgJsonb"; data: unknown; driverParam: unknown; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; pricing_base_amount: import("drizzle-orm/pg-core").PgColumn<{ name: "pricing_base_amount"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgNumeric"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; pricing_taxes: import("drizzle-orm/pg-core").PgColumn<{ name: "pricing_taxes"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgNumeric"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; pricing_fees: import("drizzle-orm/pg-core").PgColumn<{ name: "pricing_fees"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgNumeric"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; pricing_surcharges: import("drizzle-orm/pg-core").PgColumn<{ name: "pricing_surcharges"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgNumeric"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; pricing_currency: import("drizzle-orm/pg-core").PgColumn<{ name: "pricing_currency"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; pricing_breakdown: import("drizzle-orm/pg-core").PgColumn<{ name: "pricing_breakdown"; tableName: "booking_catalog_snapshot"; dataType: "json"; columnType: "PgJsonb"; data: Record; driverParam: unknown; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, { $type: Record; }>; pricing_applied_offers: import("drizzle-orm/pg-core").PgColumn<{ name: "pricing_applied_offers"; tableName: "booking_catalog_snapshot"; dataType: "json"; columnType: "PgJsonb"; data: AppliedOffer[]; driverParam: unknown; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, { $type: AppliedOffer[]; }>; idempotency_key: import("drizzle-orm/pg-core").PgColumn<{ name: "idempotency_key"; tableName: "booking_catalog_snapshot"; dataType: "string"; columnType: "PgText"; data: string; driverParam: string; notNull: false; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: [string, ...string[]]; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; captured_at: import("drizzle-orm/pg-core").PgColumn<{ name: "captured_at"; tableName: "booking_catalog_snapshot"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; }; dialect: "pg"; }>; export type InsertBookingCatalogSnapshot = typeof bookingCatalogSnapshotTable.$inferInsert; export type SelectBookingCatalogSnapshot = typeof bookingCatalogSnapshotTable.$inferSelect; /** * Helper to compose a `PricingBasis` from the structured columns of a * snapshot row. Returns `null` if the snapshot has no pricing columns set * (volatile-live fields without `on-quote` / `on-book` snapshot mode). */ export declare function readPricingBasis(row: SelectBookingCatalogSnapshot): PricingBasis | null; //# sourceMappingURL=schema.d.ts.map