import type { Pool } from 'pg'; import { type AssetReader, type HarvestResult } from './assetHarvest.js'; import { type ExportablePage } from './landingPages.js'; import type { Manifest } from './manifest.js'; export interface HarvestOptions { /** The theme's directory — images are copied into its `public/` folder. */ themeDir: string; read: AssetReader; isStoreOwned?: (value: string) => boolean; /** Called once with what was copied and what was skipped, for the CLI to print. */ onReport?: (report: HarvestResult) => void; } export interface ExportOpts { themeId: string; pool: Pool; /** SemVer `version` to stamp into the exported theme.json. */ version: string; /** Preserve the existing theme.json's `theme_name` when re-exporting. */ preserveThemeName?: string; /** * Which landing pages to include. Omit for every page this theme has content * on; pass an explicit list to pin the set (`--pages`), or `[]` to skip the * section entirely (`--no-pages`). */ landingPageUuids?: string[]; /** * Copy the store's images into the theme and replace them with * `theme-asset:` tokens, declaring each in `assets[]` (see * `lib/theme/assetHarvest.ts`). Omit to export settings exactly as stored, * pointing at this store's URLs. */ harvestAssets?: HarvestOptions; } /** The pages `exportToManifest` would write, for the CLI's selection prompt. */ export declare function listExportablePages(themeId: string, pool: Pool): Promise; /** * Serialize a theme's live content (active widgets + their ROUTE-LEVEL * placements) into a manifest (spec 04 § 6.4 / § 6.5). Entity-scoped rows * (landing page bodies, homepage backups) are never exported — see * specifications/replace-homepage-with-landing-page.md §17. * * UUIDs are read straight from the DB and NEVER regenerated — that stability * is the whole contract that lets buyers' customizations survive upgrades. * Only `status = TRUE` rows are exported: a widget the author disabled in the * page-builder is not part of the shipped theme. */ export declare function exportToManifest(opts: ExportOpts): Promise;