@vanzxysenpai/baileys 0.0.0-stage → 0.0.2
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/CHANGELOG.md +30 -0
- package/LICENSE +25 -0
- package/NOTICE.md +158 -0
- package/README.md +5294 -2
- package/VanzxyBanner.js +134 -0
- package/WAProto/index.d.ts +13317 -0
- package/WAProto/index.js +147553 -0
- package/lib/Builders/A2UI.d.ts +131 -0
- package/lib/Builders/A2UI.js +343 -0
- package/lib/Builders/AIRich.d.ts +1021 -0
- package/lib/Builders/AIRich.js +2889 -0
- package/lib/Builders/Album.d.ts +51 -0
- package/lib/Builders/Album.js +99 -0
- package/lib/Builders/Button.d.ts +137449 -0
- package/lib/Builders/Button.js +1054 -0
- package/lib/Builders/ButtonV2.d.ts +43 -0
- package/lib/Builders/ButtonV2.js +175 -0
- package/lib/Builders/ButtonV3.d.ts +35 -0
- package/lib/Builders/ButtonV3.js +189 -0
- package/lib/Builders/Carousel.d.ts +68 -0
- package/lib/Builders/Carousel.js +161 -0
- package/lib/Builders/Event.d.ts +61 -0
- package/lib/Builders/Event.js +118 -0
- package/lib/Builders/Expiring.d.ts +17 -0
- package/lib/Builders/Expiring.js +27 -0
- package/lib/Builders/Poll.d.ts +63 -0
- package/lib/Builders/Poll.js +139 -0
- package/lib/Builders/VanzxyBaileys.d.ts +42 -0
- package/lib/Builders/VanzxyBaileys.js +110 -0
- package/lib/Builders/errors.d.ts +25 -0
- package/lib/Builders/errors.js +29 -0
- package/lib/Builders/index.d.ts +14 -0
- package/lib/Builders/index.js +23 -0
- package/lib/Builders/shared.d.ts +395 -0
- package/lib/Builders/shared.js +738 -0
- package/lib/Defaults/bot-jid.d.ts +1 -0
- package/lib/Defaults/bot-jid.js +1 -0
- package/lib/Defaults/index.d.ts +161 -0
- package/lib/Defaults/index.js +165 -0
- package/lib/Defaults/version.d.ts +1 -0
- package/lib/Defaults/version.js +1 -0
- package/lib/Framework/Bot.d.ts +865 -0
- package/lib/Framework/Bot.js +230 -0
- package/lib/Framework/Context.d.ts +17 -0
- package/lib/Framework/Context.js +90 -0
- package/lib/Framework/MediaManager.d.ts +15 -0
- package/lib/Framework/MediaManager.js +154 -0
- package/lib/Framework/SessionManager.d.ts +10 -0
- package/lib/Framework/SessionManager.js +34 -0
- package/lib/Framework/StatsManager.d.ts +20 -0
- package/lib/Framework/StatsManager.js +117 -0
- package/lib/Framework/Store/SQLiteStore.d.ts +13 -0
- package/lib/Framework/Store/SQLiteStore.js +68 -0
- package/lib/Framework/index.d.ts +6 -0
- package/lib/Framework/index.js +11 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/lib/Signal/Group/ciphertext-message.js +11 -0
- package/lib/Signal/Group/group-session-builder.d.ts +7 -0
- package/lib/Signal/Group/group-session-builder.js +29 -0
- package/lib/Signal/Group/group_cipher.d.ts +10 -0
- package/lib/Signal/Group/group_cipher.js +81 -0
- package/lib/Signal/Group/index.d.ts +11 -0
- package/lib/Signal/Group/index.js +11 -0
- package/lib/Signal/Group/keyhelper.d.ts +6 -0
- package/lib/Signal/Group/keyhelper.js +17 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
- package/lib/Signal/Group/sender-chain-key.js +25 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +62 -0
- package/lib/Signal/Group/sender-key-message.d.ts +18 -0
- package/lib/Signal/Group/sender-key-message.js +65 -0
- package/lib/Signal/Group/sender-key-name.d.ts +11 -0
- package/lib/Signal/Group/sender-key-name.js +47 -0
- package/lib/Signal/Group/sender-key-record.d.ts +12 -0
- package/lib/Signal/Group/sender-key-record.js +40 -0
- package/lib/Signal/Group/sender-key-state.d.ts +16 -0
- package/lib/Signal/Group/sender-key-state.js +83 -0
- package/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/lib/Signal/Group/sender-message-key.js +25 -0
- package/lib/Signal/libsignal.d.ts +58 -0
- package/lib/Signal/libsignal.js +436 -0
- package/lib/Signal/lid-mapping.d.ts +20 -0
- package/lib/Signal/lid-mapping.js +276 -0
- package/lib/Socket/Client/index.d.ts +2 -0
- package/lib/Socket/Client/index.js +2 -0
- package/lib/Socket/Client/types.d.ts +5 -0
- package/lib/Socket/Client/types.js +10 -0
- package/lib/Socket/Client/websocket.d.ts +12 -0
- package/lib/Socket/Client/websocket.js +53 -0
- package/lib/Socket/business.d.ts +674 -0
- package/lib/Socket/business.js +379 -0
- package/lib/Socket/chats.d.ts +137 -0
- package/lib/Socket/chats.js +1299 -0
- package/lib/Socket/communities.d.ts +805 -0
- package/lib/Socket/communities.js +454 -0
- package/lib/Socket/dugong.d.ts +118 -0
- package/lib/Socket/dugong.js +810 -0
- package/lib/Socket/groups.d.ts +287 -0
- package/lib/Socket/groups.js +386 -0
- package/lib/Socket/index.d.ts +826 -0
- package/lib/Socket/index.js +35 -0
- package/lib/Socket/messages-recv.d.ts +613 -0
- package/lib/Socket/messages-recv.js +1851 -0
- package/lib/Socket/messages-send.d.ts +608 -0
- package/lib/Socket/messages-send.js +1574 -0
- package/lib/Socket/mex-fallback.d.ts +51 -0
- package/lib/Socket/mex-fallback.js +97 -0
- package/lib/Socket/mex.d.ts +1 -0
- package/lib/Socket/mex.js +41 -0
- package/lib/Socket/newsletter-ext.d.ts +47 -0
- package/lib/Socket/newsletter-ext.js +262 -0
- package/lib/Socket/newsletter.d.ts +285 -0
- package/lib/Socket/newsletter.js +223 -0
- package/lib/Socket/socket.d.ts +60 -0
- package/lib/Socket/socket.js +1001 -0
- package/lib/Socket/username.d.ts +842 -0
- package/lib/Socket/username.js +156 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +3 -0
- package/lib/Store/make-in-memory-store.d.ts +62 -0
- package/lib/Store/make-in-memory-store.js +425 -0
- package/lib/Store/make-ordered-dictionary.d.ts +12 -0
- package/lib/Store/make-ordered-dictionary.js +78 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +23 -0
- package/lib/Types/Auth.d.ts +1 -0
- package/lib/Types/Auth.js +1 -0
- package/lib/Types/Bussines.d.ts +1 -0
- package/lib/Types/Bussines.js +1 -0
- package/lib/Types/Call.d.ts +1 -0
- package/lib/Types/Call.js +1 -0
- package/lib/Types/Chat.d.ts +1 -0
- package/lib/Types/Chat.js +7 -0
- package/lib/Types/Contact.d.ts +1 -0
- package/lib/Types/Contact.js +1 -0
- package/lib/Types/Events.d.ts +1 -0
- package/lib/Types/Events.js +1 -0
- package/lib/Types/GroupMetadata.d.ts +1 -0
- package/lib/Types/GroupMetadata.js +1 -0
- package/lib/Types/Label.d.ts +2 -0
- package/lib/Types/Label.js +24 -0
- package/lib/Types/LabelAssociation.d.ts +2 -0
- package/lib/Types/LabelAssociation.js +6 -0
- package/lib/Types/Message.d.ts +11 -0
- package/lib/Types/Message.js +17 -0
- package/lib/Types/Mex.d.ts +2 -0
- package/lib/Types/Mex.js +38 -0
- package/lib/Types/Product.d.ts +1 -0
- package/lib/Types/Product.js +1 -0
- package/lib/Types/RichType.d.ts +2 -0
- package/lib/Types/RichType.js +22 -0
- package/lib/Types/Signal.d.ts +1 -0
- package/lib/Types/Signal.js +1 -0
- package/lib/Types/Socket.d.ts +1 -0
- package/lib/Types/Socket.js +1 -0
- package/lib/Types/State.d.ts +5 -0
- package/lib/Types/State.js +55 -0
- package/lib/Types/USync.d.ts +1 -0
- package/lib/Types/USync.js +1 -0
- package/lib/Types/index.d.ts +15 -0
- package/lib/Types/index.js +27 -0
- package/lib/Utils/PersistentStore.d.ts +83 -0
- package/lib/Utils/PersistentStore.js +592 -0
- package/lib/Utils/anchor-guard.d.ts +31 -0
- package/lib/Utils/anchor-guard.js +329 -0
- package/lib/Utils/android-stanza-id.d.ts +4 -0
- package/lib/Utils/android-stanza-id.js +21 -0
- package/lib/Utils/anti-delete.d.ts +62 -0
- package/lib/Utils/anti-delete.js +212 -0
- package/lib/Utils/auth-secure.d.ts +180 -0
- package/lib/Utils/auth-secure.js +791 -0
- package/lib/Utils/auth-utils.d.ts +59 -0
- package/lib/Utils/auth-utils.js +326 -0
- package/lib/Utils/auto-reconnect.d.ts +8 -0
- package/lib/Utils/auto-reconnect.js +204 -0
- package/lib/Utils/auto-reply.d.ts +35 -0
- package/lib/Utils/auto-reply.js +152 -0
- package/lib/Utils/bad-mac-handler.d.ts +59 -0
- package/lib/Utils/bad-mac-handler.js +119 -0
- package/lib/Utils/baileys-event-stream.d.ts +5 -0
- package/lib/Utils/baileys-event-stream.js +62 -0
- package/lib/Utils/browser-utils.d.ts +9 -0
- package/lib/Utils/browser-utils.js +29 -0
- package/lib/Utils/business.d.ts +49 -0
- package/lib/Utils/business.js +236 -0
- package/lib/Utils/button-helper-utils.d.ts +59 -0
- package/lib/Utils/button-helper-utils.js +266 -0
- package/lib/Utils/button-sender.d.ts +164 -0
- package/lib/Utils/button-sender.js +845 -0
- package/lib/Utils/chat-control.d.ts +98 -0
- package/lib/Utils/chat-control.js +231 -0
- package/lib/Utils/chat-history-helpers.d.ts +4 -0
- package/lib/Utils/chat-history-helpers.js +70 -0
- package/lib/Utils/chat-utils.d.ts +408 -0
- package/lib/Utils/chat-utils.js +879 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +4 -0
- package/lib/Utils/companion-reg-client-utils.js +39 -0
- package/lib/Utils/connection-watchdog.d.ts +10 -0
- package/lib/Utils/connection-watchdog.js +74 -0
- package/lib/Utils/crypto.d.ts +41 -0
- package/lib/Utils/crypto.js +145 -0
- package/lib/Utils/decode-wa-message.d.ts +83 -0
- package/lib/Utils/decode-wa-message.js +315 -0
- package/lib/Utils/disconnect-reason.d.ts +13 -0
- package/lib/Utils/disconnect-reason.js +36 -0
- package/lib/Utils/event-buffer.d.ts +12 -0
- package/lib/Utils/event-buffer.js +640 -0
- package/lib/Utils/fetch-timeout.d.ts +4 -0
- package/lib/Utils/fetch-timeout.js +14 -0
- package/lib/Utils/ffmpeg-path.d.ts +5 -0
- package/lib/Utils/ffmpeg-path.js +130 -0
- package/lib/Utils/generics.d.ts +79 -0
- package/lib/Utils/generics.js +426 -0
- package/lib/Utils/group-metadata-cache.d.ts +3 -0
- package/lib/Utils/group-metadata-cache.js +25 -0
- package/lib/Utils/group-status-detection.d.ts +5 -0
- package/lib/Utils/group-status-detection.js +114 -0
- package/lib/Utils/history.d.ts +91 -0
- package/lib/Utils/history.js +144 -0
- package/lib/Utils/html-app.d.ts +14 -0
- package/lib/Utils/html-app.js +97 -0
- package/lib/Utils/html-multiplayer.d.ts +8 -0
- package/lib/Utils/html-multiplayer.js +90 -0
- package/lib/Utils/humanizer.d.ts +8 -0
- package/lib/Utils/humanizer.js +74 -0
- package/lib/Utils/identity-change-handler.d.ts +13 -0
- package/lib/Utils/identity-change-handler.js +49 -0
- package/lib/Utils/index.d.ts +88 -0
- package/lib/Utils/index.js +93 -0
- package/lib/Utils/jid-tools.d.ts +3 -0
- package/lib/Utils/jid-tools.js +78 -0
- package/lib/Utils/link-preview-metadata.d.ts +47 -0
- package/lib/Utils/link-preview-metadata.js +90 -0
- package/lib/Utils/link-preview.d.ts +12 -0
- package/lib/Utils/link-preview.js +84 -0
- package/lib/Utils/lock-manager.d.ts +5 -0
- package/lib/Utils/lock-manager.js +50 -0
- package/lib/Utils/logger.d.ts +2 -0
- package/lib/Utils/logger.js +2 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/lt-hash.js +26 -0
- package/lib/Utils/make-mutex.d.ts +6 -0
- package/lib/Utils/make-mutex.js +32 -0
- package/lib/Utils/media-messages.d.ts +35 -0
- package/lib/Utils/media-messages.js +70 -0
- package/lib/Utils/media-processor.d.ts +6 -0
- package/lib/Utils/media-processor.js +174 -0
- package/lib/Utils/media-set.d.ts +6 -0
- package/lib/Utils/media-set.js +169 -0
- package/lib/Utils/message-kind.d.ts +26 -0
- package/lib/Utils/message-kind.js +138 -0
- package/lib/Utils/message-retry-manager.d.ts +79 -0
- package/lib/Utils/message-retry-manager.js +264 -0
- package/lib/Utils/message-search.d.ts +40 -0
- package/lib/Utils/message-search.js +181 -0
- package/lib/Utils/messages-media.d.ts +136 -0
- package/lib/Utils/messages-media.js +867 -0
- package/lib/Utils/messages.d.ts +66 -0
- package/lib/Utils/messages.js +2271 -0
- package/lib/Utils/meta-ai-msmsg.d.ts +3 -0
- package/lib/Utils/meta-ai-msmsg.js +132 -0
- package/lib/Utils/meta-ai.d.ts +4 -0
- package/lib/Utils/meta-ai.js +75 -0
- package/lib/Utils/migrate-auth-state.d.ts +23 -0
- package/lib/Utils/migrate-auth-state.js +126 -0
- package/lib/Utils/mini-app.d.ts +20 -0
- package/lib/Utils/mini-app.js +215 -0
- package/lib/Utils/mock-socket.d.ts +67 -0
- package/lib/Utils/mock-socket.js +254 -0
- package/lib/Utils/modern-messages.d.ts +64 -0
- package/lib/Utils/modern-messages.js +497 -0
- package/lib/Utils/native-flow.d.ts +19 -0
- package/lib/Utils/native-flow.js +112 -0
- package/lib/Utils/newsletter-status.d.ts +157 -0
- package/lib/Utils/newsletter-status.js +652 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/noise-handler.js +200 -0
- package/lib/Utils/offline-node-processor.d.ts +9 -0
- package/lib/Utils/offline-node-processor.js +39 -0
- package/lib/Utils/pairing-utils.d.ts +5 -0
- package/lib/Utils/pairing-utils.js +29 -0
- package/lib/Utils/passkey.d.ts +4 -0
- package/lib/Utils/passkey.js +11 -0
- package/lib/Utils/past-participants.d.ts +2 -0
- package/lib/Utils/past-participants.js +40 -0
- package/lib/Utils/payment-detection.d.ts +40 -0
- package/lib/Utils/payment-detection.js +213 -0
- package/lib/Utils/payment-guard.d.ts +28 -0
- package/lib/Utils/payment-guard.js +143 -0
- package/lib/Utils/payment-messages.d.ts +42 -0
- package/lib/Utils/payment-messages.js +161 -0
- package/lib/Utils/payment-utils.d.ts +75 -0
- package/lib/Utils/payment-utils.js +145 -0
- package/lib/Utils/phone-utils.d.ts +3 -0
- package/lib/Utils/phone-utils.js +29 -0
- package/lib/Utils/pre-key-manager.d.ts +25 -0
- package/lib/Utils/pre-key-manager.js +105 -0
- package/lib/Utils/process-message.d.ts +103 -0
- package/lib/Utils/process-message.js +868 -0
- package/lib/Utils/qr-terminal.d.ts +1 -0
- package/lib/Utils/qr-terminal.js +16 -0
- package/lib/Utils/reconnect-backoff.d.ts +25 -0
- package/lib/Utils/reconnect-backoff.js +47 -0
- package/lib/Utils/reporting-utils.d.ts +12 -0
- package/lib/Utils/reporting-utils.js +257 -0
- package/lib/Utils/rich-message-utils.d.ts +54 -0
- package/lib/Utils/rich-message-utils.js +435 -0
- package/lib/Utils/rich-messages.d.ts +298 -0
- package/lib/Utils/rich-messages.js +1145 -0
- package/lib/Utils/scheduled-message.d.ts +81 -0
- package/lib/Utils/scheduled-message.js +101 -0
- package/lib/Utils/scheduling.d.ts +59 -0
- package/lib/Utils/scheduling.js +139 -0
- package/lib/Utils/signal.d.ts +82 -0
- package/lib/Utils/signal.js +200 -0
- package/lib/Utils/stanza-ack.d.ts +16 -0
- package/lib/Utils/stanza-ack.js +37 -0
- package/lib/Utils/status-stickers.d.ts +79 -0
- package/lib/Utils/status-stickers.js +261 -0
- package/lib/Utils/status.d.ts +107 -0
- package/lib/Utils/status.js +131 -0
- package/lib/Utils/sticker-pack-maker.d.ts +20 -0
- package/lib/Utils/sticker-pack-maker.js +112 -0
- package/lib/Utils/stickerpack.d.ts +18 -0
- package/lib/Utils/stickerpack.js +316 -0
- package/lib/Utils/sync-action-utils.d.ts +2 -0
- package/lib/Utils/sync-action-utils.js +48 -0
- package/lib/Utils/tag.d.ts +8 -0
- package/lib/Utils/tag.js +45 -0
- package/lib/Utils/tc-token-utils.d.ts +29 -0
- package/lib/Utils/tc-token-utils.js +162 -0
- package/lib/Utils/templates.d.ts +86 -0
- package/lib/Utils/templates.js +148 -0
- package/lib/Utils/text-format.d.ts +13 -0
- package/lib/Utils/text-format.js +81 -0
- package/lib/Utils/text-tools.d.ts +3 -0
- package/lib/Utils/text-tools.js +38 -0
- package/lib/Utils/ttl-cache.d.ts +29 -0
- package/lib/Utils/ttl-cache.js +123 -0
- package/lib/Utils/use-cache-manager-auth-state.d.ts +22 -0
- package/lib/Utils/use-cache-manager-auth-state.js +86 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +20 -0
- package/lib/Utils/use-multi-file-auth-state.js +201 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +10 -0
- package/lib/Utils/use-single-file-auth-state.js +111 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts +13 -0
- package/lib/Utils/use-sqlite-auth-state.js +171 -0
- package/lib/Utils/username.d.ts +22 -0
- package/lib/Utils/username.js +59 -0
- package/lib/Utils/validate-connection.d.ts +43 -0
- package/lib/Utils/validate-connection.js +197 -0
- package/lib/Utils/vcard.d.ts +40 -0
- package/lib/Utils/vcard.js +92 -0
- package/lib/Utils/voice-note.d.ts +13 -0
- package/lib/Utils/voice-note.js +47 -0
- package/lib/VoIP/audio-feeder.d.ts +15 -0
- package/lib/VoIP/audio-feeder.js +132 -0
- package/lib/VoIP/index.d.ts +22 -0
- package/lib/VoIP/index.js +277 -0
- package/lib/VoIP/relay-transport.d.ts +16 -0
- package/lib/VoIP/relay-transport.js +559 -0
- package/lib/VoIP/signaling.d.ts +16 -0
- package/lib/VoIP/signaling.js +624 -0
- package/lib/VoIP/types.d.ts +11 -0
- package/lib/VoIP/types.js +17 -0
- package/lib/VoIP/wasm-engine.d.ts +28 -0
- package/lib/VoIP/wasm-engine.js +1214 -0
- package/lib/VoIP/worker-bootstrap.d.ts +1 -0
- package/lib/VoIP/worker-bootstrap.js +1042 -0
- package/lib/WABinary/constants.d.ts +61 -0
- package/lib/WABinary/constants.js +1466 -0
- package/lib/WABinary/decode.d.ts +9 -0
- package/lib/WABinary/decode.js +261 -0
- package/lib/WABinary/encode.d.ts +2 -0
- package/lib/WABinary/encode.js +219 -0
- package/lib/WABinary/generic-utils.d.ts +45 -0
- package/lib/WABinary/generic-utils.js +285 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +5 -0
- package/lib/WABinary/jid-utils.d.ts +32 -0
- package/lib/WABinary/jid-utils.js +102 -0
- package/lib/WABinary/types.d.ts +1 -0
- package/lib/WABinary/types.js +1 -0
- package/lib/WAM/BinaryInfo.d.ts +7 -0
- package/lib/WAM/BinaryInfo.js +9 -0
- package/lib/WAM/constants.d.ts +34926 -0
- package/lib/WAM/constants.js +22852 -0
- package/lib/WAM/encode.d.ts +1 -0
- package/lib/WAM/encode.js +149 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAM/index.js +3 -0
- package/lib/WAUSync/Protocols/USyncBusinessProtocol.d.ts +43 -0
- package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +51 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +29 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +60 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -0
- package/lib/WAUSync/Protocols/USyncFeatureProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +28 -0
- package/lib/WAUSync/Protocols/USyncPictureProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncPictureProtocol.js +28 -0
- package/lib/WAUSync/Protocols/USyncSidelistProtocol.d.ts +20 -0
- package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +23 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -0
- package/lib/WAUSync/Protocols/USyncTextStatusProtocol.d.ts +14 -0
- package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +24 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +24 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +49 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -0
- package/lib/WAUSync/Protocols/index.d.ts +12 -0
- package/lib/WAUSync/Protocols/index.js +12 -0
- package/lib/WAUSync/USyncQuery.d.ts +25 -0
- package/lib/WAUSync/USyncQuery.js +140 -0
- package/lib/WAUSync/USyncUser.d.ts +24 -0
- package/lib/WAUSync/USyncUser.js +47 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +3 -0
- package/lib/assets/wasm/loader.js +5 -0
- package/lib/assets/wasm/whatsapp.wasm +0 -0
- package/lib/assets/wasm/worker-modules.js +273 -0
- package/lib/exports-extra.d.ts +45 -0
- package/lib/exports-extra.js +47 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +24 -0
- package/package.json +161 -4
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
export function makeMessagesSocket(config: any): {
|
|
2
|
+
userDevicesCache: any;
|
|
3
|
+
devicesMutex: {
|
|
4
|
+
mutex(code: any): any;
|
|
5
|
+
};
|
|
6
|
+
issuePrivacyTokens: (jids: any, timestamp: any) => Promise<any>;
|
|
7
|
+
assertSessions: (jids: any, force: any) => Promise<boolean>;
|
|
8
|
+
relayMessage: (jid: any, message: any, opts1: { [key: string]: any;
|
|
9
|
+
messageId: any;
|
|
10
|
+
participant: any;
|
|
11
|
+
additionalAttributes: any;
|
|
12
|
+
additionalNodes: any;
|
|
13
|
+
useUserDevicesCache: any;
|
|
14
|
+
useCachedGroupMetadata: any;
|
|
15
|
+
addBizAttributes: any;
|
|
16
|
+
statusJidList: any;
|
|
17
|
+
recipientOverrides: any;
|
|
18
|
+
restrictKeyTo: any;
|
|
19
|
+
}) => Promise<any>;
|
|
20
|
+
sendReceipt: (jid: any, participant: any, messageIds: any, type: any) => Promise<void>;
|
|
21
|
+
sendReceipts: (keys: any, type: any) => Promise<void>;
|
|
22
|
+
readMessages: (keys: any) => Promise<void>;
|
|
23
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<any>;
|
|
24
|
+
getMediaHost: () => "mmg.whatsapp.net";
|
|
25
|
+
waUploadToServer: (filePath: any, opts4: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
mediaType: any;
|
|
28
|
+
fileEncSha256B64: any;
|
|
29
|
+
timeoutMs: any;
|
|
30
|
+
newsletter: any;
|
|
31
|
+
}) => Promise<{
|
|
32
|
+
mediaUrl: any;
|
|
33
|
+
directPath: any;
|
|
34
|
+
meta_hmac: any;
|
|
35
|
+
fbid: any;
|
|
36
|
+
ts: any;
|
|
37
|
+
thumbnailDirectPath: any;
|
|
38
|
+
thumbnailSha256: any;
|
|
39
|
+
}>;
|
|
40
|
+
fetchPrivacySettings: (force?: boolean) => Promise<any>;
|
|
41
|
+
sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
|
|
42
|
+
createParticipantNodes: (recipientJids: any, message: any, extraAttrs: any, dsmMessage: any) => Promise<{
|
|
43
|
+
nodes: any[];
|
|
44
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
getUSyncDevices: (jids: any, useCache: any, ignoreZeroDevices: any) => Promise<any[]>;
|
|
47
|
+
messageRetryManager: MessageRetryManager;
|
|
48
|
+
updateMemberLabel: (jid: any, memberLabel: any) => Promise<any>;
|
|
49
|
+
updateMediaMessage: (message: any) => Promise<any>;
|
|
50
|
+
sendTable: (jid: any, title: any, headers: any, rows: any, quoted: any, options?: {}) => Promise<{
|
|
51
|
+
message: {
|
|
52
|
+
botForwardedMessage: {
|
|
53
|
+
message: {
|
|
54
|
+
richResponseMessage: {
|
|
55
|
+
messageType: number;
|
|
56
|
+
submessages: any;
|
|
57
|
+
contextInfo: any;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
messageId: string;
|
|
63
|
+
}>;
|
|
64
|
+
sendTableV2: (jid: any, table: any, quoted: any, options?: {}) => Promise<{
|
|
65
|
+
message: {
|
|
66
|
+
messageContextInfo: {
|
|
67
|
+
threadId: any[];
|
|
68
|
+
deviceListMetadata: {
|
|
69
|
+
senderKeyIndexes: any[];
|
|
70
|
+
recipientKeyIndexes: any[];
|
|
71
|
+
recipientKeyHash: string;
|
|
72
|
+
recipientTimestamp: number;
|
|
73
|
+
};
|
|
74
|
+
deviceListMetadataVersion: number;
|
|
75
|
+
messageSecret: any;
|
|
76
|
+
};
|
|
77
|
+
botForwardedMessage: {
|
|
78
|
+
message: {
|
|
79
|
+
richResponseMessage: {
|
|
80
|
+
submessages: any[];
|
|
81
|
+
messageType: number;
|
|
82
|
+
unifiedResponse: {
|
|
83
|
+
data: any;
|
|
84
|
+
};
|
|
85
|
+
contextInfo: {
|
|
86
|
+
forwardingScore: number;
|
|
87
|
+
isForwarded: boolean;
|
|
88
|
+
forwardedAiBotMessageInfo: {
|
|
89
|
+
botJid: string;
|
|
90
|
+
};
|
|
91
|
+
forwardOrigin: number;
|
|
92
|
+
botMessageSharingInfo: {
|
|
93
|
+
botEntryPointOrigin: number;
|
|
94
|
+
forwardScore: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
messageId: string;
|
|
102
|
+
}>;
|
|
103
|
+
sendList: (jid: any, title: any, items: any, quoted: any, options?: {}) => Promise<{
|
|
104
|
+
message: {
|
|
105
|
+
botForwardedMessage: {
|
|
106
|
+
message: {
|
|
107
|
+
richResponseMessage: {
|
|
108
|
+
messageType: number;
|
|
109
|
+
submessages: any;
|
|
110
|
+
contextInfo: any;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
messageId: string;
|
|
116
|
+
}>;
|
|
117
|
+
sendCodeBlock: (jid: any, code: any, quoted: any, options?: {}) => Promise<{
|
|
118
|
+
message: {
|
|
119
|
+
botForwardedMessage: {
|
|
120
|
+
message: {
|
|
121
|
+
richResponseMessage: {
|
|
122
|
+
messageType: number;
|
|
123
|
+
submessages: any;
|
|
124
|
+
contextInfo: any;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
messageId: string;
|
|
130
|
+
}>;
|
|
131
|
+
sendCodeBlockV2: (jid: any, code: any, quoted: any, options?: {}) => Promise<{
|
|
132
|
+
message: {
|
|
133
|
+
messageContextInfo: {
|
|
134
|
+
threadId: any[];
|
|
135
|
+
deviceListMetadata: {
|
|
136
|
+
senderKeyIndexes: any[];
|
|
137
|
+
recipientKeyIndexes: any[];
|
|
138
|
+
recipientKeyHash: string;
|
|
139
|
+
recipientTimestamp: number;
|
|
140
|
+
};
|
|
141
|
+
deviceListMetadataVersion: number;
|
|
142
|
+
messageSecret: any;
|
|
143
|
+
};
|
|
144
|
+
botForwardedMessage: {
|
|
145
|
+
message: {
|
|
146
|
+
richResponseMessage: {
|
|
147
|
+
submessages: any[];
|
|
148
|
+
messageType: number;
|
|
149
|
+
unifiedResponse: {
|
|
150
|
+
data: any;
|
|
151
|
+
};
|
|
152
|
+
contextInfo: {
|
|
153
|
+
mentionedJid: any[];
|
|
154
|
+
groupMentions: any[];
|
|
155
|
+
statusAttributions: any[];
|
|
156
|
+
forwardingScore: number;
|
|
157
|
+
isForwarded: boolean;
|
|
158
|
+
forwardedAiBotMessageInfo: {
|
|
159
|
+
botJid: string;
|
|
160
|
+
};
|
|
161
|
+
forwardOrigin: number;
|
|
162
|
+
botMessageSharingInfo: {
|
|
163
|
+
botEntryPointOrigin: number;
|
|
164
|
+
forwardScore: number;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
messageId: string;
|
|
172
|
+
}>;
|
|
173
|
+
sendLink: (jid: any, text: any, links: any, quoted: any, options?: {}) => Promise<{
|
|
174
|
+
message: {
|
|
175
|
+
messageContextInfo: {
|
|
176
|
+
messageSecret: any;
|
|
177
|
+
};
|
|
178
|
+
botForwardedMessage: {
|
|
179
|
+
message: {
|
|
180
|
+
richResponseMessage: {
|
|
181
|
+
messageType: number;
|
|
182
|
+
submessages: {
|
|
183
|
+
messageType: number;
|
|
184
|
+
messageText: any;
|
|
185
|
+
}[];
|
|
186
|
+
unifiedResponse: {
|
|
187
|
+
data: any;
|
|
188
|
+
};
|
|
189
|
+
contextInfo: {
|
|
190
|
+
forwardingScore: any;
|
|
191
|
+
isForwarded: boolean;
|
|
192
|
+
forwardedAiBotMessageInfo: {
|
|
193
|
+
botJid: any;
|
|
194
|
+
};
|
|
195
|
+
forwardOrigin: number;
|
|
196
|
+
botMessageSharingInfo: {
|
|
197
|
+
forwardScore: any;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
messageId: string;
|
|
205
|
+
}>;
|
|
206
|
+
sendLinkV2: (jid: any, text: any, links: any, quoted: any, options?: {}) => Promise<{
|
|
207
|
+
message: {
|
|
208
|
+
messageContextInfo: {
|
|
209
|
+
threadId: any[];
|
|
210
|
+
messageSecret: any;
|
|
211
|
+
};
|
|
212
|
+
botForwardedMessage: {
|
|
213
|
+
message: {
|
|
214
|
+
richResponseMessage: {
|
|
215
|
+
messageType: number;
|
|
216
|
+
submessages: {
|
|
217
|
+
messageType: number;
|
|
218
|
+
messageText: any;
|
|
219
|
+
}[];
|
|
220
|
+
unifiedResponse: {
|
|
221
|
+
data: any;
|
|
222
|
+
};
|
|
223
|
+
contextInfo: {
|
|
224
|
+
isForwarded: boolean;
|
|
225
|
+
forwardOrigin: number;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
messageId: string;
|
|
232
|
+
}>;
|
|
233
|
+
sendLatex: (jid: any, quoted: any, options: any) => Promise<{
|
|
234
|
+
message: {
|
|
235
|
+
botForwardedMessage: {
|
|
236
|
+
message: {
|
|
237
|
+
richResponseMessage: {
|
|
238
|
+
messageType: number;
|
|
239
|
+
submessages: any;
|
|
240
|
+
contextInfo: any;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
messageId: string;
|
|
246
|
+
}>;
|
|
247
|
+
sendLatexImage: (jid: any, quoted: any, options: any, uploadFn: any, renderLatexToPng: any) => Promise<{
|
|
248
|
+
message: {
|
|
249
|
+
botForwardedMessage: {
|
|
250
|
+
message: {
|
|
251
|
+
richResponseMessage: {
|
|
252
|
+
messageType: number;
|
|
253
|
+
submessages: any;
|
|
254
|
+
contextInfo: any;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
messageId: string;
|
|
260
|
+
}>;
|
|
261
|
+
sendLatexInlineImage: (jid: any, quoted: any, options: any, uploadFn: any, renderLatexToPng: any) => Promise<{
|
|
262
|
+
message: {
|
|
263
|
+
botForwardedMessage: {
|
|
264
|
+
message: {
|
|
265
|
+
richResponseMessage: {
|
|
266
|
+
messageType: number;
|
|
267
|
+
submessages: any;
|
|
268
|
+
contextInfo: any;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
messageId: string;
|
|
274
|
+
}>;
|
|
275
|
+
captureUnifiedResponse: typeof captureUnifiedResponse;
|
|
276
|
+
sendUnifiedResponse: (jid: any, quoted: any, captured: any) => Promise<{
|
|
277
|
+
message: {
|
|
278
|
+
botForwardedMessage: {
|
|
279
|
+
message: {
|
|
280
|
+
richResponseMessage: {
|
|
281
|
+
messageType: number;
|
|
282
|
+
submessages: any;
|
|
283
|
+
contextInfo: any;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
messageId: string;
|
|
289
|
+
}>;
|
|
290
|
+
sendRichMessage: (jid: any, submessages: any, quoted: any, options?: {}) => Promise<{
|
|
291
|
+
message: {
|
|
292
|
+
botForwardedMessage: {
|
|
293
|
+
message: {
|
|
294
|
+
richResponseMessage: {
|
|
295
|
+
messageType: number;
|
|
296
|
+
submessages: any;
|
|
297
|
+
contextInfo: any;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
messageId: string;
|
|
303
|
+
}>;
|
|
304
|
+
sendMessage: (jid: any, content: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
305
|
+
sendAlbumMessage: (jid: any, medias: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
306
|
+
sendReaction: (jid: any, reaction: any, key: any) => Promise<proto.WebMessageInfo>;
|
|
307
|
+
sendPin: (jid: any, key: any, opts2?: { [key: string]: any;
|
|
308
|
+
durationSec?: number;
|
|
309
|
+
}, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
310
|
+
sendUnpin: (jid: any, key: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
311
|
+
sendKeep: (jid: any, key: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
312
|
+
sendUnkeep: (jid: any, key: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
313
|
+
sendEvent: (jid: any, event: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
314
|
+
sendPoll: (jid: any, poll: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
315
|
+
sendQuiz: (jid: any, quiz: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
316
|
+
editPoll: (jid: any, key: any, poll: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
317
|
+
sendMentionAll: (jid: any, text: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
318
|
+
sendStatusMention: (content: any, mentions: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
319
|
+
sendLocation: (jid: any, location: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
320
|
+
sendContact: (jid: any, contact: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
321
|
+
sendGroupInvite: (jid: any, invite: any, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
322
|
+
downloadMedia: (message: any, type?: string, options?: {}) => Promise<any>;
|
|
323
|
+
copyNForward: (jid: any, message: any, forceForward?: boolean, options?: {}) => Promise<proto.WebMessageInfo>;
|
|
324
|
+
newsletterCreate: (name: any, description: any) => Promise<{
|
|
325
|
+
id: any;
|
|
326
|
+
owner: any;
|
|
327
|
+
name: any;
|
|
328
|
+
creation_time: number;
|
|
329
|
+
description: any;
|
|
330
|
+
invite: any;
|
|
331
|
+
subscribers: number;
|
|
332
|
+
verification: any;
|
|
333
|
+
picture: {
|
|
334
|
+
id: any;
|
|
335
|
+
directPath: any;
|
|
336
|
+
};
|
|
337
|
+
mute_state: any;
|
|
338
|
+
}>;
|
|
339
|
+
newsletterUpdate: (jid: any, updates: any) => Promise<any>;
|
|
340
|
+
newsletterSubscribers: (jid: any) => Promise<any>;
|
|
341
|
+
newsletterSubscribed: () => Promise<any>;
|
|
342
|
+
newsletterMetadata: (type: any, key: any) => Promise<any>;
|
|
343
|
+
newsletterFollow: (jid: any) => any;
|
|
344
|
+
newsletterUnfollow: (jid: any) => any;
|
|
345
|
+
newsletterMute: (jid: any) => any;
|
|
346
|
+
newsletterUnmute: (jid: any) => any;
|
|
347
|
+
newsletterUpdateName: (jid: any, name: any) => Promise<any>;
|
|
348
|
+
newsletterUpdateDescription: (jid: any, description: any) => Promise<any>;
|
|
349
|
+
newsletterUpdatePicture: (jid: any, content: any) => Promise<any>;
|
|
350
|
+
newsletterRemovePicture: (jid: any) => Promise<any>;
|
|
351
|
+
newsletterReactMessage: (jid: any, serverId: any, reaction: any) => Promise<void>;
|
|
352
|
+
newsletterFetchMessages: (jid: any, count: any, since: any, after: any) => Promise<{
|
|
353
|
+
[k: string]: any;
|
|
354
|
+
}[]>;
|
|
355
|
+
subscribeNewsletterUpdates: (jid: any) => Promise<{
|
|
356
|
+
duration: any;
|
|
357
|
+
}>;
|
|
358
|
+
newsletterAdminCount: (jid: any) => Promise<any>;
|
|
359
|
+
newsletterChangeOwner: (jid: any, newOwnerJid: any) => Promise<void>;
|
|
360
|
+
newsletterDemote: (jid: any, userJid: any) => Promise<void>;
|
|
361
|
+
newsletterDelete: (jid: any) => Promise<void>;
|
|
362
|
+
executeWMexQuery: Function;
|
|
363
|
+
newsletterProbeQueryIds: Function;
|
|
364
|
+
groupQuery: (jid: any, type: any, content: any) => Promise<any>;
|
|
365
|
+
groupMetadata: (jid: any) => Promise<{
|
|
366
|
+
id: any;
|
|
367
|
+
notify: any;
|
|
368
|
+
addressingMode: any;
|
|
369
|
+
subject: any;
|
|
370
|
+
subjectOwner: any;
|
|
371
|
+
subjectOwnerPn: any;
|
|
372
|
+
subjectOwnerUsername: any;
|
|
373
|
+
subjectTime: number;
|
|
374
|
+
size: any;
|
|
375
|
+
creation: number;
|
|
376
|
+
owner: string;
|
|
377
|
+
ownerPn: string;
|
|
378
|
+
ownerUsername: any;
|
|
379
|
+
owner_country_code: any;
|
|
380
|
+
desc: any;
|
|
381
|
+
descId: any;
|
|
382
|
+
descOwner: string;
|
|
383
|
+
descOwnerPn: string;
|
|
384
|
+
descOwnerUsername: any;
|
|
385
|
+
descTime: number;
|
|
386
|
+
linkedParent: any;
|
|
387
|
+
restrict: boolean;
|
|
388
|
+
announce: boolean;
|
|
389
|
+
isCommunity: boolean;
|
|
390
|
+
isCommunityAnnounce: boolean;
|
|
391
|
+
joinApprovalMode: boolean;
|
|
392
|
+
memberAddMode: boolean;
|
|
393
|
+
participants: any;
|
|
394
|
+
ephemeralDuration: number;
|
|
395
|
+
}>;
|
|
396
|
+
groupCreate: (subject: any, participants: any) => Promise<{
|
|
397
|
+
id: any;
|
|
398
|
+
notify: any;
|
|
399
|
+
addressingMode: any;
|
|
400
|
+
subject: any;
|
|
401
|
+
subjectOwner: any;
|
|
402
|
+
subjectOwnerPn: any;
|
|
403
|
+
subjectOwnerUsername: any;
|
|
404
|
+
subjectTime: number;
|
|
405
|
+
size: any;
|
|
406
|
+
creation: number;
|
|
407
|
+
owner: string;
|
|
408
|
+
ownerPn: string;
|
|
409
|
+
ownerUsername: any;
|
|
410
|
+
owner_country_code: any;
|
|
411
|
+
desc: any;
|
|
412
|
+
descId: any;
|
|
413
|
+
descOwner: string;
|
|
414
|
+
descOwnerPn: string;
|
|
415
|
+
descOwnerUsername: any;
|
|
416
|
+
descTime: number;
|
|
417
|
+
linkedParent: any;
|
|
418
|
+
restrict: boolean;
|
|
419
|
+
announce: boolean;
|
|
420
|
+
isCommunity: boolean;
|
|
421
|
+
isCommunityAnnounce: boolean;
|
|
422
|
+
joinApprovalMode: boolean;
|
|
423
|
+
memberAddMode: boolean;
|
|
424
|
+
participants: any;
|
|
425
|
+
ephemeralDuration: number;
|
|
426
|
+
}>;
|
|
427
|
+
groupLeave: (id: any) => Promise<void>;
|
|
428
|
+
groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
|
|
429
|
+
groupRequestParticipantsList: (jid: any) => Promise<any>;
|
|
430
|
+
groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
|
|
431
|
+
groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any[]>;
|
|
432
|
+
groupUpdateDescription: (jid: any, description: any) => Promise<void>;
|
|
433
|
+
groupInviteCode: (jid: any) => Promise<any>;
|
|
434
|
+
groupRevokeInvite: (jid: any) => Promise<any>;
|
|
435
|
+
groupAcceptInvite: (code: any) => Promise<any>;
|
|
436
|
+
groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
|
|
437
|
+
groupAcceptInviteV4: (...args: any[]) => Promise<any>;
|
|
438
|
+
groupGetInviteInfo: (code: any) => Promise<{
|
|
439
|
+
id: any;
|
|
440
|
+
notify: any;
|
|
441
|
+
addressingMode: any;
|
|
442
|
+
subject: any;
|
|
443
|
+
subjectOwner: any;
|
|
444
|
+
subjectOwnerPn: any;
|
|
445
|
+
subjectOwnerUsername: any;
|
|
446
|
+
subjectTime: number;
|
|
447
|
+
size: any;
|
|
448
|
+
creation: number;
|
|
449
|
+
owner: string;
|
|
450
|
+
ownerPn: string;
|
|
451
|
+
ownerUsername: any;
|
|
452
|
+
owner_country_code: any;
|
|
453
|
+
desc: any;
|
|
454
|
+
descId: any;
|
|
455
|
+
descOwner: string;
|
|
456
|
+
descOwnerPn: string;
|
|
457
|
+
descOwnerUsername: any;
|
|
458
|
+
descTime: number;
|
|
459
|
+
linkedParent: any;
|
|
460
|
+
restrict: boolean;
|
|
461
|
+
announce: boolean;
|
|
462
|
+
isCommunity: boolean;
|
|
463
|
+
isCommunityAnnounce: boolean;
|
|
464
|
+
joinApprovalMode: boolean;
|
|
465
|
+
memberAddMode: boolean;
|
|
466
|
+
participants: any;
|
|
467
|
+
ephemeralDuration: number;
|
|
468
|
+
}>;
|
|
469
|
+
groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
|
|
470
|
+
groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
|
|
471
|
+
groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
|
|
472
|
+
groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
|
|
473
|
+
groupFetchAllParticipating: () => Promise<{}>;
|
|
474
|
+
findUserId: (pnLid: any) => Promise<{
|
|
475
|
+
lid: any;
|
|
476
|
+
phoneNumber: any;
|
|
477
|
+
}>;
|
|
478
|
+
serverProps: {
|
|
479
|
+
privacyTokenOn1to1: boolean;
|
|
480
|
+
profilePicPrivacyToken: boolean;
|
|
481
|
+
lidTrustedTokenIssueToLid: boolean;
|
|
482
|
+
};
|
|
483
|
+
createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
|
|
484
|
+
getBotListV2: () => Promise<{
|
|
485
|
+
jid: any;
|
|
486
|
+
personaId: any;
|
|
487
|
+
}[]>;
|
|
488
|
+
messageMutex: {
|
|
489
|
+
mutex(code: any): any;
|
|
490
|
+
};
|
|
491
|
+
receiptMutex: {
|
|
492
|
+
mutex(code: any): any;
|
|
493
|
+
};
|
|
494
|
+
appStatePatchMutex: {
|
|
495
|
+
mutex(code: any): any;
|
|
496
|
+
};
|
|
497
|
+
notificationMutex: {
|
|
498
|
+
mutex(code: any): any;
|
|
499
|
+
};
|
|
500
|
+
upsertMessage: (...args: any[]) => Promise<any>;
|
|
501
|
+
appPatch: (patchCreate: any) => Promise<void>;
|
|
502
|
+
sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
|
|
503
|
+
presenceSubscribe: (toJid: any) => Promise<void>;
|
|
504
|
+
profilePictureUrl: (jid: any, type?: string, timeoutMs?: number, shouldIncludeTcToken?: boolean) => Promise<any>;
|
|
505
|
+
fetchBlocklist: () => Promise<any>;
|
|
506
|
+
fetchStatus: (...jids: any[]) => Promise<any>;
|
|
507
|
+
fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
|
|
508
|
+
updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise<void>;
|
|
509
|
+
removeProfilePicture: (jid: any) => Promise<void>;
|
|
510
|
+
updateProfileStatus: (status: any) => Promise<void>;
|
|
511
|
+
updateProfileName: (name: any) => Promise<void>;
|
|
512
|
+
updateBlockStatus: (jid: any, action: any) => Promise<void>;
|
|
513
|
+
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise<void>;
|
|
514
|
+
updateCallPrivacy: (value: any) => Promise<void>;
|
|
515
|
+
updateMessagesPrivacy: (value: any) => Promise<void>;
|
|
516
|
+
updateLastSeenPrivacy: (value: any) => Promise<void>;
|
|
517
|
+
updateOnlinePrivacy: (value: any) => Promise<void>;
|
|
518
|
+
updateProfilePicturePrivacy: (value: any) => Promise<void>;
|
|
519
|
+
updateStatusPrivacy: (value: any) => Promise<void>;
|
|
520
|
+
updateReadReceiptsPrivacy: (value: any) => Promise<void>;
|
|
521
|
+
updateGroupsAddPrivacy: (value: any) => Promise<void>;
|
|
522
|
+
updateDefaultDisappearingMode: (duration: any) => Promise<void>;
|
|
523
|
+
getBusinessProfile: (jid: any) => Promise<{
|
|
524
|
+
wid: any;
|
|
525
|
+
address: any;
|
|
526
|
+
description: any;
|
|
527
|
+
website: any[];
|
|
528
|
+
email: any;
|
|
529
|
+
category: any;
|
|
530
|
+
business_hours: {
|
|
531
|
+
timezone: any;
|
|
532
|
+
business_config: any;
|
|
533
|
+
};
|
|
534
|
+
}>;
|
|
535
|
+
resyncAppState: (...args: any[]) => Promise<any>;
|
|
536
|
+
chatModify: (mod: any, jid: any) => Promise<void>;
|
|
537
|
+
cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
|
|
538
|
+
addOrEditContact: (jid: any, contact: any) => Promise<void>;
|
|
539
|
+
removeContact: (jid: any) => Promise<void>;
|
|
540
|
+
placeholderResendCache: any;
|
|
541
|
+
addLabel: (jid: any, labels: any) => Promise<void>;
|
|
542
|
+
addChatLabel: (jid: any, labelId: any) => Promise<void>;
|
|
543
|
+
removeChatLabel: (jid: any, labelId: any) => Promise<void>;
|
|
544
|
+
addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
|
|
545
|
+
removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
|
|
546
|
+
star: (jid: any, messages: any, star: any) => Promise<void>;
|
|
547
|
+
addOrEditQuickReply: (quickReply: any) => Promise<void>;
|
|
548
|
+
removeQuickReply: (timestamp: any) => Promise<void>;
|
|
549
|
+
type: string;
|
|
550
|
+
ws: import("./Client/websocket.js").WebSocketClient;
|
|
551
|
+
ev: {
|
|
552
|
+
process(handler: any): () => void;
|
|
553
|
+
emit(event: any, evData: any): any;
|
|
554
|
+
isBuffering(): boolean;
|
|
555
|
+
buffer: () => void;
|
|
556
|
+
flush: () => boolean;
|
|
557
|
+
createBufferedFunction(work: any): (...args: any[]) => Promise<any>;
|
|
558
|
+
on: (...args: any[]) => any;
|
|
559
|
+
off: (...args: any[]) => any;
|
|
560
|
+
removeAllListeners: (...args: any[]) => any;
|
|
561
|
+
destroy(): void;
|
|
562
|
+
};
|
|
563
|
+
authState: {
|
|
564
|
+
creds: any;
|
|
565
|
+
keys: {
|
|
566
|
+
get: (type: any, ids: any) => Promise<any>;
|
|
567
|
+
set: (data: any) => Promise<void>;
|
|
568
|
+
isInTransaction: () => boolean;
|
|
569
|
+
transaction: (work: any, key: any) => Promise<any>;
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
signalRepository: any;
|
|
573
|
+
user: any;
|
|
574
|
+
generateMessageTag: () => string;
|
|
575
|
+
query: (node: any, timeoutMs: any) => Promise<any>;
|
|
576
|
+
waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
|
|
577
|
+
waitForSocketOpen: () => Promise<void>;
|
|
578
|
+
sendRawMessage: (data: any) => Promise<void>;
|
|
579
|
+
sendNode: (frame: any) => Promise<void>;
|
|
580
|
+
logout: (msg: any) => Promise<void>;
|
|
581
|
+
end: (error: any) => Promise<void>;
|
|
582
|
+
registerSocketEndHandler: (handler: any) => void;
|
|
583
|
+
onUnexpectedError: (err: any, msg: any) => void;
|
|
584
|
+
uploadPreKeys: (count?: number) => Promise<void>;
|
|
585
|
+
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
586
|
+
digestKeyBundle: () => Promise<void>;
|
|
587
|
+
rotateSignedPreKey: () => Promise<void>;
|
|
588
|
+
requestPairingCode: (phoneNumber: any, customPairingCode: any) => Promise<any>;
|
|
589
|
+
updateServerTimeOffset: (options: {
|
|
590
|
+
[key: string]: any;
|
|
591
|
+
attrs: any;
|
|
592
|
+
}) => void;
|
|
593
|
+
sendUnifiedSession: () => Promise<void>;
|
|
594
|
+
wamBuffer: import("../index.js").BinaryInfo;
|
|
595
|
+
waitForConnectionUpdate: (check: any, timeoutMs: any) => Promise<void>;
|
|
596
|
+
sendWAMBuffer: (wamBuffer: any) => Promise<any>;
|
|
597
|
+
executeUSyncQuery: (usyncQuery: any) => Promise<any>;
|
|
598
|
+
onWhatsApp: (...phoneNumber: any[]) => Promise<any>;
|
|
599
|
+
fetchAccountReachoutTimelock: () => Promise<{
|
|
600
|
+
isActive: boolean;
|
|
601
|
+
timeEnforcementEnds: Date;
|
|
602
|
+
enforcementType: any;
|
|
603
|
+
}>;
|
|
604
|
+
fetchNewChatMessageCap: () => Promise<any>;
|
|
605
|
+
};
|
|
606
|
+
import { MessageRetryManager } from '../Utils/index.js';
|
|
607
|
+
import { captureUnifiedResponse } from '../Utils/rich-messages.js';
|
|
608
|
+
import { proto } from '../../WAProto/index.js';
|