feat(mcp): подготовить сервер и доступ к приёмке

This commit is contained in:
Denozordec committed 2026-11-03 03:12:03 +07:00
commit bf3d50e1ff
3835 files changed
+537122

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
import { z } from "zod"
import { serverReadSchema } from "@mmapp/contracts/servers"
const server = serverReadSchema.pick({id:true,name:true,host:true,country:true,type:true,enabled:true,asn:true,status:true,latency:true})
.partial({type:true,asn:true,status:true,latency:true})
.extend({id:z.number().int().positive().max(Number.MAX_SAFE_INTEGER),host:z.string().trim().min(1),latency:z.number().finite().nonnegative().nullable().optional()})
export const wireGuardServersSchema = z.array(server).refine(rows => new Set(rows.map(row => row.id)).size === rows.length)