File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,22 @@ import nodemailer from 'nodemailer';
33
44// const alert = {};
55
6+ interface SlackSettings {
7+ webhook : any ; // possibly 'string'?
8+ }
9+
10+ interface EmailSettings {
11+ emails : string ;
12+ emailHost : string ;
13+ emailPort : string | number ;
14+ user : string ;
15+ password : string ;
16+ }
17+
18+ interface Alert {
19+ sendSlack : ( code : number , message : string , slackSettings : SlackSettings ) => void ;
20+ sendEmail : ( code : number , message : string , emailSettings : EmailSettings ) => void ;
21+ }
622
723/**
824 * Sends slack notifications to the provided slackurl with the status code
Original file line number Diff line number Diff line change 1- const mongoose = require ( 'mongoose' ) ;
2- const grpc = require ( '@grpc/grpc-js' ) ;
3- const ComModel = require ( '../models/CommunicationModel.ts' ) ;
1+ import mongoose from 'mongoose' ;
2+ import grpc from '@grpc/grpc-js' ;
3+ import ComModel from '../models/CommunicationModel' ;
44
55async function connect ( URI ) {
66 try {
@@ -60,4 +60,4 @@ class ClientWrapper {
6060 }
6161}
6262
63- module . exports = ClientWrapper ;
63+ export default ClientWrapper ;
You can’t perform that action at this time.
0 commit comments