@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,315 @@
|
|
|
1
|
+
import { Boom } from '@hapi/boom';
|
|
2
|
+
import { proto } from '../../WAProto/index.js';
|
|
3
|
+
import { areJidsSameUser, isHostedLidUser, isHostedPnUser, isJidBroadcast, isJidGroup, isJidMetaAI, isJidNewsletter, isJidStatusBroadcast, isLidUser, isPnUser } from '../WABinary/index.js';
|
|
4
|
+
import { unpadRandomMax16 } from './generics.js';
|
|
5
|
+
export const getDecryptionJid = async (sender, repository) => {
|
|
6
|
+
if (isLidUser(sender) || isHostedLidUser(sender)) {
|
|
7
|
+
return sender;
|
|
8
|
+
}
|
|
9
|
+
const mapped = await repository.lidMapping.getLIDForPN(sender);
|
|
10
|
+
return mapped || sender;
|
|
11
|
+
};
|
|
12
|
+
const storeMappingFromEnvelope = async (stanza, sender, repository, decryptionJid, logger) => {
|
|
13
|
+
// TODO: Handle hosted IDs
|
|
14
|
+
const { senderAlt } = extractAddressingContext(stanza);
|
|
15
|
+
if (senderAlt && isLidUser(senderAlt) && isPnUser(sender) && decryptionJid === sender) {
|
|
16
|
+
try {
|
|
17
|
+
await repository.lidMapping.storeLIDPNMappings([{ lid: senderAlt, pn: sender }]);
|
|
18
|
+
await repository.migrateSession(sender, senderAlt);
|
|
19
|
+
logger.debug({ sender, senderAlt }, 'Stored LID mapping from envelope');
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
logger.warn({ sender, senderAlt, error }, 'Failed to store LID mapping');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
export const NO_MESSAGE_FOUND_ERROR_TEXT = 'Message absent from node';
|
|
27
|
+
export const MISSING_KEYS_ERROR_TEXT = 'Key used already or never filled';
|
|
28
|
+
export const ACCOUNT_RESTRICTED_TEXT = 'Your account has been restricted';
|
|
29
|
+
// Retry configuration for failed decryption
|
|
30
|
+
export const DECRYPTION_RETRY_CONFIG = {
|
|
31
|
+
maxRetries: 3,
|
|
32
|
+
baseDelayMs: 100,
|
|
33
|
+
sessionRecordErrors: ['No session record', 'SessionError: No session record']
|
|
34
|
+
};
|
|
35
|
+
/** NACK reason codes we send to the server (client → server) */
|
|
36
|
+
export const NACK_REASONS = {
|
|
37
|
+
SenderReachoutTimelocked: 463,
|
|
38
|
+
ParsingError: 487,
|
|
39
|
+
UnrecognizedStanza: 488,
|
|
40
|
+
UnrecognizedStanzaClass: 489,
|
|
41
|
+
UnrecognizedStanzaType: 490,
|
|
42
|
+
InvalidProtobuf: 491,
|
|
43
|
+
InvalidHostedCompanionStanza: 493,
|
|
44
|
+
MissingMessageSecret: 495,
|
|
45
|
+
SignalErrorOldCounter: 496,
|
|
46
|
+
MessageDeletedOnPeer: 499,
|
|
47
|
+
UnhandledError: 500,
|
|
48
|
+
UnsupportedAdminRevoke: 550,
|
|
49
|
+
UnsupportedLIDGroup: 551,
|
|
50
|
+
DBOperationFailed: 552
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Server-side error codes returned in ack stanzas (server → client) that we
|
|
54
|
+
* currently have dedicated handlers for. Extend as more handlers are added.
|
|
55
|
+
* Distinct from the client-side NackReason enum (WAWebCreateNackFromStanza).
|
|
56
|
+
*/
|
|
57
|
+
export const SERVER_ERROR_CODES = {
|
|
58
|
+
/**
|
|
59
|
+
* 1:1 message missing privacy token (tctoken). Usually means the account is
|
|
60
|
+
* restricted: WhatsApp blocks starting new chats but preserves existing ones,
|
|
61
|
+
* since established chats already carry a tctoken.
|
|
62
|
+
*/
|
|
63
|
+
MessageAccountRestriction: '463',
|
|
64
|
+
/** Stanza validation failure (SMAX_INVALID) — likely stale device session */
|
|
65
|
+
SmaxInvalid: '479'
|
|
66
|
+
};
|
|
67
|
+
export const extractAddressingContext = (stanza) => {
|
|
68
|
+
let senderAlt;
|
|
69
|
+
let recipientAlt;
|
|
70
|
+
const sender = stanza.attrs.participant || stanza.attrs.from;
|
|
71
|
+
const addressingMode = stanza.attrs.addressing_mode || (sender?.endsWith('lid') ? 'lid' : 'pn');
|
|
72
|
+
if (addressingMode === 'lid') {
|
|
73
|
+
// Message is LID-addressed: sender is LID, extract corresponding PN
|
|
74
|
+
// without device data
|
|
75
|
+
senderAlt = stanza.attrs.participant_pn || stanza.attrs.sender_pn || stanza.attrs.peer_recipient_pn;
|
|
76
|
+
recipientAlt = stanza.attrs.recipient_pn;
|
|
77
|
+
// with device data
|
|
78
|
+
//if (sender && senderAlt) senderAlt = transferDevice(sender, senderAlt)
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
// Message is PN-addressed: sender is PN, extract corresponding LID
|
|
82
|
+
// without device data
|
|
83
|
+
senderAlt = stanza.attrs.participant_lid || stanza.attrs.sender_lid || stanza.attrs.peer_recipient_lid;
|
|
84
|
+
recipientAlt = stanza.attrs.recipient_lid;
|
|
85
|
+
//with device data
|
|
86
|
+
//if (sender && senderAlt) senderAlt = transferDevice(sender, senderAlt)
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
addressingMode,
|
|
90
|
+
senderAlt,
|
|
91
|
+
recipientAlt
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Decode the received node as a message.
|
|
96
|
+
* @note this will only parse the message, not decrypt it
|
|
97
|
+
*/
|
|
98
|
+
export function decodeMessageNode(stanza, meId, meLid) {
|
|
99
|
+
let msgType;
|
|
100
|
+
let chatId;
|
|
101
|
+
let author;
|
|
102
|
+
let fromMe = false;
|
|
103
|
+
const msgId = stanza.attrs.id;
|
|
104
|
+
const from = stanza.attrs.from;
|
|
105
|
+
const participant = stanza.attrs.participant;
|
|
106
|
+
const recipient = stanza.attrs.recipient;
|
|
107
|
+
if (!msgId) {
|
|
108
|
+
throw new Boom('Invalid message stanza: missing id attribute', { data: stanza });
|
|
109
|
+
}
|
|
110
|
+
if (!from) {
|
|
111
|
+
throw new Boom('Invalid message stanza: missing from attribute', { data: stanza });
|
|
112
|
+
}
|
|
113
|
+
const addressingContext = extractAddressingContext(stanza);
|
|
114
|
+
const isMe = (jid) => areJidsSameUser(jid, meId);
|
|
115
|
+
const isMeLid = (jid) => areJidsSameUser(jid, meLid);
|
|
116
|
+
if (isPnUser(from) || isLidUser(from) || isHostedLidUser(from) || isHostedPnUser(from)) {
|
|
117
|
+
if (recipient && !isJidMetaAI(recipient)) {
|
|
118
|
+
if (!isMe(from) && !isMeLid(from)) {
|
|
119
|
+
throw new Boom('receipient present, but msg not from me', { data: stanza });
|
|
120
|
+
}
|
|
121
|
+
if (isMe(from) || isMeLid(from)) {
|
|
122
|
+
fromMe = true;
|
|
123
|
+
}
|
|
124
|
+
chatId = recipient;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
// Peer-routed self stanzas (history sync, app-state sync, etc.) arrive
|
|
128
|
+
// with `from` set to our own device but no `recipient` attribute —
|
|
129
|
+
// still mark as fromMe so self-only protocolMessage handlers run.
|
|
130
|
+
if (isMe(from) || isMeLid(from)) {
|
|
131
|
+
fromMe = true;
|
|
132
|
+
}
|
|
133
|
+
chatId = from;
|
|
134
|
+
}
|
|
135
|
+
msgType = 'chat';
|
|
136
|
+
author = from;
|
|
137
|
+
}
|
|
138
|
+
else if (isJidGroup(from)) {
|
|
139
|
+
if (!participant) {
|
|
140
|
+
throw new Boom('No participant in group message');
|
|
141
|
+
}
|
|
142
|
+
if (isMe(participant) || isMeLid(participant)) {
|
|
143
|
+
fromMe = true;
|
|
144
|
+
}
|
|
145
|
+
msgType = 'group';
|
|
146
|
+
author = participant;
|
|
147
|
+
chatId = from;
|
|
148
|
+
}
|
|
149
|
+
else if (isJidBroadcast(from)) {
|
|
150
|
+
if (!participant) {
|
|
151
|
+
throw new Boom('No participant in group message');
|
|
152
|
+
}
|
|
153
|
+
const isParticipantMe = isMe(participant);
|
|
154
|
+
if (isJidStatusBroadcast(from)) {
|
|
155
|
+
msgType = isParticipantMe ? 'direct_peer_status' : 'other_status';
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
msgType = isParticipantMe ? 'peer_broadcast' : 'other_broadcast';
|
|
159
|
+
}
|
|
160
|
+
fromMe = isParticipantMe;
|
|
161
|
+
chatId = from;
|
|
162
|
+
author = participant;
|
|
163
|
+
}
|
|
164
|
+
else if (isJidNewsletter(from)) {
|
|
165
|
+
msgType = 'newsletter';
|
|
166
|
+
chatId = from;
|
|
167
|
+
author = from;
|
|
168
|
+
if (isMe(from) || isMeLid(from)) {
|
|
169
|
+
fromMe = true;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
throw new Boom('Unknown message type', { data: stanza });
|
|
174
|
+
}
|
|
175
|
+
const pushname = stanza?.attrs?.notify;
|
|
176
|
+
const key = {
|
|
177
|
+
remoteJid: chatId,
|
|
178
|
+
remoteJidAlt: !isJidGroup(chatId) ? addressingContext.senderAlt : undefined,
|
|
179
|
+
remoteJidUsername: !isJidGroup(chatId)
|
|
180
|
+
? stanza.attrs.peer_recipient_username || stanza.attrs.recipient_username
|
|
181
|
+
: undefined,
|
|
182
|
+
fromMe,
|
|
183
|
+
id: msgId,
|
|
184
|
+
participant,
|
|
185
|
+
participantAlt: isJidGroup(chatId) ? addressingContext.senderAlt : undefined,
|
|
186
|
+
participantUsername: stanza.attrs.participant ? stanza.attrs.participant_username : undefined,
|
|
187
|
+
addressingMode: addressingContext.addressingMode,
|
|
188
|
+
...(msgType === 'newsletter' && stanza.attrs.server_id ? { server_id: stanza.attrs.server_id } : {})
|
|
189
|
+
};
|
|
190
|
+
const fullMessage = {
|
|
191
|
+
key,
|
|
192
|
+
category: stanza.attrs.category,
|
|
193
|
+
messageTimestamp: +stanza.attrs.t,
|
|
194
|
+
pushName: pushname,
|
|
195
|
+
broadcast: isJidBroadcast(from)
|
|
196
|
+
};
|
|
197
|
+
if (key.fromMe) {
|
|
198
|
+
fullMessage.status = proto.WebMessageInfo.Status.SERVER_ACK;
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
fullMessage,
|
|
202
|
+
author,
|
|
203
|
+
sender: msgType === 'chat' ? author : chatId
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export const decryptMessageNode = (stanza, meId, meLid, repository, logger) => {
|
|
207
|
+
const { fullMessage, author, sender } = decodeMessageNode(stanza, meId, meLid);
|
|
208
|
+
return {
|
|
209
|
+
fullMessage,
|
|
210
|
+
category: stanza.attrs.category,
|
|
211
|
+
author,
|
|
212
|
+
async decrypt() {
|
|
213
|
+
let decryptables = 0;
|
|
214
|
+
if (Array.isArray(stanza.content)) {
|
|
215
|
+
for (const { tag, attrs, content } of stanza.content) {
|
|
216
|
+
if (tag === 'verified_name' && content instanceof Uint8Array) {
|
|
217
|
+
const cert = proto.VerifiedNameCertificate.decode(content);
|
|
218
|
+
const details = proto.VerifiedNameCertificate.Details.decode(cert.details);
|
|
219
|
+
fullMessage.verifiedBizName = details.verifiedName;
|
|
220
|
+
}
|
|
221
|
+
if (tag === 'unavailable' && attrs.type === 'view_once') {
|
|
222
|
+
fullMessage.isViewOnce = true;
|
|
223
|
+
fullMessage.key.isViewOnce = true; // keep for backward compat with existing code that checks key.isViewOnce
|
|
224
|
+
}
|
|
225
|
+
if (attrs.count && tag === 'enc') {
|
|
226
|
+
fullMessage.retryCount = Number(attrs.count);
|
|
227
|
+
}
|
|
228
|
+
if (tag !== 'enc' && tag !== 'plaintext') {
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
if (!(content instanceof Uint8Array)) {
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
decryptables += 1;
|
|
235
|
+
let msgBuffer;
|
|
236
|
+
const decryptionJid = await getDecryptionJid(author, repository);
|
|
237
|
+
if (tag !== 'plaintext') {
|
|
238
|
+
// TODO: Handle hosted devices
|
|
239
|
+
await storeMappingFromEnvelope(stanza, author, repository, decryptionJid, logger);
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
const e2eType = tag === 'plaintext' ? 'plaintext' : attrs.type;
|
|
243
|
+
switch (e2eType) {
|
|
244
|
+
case 'skmsg':
|
|
245
|
+
msgBuffer = await repository.decryptGroupMessage({
|
|
246
|
+
group: sender,
|
|
247
|
+
authorJid: author,
|
|
248
|
+
msg: content
|
|
249
|
+
});
|
|
250
|
+
break;
|
|
251
|
+
case 'pkmsg':
|
|
252
|
+
case 'msg':
|
|
253
|
+
msgBuffer = await repository.decryptMessage({
|
|
254
|
+
jid: decryptionJid,
|
|
255
|
+
type: e2eType,
|
|
256
|
+
ciphertext: content
|
|
257
|
+
});
|
|
258
|
+
break;
|
|
259
|
+
case 'plaintext':
|
|
260
|
+
msgBuffer = content;
|
|
261
|
+
break;
|
|
262
|
+
default:
|
|
263
|
+
throw new Error(`Unknown e2e type: ${e2eType}`);
|
|
264
|
+
}
|
|
265
|
+
let msg = proto.Message.decode(e2eType !== 'plaintext' ? unpadRandomMax16(msgBuffer) : msgBuffer);
|
|
266
|
+
msg = msg.deviceSentMessage?.message || msg;
|
|
267
|
+
if (msg.senderKeyDistributionMessage) {
|
|
268
|
+
//eslint-disable-next-line max-depth
|
|
269
|
+
try {
|
|
270
|
+
await repository.processSenderKeyDistributionMessage({
|
|
271
|
+
authorJid: author,
|
|
272
|
+
item: msg.senderKeyDistributionMessage
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
catch (err) {
|
|
276
|
+
logger.error({ key: fullMessage.key, err }, 'failed to process sender key distribution message');
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (fullMessage.message) {
|
|
280
|
+
Object.assign(fullMessage.message, msg);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
fullMessage.message = msg;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
catch (err) {
|
|
287
|
+
const errorContext = {
|
|
288
|
+
key: fullMessage.key,
|
|
289
|
+
err,
|
|
290
|
+
messageType: tag === 'plaintext' ? 'plaintext' : attrs.type,
|
|
291
|
+
sender,
|
|
292
|
+
author,
|
|
293
|
+
isSessionRecordError: isSessionRecordError(err)
|
|
294
|
+
};
|
|
295
|
+
logger.error(errorContext, 'failed to decrypt message');
|
|
296
|
+
fullMessage.messageStubType = proto.WebMessageInfo.StubType.CIPHERTEXT;
|
|
297
|
+
fullMessage.messageStubParameters = [err.message.toString()];
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
// if nothing was found to decrypt
|
|
302
|
+
if (!decryptables && !fullMessage.key?.isViewOnce) {
|
|
303
|
+
fullMessage.messageStubType = proto.WebMessageInfo.StubType.CIPHERTEXT;
|
|
304
|
+
fullMessage.messageStubParameters = [NO_MESSAGE_FOUND_ERROR_TEXT];
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Utility function to check if an error is related to missing session record
|
|
311
|
+
*/
|
|
312
|
+
function isSessionRecordError(error) {
|
|
313
|
+
const errorMessage = error?.message || error?.toString() || '';
|
|
314
|
+
return DECRYPTION_RETRY_CONFIG.sessionRecordErrors.some(errorPattern => errorMessage.includes(errorPattern));
|
|
315
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function mapDisconnectReason(code: any): string;
|
|
2
|
+
export function isFatalDisconnect(reason: any): boolean;
|
|
3
|
+
export function isRateLimited(reason: any): boolean;
|
|
4
|
+
export function shouldClearAuth(reason: any): boolean;
|
|
5
|
+
export function shouldReconnect(reason: any): boolean;
|
|
6
|
+
export function getDisconnectInfo(input: any): {
|
|
7
|
+
code: any;
|
|
8
|
+
reason: string;
|
|
9
|
+
fatal: boolean;
|
|
10
|
+
clearAuth: boolean;
|
|
11
|
+
reconnect: boolean;
|
|
12
|
+
rateLimited: boolean;
|
|
13
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Vanz@Port (2.0.3) --- idea from kangwifi72/baileys 1.4.9 (connection/disconnect-reason). Re-keyed to THIS fork's
|
|
2
|
+
// DisconnectReason enum: the donor mapped 428 to "restart-required", but here 428 is connectionClosed and 515 is restartRequired.
|
|
3
|
+
import { DisconnectReason } from '../Types/index.js';
|
|
4
|
+
const REASON_BY_CODE = new Map([
|
|
5
|
+
[DisconnectReason.loggedOut, 'logged-out'],
|
|
6
|
+
[DisconnectReason.forbidden, 'forbidden'],
|
|
7
|
+
[DisconnectReason.multideviceMismatch, 'multi-device-mismatch'],
|
|
8
|
+
[DisconnectReason.connectionClosed, 'connection-closed'],
|
|
9
|
+
[DisconnectReason.connectionReplaced, 'connection-replaced'],
|
|
10
|
+
[DisconnectReason.timedOut, 'timed-out'],
|
|
11
|
+
[DisconnectReason.badSession, 'bad-session'],
|
|
12
|
+
[DisconnectReason.restartRequired, 'restart-required'],
|
|
13
|
+
[DisconnectReason.unavailableService, 'unavailable-service'],
|
|
14
|
+
[429, 'rate-limited']
|
|
15
|
+
]);
|
|
16
|
+
/** Map a numeric disconnect status code to a stable string reason. Nullish -> 'connection-lost'; unknown code -> 'unknown'. */
|
|
17
|
+
export const mapDisconnectReason = (code) => {
|
|
18
|
+
if (code === undefined || code === null) {
|
|
19
|
+
return 'connection-lost';
|
|
20
|
+
}
|
|
21
|
+
return REASON_BY_CODE.get(code) ?? 'unknown';
|
|
22
|
+
};
|
|
23
|
+
/** Reasons where retrying can never succeed (dead session, banned/restricted account, multi-device mismatch). */
|
|
24
|
+
export const isFatalDisconnect = (reason) => reason === 'logged-out' || reason === 'forbidden' || reason === 'multi-device-mismatch';
|
|
25
|
+
export const isRateLimited = (reason) => reason === 'rate-limited';
|
|
26
|
+
/** Advisory only: whether stored credentials are invalid for this reason. Nothing is deleted by this helper. */
|
|
27
|
+
export const shouldClearAuth = (reason) => isFatalDisconnect(reason) || reason === 'bad-session';
|
|
28
|
+
export const shouldReconnect = (reason) => !isFatalDisconnect(reason);
|
|
29
|
+
/** Convenience: accepts a status code, a Boom/Error carrying output.statusCode, or a connection.update `lastDisconnect`. */
|
|
30
|
+
export const getDisconnectInfo = (input) => {
|
|
31
|
+
const code = typeof input === 'number'
|
|
32
|
+
? input
|
|
33
|
+
: input?.error?.output?.statusCode ?? input?.output?.statusCode ?? input?.statusCode;
|
|
34
|
+
const reason = mapDisconnectReason(code);
|
|
35
|
+
return { code, reason, fatal: isFatalDisconnect(reason), clearAuth: shouldClearAuth(reason), reconnect: shouldReconnect(reason), rateLimited: isRateLimited(reason) };
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function makeEventBuffer(logger: any, timeoutMs: any): {
|
|
2
|
+
process(handler: any): () => void;
|
|
3
|
+
emit(event: any, evData: any): any;
|
|
4
|
+
isBuffering(): boolean;
|
|
5
|
+
buffer: () => void;
|
|
6
|
+
flush: () => boolean;
|
|
7
|
+
createBufferedFunction(work: any): (...args: any[]) => Promise<any>;
|
|
8
|
+
on: (...args: any[]) => any;
|
|
9
|
+
off: (...args: any[]) => any;
|
|
10
|
+
removeAllListeners: (...args: any[]) => any;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|