You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

whatsapp-api-js

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whatsapp-api-js - npm Package Compare versions

Comparing version

to
6.0.0

lib/middleware/azure.d.ts

25

lib/emitters.d.ts

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

import type { ClientMessage, ClientMessageRequest, ServerMessage, ServerMessageResponse, ServerConversation, ServerPricing, ServerError, PostData } from "./types.d.ts";
import type { ClientMessage, ClientMessageRequest, ClientTypingIndicators, ServerMessage, ServerMessageResponse, ServerConversation, ServerPricing, ServerError, PostData } from "./types.d.ts";
import type { WhatsAppAPI } from "./index.d.ts";

@@ -36,3 +36,3 @@ import type { MaybePromise } from "./utils.d.ts";

/**
* The message id, undefined if parsed is set to false
* The message id
*/

@@ -42,10 +42,10 @@ id?: string;

* If true, the message send was delayed until quality can be validated and it will
* either be sent or dropped at this point. Undefined if parsed is set to false or
* the message_status property is not present in the response.
* either be sent or dropped at this point. Undefined if the message_status property
* is not present in the response.
*/
held_for_quality_assessment?: boolean;
/**
* The parsed response from the server, undefined if parsed is set to false
* The response from the server
*/
response?: ServerMessageResponse;
response: ServerMessageResponse;
/**

@@ -103,2 +103,15 @@ * Utility function for offloading code from the main thread,

/**
* Mark the received message as read, and optionally display a typing indicator
*
* @param indicator - The type of reply indicator
* @returns The {@link WhatsAppAPI.markAsRead} return value
*/
received: (indicator?: ClientTypingIndicators) => ReturnType<WhatsAppAPI["markAsRead"]>;
/**
* Block the user who sent the message
*
* @returns The {@link WhatsAppAPI.blockUser} return value
*/
block: () => ReturnType<WhatsAppAPI["blockUser"]>;
/**
* Utility function for offloading code from the main thread,

@@ -105,0 +118,0 @@ * useful for long running tasks such as AI generation

/** @module WhatsAppAPI */
import { ClientMessage, type WhatsAppAPIConstructorArguments, type PostData, type GetParams, type ServerMessageResponse, type ServerMarkAsReadResponse, type ServerCreateQRResponse, type ServerRetrieveQRResponse, type ServerUpdateQRResponse, type ServerDeleteQRResponse, type ServerMediaRetrieveResponse, type ServerMediaUploadResponse, type ServerMediaDeleteResponse } from "./types.js";
import { ClientMessage, type WhatsAppAPIConstructorArguments, type PostData, type GetParams, type ClientTypingIndicators, type ServerMessageResponse, type ServerMarkAsReadResponse, type ServerCreateQRResponse, type ServerRetrieveQRResponse, type ServerUpdateQRResponse, type ServerDeleteQRResponse, type ServerMediaRetrieveResponse, type ServerMediaUploadResponse, type ServerMediaDeleteResponse, type ServerBlockResponse, type ServerUnblockResponse } from "./types.js";
import type { OnMessage, OnSent, OnStatus } from "./emitters.d.ts";

@@ -36,6 +36,2 @@ /**

/**
* If true, API operations will return the fetch promise instead. Intended for low level debugging.
*/
private parsed;
/**
* If false, the API will be used in a less secure way, removing the need for appSecret. Defaults to true.

@@ -94,3 +90,3 @@ */

