lordceaser-baileys 3.3.5 → 3.3.7
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/WAProto/GenerateStatics.sh +3 -0
- package/WAProto/fix-imports.js +85 -0
- package/index.js +15 -6
- package/lib/Defaults/index.d.ts +75 -0
- package/lib/Defaults/index.d.ts.map +1 -0
- package/lib/Defaults/index.js +15 -44
- 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 +2 -1
- package/lib/Signal/Group/ciphertext-message.js.map +1 -0
- package/lib/Signal/Group/group-session-builder.d.ts +15 -0
- package/lib/Signal/Group/group-session-builder.d.ts.map +1 -0
- package/lib/Signal/Group/group-session-builder.js +2 -1
- package/lib/Signal/Group/group-session-builder.js.map +1 -0
- package/lib/Signal/Group/group_cipher.d.ts +17 -0
- package/lib/Signal/Group/group_cipher.d.ts.map +1 -0
- package/lib/Signal/Group/group_cipher.js +2 -1
- 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 +1 -0
- package/lib/Signal/Group/index.js.map +1 -0
- package/lib/Signal/Group/keyhelper.d.ts +11 -0
- package/lib/Signal/Group/keyhelper.d.ts.map +1 -0
- package/lib/Signal/Group/keyhelper.js +2 -1
- 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 +2 -1
- 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 +2 -1
- 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 +2 -1
- package/lib/Signal/Group/sender-key-message.js.map +1 -0
- package/lib/Signal/Group/sender-key-name.d.ts +18 -0
- package/lib/Signal/Group/sender-key-name.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-name.js +2 -1
- package/lib/Signal/Group/sender-key-name.js.map +1 -0
- package/lib/Signal/Group/sender-key-record.d.ts +31 -0
- package/lib/Signal/Group/sender-key-record.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-record.js +2 -1
- package/lib/Signal/Group/sender-key-record.js.map +1 -0
- package/lib/Signal/Group/sender-key-state.d.ts +39 -0
- package/lib/Signal/Group/sender-key-state.d.ts.map +1 -0
- package/lib/Signal/Group/sender-key-state.js +2 -1
- 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 +2 -1
- package/lib/Signal/Group/sender-message-key.js.map +1 -0
- package/lib/Signal/libsignal.d.ts +5 -0
- package/lib/Signal/libsignal.d.ts.map +1 -0
- package/lib/Signal/libsignal.js +4 -1
- package/lib/Signal/libsignal.js.map +1 -0
- package/lib/Signal/lid-mapping.d.ts +23 -0
- package/lib/Signal/lid-mapping.d.ts.map +1 -0
- package/lib/Signal/lid-mapping.js +6 -9
- 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 +1 -0
- package/lib/Socket/Client/index.js.map +1 -0
- package/lib/Socket/Client/types.d.ts +16 -0
- package/lib/Socket/Client/types.d.ts.map +1 -0
- package/lib/Socket/Client/types.js +2 -1
- 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 +2 -1
- package/lib/Socket/Client/websocket.js.map +1 -0
- package/lib/Socket/Socket/Client/index.js +2 -0
- package/lib/Socket/Socket/Client/types.js +10 -0
- package/lib/Socket/Socket/Client/websocket.js +53 -0
- package/lib/Socket/Socket/business.js +407 -0
- package/lib/Socket/Socket/chats.js +1908 -0
- package/lib/Socket/Socket/communities.js +431 -0
- package/lib/Socket/Socket/groups.js +549 -0
- package/lib/Socket/Socket/index.js +37 -0
- package/lib/Socket/Socket/messages-recv.js +2144 -0
- package/lib/Socket/Socket/messages-send.js +3177 -0
- package/lib/Socket/Socket/mex.js +41 -0
- package/lib/Socket/Socket/newsletter.js +260 -0
- package/lib/Socket/Socket/socket.js +1017 -0
- package/lib/Socket/business.d.ts +217 -0
- package/lib/Socket/business.d.ts.map +1 -0
- package/lib/Socket/business.js +42 -70
- package/lib/Socket/business.js.map +1 -0
- package/lib/Socket/chats.d.ts +125 -0
- package/lib/Socket/chats.d.ts.map +1 -0
- package/lib/Socket/chats.js +21 -731
- package/lib/Socket/chats.js.map +1 -0
- package/lib/Socket/communities.d.ts +273 -0
- package/lib/Socket/communities.d.ts.map +1 -0
- package/lib/Socket/communities.js +1 -1
- package/lib/Socket/communities.js.map +1 -0
- package/lib/Socket/groups.d.ts +161 -0
- package/lib/Socket/groups.d.ts.map +1 -0
- package/lib/Socket/groups.js +5 -207
- package/lib/Socket/groups.js.map +1 -0
- package/lib/Socket/index.d.ts +260 -0
- package/lib/Socket/index.d.ts.map +1 -0
- package/lib/Socket/index.js +3 -28
- package/lib/Socket/index.js.map +1 -0
- package/lib/Socket/messages-recv.d.ts +203 -0
- package/lib/Socket/messages-recv.d.ts.map +1 -0
- package/lib/Socket/messages-recv.js +9 -381
- package/lib/Socket/messages-recv.js.map +1 -0
- package/lib/Socket/messages-send.d.ts +199 -0
- package/lib/Socket/messages-send.d.ts.map +1 -0
- package/lib/Socket/messages-send.js +157 -2189
- package/lib/Socket/messages-send.js.map +1 -0
- package/lib/Socket/mex.d.ts +3 -0
- package/lib/Socket/mex.d.ts.map +1 -0
- package/lib/Socket/mex.js +2 -1
- package/lib/Socket/mex.js.map +1 -0
- package/lib/Socket/newsletter.d.ts +170 -0
- package/lib/Socket/newsletter.d.ts.map +1 -0
- package/lib/Socket/newsletter.js +19 -98
- package/lib/Socket/newsletter.js.map +1 -0
- package/lib/Socket/socket.d.ts +59 -0
- package/lib/Socket/socket.d.ts.map +1 -0
- package/lib/Socket/socket.js +17 -64
- package/lib/Socket/socket.js.map +1 -0
- package/lib/Types/Auth.d.ts +117 -0
- package/lib/Types/Auth.d.ts.map +1 -0
- package/lib/Types/Auth.js +2 -1
- package/lib/Types/Auth.js.map +1 -0
- package/lib/Types/Bussines.d.ts +25 -0
- package/lib/Types/Bussines.d.ts.map +1 -0
- package/lib/Types/Bussines.js +2 -1
- package/lib/Types/Bussines.js.map +1 -0
- package/lib/Types/Call.d.ts +15 -0
- package/lib/Types/Call.d.ts.map +1 -0
- package/lib/Types/Call.js +2 -1
- package/lib/Types/Call.js.map +1 -0
- package/lib/Types/Chat.d.ts +124 -0
- package/lib/Types/Chat.d.ts.map +1 -0
- package/lib/Types/Chat.js +2 -1
- package/lib/Types/Chat.js.map +1 -0
- package/lib/Types/Contact.d.ts +26 -0
- package/lib/Types/Contact.d.ts.map +1 -0
- package/lib/Types/Contact.js +2 -1
- package/lib/Types/Contact.js.map +1 -0
- package/lib/Types/Events.d.ts +256 -0
- package/lib/Types/Events.d.ts.map +1 -0
- package/lib/Types/Events.js +2 -1
- package/lib/Types/Events.js.map +1 -0
- package/lib/Types/GroupMetadata.d.ts +71 -0
- package/lib/Types/GroupMetadata.d.ts.map +1 -0
- package/lib/Types/GroupMetadata.js +2 -1
- package/lib/Types/GroupMetadata.js.map +1 -0
- package/lib/Types/Label.d.ts +47 -0
- package/lib/Types/Label.d.ts.map +1 -0
- package/lib/Types/Label.js +2 -1
- package/lib/Types/Label.js.map +1 -0
- package/lib/Types/LabelAssociation.d.ts +30 -0
- package/lib/Types/LabelAssociation.d.ts.map +1 -0
- package/lib/Types/LabelAssociation.js +2 -1
- package/lib/Types/LabelAssociation.js.map +1 -0
- package/lib/Types/Message.d.ts +320 -0
- package/lib/Types/Message.d.ts.map +1 -0
- package/lib/Types/Message.js +1 -8
- package/lib/Types/Message.js.map +1 -0
- package/lib/Types/Mex.d.ts +141 -0
- package/lib/Types/Mex.d.ts.map +1 -0
- package/lib/Types/Mex.js +1 -3
- package/lib/Types/Mex.js.map +1 -0
- package/lib/Types/Product.d.ts +79 -0
- package/lib/Types/Product.d.ts.map +1 -0
- package/lib/Types/Product.js +2 -1
- package/lib/Types/Product.js.map +1 -0
- package/lib/Types/Signal.d.ts +87 -0
- package/lib/Types/Signal.d.ts.map +1 -0
- package/lib/Types/Signal.js +2 -1
- package/lib/Types/Signal.js.map +1 -0
- package/lib/Types/Socket.d.ts +136 -0
- package/lib/Types/Socket.d.ts.map +1 -0
- package/lib/Types/Socket.js +2 -1
- package/lib/Types/Socket.js.map +1 -0
- package/lib/Types/State.d.ts +97 -0
- package/lib/Types/State.d.ts.map +1 -0
- package/lib/Types/State.js +8 -0
- package/lib/Types/State.js.map +1 -0
- package/lib/Types/USync.d.ts +26 -0
- package/lib/Types/USync.d.ts.map +1 -0
- package/lib/Types/USync.js +2 -1
- package/lib/Types/USync.js.map +1 -0
- package/lib/Types/index.d.ts +66 -0
- package/lib/Types/index.d.ts.map +1 -0
- package/lib/Types/index.js +2 -1
- package/lib/Types/index.js.map +1 -0
- package/lib/Utils/_crypto_orig.js +118 -0
- package/lib/Utils/auth-utils.d.ts +24 -0
- package/lib/Utils/auth-utils.d.ts.map +1 -0
- package/lib/Utils/auth-utils.js +1 -0
- package/lib/Utils/auth-utils.js.map +1 -0
- package/lib/Utils/browser-utils.d.ts +4 -0
- package/lib/Utils/browser-utils.d.ts.map +1 -0
- package/lib/Utils/browser-utils.js +3 -2
- package/lib/Utils/browser-utils.js.map +1 -0
- package/lib/Utils/business.d.ts +23 -0
- package/lib/Utils/business.d.ts.map +1 -0
- package/lib/Utils/business.js +2 -1
- package/lib/Utils/business.js.map +1 -0
- package/lib/Utils/chat-utils.d.ts +100 -0
- package/lib/Utils/chat-utils.d.ts.map +1 -0
- package/lib/Utils/chat-utils.js +1 -22
- package/lib/Utils/chat-utils.js.map +1 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
- package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
- package/lib/Utils/companion-reg-client-utils.js +17 -14
- package/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/lib/Utils/crypto.d.ts +37 -0
- package/lib/Utils/crypto.d.ts.map +1 -0
- package/lib/Utils/crypto.js +8 -117
- package/lib/Utils/crypto.js.map +1 -0
- package/lib/Utils/decode-wa-message.d.ts +66 -0
- package/lib/Utils/decode-wa-message.d.ts.map +1 -0
- package/lib/Utils/decode-wa-message.js +2 -169
- package/lib/Utils/decode-wa-message.js.map +1 -0
- package/lib/Utils/event-buffer.d.ts +36 -0
- package/lib/Utils/event-buffer.d.ts.map +1 -0
- package/lib/Utils/event-buffer.js +34 -1
- package/lib/Utils/event-buffer.js.map +1 -0
- package/lib/Utils/generics.d.ts +92 -0
- package/lib/Utils/generics.d.ts.map +1 -0
- package/lib/Utils/generics.js +30 -27
- package/lib/Utils/generics.js.map +1 -0
- package/lib/Utils/history.d.ts +24 -0
- package/lib/Utils/history.d.ts.map +1 -0
- package/lib/Utils/history.js +13 -29
- package/lib/Utils/history.js.map +1 -0
- package/lib/Utils/identity-change-handler.d.ts +44 -0
- package/lib/Utils/identity-change-handler.d.ts.map +1 -0
- package/lib/Utils/identity-change-handler.js +3 -1
- package/lib/Utils/identity-change-handler.js.map +1 -0
- package/lib/Utils/index.d.ts +22 -0
- package/lib/Utils/index.d.ts.map +1 -0
- package/lib/Utils/index.js +1 -17
- package/lib/Utils/index.js.map +1 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.d.ts.map +1 -0
- package/lib/Utils/link-preview.js +4 -3
- package/lib/Utils/link-preview.js.map +1 -0
- package/lib/Utils/logger.d.ts +12 -0
- package/lib/Utils/logger.d.ts.map +1 -0
- package/lib/Utils/logger.js +2 -1
- package/lib/Utils/logger.js.map +1 -0
- package/lib/Utils/lt-hash.d.ts +8 -0
- package/lib/Utils/lt-hash.d.ts.map +1 -0
- package/lib/Utils/lt-hash.js +2 -1
- package/lib/Utils/lt-hash.js.map +1 -0
- package/lib/Utils/make-mutex.d.ts +9 -0
- package/lib/Utils/make-mutex.d.ts.map +1 -0
- package/lib/Utils/make-mutex.js +2 -1
- package/lib/Utils/make-mutex.js.map +1 -0
- package/lib/Utils/message-retry-manager.d.ts +115 -0
- package/lib/Utils/message-retry-manager.d.ts.map +1 -0
- package/lib/Utils/message-retry-manager.js +26 -2
- package/lib/Utils/message-retry-manager.js.map +1 -0
- package/lib/Utils/messages-media.d.ts +133 -0
- package/lib/Utils/messages-media.d.ts.map +1 -0
- package/lib/Utils/messages-media.js +33 -251
- package/lib/Utils/messages-media.js.map +1 -0
- package/lib/Utils/messages.d.ts +91 -0
- package/lib/Utils/messages.d.ts.map +1 -0
- package/lib/Utils/messages.js +69 -1328
- package/lib/Utils/messages.js.map +1 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/noise-handler.d.ts.map +1 -0
- package/lib/Utils/noise-handler.js +2 -1
- package/lib/Utils/noise-handler.js.map +1 -0
- package/lib/Utils/offline-node-processor.d.ts +17 -0
- package/lib/Utils/offline-node-processor.d.ts.map +1 -0
- package/lib/Utils/offline-node-processor.js +2 -1
- package/lib/Utils/offline-node-processor.js.map +1 -0
- package/lib/Utils/pre-key-manager.d.ts +28 -0
- package/lib/Utils/pre-key-manager.d.ts.map +1 -0
- package/lib/Utils/pre-key-manager.js +2 -1
- package/lib/Utils/pre-key-manager.js.map +1 -0
- package/lib/Utils/process-message.d.ts +60 -0
- package/lib/Utils/process-message.d.ts.map +1 -0
- package/lib/Utils/process-message.js +151 -114
- package/lib/Utils/process-message.js.map +1 -0
- package/lib/Utils/reporting-utils.d.ts +11 -0
- package/lib/Utils/reporting-utils.d.ts.map +1 -0
- package/lib/Utils/reporting-utils.js +2 -1
- package/lib/Utils/reporting-utils.js.map +1 -0
- package/lib/Utils/signal.d.ts +47 -0
- package/lib/Utils/signal.d.ts.map +1 -0
- package/lib/Utils/signal.js +1 -0
- package/lib/Utils/signal.js.map +1 -0
- package/lib/Utils/stanza-ack.d.ts +11 -0
- package/lib/Utils/stanza-ack.d.ts.map +1 -0
- package/lib/Utils/stanza-ack.js +2 -1
- package/lib/Utils/stanza-ack.js.map +1 -0
- package/lib/Utils/sync-action-utils.d.ts +19 -0
- package/lib/Utils/sync-action-utils.d.ts.map +1 -0
- package/lib/Utils/sync-action-utils.js +3 -1
- package/lib/Utils/sync-action-utils.js.map +1 -0
- package/lib/Utils/tc-token-utils.d.ts +37 -0
- package/lib/Utils/tc-token-utils.d.ts.map +1 -0
- package/lib/Utils/tc-token-utils.js +4 -2
- package/lib/Utils/tc-token-utils.js.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.js +2 -1
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -0
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/lib/Utils/validate-connection.d.ts.map +1 -0
- package/lib/Utils/validate-connection.js +6 -4
- package/lib/Utils/validate-connection.js.map +1 -0
- package/lib/WABinary/constants.d.ts +28 -0
- package/lib/WABinary/constants.d.ts.map +1 -0
- package/lib/WABinary/constants.js +1 -163
- package/lib/WABinary/constants.js.map +1 -0
- package/lib/WABinary/decode.d.ts +7 -0
- package/lib/WABinary/decode.d.ts.map +1 -0
- package/lib/WABinary/decode.js +2 -1
- 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 +2 -1
- package/lib/WABinary/encode.js.map +1 -0
- package/lib/WABinary/generic-utils.d.ts +15 -0
- package/lib/WABinary/generic-utils.d.ts.map +1 -0
- package/lib/WABinary/generic-utils.js +1 -115
- package/lib/WABinary/generic-utils.js.map +1 -0
- package/{WABinary/index.js → lib/WABinary/index.d.ts} +1 -0
- package/lib/WABinary/index.d.ts.map +1 -0
- package/lib/WABinary/index.js +1 -0
- package/lib/WABinary/index.js.map +1 -0
- package/lib/WABinary/jid-utils.d.ts +48 -0
- package/lib/WABinary/jid-utils.d.ts.map +1 -0
- package/lib/WABinary/jid-utils.js +3 -2
- package/lib/WABinary/jid-utils.js.map +1 -0
- package/lib/WABinary/types.d.ts +19 -0
- package/lib/WABinary/types.d.ts.map +1 -0
- package/lib/WABinary/types.js +2 -1
- package/lib/WABinary/types.js.map +1 -0
- package/lib/WAM/BinaryInfo.d.ts +9 -0
- package/lib/WAM/BinaryInfo.d.ts.map +1 -0
- package/lib/WAM/BinaryInfo.js +2 -1
- package/lib/WAM/BinaryInfo.js.map +1 -0
- package/lib/WAM/constants.d.ts +40 -0
- package/lib/WAM/constants.d.ts.map +1 -0
- package/lib/WAM/constants.js +2 -1
- package/lib/WAM/constants.js.map +1 -0
- package/lib/WAM/encode.d.ts +3 -0
- package/lib/WAM/encode.d.ts.map +1 -0
- package/lib/WAM/encode.js +2 -1
- 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 +1 -0
- package/lib/WAM/index.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +3 -7
- 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 +2 -1
- 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 +2 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +3 -2
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +2 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/index.d.ts +6 -0
- package/lib/WAUSync/Protocols/index.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/index.js +1 -7
- package/lib/WAUSync/Protocols/index.js.map +1 -0
- package/lib/WAUSync/USyncQuery.d.ts +30 -0
- package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
- package/lib/WAUSync/USyncQuery.js +23 -126
- package/lib/WAUSync/USyncQuery.js.map +1 -0
- package/lib/WAUSync/USyncUser.d.ts +17 -0
- package/lib/WAUSync/USyncUser.d.ts.map +1 -0
- package/lib/WAUSync/USyncUser.js +1 -24
- package/lib/WAUSync/USyncUser.js.map +1 -0
- package/lib/WAUSync/WAUSync/Protocols/USyncContactProtocol.js +56 -0
- package/lib/WAUSync/WAUSync/Protocols/USyncDeviceProtocol.js +53 -0
- package/lib/WAUSync/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -0
- package/lib/WAUSync/WAUSync/Protocols/USyncStatusProtocol.js +37 -0
- package/lib/WAUSync/WAUSync/Protocols/USyncUsernameProtocol.js +24 -0
- package/lib/WAUSync/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -0
- package/lib/WAUSync/WAUSync/Protocols/UsyncLIDProtocol.js +28 -0
- package/lib/WAUSync/WAUSync/Protocols/index.js +12 -0
- package/lib/WAUSync/WAUSync/USyncQuery.js +201 -0
- package/lib/WAUSync/WAUSync/USyncUser.js +54 -0
- package/lib/WAUSync/WAUSync/index.js +3 -0
- package/lib/WAUSync/index.d.ts +4 -0
- package/lib/WAUSync/index.d.ts.map +1 -0
- package/lib/WAUSync/index.js +2 -1
- package/lib/WAUSync/index.js.map +1 -0
- package/lib/index.d.ts +10 -648
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -0
- package/package.json +4 -3
- package/WABinary/constants.js +0 -1463
- package/WABinary/decode.js +0 -261
- package/WABinary/encode.js +0 -219
- package/WABinary/generic-utils.js +0 -227
- package/WABinary/jid-utils.js +0 -95
- package/WABinary/types.js +0 -1
- package/lib/Defaults/ban-checker.js +0 -44
- package/lib/Store/index.js +0 -4
- package/lib/Store/make-cache-manager-store.js +0 -89
- package/lib/Store/make-in-memory-store.js +0 -420
- package/lib/Store/make-ordered-dictionary.js +0 -78
- package/lib/Store/object-repository.js +0 -23
- package/lib/Types/RichType.js +0 -22
- package/lib/Utils/bot-capabilities.js +0 -84
- package/lib/Utils/bot-planning-replay.js +0 -165
- package/lib/Utils/channel-policy.js +0 -25
- package/lib/Utils/chat-utils.js[old] +0 -871
- package/lib/Utils/consumer-application.js +0 -102
- package/lib/Utils/games/miniapp.js +0 -5
- package/lib/Utils/games/slot-machine.js +0 -258
- package/lib/Utils/games/website-preview.js +0 -294
- package/lib/Utils/games/website-preview.js[bug] +0 -293
- package/lib/Utils/generics.js@old +0 -385
- package/lib/Utils/group-history.js +0 -56
- package/lib/Utils/jid-display-normalization.js +0 -209
- package/lib/Utils/message-composer.js +0 -467
- package/lib/Utils/message-inspect.js +0 -67
- package/lib/Utils/messages-media.js[old] +0 -916
- package/lib/Utils/messages.js[old] +0 -1902
- package/lib/Utils/meta-ai-msmsg.js +0 -203
- package/lib/Utils/meta-compositing.js +0 -227
- package/lib/Utils/native-flow.js +0 -100
- package/lib/Utils/rich-message-utils.js +0 -1895
- package/lib/Utils/rich-message-utils.js[Old] +0 -387
- package/lib/Utils/source-grep.js +0 -45
- package/lib/Utils/use-single-file-auth-state.js +0 -96
- package/lib/Utils/use-sqlite-auth-state.js +0 -108
- package/lib/Utils/view-once-utils.js +0 -206
- package/lib/Utils/voip-rekey.js +0 -20
- package/lib/Utils/welcome-flow.js +0 -216
- /package/lib/Socket/{aigroups.js → Socket/aigroups.js} +0 -0
- /package/lib/Socket/{ban-checker.js → Socket/ban-checker.js} +0 -0
- /package/lib/Socket/{chats.js[old] → Socket/chats.js[old]} +0 -0
- /package/lib/Socket/{graphql.js → Socket/graphql.js} +0 -0
- /package/lib/Socket/{groups.js[old] → Socket/groups.js[old]} +0 -0
- /package/lib/Socket/{interactive-handler.js → Socket/interactive-handler.js} +0 -0
- /package/lib/Socket/{interop.js → Socket/interop.js} +0 -0
- /package/lib/Socket/{managed-account.js → Socket/managed-account.js} +0 -0
- /package/lib/Socket/{privacy.js → Socket/privacy.js} +0 -0
- /package/lib/Socket/{registration.js → Socket/registration.js} +0 -0
- /package/lib/Socket/{username.js → Socket/username.js} +0 -0
- /package/lib/WAUSync/{Protocols → WAUSync/Protocols}/USyncBusinessProtocol.js +0 -0
- /package/lib/WAUSync/{Protocols → WAUSync/Protocols}/USyncFeatureProtocol.js +0 -0
- /package/lib/WAUSync/{Protocols → WAUSync/Protocols}/USyncPictureProtocol.js +0 -0
- /package/lib/WAUSync/{Protocols → WAUSync/Protocols}/USyncSidelistProtocol.js +0 -0
- /package/lib/WAUSync/{Protocols → WAUSync/Protocols}/USyncTextStatusProtocol.js +0 -0
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
export function makeOrderedDictionary(idGetter) {
|
|
2
|
-
const array = [];
|
|
3
|
-
const dict = {};
|
|
4
|
-
const get = (id) => dict[id];
|
|
5
|
-
const update = (item) => {
|
|
6
|
-
const id = idGetter(item);
|
|
7
|
-
const idx = array.findIndex(i => idGetter(i) === id);
|
|
8
|
-
if (idx >= 0) {
|
|
9
|
-
array[idx] = item;
|
|
10
|
-
dict[id] = item;
|
|
11
|
-
}
|
|
12
|
-
return false;
|
|
13
|
-
};
|
|
14
|
-
const upsert = (item, mode) => {
|
|
15
|
-
const id = idGetter(item);
|
|
16
|
-
if (get(id)) {
|
|
17
|
-
update(item);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
if (mode === 'append') {
|
|
21
|
-
array.push(item);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
array.splice(0, 0, item);
|
|
25
|
-
}
|
|
26
|
-
dict[id] = item;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const remove = (item) => {
|
|
30
|
-
const id = idGetter(item);
|
|
31
|
-
const idx = array.findIndex(i => idGetter(i) === id);
|
|
32
|
-
if (idx >= 0) {
|
|
33
|
-
array.splice(idx, 1);
|
|
34
|
-
delete dict[id];
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
return false;
|
|
38
|
-
};
|
|
39
|
-
return {
|
|
40
|
-
array,
|
|
41
|
-
get,
|
|
42
|
-
upsert,
|
|
43
|
-
update,
|
|
44
|
-
remove,
|
|
45
|
-
updateAssign: (id, update) => {
|
|
46
|
-
const item = get(id);
|
|
47
|
-
if (item) {
|
|
48
|
-
Object.assign(item, update);
|
|
49
|
-
delete dict[id];
|
|
50
|
-
dict[idGetter(item)] = item;
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
return false;
|
|
54
|
-
},
|
|
55
|
-
clear: () => {
|
|
56
|
-
array.splice(0, array.length);
|
|
57
|
-
for (const key of Object.keys(dict)) {
|
|
58
|
-
delete dict[key];
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
filter: (contain) => {
|
|
62
|
-
let i = 0;
|
|
63
|
-
while (i < array.length) {
|
|
64
|
-
if (!contain(array[i])) {
|
|
65
|
-
delete dict[idGetter(array[i])];
|
|
66
|
-
array.splice(i, 1);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
i += 1;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
toJSON: () => array,
|
|
74
|
-
fromJSON: (newItems) => {
|
|
75
|
-
array.splice(0, array.length, ...newItems);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export class ObjectRepository {
|
|
2
|
-
constructor(entities = {}) {
|
|
3
|
-
this.entityMap = new Map(Object.entries(entities));
|
|
4
|
-
}
|
|
5
|
-
findById(id) {
|
|
6
|
-
return this.entityMap.get(id);
|
|
7
|
-
}
|
|
8
|
-
findAll() {
|
|
9
|
-
return Array.from(this.entityMap.values());
|
|
10
|
-
}
|
|
11
|
-
upsertById(id, entity) {
|
|
12
|
-
return this.entityMap.set(id, { ...entity });
|
|
13
|
-
}
|
|
14
|
-
deleteById(id) {
|
|
15
|
-
return this.entityMap.delete(id);
|
|
16
|
-
}
|
|
17
|
-
count() {
|
|
18
|
-
return this.entityMap.size;
|
|
19
|
-
}
|
|
20
|
-
toJSON() {
|
|
21
|
-
return this.findAll();
|
|
22
|
-
}
|
|
23
|
-
}
|
package/lib/Types/RichType.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export var CodeHighlightType;
|
|
2
|
-
(function (CodeHighlightType) {
|
|
3
|
-
CodeHighlightType[CodeHighlightType["DEFAULT"] = 0] = "DEFAULT";
|
|
4
|
-
CodeHighlightType[CodeHighlightType["KEYWORD"] = 1] = "KEYWORD";
|
|
5
|
-
CodeHighlightType[CodeHighlightType["METHOD"] = 2] = "METHOD";
|
|
6
|
-
CodeHighlightType[CodeHighlightType["STRING"] = 3] = "STRING";
|
|
7
|
-
CodeHighlightType[CodeHighlightType["NUMBER"] = 4] = "NUMBER";
|
|
8
|
-
CodeHighlightType[CodeHighlightType["COMMENT"] = 5] = "COMMENT";
|
|
9
|
-
})(CodeHighlightType || (CodeHighlightType = {}));
|
|
10
|
-
export var RichSubMessageType;
|
|
11
|
-
(function (RichSubMessageType) {
|
|
12
|
-
RichSubMessageType[RichSubMessageType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
13
|
-
RichSubMessageType[RichSubMessageType["GRID_IMAGE"] = 1] = "GRID_IMAGE";
|
|
14
|
-
RichSubMessageType[RichSubMessageType["TEXT"] = 2] = "TEXT";
|
|
15
|
-
RichSubMessageType[RichSubMessageType["INLINE_IMAGE"] = 3] = "INLINE_IMAGE";
|
|
16
|
-
RichSubMessageType[RichSubMessageType["TABLE"] = 4] = "TABLE";
|
|
17
|
-
RichSubMessageType[RichSubMessageType["CODE"] = 5] = "CODE";
|
|
18
|
-
RichSubMessageType[RichSubMessageType["DYNAMIC"] = 6] = "DYNAMIC";
|
|
19
|
-
RichSubMessageType[RichSubMessageType["MAP"] = 7] = "MAP";
|
|
20
|
-
RichSubMessageType[RichSubMessageType["LATEX"] = 8] = "LATEX";
|
|
21
|
-
RichSubMessageType[RichSubMessageType["CONTENT_ITEMS"] = 9] = "CONTENT_ITEMS";
|
|
22
|
-
})(RichSubMessageType || (RichSubMessageType = {}));
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Numeric capability values exposed by WAProto.BotCapabilityMetadata.
|
|
5
|
-
* Keep this derived from the generated protobuf so callers cannot drift from
|
|
6
|
-
* the checked-in schema.
|
|
7
|
-
*/
|
|
8
|
-
export const BotCapabilityType = proto.BotCapabilityMetadata.BotCapabilityType;
|
|
9
|
-
|
|
10
|
-
const capabilityNames = new Set(
|
|
11
|
-
Object.keys(BotCapabilityType).filter(name => Number.isNaN(Number(name)))
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
/** Normalize enum names/numbers and reject unknown capability values. */
|
|
15
|
-
export const normalizeBotCapabilities = (capabilities = []) => {
|
|
16
|
-
if (!Array.isArray(capabilities)) {
|
|
17
|
-
throw new TypeError('capabilities must be an array');
|
|
18
|
-
}
|
|
19
|
-
const values = capabilities.map(capability => {
|
|
20
|
-
if (typeof capability === 'string') {
|
|
21
|
-
if (!capabilityNames.has(capability)) {
|
|
22
|
-
throw new TypeError(`Unknown bot capability: ${capability}`);
|
|
23
|
-
}
|
|
24
|
-
return BotCapabilityType[capability];
|
|
25
|
-
}
|
|
26
|
-
if (Number.isInteger(capability) && BotCapabilityType[capability] !== undefined) {
|
|
27
|
-
return capability;
|
|
28
|
-
}
|
|
29
|
-
throw new TypeError(`Invalid bot capability: ${String(capability)}`);
|
|
30
|
-
});
|
|
31
|
-
return [...new Set(values)];
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const buildBotCapabilityMetadata = (capabilities = []) => ({
|
|
35
|
-
capabilities: normalizeBotCapabilities(capabilities)
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Build the canonical wrapper used by WhatsApp's bot rich-response messages.
|
|
40
|
-
* The capability list is deliberately explicit; unknown or duplicate values
|
|
41
|
-
* are never put on the wire.
|
|
42
|
-
*/
|
|
43
|
-
export const buildBotRichResponse = ({
|
|
44
|
-
text,
|
|
45
|
-
submessages,
|
|
46
|
-
capabilities = [],
|
|
47
|
-
botMetadata = {},
|
|
48
|
-
botJid = '867051314767696@bot',
|
|
49
|
-
richResponse = {}
|
|
50
|
-
} = {}) => {
|
|
51
|
-
const resolvedSubmessages = submessages || (text == null ? [] : [{
|
|
52
|
-
messageType: proto.AIRichResponseSubMessageType.AI_RICH_RESPONSE_TEXT,
|
|
53
|
-
messageText: String(text)
|
|
54
|
-
}]);
|
|
55
|
-
return {
|
|
56
|
-
messageContextInfo: {
|
|
57
|
-
botMetadata: {
|
|
58
|
-
...botMetadata,
|
|
59
|
-
capabilityMetadata: buildBotCapabilityMetadata(capabilities)
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
botForwardedMessage: {
|
|
63
|
-
message: {
|
|
64
|
-
richResponseMessage: {
|
|
65
|
-
messageType: proto.AIRichResponseMessageType.AI_RICH_RESPONSE_TYPE_STANDARD,
|
|
66
|
-
submessages: resolvedSubmessages,
|
|
67
|
-
...richResponse,
|
|
68
|
-
contextInfo: {
|
|
69
|
-
isForwarded: true,
|
|
70
|
-
forwardingScore: 1,
|
|
71
|
-
forwardedAiBotMessageInfo: { botJid },
|
|
72
|
-
forwardOrigin: 4,
|
|
73
|
-
...(richResponse.contextInfo || {})
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const capability = (name) => {
|
|
82
|
-
if (!capabilityNames.has(name)) throw new TypeError(`Unknown bot capability: ${name}`);
|
|
83
|
-
return BotCapabilityType[name];
|
|
84
|
-
};
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lia@Changes [WIP]
|
|
3
|
-
* botPlanningReplay — Meta AI-style live reasoning feed.
|
|
4
|
-
*
|
|
5
|
-
* UNIVERSAL VERSION: Works on ALL WhatsApp clients.
|
|
6
|
-
* - Native Meta AI rendering for compatible clients
|
|
7
|
-
* - Plain text fallback for regular clients (no "Update WhatsApp")
|
|
8
|
-
*
|
|
9
|
-
* Flow:
|
|
10
|
-
* Send placeholder (all steps pending)
|
|
11
|
-
* → edit: step[0] → DONE
|
|
12
|
-
* → edit: step[1] → DONE
|
|
13
|
-
* → ...
|
|
14
|
-
* → MESSAGE_EDIT: final answer on the same message key
|
|
15
|
-
*
|
|
16
|
-
* If you use or copy this code, please credit @crysnovax/bailey.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import { proto } from '../../WAProto/index.js';
|
|
20
|
-
import {
|
|
21
|
-
buildCompositingPlaceholder,
|
|
22
|
-
buildProgressIndicator,
|
|
23
|
-
buildPlainPlaceholder,
|
|
24
|
-
PlanningStepStatus
|
|
25
|
-
} from './meta-compositing.js';
|
|
26
|
-
import { BOT_RENDERING_CONFIG_METADATA } from '../Defaults/index.js';
|
|
27
|
-
import { delay } from './generics.js';
|
|
28
|
-
|
|
29
|
-
// ─── Internal: build native Meta AI frame ──────────────────────────────────
|
|
30
|
-
const buildReplayFrame = (description, steps, placeholderText = '') => {
|
|
31
|
-
return buildCompositingPlaceholder({ description, steps, placeholderText });
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// ─── Internal: edit planning bubble (native Meta AI) ───────────────────────
|
|
35
|
-
const editPlanningBubble = async (sock, jid, key, description, steps, placeholderText) => {
|
|
36
|
-
const updated = buildReplayFrame(description, steps, placeholderText);
|
|
37
|
-
await sock.sendMessage(jid, { raw: true, edit: key, ...updated });
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// ─── Internal: edit plain text bubble (universal) ──────────────────────────
|
|
41
|
-
const editPlainBubble = async (sock, jid, key, description, steps, placeholderText) => {
|
|
42
|
-
const updated = buildPlainPlaceholder(description, steps, placeholderText);
|
|
43
|
-
await sock.sendMessage(jid, { edit: key, ...updated });
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* replayPlanning — full live planning animation (UNIVERSAL).
|
|
48
|
-
*/
|
|
49
|
-
export const replayPlanning = async (sock, jid, steps, finalContent, {
|
|
50
|
-
description = 'Thinking…',
|
|
51
|
-
placeholderText = '',
|
|
52
|
-
stepDelayMs = 900,
|
|
53
|
-
finalPauseMs = 600,
|
|
54
|
-
abortOnDisconnect = true,
|
|
55
|
-
sendOptions = {},
|
|
56
|
-
useNativeMeta = false
|
|
57
|
-
} = {}) => {
|
|
58
|
-
if (!steps?.length) {
|
|
59
|
-
throw new Error('replayPlanning: steps array must have at least one entry');
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
let aborted = false;
|
|
63
|
-
const onClose = () => { aborted = true; };
|
|
64
|
-
if (abortOnDisconnect) {
|
|
65
|
-
sock.ev?.once?.('connection.update', ({ connection }) => {
|
|
66
|
-
if (connection === 'close') onClose();
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Show typing
|
|
71
|
-
await sock.sendPresenceUpdate('composing', jid);
|
|
72
|
-
|
|
73
|
-
// Build initial steps (all pending)
|
|
74
|
-
const initialSteps = steps.map(step => ({
|
|
75
|
-
...step,
|
|
76
|
-
status: PlanningStepStatus.IN_PROGRESS
|
|
77
|
-
}));
|
|
78
|
-
|
|
79
|
-
// Determine mode
|
|
80
|
-
const isNative = useNativeMeta && false; // Always false for now — force universal
|
|
81
|
-
|
|
82
|
-
// Send initial placeholder
|
|
83
|
-
let placeholder;
|
|
84
|
-
if (isNative) {
|
|
85
|
-
placeholder = await sock.sendMessage(jid, {
|
|
86
|
-
raw: true,
|
|
87
|
-
...buildReplayFrame(description, initialSteps, placeholderText)
|
|
88
|
-
});
|
|
89
|
-
} else {
|
|
90
|
-
placeholder = await sock.sendMessage(jid,
|
|
91
|
-
buildPlainPlaceholder(description, initialSteps, placeholderText)
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const key = placeholder?.key;
|
|
96
|
-
|
|
97
|
-
// Replay loop
|
|
98
|
-
try {
|
|
99
|
-
const currentSteps = [...initialSteps];
|
|
100
|
-
|
|
101
|
-
for (let i = 0; i < currentSteps.length; i++) {
|
|
102
|
-
if (aborted) break;
|
|
103
|
-
await delay(stepDelayMs);
|
|
104
|
-
if (aborted) break;
|
|
105
|
-
|
|
106
|
-
currentSteps[i] = { ...currentSteps[i], status: PlanningStepStatus.DONE };
|
|
107
|
-
|
|
108
|
-
if (key) {
|
|
109
|
-
if (isNative) {
|
|
110
|
-
await editPlanningBubble(sock, jid, key, description, currentSteps, placeholderText);
|
|
111
|
-
} else {
|
|
112
|
-
await editPlainBubble(sock, jid, key, description, currentSteps, placeholderText);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (!aborted && finalPauseMs > 0) {
|
|
118
|
-
await delay(finalPauseMs);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
} catch (err) {
|
|
122
|
-
// Keep the latest successfully rendered frame if an intermediate edit fails.
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
await sock.sendPresenceUpdate('paused', jid);
|
|
126
|
-
|
|
127
|
-
// Skip the final edit if _skipFinalSend is set (for replayPlanningOnly).
|
|
128
|
-
if (sendOptions._skipFinalSend || !key || aborted) return placeholder;
|
|
129
|
-
|
|
130
|
-
const { _skipFinalSend: _ignored, ...finalSendOptions } = sendOptions;
|
|
131
|
-
return sock.sendMessage(jid, { ...finalContent, edit: key }, finalSendOptions);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* replayPlanningOnly — animation WITHOUT final message.
|
|
136
|
-
*/
|
|
137
|
-
export const replayPlanningOnly = async (sock, jid, steps, options = {}) => {
|
|
138
|
-
return replayPlanning(sock, jid, steps, null, {
|
|
139
|
-
...options,
|
|
140
|
-
sendOptions: { ...options.sendOptions, _skipFinalSend: true }
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* buildReasoningSteps — steps with isReasoning: true.
|
|
146
|
-
*/
|
|
147
|
-
export const buildReasoningSteps = (titles) =>
|
|
148
|
-
titles.map(title => ({ title, isReasoning: true }));
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* buildSearchSteps — steps with isEnhancedSearch: true.
|
|
152
|
-
*/
|
|
153
|
-
export const buildSearchSteps = (titles) =>
|
|
154
|
-
titles.map(title => ({ title, isEnhancedSearch: true }));
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* mixedSteps — mix reasoning + search + plain steps.
|
|
158
|
-
*/
|
|
159
|
-
export const mixedSteps = (defs) =>
|
|
160
|
-
defs.map(({ title, body, type }) => ({
|
|
161
|
-
title,
|
|
162
|
-
...(body ? { body } : {}),
|
|
163
|
-
...(type === 'reasoning' ? { isReasoning: true } : {}),
|
|
164
|
-
...(type === 'search' ? { isEnhancedSearch: true } : {})
|
|
165
|
-
}));
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import { LIBRARY_NAME } from '../Defaults/index.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Media-channel annotation attached to eligible image and video uploads.
|
|
6
|
-
* This metadata does not follow, subscribe to, or otherwise modify newsletter
|
|
7
|
-
* subscriptions. Users who want channel updates must join channels manually.
|
|
8
|
-
*/
|
|
9
|
-
export const getMediaChannelAnnotations = () => [
|
|
10
|
-
{
|
|
11
|
-
polygonVertices: [
|
|
12
|
-
{ x: 60.71664810180664, y: -36.39784622192383 },
|
|
13
|
-
{ x: -16.710189819335938, y: 49.263675689697266 },
|
|
14
|
-
{ x: -56.585853576660156, y: 37.85963439941406 },
|
|
15
|
-
{ x: 20.840980529785156, y: -47.80188751220703 }
|
|
16
|
-
],
|
|
17
|
-
newsletter: {
|
|
18
|
-
newsletterJid: process.env.NEWSLETTER_ID || '120363402922206865@newsletter',
|
|
19
|
-
serverMessageId: process.env.NEWSLETTER_MESSAGE_ID || Buffer.from('313033', 'hex').toString(),
|
|
20
|
-
newsletterName: process.env.NEWSLETTER_NAME || 'crysnovax',
|
|
21
|
-
contentType: proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType.UPDATE,
|
|
22
|
-
accessibilityText: process.env.NEWSLETTER_ACCESSIBILITY_TEXT || LIBRARY_NAME
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
];
|