aboutsummaryrefslogtreecommitdiff
path: root/src/publisher/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/publisher/index.ts')
-rw-r--r--src/publisher/index.ts27
1 files changed, 27 insertions, 0 deletions
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<boolean, Error>): void;
+}