From 452c41a75aa2f9036614d677fda3867221db959e Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 21 Jul 2024 15:41:56 -0700 Subject: add a simple email job --- src/publisher/index.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/publisher/index.ts (limited to 'src/publisher') diff --git a/src/publisher/index.ts b/src/publisher/index.ts new file mode 100644 index 0000000..e721160 --- /dev/null +++ b/src/publisher/index.ts @@ -0,0 +1,27 @@ +import type { Duration, Result } from "../util"; + +export enum PublisherType { + DISCORD = "discord", + NTFY = "ntfy", +} + +export interface DiscordPost { + webhook: string; + role_id: string; +} + +export interface NtfyPost { + webhook: string; +} + +export type PublisherPost = DiscordPost | NtfyPost; + +export interface Publisher { + type: PublisherType; + at: Duration; + post: PublisherPost; +} + +export interface ResultPublishable { + publish(testResult: Result): void; +} -- cgit v1.3