/** * Read-side of the booking engine — `getOrder` / `listOrders`. * * The engine does not introduce a new "orders" table; `bookings` is * already the parent and `booking_catalog_snapshot` is the per-line * record. These helpers expose the cross-vertical view by selecting * snapshot rows directly. * * Bookings-module joins (status, customer, payment) are layered on at * the route level — these helpers stay scoped to what the catalog plane * itself owns. */ import type { AnyDrizzleDb } from "@voyantjs/db"; import { type SelectBookingCatalogSnapshot } from "../snapshot/schema.js"; export interface ListOrdersQuery { /** Restrict to a specific booking. */ bookingId?: string; /** Restrict to a specific catalog vertical (`"products"`, `"accommodations"`, etc.). */ entityModule?: string; /** Restrict to one or more source kinds — e.g. `["demo"]`. */ sourceKinds?: ReadonlyArray; /** Pagination — capped at 100 by callers. */ limit?: number; offset?: number; } export interface ListOrdersResult { rows: ReadonlyArray; /** * `null` when the caller didn't request a count; populated when the * query is bounded enough that an EXACT count is cheap (currently when * `bookingId` is provided). */ total?: number; } export declare function listOrders(db: AnyDrizzleDb, query?: ListOrdersQuery): Promise; /** * Fetch one snapshot row by its id. Used by the operator template's * `GET /v1/admin/catalog/orders/:id` route. Returns `null` when absent. */ export declare function getOrderById(db: AnyDrizzleDb, snapshotId: string): Promise; //# sourceMappingURL=orders.d.ts.map