npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adrashya-sms

v3.0.3

Published

A Multi SMS Gateways supported solution for Nodejs.

Downloads

3

Readme

Adrashya SMS

Priority Based Multi SMS Gateways supported. The list of supported SMS Gateways is here

  1. Kaleyra
  2. Innovis Solutions
  3. Uengage
  4. Bulk Software

Installation

Use the package manager npm to install adrashya-sms.

npm install adrashya-sms

Usage

# update .env with these keys

# For Kaleyra Gateway
KALEYRA_API_KEY='YOUR API KEY'
KALEYRA_SENDER_ID='YOUR SENDER ID'
KALEYRA_TEMPLATE_ID='YOUR TEMPLATE ID'
KALEYRA_SOURCE='API'
KALEYRA_TYPE='DEFAULT'
KALEYRA_SENDER='Your Sender'

# For Innovis Gateway
INNUVIS_API_KEY='YOUR API KEY'
INNUVIS_SENDER_ID='YOUR SENDER ID'
INNUVIS_TEMPLATE_ID='YOUR TEMPLATE ID'
INNUVIS_ROUTE='2'
INNUVIS_CHANNEL='Trans'
INNUVIS_PEID='Your PeID'

# For Uengage Gateway
UENGAGE_API_KEY='YOUR API KEY'
UENGAGE_SENDER_ID='YOUR SENDER ID'
UENGAGE_TEMPLATE_ID='YOUR TEMPLATE ID'
const SMS = require('adrashya-sms');
const sms = new SMS();

async function sendSms(){
   sms.priority(['kaleyra', 'innovis', 'uengage']);
   sms.to(<10 digit mobile no>);

   // setting kaleyra params
   sms.kaleyra().message('Your OTP is 123456.');

   // setting innovis params
   sms.innovis().message('Your OTP is 123456.');

   // setting uengage params
   sms.uengage().params(['123456']);

   const response = await sms.send();

   if(response.success){
     // do stuff if message sent
     console.log(response.message);
   }else{
     // do stuff if message failed
     console.log(response.message);
   }
}

Kaleyra (Parameters and Variables)

  • sms.kaleyra().message(); // required ( similar to template )
  • sms.kaleyra().apiKey(); // optional if KALEYRA_API_KEY is set in env
  • sms.kaleyra().senderId(); // optional if KALEYRA_SENDER_ID is set in env
  • sms.kaleyra().templateId(); // optional if KALEYRA_TEMPLATE_ID is set in env
  • sms.kaleyra().type(); // optional if KALEYRA_TYPE is set in env
  • sms.kaleyra().sender(); // optional if KALEYRA_SENDER is set in env

Innuvis (Parameters and Variables)

  • sms.innuvis().message(); // required ( similar to template )
  • sms.innuvis().apiKey(); // optional if INNUVIS_API_KEY is set in env
  • sms.innuvis().senderId(); // optional if INNUVIS_SENDER_ID is set in env
  • sms.innuvis().templateId(); // optional if INNUVIS_TEMPLATE_ID is set in env

Uengage (Parameters and Variables)

  • sms.uengage().params([]); // required ( params for template )
  • sms.uengage().apiKey(); // optional if UENGAGE_API_KEY is set in env
  • sms.uengage().senderId(); // optional if UENGAGE_SENDER_ID is set in env
  • sms.uengage().templateId(); // optional if UENGAGE_TEMPLATE_ID is set in env

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT