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
This commit is contained in:
RendyCraft047 2025-11-20 18:30:54 +07:00 • committed by GitHub
commit d815847d3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

9
index.d.ts vendored
View file

@ -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 */

View file

@ -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',