diff options
Diffstat (limited to 'src/job.ts')
-rw-r--r-- | src/job.ts | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/job.ts b/src/job.ts deleted file mode 100644 index b1198f8..0000000 --- a/src/job.ts +++ /dev/null @@ -1,37 +0,0 @@ -export interface EmailInstruction { - email: string; - username: string; - password: string; - server: string; -} - -export interface EmailFromInstruction extends EmailInstruction { - send_port: number; -} - -export interface EmailToInstruction extends EmailInstruction { - read_port: number; -} - -export interface EmailJob { - from: EmailFromInstruction; - to: EmailToInstruction; - readRetry: Retry; -} - -export interface Retry { - retries: number; - interval: number; -} - -export const redact = <T extends EmailInstruction>(instruction: T): T => ({ - ...instruction, - password: "REDACTED", - username: "REDACTED", -}); - -export const redactJob = (job: EmailJob): EmailJob => ({ - ...job, - from: redact(job.from), - to: redact(job.to), -}); |