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
1
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.4 to 1.0.5

6

dist/index.js

@@ -149,3 +149,3 @@ "use strict";

var _a;
const contact = payload.value.contacts[0];
const contact = payload.entry.changes[0].value.contacts[0];
return ((_a = contact === null || contact === void 0 ? void 0 : contact.profile) === null || _a === void 0 ? void 0 : _a.name) || null;

@@ -161,3 +161,3 @@ }

getContactNumber(payload) {
const message = payload.value.messages[0];
const message = payload.entry.changes[0].value.messages[0];
return (message === null || message === void 0 ? void 0 : message.from) || null;

@@ -173,3 +173,3 @@ }

var _a;
const message = payload.value.messages[0];
const message = payload.entry.changes[0].value.messages[0];
if ((message === null || message === void 0 ? void 0 : message.type) === 'text') {

@@ -176,0 +176,0 @@ return ((_a = message.text) === null || _a === void 0 ? void 0 : _a.body) || null;

@@ -17,24 +17,30 @@ export type MessageType = "text" | "interactive" | "image" | "document";

export interface WhatsAppWebhookPayload {
field: "messages";
value: {
messaging_product: "whatsapp";
metadata: {
display_phone_number: string;
phone_number_id: string;
};
contacts: {
profile: {
name: string;
object: "whatsapp_business_account";
entry: {
id: string;
changes: {
field: "messages";
value: {
messaging_product: "whatsapp";
metadata: {
display_phone_number: string;
phone_number_id: string;
};
contacts: {
profile: {
name: string;
};
wa_id: string;
}[];
messages: {
from: string;
id: string;
timestamp: string;
type: string;
text?: {
body: string;
};
}[];
};
wa_id: string;
}[];
messages: {
from: string;
id: string;
timestamp: string;
type: string;
text?: {
body: string;
};
}[];
};

@@ -41,0 +47,0 @@ }

{
"name": "whatsapp-nodejs-sdk",
"version": "1.0.4",
"version": "1.0.5",
"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