import { z } from "zod"; import { pageSchema } from "./page"; import { pageAttributesSchema } from "./attributes"; export const sitemapEntry = pageSchema .pick({ id: true, label: true }) .extend(pageAttributesSchema.pick({ path: true, tags: true }).shape) .extend({ status: z .enum(["draft", "published"]) .default("draft") .optional() .describe("The status of the page. Can be draft or published. [AI instructions: Dont generate this.]"), }) .loose() .describe("Pages map. The complete list of site pages & their metadata"); export const sitemapSchema = z.array(sitemapEntry); export type Sitemap = z.infer;