From 46f341f7fd059be0e04ed4a83a9f45b49aebf621 Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Thu, 13 Aug 2026 19:26:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20fix=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routers/alertRule/testAlertRule.ts | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/server/private/routers/alertRule/testAlertRule.ts b/server/private/routers/alertRule/testAlertRule.ts index e870e9488..5542c60b9 100644 --- a/server/private/routers/alertRule/testAlertRule.ts +++ b/server/private/routers/alertRule/testAlertRule.ts @@ -22,28 +22,16 @@ import createHttpError from "http-errors"; import { z } from "zod"; import { fromError } from "zod-validation-error"; import type { TriggerSiteAlertResponse } from "../alertEvents"; +import { + HC_EVENT_TYPES, + SITE_EVENT_TYPES, + RESOURCE_EVENT_TYPES +} from "./createAlertRule"; const paramsSchema = z.strictObject({ orgId: z.string().nonempty() }); -export const SITE_EVENT_TYPES = [ - "site_online", - "site_offline", - "site_toggle" -] as const; -export const HC_EVENT_TYPES = [ - "health_check_healthy", - "health_check_unhealthy", - "health_check_toggle" -] as const; -export const RESOURCE_EVENT_TYPES = [ - "resource_healthy", - "resource_unhealthy", - "resource_degraded", - "resource_toggle" -] as const; - const webhookActionSchema = z.strictObject({ webhookUrl: z.url(), config: z.string().optional(),