@violetix/baileys 0.0.0-stage → 0.3.18
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 +22 -0
- package/README.md +2843 -2
- package/WAProto/index.d.ts +15932 -0
- package/WAProto/index.js +115856 -0
- package/engine-requirements.js +13 -0
- package/lib/Defaults/index.d.ts +145 -0
- package/lib/Defaults/index.d.ts.map +1 -0
- package/lib/Defaults/index.js +157 -0
- package/lib/Defaults/index.js.map +1 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
- package/lib/Signal/Group/ciphertext-message.d.ts.map +1 -0
- package/lib/Signal/Group/ciphertext-message.js +12 -0
- package/lib/Signal/Group/ciphertext-message.js.map +1 -0
- package/lib/Signal/Group/group-session-builder.d.ts +8 -0
- package/lib/Signal/Group/group-session-builder.d.ts.map +1 -0
- package/lib/Signal/Group/group-session-builder.js +30 -0
- package/lib/Signal/Group/group-session-builder.js.map +1 -0
- package/lib/Signal/Group/group_cipher.d.ts +11 -0
- package/lib/Signal/Group/group_cipher.d.ts.map +1 -0
- package/lib/Signal/Group/group_cipher.js +82 -0
- package/lib/Signal/Group/group_cipher.js.map +1 -0
- package/lib/Signal/Group/index.d.ts +12 -0
- package/lib/Signal/Group/index.d.ts.map +1 -0
- package/lib/Signal/Group/index.js +12 -0
- package/lib/Signal/Group/index.js.map +1 -0
- package/lib/Signal/Group/keyhelper.d.ts +7 -0
- package/lib/Signal/Group/keyhelper.d.ts.map +1 -0
- package/lib/Signal/Group/keyhelper.js +18 -0
- package/lib/Signal/Group/keyhelper.js.map +1 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
- package/lib/Signal/Group/sender-chain-key.d.ts.map +1 -0
- package/lib/Signal/Group/sender-chain-key.js +26 -0
- package/lib/Signal/Group/sender-chain-key.js.map +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
- package/lib/Signal/Group/sender-key-distribution-message.js.map +1 -0
- package/lib/Signal/Group/sender-key-message.d.ts +19 -0
- package/lib/Signal/Group/sender-key-message.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-message.js +66 -0
- package/lib/Signal/Group/sender-key-message.js.map +1 -0
- package/lib/Signal/Group/sender-key-name.d.ts +12 -0
- package/lib/Signal/Group/sender-key-name.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-name.js +48 -0
- package/lib/Signal/Group/sender-key-name.js.map +1 -0
- package/lib/Signal/Group/sender-key-record.d.ts +13 -0
- package/lib/Signal/Group/sender-key-record.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-record.js +41 -0
- package/lib/Signal/Group/sender-key-record.js.map +1 -0
- package/lib/Signal/Group/sender-key-state.d.ts +17 -0
- package/lib/Signal/Group/sender-key-state.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-state.js +84 -0
- package/lib/Signal/Group/sender-key-state.js.map +1 -0
- package/lib/Signal/Group/sender-message-key.d.ts +12 -0
- package/lib/Signal/Group/sender-message-key.d.ts.map +1 -0
- package/lib/Signal/Group/sender-message-key.js +26 -0
- package/lib/Signal/Group/sender-message-key.js.map +1 -0
- package/lib/Signal/libsignal.d.ts +55 -0
- package/lib/Signal/libsignal.d.ts.map +1 -0
- package/lib/Signal/libsignal.js +403 -0
- package/lib/Signal/libsignal.js.map +1 -0
- package/lib/Signal/lid-mapping.d.ts +21 -0
- package/lib/Signal/lid-mapping.d.ts.map +1 -0
- package/lib/Signal/lid-mapping.js +277 -0
- package/lib/Signal/lid-mapping.js.map +1 -0
- package/lib/Socket/Client/index.d.ts +3 -0
- package/lib/Socket/Client/index.d.ts.map +1 -0
- package/lib/Socket/Client/index.js +3 -0
- package/lib/Socket/Client/index.js.map +1 -0
- package/lib/Socket/Client/types.d.ts +6 -0
- package/lib/Socket/Client/types.d.ts.map +1 -0
- package/lib/Socket/Client/types.js +93 -0
- package/lib/Socket/Client/types.js.map +1 -0
- package/lib/Socket/Client/websocket.d.ts +13 -0
- package/lib/Socket/Client/websocket.d.ts.map +1 -0
- package/lib/Socket/Client/websocket.js +57 -0
- package/lib/Socket/Client/websocket.js.map +1 -0
- package/lib/Socket/business.d.ts +428 -0
- package/lib/Socket/business.d.ts.map +1 -0
- package/lib/Socket/business.js +380 -0
- package/lib/Socket/business.js.map +1 -0
- package/lib/Socket/chats.d.ts +176 -0
- package/lib/Socket/chats.d.ts.map +1 -0
- package/lib/Socket/chats.js +1238 -0
- package/lib/Socket/chats.js.map +1 -0
- package/lib/Socket/communities.d.ts +595 -0
- package/lib/Socket/communities.d.ts.map +1 -0
- package/lib/Socket/communities.js +432 -0
- package/lib/Socket/communities.js.map +1 -0
- package/lib/Socket/graphql.js +908 -0
- package/lib/Socket/groups.d.ts +318 -0
- package/lib/Socket/groups.d.ts.map +1 -0
- package/lib/Socket/groups.js +364 -0
- package/lib/Socket/groups.js.map +1 -0
- package/lib/Socket/index.d.ts +940 -0
- package/lib/Socket/index.d.ts.map +1 -0
- package/lib/Socket/index.js +19 -0
- package/lib/Socket/index.js.map +1 -0
- package/lib/Socket/interop.js +562 -0
- package/lib/Socket/managed-account.js +210 -0
- package/lib/Socket/messages-recv.d.ts +367 -0
- package/lib/Socket/messages-recv.d.ts.map +1 -0
- package/lib/Socket/messages-recv.js +2199 -0
- package/lib/Socket/messages-recv.js.map +1 -0
- package/lib/Socket/messages-send.d.ts +364 -0
- package/lib/Socket/messages-send.d.ts.map +1 -0
- package/lib/Socket/messages-send.js +1501 -0
- package/lib/Socket/messages-send.js.map +1 -0
- package/lib/Socket/mex.d.ts +2 -0
- package/lib/Socket/mex.d.ts.map +1 -0
- package/lib/Socket/mex.js +42 -0
- package/lib/Socket/mex.js.map +1 -0
- package/lib/Socket/newsletter.d.ts +315 -0
- package/lib/Socket/newsletter.d.ts.map +1 -0
- package/lib/Socket/newsletter.js +235 -0
- package/lib/Socket/newsletter.js.map +1 -0
- package/lib/Socket/privacy.js +448 -0
- package/lib/Socket/registration.js +430 -0
- package/lib/Socket/socket.d.ts +93 -0
- package/lib/Socket/socket.d.ts.map +1 -0
- package/lib/Socket/socket.js +1272 -0
- package/lib/Socket/socket.js.map +1 -0
- package/lib/Store/index.d.ts +4 -0
- package/lib/Store/index.d.ts.map +1 -0
- package/lib/Store/index.js +4 -0
- package/lib/Store/index.js.map +1 -0
- package/lib/Store/make-in-memory-store.d.ts +63 -0
- package/lib/Store/make-in-memory-store.d.ts.map +1 -0
- package/lib/Store/make-in-memory-store.js +462 -0
- package/lib/Store/make-in-memory-store.js.map +1 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.d.ts.map +1 -0
- package/lib/Store/make-ordered-dictionary.js +79 -0
- package/lib/Store/make-ordered-dictionary.js.map +1 -0
- package/lib/Store/object-repository.d.ts +11 -0
- package/lib/Store/object-repository.d.ts.map +1 -0
- package/lib/Store/object-repository.js +24 -0
- package/lib/Store/object-repository.js.map +1 -0
- package/lib/Types/Auth.d.ts +60 -0
- package/lib/Types/Auth.d.ts.map +1 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Auth.js.map +1 -0
- package/lib/Types/Bussines.d.ts +9 -0
- package/lib/Types/Bussines.d.ts.map +1 -0
- package/lib/Types/Bussines.js +2 -0
- package/lib/Types/Bussines.js.map +1 -0
- package/lib/Types/Call.d.ts +22 -0
- package/lib/Types/Call.d.ts.map +1 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Call.js.map +1 -0
- package/lib/Types/Chat.d.ts +3 -0
- package/lib/Types/Chat.d.ts.map +1 -0
- package/lib/Types/Chat.js +8 -0
- package/lib/Types/Chat.js.map +1 -0
- package/lib/Types/Contact.d.ts +11 -0
- package/lib/Types/Contact.d.ts.map +1 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Contact.js.map +1 -0
- package/lib/Types/Events.d.ts +41 -0
- package/lib/Types/Events.d.ts.map +1 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/Events.js.map +1 -0
- package/lib/Types/GroupMetadata.d.ts +36 -0
- package/lib/Types/GroupMetadata.d.ts.map +1 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/GroupMetadata.js.map +1 -0
- package/lib/Types/Label.d.ts +3 -0
- package/lib/Types/Label.d.ts.map +1 -0
- package/lib/Types/Label.js +25 -0
- package/lib/Types/Label.js.map +1 -0
- package/lib/Types/LabelAssociation.d.ts +3 -0
- package/lib/Types/LabelAssociation.d.ts.map +1 -0
- package/lib/Types/LabelAssociation.js +7 -0
- package/lib/Types/LabelAssociation.js.map +1 -0
- package/lib/Types/Message.d.ts +22 -0
- package/lib/Types/Message.d.ts.map +1 -0
- package/lib/Types/Message.js +18 -0
- package/lib/Types/Message.js.map +1 -0
- package/lib/Types/Mex.d.ts +3 -0
- package/lib/Types/Mex.d.ts.map +1 -0
- package/lib/Types/Mex.js +49 -0
- package/lib/Types/Mex.js.map +1 -0
- package/lib/Types/Product.d.ts +5 -0
- package/lib/Types/Product.d.ts.map +1 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Product.js.map +1 -0
- package/lib/Types/RichType.d.ts +3 -0
- package/lib/Types/RichType.d.ts.map +1 -0
- package/lib/Types/RichType.js +23 -0
- package/lib/Types/RichType.js.map +1 -0
- package/lib/Types/Signal.d.ts +10 -0
- package/lib/Types/Signal.d.ts.map +1 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Signal.js.map +1 -0
- package/lib/Types/Socket.d.ts +33 -0
- package/lib/Types/Socket.d.ts.map +1 -0
- package/lib/Types/Socket.js +2 -0
- package/lib/Types/Socket.js.map +1 -0
- package/lib/Types/State.d.ts +6 -0
- package/lib/Types/State.d.ts.map +1 -0
- package/lib/Types/State.js +56 -0
- package/lib/Types/State.js.map +1 -0
- package/lib/Types/USync.d.ts +9 -0
- package/lib/Types/USync.d.ts.map +1 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/USync.js.map +1 -0
- package/lib/Types/index.d.ts +16 -0
- package/lib/Types/index.d.ts.map +1 -0
- package/lib/Types/index.js +26 -0
- package/lib/Types/index.js.map +1 -0
- package/lib/Utils/async-utils.js +7 -0
- package/lib/Utils/auth-utils.d.ts +59 -0
- package/lib/Utils/auth-utils.d.ts.map +1 -0
- package/lib/Utils/auth-utils.js +306 -0
- package/lib/Utils/auth-utils.js.map +1 -0
- package/lib/Utils/browser-utils.d.ts +10 -0
- package/lib/Utils/browser-utils.d.ts.map +1 -0
- package/lib/Utils/browser-utils.js +29 -0
- package/lib/Utils/browser-utils.js.map +1 -0
- package/lib/Utils/business.d.ts +50 -0
- package/lib/Utils/business.d.ts.map +1 -0
- package/lib/Utils/business.js +231 -0
- package/lib/Utils/business.js.map +1 -0
- package/lib/Utils/chat-utils.d.ts +409 -0
- package/lib/Utils/chat-utils.d.ts.map +1 -0
- package/lib/Utils/chat-utils.js +872 -0
- package/lib/Utils/chat-utils.js.map +1 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +10 -0
- package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
- package/lib/Utils/companion-reg-client-utils.js +69 -0
- package/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/lib/Utils/crypto-worker.js +20 -0
- package/lib/Utils/crypto.d.ts +40 -0
- package/lib/Utils/crypto.d.ts.map +1 -0
- package/lib/Utils/crypto.js +118 -0
- package/lib/Utils/crypto.js.map +1 -0
- package/lib/Utils/decode-wa-message.d.ts +85 -0
- package/lib/Utils/decode-wa-message.d.ts.map +1 -0
- package/lib/Utils/decode-wa-message.js +467 -0
- package/lib/Utils/decode-wa-message.js.map +1 -0
- package/lib/Utils/event-buffer.d.ts +13 -0
- package/lib/Utils/event-buffer.d.ts.map +1 -0
- package/lib/Utils/event-buffer.js +651 -0
- package/lib/Utils/event-buffer.js.map +1 -0
- package/lib/Utils/generics.d.ts +64 -0
- package/lib/Utils/generics.d.ts.map +1 -0
- package/lib/Utils/generics.js +442 -0
- package/lib/Utils/generics.js.map +1 -0
- package/lib/Utils/history.d.ts +77 -0
- package/lib/Utils/history.d.ts.map +1 -0
- package/lib/Utils/history.js +188 -0
- package/lib/Utils/history.js.map +1 -0
- package/lib/Utils/identity-change-handler.d.ts +14 -0
- package/lib/Utils/identity-change-handler.d.ts.map +1 -0
- package/lib/Utils/identity-change-handler.js +50 -0
- package/lib/Utils/identity-change-handler.js.map +1 -0
- package/lib/Utils/index.d.ts +26 -0
- package/lib/Utils/index.d.ts.map +1 -0
- package/lib/Utils/index.js +26 -0
- package/lib/Utils/index.js.map +1 -0
- package/lib/Utils/link-preview.d.ts +13 -0
- package/lib/Utils/link-preview.d.ts.map +1 -0
- package/lib/Utils/link-preview.js +85 -0
- package/lib/Utils/link-preview.js.map +1 -0
- package/lib/Utils/listener-guard.js +48 -0
- package/lib/Utils/logger.d.ts +3 -0
- package/lib/Utils/logger.d.ts.map +1 -0
- package/lib/Utils/logger.js +3 -0
- package/lib/Utils/logger.js.map +1 -0
- package/lib/Utils/lt-hash.d.ts +7 -0
- package/lib/Utils/lt-hash.d.ts.map +1 -0
- package/lib/Utils/lt-hash.js +8 -0
- package/lib/Utils/lt-hash.js.map +1 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/lib/Utils/make-mutex.d.ts.map +1 -0
- package/lib/Utils/make-mutex.js +33 -0
- package/lib/Utils/make-mutex.js.map +1 -0
- package/lib/Utils/message-retry-manager.d.ts +80 -0
- package/lib/Utils/message-retry-manager.d.ts.map +1 -0
- package/lib/Utils/message-retry-manager.js +285 -0
- package/lib/Utils/message-retry-manager.js.map +1 -0
- package/lib/Utils/messages-media.d.ts +166 -0
- package/lib/Utils/messages-media.d.ts.map +1 -0
- package/lib/Utils/messages-media.js +957 -0
- package/lib/Utils/messages-media.js.map +1 -0
- package/lib/Utils/messages.d.ts +46 -0
- package/lib/Utils/messages.d.ts.map +1 -0
- package/lib/Utils/messages.js +1887 -0
- package/lib/Utils/messages.js.map +1 -0
- package/lib/Utils/meta-ai-msmsg.d.ts +12 -0
- package/lib/Utils/meta-ai-msmsg.js +124 -0
- package/lib/Utils/noise-handler.d.ts +21 -0
- package/lib/Utils/noise-handler.d.ts.map +1 -0
- package/lib/Utils/noise-handler.js +206 -0
- package/lib/Utils/noise-handler.js.map +1 -0
- package/lib/Utils/offline-node-processor.d.ts +10 -0
- package/lib/Utils/offline-node-processor.d.ts.map +1 -0
- package/lib/Utils/offline-node-processor.js +40 -0
- package/lib/Utils/offline-node-processor.js.map +1 -0
- package/lib/Utils/pre-key-manager.d.ts +26 -0
- package/lib/Utils/pre-key-manager.d.ts.map +1 -0
- package/lib/Utils/pre-key-manager.js +106 -0
- package/lib/Utils/pre-key-manager.js.map +1 -0
- package/lib/Utils/process-message.d.ts +102 -0
- package/lib/Utils/process-message.d.ts.map +1 -0
- package/lib/Utils/process-message.js +798 -0
- package/lib/Utils/process-message.js.map +1 -0
- package/lib/Utils/reporting-utils.d.ts +13 -0
- package/lib/Utils/reporting-utils.d.ts.map +1 -0
- package/lib/Utils/reporting-utils.js +258 -0
- package/lib/Utils/reporting-utils.js.map +1 -0
- package/lib/Utils/rich-message-utils.d.ts +49 -0
- package/lib/Utils/rich-message-utils.d.ts.map +1 -0
- package/lib/Utils/rich-message-utils.js +369 -0
- package/lib/Utils/rich-message-utils.js.map +1 -0
- package/lib/Utils/session-queue.js +33 -0
- package/lib/Utils/signal.d.ts +83 -0
- package/lib/Utils/signal.d.ts.map +1 -0
- package/lib/Utils/signal.js +201 -0
- package/lib/Utils/signal.js.map +1 -0
- package/lib/Utils/stanza-ack.d.ts +22 -0
- package/lib/Utils/stanza-ack.d.ts.map +1 -0
- package/lib/Utils/stanza-ack.js +72 -0
- package/lib/Utils/stanza-ack.js.map +1 -0
- package/lib/Utils/sync-action-utils.d.ts +3 -0
- package/lib/Utils/sync-action-utils.d.ts.map +1 -0
- package/lib/Utils/sync-action-utils.js +49 -0
- package/lib/Utils/sync-action-utils.js.map +1 -0
- package/lib/Utils/tc-token-utils.d.ts +30 -0
- package/lib/Utils/tc-token-utils.d.ts.map +1 -0
- package/lib/Utils/tc-token-utils.js +164 -0
- package/lib/Utils/tc-token-utils.js.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +12 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.js +175 -0
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +11 -0
- package/lib/Utils/use-single-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-single-file-auth-state.js +109 -0
- package/lib/Utils/use-single-file-auth-state.js.map +1 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-sqlite-auth-state.js +109 -0
- package/lib/Utils/use-sqlite-auth-state.js.map +1 -0
- package/lib/Utils/validate-connection.d.ts +44 -0
- package/lib/Utils/validate-connection.d.ts.map +1 -0
- package/lib/Utils/validate-connection.js +210 -0
- package/lib/Utils/validate-connection.js.map +1 -0
- package/lib/Utils/worker-pool.js +73 -0
- package/lib/WABinary/constants.d.ts +62 -0
- package/lib/WABinary/constants.d.ts.map +1 -0
- package/lib/WABinary/constants.js +1467 -0
- package/lib/WABinary/constants.js.map +1 -0
- package/lib/WABinary/decode.d.ts +10 -0
- package/lib/WABinary/decode.d.ts.map +1 -0
- package/lib/WABinary/decode.js +262 -0
- package/lib/WABinary/decode.js.map +1 -0
- package/lib/WABinary/encode.d.ts +3 -0
- package/lib/WABinary/encode.d.ts.map +1 -0
- package/lib/WABinary/encode.js +220 -0
- package/lib/WABinary/encode.js.map +1 -0
- package/lib/WABinary/generic-utils.d.ts +77 -0
- package/lib/WABinary/generic-utils.d.ts.map +1 -0
- package/lib/WABinary/generic-utils.js +226 -0
- package/lib/WABinary/generic-utils.js.map +1 -0
- package/lib/WABinary/index.d.ts +6 -0
- package/lib/WABinary/index.d.ts.map +1 -0
- package/lib/WABinary/index.js +6 -0
- package/lib/WABinary/index.js.map +1 -0
- package/lib/WABinary/jid-utils.d.ts +29 -0
- package/lib/WABinary/jid-utils.d.ts.map +1 -0
- package/lib/WABinary/jid-utils.js +96 -0
- package/lib/WABinary/jid-utils.js.map +1 -0
- package/lib/WABinary/types.d.ts +6 -0
- package/lib/WABinary/types.d.ts.map +1 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WABinary/types.js.map +1 -0
- package/lib/WAM/BinaryInfo.d.ts +8 -0
- package/lib/WAM/BinaryInfo.d.ts.map +1 -0
- package/lib/WAM/BinaryInfo.js +10 -0
- package/lib/WAM/BinaryInfo.js.map +1 -0
- package/lib/WAM/constants.d.ts +34927 -0
- package/lib/WAM/constants.d.ts.map +1 -0
- package/lib/WAM/constants.js +22853 -0
- package/lib/WAM/constants.js.map +1 -0
- package/lib/WAM/encode.d.ts +2 -0
- package/lib/WAM/encode.d.ts.map +1 -0
- package/lib/WAM/encode.js +150 -0
- package/lib/WAM/encode.js.map +1 -0
- package/lib/WAM/index.d.ts +4 -0
- package/lib/WAM/index.d.ts.map +1 -0
- package/lib/WAM/index.js +4 -0
- package/lib/WAM/index.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncBusinessProtocol.d.ts +8 -0
- package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +99 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +37 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +53 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncFeatureProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +70 -0
- package/lib/WAUSync/Protocols/USyncPictureProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncPictureProtocol.js +28 -0
- package/lib/WAUSync/Protocols/USyncSidelistProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +25 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncTextStatusProtocol.d.ts +11 -0
- package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +34 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +31 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +39 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +15 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/index.d.ts +11 -0
- package/lib/WAUSync/Protocols/index.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/index.js +11 -0
- package/lib/WAUSync/Protocols/index.js.map +1 -0
- package/lib/WAUSync/USyncQuery.d.ts +32 -0
- package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
- package/lib/WAUSync/USyncQuery.js +185 -0
- package/lib/WAUSync/USyncQuery.js.map +1 -0
- package/lib/WAUSync/USyncUser.d.ts +25 -0
- package/lib/WAUSync/USyncUser.d.ts.map +1 -0
- package/lib/WAUSync/USyncUser.js +48 -0
- package/lib/WAUSync/USyncUser.js.map +1 -0
- package/lib/WAUSync/index.d.ts +4 -0
- package/lib/WAUSync/index.d.ts.map +1 -0
- package/lib/WAUSync/index.js +4 -0
- package/lib/WAUSync/index.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -0
- package/package.json +122 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { assertNodeErrorFree, getBinaryNodeChild, getBinaryNodeChildren } from '../../WABinary/index.js';
|
|
2
|
+
export class USyncSidelistProtocol {
|
|
3
|
+
constructor(useLidAddressing = true) {
|
|
4
|
+
this.name = 'sidelist'
|
|
5
|
+
// When true, sends addressing_mode="lid" — required for interop/LID-mode contacts
|
|
6
|
+
this.useLidAddressing = useLidAddressing
|
|
7
|
+
}
|
|
8
|
+
getQueryElement() {
|
|
9
|
+
const attrs = {}
|
|
10
|
+
if (this.useLidAddressing) attrs.addressing_mode = 'lid'
|
|
11
|
+
return { tag: 'sidelist', attrs }
|
|
12
|
+
}
|
|
13
|
+
getUserElement(user) {
|
|
14
|
+
if (user.sidelistDelete) {
|
|
15
|
+
return { tag: 'sidelist', attrs: { type: 'delete' } }
|
|
16
|
+
}
|
|
17
|
+
return null
|
|
18
|
+
}
|
|
19
|
+
parser(node) {
|
|
20
|
+
if (node.tag !== 'sidelist' && node.tag !== 'side_list') return null
|
|
21
|
+
assertNodeErrorFree(node)
|
|
22
|
+
// Returns minimal parsed data; the full side_list is parsed in USyncQuery
|
|
23
|
+
return { type: node.attrs?.type ?? null }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class USyncStatusProtocol {
|
|
2
|
+
name: string;
|
|
3
|
+
getQueryElement(): {
|
|
4
|
+
tag: string;
|
|
5
|
+
attrs: {};
|
|
6
|
+
};
|
|
7
|
+
getUserElement(): null;
|
|
8
|
+
parser(node: any): {
|
|
9
|
+
status: any;
|
|
10
|
+
setAt: Date;
|
|
11
|
+
} | undefined;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=USyncStatusProtocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"USyncStatusProtocol.d.ts","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/USyncStatusProtocol.js"],"names":[],"mappings":"AACA;IAEQ,aAAoB;IAExB;;;MAKC;IACD,uBAEC;IACD;;;kBAqBC;CACJ"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { assertNodeErrorFree } from '../../WABinary/index.js';
|
|
2
|
+
export class USyncStatusProtocol {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = 'status';
|
|
5
|
+
}
|
|
6
|
+
getQueryElement() {
|
|
7
|
+
return {
|
|
8
|
+
tag: 'status',
|
|
9
|
+
attrs: {}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
getUserElement() {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
parser(node) {
|
|
16
|
+
if (node.tag === 'status') {
|
|
17
|
+
assertNodeErrorFree(node);
|
|
18
|
+
let status = node?.content?.toString() ?? null;
|
|
19
|
+
const setAt = new Date(+(node?.attrs.t || 0) * 1000);
|
|
20
|
+
if (!status) {
|
|
21
|
+
if (node.attrs?.code && +node.attrs.code === 401) {
|
|
22
|
+
status = '';
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
status = null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else if (typeof status === 'string' && status.length === 0) {
|
|
29
|
+
status = null;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
status,
|
|
33
|
+
setAt
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=USyncStatusProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"USyncStatusProtocol.js","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/USyncStatusProtocol.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,MAAM,OAAO,mBAAmB;IAC5B;QACI,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;IACzB,CAAC;IACD,eAAe;QACX,OAAO;YACH,GAAG,EAAE,QAAQ;YACb,KAAK,EAAE,EAAE;SACZ,CAAC;IACN,CAAC;IACD,cAAc;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,IAAI;QACP,IAAI,IAAI,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;YACxB,mBAAmB,CAAC,IAAI,CAAC,CAAC;YAC1B,IAAI,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC;YAC/C,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YACrD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;oBAC/C,MAAM,GAAG,EAAE,CAAC;gBAChB,CAAC;qBACI,CAAC;oBACF,MAAM,GAAG,IAAI,CAAC;gBAClB,CAAC;YACL,CAAC;iBACI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACzD,MAAM,GAAG,IAAI,CAAC;YAClB,CAAC;YACD,OAAO;gBACH,MAAM;gBACN,KAAK;aACR,CAAC;QACN,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { assertNodeErrorFree, getBinaryNodeChild, getBinaryNodeChildren } from '../../WABinary/index.js';
|
|
2
|
+
export class USyncTextStatusProtocol {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.name = 'text_status'
|
|
5
|
+
}
|
|
6
|
+
getQueryElement() {
|
|
7
|
+
return {
|
|
8
|
+
tag: 'text_status',
|
|
9
|
+
attrs: {}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
getUserElement() {
|
|
13
|
+
return null
|
|
14
|
+
}
|
|
15
|
+
parser(node) {
|
|
16
|
+
if (node.tag !== 'text_status') return null
|
|
17
|
+
assertNodeErrorFree(node)
|
|
18
|
+
const lastUpdateTimeSec = node.attrs?.last_update_time ? +node.attrs.last_update_time : 0
|
|
19
|
+
const ephemeralDurationSec = node.attrs?.ephemeral_duration_sec ? +node.attrs.ephemeral_duration_sec : 0
|
|
20
|
+
const text = node.attrs?.text ?? null
|
|
21
|
+
const emojiNode = getBinaryNodeChild(node, 'emoji')
|
|
22
|
+
const emoji = emojiNode?.attrs?.content ?? null
|
|
23
|
+
// expiry is lastUpdateTime + ephemeralDuration (both in ms); 0 means no expiry
|
|
24
|
+
const expiresAt = ephemeralDurationSec > 0
|
|
25
|
+
? new Date((lastUpdateTimeSec + ephemeralDurationSec) * 1000)
|
|
26
|
+
: null
|
|
27
|
+
return {
|
|
28
|
+
text,
|
|
29
|
+
emoji,
|
|
30
|
+
setAt: new Date(lastUpdateTimeSec * 1000),
|
|
31
|
+
expiresAt
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"USyncUsernameProtocol.d.ts","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/USyncUsernameProtocol.js"],"names":[],"mappings":"AAEA;IAEQ,aAAsB;IAE1B;;;MAKC;IACD,gCAGC;IACD,uBAMC;CACJ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { assertNodeErrorFree } from '../../WABinary/index.js';
|
|
2
|
+
import { USyncUser } from '../USyncUser.js';
|
|
3
|
+
export class USyncUsernameProtocol {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = 'username';
|
|
6
|
+
}
|
|
7
|
+
getQueryElement() {
|
|
8
|
+
return {
|
|
9
|
+
tag: 'username',
|
|
10
|
+
attrs: {}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
getUserElement(user) {
|
|
14
|
+
void user;
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
parser(node) {
|
|
18
|
+
if (node.tag === 'username') {
|
|
19
|
+
assertNodeErrorFree(node);
|
|
20
|
+
if (typeof node.content === 'string') {
|
|
21
|
+
return node.content;
|
|
22
|
+
}
|
|
23
|
+
// the binary decoder hands back Uint8Array for BINARY_8/20/32 payloads
|
|
24
|
+
if (node.content instanceof Uint8Array) {
|
|
25
|
+
return Buffer.from(node.content).toString('utf-8');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=USyncUsernameProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"USyncUsernameProtocol.js","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/USyncUsernameProtocol.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,MAAM,OAAO,qBAAqB;IAC9B;QACI,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IAC3B,CAAC;IACD,eAAe;QACX,OAAO;YACH,GAAG,EAAE,UAAU;YACf,KAAK,EAAE,EAAE;SACZ,CAAC;IACN,CAAC;IACD,cAAc,CAAC,IAAI;QACf,KAAK,IAAI,CAAC;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,IAAI;QACP,IAAI,IAAI,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;YAC1B,mBAAmB,CAAC,IAAI,CAAC,CAAC;YAC1B,OAAO,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QAClE,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export class USyncBotProfileProtocol {
|
|
2
|
+
name: string;
|
|
3
|
+
getQueryElement(): {
|
|
4
|
+
tag: string;
|
|
5
|
+
attrs: {};
|
|
6
|
+
content: {
|
|
7
|
+
tag: string;
|
|
8
|
+
attrs: {
|
|
9
|
+
v: string;
|
|
10
|
+
};
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
getUserElement(user: any): {
|
|
14
|
+
tag: string;
|
|
15
|
+
attrs: {};
|
|
16
|
+
content: {
|
|
17
|
+
tag: string;
|
|
18
|
+
attrs: {
|
|
19
|
+
persona_id: any;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
parser(node: any): {
|
|
24
|
+
isDefault: boolean;
|
|
25
|
+
jid: any;
|
|
26
|
+
name: any;
|
|
27
|
+
attributes: any;
|
|
28
|
+
description: any;
|
|
29
|
+
category: any;
|
|
30
|
+
personaId: any;
|
|
31
|
+
commandsDescription: any;
|
|
32
|
+
commands: {
|
|
33
|
+
name: any;
|
|
34
|
+
description: any;
|
|
35
|
+
}[];
|
|
36
|
+
prompts: string[];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=UsyncBotProfileProtocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsyncBotProfileProtocol.d.ts","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/UsyncBotProfileProtocol.js"],"names":[],"mappings":"AAEA;IAEQ,aAAiB;IAErB;;;;;;;;;MAMC;IACD;;;;;;;;;MAMC;IACD;;;;;;;;;;;;;;MA4BC;CACJ"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
|
|
2
|
+
import { USyncUser } from '../USyncUser.js';
|
|
3
|
+
export class USyncBotProfileProtocol {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = 'bot';
|
|
6
|
+
}
|
|
7
|
+
getQueryElement() {
|
|
8
|
+
return {
|
|
9
|
+
tag: 'bot',
|
|
10
|
+
attrs: {},
|
|
11
|
+
content: [{ tag: 'profile', attrs: { v: '1' } }]
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
getUserElement(user) {
|
|
15
|
+
return {
|
|
16
|
+
tag: 'bot',
|
|
17
|
+
attrs: {},
|
|
18
|
+
content: [{ tag: 'profile', attrs: { persona_id: user.personaId } }]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
parser(node) {
|
|
22
|
+
const botNode = getBinaryNodeChild(node, 'bot');
|
|
23
|
+
const profile = getBinaryNodeChild(botNode, 'profile');
|
|
24
|
+
const commandsNode = getBinaryNodeChild(profile, 'commands');
|
|
25
|
+
const promptsNode = getBinaryNodeChild(profile, 'prompts');
|
|
26
|
+
const commands = [];
|
|
27
|
+
const prompts = [];
|
|
28
|
+
for (const command of getBinaryNodeChildren(commandsNode, 'command')) {
|
|
29
|
+
commands.push({
|
|
30
|
+
name: getBinaryNodeChildString(command, 'name'),
|
|
31
|
+
description: getBinaryNodeChildString(command, 'description')
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
for (const prompt of getBinaryNodeChildren(promptsNode, 'prompt')) {
|
|
35
|
+
prompts.push(`${getBinaryNodeChildString(prompt, 'emoji')} ${getBinaryNodeChildString(prompt, 'text')}`);
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
isDefault: !!getBinaryNodeChild(profile, 'default'),
|
|
39
|
+
jid: node.attrs.jid,
|
|
40
|
+
name: getBinaryNodeChildString(profile, 'name'),
|
|
41
|
+
attributes: getBinaryNodeChildString(profile, 'attributes'),
|
|
42
|
+
description: getBinaryNodeChildString(profile, 'description'),
|
|
43
|
+
category: getBinaryNodeChildString(profile, 'category'),
|
|
44
|
+
personaId: profile.attrs['persona_id'],
|
|
45
|
+
commandsDescription: getBinaryNodeChildString(commandsNode, 'description'),
|
|
46
|
+
commands,
|
|
47
|
+
prompts
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=UsyncBotProfileProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsyncBotProfileProtocol.js","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/UsyncBotProfileProtocol.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC9G,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,MAAM,OAAO,uBAAuB;IAChC;QACI,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,eAAe;QACX,OAAO;YACH,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;SACnD,CAAC;IACN,CAAC;IACD,cAAc,CAAC,IAAI;QACf,OAAO;YACH,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;SACvE,CAAC;IACN,CAAC;IACD,MAAM,CAAC,IAAI;QACP,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACvD,MAAM,YAAY,GAAG,kBAAkB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC7D,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC3D,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,KAAK,MAAM,OAAO,IAAI,qBAAqB,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,CAAC;YACnE,QAAQ,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC;gBAC/C,WAAW,EAAE,wBAAwB,CAAC,OAAO,EAAE,aAAa,CAAC;aAChE,CAAC,CAAC;QACP,CAAC;QACD,KAAK,MAAM,MAAM,IAAI,qBAAqB,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC;YAChE,OAAO,CAAC,IAAI,CAAC,GAAG,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QAC7G,CAAC;QACD,OAAO;YACH,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC;YACnD,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;YACnB,IAAI,EAAE,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC;YAC/C,UAAU,EAAE,wBAAwB,CAAC,OAAO,EAAE,YAAY,CAAC;YAC3D,WAAW,EAAE,wBAAwB,CAAC,OAAO,EAAE,aAAa,CAAC;YAC7D,QAAQ,EAAE,wBAAwB,CAAC,OAAO,EAAE,UAAU,CAAC;YACvD,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC;YACtC,mBAAmB,EAAE,wBAAwB,CAAC,YAAY,EAAE,aAAa,CAAC;YAC1E,QAAQ;YACR,OAAO;SACV,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class USyncLIDProtocol {
|
|
2
|
+
name: string;
|
|
3
|
+
getQueryElement(): {
|
|
4
|
+
tag: string;
|
|
5
|
+
attrs: {};
|
|
6
|
+
};
|
|
7
|
+
getUserElement(user: any): {
|
|
8
|
+
tag: string;
|
|
9
|
+
attrs: {
|
|
10
|
+
jid: any;
|
|
11
|
+
};
|
|
12
|
+
} | null;
|
|
13
|
+
parser(node: any): any;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=UsyncLIDProtocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsyncLIDProtocol.d.ts","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/UsyncLIDProtocol.js"],"names":[],"mappings":"AAAA;IAEQ,aAAiB;IAErB;;;MAKC;IACD;;;;;aAUC;IACD,uBAKC;CACJ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class USyncLIDProtocol {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.name = 'lid';
|
|
4
|
+
}
|
|
5
|
+
getQueryElement() {
|
|
6
|
+
return {
|
|
7
|
+
tag: 'lid',
|
|
8
|
+
attrs: {}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
getUserElement(user) {
|
|
12
|
+
if (user.lid) {
|
|
13
|
+
return {
|
|
14
|
+
tag: 'lid',
|
|
15
|
+
attrs: { jid: user.lid }
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
parser(node) {
|
|
23
|
+
if (node.tag === 'lid') {
|
|
24
|
+
return node.attrs.val;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=UsyncLIDProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsyncLIDProtocol.js","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/UsyncLIDProtocol.js"],"names":[],"mappings":"AAAA,MAAM,OAAO,gBAAgB;IACzB;QACI,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,eAAe;QACX,OAAO;YACH,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,EAAE;SACZ,CAAC;IACN,CAAC;IACD,cAAc,CAAC,IAAI;QACf,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACX,OAAO;gBACH,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;aAC3B,CAAC;QACN,CAAC;aACI,CAAC;YACF,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IACD,MAAM,CAAC,IAAI;QACP,IAAI,IAAI,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;QAC1B,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./USyncDeviceProtocol.js";
|
|
2
|
+
export * from "./USyncContactProtocol.js";
|
|
3
|
+
export * from "./USyncStatusProtocol.js";
|
|
4
|
+
export * from "./USyncDisappearingModeProtocol.js";
|
|
5
|
+
export * from "./USyncUsernameProtocol.js";
|
|
6
|
+
export * from "./USyncBusinessProtocol.js";
|
|
7
|
+
export * from "./USyncPictureProtocol.js";
|
|
8
|
+
export * from "./USyncTextStatusProtocol.js";
|
|
9
|
+
export * from "./USyncSidelistProtocol.js";
|
|
10
|
+
export * from "./USyncFeatureProtocol.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './USyncDeviceProtocol.js';
|
|
2
|
+
export * from './USyncContactProtocol.js';
|
|
3
|
+
export * from './USyncStatusProtocol.js';
|
|
4
|
+
export * from './USyncDisappearingModeProtocol.js';
|
|
5
|
+
export * from './USyncUsernameProtocol.js';
|
|
6
|
+
export * from './USyncBusinessProtocol.js';
|
|
7
|
+
export * from './USyncPictureProtocol.js';
|
|
8
|
+
export * from './USyncTextStatusProtocol.js';
|
|
9
|
+
export * from './USyncSidelistProtocol.js';
|
|
10
|
+
export * from './USyncFeatureProtocol.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/WAUSync/Protocols/index.js"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export class USyncQuery {
|
|
2
|
+
protocols: any[];
|
|
3
|
+
users: any[];
|
|
4
|
+
context: string;
|
|
5
|
+
mode: string;
|
|
6
|
+
withMode(mode: any): this;
|
|
7
|
+
withContext(context: any): this;
|
|
8
|
+
withUser(user: any): this;
|
|
9
|
+
parseUSyncQueryResult(result: any): {
|
|
10
|
+
errors: Record<string, {
|
|
11
|
+
errorCode?: number;
|
|
12
|
+
errorText?: string;
|
|
13
|
+
errorBackoff?: number;
|
|
14
|
+
}>;
|
|
15
|
+
refresh: Record<string, number>;
|
|
16
|
+
list: any[];
|
|
17
|
+
sideList: any[];
|
|
18
|
+
} | undefined;
|
|
19
|
+
withDeviceProtocol(): this;
|
|
20
|
+
withContactProtocol(addressingMode?: 'lid' | 'pn'): this;
|
|
21
|
+
withStatusProtocol(): this;
|
|
22
|
+
withDisappearingModeProtocol(): this;
|
|
23
|
+
withBotProfileProtocol(): this;
|
|
24
|
+
withLIDProtocol(): this;
|
|
25
|
+
withUsernameProtocol(): this;
|
|
26
|
+
withBusinessProtocol(profileVersion?: string): this;
|
|
27
|
+
withPictureProtocol(type?: 'image' | 'preview'): this;
|
|
28
|
+
withTextStatusProtocol(): this;
|
|
29
|
+
withSidelistProtocol(useLidAddressing?: boolean): this;
|
|
30
|
+
withFeatureProtocol(features?: string[]): this;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=USyncQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"USyncQuery.d.ts","sourceRoot":"","sources":["../../src/WAUSync/USyncQuery.js"],"names":[],"mappings":"AAKA;IAEQ,iBAAmB;IACnB,aAAe;IACf,gBAA4B;IAC5B,aAAmB;IAEvB,0BAGC;IACD,gCAGC;IACD,0BAGC;IACD;;;kBA2CC;IACD,2BAGC;IACD,4BAGC;IACD,2BAGC;IACD,qCAGC;IACD,+BAGC;IACD,wBAGC;IACD,6BAGC;CACJ"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { getBinaryNodeChild } from '../WABinary/index.js';
|
|
2
|
+
import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
|
|
3
|
+
import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
|
|
4
|
+
import { USyncBusinessProtocol, USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncFeatureProtocol, USyncPictureProtocol, USyncSidelistProtocol, USyncStatusProtocol, USyncTextStatusProtocol, USyncUsernameProtocol } from './Protocols/index.js';
|
|
5
|
+
import { USyncUser } from './USyncUser.js';
|
|
6
|
+
export class USyncQuery {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.protocols = [];
|
|
9
|
+
this.users = [];
|
|
10
|
+
this.context = 'interactive';
|
|
11
|
+
this.mode = 'query';
|
|
12
|
+
}
|
|
13
|
+
withMode(mode) {
|
|
14
|
+
this.mode = mode;
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
withContext(context) {
|
|
18
|
+
this.context = context;
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
withUser(user) {
|
|
22
|
+
this.users.push(user);
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
parseUSyncQueryResult(result) {
|
|
26
|
+
if (result?.attrs.type !== 'result') {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
|
|
30
|
+
return [protocol.name, protocol.parser];
|
|
31
|
+
}));
|
|
32
|
+
const queryResult = {
|
|
33
|
+
errors: {},
|
|
34
|
+
refresh: {},
|
|
35
|
+
list: [],
|
|
36
|
+
sideList: []
|
|
37
|
+
};
|
|
38
|
+
const usyncNode = getBinaryNodeChild(result, 'usync');
|
|
39
|
+
// Each protocol's result child can carry either an <error code text backoff/>
|
|
40
|
+
// (caller should back off future queries for that protocol) or a refresh="n"
|
|
41
|
+
// attr (caller may cache the response for n seconds).
|
|
42
|
+
const resultNode = usyncNode ? getBinaryNodeChild(usyncNode, 'result') : undefined;
|
|
43
|
+
if (resultNode) {
|
|
44
|
+
for (const protocol of this.protocols) {
|
|
45
|
+
const protocolNode = getBinaryNodeChild(resultNode, protocol.name);
|
|
46
|
+
if (!protocolNode) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const errorNode = getBinaryNodeChild(protocolNode, 'error');
|
|
50
|
+
if (errorNode) {
|
|
51
|
+
queryResult.errors[protocol.name] = {
|
|
52
|
+
errorCode: errorNode.attrs.code ? +errorNode.attrs.code : undefined,
|
|
53
|
+
errorText: errorNode.attrs.text,
|
|
54
|
+
errorBackoff: errorNode.attrs.backoff ? +errorNode.attrs.backoff : undefined
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
else if (protocolNode.attrs.refresh !== undefined) {
|
|
58
|
+
queryResult.refresh[protocol.name] = +protocolNode.attrs.refresh;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const parseUserNodes = (nodes) => nodes.reduce((acc, node) => {
|
|
63
|
+
const id = node?.attrs.jid;
|
|
64
|
+
// a username lookup answered without a jid means the server wants the 4-digit
|
|
65
|
+
// username key before it reveals the account; keep the row so callers can see that
|
|
66
|
+
const keyRequired = !id && !!getBinaryNodeChild(node, 'contact')?.attrs?.username;
|
|
67
|
+
if (id || keyRequired) {
|
|
68
|
+
// a user-level error attr means the contact has blocked us; WA uses
|
|
69
|
+
// 401/403/405 on the <user> node in that case
|
|
70
|
+
const userErrorCode = node?.attrs?.error ? parseInt(node.attrs.error, 10) : 0;
|
|
71
|
+
const isBlockedByAttr = userErrorCode === 401 || userErrorCode === 403 || userErrorCode === 405;
|
|
72
|
+
const data = Array.isArray(node?.content)
|
|
73
|
+
? Object.fromEntries(node.content
|
|
74
|
+
.map(content => {
|
|
75
|
+
const protocol = content.tag;
|
|
76
|
+
// per-contact privacy token, sent either as child nodes or inline attrs
|
|
77
|
+
if (protocol === 'privacy') {
|
|
78
|
+
const tokenNode = getBinaryNodeChild(content, 'token');
|
|
79
|
+
const modeTsNode = getBinaryNodeChild(content, 'mode_ts');
|
|
80
|
+
const tokenVal = tokenNode?.content || content.attrs?.token;
|
|
81
|
+
const modeTsVal = modeTsNode?.content?.toString?.() ||
|
|
82
|
+
modeTsNode?.attrs?.value ||
|
|
83
|
+
content.attrs?.mode_ts ||
|
|
84
|
+
null;
|
|
85
|
+
if (tokenVal) {
|
|
86
|
+
return [
|
|
87
|
+
'privacy',
|
|
88
|
+
{
|
|
89
|
+
token: Buffer.isBuffer(tokenVal) || tokenVal instanceof Uint8Array
|
|
90
|
+
? Buffer.from(tokenVal)
|
|
91
|
+
: tokenVal,
|
|
92
|
+
modeTs: modeTsVal
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
return ['privacy', null];
|
|
97
|
+
}
|
|
98
|
+
const parser = protocolMap[protocol];
|
|
99
|
+
if (parser) {
|
|
100
|
+
try {
|
|
101
|
+
return [protocol, parser(content)];
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
// a blocked-code parser error should surface as a flag, not crash the query
|
|
105
|
+
const errCode = err?.data ?? err?.output?.payload?.data;
|
|
106
|
+
if (errCode === 401 || errCode === 403 || errCode === 405) {
|
|
107
|
+
return ['isBlockedByContact', true];
|
|
108
|
+
}
|
|
109
|
+
throw err;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
return [protocol, null];
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
.filter(([, b]) => b !== null))
|
|
117
|
+
: {};
|
|
118
|
+
if (isBlockedByAttr) {
|
|
119
|
+
data.isBlockedByContact = true;
|
|
120
|
+
}
|
|
121
|
+
acc.push({ ...data, id, ...(keyRequired ? { keyRequired: true } : {}) });
|
|
122
|
+
}
|
|
123
|
+
return acc;
|
|
124
|
+
}, []);
|
|
125
|
+
const listNode = usyncNode ? getBinaryNodeChild(usyncNode, 'list') : undefined;
|
|
126
|
+
if (listNode?.content && Array.isArray(listNode.content)) {
|
|
127
|
+
queryResult.list = parseUserNodes(listNode.content);
|
|
128
|
+
}
|
|
129
|
+
const sideListNode = usyncNode ? getBinaryNodeChild(usyncNode, 'side_list') : undefined;
|
|
130
|
+
if (sideListNode?.content && Array.isArray(sideListNode.content)) {
|
|
131
|
+
queryResult.sideList = parseUserNodes(sideListNode.content);
|
|
132
|
+
}
|
|
133
|
+
return queryResult;
|
|
134
|
+
}
|
|
135
|
+
withDeviceProtocol() {
|
|
136
|
+
this.protocols.push(new USyncDeviceProtocol());
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
withContactProtocol(addressingMode) {
|
|
140
|
+
this.protocols.push(new USyncContactProtocol(addressingMode));
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
withStatusProtocol() {
|
|
144
|
+
this.protocols.push(new USyncStatusProtocol());
|
|
145
|
+
return this;
|
|
146
|
+
}
|
|
147
|
+
withDisappearingModeProtocol() {
|
|
148
|
+
this.protocols.push(new USyncDisappearingModeProtocol());
|
|
149
|
+
return this;
|
|
150
|
+
}
|
|
151
|
+
withBotProfileProtocol() {
|
|
152
|
+
this.protocols.push(new USyncBotProfileProtocol());
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
withLIDProtocol() {
|
|
156
|
+
this.protocols.push(new USyncLIDProtocol());
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
withUsernameProtocol() {
|
|
160
|
+
this.protocols.push(new USyncUsernameProtocol());
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
withBusinessProtocol(profileVersion) {
|
|
164
|
+
this.protocols.push(new USyncBusinessProtocol(profileVersion));
|
|
165
|
+
return this;
|
|
166
|
+
}
|
|
167
|
+
/** @param type 'image' for full resolution, 'preview' for a thumbnail */
|
|
168
|
+
withPictureProtocol(type) {
|
|
169
|
+
this.protocols.push(new USyncPictureProtocol(type));
|
|
170
|
+
return this;
|
|
171
|
+
}
|
|
172
|
+
withTextStatusProtocol() {
|
|
173
|
+
this.protocols.push(new USyncTextStatusProtocol());
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
withSidelistProtocol(useLidAddressing) {
|
|
177
|
+
this.protocols.push(new USyncSidelistProtocol(useLidAddressing));
|
|
178
|
+
return this;
|
|
179
|
+
}
|
|
180
|
+
withFeatureProtocol(features) {
|
|
181
|
+
this.protocols.push(new USyncFeatureProtocol(features));
|
|
182
|
+
return this;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=USyncQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"USyncQuery.js","sourceRoot":"","sources":["../../src/WAUSync/USyncQuery.js"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class USyncUser {
|
|
2
|
+
withId(id: any): this;
|
|
3
|
+
id: any;
|
|
4
|
+
withLid(lid: any): this;
|
|
5
|
+
lid: any;
|
|
6
|
+
withPhone(phone: any): this;
|
|
7
|
+
phone: any;
|
|
8
|
+
withUsername(username: any): this;
|
|
9
|
+
username: any;
|
|
10
|
+
withUsernameKey(usernameKey: any): this;
|
|
11
|
+
usernameKey: any;
|
|
12
|
+
withType(type: any): this;
|
|
13
|
+
type: any;
|
|
14
|
+
withPersonaId(personaId: any): this;
|
|
15
|
+
personaId: any;
|
|
16
|
+
withPictureId(pictureId: any): this;
|
|
17
|
+
pictureId: any;
|
|
18
|
+
withVerifiedNameSerial(verifiedNameSerial: any): this;
|
|
19
|
+
verifiedNameSerial: any;
|
|
20
|
+
withBusinessProfileTag(businessProfileTag: any): this;
|
|
21
|
+
businessProfileTag: any;
|
|
22
|
+
withSidelistDelete(sidelistDelete?: boolean): this;
|
|
23
|
+
sidelistDelete: boolean;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=USyncUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"USyncUser.d.ts","sourceRoot":"","sources":["../../src/WAUSync/USyncUser.js"],"names":[],"mappings":"AAAA;IACI,sBAGC;IAFG,QAAY;IAGhB,wBAGC;IAFG,SAAc;IAGlB,4BAGC;IAFG,WAAkB;IAGtB,kCAGC;IAFG,cAAwB;IAG5B,wCAGC;IAFG,iBAA8B;IAGlC,0BAGC;IAFG,UAAgB;IAGpB,oCAGC;IAFG,eAA0B;CAGjC"}
|