@eduh_dev021/baileys 0.0.0-stage → 1.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 +23 -0
- package/README.md +495 -2
- package/WAProto/index.d.ts +22220 -0
- package/WAProto/index.js +5 -0
- package/cjs/WAProto/index.d.ts +22220 -0
- package/cjs/WAProto/index.js +60125 -0
- package/cjs/engine-requirements.js +12 -0
- package/cjs/lib/Addon/http-error.d.ts +18 -0
- package/cjs/lib/Addon/http-error.js +66 -0
- package/cjs/lib/Addon/index.d.ts +3 -0
- package/cjs/lib/Addon/index.js +50 -0
- package/cjs/lib/Addon/keyed-db.d.ts +14 -0
- package/cjs/lib/Addon/keyed-db.js +264 -0
- package/cjs/lib/Addon/link-preview.d.ts +15 -0
- package/cjs/lib/Addon/link-preview.js +104 -0
- package/cjs/lib/Defaults/index.d.ts +184 -0
- package/cjs/lib/Defaults/index.js +292 -0
- package/cjs/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/cjs/lib/Signal/Group/ciphertext-message.js +37 -0
- package/cjs/lib/Signal/Group/group-cipher.d.ts +10 -0
- package/cjs/lib/Signal/Group/group-cipher.js +105 -0
- package/cjs/lib/Signal/Group/group-session-builder.d.ts +7 -0
- package/cjs/lib/Signal/Group/group-session-builder.js +65 -0
- package/cjs/lib/Signal/Group/index.d.ts +11 -0
- package/cjs/lib/Signal/Group/index.js +67 -0
- package/cjs/lib/Signal/Group/keyhelper.d.ts +6 -0
- package/cjs/lib/Signal/Group/keyhelper.js +47 -0
- package/cjs/lib/Signal/Group/sender-chain-key.d.ts +13 -0
- package/cjs/lib/Signal/Group/sender-chain-key.js +51 -0
- package/cjs/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
- package/cjs/lib/Signal/Group/sender-key-distribution-message.js +80 -0
- package/cjs/lib/Signal/Group/sender-key-message.d.ts +18 -0
- package/cjs/lib/Signal/Group/sender-key-message.js +87 -0
- package/cjs/lib/Signal/Group/sender-key-name.d.ts +11 -0
- package/cjs/lib/Signal/Group/sender-key-name.js +73 -0
- package/cjs/lib/Signal/Group/sender-key-record.d.ts +12 -0
- package/cjs/lib/Signal/Group/sender-key-record.js +66 -0
- package/cjs/lib/Signal/Group/sender-key-state.d.ts +16 -0
- package/cjs/lib/Signal/Group/sender-key-state.js +106 -0
- package/cjs/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/cjs/lib/Signal/Group/sender-message-key.js +51 -0
- package/cjs/lib/Signal/libsignal.d.ts +54 -0
- package/cjs/lib/Signal/libsignal.js +421 -0
- package/cjs/lib/Signal/lid-mapping.d.ts +20 -0
- package/cjs/lib/Signal/lid-mapping.js +292 -0
- package/cjs/lib/Socket/Client/index.d.ts +2 -0
- package/cjs/lib/Socket/Client/index.js +23 -0
- package/cjs/lib/Socket/Client/types.d.ts +5 -0
- package/cjs/lib/Socket/Client/types.js +36 -0
- package/cjs/lib/Socket/Client/websocket.d.ts +12 -0
- package/cjs/lib/Socket/Client/websocket.js +143 -0
- package/cjs/lib/Socket/business.d.ts +387 -0
- package/cjs/lib/Socket/business.js +402 -0
- package/cjs/lib/Socket/chats.d.ts +144 -0
- package/cjs/lib/Socket/chats.js +1118 -0
- package/cjs/lib/Socket/communities.d.ts +554 -0
- package/cjs/lib/Socket/communities.js +456 -0
- package/cjs/lib/Socket/groups.d.ts +286 -0
- package/cjs/lib/Socket/groups.js +366 -0
- package/cjs/lib/Socket/index.d.ts +522 -0
- package/cjs/lib/Socket/index.js +32 -0
- package/cjs/lib/Socket/messages-recv.d.ts +326 -0
- package/cjs/lib/Socket/messages-recv.js +1670 -0
- package/cjs/lib/Socket/messages-send.d.ts +321 -0
- package/cjs/lib/Socket/messages-send.js +1252 -0
- package/cjs/lib/Socket/mex.d.ts +1 -0
- package/cjs/lib/Socket/mex.js +65 -0
- package/cjs/lib/Socket/newsletter.d.ts +283 -0
- package/cjs/lib/Socket/newsletter.js +243 -0
- package/cjs/lib/Socket/socket.d.ts +61 -0
- package/cjs/lib/Socket/socket.js +908 -0
- package/cjs/lib/Store/index.d.ts +3 -0
- package/cjs/lib/Store/index.js +25 -0
- package/cjs/lib/Store/make-in-memory-store.d.ts +63 -0
- package/cjs/lib/Store/make-in-memory-store.js +431 -0
- package/cjs/lib/Store/make-ordered-dictionary.d.ts +12 -0
- package/cjs/lib/Store/make-ordered-dictionary.js +101 -0
- package/cjs/lib/Store/object-repository.d.ts +10 -0
- package/cjs/lib/Store/object-repository.js +49 -0
- package/cjs/lib/Transport/crypto.d.ts +6 -0
- package/cjs/lib/Transport/crypto.js +107 -0
- package/cjs/lib/Transport/curve.d.ts +8 -0
- package/cjs/lib/Transport/curve.js +94 -0
- package/cjs/lib/Transport/index.d.ts +16 -0
- package/cjs/lib/Transport/index.js +67 -0
- package/cjs/lib/Transport/internals.d.ts +57 -0
- package/cjs/lib/Transport/internals.js +203 -0
- package/cjs/lib/Transport/session-builder.d.ts +40 -0
- package/cjs/lib/Transport/session-builder.js +169 -0
- package/cjs/lib/Transport/session-cipher.d.ts +26 -0
- package/cjs/lib/Transport/session-cipher.js +328 -0
- package/cjs/lib/Transport/session-record.d.ts +55 -0
- package/cjs/lib/Transport/session-record.js +289 -0
- package/cjs/lib/Types/Auth.d.ts +1 -0
- package/cjs/lib/Types/Auth.js +15 -0
- package/cjs/lib/Types/Bussines.d.ts +1 -0
- package/cjs/lib/Types/Bussines.js +15 -0
- package/cjs/lib/Types/Call.d.ts +1 -0
- package/cjs/lib/Types/Call.js +15 -0
- package/cjs/lib/Types/Chat.d.ts +1 -0
- package/cjs/lib/Types/Chat.js +33 -0
- package/cjs/lib/Types/Contact.d.ts +1 -0
- package/cjs/lib/Types/Contact.js +15 -0
- package/cjs/lib/Types/Events.d.ts +1 -0
- package/cjs/lib/Types/Events.js +1 -0
- package/cjs/lib/Types/GroupMetadata.d.ts +1 -0
- package/cjs/lib/Types/GroupMetadata.js +15 -0
- package/cjs/lib/Types/Label.d.ts +2 -0
- package/cjs/lib/Types/Label.js +49 -0
- package/cjs/lib/Types/LabelAssociation.d.ts +2 -0
- package/cjs/lib/Types/LabelAssociation.js +31 -0
- package/cjs/lib/Types/Message.d.ts +11 -0
- package/cjs/lib/Types/Message.js +58 -0
- package/cjs/lib/Types/Mex.d.ts +2 -0
- package/cjs/lib/Types/Mex.js +66 -0
- package/cjs/lib/Types/Product.d.ts +1 -0
- package/cjs/lib/Types/Product.js +15 -0
- package/cjs/lib/Types/RichType.d.ts +2 -0
- package/cjs/lib/Types/RichType.js +50 -0
- package/cjs/lib/Types/Signal.d.ts +1 -0
- package/cjs/lib/Types/Signal.js +1 -0
- package/cjs/lib/Types/Socket.d.ts +1 -0
- package/cjs/lib/Types/Socket.js +1 -0
- package/cjs/lib/Types/State.d.ts +5 -0
- package/cjs/lib/Types/State.js +83 -0
- package/cjs/lib/Types/USync.d.ts +1 -0
- package/cjs/lib/Types/USync.js +1 -0
- package/cjs/lib/Types/index.d.ts +13 -0
- package/cjs/lib/Types/index.js +64 -0
- package/cjs/lib/Utils/auth-utils.d.ts +58 -0
- package/cjs/lib/Utils/auth-utils.js +275 -0
- package/cjs/lib/Utils/browser-utils.d.ts +9 -0
- package/cjs/lib/Utils/browser-utils.js +56 -0
- package/cjs/lib/Utils/business.d.ts +49 -0
- package/cjs/lib/Utils/business.js +259 -0
- package/cjs/lib/Utils/chat-utils.d.ts +408 -0
- package/cjs/lib/Utils/chat-utils.js +821 -0
- package/cjs/lib/Utils/companion-reg-client-utils.d.ts +4 -0
- package/cjs/lib/Utils/companion-reg-client-utils.js +71 -0
- package/cjs/lib/Utils/crypto.d.ts +39 -0
- package/cjs/lib/Utils/crypto.js +155 -0
- package/cjs/lib/Utils/decode-wa-message.d.ts +83 -0
- package/cjs/lib/Utils/decode-wa-message.js +316 -0
- package/cjs/lib/Utils/event-buffer.d.ts +12 -0
- package/cjs/lib/Utils/event-buffer.js +605 -0
- package/cjs/lib/Utils/generics.d.ts +63 -0
- package/cjs/lib/Utils/generics.js +440 -0
- package/cjs/lib/Utils/history.d.ts +75 -0
- package/cjs/lib/Utils/history.js +153 -0
- package/cjs/lib/Utils/identity-change-handler.d.ts +13 -0
- package/cjs/lib/Utils/identity-change-handler.js +73 -0
- package/cjs/lib/Utils/index.d.ts +24 -0
- package/cjs/lib/Utils/index.js +67 -0
- package/cjs/lib/Utils/link-preview.d.ts +13 -0
- package/cjs/lib/Utils/link-preview.js +87 -0
- package/cjs/lib/Utils/logger.d.ts +12 -0
- package/cjs/lib/Utils/logger.js +40 -0
- package/cjs/lib/Utils/lt-hash.d.ts +6 -0
- package/cjs/lib/Utils/lt-hash.js +28 -0
- package/cjs/lib/Utils/make-mutex.d.ts +6 -0
- package/cjs/lib/Utils/make-mutex.js +58 -0
- package/cjs/lib/Utils/message-retry-manager.d.ts +79 -0
- package/cjs/lib/Utils/message-retry-manager.js +274 -0
- package/cjs/lib/Utils/messages-media.d.ts +134 -0
- package/cjs/lib/Utils/messages-media.js +799 -0
- package/cjs/lib/Utils/messages.d.ts +47 -0
- package/cjs/lib/Utils/messages.js +1667 -0
- package/cjs/lib/Utils/noise-handler.d.ts +20 -0
- package/cjs/lib/Utils/noise-handler.js +223 -0
- package/cjs/lib/Utils/offline-node-processor.d.ts +10 -0
- package/cjs/lib/Utils/offline-node-processor.js +60 -0
- package/cjs/lib/Utils/pre-key-manager.d.ts +25 -0
- package/cjs/lib/Utils/pre-key-manager.js +116 -0
- package/cjs/lib/Utils/process-message.d.ts +83 -0
- package/cjs/lib/Utils/process-message.js +607 -0
- package/cjs/lib/Utils/reporting-utils.d.ts +12 -0
- package/cjs/lib/Utils/reporting-utils.js +282 -0
- package/cjs/lib/Utils/rich-message-utils.d.ts +48 -0
- package/cjs/lib/Utils/rich-message-utils.js +381 -0
- package/cjs/lib/Utils/signal.d.ts +82 -0
- package/cjs/lib/Utils/signal.js +232 -0
- package/cjs/lib/Utils/stanza-ack.d.ts +16 -0
- package/cjs/lib/Utils/stanza-ack.js +53 -0
- package/cjs/lib/Utils/sync-action-utils.d.ts +2 -0
- package/cjs/lib/Utils/sync-action-utils.js +68 -0
- package/cjs/lib/Utils/tc-token-utils.d.ts +29 -0
- package/cjs/lib/Utils/tc-token-utils.js +182 -0
- package/cjs/lib/Utils/use-multi-file-auth-state.d.ts +10 -0
- package/cjs/lib/Utils/use-multi-file-auth-state.js +135 -0
- package/cjs/lib/Utils/use-single-file-auth-state.d.ts +11 -0
- package/cjs/lib/Utils/use-single-file-auth-state.js +115 -0
- package/cjs/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
- package/cjs/lib/Utils/use-sqlite-auth-state.js +140 -0
- package/cjs/lib/Utils/validate-connection.d.ts +44 -0
- package/cjs/lib/Utils/validate-connection.js +229 -0
- package/cjs/lib/WABinary/constants.d.ts +61 -0
- package/cjs/lib/WABinary/constants.js +1992 -0
- package/cjs/lib/WABinary/decode.d.ts +9 -0
- package/cjs/lib/WABinary/decode.js +292 -0
- package/cjs/lib/WABinary/encode.d.ts +2 -0
- package/cjs/lib/WABinary/encode.js +240 -0
- package/cjs/lib/WABinary/generic-utils.d.ts +79 -0
- package/cjs/lib/WABinary/generic-utils.js +252 -0
- package/cjs/lib/WABinary/index.d.ts +5 -0
- package/cjs/lib/WABinary/index.js +29 -0
- package/cjs/lib/WABinary/jid-utils.d.ts +28 -0
- package/cjs/lib/WABinary/jid-utils.js +151 -0
- package/cjs/lib/WABinary/types.d.ts +1 -0
- package/cjs/lib/WABinary/types.js +23 -0
- package/cjs/lib/WACrypto/appstate-keys.js +39 -0
- package/cjs/lib/WACrypto/curves/constants.js +37 -0
- package/cjs/lib/WACrypto/hkdf.js +38 -0
- package/cjs/lib/WACrypto/index.js +51 -0
- package/cjs/lib/WACrypto/lthash.js +59 -0
- package/cjs/lib/WACrypto/math/constants.js +53 -0
- package/cjs/lib/WACrypto/math/edwards.js +206 -0
- package/cjs/lib/WACrypto/math/fe.js +449 -0
- package/cjs/lib/WACrypto/math/le.js +44 -0
- package/cjs/lib/WACrypto/math/mod.js +36 -0
- package/cjs/lib/WACrypto/util/bytes.js +348 -0
- package/cjs/lib/WACrypto/x25519.js +157 -0
- package/cjs/lib/WACrypto/xeddsa.js +134 -0
- package/cjs/lib/WAM/BinaryInfo.d.ts +7 -0
- package/cjs/lib/WAM/BinaryInfo.js +35 -0
- package/cjs/lib/WAM/constants.d.ts +34926 -0
- package/cjs/lib/WAM/constants.js +22890 -0
- package/cjs/lib/WAM/encode.d.ts +1 -0
- package/cjs/lib/WAM/encode.js +162 -0
- package/cjs/lib/WAM/index.d.ts +3 -0
- package/cjs/lib/WAM/index.js +25 -0
- package/cjs/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
- package/cjs/lib/WAUSync/Protocols/USyncContactProtocol.js +77 -0
- package/cjs/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/cjs/lib/WAUSync/Protocols/USyncDeviceProtocol.js +76 -0
- package/cjs/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/cjs/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +52 -0
- package/cjs/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/cjs/lib/WAUSync/Protocols/USyncStatusProtocol.js +61 -0
- package/cjs/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
- package/cjs/lib/WAUSync/Protocols/USyncUsernameProtocol.js +50 -0
- package/cjs/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
- package/cjs/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +76 -0
- package/cjs/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
- package/cjs/lib/WAUSync/Protocols/UsyncLIDProtocol.js +53 -0
- package/cjs/lib/WAUSync/Protocols/index.d.ts +5 -0
- package/cjs/lib/WAUSync/Protocols/index.js +29 -0
- package/cjs/lib/WAUSync/USyncQuery.d.ts +20 -0
- package/cjs/lib/WAUSync/USyncQuery.js +113 -0
- package/cjs/lib/WAUSync/USyncUser.d.ts +16 -0
- package/cjs/lib/WAUSync/USyncUser.js +56 -0
- package/cjs/lib/WAUSync/index.d.ts +3 -0
- package/cjs/lib/WAUSync/index.js +25 -0
- package/cjs/lib/index.d.ts +11 -0
- package/cjs/lib/index.js +56 -0
- package/cjs/package.json +3 -0
- package/engine-requirements.js +12 -0
- package/lib/Addon/http-error.d.ts +18 -0
- package/lib/Addon/http-error.js +40 -0
- package/lib/Addon/index.d.ts +3 -0
- package/lib/Addon/index.js +4 -0
- package/lib/Addon/keyed-db.d.ts +14 -0
- package/lib/Addon/keyed-db.js +241 -0
- package/lib/Addon/link-preview.d.ts +15 -0
- package/lib/Addon/link-preview.js +79 -0
- package/lib/Defaults/index.d.ts +184 -0
- package/lib/Defaults/index.js +181 -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-cipher.d.ts +10 -0
- package/lib/Signal/Group/group-cipher.js +81 -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/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 +54 -0
- package/lib/Signal/libsignal.js +426 -0
- package/lib/Signal/lid-mapping.d.ts +20 -0
- package/lib/Signal/lid-mapping.js +274 -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 +119 -0
- package/lib/Socket/business.d.ts +387 -0
- package/lib/Socket/business.js +379 -0
- package/lib/Socket/chats.d.ts +144 -0
- package/lib/Socket/chats.js +1216 -0
- package/lib/Socket/communities.d.ts +554 -0
- package/lib/Socket/communities.js +431 -0
- package/lib/Socket/groups.d.ts +286 -0
- package/lib/Socket/groups.js +347 -0
- package/lib/Socket/index.d.ts +522 -0
- package/lib/Socket/index.js +11 -0
- package/lib/Socket/messages-recv.d.ts +326 -0
- package/lib/Socket/messages-recv.js +1822 -0
- package/lib/Socket/messages-send.d.ts +321 -0
- package/lib/Socket/messages-send.js +1378 -0
- package/lib/Socket/mex.d.ts +1 -0
- package/lib/Socket/mex.js +41 -0
- package/lib/Socket/newsletter.d.ts +283 -0
- package/lib/Socket/newsletter.js +225 -0
- package/lib/Socket/socket.d.ts +61 -0
- package/lib/Socket/socket.js +992 -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 +63 -0
- package/lib/Store/make-in-memory-store.js +419 -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/Transport/crypto.d.ts +6 -0
- package/lib/Transport/crypto.js +61 -0
- package/lib/Transport/curve.d.ts +8 -0
- package/lib/Transport/curve.js +66 -0
- package/lib/Transport/index.d.ts +16 -0
- package/lib/Transport/index.js +9 -0
- package/lib/Transport/internals.d.ts +57 -0
- package/lib/Transport/internals.js +155 -0
- package/lib/Transport/session-builder.d.ts +40 -0
- package/lib/Transport/session-builder.js +143 -0
- package/lib/Transport/session-cipher.d.ts +26 -0
- package/lib/Transport/session-cipher.js +301 -0
- package/lib/Transport/session-record.d.ts +55 -0
- package/lib/Transport/session-record.js +272 -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 +54 -0
- package/lib/Types/USync.d.ts +1 -0
- package/lib/Types/USync.js +1 -0
- package/lib/Types/index.d.ts +13 -0
- package/lib/Types/index.js +25 -0
- package/lib/Utils/auth-utils.d.ts +58 -0
- package/lib/Utils/auth-utils.js +316 -0
- package/lib/Utils/browser-utils.d.ts +9 -0
- package/lib/Utils/browser-utils.js +28 -0
- package/lib/Utils/business.d.ts +49 -0
- package/lib/Utils/business.js +230 -0
- package/lib/Utils/chat-utils.d.ts +408 -0
- package/lib/Utils/chat-utils.js +871 -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/crypto.d.ts +39 -0
- package/lib/Utils/crypto.js +117 -0
- package/lib/Utils/decode-wa-message.d.ts +83 -0
- package/lib/Utils/decode-wa-message.js +316 -0
- package/lib/Utils/event-buffer.d.ts +12 -0
- package/lib/Utils/event-buffer.js +621 -0
- package/lib/Utils/generics.d.ts +63 -0
- package/lib/Utils/generics.js +394 -0
- package/lib/Utils/history.d.ts +75 -0
- package/lib/Utils/history.js +133 -0
- package/lib/Utils/identity-change-handler.d.ts +13 -0
- package/lib/Utils/identity-change-handler.js +48 -0
- package/lib/Utils/index.d.ts +24 -0
- package/lib/Utils/index.js +24 -0
- package/lib/Utils/link-preview.d.ts +13 -0
- package/lib/Utils/link-preview.js +73 -0
- package/lib/Utils/logger.d.ts +12 -0
- package/lib/Utils/logger.js +12 -0
- package/lib/Utils/lt-hash.d.ts +6 -0
- package/lib/Utils/lt-hash.js +7 -0
- package/lib/Utils/make-mutex.d.ts +6 -0
- package/lib/Utils/make-mutex.js +32 -0
- package/lib/Utils/message-retry-manager.d.ts +79 -0
- package/lib/Utils/message-retry-manager.js +259 -0
- package/lib/Utils/messages-media.d.ts +134 -0
- package/lib/Utils/messages-media.js +802 -0
- package/lib/Utils/messages.d.ts +47 -0
- package/lib/Utils/messages.js +1911 -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 +10 -0
- package/lib/Utils/offline-node-processor.js +40 -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 +83 -0
- package/lib/Utils/process-message.js +748 -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 +48 -0
- package/lib/Utils/rich-message-utils.js +369 -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/sync-action-utils.d.ts +2 -0
- package/lib/Utils/sync-action-utils.js +48 -0
- package/lib/Utils/tc-token-utils.d.ts +29 -0
- package/lib/Utils/tc-token-utils.js +163 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +10 -0
- package/lib/Utils/use-multi-file-auth-state.js +116 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +11 -0
- package/lib/Utils/use-single-file-auth-state.js +94 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
- package/lib/Utils/use-sqlite-auth-state.js +109 -0
- package/lib/Utils/validate-connection.d.ts +44 -0
- package/lib/Utils/validate-connection.js +210 -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 +79 -0
- package/lib/WABinary/generic-utils.js +228 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +5 -0
- package/lib/WABinary/jid-utils.d.ts +28 -0
- package/lib/WABinary/jid-utils.js +95 -0
- package/lib/WABinary/types.d.ts +1 -0
- package/lib/WABinary/types.js +1 -0
- package/lib/WACrypto/appstate-keys.js +26 -0
- package/lib/WACrypto/curves/constants.js +12 -0
- package/lib/WACrypto/hkdf.js +27 -0
- package/lib/WACrypto/index.js +20 -0
- package/lib/WACrypto/lthash.js +54 -0
- package/lib/WACrypto/math/constants.js +24 -0
- package/lib/WACrypto/math/edwards.js +194 -0
- package/lib/WACrypto/math/fe.js +698 -0
- package/lib/WACrypto/math/le.js +23 -0
- package/lib/WACrypto/math/mod.js +15 -0
- package/lib/WACrypto/util/bytes.js +339 -0
- package/lib/WACrypto/x25519.js +145 -0
- package/lib/WACrypto/xeddsa.js +92 -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/USyncContactProtocol.d.ts +36 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +51 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -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 +50 -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 +5 -0
- package/lib/WAUSync/Protocols/index.js +5 -0
- package/lib/WAUSync/USyncQuery.d.ts +20 -0
- package/lib/WAUSync/USyncQuery.js +97 -0
- package/lib/WAUSync/USyncUser.d.ts +16 -0
- package/lib/WAUSync/USyncUser.js +30 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +3 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +11 -0
- package/package.json +79 -5
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var session_record_exports = {};
|
|
19
|
+
__export(session_record_exports, {
|
|
20
|
+
default: () => session_record_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(session_record_exports);
|
|
23
|
+
var import_internals = require("./internals.js");
|
|
24
|
+
const CLOSED_SESSIONS_MAX = 40;
|
|
25
|
+
const SESSION_RECORD_VERSION = "v1";
|
|
26
|
+
function assertBuffer(value) {
|
|
27
|
+
if (!Buffer.isBuffer(value)) {
|
|
28
|
+
throw new TypeError("Buffer required");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class SessionEntry {
|
|
32
|
+
constructor() {
|
|
33
|
+
this._chains = {};
|
|
34
|
+
}
|
|
35
|
+
toString() {
|
|
36
|
+
const baseKey = this.indexInfo && this.indexInfo.baseKey && this.indexInfo.baseKey.toString("base64");
|
|
37
|
+
return `<SessionEntry [baseKey=${baseKey}]>`;
|
|
38
|
+
}
|
|
39
|
+
inspect() {
|
|
40
|
+
return this.toString();
|
|
41
|
+
}
|
|
42
|
+
addChain(key, value) {
|
|
43
|
+
assertBuffer(key);
|
|
44
|
+
const id = key.toString("base64");
|
|
45
|
+
if (this._chains.hasOwnProperty(id)) {
|
|
46
|
+
throw new Error("Overwrite attempt");
|
|
47
|
+
}
|
|
48
|
+
this._chains[id] = value;
|
|
49
|
+
}
|
|
50
|
+
getChain(key) {
|
|
51
|
+
assertBuffer(key);
|
|
52
|
+
return this._chains[key.toString("base64")];
|
|
53
|
+
}
|
|
54
|
+
deleteChain(key) {
|
|
55
|
+
assertBuffer(key);
|
|
56
|
+
const id = key.toString("base64");
|
|
57
|
+
if (!this._chains.hasOwnProperty(id)) {
|
|
58
|
+
throw new ReferenceError("Not Found");
|
|
59
|
+
}
|
|
60
|
+
delete this._chains[id];
|
|
61
|
+
}
|
|
62
|
+
*chains() {
|
|
63
|
+
for (const [k, v] of Object.entries(this._chains)) {
|
|
64
|
+
yield [Buffer.from(k, "base64"), v];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
serialize() {
|
|
68
|
+
const data = {
|
|
69
|
+
registrationId: this.registrationId,
|
|
70
|
+
currentRatchet: {
|
|
71
|
+
ephemeralKeyPair: {
|
|
72
|
+
pubKey: this.currentRatchet.ephemeralKeyPair.pubKey.toString("base64"),
|
|
73
|
+
privKey: this.currentRatchet.ephemeralKeyPair.privKey.toString("base64")
|
|
74
|
+
},
|
|
75
|
+
lastRemoteEphemeralKey: this.currentRatchet.lastRemoteEphemeralKey.toString("base64"),
|
|
76
|
+
previousCounter: this.currentRatchet.previousCounter,
|
|
77
|
+
rootKey: this.currentRatchet.rootKey.toString("base64")
|
|
78
|
+
},
|
|
79
|
+
indexInfo: {
|
|
80
|
+
baseKey: this.indexInfo.baseKey.toString("base64"),
|
|
81
|
+
baseKeyType: this.indexInfo.baseKeyType,
|
|
82
|
+
closed: this.indexInfo.closed,
|
|
83
|
+
used: this.indexInfo.used,
|
|
84
|
+
created: this.indexInfo.created,
|
|
85
|
+
remoteIdentityKey: this.indexInfo.remoteIdentityKey.toString("base64")
|
|
86
|
+
},
|
|
87
|
+
_chains: this._serialize_chains(this._chains)
|
|
88
|
+
};
|
|
89
|
+
if (this.pendingPreKey) {
|
|
90
|
+
data.pendingPreKey = Object.assign({}, this.pendingPreKey);
|
|
91
|
+
data.pendingPreKey.baseKey = this.pendingPreKey.baseKey.toString("base64");
|
|
92
|
+
}
|
|
93
|
+
return data;
|
|
94
|
+
}
|
|
95
|
+
static deserialize(data) {
|
|
96
|
+
const obj = new this();
|
|
97
|
+
obj.registrationId = data.registrationId;
|
|
98
|
+
obj.currentRatchet = {
|
|
99
|
+
ephemeralKeyPair: {
|
|
100
|
+
pubKey: Buffer.from(data.currentRatchet.ephemeralKeyPair.pubKey, "base64"),
|
|
101
|
+
privKey: Buffer.from(data.currentRatchet.ephemeralKeyPair.privKey, "base64")
|
|
102
|
+
},
|
|
103
|
+
lastRemoteEphemeralKey: Buffer.from(data.currentRatchet.lastRemoteEphemeralKey, "base64"),
|
|
104
|
+
previousCounter: data.currentRatchet.previousCounter,
|
|
105
|
+
rootKey: Buffer.from(data.currentRatchet.rootKey, "base64")
|
|
106
|
+
};
|
|
107
|
+
obj.indexInfo = {
|
|
108
|
+
baseKey: Buffer.from(data.indexInfo.baseKey, "base64"),
|
|
109
|
+
baseKeyType: data.indexInfo.baseKeyType,
|
|
110
|
+
closed: data.indexInfo.closed,
|
|
111
|
+
used: data.indexInfo.used,
|
|
112
|
+
created: data.indexInfo.created,
|
|
113
|
+
remoteIdentityKey: Buffer.from(data.indexInfo.remoteIdentityKey, "base64")
|
|
114
|
+
};
|
|
115
|
+
obj._chains = this._deserialize_chains(data._chains);
|
|
116
|
+
if (data.pendingPreKey) {
|
|
117
|
+
obj.pendingPreKey = Object.assign({}, data.pendingPreKey);
|
|
118
|
+
obj.pendingPreKey.baseKey = Buffer.from(data.pendingPreKey.baseKey, "base64");
|
|
119
|
+
}
|
|
120
|
+
return obj;
|
|
121
|
+
}
|
|
122
|
+
_serialize_chains(chains) {
|
|
123
|
+
const r = {};
|
|
124
|
+
for (const key of Object.keys(chains)) {
|
|
125
|
+
const c = chains[key];
|
|
126
|
+
const messageKeys = {};
|
|
127
|
+
for (const [idx, key2] of Object.entries(c.messageKeys)) {
|
|
128
|
+
messageKeys[idx] = key2.toString("base64");
|
|
129
|
+
}
|
|
130
|
+
r[key] = {
|
|
131
|
+
chainKey: {
|
|
132
|
+
counter: c.chainKey.counter,
|
|
133
|
+
key: c.chainKey.key && c.chainKey.key.toString("base64")
|
|
134
|
+
},
|
|
135
|
+
chainType: c.chainType,
|
|
136
|
+
messageKeys
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
return r;
|
|
140
|
+
}
|
|
141
|
+
static _deserialize_chains(chains_data) {
|
|
142
|
+
const r = {};
|
|
143
|
+
for (const key of Object.keys(chains_data)) {
|
|
144
|
+
const c = chains_data[key];
|
|
145
|
+
const messageKeys = {};
|
|
146
|
+
for (const [idx, key2] of Object.entries(c.messageKeys)) {
|
|
147
|
+
messageKeys[idx] = Buffer.from(key2, "base64");
|
|
148
|
+
}
|
|
149
|
+
r[key] = {
|
|
150
|
+
chainKey: {
|
|
151
|
+
counter: c.chainKey.counter,
|
|
152
|
+
key: c.chainKey.key && Buffer.from(c.chainKey.key, "base64")
|
|
153
|
+
},
|
|
154
|
+
chainType: c.chainType,
|
|
155
|
+
messageKeys
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
return r;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const migrations = [{
|
|
162
|
+
version: "v1",
|
|
163
|
+
migrate: function migrateV1(data) {
|
|
164
|
+
const sessions = data._sessions;
|
|
165
|
+
if (data.registrationId) {
|
|
166
|
+
for (const key in sessions) {
|
|
167
|
+
if (!sessions[key].registrationId) {
|
|
168
|
+
sessions[key].registrationId = data.registrationId;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} else {
|
|
172
|
+
for (const key in sessions) {
|
|
173
|
+
if (sessions[key].indexInfo.closed === -1) {
|
|
174
|
+
console.error("V1 session storage migration error: registrationId", data.registrationId, "for open session version", data.version);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}];
|
|
180
|
+
class SessionRecord {
|
|
181
|
+
static createEntry() {
|
|
182
|
+
return new SessionEntry();
|
|
183
|
+
}
|
|
184
|
+
static migrate(data) {
|
|
185
|
+
let run = data.version === void 0;
|
|
186
|
+
for (let i = 0; i < migrations.length; ++i) {
|
|
187
|
+
if (run) {
|
|
188
|
+
migrations[i].migrate(data);
|
|
189
|
+
} else if (migrations[i].version === data.version) {
|
|
190
|
+
run = true;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (!run) {
|
|
194
|
+
throw new Error("Error migrating SessionRecord");
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
static deserialize(data) {
|
|
198
|
+
if (data.version !== SESSION_RECORD_VERSION) {
|
|
199
|
+
this.migrate(data);
|
|
200
|
+
}
|
|
201
|
+
const obj = new this();
|
|
202
|
+
if (data._sessions) {
|
|
203
|
+
for (const [key, entry] of Object.entries(data._sessions)) {
|
|
204
|
+
obj.sessions[key] = SessionEntry.deserialize(entry);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return obj;
|
|
208
|
+
}
|
|
209
|
+
constructor() {
|
|
210
|
+
this.sessions = {};
|
|
211
|
+
this.version = SESSION_RECORD_VERSION;
|
|
212
|
+
}
|
|
213
|
+
serialize() {
|
|
214
|
+
const _sessions = {};
|
|
215
|
+
for (const [key, entry] of Object.entries(this.sessions)) {
|
|
216
|
+
_sessions[key] = entry.serialize();
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
_sessions,
|
|
220
|
+
version: this.version
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
haveOpenSession() {
|
|
224
|
+
const openSession = this.getOpenSession();
|
|
225
|
+
return !!openSession && typeof openSession.registrationId === "number";
|
|
226
|
+
}
|
|
227
|
+
getSession(key) {
|
|
228
|
+
assertBuffer(key);
|
|
229
|
+
const session = this.sessions[key.toString("base64")];
|
|
230
|
+
if (session && session.indexInfo.baseKeyType === import_internals.BaseKeyType.OURS) {
|
|
231
|
+
throw new Error("Tried to lookup a session using our basekey");
|
|
232
|
+
}
|
|
233
|
+
return session;
|
|
234
|
+
}
|
|
235
|
+
getOpenSession() {
|
|
236
|
+
for (const session of Object.values(this.sessions)) {
|
|
237
|
+
if (!this.isClosed(session)) {
|
|
238
|
+
return session;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
setSession(session) {
|
|
243
|
+
this.sessions[session.indexInfo.baseKey.toString("base64")] = session;
|
|
244
|
+
}
|
|
245
|
+
getSessions() {
|
|
246
|
+
return Array.from(Object.values(this.sessions)).sort((a, b) => {
|
|
247
|
+
const aUsed = a.indexInfo.used || 0;
|
|
248
|
+
const bUsed = b.indexInfo.used || 0;
|
|
249
|
+
return aUsed === bUsed ? 0 : aUsed < bUsed ? 1 : -1;
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
closeSession(session) {
|
|
253
|
+
if (this.isClosed(session)) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
session.indexInfo.closed = Date.now();
|
|
257
|
+
}
|
|
258
|
+
openSession(session) {
|
|
259
|
+
if (!this.isClosed(session)) {
|
|
260
|
+
}
|
|
261
|
+
session.indexInfo.closed = -1;
|
|
262
|
+
}
|
|
263
|
+
isClosed(session) {
|
|
264
|
+
return session.indexInfo.closed !== -1;
|
|
265
|
+
}
|
|
266
|
+
removeOldSessions() {
|
|
267
|
+
while (Object.keys(this.sessions).length > CLOSED_SESSIONS_MAX) {
|
|
268
|
+
let oldestKey;
|
|
269
|
+
let oldestSession;
|
|
270
|
+
for (const [key, session] of Object.entries(this.sessions)) {
|
|
271
|
+
if (session.indexInfo.closed !== -1 && (!oldestSession || session.indexInfo.closed < oldestSession.indexInfo.closed)) {
|
|
272
|
+
oldestKey = key;
|
|
273
|
+
oldestSession = session;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (oldestKey) {
|
|
277
|
+
delete this.sessions[oldestKey];
|
|
278
|
+
} else {
|
|
279
|
+
throw new Error("Corrupt sessions object");
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
deleteAllSessions() {
|
|
284
|
+
for (const key of Object.keys(this.sessions)) {
|
|
285
|
+
delete this.sessions[key];
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
var session_record_default = SessionRecord;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Auth_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Auth_exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Bussines_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Bussines_exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Call_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Call_exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ALL_WA_PATCH_NAMES: string[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var Chat_exports = {};
|
|
19
|
+
__export(Chat_exports, {
|
|
20
|
+
ALL_WA_PATCH_NAMES: () => ALL_WA_PATCH_NAMES
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(Chat_exports);
|
|
23
|
+
const ALL_WA_PATCH_NAMES = [
|
|
24
|
+
"critical_block",
|
|
25
|
+
"critical_unblock_low",
|
|
26
|
+
"regular_high",
|
|
27
|
+
"regular_low",
|
|
28
|
+
"regular"
|
|
29
|
+
];
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
ALL_WA_PATCH_NAMES
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Contact_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Contact_exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var import_WAProto = require("../../WAProto/index.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var GroupMetadata_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(GroupMetadata_exports);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var Label_exports = {};
|
|
19
|
+
__export(Label_exports, {
|
|
20
|
+
LabelColor: () => LabelColor
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(Label_exports);
|
|
23
|
+
var LabelColor;
|
|
24
|
+
(function(LabelColor2) {
|
|
25
|
+
LabelColor2[LabelColor2["Color1"] = 0] = "Color1";
|
|
26
|
+
LabelColor2[LabelColor2["Color2"] = 1] = "Color2";
|
|
27
|
+
LabelColor2[LabelColor2["Color3"] = 2] = "Color3";
|
|
28
|
+
LabelColor2[LabelColor2["Color4"] = 3] = "Color4";
|
|
29
|
+
LabelColor2[LabelColor2["Color5"] = 4] = "Color5";
|
|
30
|
+
LabelColor2[LabelColor2["Color6"] = 5] = "Color6";
|
|
31
|
+
LabelColor2[LabelColor2["Color7"] = 6] = "Color7";
|
|
32
|
+
LabelColor2[LabelColor2["Color8"] = 7] = "Color8";
|
|
33
|
+
LabelColor2[LabelColor2["Color9"] = 8] = "Color9";
|
|
34
|
+
LabelColor2[LabelColor2["Color10"] = 9] = "Color10";
|
|
35
|
+
LabelColor2[LabelColor2["Color11"] = 10] = "Color11";
|
|
36
|
+
LabelColor2[LabelColor2["Color12"] = 11] = "Color12";
|
|
37
|
+
LabelColor2[LabelColor2["Color13"] = 12] = "Color13";
|
|
38
|
+
LabelColor2[LabelColor2["Color14"] = 13] = "Color14";
|
|
39
|
+
LabelColor2[LabelColor2["Color15"] = 14] = "Color15";
|
|
40
|
+
LabelColor2[LabelColor2["Color16"] = 15] = "Color16";
|
|
41
|
+
LabelColor2[LabelColor2["Color17"] = 16] = "Color17";
|
|
42
|
+
LabelColor2[LabelColor2["Color18"] = 17] = "Color18";
|
|
43
|
+
LabelColor2[LabelColor2["Color19"] = 18] = "Color19";
|
|
44
|
+
LabelColor2[LabelColor2["Color20"] = 19] = "Color20";
|
|
45
|
+
})(LabelColor || (LabelColor = {}));
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
LabelColor
|
|
49
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var LabelAssociation_exports = {};
|
|
19
|
+
__export(LabelAssociation_exports, {
|
|
20
|
+
LabelAssociationType: () => LabelAssociationType
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(LabelAssociation_exports);
|
|
23
|
+
var LabelAssociationType;
|
|
24
|
+
(function(LabelAssociationType2) {
|
|
25
|
+
LabelAssociationType2["Chat"] = "label_jid";
|
|
26
|
+
LabelAssociationType2["Message"] = "label_message";
|
|
27
|
+
})(LabelAssociationType || (LabelAssociationType = {}));
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
LabelAssociationType
|
|
31
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { proto as WAProto };
|
|
2
|
+
export const AssociationType: typeof proto.MessageAssociation.AssociationType;
|
|
3
|
+
export const ButtonHeaderType: typeof proto.Message.ButtonsMessage.HeaderType;
|
|
4
|
+
export const ButtonType: typeof proto.Message.ButtonsMessage.Button.Type;
|
|
5
|
+
export const CarouselCardType: typeof proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType;
|
|
6
|
+
export const ListType: typeof proto.Message.ListMessage.ListType;
|
|
7
|
+
export const ProtocolType: typeof proto.Message.ProtocolMessage.Type;
|
|
8
|
+
export const WAMessageStubType: typeof proto.WebMessageInfo.StubType;
|
|
9
|
+
export const WAMessageStatus: typeof proto.WebMessageInfo.Status;
|
|
10
|
+
export const WAMessageAddressingMode: any;
|
|
11
|
+
import { proto } from '../../WAProto/index.js';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var Message_exports = {};
|
|
19
|
+
__export(Message_exports, {
|
|
20
|
+
AssociationType: () => AssociationType,
|
|
21
|
+
ButtonHeaderType: () => ButtonHeaderType,
|
|
22
|
+
ButtonType: () => ButtonType,
|
|
23
|
+
CarouselCardType: () => CarouselCardType,
|
|
24
|
+
ListType: () => ListType,
|
|
25
|
+
ProtocolType: () => ProtocolType,
|
|
26
|
+
WAMessageAddressingMode: () => WAMessageAddressingMode,
|
|
27
|
+
WAMessageStatus: () => WAMessageStatus,
|
|
28
|
+
WAMessageStubType: () => WAMessageStubType,
|
|
29
|
+
WAProto: () => import_WAProto.proto
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(Message_exports);
|
|
32
|
+
var import_WAProto = require("../../WAProto/index.js");
|
|
33
|
+
const AssociationType = import_WAProto.proto.MessageAssociation.AssociationType;
|
|
34
|
+
const ButtonHeaderType = import_WAProto.proto.Message.ButtonsMessage.HeaderType;
|
|
35
|
+
const ButtonType = import_WAProto.proto.Message.ButtonsMessage.Button.Type;
|
|
36
|
+
const CarouselCardType = import_WAProto.proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType;
|
|
37
|
+
const ListType = import_WAProto.proto.Message.ListMessage.ListType;
|
|
38
|
+
const ProtocolType = import_WAProto.proto.Message.ProtocolMessage.Type;
|
|
39
|
+
const WAMessageStubType = import_WAProto.proto.WebMessageInfo.StubType;
|
|
40
|
+
const WAMessageStatus = import_WAProto.proto.WebMessageInfo.Status;
|
|
41
|
+
var WAMessageAddressingMode;
|
|
42
|
+
(function(WAMessageAddressingMode2) {
|
|
43
|
+
WAMessageAddressingMode2["PN"] = "pn";
|
|
44
|
+
WAMessageAddressingMode2["LID"] = "lid";
|
|
45
|
+
})(WAMessageAddressingMode || (WAMessageAddressingMode = {}));
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
AssociationType,
|
|
49
|
+
ButtonHeaderType,
|
|
50
|
+
ButtonType,
|
|
51
|
+
CarouselCardType,
|
|
52
|
+
ListType,
|
|
53
|
+
ProtocolType,
|
|
54
|
+
WAMessageAddressingMode,
|
|
55
|
+
WAMessageStatus,
|
|
56
|
+
WAMessageStubType,
|
|
57
|
+
WAProto
|
|
58
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var Mex_exports = {};
|
|
19
|
+
__export(Mex_exports, {
|
|
20
|
+
QueryIds: () => QueryIds,
|
|
21
|
+
XWAPaths: () => XWAPaths
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Mex_exports);
|
|
24
|
+
var XWAPaths;
|
|
25
|
+
(function(XWAPaths2) {
|
|
26
|
+
XWAPaths2["xwa2_newsletter_create"] = "xwa2_newsletter_create";
|
|
27
|
+
XWAPaths2["xwa2_newsletter_subscribers"] = "xwa2_newsletter_subscribers";
|
|
28
|
+
XWAPaths2["xwa2_newsletter_subscribed"] = "xwa2_newsletter_subscribed";
|
|
29
|
+
XWAPaths2["xwa2_newsletter_view"] = "xwa2_newsletter_view";
|
|
30
|
+
XWAPaths2["xwa2_newsletter_metadata"] = "xwa2_newsletter";
|
|
31
|
+
XWAPaths2["xwa2_newsletter_admin_count"] = "xwa2_newsletter_admin";
|
|
32
|
+
XWAPaths2["xwa2_newsletter_mute_v2"] = "xwa2_newsletter_mute_v2";
|
|
33
|
+
XWAPaths2["xwa2_newsletter_unmute_v2"] = "xwa2_newsletter_unmute_v2";
|
|
34
|
+
XWAPaths2["xwa2_newsletter_follow"] = "xwa2_newsletter_follow";
|
|
35
|
+
XWAPaths2["xwa2_newsletter_unfollow"] = "xwa2_newsletter_unfollow";
|
|
36
|
+
XWAPaths2["xwa2_newsletter_join_v2"] = "xwa2_newsletter_join_v2";
|
|
37
|
+
XWAPaths2["xwa2_newsletter_leave_v2"] = "xwa2_newsletter_leave_v2";
|
|
38
|
+
XWAPaths2["xwa2_newsletter_change_owner"] = "xwa2_newsletter_change_owner";
|
|
39
|
+
XWAPaths2["xwa2_newsletter_demote"] = "xwa2_newsletter_demote";
|
|
40
|
+
XWAPaths2["xwa2_newsletter_delete_v2"] = "xwa2_newsletter_delete_v2";
|
|
41
|
+
XWAPaths2["xwa2_fetch_account_reachout_timelock"] = "xwa2_fetch_account_reachout_timelock";
|
|
42
|
+
XWAPaths2["xwa2_message_capping_info"] = "xwa2_message_capping_info";
|
|
43
|
+
})(XWAPaths || (XWAPaths = {}));
|
|
44
|
+
var QueryIds;
|
|
45
|
+
(function(QueryIds2) {
|
|
46
|
+
QueryIds2["CREATE"] = "8823471724422422";
|
|
47
|
+
QueryIds2["UPDATE_METADATA"] = "24250201037901610";
|
|
48
|
+
QueryIds2["METADATA"] = "6563316087068696";
|
|
49
|
+
QueryIds2["SUBSCRIBERS"] = "9783111038412085";
|
|
50
|
+
QueryIds2["SUBSCRIBED"] = "6388546374527196";
|
|
51
|
+
QueryIds2["FOLLOW"] = "24404358912487870";
|
|
52
|
+
QueryIds2["UNFOLLOW"] = "9767147403369991";
|
|
53
|
+
QueryIds2["MUTE"] = "29766401636284406";
|
|
54
|
+
QueryIds2["UNMUTE"] = "9864994326891137";
|
|
55
|
+
QueryIds2["ADMIN_COUNT"] = "7130823597031706";
|
|
56
|
+
QueryIds2["CHANGE_OWNER"] = "7341777602580933";
|
|
57
|
+
QueryIds2["DEMOTE"] = "6551828931592903";
|
|
58
|
+
QueryIds2["DELETE"] = "30062808666639665";
|
|
59
|
+
QueryIds2["REACHOUT_TIMELOCK"] = "23983697327930364";
|
|
60
|
+
QueryIds2["MESSAGE_CAPPING_INFO"] = "24503548349331633";
|
|
61
|
+
})(QueryIds || (QueryIds = {}));
|
|
62
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
+
0 && (module.exports = {
|
|
64
|
+
QueryIds,
|
|
65
|
+
XWAPaths
|
|
66
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|