Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

719 B
Raw Blame
import { z } from "zod/v4";

export const sessionResponseSchema = z.object({
  session: z.object({
    valid: z.boolean(),
    sid: z.string().nullable(),
    message: z.string().nullable(),
  }),
});

export const dnsBlockingGetSchema = z.object({
  blocking: z.enum(["enabled", "disabled", "failed", "unknown"]).transform((value) => {
    if (value === "failed") return undefined;
    if (value === "unknown") return undefined;
    return value;
  }),
  timer: z.number().nullable(),
});

export const statsSummaryGetSchema = z.object({
  queries: z.object({
    total: z.number(),
    blocked: z.number(),
    percent_blocked: z.number(),
  }),
  gravity: z.object({
    domains_being_blocked: z.number(),
  }),
});