import type { ChangesetOperationRow } from '../../../types/db/index.js'; /** * Fetch the changeset operations that should be overlaid on the current * storefront request. * * Two modes: * - **Preview** — caller passes a `previewChangesetToken`. Returns the * specified changeset's ops. Used by the page-builder iframe via the * `?changeset=` query param. * - **Production** — no token. Returns the union of operations from every * active rollout plan (`start_time <= NOW() < end_time`). * * Per-route undo/redo (spec § 5.1, § 5.4). The cursor source differs by mode: * * - **Preview** uses `changeset.route_cursors` — the live editor state, so * the iframe reflects the merchandiser's current undo/redo position. * - **Production** uses `rollout_plan.route_cursors` — the snapshot frozen * at Save time. In-progress edits in the editor (which advance * `changeset.route_cursors`) do not leak to the live storefront until the * merchandiser clicks Save and the rollout's snapshot is updated. * * Either way: an op is included iff `op.change_order <= cursor[op.route]` * (default 0 when the route is absent from the map). Returned ops are ordered * by `change_order` ascending. */ export declare function loadActiveOps(opts: { previewChangesetToken?: string | null; }): Promise<{ ops: ChangesetOperationRow[]; /** * The previewed changeset's theme, when a preview token resolved to a * changeset. `undefined` for the rollout branch or an unknown token. The * caller compares it to `getActiveTheme()` and refuses to apply the overlay * on a mismatch (spec 04 § 9.4); the route-level 409/302 is handled by the * `enforcePreviewThemeMatch` storefront middleware. */ changesetTheme?: string | null; }>;