@bellachu/xteambail 2.0.0
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 +13 -0
- package/WAProto/GenerateStatics.sh +3 -0
- package/WAProto/WAProto.proto +5479 -0
- package/WAProto/fix-imports.js +38 -0
- package/WAProto/index.d.ts +14017 -0
- package/WAProto/index.js +2213 -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 +139 -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 +19 -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 +38 -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 +87 -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 +79 -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 +27 -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 +33 -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 +62 -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 +68 -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 +54 -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 +48 -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 +88 -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 +33 -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 +575 -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 +309 -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 +27 -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 +18 -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 +62 -0
- package/lib/Socket/Client/websocket.js.map +1 -0
- package/lib/Socket/business.d.ts +217 -0
- package/lib/Socket/business.d.ts.map +1 -0
- package/lib/Socket/business.js +368 -0
- package/lib/Socket/business.js.map +1 -0
- package/lib/Socket/chats.d.ts +124 -0
- package/lib/Socket/chats.d.ts.map +1 -0
- package/lib/Socket/chats.js +1340 -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 +522 -0
- package/lib/Socket/communities.js.map +1 -0
- package/lib/Socket/groups.d.ts +161 -0
- package/lib/Socket/groups.d.ts.map +1 -0
- package/lib/Socket/groups.js +430 -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 +11 -0
- package/lib/Socket/index.js.map +1 -0
- package/lib/Socket/luxu.js +422 -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 +2374 -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 +1502 -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 +55 -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 +238 -0
- package/lib/Socket/newsletter.js.map +1 -0
- package/lib/Socket/socket.d.ts +59 -0
- package/lib/Socket/socket.d.ts.map +1 -0
- package/lib/Socket/socket.js +1022 -0
- package/lib/Socket/socket.js.map +1 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +10 -0
- package/lib/Store/make-cache-manager-store.d.ts +13 -0
- package/lib/Store/make-cache-manager-store.js +82 -0
- package/lib/Store/make-in-memory-store.d.ts +118 -0
- package/lib/Store/make-in-memory-store.js +429 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.js +81 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +27 -0
- package/lib/Types/Auth.d.ts +117 -0
- package/lib/Types/Auth.d.ts.map +1 -0
- package/lib/Types/Auth.js +5 -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 +5 -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 +5 -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 +5 -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 +3 -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 +5 -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 +31 -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 +13 -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 +23 -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 +43 -0
- package/lib/Types/Mex.js.map +1 -0
- package/lib/Types/Product.d.ts +79 -0
- package/lib/Types/Product.d.ts.map +1 -0
- package/lib/Types/Product.js +5 -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 +3 -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 +4 -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 +62 -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 +3 -0
- package/lib/Types/USync.js.map +1 -0
- package/lib/Types/index.d.ts +65 -0
- package/lib/Types/index.d.ts.map +1 -0
- package/lib/Types/index.js +167 -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 +332 -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 +35 -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 +247 -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 +971 -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 +43 -0
- package/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/lib/Utils/crypto.d.ts +37 -0
- package/lib/Utils/crypto.d.ts.map +1 -0
- package/lib/Utils/crypto.js +160 -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 +380 -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 +666 -0
- package/lib/Utils/event-buffer.js.map +1 -0
- package/lib/Utils/generics.d.ts +91 -0
- package/lib/Utils/generics.d.ts.map +1 -0
- package/lib/Utils/generics.js +449 -0
- package/lib/Utils/generics.js.map +1 -0
- package/lib/Utils/history.d.ts +24 -0
- package/lib/Utils/history.d.ts.map +1 -0
- package/lib/Utils/history.js +160 -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 +94 -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 +236 -0
- package/lib/Utils/index.js.map +1 -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 +102 -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 +11 -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 +14 -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 +43 -0
- package/lib/Utils/make-mutex.js.map +1 -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 +283 -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 +914 -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 +963 -0
- package/lib/Utils/messages.js.map +1 -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 +238 -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 +54 -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 +109 -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 +710 -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 +586 -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 +279 -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 +47 -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 +61 -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 +176 -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 +124 -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 +229 -0
- package/lib/Utils/validate-connection.js.map +1 -0
- package/lib/WABinary/constants.d.ts +28 -0
- package/lib/WABinary/constants.d.ts.map +1 -0
- package/lib/WABinary/constants.js +42 -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 +271 -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 +226 -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 +219 -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 +60 -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 +121 -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 +4 -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 +17 -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 +1 -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 +38 -0
- package/lib/WAM/index.js.map +1 -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 +63 -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 +65 -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 +34 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -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 +43 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -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 +32 -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 +68 -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 +37 -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 +60 -0
- package/lib/WAUSync/Protocols/index.js.map +1 -0
- package/lib/WAUSync/USyncQuery.d.ts +30 -0
- package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
- package/lib/WAUSync/USyncQuery.js +103 -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 +38 -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 +38 -0
- package/lib/WAUSync/index.js.map +1 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +133 -0
- package/lib/index.js.map +1 -0
- package/package.json +72 -0
- package/scripts/patch-deps.js +35 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const crypto = require("crypto");
|
|
4
|
+
const { proto } = require("../../WAProto/index.js");
|
|
5
|
+
const Utils = require("../Utils/index.js");
|
|
6
|
+
|
|
7
|
+
const BRAND = "xrelly";
|
|
8
|
+
|
|
9
|
+
class imup {
|
|
10
|
+
constructor(utils, waUploadToServer, relayMessageFn) {
|
|
11
|
+
this.utils = utils;
|
|
12
|
+
this.relayMessage = relayMessageFn;
|
|
13
|
+
this.waUploadToServer = waUploadToServer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
detectType(content) {
|
|
17
|
+
if (content.requestPaymentMessage) return "PAYMENT";
|
|
18
|
+
if (content.productMessage) return "PRODUCT";
|
|
19
|
+
if (content.albumMessage) return "ALBUM";
|
|
20
|
+
if (content.eventMessage) return "EVENT";
|
|
21
|
+
if (content.pollResultMessage) return "POLL_RESULT";
|
|
22
|
+
if (content.orderMessage) return "ORDER";
|
|
23
|
+
if (content.groupStatus) return "GROUP_STATUS";
|
|
24
|
+
if (content.groupLabel) return "GROUP_LABEL";
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async handlePayment(content, quoted) {
|
|
29
|
+
const data = content.requestPaymentMessage;
|
|
30
|
+
let notes = {};
|
|
31
|
+
|
|
32
|
+
if (data.sticker?.stickerMessage) {
|
|
33
|
+
notes = {
|
|
34
|
+
stickerMessage: {
|
|
35
|
+
...data.sticker.stickerMessage,
|
|
36
|
+
contextInfo: {
|
|
37
|
+
stanzaId: quoted?.key?.id,
|
|
38
|
+
participant: quoted?.key?.participant || content.sender,
|
|
39
|
+
quotedMessage: quoted?.message
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
} else if (data.note) {
|
|
44
|
+
notes = {
|
|
45
|
+
extendedTextMessage: {
|
|
46
|
+
text: data.note,
|
|
47
|
+
contextInfo: {
|
|
48
|
+
stanzaId: quoted?.key?.id,
|
|
49
|
+
participant: quoted?.key?.participant || content.sender,
|
|
50
|
+
quotedMessage: quoted?.message
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
requestPaymentMessage: proto.Message.RequestPaymentMessage.fromObject({
|
|
58
|
+
expiryTimestamp: data.expiry || 0,
|
|
59
|
+
amount1000: data.amount || 0,
|
|
60
|
+
currencyCodeIso4217: data.currency || "IDR",
|
|
61
|
+
requestFrom: data.from || "0@s.whatsapp.net",
|
|
62
|
+
noteMessage: notes,
|
|
63
|
+
background: data.background ?? {
|
|
64
|
+
id: "DEFAULT",
|
|
65
|
+
placeholderArgb: 0xfff0f0f0
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async handleProduct(content, jid, quoted) {
|
|
72
|
+
const {
|
|
73
|
+
title,
|
|
74
|
+
description,
|
|
75
|
+
thumbnail,
|
|
76
|
+
productId,
|
|
77
|
+
retailerId,
|
|
78
|
+
url,
|
|
79
|
+
body = "",
|
|
80
|
+
footer = "",
|
|
81
|
+
buttons = [],
|
|
82
|
+
priceAmount1000 = null,
|
|
83
|
+
currencyCode = "IDR"
|
|
84
|
+
} = content.productMessage;
|
|
85
|
+
|
|
86
|
+
let productImage;
|
|
87
|
+
|
|
88
|
+
if (Buffer.isBuffer(thumbnail)) {
|
|
89
|
+
const { imageMessage } = await this.utils.generateWAMessageContent(
|
|
90
|
+
{ image: thumbnail },
|
|
91
|
+
{ upload: this.waUploadToServer }
|
|
92
|
+
);
|
|
93
|
+
productImage = imageMessage;
|
|
94
|
+
} else if (typeof thumbnail === "object" && thumbnail.url) {
|
|
95
|
+
const { imageMessage } = await this.utils.generateWAMessageContent(
|
|
96
|
+
{ image: { url: thumbnail.url } },
|
|
97
|
+
{ upload: this.waUploadToServer }
|
|
98
|
+
);
|
|
99
|
+
productImage = imageMessage;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
viewOnceMessage: {
|
|
104
|
+
message: {
|
|
105
|
+
interactiveMessage: {
|
|
106
|
+
body: { text: body },
|
|
107
|
+
footer: { text: footer },
|
|
108
|
+
header: {
|
|
109
|
+
title,
|
|
110
|
+
hasMediaAttachment: true,
|
|
111
|
+
productMessage: {
|
|
112
|
+
product: {
|
|
113
|
+
productImage,
|
|
114
|
+
productId,
|
|
115
|
+
title,
|
|
116
|
+
description,
|
|
117
|
+
currencyCode,
|
|
118
|
+
priceAmount1000,
|
|
119
|
+
retailerId,
|
|
120
|
+
url,
|
|
121
|
+
productImageCount: 1
|
|
122
|
+
},
|
|
123
|
+
businessOwnerJid: "0@s.whatsapp.net"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
nativeFlowMessage: { buttons }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async handleAlbum(content, jid, quoted) {
|
|
134
|
+
const array = content.albumMessage;
|
|
135
|
+
const userJid = this.utils.generateMessageID().split("@")[0] + "@s.whatsapp.net";
|
|
136
|
+
const album = await this.utils.generateWAMessageFromContent(
|
|
137
|
+
jid,
|
|
138
|
+
{
|
|
139
|
+
messageContextInfo: {
|
|
140
|
+
messageSecret: crypto.randomBytes(32)
|
|
141
|
+
},
|
|
142
|
+
albumMessage: {
|
|
143
|
+
expectedImageCount: array.filter(a => Object.prototype.hasOwnProperty.call(a, "image")).length,
|
|
144
|
+
expectedVideoCount: array.filter(a => Object.prototype.hasOwnProperty.call(a, "video")).length
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
userJid,
|
|
149
|
+
quoted,
|
|
150
|
+
upload: this.waUploadToServer
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
await this.relayMessage(jid, album.message, {
|
|
155
|
+
messageId: album.key.id
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
for (const item of array) {
|
|
159
|
+
const img = await this.utils.generateWAMessage(jid, item, {
|
|
160
|
+
upload: this.waUploadToServer
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
img.message.messageContextInfo = {
|
|
164
|
+
messageSecret: crypto.randomBytes(32),
|
|
165
|
+
messageAssociation: {
|
|
166
|
+
associationType: 1,
|
|
167
|
+
parentMessageKey: album.key
|
|
168
|
+
},
|
|
169
|
+
participant: "0@s.whatsapp.net",
|
|
170
|
+
remoteJid: "status@broadcast",
|
|
171
|
+
forwardingScore: 99999,
|
|
172
|
+
isForwarded: true,
|
|
173
|
+
mentionedJid: [jid],
|
|
174
|
+
starred: true,
|
|
175
|
+
labels: ["Y", "Important"],
|
|
176
|
+
isHighlighted: true,
|
|
177
|
+
businessMessageForwardInfo: {
|
|
178
|
+
businessOwnerJid: jid
|
|
179
|
+
},
|
|
180
|
+
dataSharingContext: {
|
|
181
|
+
showMmDisclosure: true
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
img.message.forwardedNewsletterMessageInfo = {
|
|
186
|
+
newsletterJid: "0@newsletter",
|
|
187
|
+
serverMessageId: 1,
|
|
188
|
+
newsletterName: "WhatsApp",
|
|
189
|
+
contentType: 1,
|
|
190
|
+
timestamp: new Date().toISOString(),
|
|
191
|
+
senderName: "xrelly",
|
|
192
|
+
priority: "high",
|
|
193
|
+
status: "sent"
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
img.message.disappearingMode = {
|
|
197
|
+
initiator: 3,
|
|
198
|
+
trigger: 4,
|
|
199
|
+
initiatorDeviceJid: jid,
|
|
200
|
+
initiatedByExternalService: true,
|
|
201
|
+
initiatedByUserDevice: true,
|
|
202
|
+
initiatedBySystem: true,
|
|
203
|
+
initiatedByServer: true,
|
|
204
|
+
initiatedByAdmin: true,
|
|
205
|
+
initiatedByUser: true,
|
|
206
|
+
initiatedByApp: true,
|
|
207
|
+
initiatedByBot: true,
|
|
208
|
+
initiatedByMe: true
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
await this.relayMessage(jid, img.message, {
|
|
212
|
+
messageId: img.key.id,
|
|
213
|
+
quoted: {
|
|
214
|
+
key: {
|
|
215
|
+
remoteJid: album.key.remoteJid,
|
|
216
|
+
id: album.key.id,
|
|
217
|
+
fromMe: true,
|
|
218
|
+
participant: userJid
|
|
219
|
+
},
|
|
220
|
+
message: album.message
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return album;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
async handleEvent(content, jid, quoted) {
|
|
229
|
+
const eventData = content.eventMessage;
|
|
230
|
+
|
|
231
|
+
const msg = await this.utils.generateWAMessageFromContent(
|
|
232
|
+
jid,
|
|
233
|
+
{
|
|
234
|
+
viewOnceMessage: {
|
|
235
|
+
message: {
|
|
236
|
+
messageContextInfo: {
|
|
237
|
+
deviceListMetadata: {},
|
|
238
|
+
deviceListMetadataVersion: 2,
|
|
239
|
+
messageSecret: crypto.randomBytes(32),
|
|
240
|
+
supportPayload: JSON.stringify({
|
|
241
|
+
version: 2,
|
|
242
|
+
is_ai_message: true,
|
|
243
|
+
should_show_system_message: true,
|
|
244
|
+
ticket_id: crypto.randomBytes(16).toString("hex")
|
|
245
|
+
})
|
|
246
|
+
},
|
|
247
|
+
eventMessage: {
|
|
248
|
+
contextInfo: {
|
|
249
|
+
mentionedJid: [jid],
|
|
250
|
+
participant: jid,
|
|
251
|
+
remoteJid: "status@broadcast",
|
|
252
|
+
forwardedNewsletterMessageInfo: {
|
|
253
|
+
newsletterName: "D | xrelly",
|
|
254
|
+
newsletterJid: "0@newsletter",
|
|
255
|
+
serverMessageId: 1
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
isCanceled: eventData.isCanceled || false,
|
|
259
|
+
name: eventData.name,
|
|
260
|
+
description: eventData.description,
|
|
261
|
+
location: eventData.location || {
|
|
262
|
+
degreesLatitude: 0,
|
|
263
|
+
degreesLongitude: 0,
|
|
264
|
+
name: "Location"
|
|
265
|
+
},
|
|
266
|
+
joinLink: eventData.joinLink || "",
|
|
267
|
+
startTime:
|
|
268
|
+
typeof eventData.startTime === "string"
|
|
269
|
+
? parseInt(eventData.startTime, 10)
|
|
270
|
+
: eventData.startTime || Date.now(),
|
|
271
|
+
endTime:
|
|
272
|
+
typeof eventData.endTime === "string"
|
|
273
|
+
? parseInt(eventData.endTime, 10)
|
|
274
|
+
: eventData.endTime || Date.now() + 3600000,
|
|
275
|
+
extraGuestsAllowed: eventData.extraGuestsAllowed !== false
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
{ quoted }
|
|
281
|
+
);
|
|
282
|
+
|
|
283
|
+
await this.relayMessage(jid, msg.message, {
|
|
284
|
+
messageId: msg.key.id
|
|
285
|
+
});
|
|
286
|
+
return msg;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
async handlePollResult(content, jid, quoted) {
|
|
290
|
+
const pollData = content.pollResultMessage;
|
|
291
|
+
const userJid = this.utils.generateMessageID().split("@")[0] + "@s.whatsapp.net";
|
|
292
|
+
|
|
293
|
+
const msg = await this.utils.generateWAMessageFromContent(
|
|
294
|
+
jid,
|
|
295
|
+
{
|
|
296
|
+
pollResultSnapshotMessage: {
|
|
297
|
+
name: pollData.name,
|
|
298
|
+
pollVotes: pollData.pollVotes.map(vote => ({
|
|
299
|
+
optionName: vote.optionName,
|
|
300
|
+
optionVoteCount:
|
|
301
|
+
typeof vote.optionVoteCount === "number"
|
|
302
|
+
? vote.optionVoteCount.toString()
|
|
303
|
+
: vote.optionVoteCount
|
|
304
|
+
})),
|
|
305
|
+
contextInfo: {
|
|
306
|
+
isForwarded: true,
|
|
307
|
+
forwardingScore: 1,
|
|
308
|
+
forwardedNewsletterMessageInfo: {
|
|
309
|
+
newsletterName:
|
|
310
|
+
pollData.newsletter?.newsletterName || BRAND,
|
|
311
|
+
newsletterJid: pollData.newsletter?.newsletterJid || BRAND,
|
|
312
|
+
serverMessageId: 1000,
|
|
313
|
+
contentType: "UPDATE"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
userJid,
|
|
320
|
+
quoted
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
|
|
324
|
+
await this.relayMessage(jid, msg.message, {
|
|
325
|
+
messageId: msg.key.id
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
return msg;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
async handleOrderMessage(content, jid, quoted) {
|
|
332
|
+
const orderData = content.orderMessage;
|
|
333
|
+
|
|
334
|
+
const orderMsg = await this.utils.generateWAMessageFromContent(
|
|
335
|
+
jid,
|
|
336
|
+
{
|
|
337
|
+
orderMessage: {
|
|
338
|
+
orderId: orderData.orderId || `xrelly-${crypto.randomBytes(6).toString("hex")}`,
|
|
339
|
+
thumbnail: orderData.thumbnail || null,
|
|
340
|
+
itemCount: orderData.itemCount || 0,
|
|
341
|
+
status: orderData.status || "ACCEPTED",
|
|
342
|
+
surface: orderData.surface || "CATALOG",
|
|
343
|
+
message: orderData.message,
|
|
344
|
+
orderTitle: orderData.orderTitle,
|
|
345
|
+
sellerJid: orderData.sellerJid || "0@whatsapp.net",
|
|
346
|
+
token: orderData.token || crypto.randomBytes(8).toString("hex"),
|
|
347
|
+
totalAmount1000: orderData.totalAmount1000 || 0,
|
|
348
|
+
totalCurrencyCode: orderData.totalCurrencyCode || "IDR",
|
|
349
|
+
messageVersion: orderData.messageVersion || 2
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{ quoted }
|
|
353
|
+
);
|
|
354
|
+
|
|
355
|
+
await this.relayMessage(jid, orderMsg.message, {});
|
|
356
|
+
return orderMsg;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
async handleGroupStory(content, jid, quoted) {
|
|
360
|
+
const storyData = content.groupStatus;
|
|
361
|
+
let messageContent;
|
|
362
|
+
|
|
363
|
+
if (storyData.message) {
|
|
364
|
+
messageContent = storyData;
|
|
365
|
+
} else if (typeof this.utils?.generateWAMessageContent === "function") {
|
|
366
|
+
messageContent = await this.utils.generateWAMessageContent(storyData, {
|
|
367
|
+
upload: this.waUploadToServer
|
|
368
|
+
});
|
|
369
|
+
} else {
|
|
370
|
+
messageContent = await Utils.generateWAMessageContent(storyData, {
|
|
371
|
+
upload: this.waUploadToServer
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
const msg = {
|
|
376
|
+
message: {
|
|
377
|
+
groupStatusMessageV2: {
|
|
378
|
+
message: messageContent.message || messageContent
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
return await this.relayMessage(jid, msg.message, {
|
|
384
|
+
messageId: this.utils.generateMessageID()
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
async handleGbLabel(content, jid) {
|
|
389
|
+
const x = content.groupLabel;
|
|
390
|
+
if (!jid.endsWith("@g.us")) {
|
|
391
|
+
throw new Error("group required!");
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const msg = this.utils.generateWAMessageFromContent(
|
|
395
|
+
jid,
|
|
396
|
+
{
|
|
397
|
+
protocolMessage: {
|
|
398
|
+
type: "GROUP_MEMBER_LABEL_CHANGE",
|
|
399
|
+
memberLabel: {
|
|
400
|
+
label: x.labelText.slice(0, 30)
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{}
|
|
405
|
+
);
|
|
406
|
+
|
|
407
|
+
await this.relayMessage(jid, msg.message, {
|
|
408
|
+
additionalNodes: [
|
|
409
|
+
{
|
|
410
|
+
tag: "meta",
|
|
411
|
+
attrs: {
|
|
412
|
+
tag_reason: "user_update",
|
|
413
|
+
appdata: "member_tag"
|
|
414
|
+
},
|
|
415
|
+
content: undefined
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
module.exports = imup;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import NodeCache from '@cacheable/node-cache';
|
|
2
|
+
import { Boom } from '@hapi/boom';
|
|
3
|
+
import Long from 'long';
|
|
4
|
+
import { proto } from '../../WAProto/index.js';
|
|
5
|
+
import type { MessageReceiptType, MessageRelayOptions, NewChatMessageCapInfo, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
|
|
6
|
+
import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
|
|
7
|
+
export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
8
|
+
sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
|
|
9
|
+
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
10
|
+
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
11
|
+
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
|
|
12
|
+
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<WAMessage>) => Promise<string | undefined>;
|
|
13
|
+
messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
|
|
14
|
+
userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
|
|
15
|
+
devicesMutex: {
|
|
16
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
17
|
+
};
|
|
18
|
+
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
19
|
+
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
20
|
+
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
|
|
21
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
|
|
22
|
+
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
23
|
+
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
24
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
|
|
25
|
+
getMediaHost: () => string;
|
|
26
|
+
waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
|
|
27
|
+
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
28
|
+
[_: string]: string;
|
|
29
|
+
}>;
|
|
30
|
+
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
31
|
+
createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
|
|
32
|
+
nodes: BinaryNode[];
|
|
33
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(JidWithDevice & {
|
|
36
|
+
jid: string;
|
|
37
|
+
})[]>;
|
|
38
|
+
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
39
|
+
updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
|
|
40
|
+
sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
|
|
41
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
|
|
42
|
+
newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
|
|
43
|
+
newsletterSubscribers: (jid: string) => Promise<{
|
|
44
|
+
subscribers: number;
|
|
45
|
+
}>;
|
|
46
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
|
|
47
|
+
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
48
|
+
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
49
|
+
newsletterMute: (jid: string) => Promise<unknown>;
|
|
50
|
+
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
51
|
+
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
52
|
+
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
53
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
|
|
54
|
+
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
55
|
+
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
56
|
+
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
57
|
+
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
58
|
+
duration: string;
|
|
59
|
+
} | null>;
|
|
60
|
+
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
61
|
+
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
62
|
+
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
63
|
+
newsletterDelete: (jid: string) => Promise<void>;
|
|
64
|
+
groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
65
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
66
|
+
groupLeave: (id: string) => Promise<void>;
|
|
67
|
+
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
68
|
+
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
}[]>;
|
|
71
|
+
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
|
|
72
|
+
status: string;
|
|
73
|
+
jid: string | undefined;
|
|
74
|
+
}[]>;
|
|
75
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
|
|
76
|
+
status: string;
|
|
77
|
+
jid: string | undefined;
|
|
78
|
+
content: BinaryNode;
|
|
79
|
+
}[]>;
|
|
80
|
+
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
81
|
+
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
82
|
+
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
83
|
+
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
84
|
+
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
85
|
+
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
86
|
+
groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
87
|
+
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
88
|
+
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
89
|
+
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
90
|
+
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
91
|
+
groupFetchAllParticipating: () => Promise<{
|
|
92
|
+
[_: string]: import("../Types/index.js").GroupMetadata;
|
|
93
|
+
}>;
|
|
94
|
+
serverProps: {
|
|
95
|
+
privacyTokenOn1to1: boolean;
|
|
96
|
+
profilePicPrivacyToken: boolean;
|
|
97
|
+
lidTrustedTokenIssueToLid: boolean;
|
|
98
|
+
};
|
|
99
|
+
createCallLink: (type: "audio" | "video", event?: {
|
|
100
|
+
startTime: number;
|
|
101
|
+
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
102
|
+
getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
|
|
103
|
+
messageMutex: {
|
|
104
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
105
|
+
};
|
|
106
|
+
receiptMutex: {
|
|
107
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
108
|
+
};
|
|
109
|
+
appStatePatchMutex: {
|
|
110
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
111
|
+
};
|
|
112
|
+
notificationMutex: {
|
|
113
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
114
|
+
};
|
|
115
|
+
upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
|
|
116
|
+
appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
|
|
117
|
+
sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
118
|
+
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
119
|
+
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
120
|
+
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
121
|
+
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
122
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
123
|
+
updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
|
|
124
|
+
width: number;
|
|
125
|
+
height: number;
|
|
126
|
+
}) => Promise<void>;
|
|
127
|
+
removeProfilePicture: (jid: string) => Promise<void>;
|
|
128
|
+
updateProfileStatus: (status: string) => Promise<void>;
|
|
129
|
+
updateProfileName: (name: string) => Promise<void>;
|
|
130
|
+
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
131
|
+
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
132
|
+
updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
|
|
133
|
+
updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
134
|
+
updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
135
|
+
updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
136
|
+
updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
137
|
+
updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
138
|
+
updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
|
|
139
|
+
updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
140
|
+
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
141
|
+
getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
|
|
142
|
+
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
143
|
+
chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
|
|
144
|
+
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
145
|
+
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
146
|
+
removeContact: (jid: string) => Promise<void>;
|
|
147
|
+
placeholderResendCache: import("../Types/index.js").CacheStore;
|
|
148
|
+
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
149
|
+
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
150
|
+
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
151
|
+
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
152
|
+
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
153
|
+
star: (jid: string, messages: {
|
|
154
|
+
id: string;
|
|
155
|
+
fromMe?: boolean;
|
|
156
|
+
}[], star: boolean) => Promise<void>;
|
|
157
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
158
|
+
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
159
|
+
type: "md";
|
|
160
|
+
ws: import("./Client/websocket.js").WebSocketClient;
|
|
161
|
+
ev: import("../Types/index.js").xrlEventEmitter & {
|
|
162
|
+
process(handler: (events: Partial<import("../Types/index.js").xrlEventMap>) => void | Promise<void>): () => void;
|
|
163
|
+
buffer(): void;
|
|
164
|
+
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
165
|
+
flush(): boolean;
|
|
166
|
+
isBuffering(): boolean;
|
|
167
|
+
destroy(): void;
|
|
168
|
+
};
|
|
169
|
+
authState: {
|
|
170
|
+
creds: import("../Types/index.js").AuthenticationCreds;
|
|
171
|
+
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
172
|
+
};
|
|
173
|
+
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
174
|
+
user: import("../Types/index.js").Contact | undefined;
|
|
175
|
+
generateMessageTag: () => string;
|
|
176
|
+
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
177
|
+
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
178
|
+
waitForSocketOpen: () => Promise<void>;
|
|
179
|
+
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
180
|
+
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
181
|
+
logout: (msg?: string) => Promise<void>;
|
|
182
|
+
end: (error: Error | undefined) => Promise<void>;
|
|
183
|
+
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
184
|
+
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
185
|
+
uploadPreKeys: (count?: number) => Promise<void>;
|
|
186
|
+
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
187
|
+
digestKeyBundle: () => Promise<void>;
|
|
188
|
+
rotateSignedPreKey: () => Promise<void>;
|
|
189
|
+
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
190
|
+
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
191
|
+
sendUnifiedSession: () => Promise<void>;
|
|
192
|
+
wamBuffer: import("../index.js").BinaryInfo;
|
|
193
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
194
|
+
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
195
|
+
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
196
|
+
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
197
|
+
jid: string;
|
|
198
|
+
exists: boolean;
|
|
199
|
+
}[] | undefined>;
|
|
200
|
+
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
201
|
+
fetchNewChatMessageCap: () => Promise<NewChatMessageCapInfo>;
|
|
202
|
+
};
|
|
203
|
+
//# sourceMappingURL=messages-recv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages-recv.d.ts","sourceRoot":"","sources":["../../src/Socket/messages-recv.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAQ9C,OAAO,KAAK,EAEX,kBAAkB,EAClB,mBAAmB,EAEnB,qBAAqB,EACrB,YAAY,EAEZ,SAAS,EACT,YAAY,EAEZ,MAAM,UAAU,CAAA;AA4CjB,OAAO,EAEN,KAAK,UAAU,EAef,KAAK,aAAa,EAElB,MAAM,aAAa,CAAA;AAuBpB,eAAO,MAAM,sBAAsB,GAAI,QAAQ,YAAY;2BAobtB,UAAU,cAAc,MAAM;6BA4B5B,UAAU;yBAtBd,MAAM,YAAY,MAAM;iCAnYlD,MAAM,gBACC,YAAY,sBACN,MAAM,GAAG,IAAI,KAC/B,OAAO,CAAC,MAAM,CAAC;2CAoBL,YAAY,YACd,OAAO,CAAC,SAAS,CAAC,KAC1B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuvBW,CAAC;;;;;;;;;0DA72BzC,GAAG,0BACD,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqjEN,CAAA"}
|