*/
constructor({ token, appSecret, webhookVerifyToken, v, parsed, secure, ponyfill }: WhatsAppAPIConstructorArguments);
constructor({ token, appSecret, webhookVerifyToken, v, secure, ponyfill }: WhatsAppAPIConstructorArguments);
/**

@@ -123,3 +119,3 @@ * Send a Whatsapp message

*/
sendMessage(phoneID: string, to: string, message: ClientMessage, context?: string, biz_opaque_callback_data?: string): Promise<ServerMessageResponse | Response>;
sendMessage(phoneID: string, to: string, message: ClientMessage, context?: string, biz_opaque_callback_data?: string): Promise<ServerMessageResponse>;
/**

@@ -197,9 +193,12 @@ * Send a Whatsapp message to multiple phone numbers.

/**
* Mark a message as read
* Mark a message as read, and optionally include a reply indicator
*
* @see https://developers.facebook.com/docs/whatsapp/cloud-api/typing-indicators
*
* @param phoneID - The bot's phone ID
* @param messageId - The message ID
* @param indicator - The type of reply indicator
* @returns The server response
*/
markAsRead(phoneID: string, messageId: string): Promise<ServerMarkAsReadResponse | Response>;
markAsRead(phoneID: string, messageId: string, indicator?: ClientTypingIndicators): Promise<ServerMarkAsReadResponse>;
/**

@@ -213,3 +212,3 @@ * Generate a QR code for sharing the bot

*/
createQR(phoneID: string, message: string, format?: "png" | "svg"): Promise<ServerCreateQRResponse | Response>;
createQR(phoneID: string, message: string, format?: "png" | "svg"): Promise<ServerCreateQRResponse>;
/**

@@ -222,3 +221,3 @@ * Get one or many QR codes of the bot

*/
retrieveQR(phoneID: string, id?: string): Promise<ServerRetrieveQRResponse | Response>;
retrieveQR(phoneID: string, id?: string): Promise<ServerRetrieveQRResponse>;
/**

@@ -232,3 +231,3 @@ * Update a QR code of the bot

*/
updateQR(phoneID: string, id: string, message: string): Promise<ServerUpdateQRResponse | Response>;
updateQR(phoneID: string, id: string, message: string): Promise<ServerUpdateQRResponse>;
/**

@@ -241,3 +240,3 @@ * Delete a QR code of the bot

*/
deleteQR(phoneID: string, id: string): Promise<ServerDeleteQRResponse | Response>;
deleteQR(phoneID: string, id: string): Promise<ServerDeleteQRResponse>;
/**

@@ -252,3 +251,3 @@ * Get a Media object data with an ID

*/
retrieveMedia(id: string, phoneID?: string): Promise<ServerMediaRetrieveResponse | Response>;
retrieveMedia(id: string, phoneID?: string): Promise<ServerMediaRetrieveResponse>;
/**

@@ -317,3 +316,3 @@ * Upload a Media to the API server

*/
uploadMedia(phoneID: string, form: unknown, check?: boolean): Promise<ServerMediaUploadResponse | Response>;
uploadMedia(phoneID: string, form: unknown, check?: boolean): Promise<ServerMediaUploadResponse>;
/**

@@ -349,4 +348,26 @@ * Get a Media fetch from an url.

*/
deleteMedia(id: string, phoneID?: string): Promise<ServerMediaDeleteResponse | Response>;
deleteMedia(id: string, phoneID?: string): Promise<ServerMediaDeleteResponse>;
/**
* Block a user from sending messages to the bot
*
* The block API has 2 restrictions:
* - You can only block users that have messaged your business in the last 24 hours
* - You can only block up to 64k users
*
* @param phoneID - The bot's phone ID from which to block
* @param users - The user phone numbers to block (the API doesn't fail if it's empty)
* @returns The server response
*/
blockUser(phoneID: string, ...users: string[]): Promise<ServerBlockResponse>;
/**
* Unblock a user from the bot's block list
*
* @remarks Contrary to blocking, unblocking isn't restricted by the 24 hours rule
*
* @param phoneID - The bot's phone ID from which to unblock
* @param users - The user phone numbers to unblock (the API doesn't fail if it's empty)
* @returns The server response
*/
unblockUser(phoneID: string, ...users: string[]): Promise<ServerUnblockResponse>;
/**
* POST helper, must be called inside the post function of your code.

@@ -353,0 +374,0 @@ * When setting up the webhook, only subscribe to messages. Other subscritions support might be added later.

@@ -44,6 +44,2 @@ import {

/**
* If true, API operations will return the fetch promise instead. Intended for low level debugging.
*/
parsed;
/**
* If false, the API will be used in a less secure way, removing the need for appSecret. Defaults to true.

@@ -104,3 +100,2 @@ */

