Class: MessagingUtils
Defined in: core/src/MessagingUtils.ts:77
Simple utility class for sending templated messages via e-mail, SMS and more.
Constructors
Constructor
new MessagingUtils():
MessagingUtils
Returns
MessagingUtils
Properties
slackApps
protectedslackApps:any[] =[]
Defined in: core/src/MessagingUtils.ts:78
slackConfigs
protectedslackConfigs:any[] =[]
Defined in: core/src/MessagingUtils.ts:80
Methods
init()
init():
Promise<void>
Defined in: core/src/MessagingUtils.ts:106
Returns
Promise<void>
loadTemplate()
loadTemplate(
name):Promise<Template>
Defined in: core/src/MessagingUtils.ts:182
Loads the template with the given name and returns its contents as a string.
Parameters
name
string
The name of the template to load.
Returns
Promise<Template>
sendEmail()
sendEmail(
templateName,templateVars,options?):Promise<any>
Defined in: core/src/MessagingUtils.ts:250
Sends an email using the given template name and variables.
Parameters
templateName
string
The name of the email template to send.
templateVars
any
The map of variables to inject into the template.
options?
any = {}
The map of additional options to pass into the sendMail function.
Returns
Promise<any>
sendSlack()
sendSlack(
templateName,templateVars):Promise<any[] |undefined>
Defined in: core/src/MessagingUtils.ts:296
Sends an Slack message using the given template name and variables.
Parameters
templateName
string
The name of the Slack template to send.
templateVars
any
The map of variables to inject into the template.
Returns
Promise<any[] | undefined>
sendSMS()
sendSMS(
templateName,templateVars,options?):Promise<any>
Defined in: core/src/MessagingUtils.ts:330
Sends an SMS using the given template name and variables.
Parameters
templateName
string
The name of the SMS template to send.
templateVars
any
The map of variables to inject into the template.
options?
any = {}
The map of additional options to pass into the sendMail function.
Returns
Promise<any>