2022-07-18 17:49:42 +02:00
|
|
|
import {Domain, EmailAddress, JSONObject, MonitoringToken, OnlineState, Site, toIsEnum} from "./shared";
|
2022-05-26 13:58:01 +02:00
|
|
|
|
2020-06-30 01:10:18 +02:00
|
|
|
export * from "./config";
|
|
|
|
export * from "./logger";
|
2022-02-22 15:39:39 +01:00
|
|
|
export * from "./shared";
|
2020-06-30 01:10:18 +02:00
|
|
|
|
2020-04-10 00:43:15 +02:00
|
|
|
export type NodeStateData = {
|
2022-05-26 13:58:01 +02:00
|
|
|
site: Site,
|
|
|
|
domain: Domain,
|
|
|
|
state: OnlineState,
|
2020-04-10 00:43:15 +02:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:25:33 +02:00
|
|
|
// TODO: Complete interface / class declaration.
|
2020-04-10 00:43:15 +02:00
|
|
|
export type NodeSecrets = {
|
|
|
|
monitoringToken?: MonitoringToken,
|
|
|
|
};
|
|
|
|
|
2022-07-18 17:49:42 +02:00
|
|
|
export type MailId = number & { readonly __tag: unique symbol };
|
|
|
|
export type MailData = JSONObject;
|
|
|
|
|
|
|
|
export enum MailType {
|
|
|
|
MONITORING_OFFLINE_1 = "monitoring-offline-1",
|
|
|
|
MONITORING_OFFLINE_2 = "monitoring-offline-2",
|
|
|
|
MONITORING_OFFLINE_3 = "monitoring-offline-3",
|
|
|
|
MONITORING_ONLINE_AGAIN = "monitoring-online-again",
|
|
|
|
MONITORING_CONFIRMATION = "monitoring-confirmation",
|
|
|
|
}
|
|
|
|
|
|
|
|
export const isMailType = toIsEnum(MailType);
|
2020-04-10 00:43:15 +02:00
|
|
|
|
|
|
|
export interface Mail {
|
|
|
|
id: MailId,
|
|
|
|
email: MailType,
|
2022-07-18 17:49:42 +02:00
|
|
|
sender: EmailAddress,
|
|
|
|
recipient: EmailAddress,
|
2020-04-10 00:43:15 +02:00
|
|
|
data: MailData,
|
|
|
|
failures: number,
|
2020-04-08 21:25:33 +02:00
|
|
|
}
|
2020-04-10 00:43:15 +02:00
|
|
|
|