gitscope
← marzneshin / v0.7.4 / dashboard/src/modules/hosts/dialogs/mutation/profiles/wireguard/schema.ts
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/hosts/dialogs/mutation/profiles/wireguard/schema.ts · TypeScript
Blame Raw
 1import { z } from "zod";
 2import { HostSchema } from "@marzneshin/modules/hosts";
 3
 4export const WireguardSchema = HostSchema.merge(z.object({
 5    path: z.string().nullable().optional(),
 6    allowed_ips: z.string().nullable().optional(),
 7    mtu: z.coerce
 8        .number()
 9        .or(z.string())
10        .nullable()
11        .optional(),
12    dns_servers: z.coerce
13        .string()
14        .nullable()
15        .optional(),
16}));
17
18export type WireguardSchemaType = z.infer<typeof WireguardSchema>;