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

whatsapp-business

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whatsapp-business - npm Package Compare versions

Comparing version 1.13.0 to 1.14.0

2

dist/package.json
{
"name": "whatsapp-business",
"author": "MarcosNicolau",
"version": "1.13.0",
"version": "1.14.0",
"description": "Node.js connector for the WhatsApp Business APIs with TypeScript support, integration tests and more.",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -40,2 +40,49 @@ import { WABAErrorCodes } from "./error";

};
/**
* When the name is "flow", it indicates a general flow submission.
* Documentation: https://developers.facebook.com/docs/whatsapp/flows/reference/responsemsgwebhook/
*/
export type InteractiveWebhookMessageNfmReplyName = "address_message" | "flow" | string;
export type InteractiveWebhookMessageNfmReply<Name extends InteractiveWebhookMessageNfmReplyName = string> = {
name?: Name;
response_json: string;
} & Name extends "flow" ? {
body: "Sent";
} : {
body?: string;
};
export interface InteractiveWebhookMessageListReply {
/**
* Unique ID of the selected list item.
*/
id: string;
/**
* Title of the selected list item.
*/
title: string;
/**
* Description of the selected list item.
*/
description: string;
}
export interface InteractiveWebhookMessageButtonReply {
/**
* Unique ID of the button.
*/
id: string;
/**
* Title of the button.
*/
title: string;
}
export type InteractiveWebhookMessageObjects = InteractiveWebhookMessageButtonReply | InteractiveWebhookMessageListReply | InteractiveWebhookMessageNfmReply;
export type InteractiveWebhookMessageType = "button_reply" | "list_reply" | "nfm_reply";
interface InteractiveWebhookMessagesMap extends Record<InteractiveWebhookMessageType, InteractiveWebhookMessageObjects> {
button_reply: InteractiveWebhookMessageButtonReply;
list_reply: InteractiveWebhookMessageListReply;
nfm_reply: InteractiveWebhookMessageNfmReply;
}
export type InteractiveWebhookMessage<Type extends InteractiveWebhookMessageType = InteractiveWebhookMessageType> = Pick<InteractiveWebhookMessagesMap, Type> & {
type: Type;
};
type SharedMessageTypes = Exclude<MessageType, "template">;

@@ -183,67 +230,3 @@ /**

*/
interactive?: {
/**
* The type of interactive message that the customer replied to.
*/
type: "button_reply" | "list_reply" | "nfm_reply";
} & ({
type: "button_reply";
/**
* Sent when a customer clicks a button.
*/
button_reply: {
/**
* Unique ID of the button.
*/
id: string;
/**
* Title of the button.
*/
title: string;
};
} | {
type: "list_reply";
/**
* Sent when a customer selects an item from a list.
*/
list_reply: {
/**
* Unique ID of the selected list item.
*/
id: string;
/**
* Title of the selected list item.
*/
title: string;
/**
* Description of the selected list item.
*/
description: string;
};
} | {
type: "nfm_reply";
/**
* Sent when a user submits a flow.
*/
nfm_reply: {
name: "address_message";
body?: string;
response_json: string;
} | {
/**
* Indicates a general flow submission.
* Documentation: https://developers.facebook.com/docs/whatsapp/flows/reference/responsemsgwebhook/
*/
name: "flow";
/**
* Body text indicating the flow was sent.
*/
body: "Sent";
response_json: string;
} | {
name?: string;
body?: string;
response_json: string;
};
});
interactive?: InteractiveWebhookMessage;
/**

@@ -427,2 +410,3 @@ * When the messages type field is set to location, this object is included in the messages object:

timestamp: string;
errors: Array<WebhookError>;
};

@@ -429,0 +413,0 @@ export type WebhookMetadata = {

{
"name": "whatsapp-business",
"author": "MarcosNicolau",
"version": "1.13.0",
"version": "1.14.0",
"description": "Node.js connector for the WhatsApp Business APIs with TypeScript support, integration tests and more.",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

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