Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sheilim/shimli-sdk

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sheilim/shimli-sdk - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

24

index.js

@@ -86,2 +86,26 @@ const axios = require('axios');

},
sendWhBusinessApi: (type, body, to, instance, caption = null) => {
return new Promise(async (resolve, reject) => {
if(!config.token){
resolve({
error: true,
txt: 'Configurate Token'
})
}
let data_ = {
"token": config.token,
"type": type,
"body": body,
"to": to,
"instance": instance
};
if(caption)
data_['caption'] = caption;
const result = await connectShimli(
'https://api.shimli.app/v1/whatsapp-api',
data_
);
resolve(result);
})
},
leadInsert: (to, instance, text, channel = 'whatsapp', area = null, agent = null, process = null, tags = null) => {

@@ -88,0 +112,0 @@ return new Promise(async (resolve, reject) => {

2

package.json
{
"name": "@sheilim/shimli-sdk",
"version": "1.0.4",
"version": "1.0.5",
"description": "API for sending WhatsApp, CRM, chatbot and more channels such as Facebook Messenger, Instagram and Telegram",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -59,2 +59,24 @@ # shimli-sdk

## Send WhatsApp Business API
```
const shimli = require('@sheilim/shimli-sdk');
(function(){
shimli.config['token'] = "YOUR_TOKEN";
const result = await sendWhBusinessApi.sendFbMessenger("text", "Hi!! 👋", "14243962506", "ID_INSTANCE");
if(result.error)
console.log(result.message);
else
console.log(result);
})();
```
## Options sendWhBusinessApi
* *type* - _string_ I could be text, image, video, audio, document
* *body* - _string_ Message text or url of the media file to send
* *to* - _string_ WhatsApp number to which the message will be sent
* *instance* - _string_ Id of the instance connected to Shimli
* *caption* - _string_ (optional) Image or video caption
## Add Lead to Shimli

@@ -61,0 +83,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc