/**
 * Path W — markdown-as-source-of-truth shared types.
 *
 * The same `docs/product/<slug>/index.md` files feed two surfaces:
 *
 * 1. The marketing SPA (canonical at `https://neotoma.io/<slug>`, indexed).
 * 2. The bundled install at `/docs/<slug>` (noindex, points back to the
 *    canonical URL via `rel=canonical`).
 *
 * Both surfaces parse the same front-matter shape, so this module is the
 * single source of truth for the types involved.
 */
import { z } from "zod";
/**
 * Categories that match the `Reference` / `Getting started` / etc. sections in
 * `frontend/src/site/site_data.ts::DOC_NAV_CATEGORIES`. Kept narrow on purpose
 * so that drift between the front-matter and the nav config surfaces in CI.
 */
export const NAV_CATEGORIES = [
    "Getting started",
    "Reference",
    "Concepts",
    "Integrations",
    "Operations",
    "Comparisons",
    "Use cases",
];
/**
 * Front-matter schema for `docs/product/<slug>/index.{md,mdx}`. Every field
 * except `interactive` and `canonical_override` is required so the renderer
 * can produce well-formed `<head>` metadata without fallbacks.
 */
export const DocFrontmatterSchema = z.object({
    title: z.string().min(1),
    description: z.string().min(1),
    slug: z
        .string()
        .min(1)
        .regex(/^[a-z][a-z0-9-]*$/, "slug must be kebab-case (lowercase letters, digits, hyphens)"),
    keywords: z.array(z.string().min(1)).default([]),
    nav_category: z.enum(NAV_CATEGORIES),
    last_updated: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "last_updated must be ISO date YYYY-MM-DD"),
    /** True when the page contains MDX-only constructs the install renderer cannot evaluate. */
    interactive: z.boolean().optional().default(false),
    /** Override the canonical URL when the SPA path is not `/${slug}`. */
    canonical_override: z.string().url().optional(),
    /** Optional per-page noindex flag for the SPA (install always noindex). */
    spa_noindex: z.boolean().optional().default(false),
});
//# sourceMappingURL=types.js.map