v,
parsed = true,
secure = true,

@@ -134,3 +129,2 @@ ponyfill = {}

}
this.parsed = !!parsed;
}

@@ -186,3 +180,4 @@ //#region Message Operations

);
const response = this.parsed ? await (await promise).json() : void 0;
const response = await this.getBody(promise);
const has_msg = "messages" in response;
const args = {

@@ -194,4 +189,4 @@ phoneID,

request,
id: response ? "messages" in response ? response.messages[0].id : void 0 : void 0,
held_for_quality_assessment: response ? "messages" in response ? "message_status" in response.messages[0] ? response.messages[0].message_status === "held_for_quality_assessment" : void 0 : void 0 : void 0,
id: has_msg ? response.messages[0].id : void 0,
held_for_quality_assessment: has_msg ? "message_status" in response.messages[0] ? response.messages[0].message_status === "held_for_quality_assessment" : void 0 : void 0,
response,

@@ -243,9 +238,12 @@ offload: WhatsAppAPI.offload,

/**
* Mark a message as read
* Mark a message as read, and optionally include a reply indicator
*
* @see https://developers.facebook.com/docs/whatsapp/cloud-api/typing-indicators
*
* @param phoneID - The bot's phone ID
* @param messageId - The message ID
* @param indicator - The type of reply indicator
* @returns The server response
*/
async markAsRead(phoneID, messageId) {
async markAsRead(phoneID, messageId, indicator) {
const promise = this.$$apiFetch$$(

@@ -261,3 +259,4 @@ `https://graph.facebook.com/${this.v}/${phoneID}/messages`,

status: "read",
message_id: messageId
message_id: messageId,
typing_indicator: indicator ? { type: indicator } : void 0
})

@@ -515,2 +514,56 @@ }

}
// #endregion
// #region Block Operations
/**
* Block a user from sending messages to the bot
*
* The block API has 2 restrictions:
* - You can only block users that have messaged your business in the last 24 hours
* - You can only block up to 64k users
*
* @param phoneID - The bot's phone ID from which to block
* @param users - The user phone numbers to block (the API doesn't fail if it's empty)
* @returns The server response
*/
async blockUser(phoneID, ...users) {
const promise = this.$$apiFetch$$(
`https://graph.facebook.com/${phoneID}/block_users`,
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
messaging_product: "whatsapp",
block_users: users.map((user) => ({ user }))
})
}
);
return this.getBody(promise);
}
/**
* Unblock a user from the bot's block list
*
* @remarks Contrary to blocking, unblocking isn't restricted by the 24 hours rule
*
* @param phoneID - The bot's phone ID from which to unblock
* @param users - The user phone numbers to unblock (the API doesn't fail if it's empty)
* @returns The server response
*/
async unblockUser(phoneID, ...users) {
const promise = this.$$apiFetch$$(
`https://graph.facebook.com/${phoneID}/block_users`,
{
method: "DELETE",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
messaging_product: "whatsapp",
block_users: users.map((user) => ({ user }))
})
}
);
return this.getBody(promise);
}
async post(data, raw_body, signature) {

@@ -547,2 +600,4 @@ if (this.secure) {

),
received: (i) => this.markAsRead(phoneID, message.id, i),
block: () => this.blockUser(phoneID, from),
offload: WhatsAppAPI.offload,

@@ -698,3 +753,3 @@ Whatsapp: this

async getBody(promise) {
return this.parsed ? await (await promise).json() : promise;
return (await promise).json();
}

@@ -701,0 +756,0 @@ /**

@@ -600,9 +600,16 @@ import { ClientMessage, ClientLimitedMessageComponent, Section, type InteractiveAction } from "../types.js";

* The Flow parameters
*
* @remarks TSDoc is unable to document this type properly, so most of
* the documentation is in the subclasses constructors instead.
*/
readonly parameters: {
/**
* Unique ID of the Flow provided by WhatsApp
*/
flow_id?: string | never;
/**
* Flow name provided by the business as an alternative to flow_id
*/
flow_name?: string | never;
/**
* The Flow can be in either draft or published mode
*
* Defaults to API decision if not provided ("published")
*/

@@ -616,2 +623,4 @@ mode?: "published" | "draft";

* Flow token that is generated by the business to serve as an identifier
*
* Defaults to API decision if not provided
*/

@@ -624,7 +633,9 @@ flow_token?: string;

/**
* The Flow type, if set to "navigate", flow_action_payload must be provided default to "navigate"
* The Flow type. If set to "navigate", flow_action_payload must be provided.
*
* Defaults to API decision if not provided ("navigate")
*/
flow_action?: "navigate" | "data_exchange";
/**
* Required if flow_action is "navigate", should be omitted otherwise
* Required if flow_action is "navigate", must be omitted otherwise
*/

@@ -640,3 +651,3 @@ flow_action_payload?: {

data?: unknown;
};
} | never;
} & ({

@@ -652,11 +663,5 @@ flow_action?: "navigate";

}) & ({
/**
* Unique ID of the Flow provided by WhatsApp
*/
flow_id: string;
flow_name?: never;
} | {
/**
* Flow name provided by the business as an alternative to flow_id
*/
flow_name: string;

@@ -673,2 +678,4 @@ flow_id?: never;

*
* @note flow_message_version defaults to "3"
*
* @param parameters - The Flow parameters

@@ -683,4 +690,45 @@ * @throws If parameters.flow_cta is empty or over 20 characters

*
* @deprecated Use {@link ActionFlow} instead
* @group Interactive
*/
export declare class ActionNavigateFlow extends ActionFlow {
/**
* Builds a navigate flow component for an Interactive message
*
* @param flow_token - Flow token that is generated by the business to serve as an identifier
* @param flow_id - ID of the Flow provided by WhatsApp
* @param flow_cta - Text on the CTA button, character limit - 20 characters (no emoji)
* @param screen - The ID of the first Screen
* @param data - Optional input data for the first Screen of the Flow. If provided, this must be a non-empty object.
* @param mode - The Flow can be in either "draft" or "published" mode
* @param flow_message_version - The Flow version, must be "3"
* @throws If flow_cta is empty or over 20 characters
* @throws If flow_cta contains emojis
* @throws If data is provided and is an empty object
*/
constructor(flow_token: string, flow_id: string, flow_cta: string, screen: string, data?: unknown, mode?: "published" | "draft", flow_message_version?: "3");
}
/**
* Action API object
*
* @deprecated Use {@link ActionFlow} instead
* @group Interactive
*/
export declare class ActionDataExchangeFlow extends ActionFlow {
/**
* Builds a data exchange flow component for an Interactive message
*
* @param flow_token - Flow token that is generated by the business to serve as an identifier
* @param flow_id - ID of the Flow provided by WhatsApp
* @param flow_cta - Text on the CTA button, character limit - 20 characters (no emoji)
* @param mode - Must be "published" or "draft"
* @param flow_message_version - Must be "3"
*/
constructor(flow_token: string, flow_id: string, flow_cta: string, mode?: "published" | "draft", flow_message_version?: "3");
}
/**
* Action API object
*
* @group Interactive
*/
export declare class ActionLocation implements InteractiveAction {

@@ -687,0 +735,0 @@ /**

@@ -435,5 +435,2 @@ import {

* The Flow parameters
*
* @remarks TSDoc is unable to document this type properly, so most of
* the documentation is in the subclasses constructors instead.
*/

@@ -451,2 +448,4 @@ parameters;

*
* @note flow_message_version defaults to "3"
*
* @param parameters - The Flow parameters

@@ -459,3 +458,2 @@ * @throws If parameters.flow_cta is empty or over 20 characters

flow_message_version: "3",
flow_action: "navigate",
...parameters

@@ -469,3 +467,3 @@ };

}
if (parameters.flow_action === "navigate" && !Object.keys(parameters.flow_action_payload).length) {
if (parameters.flow_action === "navigate" && parameters.flow_action_payload.data && !Object.keys(parameters.flow_action_payload.data).length) {
throw new Error(

@@ -478,2 +476,53 @@ "Flow data must be a non-empty object when flow_action is navigate"

}
class ActionNavigateFlow extends ActionFlow {
/**
* Builds a navigate flow component for an Interactive message
*
* @param flow_token - Flow token that is generated by the business to serve as an identifier
* @param flow_id - ID of the Flow provided by WhatsApp
* @param flow_cta - Text on the CTA button, character limit - 20 characters (no emoji)
* @param screen - The ID of the first Screen
* @param data - Optional input data for the first Screen of the Flow. If provided, this must be a non-empty object.
* @param mode - The Flow can be in either "draft" or "published" mode
* @param flow_message_version - The Flow version, must be "3"
* @throws If flow_cta is empty or over 20 characters
* @throws If flow_cta contains emojis
* @throws If data is provided and is an empty object
*/
constructor(flow_token, flow_id, flow_cta, screen, data, mode = "published", flow_message_version = "3") {
super({
mode,
flow_message_version,
flow_token,
flow_id,
flow_cta,
flow_action: "navigate",
flow_action_payload: {
screen,
data
}
});
}
}
class ActionDataExchangeFlow extends ActionFlow {
/**
* Builds a data exchange flow component for an Interactive message
*
* @param flow_token - Flow token that is generated by the business to serve as an identifier
* @param flow_id - ID of the Flow provided by WhatsApp
* @param flow_cta - Text on the CTA button, character limit - 20 characters (no emoji)
* @param mode - Must be "published" or "draft"
* @param flow_message_version - Must be "3"
*/
constructor(flow_token, flow_id, flow_cta, mode = "published", flow_message_version = "3") {
super({
mode,
flow_message_version,
flow_token,
flow_id,
flow_cta,
flow_action: "data_exchange"
});
}
}
class ActionLocation {

@@ -496,5 +545,7 @@ /**

ActionCatalog,
ActionDataExchangeFlow,
ActionFlow,
ActionList,
ActionLocation,
ActionNavigateFlow,
ActionProduct,

@@ -501,0 +552,0 @@ ActionProductList,

@@ -16,2 +16,3 @@ import type { WhatsAppAPIConstructorArguments } from "../types.d.ts";

*
* @deprecated Node 18 reached EoL and is no longer supported by the library
* @param settings - The WhatsAppAPI arguments

@@ -18,0 +19,0 @@ * @returns A WhatsAppAPI arguments object for Node\@^18

@@ -11,3 +11,3 @@ /**

import type { AtLeastOne } from "./utils.d.ts";
export declare const DEFAULT_API_VERSION = "v21.0";
export declare const DEFAULT_API_VERSION = "v24.0";
/**

@@ -68,7 +68,2 @@ * The main constructor arguments for the API

/**
* Whether to return a pre-processed response from the API or the raw fetch response.
* Intended for low level debugging.
*/
parsed?: boolean;
/**
* If set to false, none of the API checks will be performed, and it will be used in a less secure way.

@@ -269,2 +264,3 @@ *

export type ClientMessageNames = "text" | "audio" | "document" | "image" | "sticker" | "video" | "location" | "contacts" | "interactive" | "template" | "reaction";
export type ClientTypingIndicators = "text";
export type ClientMessageRequest = {

@@ -471,11 +467,11 @@ /**

body?: string;
response_json: unknown;
response_json: string;
} | {
name: "flow";
body: "Sent";
response_json: unknown;
response_json: string;
} | {
name?: string;
body?: string;
response_json: unknown;
response_json: string;
};

@@ -519,4 +515,12 @@ button_reply: never;

body: string;
identity: string;
/**
* @deprecated Since v12.0 it is undefined, use `wa_id` instead.
*
* I'm actually stunned this exists, since I started the library with v13 or 14.
*/
new_wa_id: number | string;
type: string | "user_changed_number";
wa_id: string;
type: "customer_changed_number" | "customer_identity_changed" | string;
customer: string;
};

@@ -587,3 +591,3 @@ };

export type ServerPricing = {
pricing_model: "CBP";
pricing_model: "PMP";
/**

@@ -593,3 +597,4 @@ * @deprecated Since v16 with the release of the new pricing model

billable?: boolean;
category: ServerInitiation;
type: "regular" | "free_customer_service" | "free_entry_point";
category: ServerInitiation | "authentication_international" | "marketing_lite";
};

@@ -639,3 +644,3 @@ export type ServerConversation = {

} & ({
conversation: ServerConversation;
conversation?: ServerConversation;
pricing: ServerPricing;

@@ -671,7 +676,7 @@ errors: undefined;

export type NoServerError = {
error: never;
error?: never;
};
export type ServerSuccessResponse = {
success: true;
} | NoServerError;
} & NoServerError;
export type ServerSentMessageResponse = {

@@ -692,3 +697,3 @@ messaging_product: "whatsapp";

};
export type ServerMessageResponse = (ServerSentMessageResponse | NoServerError) | ServerErrorResponse;
export type ServerMessageResponse = (ServerSentMessageResponse & NoServerError) | ServerErrorResponse;
export type ServerMarkAsReadResponse = ServerSuccessResponse | ServerErrorResponse;

@@ -701,7 +706,7 @@ export type ServerQR = {

};
export type ServerCreateQRResponse = (ServerQR | NoServerError) | ServerErrorResponse;
export type ServerCreateQRResponse = (ServerQR & NoServerError) | ServerErrorResponse;
export type ServerRetrieveQRResponse = ({
data: ServerQR[];
} | NoServerError) | ServerErrorResponse;
export type ServerUpdateQRResponse = (ServerQR | NoServerError) | ServerErrorResponse;
} & NoServerError) | ServerErrorResponse;
export type ServerUpdateQRResponse = (ServerQR & NoServerError) | ServerErrorResponse;
export type ServerDeleteQRResponse = ServerSuccessResponse | ServerErrorResponse;

@@ -711,5 +716,5 @@ export type ServerMedia = {

};
export type ServerMediaUploadResponse = (ServerMedia | NoServerError) | ServerErrorResponse;
export type ServerMediaUploadResponse = (ServerMedia & NoServerError) | ServerErrorResponse;
export type ValidMimeTypes = "audio/aac" | "audio/mp4" | "audio/mpeg" | "audio/amr" | "audio/ogg" | "text/plain" | "application/pdf" | "application/vnd.ms-powerpoint" | "application/msword" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "image/jpeg" | "image/png" | "video/mp4" | "video/3gp" | "image/webp";
export type ServerMediaRetrieveResponse = (({
export type ServerMediaRetrieveResponse = ({
messaging_product: "whatsapp";

@@ -720,4 +725,33 @@ url: string;

file_size: string;
} & ServerMedia) | NoServerError) | ServerErrorResponse;
} & ServerMedia & NoServerError) | ServerErrorResponse;
export type ServerMediaDeleteResponse = ServerSuccessResponse | ServerErrorResponse;
export type ServerBlockedError = Pick<ServerErrorResponse["error"], "message" | "type" | "code"> & {
error_data: {
details: string;
};
};
export type ServerBlockedUser = {
input: string;
wa_id: string;
};
export type ServerBlockFailedUser = {
input: string;
errors: Omit<ServerBlockedError, "type">[];
};
export type ServerBlockResponse = {
messaging_product: "whatsapp";
block_users: {
added_users: ServerBlockedUser[];
failed_users?: ServerBlockFailedUser[];
};
errors?: ServerBlockedError;
} | ServerErrorResponse;
export type ServerUnblockResponse = {
messaging_product: "whatsapp";
block_users: {
removed_users: ServerBlockedUser[];
failed_users?: ServerBlockFailedUser[];
};
errors?: ServerBlockedError;
} | ServerErrorResponse;
//# sourceMappingURL=types.d.ts.map

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

const DEFAULT_API_VERSION = "v21.0";
const DEFAULT_API_VERSION = "v24.0";
class ClientMessage {

@@ -3,0 +3,0 @@ }

{
"name": "whatsapp-api-js",
"version": "6.0.0-beta.0",
"version": "6.0.0",
"author": "Secreto31126",

@@ -20,11 +20,14 @@ "description": "A TypeScript server agnostic Whatsapp's Official API framework",

"types": "./lib/index.d.ts",
"import": "./lib/index.js"
"import": "./lib/index.js",
"require": "./lib/index.js"
},
"./messages": {
"types": "./lib/messages/index.d.ts",
"import": "./lib/messages/index.js"
"import": "./lib/messages/index.js",
"require": "./lib/messages/index.js"
},
"./messages/*": {
"types": "./lib/messages/*.d.ts",
"import": "./lib/messages/*.js"
"import": "./lib/messages/*.js",
"require": "./lib/messages/*.js"
},

@@ -35,3 +38,4 @@ "./setup": null,

"types": "./lib/setup/*.d.ts",
"import": "./lib/setup/*.js"
"import": "./lib/setup/*.js",
"require": "./lib/setup/*.js"
},

@@ -42,3 +46,4 @@ "./middleware": null,

"types": "./lib/middleware/*.d.ts",
"import": "./lib/middleware/*.js"
"import": "./lib/middleware/*.js",
"require": "./lib/middleware/*.js"
},

@@ -50,7 +55,9 @@ "./emitters": {

"types": "./lib/types.d.ts",
"import": "./lib/types.js"
"import": "./lib/types.js",
"require": "./lib/types.js"
},
"./errors": {
"types": "./lib/errors.d.ts",
"import": "./lib/errors.js"
"import": "./lib/errors.js",
"require": "./lib/errors.js"
}

@@ -99,3 +106,3 @@ },

"build:types": "tsc",
"build:types:dev": "npm run build:types",
"build:types:dev": "tsc --noCheck",
"build:standalone": "esbuild src/standalone.ts --outfile=lib/standalone.js --bundle --platform=neutral --target=node10 --minify-syntax",

@@ -141,26 +148,26 @@ "test": "node --test --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=spec --test-reporter-destination=stdout",

"devDependencies": {
"@adonisjs/http-server": "7.4.0",
"@eslint/js": "9.17.0",
"@adonisjs/http-server": "7.7.0",
"@azure/functions": "^4.7.0",
"@eslint/js": "9.30.0",
"@reporters/github": "1.7.2",
"@reporters/silent": "1.2.7",
"@types/eslint__js": "8.42.3",
"@types/express": "5.0.0",
"@types/node": "18.19.68",
"@vercel/node": "5.0.0",
"@types/express": "5.0.3",
"@types/node": "18.19.113",
"@vercel/node": "5.3.0",
"all-contributors-cli": "6.26.1",
"c8": "10.1.3",
"dotenv": "16.4.7",
"esbuild": "0.24.2",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"dotenv": "17.0.0",
"esbuild": "0.25.5",
"eslint": "9.30.0",
"eslint-config-prettier": "10.1.5",
"eslint-plugin-tsdoc": "0.4.0",
"glob": "11.0.0",
"globals": "15.14.0",
"prettier": "3.4.2",
"sinon": "19.0.2",
"typedoc": "0.27.6",
"typescript": "5.7.2",
"typescript-eslint": "8.19.0",
"undici": "7.2.0"
"glob": "11.0.3",
"globals": "16.2.0",
"prettier": "3.6.2",
"sinon": "21.0.0",
"typedoc": "0.28.7",
"typescript": "5.8.3",
"typescript-eslint": "8.35.1",
"undici": "7.11.0"
}
}

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

# whatsapp-api-js v5
# whatsapp-api-js v6

@@ -10,3 +10,3 @@ [![npm](https://img.shields.io/npm/v/whatsapp-api-js?color=4ccc1c)](https://www.npmjs.com/package/whatsapp-api-js)

- [whatsapp-api-js v5](#whatsapp-api-js-v5)
- [whatsapp-api-js v6](#whatsapp-api-js-v6)
- [List of contents](#list-of-contents)

@@ -13,0 +13,0 @@ - [Set up](#set-up)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet