From d815847d3e0237854abcdbbc8e9414e9befb26e1 Mon Sep 17 00:00:00 2001 From: RendyCraft047 <75566525+RC047@users.noreply.github.com> Date: Thu, 20 Nov 2025 18:30:54 +0700 Subject: [PATCH] fix: addition and improvement of enumerable values on types (#3740) * Update index.d.ts * Update Constants.js * fix * `code_received` is missing too * album message types * add to index.d.ts * fix types error --- index.d.ts | 9 +++++++-- src/util/Constants.js | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index b7d01e8..1b6653a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -882,12 +882,14 @@ declare namespace WAWebJS { GROUP_MEMBERSHIP_REQUEST = 'group_membership_request', GROUP_UPDATE = 'group_update', QR_RECEIVED = 'qr', + CODE_RECEIVED = 'code', LOADING_SCREEN = 'loading_screen', DISCONNECTED = 'disconnected', STATE_CHANGED = 'change_state', BATTERY_CHANGED = 'change_battery', REMOTE_SESSION_SAVED = 'remote_session_saved', - CALL = 'call' + INCOMING_CALL = 'call', + VOTE_UPDATE = 'vote_update', } /** Group notification types */ @@ -896,6 +898,8 @@ declare namespace WAWebJS { INVITE = 'invite', REMOVE = 'remove', LEAVE = 'leave', + PROMOTE = 'promote', + DEMOTE = 'demote', SUBJECT = 'subject', DESCRIPTION = 'description', PICTURE = 'picture', @@ -919,6 +923,7 @@ declare namespace WAWebJS { AUDIO = 'audio', VOICE = 'ptt', IMAGE = 'image', + ALBUM = 'album', VIDEO = 'video', DOCUMENT = 'document', STICKER = 'sticker', @@ -1304,7 +1309,7 @@ declare namespace WAWebJS { messageSecret?: string; }; - constructor(name: string, startTime: Date, options?: EventSendOptions) + constructor(name: string, startTime: Date, options?: ScheduledEventSendOptions) } /** Represents a Poll Vote on WhatsApp */ diff --git a/src/util/Constants.js b/src/util/Constants.js index 611b36c..053acd3 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -85,6 +85,7 @@ exports.MessageTypes = { AUDIO: 'audio', VOICE: 'ptt', IMAGE: 'image', + ALBUM: 'album', VIDEO: 'video', DOCUMENT: 'document', STICKER: 'sticker', @@ -130,6 +131,8 @@ exports.GroupNotificationTypes = { INVITE: 'invite', REMOVE: 'remove', LEAVE: 'leave', + PROMOTE: 'promote', + DEMOTE: 'demote', SUBJECT: 'subject', DESCRIPTION: 'description', PICTURE: 'picture',