import { z } from 'astro/zod'; import { isUploadPath } from './lib/upload-policy.js'; export const blogSchema = z.object({ title: z.string(), description: z.string(), publishDate: z.coerce.date(), tags: z.array(z.string()).default([]), audience: z.enum(['public', 'resume']), featured: z.boolean().default(false), video: z.string().refine((value) => isUploadPath(value, ['mp4', 'webm']), 'Video must be an uploaded MP4 or WebM.').optional(), attachments: z.array(z.object({ label: z.string().min(1), file: z.string().refine((value) => isUploadPath(value, ['pdf']), 'Attachment must be an uploaded PDF.') })).optional(), channel: z.object({ label: z.string().min(1), artwork: z.enum(['notes', 'workflow', 'deploy', 'boundary', 'workbench', 'about']) }).optional() }); export const resumeSchema = z.object({ title: z.string(), summary: z.string(), order: z.number(), stack: z.array(z.string()).default([]), evidence: z.string(), status: z.enum(['draft', 'ready']).default('draft') });