Openstatus www.openstatus.dev
at a68337f614db63aeb5cef2364c081d20f0cf4dde 23 lines 442 B view raw
1import type { z } from "zod"; 2 3import type { assertion } from "./v1"; 4 5export type AssertionRequest = { 6 body: string; 7 header: Record<string, string>; 8 status: number; 9}; 10 11export type AssertionResult = 12 | { 13 success: true; 14 message?: never; 15 } 16 | { 17 success: false; 18 message: string; 19 }; 20export interface Assertion { 21 schema: z.infer<typeof assertion>; 22 assert: (req: AssertionRequest) => AssertionResult; 23}