Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
608 B ยท 29 lines
TypeScript
123456789101112131415161718192021222324252627282930import type { z } from "zod";
import type { assertion } from "./v1";
export type HttpAssertionRequest = { body: string; header: Record<string, string>; status: number;};
export type DnsAssertionRequest = { records: Partial<Record<string, string[]>>;};
export type AssertionRequest = HttpAssertionRequest | DnsAssertionRequest;
export type AssertionResult = | { success: true; message?: never; } | { success: false; message: string; };export interface Assertion { schema: z.infer<typeof assertion>; assert: (req: AssertionRequest) => AssertionResult;}