New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

whatsapp-nodejs-sdk

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whatsapp-nodejs-sdk - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

17

dist/index.d.ts

@@ -55,2 +55,19 @@ import { AxiosInstance, AxiosResponse } from 'axios';

/**
* Send a template message via WhatsApp.
*
* @param number - The recipient's WhatsApp number.
* @param templateName - The name of the template to send.
* @param templateLanguage - The language of the template to send.
* @param components - The components of the template to send.
* @param messageId - Optional WhatsApp message ID for context.
* @returns {Promise<AxiosResponse<any, any>>} - Returns the response from the WhatsApp API, or throws an error.
*/
sendTemplateMessage(number: string, templateName: string, templateLanguage: string, components: {
type: string;
parameters: {
type: string;
text: string;
}[];
}[], messageId?: string): Promise<AxiosResponse<any, any>>;
/**
* Extract the contact's name from the WhatsApp webhook payload.

@@ -57,0 +74,0 @@ *

@@ -142,2 +142,26 @@ "use strict";

/**
* Send a template message via WhatsApp.
*
* @param number - The recipient's WhatsApp number.
* @param templateName - The name of the template to send.
* @param templateLanguage - The language of the template to send.
* @param components - The components of the template to send.
* @param messageId - Optional WhatsApp message ID for context.
* @returns {Promise<AxiosResponse<any, any>>} - Returns the response from the WhatsApp API, or throws an error.
*/
sendTemplateMessage(number, templateName, templateLanguage, components, messageId) {
return __awaiter(this, void 0, void 0, function* () {
const data = {
template: {
name: templateName,
language: {
code: templateLanguage
},
components,
}
};
return this.sendMessage(number, "template", data, messageId);
});
}
/**
* Extract the contact's name from the WhatsApp webhook payload.

@@ -144,0 +168,0 @@ *

2

dist/types/Message.d.ts

@@ -1,2 +0,2 @@

export type MessageType = "text" | "interactive" | "image" | "document";
export type MessageType = "text" | "interactive" | "image" | "document" | "template";
export type InteractiveMessageType = "button" | "list";

@@ -3,0 +3,0 @@ export type MediaMessageType = "image" | "document";

{
"name": "whatsapp-nodejs-sdk",
"version": "1.0.11",
"version": "1.0.12",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

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