2024-06-20 17:37:45 +02:00
|
|
|
import { z } from "zod";
|
|
|
|
|
|
|
|
export const downloadSchema = z.object({
|
2024-09-07 09:12:48 +02:00
|
|
|
fileName: z.string().nonempty(),
|
|
|
|
version: z.string().nonempty(),
|
|
|
|
downloadLink: z.string().url().nonempty(),
|
|
|
|
fileSize: z.string().nonempty()
|
2024-06-20 17:37:45 +02:00
|
|
|
});
|
2024-06-22 10:30:51 +02:00
|
|
|
|
|
|
|
export const modsSchema = z.object({
|
2024-09-07 09:12:48 +02:00
|
|
|
fileName: z.string().nonempty(),
|
|
|
|
version: z.string().nonempty(),
|
|
|
|
downloadLink: z.string().url().nonempty(),
|
|
|
|
fileSize: z.string().nonempty()
|
2024-06-22 10:30:51 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export const logsSchema = z.object({
|
2024-09-07 09:12:48 +02:00
|
|
|
version: z.string(),
|
|
|
|
date: z.string(),
|
|
|
|
bullets: z.array(
|
|
|
|
z.object({
|
|
|
|
point: z.string()
|
|
|
|
})
|
|
|
|
)
|
2024-07-03 19:29:49 +02:00
|
|
|
});
|
|
|
|
|
2024-07-31 20:43:04 +02:00
|
|
|
export const vulnerabilitiesSchema = z.object({
|
2024-09-07 09:12:48 +02:00
|
|
|
version: z.string(),
|
|
|
|
bullets: z.array(
|
|
|
|
z.object({
|
2024-09-07 21:39:44 +02:00
|
|
|
point: z.string(),
|
|
|
|
securityAdvisoryUrl: z.string()
|
2024-09-07 09:12:48 +02:00
|
|
|
})
|
|
|
|
)
|
2024-07-31 20:43:04 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export const ModsVulnerabilities = z.object({
|
2024-09-07 09:12:48 +02:00
|
|
|
title: z.string(),
|
|
|
|
category: z.string(),
|
|
|
|
bullets: z.array(
|
|
|
|
z.object({
|
|
|
|
point: z.string()
|
|
|
|
})
|
|
|
|
)
|
2024-07-31 20:43:04 +02:00
|
|
|
});
|
|
|
|
|
2024-07-17 17:45:28 +02:00
|
|
|
export type LogsFormValues = z.infer<typeof logsSchema>;
|
2024-07-31 20:43:04 +02:00
|
|
|
export type VulnerabiltiesForm = z.infer<typeof vulnerabilitiesSchema>;
|
|
|
|
export type ModsVulnerability = z.infer<typeof ModsVulnerabilities>;
|
2024-07-17 17:45:28 +02:00
|
|
|
|
2024-07-03 19:29:49 +02:00
|
|
|
// Contact Page
|
|
|
|
|
|
|
|
export const contactFormSchema = z.object({
|
2024-09-07 09:12:48 +02:00
|
|
|
name: z.string().min(2, {
|
|
|
|
message: "Name must be at least 2 characters."
|
|
|
|
}),
|
|
|
|
email: z.string().email({
|
|
|
|
message: "Invalid email address."
|
|
|
|
}),
|
|
|
|
message: z.string().min(10, {
|
|
|
|
message: "Message must be at least 10 characters."
|
|
|
|
})
|
2024-06-22 10:30:51 +02:00
|
|
|
});
|