/**
 * Editable SEO config — DB-backed overrides for the static `actuate.config.ts`
 * `seo` block + per-collection `CollectionSEOConfig`.
 *
 * Static config in `actuate.config.ts` is the source of truth at code level,
 * but admins need to be able to change site name, default OG image, robots
 * policy, default Schema.org types per collection, etc. without redeploying.
 *
 * Storage: a single Document row with `collection = '__seo_config__'` and
 * `data.{site, collections}`. The leading double underscore makes the slug
 * un-spellable as a normal collection (slugs are lowercased + dashed in the
 * config validator), so it can never collide with a user collection.
 *
 * Merge semantics: DB values take precedence over static config, field by
 * field. Removing a value in the UI (setting it to undefined / empty string)
 * falls back to the static default — so the admin panel is purely additive,
 * never destructive of code-level config.
 */
import type { ActuateCMSConfig, CollectionSEOConfig, SiteSEOConfig } from '../config/types.js';
export declare const SEO_CONFIG_COLLECTION = "__seo_config__";
/**
 * Shape of the overrides document stored in the DB. Every field is optional —
 * a freshly-installed CMS has no row at all and the UI lazily creates one on
 * first save.
 */
export interface SeoConfigOverrides {
    /** Site-wide overrides. Merged shallow-then-deep over static `config.seo`. */
    site?: Partial<SiteSEOConfig>;
    /** Per-collection overrides keyed by collection slug. */
    collections?: Record<string, Partial<CollectionSEOConfig>>;
    /** SEO module settings edited from the Technical tab (crawl/robots/sitemap). */
    module?: Partial<SeoModuleSettings>;
    /** Last update timestamp (set by the writer). */
    updatedAt?: string;
    /** User id of the last editor (set by the writer). */
    updatedBy?: string;
}
/**
 * Editable SEO-module behaviour surfaced on the Technical tab. These are the
 * crawl/index toggles, sitemap options, custom robots.txt body, and the
 * Search Console connection flag from the SEO spec's `SEOConfig` shape. Stored
 * alongside the field overrides in the same `__seo_config__` document.
 */
export interface SeoModuleSettings {
    sitemapEnabled: boolean;
    robotsEnabled: boolean;
    autoRegenerateSitemapOnPublish: boolean;
    /** Notify Google/Bing when the sitemap changes (guarded to production). */
    pingSearchEnginesOnPublish: boolean;
    includeImagesInSitemap: boolean;
    includePostsInSitemap: boolean;
    indexEntireSite: boolean;
    noindexPaginatedArchives: boolean;
    noindexTagPages: boolean;
    /** Custom robots.txt body. Empty string means "use generated defaults". */
    robotsTxt: string;
    /** Whether Google Search Console is connected (gated; false in demo/local). */
    searchConsoleConnected: boolean;
    /** ISO timestamp of the last manual sitemap regeneration (null = never). */
    sitemapLastGeneratedAt: string | null;
}
/** Safe defaults applied when the overrides document has no `module` block. */
export declare const DEFAULT_SEO_MODULE_SETTINGS: SeoModuleSettings;
/** Merge stored module settings over the defaults (field-by-field). */
export declare function resolveSeoModuleSettings(overrides: SeoConfigOverrides | null): SeoModuleSettings;
/** Read the SEO overrides document. Returns null when no row exists yet. */
export declare function getSeoOverrides(db: unknown): Promise<SeoConfigOverrides | null>;
/**
 * Upsert the SEO overrides document. The caller is responsible for auth/role
 * checks — this function only handles storage.
 */
export declare function putSeoOverrides(db: unknown, overrides: SeoConfigOverrides, userId: string): Promise<SeoConfigOverrides>;
/**
 * Merge static site-wide SEO config with the DB overrides. Nested objects
 * (`robots`, `sitemap`, `ogImage`, `organization`) merge field-by-field;
 * primitive values use override-wins-if-set.
 */
export declare function mergeSiteSeoConfig(base: SiteSEOConfig | undefined, over: Partial<SiteSEOConfig> | undefined): SiteSEOConfig;
/** Same merge semantics as the site-wide version, applied to a single collection. */
export declare function mergeCollectionSeoConfig(base: CollectionSEOConfig | undefined, over: Partial<CollectionSEOConfig> | undefined): CollectionSEOConfig;
/**
 * Return a new config object with DB-stored SEO overrides applied. The
 * static config is never mutated — callers receive a shallow copy with
 * `seo` and each collection's `seo` block replaced by the merged values.
 *
 * Routes that compose SEO output call this once per request, then thread
 * the result through to `composePageMeta` / sitemap helpers exactly like
 * the static config they replaced.
 */
export declare function applySeoOverrides(config: ActuateCMSConfig | null | undefined, overrides: SeoConfigOverrides | null): ActuateCMSConfig | null;
//# sourceMappingURL=config-store.d.ts.map