Socket
Socket
Sign inDemoInstall

@sheilim/shimli-sdk

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

6

index.js

@@ -53,8 +53,2 @@ const axios = require('axios');

}
if(message.buttons.length > 3){
return resolve({error: true, txt: 'Only a maximum of 3 items is allowed for buttons'});
}
if(!message.title || !message.footer){
return resolve({error: true, txt: 'You need to send the title and footer variables'});
}
}

@@ -61,0 +55,0 @@ if(message.type == 'lists'){

2

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

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

@@ -12,2 +12,3 @@ # shimli-sdk

## How is it used?
## Send WhatsApp

@@ -21,5 +22,5 @@

const result = await shimli.sendWhatsApp({
"type": "chat",
"body": "Hi!! 👋",
"to": "14243962506",
"type": "chat",
"body": "Hi!! 👋",
"to": "14243962506",
"instance": "ID_INSTANCE"

@@ -35,11 +36,12 @@ });

## Options sendWhatsApp
* *type* - _string_ I could be chat, image, video, audio, location, document, sticker, gif, buttons, lists
* *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
* *filename* - _string_ (optional) Name of the document to send
* *lat* - _string_ Required if it is of type location
* *lng* - _string_ Required if it is of type location
- _type_ - _string_ I could be chat, image, video, audio, location, document, sticker, gif, buttons, lists
- _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
- _filename_ - _string_ (optional) Name of the document to send
- _lat_ - _string_ Required if it is of type location
- _lng_ - _string_ Required if it is of type location
## Send Facebook Messenger

@@ -53,4 +55,4 @@

const result = await shimli.sendFbMessenger({
"type": "text",
"body": "Hi!! 👋",
"type": "text",
"body": "Hi!! 👋",
"to": "PSID",

@@ -67,8 +69,9 @@ "instance": "ID_INSTANCE"

## Options sendFbMessenger
* *type* - _string_ I could be text, image, video, audio, file
* *body* - _string_ Message text or url of the media file to send
* *to* - _string_ PSID
* *instance* - _string_ Id of the instance connected to Shimli
* *caption* - _string_ (optional) Image or video caption
- _type_ - _string_ I could be text, image, video, audio, file
- _body_ - _string_ Message text or url of the media file to send
- _to_ - _string_ PSID
- _instance_ - _string_ Id of the instance connected to Shimli
- _caption_ - _string_ (optional) Image or video caption
## Send WhatsApp Business API

@@ -81,6 +84,6 @@

shimli.config['token'] = "YOUR_TOKEN";
const result = await sendWhBusinessApi.sendFbMessenger({
"type": "text",
"body": "Hi!! 👋",
"to": "14243962506",
const result = await shimli.sendWhBusinessApi({
"type": "text",
"body": "Hi!! 👋",
"to": "14243962506",
"instance": "ID_INSTANCE"

@@ -96,8 +99,9 @@ });

## 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
- _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

@@ -111,4 +115,4 @@

const result = await shimli.leadInsert({
to: "ID_CLIENT",
instance: "ID_INSTANCE",
to: "ID_CLIENT",
instance: "ID_INSTANCE",
text: "Insert Lead! 👋", channel: "whatsapp"

@@ -124,9 +128,10 @@ });

## Options leadInsert
* *to* - _string_ PSID (Facebook Messenger) or WhatsApp number
* *instance* - _string_ Id of the instance connected to Shimli
* *text* - _string_ Lead opening text
* *channel* - _string_ whatsapp or fb-messenger
* *area* - _string_ (optional) Id area Shimli
* *agent* - _string_ (optional) Id agent Shimli
* *process* - _string_ (optional) Id process
* *tags* - _string_ (optional) example ["customer service", "sales"]
- _to_ - _string_ PSID (Facebook Messenger) or WhatsApp number
- _instance_ - _string_ Id of the instance connected to Shimli
- _text_ - _string_ Lead opening text
- _channel_ - _string_ whatsapp or fb-messenger
- _area_ - _string_ (optional) Id area Shimli
- _agent_ - _string_ (optional) Id agent Shimli
- _process_ - _string_ (optional) Id process
- _tags_ - _string_ (optional) example ["customer service", "sales"]
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc