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.5.0 to 1.5.1

dist/src/types/languageCodes.d.ts

2

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

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

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

import { SupportedLanguagesCodeUnion } from "./languageCodes";
import { GenerateMappedNever, LiteralUnion } from "./utils";

@@ -161,35 +162,128 @@ export declare type SendMessageResponse = {

export declare type InteractiveActionSection = {
title: string;
/**
* Required for Multi-Product Messages.
* Array of product objects. There is a minimum of 1 product per section and a maximum of 30 products across all sections.
*/
product_items: {
/**
* Unique identifier of the product in a catalog.
*/
product_retailer_id: string;
};
/**
* Required for List Messages.
* Contains a list of rows. You can have a total of 10 rows across your sections.
*/
rows: {
/**
* Maximum length: 200 characters
*/
id: string;
/**
* Maximum length: 24 characters
*/
title: string;
description: string;
/**
* Maximum length: 72 characters
*/
description?: string;
}[];
/**
* Required if the message has more than one section.
* Title of the section.
*
* Maximum length: 24 characters.
*/
title: string;
};
export declare type InteractiveMessageAction = {
/**
* Required for List Messages.
* Button content. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not.
*
* Maximum length: 20 characters.
*/
button: string;
button?: string;
/**
* Required for Reply Buttons.
* You can have up to 3 buttons. You cannot have leading or trailing spaces when setting the ID.
*/
buttons: {
buttons?: {
type: "reply";
title: string;
id: string;
reply: {
/**
* Button title. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not.
*
* Maximum length: 20 characters.
*/
title: string;
/**
* Unique identifier for your button. This ID is returned in the webhook when the button is clicked by the user.
*
* Maximum length: 256 characters.
*/
id: string;
};
}[];
sections: InteractiveActionSection[];
/**
* Required for Single Product Messages and Multi-Product Messages.
* Unique identifier of the Facebook catalog linked to your WhatsApp Business Account. This ID can be retrieved via the Meta Commerce Manager.
*/
catalog_id?: string;
/**
* Required for Single Product Messages and Multi-Product Messages.
* Unique identifier of the product in a catalog.
*
* To get this ID go to Meta Commerce Manager and select your Meta Business account.
*/
product_retailer_id?: string;
/**
* Required for List Messages and Multi-Product Messages.
* Array of section objects. Minimum of 1, maximum of 10/
*/
sections?: InteractiveActionSection[];
};
export declare type InteractiveMessageBody = {
/**
* Required if body is present. The content of the message. Emojis and markdown are supported. Maximum length: 1024 characters.
*/
text: string;
};
export declare type InteractiveMessageFooter = {
/**
* Required if footer is present. The footer content. Emojis, markdown, and links are supported. Maximum length: 60 characters.
*/
text: string;
};
export declare type InteractiveMessageHeader = {
/**
* The header type you would like to use. Supported values:
*
* text: Used for List Messages, Reply Buttons, and Multi-Product Messages.
* video: Used for Reply Buttons.
* image: Used for Reply Buttons.
* document: Used for Reply Buttons.
*/
type: "text" | "video" | "message" | "document";
/**
* Required if type is set to text.
* Text for the header. Formatting allows emojis, but not markdown.
*
* Maximum length: 60 characters.
*/
text?: string;
/**
* Required if type is set to video. Contains the media object for this video.
*/
video?: MediaObject;
/**
* Required if type is set to image.
* Contains the media object for this image.
*/
image?: MediaObject;
/**
* Required if type is set to document.
* Contains the media object for this document.
*/
document?: MediaObject;

@@ -203,6 +297,5 @@ };

/**
* The body of the message. Emojis and markdown are supported.
Maximum length: 1024 characters.
* The body of the message. Optional for type product. Required for other message types.
*/
body: InteractiveMessageBody;
body?: InteractiveMessageBody;
/**

@@ -214,6 +307,7 @@ * The footer of the message. Emojis and markdown are supported.

/**
* Header content displayed on top of a message.
* Required for type product_list. Optional for other types.
* Header content displayed on top of a message. You cannot set a header if your interactive object is of product type.
*/
header?: InteractiveMessageHeader;
type: "list" | "button";
type: "list" | "button" | "product" | "product_list";
};

@@ -299,11 +393,11 @@ export declare type ContactMessage = {

*/
policy: LiteralUnion<"deterministic">;
policy: "deterministic";
/**
* The code of the language or locale to use. Accepts both language and language_locale formats (e.g., en and en_US).
*/
code: string;
code: SupportedLanguagesCodeUnion;
};
export declare type TemplateMessage = {
name: string;
language: string;
language: TemplateMessageLanguage;
components: TemplateMessageComponent[];

@@ -310,0 +404,0 @@ };

{
"name": "whatsapp-business",
"author": "MarcosNicolau",
"version": "1.5.0",
"version": "1.5.1",
"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