This commit is contained in:
Alex Holliday committed 2026-02-02 23:46:15 +00:00
1 parent f2363a7a09
commit 54d71bef61
4 files changed
+328 -6

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
import { z } from "zod";
export const statusPageSchema = z.object({
companyName: z
.string()
.min(1, "Company name is required")
.max(100, "Company name must be at most 100 characters"),
url: z
.string()
.min(1, "URL is required")
.max(50, "URL must be at most 50 characters")
.regex(
/^[a-z0-9-]+$/,
"URL can only contain lowercase letters, numbers, and hyphens"
),
timezone: z.string().optional(),
color: z.string().min(1, "Color is required"),
monitors: z.array(z.string()),
isPublished: z.boolean(),
showCharts: z.boolean(),
showUptimePercentage: z.boolean(),
showAdminLoginLink: z.boolean(),
customCSS: z.string().optional(),
logo: z
.object({
data: z.string(),
contentType: z.string(),
})
.nullable()
.optional(),
});
export type StatusPageFormData = z.infer<typeof statusPageSchema>;