diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-07-21 15:41:56 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-07-21 15:41:56 -0700 |
| commit | 452c41a75aa2f9036614d677fda3867221db959e (patch) | |
| tree | 98f2ee2ccd0858a120c5cd618641615f0fc5e026 /src/publisher | |
| download | mon.hatecomputers.club-452c41a75aa2f9036614d677fda3867221db959e.tar.gz mon.hatecomputers.club-452c41a75aa2f9036614d677fda3867221db959e.zip | |
add a simple email job
Diffstat (limited to 'src/publisher')
| -rw-r--r-- | src/publisher/index.ts | 27 |
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; +} |
