@nanazx/baileys 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +1547 -2
- package/WAProto/GenerateStatics.sh +3 -0
- package/WAProto/WAProto.proto +8571 -0
- package/WAProto/fix-imports.js +85 -0
- package/WAProto/index.d.ts +100898 -0
- package/WAProto/index.js +305880 -0
- package/engine-requirements.js +10 -0
- package/lib/Defaults/index.d.ts +75 -0
- package/lib/Defaults/index.d.ts.map +1 -0
- package/lib/Defaults/index.js +129 -0
- package/lib/Defaults/index.js.map +1 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
- package/lib/Signal/Group/ciphertext-message.d.ts.map +1 -0
- package/lib/Signal/Group/ciphertext-message.js +12 -0
- package/lib/Signal/Group/ciphertext-message.js.map +1 -0
- package/lib/Signal/Group/group-session-builder.d.ts +15 -0
- package/lib/Signal/Group/group-session-builder.d.ts.map +1 -0
- package/lib/Signal/Group/group-session-builder.js +30 -0
- package/lib/Signal/Group/group-session-builder.js.map +1 -0
- package/lib/Signal/Group/group_cipher.d.ts +17 -0
- package/lib/Signal/Group/group_cipher.d.ts.map +1 -0
- package/lib/Signal/Group/group_cipher.js +82 -0
- package/lib/Signal/Group/group_cipher.js.map +1 -0
- package/lib/Signal/Group/index.d.ts +12 -0
- package/lib/Signal/Group/index.d.ts.map +1 -0
- package/lib/Signal/Group/index.js +12 -0
- package/lib/Signal/Group/index.js.map +1 -0
- package/lib/Signal/Group/keyhelper.d.ts +11 -0
- package/lib/Signal/Group/keyhelper.d.ts.map +1 -0
- package/lib/Signal/Group/keyhelper.js +18 -0
- package/lib/Signal/Group/keyhelper.js.map +1 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
- package/lib/Signal/Group/sender-chain-key.d.ts.map +1 -0
- package/lib/Signal/Group/sender-chain-key.js +26 -0
- package/lib/Signal/Group/sender-chain-key.js.map +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
- package/lib/Signal/Group/sender-key-distribution-message.js.map +1 -0
- package/lib/Signal/Group/sender-key-message.d.ts +19 -0
- package/lib/Signal/Group/sender-key-message.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-message.js +66 -0
- package/lib/Signal/Group/sender-key-message.js.map +1 -0
- package/lib/Signal/Group/sender-key-name.d.ts +18 -0
- package/lib/Signal/Group/sender-key-name.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-name.js +48 -0
- package/lib/Signal/Group/sender-key-name.js.map +1 -0
- package/lib/Signal/Group/sender-key-record.d.ts +31 -0
- package/lib/Signal/Group/sender-key-record.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-record.js +41 -0
- package/lib/Signal/Group/sender-key-record.js.map +1 -0
- package/lib/Signal/Group/sender-key-state.d.ts +39 -0
- package/lib/Signal/Group/sender-key-state.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-state.js +84 -0
- package/lib/Signal/Group/sender-key-state.js.map +1 -0
- package/lib/Signal/Group/sender-message-key.d.ts +12 -0
- package/lib/Signal/Group/sender-message-key.d.ts.map +1 -0
- package/lib/Signal/Group/sender-message-key.js +26 -0
- package/lib/Signal/Group/sender-message-key.js.map +1 -0
- package/lib/Signal/libsignal.d.ts +5 -0
- package/lib/Signal/libsignal.d.ts.map +1 -0
- package/lib/Signal/libsignal.js +431 -0
- package/lib/Signal/libsignal.js.map +1 -0
- package/lib/Signal/lid-mapping.d.ts +23 -0
- package/lib/Signal/lid-mapping.d.ts.map +1 -0
- package/lib/Signal/lid-mapping.js +277 -0
- package/lib/Signal/lid-mapping.js.map +1 -0
- package/lib/Socket/Client/index.d.ts +3 -0
- package/lib/Socket/Client/index.d.ts.map +1 -0
- package/lib/Socket/Client/index.js +3 -0
- package/lib/Socket/Client/index.js.map +1 -0
- package/lib/Socket/Client/types.d.ts +16 -0
- package/lib/Socket/Client/types.d.ts.map +1 -0
- package/lib/Socket/Client/types.js +11 -0
- package/lib/Socket/Client/types.js.map +1 -0
- package/lib/Socket/Client/websocket.d.ts +13 -0
- package/lib/Socket/Client/websocket.d.ts.map +1 -0
- package/lib/Socket/Client/websocket.js +54 -0
- package/lib/Socket/Client/websocket.js.map +1 -0
- package/lib/Socket/aigroups.js +236 -0
- package/lib/Socket/business.d.ts +217 -0
- package/lib/Socket/business.d.ts.map +1 -0
- package/lib/Socket/business.js +379 -0
- package/lib/Socket/business.js.map +1 -0
- package/lib/Socket/chats.d.ts +125 -0
- package/lib/Socket/chats.d.ts.map +1 -0
- package/lib/Socket/chats.js +1198 -0
- package/lib/Socket/chats.js.map +1 -0
- package/lib/Socket/communities.d.ts +273 -0
- package/lib/Socket/communities.d.ts.map +1 -0
- package/lib/Socket/communities.js +431 -0
- package/lib/Socket/communities.js.map +1 -0
- package/lib/Socket/graphql.js +904 -0
- package/lib/Socket/groups.d.ts +161 -0
- package/lib/Socket/groups.d.ts.map +1 -0
- package/lib/Socket/groups.js +347 -0
- package/lib/Socket/groups.js.map +1 -0
- package/lib/Socket/index.d.ts +260 -0
- package/lib/Socket/index.d.ts.map +1 -0
- package/lib/Socket/index.js +32 -0
- package/lib/Socket/index.js.map +1 -0
- package/lib/Socket/interactive-handler.js +577 -0
- package/lib/Socket/interop.js +562 -0
- package/lib/Socket/managed-account.js +210 -0
- package/lib/Socket/messages-recv.d.ts +203 -0
- package/lib/Socket/messages-recv.d.ts.map +1 -0
- package/lib/Socket/messages-recv.js +1772 -0
- package/lib/Socket/messages-recv.js.map +1 -0
- package/lib/Socket/messages-send.d.ts +199 -0
- package/lib/Socket/messages-send.d.ts.map +1 -0
- package/lib/Socket/messages-send.js +1145 -0
- package/lib/Socket/messages-send.js.map +1 -0
- package/lib/Socket/mex.d.ts +3 -0
- package/lib/Socket/mex.d.ts.map +1 -0
- package/lib/Socket/mex.js +4 -0
- package/lib/Socket/mex.js.map +1 -0
- package/lib/Socket/newsletter.d.ts +170 -0
- package/lib/Socket/newsletter.d.ts.map +1 -0
- package/lib/Socket/newsletter.js +181 -0
- package/lib/Socket/newsletter.js.map +1 -0
- package/lib/Socket/privacy.js +448 -0
- package/lib/Socket/registration.js +430 -0
- package/lib/Socket/socket.d.ts +59 -0
- package/lib/Socket/socket.d.ts.map +1 -0
- package/lib/Socket/socket.js +970 -0
- package/lib/Socket/socket.js.map +1 -0
- package/lib/Socket/username.js +227 -0
- package/lib/Store/index.js +4 -0
- package/lib/Store/make-cache-manager-store.js +87 -0
- package/lib/Store/make-in-memory-store.js +201 -0
- package/lib/Store/make-ordered-dictionary.js +47 -0
- package/lib/Store/object-repository.js +12 -0
- package/lib/Types/Auth.d.ts +117 -0
- package/lib/Types/Auth.d.ts.map +1 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Auth.js.map +1 -0
- package/lib/Types/Bussines.d.ts +25 -0
- package/lib/Types/Bussines.d.ts.map +1 -0
- package/lib/Types/Bussines.js +2 -0
- package/lib/Types/Bussines.js.map +1 -0
- package/lib/Types/Call.d.ts +15 -0
- package/lib/Types/Call.d.ts.map +1 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Call.js.map +1 -0
- package/lib/Types/Chat.d.ts +124 -0
- package/lib/Types/Chat.d.ts.map +1 -0
- package/lib/Types/Chat.js +8 -0
- package/lib/Types/Chat.js.map +1 -0
- package/lib/Types/Contact.d.ts +26 -0
- package/lib/Types/Contact.d.ts.map +1 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Contact.js.map +1 -0
- package/lib/Types/Events.d.ts +256 -0
- package/lib/Types/Events.d.ts.map +1 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/Events.js.map +1 -0
- package/lib/Types/GroupMetadata.d.ts +71 -0
- package/lib/Types/GroupMetadata.d.ts.map +1 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/GroupMetadata.js.map +1 -0
- package/lib/Types/Label.d.ts +47 -0
- package/lib/Types/Label.d.ts.map +1 -0
- package/lib/Types/Label.js +25 -0
- package/lib/Types/Label.js.map +1 -0
- package/lib/Types/LabelAssociation.d.ts +30 -0
- package/lib/Types/LabelAssociation.d.ts.map +1 -0
- package/lib/Types/LabelAssociation.js +7 -0
- package/lib/Types/LabelAssociation.js.map +1 -0
- package/lib/Types/Message.d.ts +320 -0
- package/lib/Types/Message.d.ts.map +1 -0
- package/lib/Types/Message.js +11 -0
- package/lib/Types/Message.js.map +1 -0
- package/lib/Types/Mex.d.ts +141 -0
- package/lib/Types/Mex.d.ts.map +1 -0
- package/lib/Types/Mex.js +37 -0
- package/lib/Types/Mex.js.map +1 -0
- package/lib/Types/Newsletter.js +165 -0
- package/lib/Types/Product.d.ts +79 -0
- package/lib/Types/Product.d.ts.map +1 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Product.js.map +1 -0
- package/lib/Types/Signal.d.ts +87 -0
- package/lib/Types/Signal.d.ts.map +1 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Signal.js.map +1 -0
- package/lib/Types/Socket.d.ts +136 -0
- package/lib/Types/Socket.d.ts.map +1 -0
- package/lib/Types/Socket.js +3 -0
- package/lib/Types/Socket.js.map +1 -0
- package/lib/Types/State.d.ts +97 -0
- package/lib/Types/State.d.ts.map +1 -0
- package/lib/Types/State.js +56 -0
- package/lib/Types/State.js.map +1 -0
- package/lib/Types/USync.d.ts +26 -0
- package/lib/Types/USync.d.ts.map +1 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/USync.js.map +1 -0
- package/lib/Types/index.d.ts +66 -0
- package/lib/Types/index.d.ts.map +1 -0
- package/lib/Types/index.js +28 -0
- package/lib/Types/index.js.map +1 -0
- package/lib/Utils/auth-utils.d.ts +24 -0
- package/lib/Utils/auth-utils.d.ts.map +1 -0
- package/lib/Utils/auth-utils.js +302 -0
- package/lib/Utils/auth-utils.js.map +1 -0
- package/lib/Utils/browser-utils.d.ts +4 -0
- package/lib/Utils/browser-utils.d.ts.map +1 -0
- package/lib/Utils/browser-utils.js +29 -0
- package/lib/Utils/browser-utils.js.map +1 -0
- package/lib/Utils/business.d.ts +23 -0
- package/lib/Utils/business.d.ts.map +1 -0
- package/lib/Utils/business.js +231 -0
- package/lib/Utils/business.js.map +1 -0
- package/lib/Utils/chat-utils.d.ts +100 -0
- package/lib/Utils/chat-utils.d.ts.map +1 -0
- package/lib/Utils/chat-utils.js +872 -0
- package/lib/Utils/chat-utils.js.map +1 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
- package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
- package/lib/Utils/companion-reg-client-utils.js +35 -0
- package/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/lib/Utils/consumer-application.js +108 -0
- package/lib/Utils/crypto.d.ts +37 -0
- package/lib/Utils/crypto.d.ts.map +1 -0
- package/lib/Utils/crypto.js +118 -0
- package/lib/Utils/crypto.js.map +1 -0
- package/lib/Utils/decode-wa-message.d.ts +66 -0
- package/lib/Utils/decode-wa-message.d.ts.map +1 -0
- package/lib/Utils/decode-wa-message.js +317 -0
- package/lib/Utils/decode-wa-message.js.map +1 -0
- package/lib/Utils/event-buffer.d.ts +36 -0
- package/lib/Utils/event-buffer.d.ts.map +1 -0
- package/lib/Utils/event-buffer.js +622 -0
- package/lib/Utils/event-buffer.js.map +1 -0
- package/lib/Utils/generics.d.ts +92 -0
- package/lib/Utils/generics.d.ts.map +1 -0
- package/lib/Utils/generics.js +393 -0
- package/lib/Utils/generics.js.map +1 -0
- package/lib/Utils/group-history.js +55 -0
- package/lib/Utils/history.d.ts +24 -0
- package/lib/Utils/history.d.ts.map +1 -0
- package/lib/Utils/history.js +134 -0
- package/lib/Utils/history.js.map +1 -0
- package/lib/Utils/identity-change-handler.d.ts +44 -0
- package/lib/Utils/identity-change-handler.d.ts.map +1 -0
- package/lib/Utils/identity-change-handler.js +50 -0
- package/lib/Utils/identity-change-handler.js.map +1 -0
- package/lib/Utils/index.d.ts +22 -0
- package/lib/Utils/index.d.ts.map +1 -0
- package/lib/Utils/index.js +29 -0
- package/lib/Utils/index.js.map +1 -0
- package/lib/Utils/jid-display-normalization.js +171 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.d.ts.map +1 -0
- package/lib/Utils/link-preview.js +85 -0
- package/lib/Utils/link-preview.js.map +1 -0
- package/lib/Utils/logger.d.ts +12 -0
- package/lib/Utils/logger.d.ts.map +1 -0
- package/lib/Utils/logger.js +3 -0
- package/lib/Utils/logger.js.map +1 -0
- package/lib/Utils/lt-hash.d.ts +8 -0
- package/lib/Utils/lt-hash.d.ts.map +1 -0
- package/lib/Utils/lt-hash.js +8 -0
- package/lib/Utils/lt-hash.js.map +1 -0
- package/lib/Utils/make-mutex.d.ts +9 -0
- package/lib/Utils/make-mutex.d.ts.map +1 -0
- package/lib/Utils/make-mutex.js +33 -0
- package/lib/Utils/make-mutex.js.map +1 -0
- package/lib/Utils/message-composer.js +241 -0
- package/lib/Utils/message-inspect.js +180 -0
- package/lib/Utils/message-retry-manager.d.ts +115 -0
- package/lib/Utils/message-retry-manager.d.ts.map +1 -0
- package/lib/Utils/message-retry-manager.js +265 -0
- package/lib/Utils/message-retry-manager.js.map +1 -0
- package/lib/Utils/messages-media.d.ts +133 -0
- package/lib/Utils/messages-media.d.ts.map +1 -0
- package/lib/Utils/messages-media.js +788 -0
- package/lib/Utils/messages-media.js.map +1 -0
- package/lib/Utils/messages.d.ts +91 -0
- package/lib/Utils/messages.d.ts.map +1 -0
- package/lib/Utils/messages.js +893 -0
- package/lib/Utils/messages.js.map +1 -0
- package/lib/Utils/meta-ai-msmsg.js +225 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/noise-handler.d.ts.map +1 -0
- package/lib/Utils/noise-handler.js +201 -0
- package/lib/Utils/noise-handler.js.map +1 -0
- package/lib/Utils/offline-node-processor.d.ts +17 -0
- package/lib/Utils/offline-node-processor.d.ts.map +1 -0
- package/lib/Utils/offline-node-processor.js +40 -0
- package/lib/Utils/offline-node-processor.js.map +1 -0
- package/lib/Utils/pre-key-manager.d.ts +28 -0
- package/lib/Utils/pre-key-manager.d.ts.map +1 -0
- package/lib/Utils/pre-key-manager.js +106 -0
- package/lib/Utils/pre-key-manager.js.map +1 -0
- package/lib/Utils/process-message.d.ts +60 -0
- package/lib/Utils/process-message.d.ts.map +1 -0
- package/lib/Utils/process-message.js +630 -0
- package/lib/Utils/process-message.js.map +1 -0
- package/lib/Utils/reporting-utils.d.ts +11 -0
- package/lib/Utils/reporting-utils.d.ts.map +1 -0
- package/lib/Utils/reporting-utils.js +258 -0
- package/lib/Utils/reporting-utils.js.map +1 -0
- package/lib/Utils/signal.d.ts +47 -0
- package/lib/Utils/signal.d.ts.map +1 -0
- package/lib/Utils/signal.js +201 -0
- package/lib/Utils/signal.js.map +1 -0
- package/lib/Utils/stanza-ack.d.ts +11 -0
- package/lib/Utils/stanza-ack.d.ts.map +1 -0
- package/lib/Utils/stanza-ack.js +38 -0
- package/lib/Utils/stanza-ack.js.map +1 -0
- package/lib/Utils/sync-action-utils.d.ts +19 -0
- package/lib/Utils/sync-action-utils.d.ts.map +1 -0
- package/lib/Utils/sync-action-utils.js +49 -0
- package/lib/Utils/sync-action-utils.js.map +1 -0
- package/lib/Utils/tc-token-utils.d.ts +37 -0
- package/lib/Utils/tc-token-utils.d.ts.map +1 -0
- package/lib/Utils/tc-token-utils.js +164 -0
- package/lib/Utils/tc-token-utils.js.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.js +121 -0
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -0
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/lib/Utils/validate-connection.d.ts.map +1 -0
- package/lib/Utils/validate-connection.js +210 -0
- package/lib/Utils/validate-connection.js.map +1 -0
- package/lib/Utils/voip-rekey.js +24 -0
- package/lib/WABinary/constants.d.ts +28 -0
- package/lib/WABinary/constants.d.ts.map +1 -0
- package/lib/WABinary/constants.js +1301 -0
- package/lib/WABinary/constants.js.map +1 -0
- package/lib/WABinary/decode.d.ts +7 -0
- package/lib/WABinary/decode.d.ts.map +1 -0
- package/lib/WABinary/decode.js +262 -0
- package/lib/WABinary/decode.js.map +1 -0
- package/lib/WABinary/encode.d.ts +3 -0
- package/lib/WABinary/encode.d.ts.map +1 -0
- package/lib/WABinary/encode.js +220 -0
- package/lib/WABinary/encode.js.map +1 -0
- package/lib/WABinary/generic-utils.d.ts +15 -0
- package/lib/WABinary/generic-utils.d.ts.map +1 -0
- package/lib/WABinary/generic-utils.js +113 -0
- package/lib/WABinary/generic-utils.js.map +1 -0
- package/lib/WABinary/index.d.ts +6 -0
- package/lib/WABinary/index.d.ts.map +1 -0
- package/lib/WABinary/index.js +6 -0
- package/lib/WABinary/index.js.map +1 -0
- package/lib/WABinary/jid-utils.d.ts +48 -0
- package/lib/WABinary/jid-utils.d.ts.map +1 -0
- package/lib/WABinary/jid-utils.js +96 -0
- package/lib/WABinary/jid-utils.js.map +1 -0
- package/lib/WABinary/types.d.ts +19 -0
- package/lib/WABinary/types.d.ts.map +1 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WABinary/types.js.map +1 -0
- package/lib/WAM/BinaryInfo.d.ts +9 -0
- package/lib/WAM/BinaryInfo.d.ts.map +1 -0
- package/lib/WAM/BinaryInfo.js +10 -0
- package/lib/WAM/BinaryInfo.js.map +1 -0
- package/lib/WAM/constants.d.ts +40 -0
- package/lib/WAM/constants.d.ts.map +1 -0
- package/lib/WAM/constants.js +22853 -0
- package/lib/WAM/constants.js.map +1 -0
- package/lib/WAM/encode.d.ts +3 -0
- package/lib/WAM/encode.d.ts.map +1 -0
- package/lib/WAM/encode.js +150 -0
- package/lib/WAM/encode.js.map +1 -0
- package/lib/WAM/index.d.ts +4 -0
- package/lib/WAM/index.d.ts.map +1 -0
- package/lib/WAM/index.js +4 -0
- package/lib/WAM/index.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +90 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +52 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +53 -0
- package/lib/WAUSync/Protocols/USyncPictureProtocol.js +29 -0
- package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +26 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +29 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/index.d.ts +6 -0
- package/lib/WAUSync/Protocols/index.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/index.js +11 -0
- package/lib/WAUSync/Protocols/index.js.map +1 -0
- package/lib/WAUSync/USyncBackoff.js +35 -0
- package/lib/WAUSync/USyncQuery.d.ts +30 -0
- package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
- package/lib/WAUSync/USyncQuery.js +98 -0
- package/lib/WAUSync/USyncQuery.js.map +1 -0
- package/lib/WAUSync/USyncUser.d.ts +17 -0
- package/lib/WAUSync/USyncUser.d.ts.map +1 -0
- package/lib/WAUSync/USyncUser.js +31 -0
- package/lib/WAUSync/USyncUser.js.map +1 -0
- package/lib/WAUSync/index.d.ts +4 -0
- package/lib/WAUSync/index.d.ts.map +1 -0
- package/lib/WAUSync/index.js +5 -0
- package/lib/WAUSync/index.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -0
- package/package.json +134 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LTHashAntiTampering } from 'whatsapp-rust-bridge';
|
|
2
|
+
/**
|
|
3
|
+
* LT Hash is a summation based hash algorithm that maintains the integrity of a piece of data
|
|
4
|
+
* over a series of mutations. You can add/remove mutations and it'll return a hash equal to
|
|
5
|
+
* if the same series of mutations was made sequentially.
|
|
6
|
+
*/
|
|
7
|
+
export const LT_HASH_ANTI_TAMPERING = new LTHashAntiTampering();
|
|
8
|
+
//# sourceMappingURL=lt-hash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lt-hash.js","sourceRoot":"","sources":["../../src/Utils/lt-hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,mBAAmB,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const makeMutex: () => {
|
|
2
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
3
|
+
};
|
|
4
|
+
export type Mutex = ReturnType<typeof makeMutex>;
|
|
5
|
+
export declare const makeKeyedMutex: () => {
|
|
6
|
+
mutex<T>(key: string, task: () => Promise<T> | T): Promise<T>;
|
|
7
|
+
};
|
|
8
|
+
export type KeyedMutex = ReturnType<typeof makeKeyedMutex>;
|
|
9
|
+
//# sourceMappingURL=make-mutex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make-mutex.d.ts","sourceRoot":"","sources":["../../src/Utils/make-mutex.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;UAId,CAAC,QAAQ,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAIjD,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAA;AAEhD,eAAO,MAAM,cAAc;UAIb,CAAC,OAAO,MAAM,QAAQ,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAqBpE,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Mutex as AsyncMutex } from 'async-mutex';
|
|
2
|
+
export const makeMutex = () => {
|
|
3
|
+
const mutex = new AsyncMutex();
|
|
4
|
+
return {
|
|
5
|
+
mutex(code) {
|
|
6
|
+
return mutex.runExclusive(code);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export const makeKeyedMutex = () => {
|
|
11
|
+
const map = new Map();
|
|
12
|
+
return {
|
|
13
|
+
async mutex(key, task) {
|
|
14
|
+
let entry = map.get(key);
|
|
15
|
+
if (!entry) {
|
|
16
|
+
entry = { mutex: new AsyncMutex(), refCount: 0 };
|
|
17
|
+
map.set(key, entry);
|
|
18
|
+
}
|
|
19
|
+
entry.refCount++;
|
|
20
|
+
try {
|
|
21
|
+
return await entry.mutex.runExclusive(task);
|
|
22
|
+
}
|
|
23
|
+
finally {
|
|
24
|
+
entry.refCount--;
|
|
25
|
+
// only delete it if this is still the current entry
|
|
26
|
+
if (entry.refCount === 0 && map.get(key) === entry) {
|
|
27
|
+
map.delete(key);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=make-mutex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make-mutex.js","sourceRoot":"","sources":["../../src/Utils/make-mutex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAEjD,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC7B,MAAM,KAAK,GAAG,IAAI,UAAU,EAAE,CAAA;IAE9B,OAAO;QACN,KAAK,CAAI,IAA0B;YAClC,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;QAChC,CAAC;KACD,CAAA;AACF,CAAC,CAAA;AAID,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IAClC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAmD,CAAA;IAEtE,OAAO;QACN,KAAK,CAAC,KAAK,CAAI,GAAW,EAAE,IAA0B;YACrD,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAExB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACZ,KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAA;gBAChD,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;YACpB,CAAC;YAED,KAAK,CAAC,QAAQ,EAAE,CAAA;YAEhB,IAAI,CAAC;gBACJ,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;YAC5C,CAAC;oBAAS,CAAC;gBACV,KAAK,CAAC,QAAQ,EAAE,CAAA;gBAChB,oDAAoD;gBACpD,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC;oBACpD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBAChB,CAAC;YACF,CAAC;QACF,CAAC;KACD,CAAA;AACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { randomBytes, randomUUID } from 'crypto';
|
|
2
|
+
import { generateMessageIDV2 } from './generics.js';
|
|
3
|
+
|
|
4
|
+
export const JS_KEYWORDS = new Set([
|
|
5
|
+
'import','export','from','default','as','const','let','var','function','class','extends',
|
|
6
|
+
'new','return','if','else','for','while','do','switch','case','break','continue','try',
|
|
7
|
+
'catch','finally','throw','async','await','yield','typeof','instanceof','in','of','delete',
|
|
8
|
+
'void','true','false','null','undefined','NaN','Infinity','this','super','static','get',
|
|
9
|
+
'set','debugger','with'
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
export const PYTHON_KEYWORDS = new Set([
|
|
13
|
+
'import','from','as','def','class','return','if','elif','else','for','while','break',
|
|
14
|
+
'continue','try','except','finally','raise','with','yield','lambda','pass','del','global',
|
|
15
|
+
'nonlocal','assert','True','False','None','and','or','not','in','is','async','await',
|
|
16
|
+
'self','print'
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
export const LANGUAGE_KEYWORDS = {
|
|
20
|
+
javascript: JS_KEYWORDS, typescript: JS_KEYWORDS, js: JS_KEYWORDS, ts: JS_KEYWORDS,
|
|
21
|
+
python: PYTHON_KEYWORDS, py: PYTHON_KEYWORDS
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const CodeHighlightType = { DEFAULT: 0, KEYWORD: 1, METHOD: 2, STRING: 3, NUMBER: 4, COMMENT: 5 };
|
|
25
|
+
export const RichSubMessageType = { UNKNOWN: 0, GRID_IMAGE: 1, TEXT: 2, INLINE_IMAGE: 3, TABLE: 4, CODE: 5, DYNAMIC: 6, MAP: 7, LATEX: 8, CONTENT_ITEMS: 9 };
|
|
26
|
+
|
|
27
|
+
export const tokenizeCode = (codeStr, language = 'javascript') => {
|
|
28
|
+
const keywords = LANGUAGE_KEYWORDS[language] || JS_KEYWORDS;
|
|
29
|
+
const blocks = [];
|
|
30
|
+
const lines = codeStr.split('\n');
|
|
31
|
+
for (let li = 0; li < lines.length; li++) {
|
|
32
|
+
const line = lines[li];
|
|
33
|
+
const isLast = li === lines.length - 1;
|
|
34
|
+
const nl = isLast ? '' : '\n';
|
|
35
|
+
if (!line.trim()) { blocks.push({ highlightType: CodeHighlightType.DEFAULT, codeContent: line + nl }); continue; }
|
|
36
|
+
if (line.trim().startsWith('//') || line.trim().startsWith('#')) {
|
|
37
|
+
blocks.push({ highlightType: CodeHighlightType.COMMENT, codeContent: line + nl }); continue;
|
|
38
|
+
}
|
|
39
|
+
const regex = /(\/\/.*$|#.*$)|([\"'`](?:[^\"'`\\]|\\.)*[\"'`])|(\b\d+(?:\.\d+)?\b)|(\b[a-zA-Z_$][\w$]*\b)|([^\s\w$\"'`]+)|(\s+)/g;
|
|
40
|
+
let match;
|
|
41
|
+
const tokens = [];
|
|
42
|
+
while ((match = regex.exec(line)) !== null) {
|
|
43
|
+
const val = match[0];
|
|
44
|
+
if (match[1]) { tokens.push({ highlightType: CodeHighlightType.COMMENT, codeContent: val }); }
|
|
45
|
+
else if (match[2]) { tokens.push({ highlightType: CodeHighlightType.STRING, codeContent: val }); }
|
|
46
|
+
else if (match[3]) { tokens.push({ highlightType: CodeHighlightType.NUMBER, codeContent: val }); }
|
|
47
|
+
else if (match[4]) {
|
|
48
|
+
if (keywords.has(val)) { tokens.push({ highlightType: CodeHighlightType.KEYWORD, codeContent: val }); }
|
|
49
|
+
else {
|
|
50
|
+
const after = line.slice(regex.lastIndex).trimStart();
|
|
51
|
+
tokens.push({ highlightType: after.startsWith('(') ? CodeHighlightType.METHOD : CodeHighlightType.DEFAULT, codeContent: val });
|
|
52
|
+
}
|
|
53
|
+
} else { tokens.push({ highlightType: CodeHighlightType.DEFAULT, codeContent: val }); }
|
|
54
|
+
}
|
|
55
|
+
if (!tokens.length) { blocks.push({ highlightType: CodeHighlightType.DEFAULT, codeContent: line + nl }); continue; }
|
|
56
|
+
const merged = [];
|
|
57
|
+
for (const t of tokens) {
|
|
58
|
+
const prev = merged.length > 0 ? merged[merged.length - 1] : undefined;
|
|
59
|
+
if (prev && prev.highlightType === t.highlightType) { prev.codeContent += t.codeContent; }
|
|
60
|
+
else { merged.push({ ...t }); }
|
|
61
|
+
}
|
|
62
|
+
if (merged.length > 0) merged[merged.length - 1].codeContent += nl;
|
|
63
|
+
blocks.push(...merged);
|
|
64
|
+
}
|
|
65
|
+
return blocks;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const buildRichContextInfo = (quoted, options = {}) => {
|
|
69
|
+
const ctxInfo = {
|
|
70
|
+
forwardingScore: 1,
|
|
71
|
+
isForwarded: true,
|
|
72
|
+
forwardedAiBotMessageInfo: { botJid: options.botJid ? options.botJid : '867051314767696@bot' },
|
|
73
|
+
forwardOrigin: 4,
|
|
74
|
+
...(options.mentions ? { mentionedJid: options.mentions } : {})
|
|
75
|
+
};
|
|
76
|
+
if (quoted?.key) {
|
|
77
|
+
ctxInfo.stanzaId = quoted.key.id;
|
|
78
|
+
ctxInfo.participant = quoted.key.participant || quoted.sender || quoted.key.remoteJid;
|
|
79
|
+
ctxInfo.quotedMessage = quoted.message;
|
|
80
|
+
}
|
|
81
|
+
return ctxInfo;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const buildBotForwardedMessage = (submessages, contextInfo, unifiedResponse) => {
|
|
85
|
+
const richResponse = { messageType: 1, submessages, contextInfo };
|
|
86
|
+
if (unifiedResponse) richResponse.unifiedResponse = unifiedResponse;
|
|
87
|
+
return { botForwardedMessage: { message: { richResponseMessage: richResponse } } };
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const generateTableContent = (title, headers, rows, quoted, options = {}) => {
|
|
91
|
+
const { footer, headerText } = options;
|
|
92
|
+
const tableRows = [{ items: headers, isHeading: true }, ...rows.map(row => ({ items: row.map(String) }))];
|
|
93
|
+
const submessages = [];
|
|
94
|
+
if (headerText) submessages.push({ messageType: 2, messageText: headerText });
|
|
95
|
+
submessages.push({ messageType: 4, tableMetadata: { title, rows: tableRows } });
|
|
96
|
+
if (footer) submessages.push({ messageType: 2, messageText: footer });
|
|
97
|
+
return { message: buildBotForwardedMessage(submessages, buildRichContextInfo(quoted)), messageId: generateMessageIDV2() };
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const generateListContent = (title, items, quoted, options = {}) => {
|
|
101
|
+
const { footer, headerText } = options;
|
|
102
|
+
const tableRows = items.map(item => ({ items: Array.isArray(item) ? item.map(String) : [String(item)] }));
|
|
103
|
+
const submessages = [];
|
|
104
|
+
if (headerText) submessages.push({ messageType: 2, messageText: headerText });
|
|
105
|
+
submessages.push({ messageType: 4, tableMetadata: { title, rows: tableRows } });
|
|
106
|
+
if (footer) submessages.push({ messageType: 2, messageText: footer });
|
|
107
|
+
return { message: buildBotForwardedMessage(submessages, buildRichContextInfo(quoted)), messageId: generateMessageIDV2() };
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const generateCodeBlockContent = (code, quoted, options = {}) => {
|
|
111
|
+
const { title, footer, language = 'javascript' } = options;
|
|
112
|
+
const submessages = [];
|
|
113
|
+
if (title) submessages.push({ messageType: 2, messageText: title });
|
|
114
|
+
submessages.push({ messageType: 5, codeMetadata: { codeLanguage: language, codeBlocks: tokenizeCode(code, language) } });
|
|
115
|
+
if (footer) submessages.push({ messageType: 2, messageText: footer });
|
|
116
|
+
return { message: buildBotForwardedMessage(submessages, buildRichContextInfo(quoted)), messageId: generateMessageIDV2() };
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const generateLatexContent = (quoted, options) => {
|
|
120
|
+
const { text, expressions, headerText, footer } = options;
|
|
121
|
+
const submessages = [];
|
|
122
|
+
if (headerText) submessages.push({ messageType: 2, messageText: headerText });
|
|
123
|
+
const latexExpressions = expressions.map(expr => {
|
|
124
|
+
const entry = { latexExpression: expr.latexExpression, url: expr.url, width: expr.width, height: expr.height };
|
|
125
|
+
if (expr.fontHeight !== undefined) entry.fontHeight = expr.fontHeight;
|
|
126
|
+
if (expr.imageTopPadding !== undefined) entry.imageTopPadding = expr.imageTopPadding;
|
|
127
|
+
if (expr.imageLeadingPadding !== undefined) entry.imageLeadingPadding = expr.imageLeadingPadding;
|
|
128
|
+
if (expr.imageBottomPadding !== undefined) entry.imageBottomPadding = expr.imageBottomPadding;
|
|
129
|
+
if (expr.imageTrailingPadding !== undefined) entry.imageTrailingPadding = expr.imageTrailingPadding;
|
|
130
|
+
return entry;
|
|
131
|
+
});
|
|
132
|
+
submessages.push({ messageType: 8, latexMetadata: { text: text || '', expressions: latexExpressions } });
|
|
133
|
+
if (footer) submessages.push({ messageType: 2, messageText: footer });
|
|
134
|
+
return { message: buildBotForwardedMessage(submessages, buildRichContextInfo(quoted)), messageId: generateMessageIDV2() };
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export const generateLatexImageContent = async (quoted, options, uploadFn, renderLatexToPng) => {
|
|
138
|
+
const { text, expressions, headerText, footer } = options;
|
|
139
|
+
const submessages = [];
|
|
140
|
+
if (headerText) submessages.push({ messageType: 2, messageText: headerText });
|
|
141
|
+
const latexExpressions = await Promise.all(expressions.map(async expr => {
|
|
142
|
+
const { buffer, width, height } = await renderLatexToPng(expr.latexExpression);
|
|
143
|
+
const uploadResult = await uploadFn(buffer, 'image');
|
|
144
|
+
return { latexExpression: expr.latexExpression, url: uploadResult.url || uploadResult.directPath, width, height };
|
|
145
|
+
}));
|
|
146
|
+
submessages.push({ messageType: 8, latexMetadata: { text: text || '', expressions: latexExpressions } });
|
|
147
|
+
if (footer) submessages.push({ messageType: 2, messageText: footer });
|
|
148
|
+
return { message: buildBotForwardedMessage(submessages, buildRichContextInfo(quoted)), messageId: generateMessageIDV2() };
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const generateLatexInlineImageContent = async (quoted, options, uploadFn, renderLatexToPng) => {
|
|
152
|
+
const { text, expressions, headerText, footer } = options;
|
|
153
|
+
const submessages = [];
|
|
154
|
+
if (headerText) submessages.push({ messageType: 2, messageText: headerText });
|
|
155
|
+
if (text) submessages.push({ messageType: 2, messageText: text });
|
|
156
|
+
for (const expr of expressions) {
|
|
157
|
+
const { buffer, width, height } = await renderLatexToPng(expr.latexExpression);
|
|
158
|
+
const uploadResult = await uploadFn(buffer, 'image');
|
|
159
|
+
const imageUrl = uploadResult.url || uploadResult.directPath;
|
|
160
|
+
submessages.push({
|
|
161
|
+
messageType: 3,
|
|
162
|
+
imageMetadata: {
|
|
163
|
+
imageUrl: { imagePreviewUrl: imageUrl, imageHighResUrl: imageUrl },
|
|
164
|
+
imageText: expr.latexExpression, alignment: 2
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
if (footer) submessages.push({ messageType: 2, messageText: footer });
|
|
169
|
+
return { message: buildBotForwardedMessage(submessages, buildRichContextInfo(quoted)), messageId: generateMessageIDV2() };
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export const captureUnifiedResponse = msg => {
|
|
173
|
+
const botFwd = msg?.botForwardedMessage?.message;
|
|
174
|
+
if (!botFwd) return null;
|
|
175
|
+
const rich = botFwd.richResponseMessage;
|
|
176
|
+
if (!rich?.unifiedResponse?.data) return null;
|
|
177
|
+
return { unifiedResponse: { data: rich.unifiedResponse.data }, submessages: rich.submessages || [], contextInfo: rich.contextInfo || {} };
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export const generateUnifiedResponseContent = (quoted, captured) => {
|
|
181
|
+
return { message: buildBotForwardedMessage(captured.submessages, buildRichContextInfo(quoted), captured.unifiedResponse), messageId: generateMessageIDV2() };
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export const generateRichMessageContent = (submessages, quoted, options) => {
|
|
185
|
+
return { message: buildBotForwardedMessage(submessages, buildRichContextInfo(quoted, options)), messageId: generateMessageIDV2() };
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const generateRichMenuContent = (content = {}, quoted, options = {}) => {
|
|
189
|
+
const header = content?.header;
|
|
190
|
+
const body = content?.body;
|
|
191
|
+
const footer = content?.footer;
|
|
192
|
+
const sections = [];
|
|
193
|
+
let messageContextInfo;
|
|
194
|
+
const randomToolId = () => randomBytes(8).toString('hex');
|
|
195
|
+
if (header) {
|
|
196
|
+
const { disclaimer = false, disclaimerText = ' ', image = { inline: false }, title = '' } = header ?? {};
|
|
197
|
+
if (disclaimer) messageContextInfo = { botMetadata: { messageDisclaimerText: disclaimerText } };
|
|
198
|
+
if (title) sections.push({ __typename: 'GenAIUnifiedResponseSection', view_model: { __typename: 'GenAISingleLayoutViewModel', primitive: { __typename: 'FOATextPrimitive', text: '# ' + title } } });
|
|
199
|
+
if (image?.url) {
|
|
200
|
+
if (image?.inline) {
|
|
201
|
+
sections.push({ __typename: 'GenAIUnifiedResponseSection', view_model: { __typename: 'GenAISingleLayoutViewModel', primitive: { __typename: 'GenAIMarkdownTextUXPrimitive', text: '{{header}}.{{/header}}', inline_entities: [{ __typename: 'GenAITextInlineEntity', key: 'header', metadata: { __typename: 'GenAILatexItem', latex_expression: '.', font_height: 24, padding: 4, latex_image: { __typename: 'GenAIMediaItem', mime_type: image.mime_type || 'image/png', url: image.url, url_fallback: image.url, width: image.width || 500, height: image.height || 500, expiration_timestamp_ms: Date.now() + 86400000 } } }] } } });
|
|
202
|
+
} else {
|
|
203
|
+
sections.push({ __typename: 'GenAIUnifiedResponseSection', view_model: { __typename: 'GenAISingleLayoutViewModel', primitive: { __typename: 'GenAIImagePrimitive', preview_image: { __typename: 'GenAIMediaItem', mime_type: image.mime_type || 'image/png', url: image.url }, full_image: { __typename: 'GenAIMediaItem', mime_type: image.mime_type || 'image/png', url: image.url } } } });
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (body) {
|
|
208
|
+
const { cards = null, buttons = null, title = '', toast = '', carousel = false, row = false } = body ?? {};
|
|
209
|
+
if (carousel || row) {
|
|
210
|
+
if (cards?.length >= 1) {
|
|
211
|
+
sections.push({ __typename: 'GenAIUnifiedResponseSection', view_model: { primitives: cards.map(card => ({ __typename: 'GenAI3PExtWidgetPrimitive', header: { __typename: 'GenAI3PExtWidgetStandardHeader', title: card?.title || '' }, body: { __typename: 'GenAI3PExtCalendarEventList', ctas: (card?.buttons || []).map(text => ({ label: text, state: 'PENDING', kind: 'OTHER', tool_call_id: randomToolId(), toast: { label: card?.toast || '', __typename: 'GenAI3PExtWidgetToast' }, __typename: 'GenAI3PExtWidgetCTA' })), sections: [] } })), __typename: carousel ? 'GenAIHScrollLayoutViewModel' : 'GenAIActionRowLayoutViewModel' } });
|
|
212
|
+
}
|
|
213
|
+
} else if (buttons?.length) {
|
|
214
|
+
sections.push({ __typename: 'GenAIUnifiedResponseSection', view_model: { primitive: { __typename: 'GenAI3PExtWidgetPrimitive', header: { __typename: 'GenAI3PExtWidgetStandardHeader', title: title || '' }, body: { __typename: 'GenAI3PExtCalendarEventList', ctas: buttons.map(text => ({ label: text, state: 'PENDING', kind: 'OTHER', tool_call_id: randomToolId(), toast: { label: toast, __typename: 'GenAI3PExtWidgetToast' }, __typename: 'GenAI3PExtWidgetCTA' })), sections: [] } }, __typename: 'GenAISingleLayoutViewModel' } });
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (footer) {
|
|
218
|
+
const { text = '', url = '', image = {} } = footer ?? {};
|
|
219
|
+
const img = [];
|
|
220
|
+
if (image?.url) {
|
|
221
|
+
img.push({ __typename: 'GenAIMarkdownTextUXPrimitive', text: '{{header}}.{{/header}}', inline_entities: [{ __typename: 'GenAITextInlineEntity', key: 'header', metadata: { __typename: 'GenAILatexItem', latex_expression: '.', font_height: 24, padding: -5, latex_image: { __typename: 'GenAIMediaItem', mime_type: image.mime_type || 'image/png', url: image.url, url_fallback: image.url, width: image.width || 100, height: image.height || 100, expiration_timestamp_ms: Date.now() + 86400000 } } }] });
|
|
222
|
+
}
|
|
223
|
+
sections.push({ view_model: { primitives: [{ cta_text: text || '', cta_type: 'OPEN_URL', cta_url: url || '', __typename: 'GenAIFooterActionPrimitive' }, ...img], __typename: 'GenAIActionRowLayoutViewModel' } });
|
|
224
|
+
}
|
|
225
|
+
const ctxInfo = buildRichContextInfo(quoted, options);
|
|
226
|
+
if (content?.contextInfo) Object.assign(ctxInfo, content.contextInfo);
|
|
227
|
+
const unifiedResponse = { data: Buffer.from(JSON.stringify({ sections })).toString('base64') };
|
|
228
|
+
return { message: { ...(messageContextInfo ? { messageContextInfo } : {}), ...buildBotForwardedMessage(undefined, ctxInfo, unifiedResponse) }, messageId: generateMessageIDV2() };
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export const generateHtmlContent = (html = '', quoted, options = {}) => {
|
|
232
|
+
const ctxInfo = buildRichContextInfo(quoted, options);
|
|
233
|
+
const unifiedResponse = {
|
|
234
|
+
data: Buffer.from(JSON.stringify({
|
|
235
|
+
__typename: 'GenAIUnifiedResponse',
|
|
236
|
+
response_id: randomUUID(),
|
|
237
|
+
sections: [{ __typename: 'GenAIUnifiedResponseSection', view_model: { __typename: 'GenAISingleLayoutViewModel', primitive: { __typename: 'FOAHtmlPrimitiveDemoDONOTUSE', trusted_sources: [], payload: String(html).trim() } } }]
|
|
238
|
+
})).toString('base64')
|
|
239
|
+
};
|
|
240
|
+
return { message: buildBotForwardedMessage(undefined, ctxInfo, unifiedResponse), messageId: generateMessageIDV2() };
|
|
241
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* message-inspect.js — Extended message inspection utilities (from Baron Baileys).
|
|
3
|
+
* Contains NEW functions not present in the original messages.js.
|
|
4
|
+
* Functions that already exist in messages.js are NOT duplicated here.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { proto } from '../../WAProto/index.js';
|
|
8
|
+
import { jidDecode, isLidUser, isHostedLidUser, isPnUser, isHostedPnUser } from '../WABinary/index.js';
|
|
9
|
+
import { getKeyAuthor } from './generics.js';
|
|
10
|
+
|
|
11
|
+
// ─── Extended normalizeMessageContent ─────────────────────────────────────────
|
|
12
|
+
// Baron adds many new message types not in the original normalizeMessageContent.
|
|
13
|
+
// Use this if you need the extended version that covers newer WA message types.
|
|
14
|
+
|
|
15
|
+
const getFutureProofMessage = message => (
|
|
16
|
+
message.ephemeralMessage ||
|
|
17
|
+
message.viewOnceMessage ||
|
|
18
|
+
message.documentWithCaptionMessage ||
|
|
19
|
+
message.viewOnceMessageV2 ||
|
|
20
|
+
message.viewOnceMessageV2Extension ||
|
|
21
|
+
message.editedMessage ||
|
|
22
|
+
message.groupMentionedMessage ||
|
|
23
|
+
message.botInvokeMessage ||
|
|
24
|
+
message.lottieStickerMessage ||
|
|
25
|
+
message.eventCoverImage ||
|
|
26
|
+
message.statusMentionMessage ||
|
|
27
|
+
message.pollCreationOptionImageMessage ||
|
|
28
|
+
message.associatedChildMessage ||
|
|
29
|
+
message.groupStatusMentionMessage ||
|
|
30
|
+
message.pollCreationMessageV4 ||
|
|
31
|
+
message.pollCreationMessageV5 ||
|
|
32
|
+
message.statusAddYours ||
|
|
33
|
+
message.groupStatusMessage ||
|
|
34
|
+
message.limitSharingMessage ||
|
|
35
|
+
message.botTaskMessage ||
|
|
36
|
+
message.questionMessage ||
|
|
37
|
+
message.groupStatusMessageV2 ||
|
|
38
|
+
message.botForwardedMessage ||
|
|
39
|
+
message.questionReplyMessage ||
|
|
40
|
+
message.newsletterAdminProfileMessage ||
|
|
41
|
+
message.newsletterAdminProfileMessageV2 ||
|
|
42
|
+
message.newsletterAdminProfileStatusMessage ||
|
|
43
|
+
message.spoilerMessage ||
|
|
44
|
+
message.groupStatusV3Message ||
|
|
45
|
+
message.pollCreationMessageV6 ||
|
|
46
|
+
message.botPlatformRegistrationSuccessMessage ||
|
|
47
|
+
message.newsletterScheduledMessage ||
|
|
48
|
+
message.acp2SettingMessage ||
|
|
49
|
+
message.audioStickerMessage
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
import { sha256 } from './crypto.js';
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Extended version of normalizeMessageContent — covers all Baron message types.
|
|
56
|
+
* Use instead of the original when dealing with newer WA message types.
|
|
57
|
+
*/
|
|
58
|
+
export const normalizeMessageContentExtended = content => {
|
|
59
|
+
if (!content) return undefined;
|
|
60
|
+
for (let i = 0; i < 5; i++) {
|
|
61
|
+
const inner = getFutureProofMessage(content);
|
|
62
|
+
if (!inner) break;
|
|
63
|
+
content = inner.message;
|
|
64
|
+
}
|
|
65
|
+
return content;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// ─── Scheduled Messages ───────────────────────────────────────────────────────
|
|
69
|
+
|
|
70
|
+
/** Check if a WebMessageInfo has a scheduled reveal time (ConditionalRevealMessage). */
|
|
71
|
+
export const isScheduledMessage = msg => !!msg?.scheduledMessageMetadata?.scheduledTime;
|
|
72
|
+
|
|
73
|
+
/** Get scheduled reveal time of a message as a Date, or null. */
|
|
74
|
+
export const getScheduledMessageTime = msg => {
|
|
75
|
+
const t = msg?.scheduledMessageMetadata?.scheduledTime;
|
|
76
|
+
if (!t) return null;
|
|
77
|
+
return new Date(Number(t) * 1000);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// ─── Payment / Comment / Add-ons ─────────────────────────────────────────────
|
|
81
|
+
|
|
82
|
+
/** Extract PaymentInfo from a WebMessageInfo. */
|
|
83
|
+
export const getMessagePaymentInfo = msg => msg?.paymentInfo || msg?.quotedPaymentInfo || null;
|
|
84
|
+
|
|
85
|
+
/** Get comment metadata from a WebMessageInfo. */
|
|
86
|
+
export const getMessageCommentMetadata = msg => msg?.commentMetadata || null;
|
|
87
|
+
|
|
88
|
+
/** Get all message add-ons (reactions, poll updates, pins) from a WebMessageInfo. */
|
|
89
|
+
export const getMessageAddOns = msg => msg?.messageAddOns || [];
|
|
90
|
+
|
|
91
|
+
// ─── Poll helpers (extended) ──────────────────────────────────────────────────
|
|
92
|
+
|
|
93
|
+
/** Get the quiz correct answer from a poll creation message, if it's a quiz. */
|
|
94
|
+
export const getPollCorrectAnswer = pollMsg => {
|
|
95
|
+
const poll =
|
|
96
|
+
pollMsg?.pollCreationMessage ||
|
|
97
|
+
pollMsg?.pollCreationMessageV2 ||
|
|
98
|
+
pollMsg?.pollCreationMessageV3 ||
|
|
99
|
+
pollMsg?.pollCreationMessageV5 ||
|
|
100
|
+
pollMsg?.pollCreationMessageV6;
|
|
101
|
+
if (!poll) return null;
|
|
102
|
+
const isQuiz = poll.pollType === proto.Message.PollType?.QUIZ || poll.pollType === 1;
|
|
103
|
+
return isQuiz ? poll.correctAnswer?.optionName || null : null;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Extended getAggregateVotesInPollMessage — also handles V4/V5/V6 poll messages.
|
|
108
|
+
*/
|
|
109
|
+
export const getAggregateVotesInPollMessageExtended = ({ message, pollUpdates }, meId) => {
|
|
110
|
+
const opts =
|
|
111
|
+
message?.pollCreationMessage?.options ||
|
|
112
|
+
message?.pollCreationMessageV2?.options ||
|
|
113
|
+
message?.pollCreationMessageV3?.options ||
|
|
114
|
+
message?.pollCreationMessageV5?.options ||
|
|
115
|
+
message?.pollCreationMessageV6?.options ||
|
|
116
|
+
message?.pollCreationMessageV4?.message?.pollCreationMessage?.options ||
|
|
117
|
+
message?.pollCreationMessageV4?.message?.pollCreationMessageV3?.options ||
|
|
118
|
+
[];
|
|
119
|
+
const voteHashMap = opts.reduce((acc, opt) => {
|
|
120
|
+
const hash = sha256(Buffer.from(opt.optionName || '')).toString();
|
|
121
|
+
acc[hash] = { name: opt.optionName || '', voters: [] };
|
|
122
|
+
return acc;
|
|
123
|
+
}, {});
|
|
124
|
+
for (const update of pollUpdates || []) {
|
|
125
|
+
const { vote } = update;
|
|
126
|
+
if (!vote) continue;
|
|
127
|
+
for (const option of vote.selectedOptions || []) {
|
|
128
|
+
const hash = option.toString();
|
|
129
|
+
if (!voteHashMap[hash]) voteHashMap[hash] = { name: 'Unknown', voters: [] };
|
|
130
|
+
voteHashMap[hash].voters.push(getKeyAuthor(update.pollUpdateMessageKey, meId));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return Object.values(voteHashMap);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// ─── Event Responses ──────────────────────────────────────────────────────────
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Aggregate all event responses in an event message.
|
|
140
|
+
* @param eventResponses array of event response updates
|
|
141
|
+
* @param meLid your LID JID
|
|
142
|
+
*/
|
|
143
|
+
export const getAggregateResponsesInEventMessage = ({ eventResponses }, meLid) => {
|
|
144
|
+
const responseTypes = ['GOING', 'NOT_GOING', 'MAYBE'];
|
|
145
|
+
const responseMap = {};
|
|
146
|
+
for (const type of responseTypes) responseMap[type] = { response: type, responders: [] };
|
|
147
|
+
for (const update of eventResponses || []) {
|
|
148
|
+
const { response } = update.response || {};
|
|
149
|
+
const responseType = proto.Message.EventResponseMessage.EventResponseType[response];
|
|
150
|
+
if (responseType !== 'UNKNOWN' && responseMap[responseType]) {
|
|
151
|
+
responseMap[responseType].responders.push(getKeyAuthor(update.eventResponseMessageKey, meLid));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return Object.values(responseMap);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// ─── LID / JID helpers ───────────────────────────────────────────────────────
|
|
158
|
+
|
|
159
|
+
/** Normalize a bare user id to @s.whatsapp.net. */
|
|
160
|
+
export const toJid = id => {
|
|
161
|
+
if (!id) return '';
|
|
162
|
+
if (id.includes('@')) return id;
|
|
163
|
+
return `${id}@s.whatsapp.net`;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/** Returns the peer LID JID when the key is LID-primary. */
|
|
167
|
+
export const getSenderLid = message => {
|
|
168
|
+
const k = message.key;
|
|
169
|
+
if (!k) return { jid: '', lid: '' };
|
|
170
|
+
const jid = k.participant || k.remoteJid || '';
|
|
171
|
+
if (jid.endsWith('@lid') || jid.endsWith('@hosted.lid')) return { jid, lid: jid };
|
|
172
|
+
if (k.lid && typeof k.lid === 'string') {
|
|
173
|
+
const lid = k.lid.includes('@') ? k.lid : jidDecode ? `${k.lid}@lid` : k.lid;
|
|
174
|
+
return { jid, lid };
|
|
175
|
+
}
|
|
176
|
+
if (k.participantLid && (isLidUser(k.participantLid) || isHostedLidUser(k.participantLid))) {
|
|
177
|
+
return { jid, lid: k.participantLid };
|
|
178
|
+
}
|
|
179
|
+
return { jid, lid: '' };
|
|
180
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { proto } from '../../WAProto/index.js';
|
|
2
|
+
import type { ILogger } from './logger.js';
|
|
3
|
+
export interface RecentMessageKey {
|
|
4
|
+
to: string;
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RecentMessage {
|
|
8
|
+
message: proto.IMessage;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
}
|
|
11
|
+
export interface SessionRecreateHistory {
|
|
12
|
+
[jid: string]: number;
|
|
13
|
+
}
|
|
14
|
+
export interface RetryCounter {
|
|
15
|
+
[messageId: string]: number;
|
|
16
|
+
}
|
|
17
|
+
export type PendingPhoneRequest = Record<string, ReturnType<typeof setTimeout>>;
|
|
18
|
+
export interface RetryStatistics {
|
|
19
|
+
totalRetries: number;
|
|
20
|
+
successfulRetries: number;
|
|
21
|
+
failedRetries: number;
|
|
22
|
+
mediaRetries: number;
|
|
23
|
+
sessionRecreations: number;
|
|
24
|
+
phoneRequests: number;
|
|
25
|
+
}
|
|
26
|
+
export declare enum RetryReason {
|
|
27
|
+
UnknownError = 0,
|
|
28
|
+
SignalErrorNoSession = 1,
|
|
29
|
+
SignalErrorInvalidKey = 2,
|
|
30
|
+
SignalErrorInvalidKeyId = 3,
|
|
31
|
+
/** MAC verification failed - most common cause of decryption failures */
|
|
32
|
+
SignalErrorInvalidMessage = 4,
|
|
33
|
+
SignalErrorInvalidSignature = 5,
|
|
34
|
+
SignalErrorFutureMessage = 6,
|
|
35
|
+
/** Explicit MAC failure - session is definitely out of sync */
|
|
36
|
+
SignalErrorBadMac = 7,
|
|
37
|
+
SignalErrorInvalidSession = 8,
|
|
38
|
+
SignalErrorInvalidMsgKey = 9,
|
|
39
|
+
BadBroadcastEphemeralSetting = 10,
|
|
40
|
+
UnknownCompanionNoPrekey = 11,
|
|
41
|
+
AdvFailure = 12,
|
|
42
|
+
StatusRevokeDelay = 13
|
|
43
|
+
}
|
|
44
|
+
export declare class MessageRetryManager {
|
|
45
|
+
private logger;
|
|
46
|
+
private recentMessagesMap;
|
|
47
|
+
private messageKeyIndex;
|
|
48
|
+
private sessionRecreateHistory;
|
|
49
|
+
private retryCounters;
|
|
50
|
+
private baseKeys;
|
|
51
|
+
private pendingPhoneRequests;
|
|
52
|
+
private readonly maxMsgRetryCount;
|
|
53
|
+
private statistics;
|
|
54
|
+
constructor(logger: ILogger, maxMsgRetryCount: number);
|
|
55
|
+
/**
|
|
56
|
+
* Add a recent message to the cache for retry handling
|
|
57
|
+
*/
|
|
58
|
+
addRecentMessage(to: string, id: string, message: proto.IMessage): void;
|
|
59
|
+
/**
|
|
60
|
+
* Get a recent message from the cache
|
|
61
|
+
*/
|
|
62
|
+
getRecentMessage(to: string, id: string): RecentMessage | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Check if a session should be recreated based on retry count, history, and error code.
|
|
65
|
+
* MAC errors (codes 4 and 7) trigger immediate session recreation regardless of timeout.
|
|
66
|
+
*/
|
|
67
|
+
shouldRecreateSession(jid: string, hasSession: boolean, errorCode?: RetryReason): {
|
|
68
|
+
reason: string;
|
|
69
|
+
recreate: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Parse error code from retry receipt's retry node.
|
|
73
|
+
* Returns undefined if no error code is present.
|
|
74
|
+
*/
|
|
75
|
+
parseRetryErrorCode(errorAttr: string | undefined): RetryReason | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Check if an error code indicates a MAC failure
|
|
78
|
+
*/
|
|
79
|
+
isMacError(errorCode: RetryReason | undefined): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Increment retry counter for a message
|
|
82
|
+
*/
|
|
83
|
+
incrementRetryCount(messageId: string): number;
|
|
84
|
+
/**
|
|
85
|
+
* Get retry count for a message
|
|
86
|
+
*/
|
|
87
|
+
getRetryCount(messageId: string): number;
|
|
88
|
+
/**
|
|
89
|
+
* Check if message has exceeded maximum retry attempts
|
|
90
|
+
*/
|
|
91
|
+
hasExceededMaxRetries(messageId: string): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Mark retry as successful
|
|
94
|
+
*/
|
|
95
|
+
markRetrySuccess(messageId: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* Mark retry as failed
|
|
98
|
+
*/
|
|
99
|
+
markRetryFailed(messageId: string): void;
|
|
100
|
+
/**
|
|
101
|
+
* Schedule a phone request with delay
|
|
102
|
+
*/
|
|
103
|
+
schedulePhoneRequest(messageId: string, callback: () => void, delay?: number): void;
|
|
104
|
+
/**
|
|
105
|
+
* Cancel pending phone request
|
|
106
|
+
*/
|
|
107
|
+
cancelPendingPhoneRequest(messageId: string): void;
|
|
108
|
+
clear(): void;
|
|
109
|
+
saveBaseKey(addr: string, msgId: string, baseKey: Uint8Array): void;
|
|
110
|
+
hasSameBaseKey(addr: string, msgId: string, baseKey: Uint8Array): boolean;
|
|
111
|
+
deleteBaseKey(addr: string, msgId: string): void;
|
|
112
|
+
private keyToString;
|
|
113
|
+
private removeRecentMessage;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=message-retry-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-retry-manager.d.ts","sourceRoot":"","sources":["../../src/Utils/message-retry-manager.ts"],"names":[],"mappings":"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"}
|