import { EvershopRequest } from '../../../../../types/request.js'; import { EvershopResponse } from '../../../../../types/response.js'; /** * Storefront-wide guard for `?changeset=` previews (spec 04 ยง 9.4). * * A page-builder preview is only valid under the theme the changeset belongs * to. When an admin previews a draft, then the active theme changes (another * tab, the CLI, a config edit), the stale preview URL must not silently render * the draft against the wrong theme. On a mismatch: * - JSON / XHR clients get `409 Conflict` (the iframe / fetch caller can * surface a "switch back to " message); * - browser navigations get `302` to `/` (the normal storefront). * * Runs on every front-store route via `pages/frontStore/all`, but no-ops * immediately when there's no `?changeset` token (the overwhelming majority of * requests) so the DB lookup only happens for actual preview requests. */ declare const _default: (request: EvershopRequest, response: EvershopResponse, next: (err?: unknown) => void) => Promise; export default _default;