fix(evolution): проверять каталог и сохранять неизвестные счётчики

This commit is contained in:
Denozordec committed 2026-10-03 13:51:07 +07:00
1 parent 9db1471b2c
commit 7e3cb754b0
16 files changed
+140 -82

No files matched your search

+2 -2
View File
@@ -12,8 +12,8 @@ const schema = z.object({
modules: unique(z.object({ id, name: text, type: text })),
domains: unique(z.object({ ...base, domain: text, resolvedIp: text })),
ipRanges: unique(z.object({ ...base, cidr: text, country: text })),
asns: unique(z.object({ id, asn: text, org: text, country: text, prefixes: count, filter: text, updated: text, enabled: z.boolean() })),
communities: unique(z.object({ id, value: text, name: text, description: text, type: z.enum(["standard", "no-export", "no-advertise", "local-as", "custom"]), filterIds: z.array(text), serverCount: count, prefixCount: count, action: z.enum(["permit", "deny", "local-pref", "metric"]), actionValue: z.number().finite().optional(), enabled: z.boolean() })),
asns: unique(z.object({ id, asn: text, org: text, country: text, prefixes: count.nullable(), filter: text, updated: text, enabled: z.boolean() })),
communities: unique(z.object({ id, value: text, name: text, description: text, type: z.enum(["standard", "no-export", "no-advertise", "local-as", "custom"]), filterIds: z.array(text), serverCount: count, prefixCount: count.nullable(), action: z.enum(["permit", "deny", "local-pref", "metric"]), actionValue: z.number().finite().optional(), enabled: z.boolean() })),
})
export function parseEvoBgpCatalog(raw: unknown): EvoBgpCatalogSnapshot {
const parsed = schema.safeParse(raw)