Files
homarr/packages/integrations/src/ntfy/ntfy-schema.ts
T
2025-06-23 19:40:49 +02:00

13 lines
392 B
TypeScript

import { z } from "zod";
// There are more properties, see: https://docs.ntfy.sh/subscribe/api/#json-message-format
// Not all properties are required for this use case.
export const ntfyNotificationSchema = z.object({
id: z.string(),
time: z.number(),
event: z.string(), // we only care about "message"
topic: z.string(),
title: z.optional(z.string()),
message: z.string(),
});