New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tm-notification

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tm-notification

This is the package exposing methods for the notification service

latest
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

tm-notification

tm-notification - This is the package exposing methods for the notification service

Installation

"dependencies": {
  "tm-notification": "~1.0.7" // see the "releases" section
}

npm install tm-notification

Requirements

  • ENV
APP_NAME=tm-notification-package
API_GATEWAY_URL=
NOTIFICATION_SERVICE_URL= //internal microservice
CLIENT_ID=  

###Send SMS

const {SMSBuilder} = require('tm-notification');
const smsBuilder = new SMSBuilder();
const builder = smsBuilder.startBuild()
            .setRecipients("0703XXXXXXX")
            .setProvider("smpp")
            .setMessage("Test message")
            .setSender("TM30");

        const response = await builder.send();
        console.log("Response", response);
    //Response { data: 'Email Sent' }

Send Email

  • To send Email
const {EmailBuilder} = require('tm-notification');
const emailBuilder = new EmailBuilder();
const builder = emailBuilder.startBuild()
    .setProvider("sendgrid")
    .setFrom("package@tm30.net")
    .setSubject("From Test Package")
    .setProvider("sendgrid")
    .setRecipients("michealakinwonmi@gmail.com");

builder.setHeader()
    .setTitle("Header Title")
    // .setBGColor("green")
    .setAppLogo("https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png")
    .setAppUrl("https://tm30.net")
    .setAppName("TM30");


builder.setBody()
    .setContent("This is a content")
    .setGreeting("Greetings,")
    .setIntroLine([
        "intro line 1",
        "intro line 2"
    ])
    .setOutroLine([
        "outroline 1",
        "outroline 2"
    ]);

builder.setAttachments([
    "https://res.cloudinary.com/tm30global/image/upload/v1582900669/4bb79409937716d8db9855e49cc7a9b6.pdf"
]);
const response = await builder.send();
console.log("Response", response); //    Response { data: 'Email Sent' }     




Tests

Cli

npm install
npm test

Contributors

  • Micheal Akinwonmi

Keywords

tm-notification

FAQs

Package last updated on 09 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts