fix(evolution): проверять каталог и сохранять неизвестные счётчики
This commit is contained in:
1 parent
9db1471b2c
commit
7e3cb754b0
16 files changed
+140
-82
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user