@vanzxy/baileys 1.3.6 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/WAProto/index.d.ts +9 -15871
- package/lib/Defaults/index.d.ts +7 -5
- package/lib/Defaults/index.js +4 -1
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -1
- package/lib/Signal/Group/group-session-builder.d.ts +0 -1
- package/lib/Signal/Group/group_cipher.d.ts +0 -1
- package/lib/Signal/Group/index.d.ts +0 -1
- package/lib/Signal/Group/keyhelper.d.ts +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -1
- package/lib/Signal/Group/sender-key-message.d.ts +0 -1
- package/lib/Signal/Group/sender-key-name.d.ts +0 -1
- package/lib/Signal/Group/sender-key-record.d.ts +0 -1
- package/lib/Signal/Group/sender-key-state.d.ts +0 -1
- package/lib/Signal/Group/sender-message-key.d.ts +0 -1
- package/lib/Signal/libsignal.d.ts +0 -1
- package/lib/Signal/lid-mapping.d.ts +0 -1
- package/lib/Socket/Client/index.d.ts +0 -1
- package/lib/Socket/Client/types.d.ts +0 -1
- package/lib/Socket/Client/websocket.d.ts +0 -1
- package/lib/Socket/business.d.ts +7 -7
- package/lib/Socket/chats.d.ts +0 -1
- package/lib/Socket/communities.d.ts +7 -8
- package/lib/Socket/communities.js +4 -2
- package/lib/Socket/dugong.d.ts +117 -0
- package/lib/Socket/dugong.js +26 -1
- package/lib/Socket/groups.d.ts +1 -2
- package/lib/Socket/index.d.ts +7 -6
- package/lib/Socket/messages-recv.d.ts +7 -8
- package/lib/Socket/messages-send.d.ts +6 -7
- package/lib/Socket/mex.d.ts +0 -1
- package/lib/Socket/newsletter.d.ts +3 -5
- package/lib/Socket/newsletter.js +19 -19
- package/lib/Socket/socket.d.ts +0 -1
- package/lib/Store/index.d.ts +0 -1
- package/lib/Store/make-in-memory-store.d.ts +0 -1
- package/lib/Store/make-ordered-dictionary.d.ts +0 -1
- package/lib/Store/object-repository.d.ts +0 -1
- package/lib/Types/Auth.d.ts +115 -0
- package/lib/Types/Bussines.d.ts +24 -1
- package/lib/Types/Call.d.ts +14 -1
- package/lib/Types/Chat.d.ts +123 -1
- package/lib/Types/Contact.d.ts +25 -1
- package/lib/Types/Events.d.ts +255 -1
- package/lib/Types/GroupMetadata.d.ts +70 -1
- package/lib/Types/Label.d.ts +0 -1
- package/lib/Types/LabelAssociation.d.ts +0 -1
- package/lib/Types/Message.d.ts +8 -9
- package/lib/Types/Mex.d.ts +0 -1
- package/lib/Types/Product.d.ts +78 -1
- package/lib/Types/RichType.d.ts +0 -1
- package/lib/Types/Signal.d.ts +85 -0
- package/lib/Types/Socket.d.ts +135 -1
- package/lib/Types/State.d.ts +0 -1
- package/lib/Types/USync.d.ts +25 -1
- package/lib/Types/index.d.ts +65 -13
- package/lib/Utils/auth-utils.d.ts +0 -1
- package/lib/Utils/browser-utils.d.ts +1 -2
- package/lib/Utils/business.d.ts +0 -1
- package/lib/Utils/business.js +2 -1
- package/lib/Utils/chat-utils.d.ts +15 -17
- package/lib/Utils/chat-utils.js +15 -1
- package/lib/Utils/companion-reg-client-utils.d.ts +0 -1
- package/lib/Utils/crypto.d.ts +2 -1
- package/lib/Utils/decode-wa-message.d.ts +0 -1
- package/lib/Utils/decode-wa-message.js +1 -3
- package/lib/Utils/event-buffer.d.ts +1 -2
- package/lib/Utils/generics.d.ts +0 -1
- package/lib/Utils/generics.js +11 -9
- package/lib/Utils/history.d.ts +17 -3
- package/lib/Utils/identity-change-handler.d.ts +0 -1
- package/lib/Utils/index.d.ts +0 -1
- package/lib/Utils/link-preview.d.ts +0 -1
- package/lib/Utils/logger.d.ts +0 -1
- package/lib/Utils/lt-hash.d.ts +7 -2
- package/lib/Utils/lt-hash.js +21 -2
- package/lib/Utils/make-mutex.d.ts +0 -1
- package/lib/Utils/message-retry-manager.d.ts +0 -1
- package/lib/Utils/messages-media.d.ts +2 -4
- package/lib/Utils/messages.d.ts +5 -7
- package/lib/Utils/messages.js +30 -26
- package/lib/Utils/noise-handler.d.ts +0 -1
- package/lib/Utils/offline-node-processor.d.ts +0 -1
- package/lib/Utils/pre-key-manager.d.ts +0 -1
- package/lib/Utils/process-message.d.ts +3 -5
- package/lib/Utils/reporting-utils.d.ts +0 -1
- package/lib/Utils/rich-message-utils.d.ts +1 -2
- package/lib/Utils/signal.d.ts +0 -1
- package/lib/Utils/stanza-ack.d.ts +0 -1
- package/lib/Utils/sync-action-utils.d.ts +0 -1
- package/lib/Utils/tc-token-utils.d.ts +0 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -1
- package/lib/Utils/use-single-file-auth-state.d.ts +0 -1
- package/lib/Utils/use-single-file-auth-state.js +6 -1
- package/lib/Utils/use-sqlite-auth-state.d.ts +1 -1
- package/lib/Utils/use-sqlite-auth-state.js +12 -0
- package/lib/Utils/validate-connection.d.ts +4 -6
- package/lib/WABinary/constants.d.ts +0 -1
- package/lib/WABinary/decode.d.ts +0 -1
- package/lib/WABinary/encode.d.ts +0 -1
- package/lib/WABinary/generic-utils.d.ts +1 -4
- package/lib/WABinary/index.d.ts +0 -1
- package/lib/WABinary/jid-utils.d.ts +0 -1
- package/lib/WABinary/types.d.ts +18 -1
- package/lib/WAM/BinaryInfo.d.ts +0 -1
- package/lib/WAM/constants.d.ts +0 -1
- package/lib/WAM/encode.d.ts +0 -1
- package/lib/WAM/index.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +8 -2
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -1
- package/lib/WAUSync/Protocols/index.d.ts +2 -1
- package/lib/WAUSync/USyncQuery.d.ts +0 -1
- package/lib/WAUSync/USyncUser.d.ts +0 -1
- package/lib/WAUSync/index.d.ts +0 -1
- package/lib/index.d.ts +1 -1
- package/package.json +12 -7
- package/postinstall-banner.js +23 -0
- package/lib/Defaults/index.d.ts.map +0 -1
- package/lib/Defaults/index.js.map +0 -1
- package/lib/Signal/Group/ciphertext-message.d.ts.map +0 -1
- package/lib/Signal/Group/ciphertext-message.js.map +0 -1
- package/lib/Signal/Group/group-session-builder.d.ts.map +0 -1
- package/lib/Signal/Group/group-session-builder.js.map +0 -1
- package/lib/Signal/Group/group_cipher.d.ts.map +0 -1
- package/lib/Signal/Group/group_cipher.js.map +0 -1
- package/lib/Signal/Group/index.d.ts.map +0 -1
- package/lib/Signal/Group/index.js.map +0 -1
- package/lib/Signal/Group/keyhelper.d.ts.map +0 -1
- package/lib/Signal/Group/keyhelper.js.map +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-chain-key.js.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-name.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-name.js.map +0 -1
- package/lib/Signal/Group/sender-key-record.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-record.js.map +0 -1
- package/lib/Signal/Group/sender-key-state.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-state.js.map +0 -1
- package/lib/Signal/Group/sender-message-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-message-key.js.map +0 -1
- package/lib/Signal/libsignal.d.ts.map +0 -1
- package/lib/Signal/libsignal.js.map +0 -1
- package/lib/Signal/lid-mapping.d.ts.map +0 -1
- package/lib/Signal/lid-mapping.js.map +0 -1
- package/lib/Socket/Client/index.d.ts.map +0 -1
- package/lib/Socket/Client/index.js.map +0 -1
- package/lib/Socket/Client/types.d.ts.map +0 -1
- package/lib/Socket/Client/types.js.map +0 -1
- package/lib/Socket/Client/websocket.d.ts.map +0 -1
- package/lib/Socket/Client/websocket.js.map +0 -1
- package/lib/Socket/business.d.ts.map +0 -1
- package/lib/Socket/business.js.map +0 -1
- package/lib/Socket/chats.d.ts.map +0 -1
- package/lib/Socket/chats.js.map +0 -1
- package/lib/Socket/communities.d.ts.map +0 -1
- package/lib/Socket/communities.js.map +0 -1
- package/lib/Socket/groups.d.ts.map +0 -1
- package/lib/Socket/groups.js.map +0 -1
- package/lib/Socket/index.d.ts.map +0 -1
- package/lib/Socket/index.js.map +0 -1
- package/lib/Socket/messages-recv.d.ts.map +0 -1
- package/lib/Socket/messages-recv.js.map +0 -1
- package/lib/Socket/messages-send.d.ts.map +0 -1
- package/lib/Socket/messages-send.js.map +0 -1
- package/lib/Socket/mex.d.ts.map +0 -1
- package/lib/Socket/mex.js.map +0 -1
- package/lib/Socket/newsletter.d.ts.map +0 -1
- package/lib/Socket/newsletter.js.map +0 -1
- package/lib/Socket/socket.d.ts.map +0 -1
- package/lib/Socket/socket.js.map +0 -1
- package/lib/Store/index.d.ts.map +0 -1
- package/lib/Store/index.js.map +0 -1
- package/lib/Store/make-in-memory-store.d.ts.map +0 -1
- package/lib/Store/make-in-memory-store.js.map +0 -1
- package/lib/Store/make-ordered-dictionary.d.ts.map +0 -1
- package/lib/Store/make-ordered-dictionary.js.map +0 -1
- package/lib/Store/object-repository.d.ts.map +0 -1
- package/lib/Store/object-repository.js.map +0 -1
- package/lib/Types/Auth.d.ts.map +0 -1
- package/lib/Types/Auth.js.map +0 -1
- package/lib/Types/Bussines.d.ts.map +0 -1
- package/lib/Types/Bussines.js.map +0 -1
- package/lib/Types/Call.d.ts.map +0 -1
- package/lib/Types/Call.js.map +0 -1
- package/lib/Types/Chat.d.ts.map +0 -1
- package/lib/Types/Chat.js.map +0 -1
- package/lib/Types/Contact.d.ts.map +0 -1
- package/lib/Types/Contact.js.map +0 -1
- package/lib/Types/Events.d.ts.map +0 -1
- package/lib/Types/Events.js.map +0 -1
- package/lib/Types/GroupMetadata.d.ts.map +0 -1
- package/lib/Types/GroupMetadata.js.map +0 -1
- package/lib/Types/Label.d.ts.map +0 -1
- package/lib/Types/Label.js.map +0 -1
- package/lib/Types/LabelAssociation.d.ts.map +0 -1
- package/lib/Types/LabelAssociation.js.map +0 -1
- package/lib/Types/Message.d.ts.map +0 -1
- package/lib/Types/Message.js.map +0 -1
- package/lib/Types/Mex.d.ts.map +0 -1
- package/lib/Types/Mex.js.map +0 -1
- package/lib/Types/Product.d.ts.map +0 -1
- package/lib/Types/Product.js.map +0 -1
- package/lib/Types/RichType.d.ts.map +0 -1
- package/lib/Types/RichType.js.map +0 -1
- package/lib/Types/Signal.d.ts.map +0 -1
- package/lib/Types/Signal.js.map +0 -1
- package/lib/Types/Socket.d.ts.map +0 -1
- package/lib/Types/Socket.js.map +0 -1
- package/lib/Types/State.d.ts.map +0 -1
- package/lib/Types/State.js.map +0 -1
- package/lib/Types/USync.d.ts.map +0 -1
- package/lib/Types/USync.js.map +0 -1
- package/lib/Types/index.d.ts.map +0 -1
- package/lib/Types/index.js.map +0 -1
- package/lib/Utils/auth-utils.d.ts.map +0 -1
- package/lib/Utils/auth-utils.js.map +0 -1
- package/lib/Utils/browser-utils.d.ts.map +0 -1
- package/lib/Utils/browser-utils.js.map +0 -1
- package/lib/Utils/business.d.ts.map +0 -1
- package/lib/Utils/business.js.map +0 -1
- package/lib/Utils/chat-utils.d.ts.map +0 -1
- package/lib/Utils/chat-utils.js.map +0 -1
- package/lib/Utils/companion-reg-client-utils.d.ts.map +0 -1
- package/lib/Utils/companion-reg-client-utils.js.map +0 -1
- package/lib/Utils/crypto.d.ts.map +0 -1
- package/lib/Utils/crypto.js.map +0 -1
- package/lib/Utils/decode-wa-message.d.ts.map +0 -1
- package/lib/Utils/decode-wa-message.js.map +0 -1
- package/lib/Utils/event-buffer.d.ts.map +0 -1
- package/lib/Utils/event-buffer.js.map +0 -1
- package/lib/Utils/generics.d.ts.map +0 -1
- package/lib/Utils/generics.js.map +0 -1
- package/lib/Utils/history.d.ts.map +0 -1
- package/lib/Utils/history.js.map +0 -1
- package/lib/Utils/identity-change-handler.d.ts.map +0 -1
- package/lib/Utils/identity-change-handler.js.map +0 -1
- package/lib/Utils/index.d.ts.map +0 -1
- package/lib/Utils/index.js.map +0 -1
- package/lib/Utils/link-preview.d.ts.map +0 -1
- package/lib/Utils/link-preview.js.map +0 -1
- package/lib/Utils/logger.d.ts.map +0 -1
- package/lib/Utils/logger.js.map +0 -1
- package/lib/Utils/lt-hash.d.ts.map +0 -1
- package/lib/Utils/lt-hash.js.map +0 -1
- package/lib/Utils/make-mutex.d.ts.map +0 -1
- package/lib/Utils/make-mutex.js.map +0 -1
- package/lib/Utils/message-retry-manager.d.ts.map +0 -1
- package/lib/Utils/message-retry-manager.js.map +0 -1
- package/lib/Utils/messages-media.d.ts.map +0 -1
- package/lib/Utils/messages-media.js.map +0 -1
- package/lib/Utils/messages.d.ts.map +0 -1
- package/lib/Utils/messages.js.map +0 -1
- package/lib/Utils/noise-handler.d.ts.map +0 -1
- package/lib/Utils/noise-handler.js.map +0 -1
- package/lib/Utils/offline-node-processor.d.ts.map +0 -1
- package/lib/Utils/offline-node-processor.js.map +0 -1
- package/lib/Utils/pre-key-manager.d.ts.map +0 -1
- package/lib/Utils/pre-key-manager.js.map +0 -1
- package/lib/Utils/process-message.d.ts.map +0 -1
- package/lib/Utils/process-message.js.map +0 -1
- package/lib/Utils/reporting-utils.d.ts.map +0 -1
- package/lib/Utils/reporting-utils.js.map +0 -1
- package/lib/Utils/rich-message-utils.d.ts.map +0 -1
- package/lib/Utils/rich-message-utils.js.map +0 -1
- package/lib/Utils/signal.d.ts.map +0 -1
- package/lib/Utils/signal.js.map +0 -1
- package/lib/Utils/stanza-ack.d.ts.map +0 -1
- package/lib/Utils/stanza-ack.js.map +0 -1
- package/lib/Utils/sync-action-utils.d.ts.map +0 -1
- package/lib/Utils/sync-action-utils.js.map +0 -1
- package/lib/Utils/tc-token-utils.d.ts.map +0 -1
- package/lib/Utils/tc-token-utils.js.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.js.map +0 -1
- package/lib/Utils/use-single-file-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-single-file-auth-state.js.map +0 -1
- package/lib/Utils/use-sqlite-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-sqlite-auth-state.js.map +0 -1
- package/lib/Utils/validate-connection.d.ts.map +0 -1
- package/lib/Utils/validate-connection.js.map +0 -1
- package/lib/WABinary/constants.d.ts.map +0 -1
- package/lib/WABinary/constants.js.map +0 -1
- package/lib/WABinary/decode.d.ts.map +0 -1
- package/lib/WABinary/decode.js.map +0 -1
- package/lib/WABinary/encode.d.ts.map +0 -1
- package/lib/WABinary/encode.js.map +0 -1
- package/lib/WABinary/generic-utils.d.ts.map +0 -1
- package/lib/WABinary/generic-utils.js.map +0 -1
- package/lib/WABinary/index.d.ts.map +0 -1
- package/lib/WABinary/index.js.map +0 -1
- package/lib/WABinary/jid-utils.d.ts.map +0 -1
- package/lib/WABinary/jid-utils.js.map +0 -1
- package/lib/WABinary/types.d.ts.map +0 -1
- package/lib/WABinary/types.js.map +0 -1
- package/lib/WAM/BinaryInfo.d.ts.map +0 -1
- package/lib/WAM/BinaryInfo.js.map +0 -1
- package/lib/WAM/constants.d.ts.map +0 -1
- package/lib/WAM/constants.js.map +0 -1
- package/lib/WAM/encode.d.ts.map +0 -1
- package/lib/WAM/encode.js.map +0 -1
- package/lib/WAM/index.d.ts.map +0 -1
- package/lib/WAM/index.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/index.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/index.js.map +0 -1
- package/lib/WAUSync/USyncQuery.d.ts.map +0 -1
- package/lib/WAUSync/USyncQuery.js.map +0 -1
- package/lib/WAUSync/USyncUser.d.ts.map +0 -1
- package/lib/WAUSync/USyncUser.js.map +0 -1
- package/lib/WAUSync/index.d.ts.map +0 -1
- package/lib/WAUSync/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
|
@@ -61,7 +61,7 @@ export function decodeSyncdPatch(msg: any, name: any, initialState: any, getAppS
|
|
|
61
61
|
}>;
|
|
62
62
|
export function extractSyncdPatches(result: any, options: any): Promise<{}>;
|
|
63
63
|
export function downloadExternalBlob(blob: any, options: any): Promise<any>;
|
|
64
|
-
export function downloadExternalPatch(blob: any, options: any): Promise<
|
|
64
|
+
export function downloadExternalPatch(blob: any, options: any): Promise<any>;
|
|
65
65
|
export function decodeSyncdSnapshot(name: any, snapshot: any, getAppStateSyncKey: any, minimumVersionNumber: any, validateMacs: boolean | undefined, logger: any): Promise<{
|
|
66
66
|
state: {
|
|
67
67
|
version: number;
|
|
@@ -97,7 +97,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
97
97
|
index: any[];
|
|
98
98
|
type: string;
|
|
99
99
|
apiVersion: number;
|
|
100
|
-
operation:
|
|
100
|
+
operation: any;
|
|
101
101
|
} | {
|
|
102
102
|
syncAction: {
|
|
103
103
|
archiveChatAction: {
|
|
@@ -121,7 +121,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
121
121
|
index: any[];
|
|
122
122
|
type: string;
|
|
123
123
|
apiVersion: number;
|
|
124
|
-
operation:
|
|
124
|
+
operation: any;
|
|
125
125
|
} | {
|
|
126
126
|
syncAction: {
|
|
127
127
|
markChatAsReadAction: {
|
|
@@ -145,7 +145,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
145
145
|
index: any[];
|
|
146
146
|
type: string;
|
|
147
147
|
apiVersion: number;
|
|
148
|
-
operation:
|
|
148
|
+
operation: any;
|
|
149
149
|
} | {
|
|
150
150
|
syncAction: {
|
|
151
151
|
deleteMessageForMeAction: {
|
|
@@ -169,7 +169,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
169
169
|
index: any[];
|
|
170
170
|
type: string;
|
|
171
171
|
apiVersion: number;
|
|
172
|
-
operation:
|
|
172
|
+
operation: any;
|
|
173
173
|
} | {
|
|
174
174
|
syncAction: {
|
|
175
175
|
clearChatAction: {
|
|
@@ -192,7 +192,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
192
192
|
index: any[];
|
|
193
193
|
type: string;
|
|
194
194
|
apiVersion: number;
|
|
195
|
-
operation:
|
|
195
|
+
operation: any;
|
|
196
196
|
} | {
|
|
197
197
|
syncAction: {
|
|
198
198
|
pinAction: {
|
|
@@ -215,7 +215,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
215
215
|
index: any[];
|
|
216
216
|
type: string;
|
|
217
217
|
apiVersion: number;
|
|
218
|
-
operation:
|
|
218
|
+
operation: any;
|
|
219
219
|
} | {
|
|
220
220
|
syncAction: {
|
|
221
221
|
contactAction: any;
|
|
@@ -236,7 +236,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
236
236
|
index: any[];
|
|
237
237
|
type: string;
|
|
238
238
|
apiVersion: number;
|
|
239
|
-
operation:
|
|
239
|
+
operation: any;
|
|
240
240
|
} | {
|
|
241
241
|
syncAction: {
|
|
242
242
|
privacySettingDisableLinkPreviewsAction: any;
|
|
@@ -257,7 +257,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
257
257
|
index: string[];
|
|
258
258
|
type: string;
|
|
259
259
|
apiVersion: number;
|
|
260
|
-
operation:
|
|
260
|
+
operation: any;
|
|
261
261
|
} | {
|
|
262
262
|
syncAction: {
|
|
263
263
|
starAction: {
|
|
@@ -280,7 +280,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
280
280
|
index: any[];
|
|
281
281
|
type: string;
|
|
282
282
|
apiVersion: number;
|
|
283
|
-
operation:
|
|
283
|
+
operation: any;
|
|
284
284
|
} | {
|
|
285
285
|
syncAction: {
|
|
286
286
|
deleteChatAction: {
|
|
@@ -303,7 +303,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
303
303
|
index: any[];
|
|
304
304
|
type: string;
|
|
305
305
|
apiVersion: number;
|
|
306
|
-
operation:
|
|
306
|
+
operation: any;
|
|
307
307
|
} | {
|
|
308
308
|
syncAction: {
|
|
309
309
|
pushNameSetting: {
|
|
@@ -326,7 +326,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
326
326
|
index: string[];
|
|
327
327
|
type: string;
|
|
328
328
|
apiVersion: number;
|
|
329
|
-
operation:
|
|
329
|
+
operation: any;
|
|
330
330
|
} | {
|
|
331
331
|
syncAction: {
|
|
332
332
|
quickReplyAction: {
|
|
@@ -353,7 +353,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
353
353
|
index: any[];
|
|
354
354
|
type: string;
|
|
355
355
|
apiVersion: number;
|
|
356
|
-
operation:
|
|
356
|
+
operation: any;
|
|
357
357
|
} | {
|
|
358
358
|
syncAction: {
|
|
359
359
|
labelEditAction: {
|
|
@@ -379,7 +379,7 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
379
379
|
index: any[];
|
|
380
380
|
type: string;
|
|
381
381
|
apiVersion: number;
|
|
382
|
-
operation:
|
|
382
|
+
operation: any;
|
|
383
383
|
} | {
|
|
384
384
|
syncAction: {
|
|
385
385
|
labelAssociationAction: {
|
|
@@ -402,8 +402,6 @@ export function chatModificationToAppPatch(mod: any, jid: any): {
|
|
|
402
402
|
index: any[];
|
|
403
403
|
type: string;
|
|
404
404
|
apiVersion: number;
|
|
405
|
-
operation:
|
|
405
|
+
operation: any;
|
|
406
406
|
};
|
|
407
407
|
export function processSyncAction(syncAction: any, ev: any, me: any, initialSyncOpts: any, logger: any): void;
|
|
408
|
-
import { proto } from '../../WAProto/index.js';
|
|
409
|
-
//# sourceMappingURL=chat-utils.d.ts.map
|
package/lib/Utils/chat-utils.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
|
-
import { expandAppStateKeys } from 'whatsapp-rust-bridge';
|
|
3
2
|
import { proto } from '../../WAProto/index.js';
|
|
4
3
|
import { LabelAssociationType } from '../Types/LabelAssociation.js';
|
|
5
4
|
import { getBinaryNodeChild, getBinaryNodeChildren, isJidGroup, jidNormalizedUser } from '../WABinary/index.js';
|
|
@@ -8,6 +7,21 @@ import { toNumber } from './generics.js';
|
|
|
8
7
|
import { LT_HASH_ANTI_TAMPERING } from './lt-hash.js';
|
|
9
8
|
import { downloadContentFromMessage } from './messages-media.js';
|
|
10
9
|
import { emitSyncActionResults, processContactAction } from './sync-action-utils.js';
|
|
10
|
+
// Vanz@Fix (bug 36 follow-up): same top-level-await try/catch treatment as crypto.js and
|
|
11
|
+
// lt-hash.js — avoid crashing the whole library at import time if the whatsapp-rust-bridge
|
|
12
|
+
// native binary is missing on this platform (ARM musl/Alpine/Termux/some Pterodactyl nodes);
|
|
13
|
+
// only throw when app-state sync actually needs it. Kept synchronous (not async) because
|
|
14
|
+
// mutationKeys() is called synchronously throughout this file — making it async would be
|
|
15
|
+
// a breaking change for those call sites.
|
|
16
|
+
let expandAppStateKeys;
|
|
17
|
+
try {
|
|
18
|
+
({ expandAppStateKeys } = await import('whatsapp-rust-bridge'));
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
const message = '`whatsapp-rust-bridge` failed to load (no prebuilt binary for this platform/arch). ' +
|
|
22
|
+
'App-state sync is unavailable here. Original error: ' + (err?.message || err);
|
|
23
|
+
expandAppStateKeys = () => { throw new Error(message); };
|
|
24
|
+
}
|
|
11
25
|
const mutationKeys = (keydata) => {
|
|
12
26
|
const keys = expandAppStateKeys(keydata);
|
|
13
27
|
return {
|
|
@@ -2,4 +2,3 @@ export const CompanionWebClientType: any;
|
|
|
2
2
|
export function getCompanionWebClientType([os, browserName]: [any, any]): any;
|
|
3
3
|
export function getCompanionPlatformId(browser: any): any;
|
|
4
4
|
export function buildPairingQRData(ref: any, noiseKeyB64: any, identityKeyB64: any, advB64: any, browser: any): string;
|
|
5
|
-
//# sourceMappingURL=companion-reg-client-utils.d.ts.map
|
package/lib/Utils/crypto.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import { areJidsSameUser, isHostedLidUser, isHostedPnUser, isJidBroadcast, isJidGroup, isJidMetaAI, isJidNewsletter, isJidStatusBroadcast, isLidUser, isPnUser
|
|
4
|
-
// transferDevice
|
|
5
|
-
} from '../WABinary/index.js';
|
|
3
|
+
import { areJidsSameUser, isHostedLidUser, isHostedPnUser, isJidBroadcast, isJidGroup, isJidMetaAI, isJidNewsletter, isJidStatusBroadcast, isLidUser, isPnUser } from '../WABinary/index.js';
|
|
6
4
|
import { unpadRandomMax16 } from './generics.js';
|
|
7
5
|
export const getDecryptionJid = async (sender, repository) => {
|
|
8
6
|
if (isLidUser(sender) || isHostedLidUser(sender)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function makeEventBuffer(logger: any): {
|
|
1
|
+
export function makeEventBuffer(logger: any, timeoutMs: any): {
|
|
2
2
|
process(handler: any): () => void;
|
|
3
3
|
emit(event: any, evData: any): any;
|
|
4
4
|
isBuffering(): boolean;
|
|
@@ -10,4 +10,3 @@ export function makeEventBuffer(logger: any): {
|
|
|
10
10
|
removeAllListeners: (...args: any[]) => any;
|
|
11
11
|
destroy(): void;
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=event-buffer.d.ts.map
|
package/lib/Utils/generics.d.ts
CHANGED
package/lib/Utils/generics.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { createHash, randomBytes, randomFillSync } from 'crypto';
|
|
3
3
|
import { proto } from '../../WAProto/index.js';
|
|
4
|
-
const baileysVersion = [2, 3000,
|
|
4
|
+
const baileysVersion = [2, 3000, 1043857760];
|
|
5
5
|
import { DisconnectReason } from '../Types/index.js';
|
|
6
6
|
import { getAllBinaryNodeChildren, jidDecode } from '../WABinary/index.js';
|
|
7
7
|
import { sha256 } from './crypto.js';
|
|
@@ -144,9 +144,7 @@ export const generateMessageIDV2 = (userId) => {
|
|
|
144
144
|
randomFillSync(data, 28, 16);
|
|
145
145
|
const hash = createHash('sha256').update(data).digest();
|
|
146
146
|
const hex = hash.toString('hex', 0, 9).toUpperCase();
|
|
147
|
-
|
|
148
|
-
const pos = 4 + (hash[0] & 15);
|
|
149
|
-
return baseId.slice(0, pos) + 'STARFALL' + baseId.slice(pos);
|
|
147
|
+
return '3EB0' + hex;
|
|
150
148
|
};
|
|
151
149
|
// generate a random ID to attach to a message
|
|
152
150
|
export const generateMessageID = () => '3EB0' + randomBytes(18).toString('hex').toUpperCase();
|
|
@@ -179,7 +177,9 @@ export const bindWaitForConnectionUpdate = (ev) => bindWaitForEvent(ev, 'connect
|
|
|
179
177
|
* Use to ensure your WA connection is always on the latest version
|
|
180
178
|
*/
|
|
181
179
|
export const fetchLatestBaileysVersion = async (options = {}) => {
|
|
182
|
-
|
|
180
|
+
// Balik ke repo sendiri — Vanzxy bakal update manual lib/Defaults/index.js
|
|
181
|
+
// di GitHub tiap WA naikin versi minimum.
|
|
182
|
+
const URL = 'https://raw.githubusercontent.com/vanzxy/baileys/main/lib/Defaults/index.js';
|
|
183
183
|
try {
|
|
184
184
|
const response = await fetch(URL, {
|
|
185
185
|
dispatcher: options.dispatcher,
|
|
@@ -190,10 +190,12 @@ export const fetchLatestBaileysVersion = async (options = {}) => {
|
|
|
190
190
|
throw new Boom(`Failed to fetch latest Baileys version: ${response.statusText}`, { statusCode: response.status });
|
|
191
191
|
}
|
|
192
192
|
const text = await response.text();
|
|
193
|
-
//
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
// Vanz@Fix: sebelumnya ambil baris tertentu by index (lines[4]) —
|
|
194
|
+
// rapuh banget, gampang salah baca kalau format file sumbernya
|
|
195
|
+
// berubah dikit (nambah/kurang komentar/baris kosong di atasnya).
|
|
196
|
+
// Sekarang cari pattern `const version = [...]` di SELURUH isi
|
|
197
|
+
// file, gak peduli ada di baris keberapa.
|
|
198
|
+
const versionMatch = text.match(/const version\s*=\s*\[(\d+),\s*(\d+),\s*(\d+)\]/);
|
|
197
199
|
if (versionMatch) {
|
|
198
200
|
const version = [parseInt(versionMatch[1]), parseInt(versionMatch[2]), parseInt(versionMatch[3])];
|
|
199
201
|
return {
|
package/lib/Utils/history.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
export function downloadHistory(msg: any, options: any): Promise<
|
|
1
|
+
export function downloadHistory(msg: any, options: any): Promise<any>;
|
|
2
2
|
export function processHistoryMessage(item: any, logger: any): {
|
|
3
|
+
messages: any[];
|
|
4
|
+
contacts: any[];
|
|
5
|
+
chats: any[];
|
|
6
|
+
lidPnMappings: any[];
|
|
7
|
+
pastParticipants?: undefined;
|
|
8
|
+
syncType?: undefined;
|
|
9
|
+
progress?: undefined;
|
|
10
|
+
} | {
|
|
3
11
|
chats: any[];
|
|
4
12
|
contacts: ({
|
|
5
13
|
id: any;
|
|
@@ -36,6 +44,14 @@ export function processHistoryMessage(item: any, logger: any): {
|
|
|
36
44
|
progress: any;
|
|
37
45
|
};
|
|
38
46
|
export function downloadAndProcessHistorySyncNotification(msg: any, options: any, logger: any): Promise<{
|
|
47
|
+
messages: any[];
|
|
48
|
+
contacts: any[];
|
|
49
|
+
chats: any[];
|
|
50
|
+
lidPnMappings: any[];
|
|
51
|
+
pastParticipants?: undefined;
|
|
52
|
+
syncType?: undefined;
|
|
53
|
+
progress?: undefined;
|
|
54
|
+
} | {
|
|
39
55
|
chats: any[];
|
|
40
56
|
contacts: ({
|
|
41
57
|
id: any;
|
|
@@ -72,5 +88,3 @@ export function downloadAndProcessHistorySyncNotification(msg: any, options: any
|
|
|
72
88
|
progress: any;
|
|
73
89
|
}>;
|
|
74
90
|
export function getHistoryMsg(message: any): any;
|
|
75
|
-
import { proto } from '../../WAProto/index.js';
|
|
76
|
-
//# sourceMappingURL=history.d.ts.map
|
package/lib/Utils/index.d.ts
CHANGED
package/lib/Utils/logger.d.ts
CHANGED
package/lib/Utils/lt-hash.d.ts
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
* LT Hash is a summation based hash algorithm that maintains the integrity of a piece of data
|
|
3
3
|
* over a series of mutations. You can add/remove mutations and it'll return a hash equal to
|
|
4
4
|
* if the same series of mutations was made sequentially.
|
|
5
|
+
*
|
|
6
|
+
* Vanz@Fix (bug 36 follow-up): whatsapp-rust-bridge is a native module and was previously
|
|
7
|
+
* statically imported here, which crashed the *entire* library at import time on platforms
|
|
8
|
+
* without a prebuilt binary (ARM musl/Alpine/Termux/some Pterodactyl nodes) — even for bots
|
|
9
|
+
* that never touch app-state sync. Same top-level-await try/catch pattern as crypto.js:
|
|
10
|
+
* only throws (with a clear message) if app-state sync (LT hash) is actually used.
|
|
5
11
|
*/
|
|
6
|
-
export
|
|
7
|
-
//# sourceMappingURL=lt-hash.d.ts.map
|
|
12
|
+
export let LT_HASH_ANTI_TAMPERING: any;
|
package/lib/Utils/lt-hash.js
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
import { LTHashAntiTampering } from 'whatsapp-rust-bridge';
|
|
2
1
|
/**
|
|
3
2
|
* LT Hash is a summation based hash algorithm that maintains the integrity of a piece of data
|
|
4
3
|
* over a series of mutations. You can add/remove mutations and it'll return a hash equal to
|
|
5
4
|
* if the same series of mutations was made sequentially.
|
|
5
|
+
*
|
|
6
|
+
* Vanz@Fix (bug 36 follow-up): whatsapp-rust-bridge is a native module and was previously
|
|
7
|
+
* statically imported here, which crashed the *entire* library at import time on platforms
|
|
8
|
+
* without a prebuilt binary (ARM musl/Alpine/Termux/some Pterodactyl nodes) — even for bots
|
|
9
|
+
* that never touch app-state sync. Same top-level-await try/catch pattern as crypto.js:
|
|
10
|
+
* only throws (with a clear message) if app-state sync (LT hash) is actually used.
|
|
6
11
|
*/
|
|
7
|
-
|
|
12
|
+
let LT_HASH_ANTI_TAMPERING;
|
|
13
|
+
try {
|
|
14
|
+
const { LTHashAntiTampering } = await import('whatsapp-rust-bridge');
|
|
15
|
+
LT_HASH_ANTI_TAMPERING = new LTHashAntiTampering();
|
|
16
|
+
}
|
|
17
|
+
catch (err) {
|
|
18
|
+
const message = '`whatsapp-rust-bridge` failed to load (no prebuilt binary for this platform/arch). ' +
|
|
19
|
+
'App-state sync (LT hash) is unavailable here. Original error: ' + (err?.message || err);
|
|
20
|
+
LT_HASH_ANTI_TAMPERING = new Proxy({}, {
|
|
21
|
+
get() {
|
|
22
|
+
throw new Error(message);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export { LT_HASH_ANTI_TAMPERING };
|
|
8
27
|
//# sourceMappingURL=lt-hash.js.map
|
|
@@ -131,7 +131,5 @@ export function decodeMediaRetryNode(node: any): {
|
|
|
131
131
|
export function decryptMediaRetryData({ ciphertext, iv }: {
|
|
132
132
|
ciphertext: any;
|
|
133
133
|
iv: any;
|
|
134
|
-
}, mediaKey: any, msgId: any):
|
|
135
|
-
export function getStatusCodeForMediaRetry(code: any):
|
|
136
|
-
import { proto } from '../../WAProto/index.js';
|
|
137
|
-
//# sourceMappingURL=messages-media.d.ts.map
|
|
134
|
+
}, mediaKey: any, msgId: any): any;
|
|
135
|
+
export function getStatusCodeForMediaRetry(code: any): number;
|
package/lib/Utils/messages.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export function getAggregateResponsesInEventMessage({ eventResponses }: {
|
|
|
19
19
|
}, meId: any): any[];
|
|
20
20
|
export function extractUrlFromText(text: any): any;
|
|
21
21
|
export function generateLinkPreviewIfRequired(text: any, getUrlInfo: any, logger: any): Promise<any>;
|
|
22
|
-
export function prepareWAMessageMedia(message: any, options: any): Promise<
|
|
23
|
-
export function prepareDisappearingMessageSettingContent(ephemeralExpiration: any):
|
|
22
|
+
export function prepareWAMessageMedia(message: any, options: any): Promise<any>;
|
|
23
|
+
export function prepareDisappearingMessageSettingContent(ephemeralExpiration: any): any;
|
|
24
24
|
export function generateForwardMessageContent(message: any, forceForward: any): any;
|
|
25
25
|
export function hasNonNullishProperty(message: any, key: any): boolean;
|
|
26
26
|
export function hasOptionalProperty(obj: any, key: any): boolean;
|
|
@@ -28,12 +28,12 @@ export function hasValidAlbumMedia(message: any): boolean;
|
|
|
28
28
|
export function hasValidInteractiveHeader(message: any): boolean;
|
|
29
29
|
export function hasValidCarouselHeader(message: any): boolean;
|
|
30
30
|
export function generateWAMessageContent(message: any, options: any): Promise<any>;
|
|
31
|
-
export function generateWAMessageFromContent(jid: any, message: any, options: any):
|
|
32
|
-
export function generateWAMessage(jid: any, content: any, options: any): Promise<
|
|
31
|
+
export function generateWAMessageFromContent(jid: any, message: any, options: any): any;
|
|
32
|
+
export function generateWAMessage(jid: any, content: any, options: any): Promise<any>;
|
|
33
33
|
export function getContentType(content: any): string | undefined;
|
|
34
34
|
export function normalizeMessageContent(content: any): any;
|
|
35
35
|
export function extractMessageContent(content: any): any;
|
|
36
|
-
export function getDevice(id: any): "
|
|
36
|
+
export function getDevice(id: any): "web" | "unknown" | "android" | "ios" | "desktop";
|
|
37
37
|
export function updateMessageWithReceipt(msg: any, receipt: any): void;
|
|
38
38
|
export function updateMessageWithReaction(msg: any, reaction: any): void;
|
|
39
39
|
export function updateMessageWithPollUpdate(msg: any, update: any): void;
|
|
@@ -42,5 +42,3 @@ export function aggregateMessageKeysNotFromMe(keys: any): any[];
|
|
|
42
42
|
export function downloadMediaMessage(message: any, type: any, options: any, ctx: any): Promise<any>;
|
|
43
43
|
export function assertMediaContent(content: any): any;
|
|
44
44
|
export function shouldIncludeBizBinaryNode(message: any): boolean;
|
|
45
|
-
import { proto } from '../../WAProto/index.js';
|
|
46
|
-
//# sourceMappingURL=messages.d.ts.map
|
package/lib/Utils/messages.js
CHANGED
|
@@ -600,54 +600,55 @@ const prepareNativeFlowButtons = (message) => {
|
|
|
600
600
|
})
|
|
601
601
|
};
|
|
602
602
|
}
|
|
603
|
-
// Vanzxy@
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
return {
|
|
615
|
-
name: 'authentication_button',
|
|
616
|
-
buttonParamsJson: JSON.stringify({
|
|
617
|
-
display_text: buttonText || 'Autofill',
|
|
618
|
-
code: button.oneTapOtp
|
|
619
|
-
})
|
|
620
|
-
};
|
|
621
|
-
}
|
|
622
|
-
// Vanzxy@Changes --- Add classic template-style button shortcuts
|
|
603
|
+
// Vanzxy@Fix (bug 12): otp_button/authentication_button removed entirely.
|
|
604
|
+
// These are WhatsApp Business Platform (Cloud API) authentication template
|
|
605
|
+
// buttons, gated behind Meta template approval — they cannot be produced
|
|
606
|
+
// by any MD-protocol client library, Baileys included. Not a bug to fix,
|
|
607
|
+
// just an unsupported surface; unrecognized `otp`/`oneTapOtp` fields now
|
|
608
|
+
// fall through untouched instead of building a doomed-to-fail button.
|
|
609
|
+
|
|
610
|
+
// Vanzxy@Fix (bug 11): 'call_button'/'url_button'/'reply_button' were invalid
|
|
611
|
+
// native-flow type names (leftover from the deprecated buttonsMessage system,
|
|
612
|
+
// which modern WA clients no longer render — that's why they silent-failed).
|
|
613
|
+
// Aliased to the real, currently-supported native-flow equivalents instead.
|
|
623
614
|
else if (hasOptionalProperty(button, 'phoneNumber') && !!button.phoneNumber) {
|
|
624
615
|
return {
|
|
625
|
-
name: '
|
|
616
|
+
name: 'cta_call',
|
|
626
617
|
buttonParamsJson: JSON.stringify({
|
|
627
618
|
display_text: buttonText || '📞 Call',
|
|
628
|
-
phone_number: button.phoneNumber
|
|
619
|
+
phone_number: button.phoneNumber,
|
|
620
|
+
icon: buttonIcon
|
|
629
621
|
})
|
|
630
622
|
};
|
|
631
623
|
}
|
|
632
624
|
else if (hasOptionalProperty(button, 'urlBtn') && !!button.urlBtn) {
|
|
633
625
|
return {
|
|
634
|
-
name: '
|
|
626
|
+
name: 'cta_url',
|
|
635
627
|
buttonParamsJson: JSON.stringify({
|
|
636
628
|
display_text: buttonText || '🌐 Open',
|
|
637
|
-
url: button.urlBtn
|
|
629
|
+
url: button.urlBtn,
|
|
630
|
+
merchant_url: button.urlBtn,
|
|
631
|
+
webview_interaction: button.useWebview,
|
|
632
|
+
icon: buttonIcon
|
|
638
633
|
})
|
|
639
634
|
};
|
|
640
635
|
}
|
|
641
636
|
else if (hasOptionalProperty(button, 'reply') && !!button.reply) {
|
|
642
637
|
return {
|
|
643
|
-
name: '
|
|
638
|
+
name: 'quick_reply',
|
|
644
639
|
buttonParamsJson: JSON.stringify({
|
|
645
640
|
display_text: buttonText || button.reply,
|
|
646
|
-
id: button.id || button.reply
|
|
641
|
+
id: button.id || button.reply,
|
|
642
|
+
icon: buttonIcon
|
|
647
643
|
})
|
|
648
644
|
};
|
|
649
645
|
}
|
|
650
646
|
// Vanzxy@Changes --- Add order/payment lifecycle button shortcuts
|
|
647
|
+
// ⚠️ NOTE: card_message/order_details/order_status/review_and_pay/
|
|
648
|
+
// payment_status/payment_method are valid native-flow types, BUT WA only
|
|
649
|
+
// renders them when order_id/product data resolves to a real Commerce
|
|
650
|
+
// order tied to your catalog/business account. Fake/test IDs will always
|
|
651
|
+
// silently fail — this is server-side validation, not a Baileys bug.
|
|
651
652
|
else if (hasOptionalProperty(button, 'card') && !!button.card) {
|
|
652
653
|
return {
|
|
653
654
|
name: 'card_message',
|
|
@@ -728,6 +729,9 @@ const prepareNativeFlowButtons = (message) => {
|
|
|
728
729
|
};
|
|
729
730
|
}
|
|
730
731
|
// Vanzxy@Changes --- Add "flow_action" shortcut (WhatsApp Flows form)
|
|
732
|
+
// ⚠️ NOTE: requires a flow_id actually registered & published in the
|
|
733
|
+
// WhatsApp Flows Manager for your business account. A fictitious ID
|
|
734
|
+
// (like 'flow_test_id') will always fail — server-side, not fixable here.
|
|
731
735
|
else if (hasOptionalProperty(button, 'flow') && !!button.flow) {
|
|
732
736
|
return {
|
|
733
737
|
name: 'flow_action',
|
|
@@ -12,7 +12,7 @@ export function decryptPollVote({ encPayload, encIv }: {
|
|
|
12
12
|
pollMsgId: any;
|
|
13
13
|
pollEncKey: any;
|
|
14
14
|
voterJid: any;
|
|
15
|
-
}):
|
|
15
|
+
}): any;
|
|
16
16
|
/**
|
|
17
17
|
* Decrypt an event response
|
|
18
18
|
* @param response encrypted event response
|
|
@@ -27,7 +27,7 @@ export function decryptEventResponse({ encPayload, encIv }: {
|
|
|
27
27
|
eventMsgId: any;
|
|
28
28
|
eventEncKey: any;
|
|
29
29
|
responderJid: any;
|
|
30
|
-
}):
|
|
30
|
+
}): any;
|
|
31
31
|
/**
|
|
32
32
|
* Decrypt a `secretEncryptedMessage` carrying a `MESSAGE_EDIT` payload.
|
|
33
33
|
*
|
|
@@ -59,7 +59,7 @@ export function decryptMessageEdit({ encPayload, encIv }: {
|
|
|
59
59
|
originalMsgId: any;
|
|
60
60
|
editEncKey: any;
|
|
61
61
|
editorJid: any;
|
|
62
|
-
}):
|
|
62
|
+
}): any;
|
|
63
63
|
export function cleanMessage(message: any, meId: any, meLid: any): void;
|
|
64
64
|
export function isRealMessage(message: any): boolean;
|
|
65
65
|
export function shouldIncrementChatUnread(message: any): boolean;
|
|
@@ -69,7 +69,6 @@ export function getChatId({ remoteJid, participant, fromMe }: {
|
|
|
69
69
|
fromMe: any;
|
|
70
70
|
}): any;
|
|
71
71
|
export default processMessage;
|
|
72
|
-
import { proto } from '../../WAProto/index.js';
|
|
73
72
|
declare function processMessage(message: any, { shouldProcessHistoryMsg, placeholderResendCache, ev, creds, signalRepository, keyStore, logger, options, getMessage }: {
|
|
74
73
|
shouldProcessHistoryMsg: any;
|
|
75
74
|
placeholderResendCache: any;
|
|
@@ -81,4 +80,3 @@ declare function processMessage(message: any, { shouldProcessHistoryMsg, placeho
|
|
|
81
80
|
options: any;
|
|
82
81
|
getMessage: any;
|
|
83
82
|
}): Promise<void>;
|
|
84
|
-
//# sourceMappingURL=process-message.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function tokenizeCode(code: any, language?: string): {
|
|
2
2
|
highlightType: any;
|
|
3
|
-
codeContent: string
|
|
3
|
+
codeContent: string;
|
|
4
4
|
}[];
|
|
5
5
|
export function toUnified(submessages: any, uuid: any): {
|
|
6
6
|
response_id: any;
|
|
@@ -46,4 +46,3 @@ export function wrapToBotForwardedMessage(richResponseMessage: any): {
|
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=rich-message-utils.d.ts.map
|
package/lib/Utils/signal.d.ts
CHANGED
|
@@ -27,4 +27,3 @@ export function storeTcTokensFromIqResult({ result, fallbackJid, keys, getLIDFor
|
|
|
27
27
|
}): Promise<void>;
|
|
28
28
|
/** Sentinel key under `tctoken` store holding a JSON array of tracked storage JIDs for cross-session pruning. */
|
|
29
29
|
export const TC_TOKEN_INDEX_KEY: "__index";
|
|
30
|
-
//# sourceMappingURL=tc-token-utils.d.ts.map
|