@neelegirl/baileys 1.5.6 → 1.5.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/README.md +21 -27
- package/WAProto/WAProto.proto +665 -291
- package/WAProto/index.d.ts +48037 -2294
- package/WAProto/index.js +139804 -45203
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +64 -58
- package/lib/Defaults/index.js +96 -74
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/WASignalGroup/GroupProtocol.js +1909 -0
- package/lib/Signal/WASignalGroup/ciphertext_message.js +16 -0
- package/lib/Signal/WASignalGroup/generate-proto.sh +1 -0
- package/lib/Signal/WASignalGroup/group.proto +42 -0
- package/lib/Signal/WASignalGroup/group_cipher.js +120 -0
- package/lib/Signal/WASignalGroup/group_session_builder.js +46 -0
- package/lib/Signal/WASignalGroup/index.js +6 -0
- package/lib/Signal/WASignalGroup/keyhelper.js +21 -0
- package/lib/Signal/WASignalGroup/protobufs.js +3 -0
- package/lib/Signal/WASignalGroup/queue_job.js +69 -0
- package/lib/Signal/WASignalGroup/readme.md +6 -0
- package/lib/Signal/WASignalGroup/sender_chain_key.js +50 -0
- package/lib/Signal/WASignalGroup/sender_key_distribution_message.js +78 -0
- package/lib/Signal/WASignalGroup/sender_key_message.js +92 -0
- package/lib/Signal/WASignalGroup/sender_key_name.js +70 -0
- package/lib/Signal/WASignalGroup/sender_key_record.js +56 -0
- package/lib/Signal/WASignalGroup/sender_key_state.js +129 -0
- package/lib/Signal/{Group/sender-message-key.js → WASignalGroup/sender_message_key.js} +16 -3
- package/lib/Signal/libsignal.d.ts +4 -5
- package/lib/Signal/libsignal.js +112 -292
- package/lib/Socket/Client/abstract-socket-client.d.ts +15 -0
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.d.ts +2 -3
- package/lib/Socket/Client/index.js +22 -3
- package/lib/Socket/Client/mobile-socket-client.d.ts +12 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/types.d.ts +15 -15
- package/lib/Socket/Client/types.js +15 -8
- package/lib/Socket/Client/websocket.d.ts +12 -12
- package/lib/Socket/Client/websocket.js +36 -24
- package/lib/Socket/business.d.ts +177 -178
- package/lib/Socket/business.js +71 -179
- package/lib/Socket/chats.d.ts +93 -93
- package/lib/Socket/chats.js +625 -474
- package/lib/Socket/communities.d.ts +62 -83
- package/lib/Socket/communities.js +414 -412
- package/lib/Socket/groups.d.ts +112 -118
- package/lib/Socket/groups.js +171 -146
- package/lib/Socket/index.d.ts +182 -222
- package/lib/Socket/index.js +17 -12
- package/lib/Socket/messages-recv.d.ts +169 -165
- package/lib/Socket/messages-recv.js +1721 -1185
- package/lib/Socket/messages-send.d.ts +160 -161
- package/lib/Socket/messages-send.js +992 -642
- package/lib/Socket/mex.d.ts +0 -1
- package/lib/Socket/mex.js +9 -4
- package/lib/Socket/newsletter.d.ts +139 -139
- package/lib/Socket/newsletter.js +258 -153
- package/lib/Socket/registration.d.ts +266 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +36 -42
- package/lib/Socket/socket.js +525 -623
- package/lib/Socket/usync.d.ts +37 -0
- package/lib/Socket/usync.js +83 -0
- package/lib/Store/index.d.ts +4 -0
- package/lib/Store/index.js +24 -0
- package/lib/Store/make-cache-manager-store.d.ts +14 -0
- package/lib/Store/make-cache-manager-store.js +90 -0
- package/lib/Store/make-in-memory-store.d.ts +123 -0
- package/lib/Store/make-in-memory-store.js +429 -0
- package/lib/Store/make-ordered-dictionary.d.ts +12 -0
- package/lib/Store/make-ordered-dictionary.js +86 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +31 -0
- package/lib/Types/Auth.d.ts +96 -87
- package/lib/Types/Auth.js +3 -2
- package/lib/Types/Call.d.ts +13 -13
- package/lib/Types/Call.js +3 -2
- package/lib/Types/Chat.d.ts +94 -79
- package/lib/Types/Chat.js +9 -8
- package/lib/Types/Contact.d.ts +9 -13
- package/lib/Types/Contact.js +3 -2
- package/lib/Types/Events.d.ts +179 -152
- package/lib/Types/Events.js +3 -2
- package/lib/Types/GroupMetadata.d.ts +48 -49
- package/lib/Types/GroupMetadata.js +3 -2
- package/lib/Types/Label.d.ts +14 -13
- package/lib/Types/Label.js +30 -24
- package/lib/Types/LabelAssociation.d.ts +20 -15
- package/lib/Types/LabelAssociation.js +12 -6
- package/lib/Types/Message.d.ts +404 -234
- package/lib/Types/Message.js +13 -11
- package/lib/Types/MexUpdates.d.ts +9 -0
- package/lib/Types/MexUpdates.js +18 -0
- package/lib/Types/Newsletter.d.ts +104 -130
- package/lib/Types/Newsletter.js +40 -31
- package/lib/Types/Product.d.ts +71 -58
- package/lib/Types/Product.js +3 -2
- package/lib/Types/Signal.d.ts +55 -63
- package/lib/Types/Signal.js +3 -2
- package/lib/Types/Socket.d.ts +66 -77
- package/lib/Types/Socket.js +3 -3
- package/lib/Types/State.d.ts +19 -17
- package/lib/Types/State.js +14 -13
- package/lib/Types/USync.d.ts +8 -8
- package/lib/Types/USync.js +3 -2
- package/lib/Types/index.d.ts +61 -47
- package/lib/Types/index.js +48 -26
- package/lib/Utils/auth-utils.d.ts +10 -8
- package/lib/Utils/auth-utils.js +154 -206
- package/lib/Utils/baileys-event-stream.d.ts +7 -6
- package/lib/Utils/baileys-event-stream.js +43 -29
- package/lib/Utils/business.d.ts +20 -14
- package/lib/Utils/business.js +134 -110
- package/lib/Utils/chat-utils.d.ts +69 -57
- package/lib/Utils/chat-utils.js +380 -362
- package/lib/Utils/check-npm-version.d.ts +15 -0
- package/lib/Utils/check-npm-version.js +52 -0
- package/lib/Utils/crypto.d.ts +45 -30
- package/lib/Utils/crypto.js +178 -141
- package/lib/Utils/decode-wa-message.d.ts +35 -42
- package/lib/Utils/decode-wa-message.js +150 -176
- package/lib/Utils/event-buffer.d.ts +17 -12
- package/lib/Utils/event-buffer.js +286 -269
- package/lib/Utils/generics.d.ts +99 -60
- package/lib/Utils/generics.js +481 -244
- package/lib/Utils/history.d.ts +22 -18
- package/lib/Utils/history.js +80 -54
- package/lib/Utils/index.d.ts +19 -20
- package/lib/Utils/index.js +41 -19
- package/lib/Utils/link-preview.d.ts +14 -12
- package/lib/Utils/link-preview.js +75 -40
- package/lib/Utils/logger.d.ts +11 -10
- package/lib/Utils/logger.js +7 -3
- package/lib/Utils/lt-hash.d.ts +13 -12
- package/lib/Utils/lt-hash.js +37 -27
- package/lib/Utils/make-mutex.d.ts +7 -6
- package/lib/Utils/make-mutex.js +29 -20
- package/lib/Utils/message-retry-manager.d.ts +6 -6
- package/lib/Utils/message-retry-manager.js +36 -8
- package/lib/Utils/messages-media.d.ts +102 -87
- package/lib/Utils/messages-media.js +570 -427
- package/lib/Utils/messages.d.ts +64 -37
- package/lib/Utils/messages.js +1270 -511
- package/lib/Utils/noise-handler.d.ts +18 -18
- package/lib/Utils/noise-handler.js +109 -101
- package/lib/Utils/process-message.d.ts +32 -25
- package/lib/Utils/process-message.js +281 -266
- package/lib/Utils/signal.d.ts +32 -24
- package/lib/Utils/signal.js +105 -98
- package/lib/Utils/use-mongo-file-auth-state.d.ts +6 -0
- package/lib/Utils/use-mongo-file-auth-state.js +84 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +10 -5
- package/lib/Utils/use-multi-file-auth-state.js +186 -69
- package/lib/Utils/use-single-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-single-file-auth-state.js +80 -0
- package/lib/Utils/validate-connection.d.ts +13 -11
- package/lib/Utils/validate-connection.js +116 -124
- package/lib/WABinary/constants.d.ts +27 -25
- package/lib/WABinary/constants.js +1292 -1277
- package/lib/WABinary/decode.d.ts +9 -7
- package/lib/WABinary/decode.js +189 -139
- package/lib/WABinary/encode.d.ts +3 -3
- package/lib/WABinary/encode.js +154 -105
- package/lib/WABinary/generic-utils.d.ts +27 -14
- package/lib/WABinary/generic-utils.js +102 -62
- package/lib/WABinary/index.d.ts +5 -6
- package/lib/WABinary/index.js +25 -6
- package/lib/WABinary/jid-utils.d.ts +46 -41
- package/lib/WABinary/jid-utils.js +80 -84
- package/lib/WABinary/types.d.ts +13 -10
- package/lib/WABinary/types.js +3 -2
- package/lib/WAM/BinaryInfo.d.ts +15 -8
- package/lib/WAM/BinaryInfo.js +14 -7
- package/lib/WAM/constants.d.ts +37 -30
- package/lib/WAM/constants.js +11983 -19465
- package/lib/WAM/encode.d.ts +3 -3
- package/lib/WAM/encode.js +110 -95
- package/lib/WAM/index.d.ts +3 -4
- package/lib/WAM/index.js +23 -4
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +28 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +69 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -9
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +19 -12
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -19
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +26 -18
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -11
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +20 -12
- package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -11
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +24 -16
- package/lib/WAUSync/Protocols/index.d.ts +6 -5
- package/lib/WAUSync/Protocols/index.js +26 -5
- package/lib/WAUSync/USyncQuery.d.ts +28 -26
- package/lib/WAUSync/USyncQuery.js +62 -64
- package/lib/WAUSync/USyncUser.d.ts +10 -11
- package/lib/WAUSync/USyncUser.js +19 -12
- package/lib/WAUSync/index.d.ts +3 -4
- package/lib/WAUSync/index.js +23 -4
- package/lib/index.d.ts +11 -10
- package/lib/index.js +33 -11
- package/package.json +43 -48
- package/WAProto/GenerateStatics.sh +0 -3
- package/WAProto/fix-imports.js +0 -29
- package/engine-requirements.js +0 -10
- package/lib/Defaults/index.d.ts.map +0 -1
- package/lib/Defaults/index.js.map +0 -1
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -10
- package/lib/Signal/Group/ciphertext-message.d.ts.map +0 -1
- package/lib/Signal/Group/ciphertext-message.js +0 -12
- package/lib/Signal/Group/ciphertext-message.js.map +0 -1
- package/lib/Signal/Group/group-session-builder.d.ts +0 -15
- package/lib/Signal/Group/group-session-builder.d.ts.map +0 -1
- package/lib/Signal/Group/group-session-builder.js +0 -30
- package/lib/Signal/Group/group-session-builder.js.map +0 -1
- package/lib/Signal/Group/group_cipher.d.ts +0 -17
- package/lib/Signal/Group/group_cipher.d.ts.map +0 -1
- package/lib/Signal/Group/group_cipher.js +0 -82
- package/lib/Signal/Group/group_cipher.js.map +0 -1
- package/lib/Signal/Group/index.d.ts +0 -12
- package/lib/Signal/Group/index.d.ts.map +0 -1
- package/lib/Signal/Group/index.js +0 -12
- package/lib/Signal/Group/index.js.map +0 -1
- package/lib/Signal/Group/keyhelper.d.ts +0 -11
- package/lib/Signal/Group/keyhelper.d.ts.map +0 -1
- package/lib/Signal/Group/keyhelper.js +0 -18
- package/lib/Signal/Group/keyhelper.js.map +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
- package/lib/Signal/Group/sender-chain-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-chain-key.js +0 -26
- package/lib/Signal/Group/sender-chain-key.js.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
- package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.js +0 -63
- package/lib/Signal/Group/sender-key-distribution-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-message.d.ts +0 -19
- package/lib/Signal/Group/sender-key-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-message.js +0 -66
- package/lib/Signal/Group/sender-key-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-name.d.ts +0 -18
- package/lib/Signal/Group/sender-key-name.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-name.js +0 -48
- package/lib/Signal/Group/sender-key-name.js.map +0 -1
- package/lib/Signal/Group/sender-key-record.d.ts +0 -31
- package/lib/Signal/Group/sender-key-record.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-record.js +0 -41
- package/lib/Signal/Group/sender-key-record.js.map +0 -1
- package/lib/Signal/Group/sender-key-state.d.ts +0 -39
- package/lib/Signal/Group/sender-key-state.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-state.js +0 -84
- package/lib/Signal/Group/sender-key-state.js.map +0 -1
- package/lib/Signal/Group/sender-message-key.d.ts +0 -12
- package/lib/Signal/Group/sender-message-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-message-key.js.map +0 -1
- package/lib/Signal/libsignal.d.ts.map +0 -1
- package/lib/Signal/libsignal.js.map +0 -1
- package/lib/Signal/lid-mapping.d.ts +0 -23
- package/lib/Signal/lid-mapping.d.ts.map +0 -1
- package/lib/Signal/lid-mapping.js +0 -171
- package/lib/Signal/lid-mapping.js.map +0 -1
- package/lib/Socket/Client/index.d.ts.map +0 -1
- package/lib/Socket/Client/index.js.map +0 -1
- package/lib/Socket/Client/types.d.ts.map +0 -1
- package/lib/Socket/Client/types.js.map +0 -1
- package/lib/Socket/Client/websocket.d.ts.map +0 -1
- package/lib/Socket/Client/websocket.js.map +0 -1
- package/lib/Socket/business.d.ts.map +0 -1
- package/lib/Socket/business.js.map +0 -1
- package/lib/Socket/chats.d.ts.map +0 -1
- package/lib/Socket/chats.js.map +0 -1
- package/lib/Socket/communities.d.ts.map +0 -1
- package/lib/Socket/communities.js.map +0 -1
- package/lib/Socket/groups.d.ts.map +0 -1
- package/lib/Socket/groups.js.map +0 -1
- package/lib/Socket/index.d.ts.map +0 -1
- package/lib/Socket/index.js.map +0 -1
- package/lib/Socket/messages-recv.d.ts.map +0 -1
- package/lib/Socket/messages-recv.js.map +0 -1
- package/lib/Socket/messages-send.d.ts.map +0 -1
- package/lib/Socket/messages-send.js.map +0 -1
- package/lib/Socket/mex.d.ts.map +0 -1
- package/lib/Socket/mex.js.map +0 -1
- package/lib/Socket/newsletter.d.ts.map +0 -1
- package/lib/Socket/newsletter.js.map +0 -1
- package/lib/Socket/socket.d.ts.map +0 -1
- package/lib/Socket/socket.js.map +0 -1
- package/lib/Types/Auth.d.ts.map +0 -1
- package/lib/Types/Auth.js.map +0 -1
- package/lib/Types/Bussines.d.ts +0 -25
- package/lib/Types/Bussines.d.ts.map +0 -1
- package/lib/Types/Bussines.js +0 -2
- package/lib/Types/Bussines.js.map +0 -1
- package/lib/Types/Call.d.ts.map +0 -1
- package/lib/Types/Call.js.map +0 -1
- package/lib/Types/Chat.d.ts.map +0 -1
- package/lib/Types/Chat.js.map +0 -1
- package/lib/Types/Contact.d.ts.map +0 -1
- package/lib/Types/Contact.js.map +0 -1
- package/lib/Types/Events.d.ts.map +0 -1
- package/lib/Types/Events.js.map +0 -1
- package/lib/Types/GroupMetadata.d.ts.map +0 -1
- package/lib/Types/GroupMetadata.js.map +0 -1
- package/lib/Types/Label.d.ts.map +0 -1
- package/lib/Types/Label.js.map +0 -1
- package/lib/Types/LabelAssociation.d.ts.map +0 -1
- package/lib/Types/LabelAssociation.js.map +0 -1
- package/lib/Types/Message.d.ts.map +0 -1
- package/lib/Types/Message.js.map +0 -1
- package/lib/Types/Newsletter.d.ts.map +0 -1
- package/lib/Types/Newsletter.js.map +0 -1
- package/lib/Types/Product.d.ts.map +0 -1
- package/lib/Types/Product.js.map +0 -1
- package/lib/Types/Signal.d.ts.map +0 -1
- package/lib/Types/Signal.js.map +0 -1
- package/lib/Types/Socket.d.ts.map +0 -1
- package/lib/Types/Socket.js.map +0 -1
- package/lib/Types/State.d.ts.map +0 -1
- package/lib/Types/State.js.map +0 -1
- package/lib/Types/USync.d.ts.map +0 -1
- package/lib/Types/USync.js.map +0 -1
- package/lib/Types/index.d.ts.map +0 -1
- package/lib/Types/index.js.map +0 -1
- package/lib/Utils/auth-utils.d.ts.map +0 -1
- package/lib/Utils/auth-utils.js.map +0 -1
- package/lib/Utils/baileys-event-stream.d.ts.map +0 -1
- package/lib/Utils/baileys-event-stream.js.map +0 -1
- package/lib/Utils/browser-utils.d.ts +0 -4
- package/lib/Utils/browser-utils.d.ts.map +0 -1
- package/lib/Utils/browser-utils.js +0 -28
- package/lib/Utils/browser-utils.js.map +0 -1
- package/lib/Utils/business.d.ts.map +0 -1
- package/lib/Utils/business.js.map +0 -1
- package/lib/Utils/chat-utils.d.ts.map +0 -1
- package/lib/Utils/chat-utils.js.map +0 -1
- package/lib/Utils/crypto.d.ts.map +0 -1
- package/lib/Utils/crypto.js.map +0 -1
- package/lib/Utils/decode-wa-message.d.ts.map +0 -1
- package/lib/Utils/decode-wa-message.js.map +0 -1
- package/lib/Utils/event-buffer.d.ts.map +0 -1
- package/lib/Utils/event-buffer.js.map +0 -1
- package/lib/Utils/generics.d.ts.map +0 -1
- package/lib/Utils/generics.js.map +0 -1
- package/lib/Utils/history.d.ts.map +0 -1
- package/lib/Utils/history.js.map +0 -1
- package/lib/Utils/index.d.ts.map +0 -1
- package/lib/Utils/index.js.map +0 -1
- package/lib/Utils/link-preview.d.ts.map +0 -1
- package/lib/Utils/link-preview.js.map +0 -1
- package/lib/Utils/logger.d.ts.map +0 -1
- package/lib/Utils/logger.js.map +0 -1
- package/lib/Utils/lt-hash.d.ts.map +0 -1
- package/lib/Utils/lt-hash.js.map +0 -1
- package/lib/Utils/make-mutex.d.ts.map +0 -1
- package/lib/Utils/make-mutex.js.map +0 -1
- package/lib/Utils/message-retry-manager.d.ts.map +0 -1
- package/lib/Utils/message-retry-manager.js.map +0 -1
- package/lib/Utils/messages-media.d.ts.map +0 -1
- package/lib/Utils/messages-media.js.map +0 -1
- package/lib/Utils/messages.d.ts.map +0 -1
- package/lib/Utils/messages.js.map +0 -1
- package/lib/Utils/noise-handler.d.ts.map +0 -1
- package/lib/Utils/noise-handler.js.map +0 -1
- package/lib/Utils/pre-key-manager.d.ts +0 -28
- package/lib/Utils/pre-key-manager.d.ts.map +0 -1
- package/lib/Utils/pre-key-manager.js +0 -106
- package/lib/Utils/pre-key-manager.js.map +0 -1
- package/lib/Utils/process-message.d.ts.map +0 -1
- package/lib/Utils/process-message.js.map +0 -1
- package/lib/Utils/signal.d.ts.map +0 -1
- package/lib/Utils/signal.js.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.js.map +0 -1
- package/lib/Utils/validate-connection.d.ts.map +0 -1
- package/lib/Utils/validate-connection.js.map +0 -1
- package/lib/WABinary/constants.d.ts.map +0 -1
- package/lib/WABinary/constants.js.map +0 -1
- package/lib/WABinary/decode.d.ts.map +0 -1
- package/lib/WABinary/decode.js.map +0 -1
- package/lib/WABinary/encode.d.ts.map +0 -1
- package/lib/WABinary/encode.js.map +0 -1
- package/lib/WABinary/generic-utils.d.ts.map +0 -1
- package/lib/WABinary/generic-utils.js.map +0 -1
- package/lib/WABinary/index.d.ts.map +0 -1
- package/lib/WABinary/index.js.map +0 -1
- package/lib/WABinary/jid-utils.d.ts.map +0 -1
- package/lib/WABinary/jid-utils.js.map +0 -1
- package/lib/WABinary/types.d.ts.map +0 -1
- package/lib/WABinary/types.js.map +0 -1
- package/lib/WAM/BinaryInfo.d.ts.map +0 -1
- package/lib/WAM/BinaryInfo.js.map +0 -1
- package/lib/WAM/constants.d.ts.map +0 -1
- package/lib/WAM/constants.js.map +0 -1
- package/lib/WAM/encode.d.ts.map +0 -1
- package/lib/WAM/encode.js.map +0 -1
- package/lib/WAM/index.d.ts.map +0 -1
- package/lib/WAM/index.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -26
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +0 -51
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +0 -29
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/index.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/index.js.map +0 -1
- package/lib/WAUSync/USyncQuery.d.ts.map +0 -1
- package/lib/WAUSync/USyncQuery.js.map +0 -1
- package/lib/WAUSync/USyncUser.d.ts.map +0 -1
- package/lib/WAUSync/USyncUser.js.map +0 -1
- package/lib/WAUSync/index.d.ts.map +0 -1
- package/lib/WAUSync/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
package/lib/Types/Events.d.ts
CHANGED
|
@@ -1,202 +1,229 @@
|
|
|
1
|
-
import type { Boom } from '@hapi/boom'
|
|
2
|
-
import { proto } from '../../WAProto
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import type { Boom } from '@hapi/boom'
|
|
2
|
+
import { proto } from '../../WAProto'
|
|
3
|
+
import { AuthenticationCreds } from './Auth'
|
|
4
|
+
import { WACallEvent } from './Call'
|
|
5
|
+
import { Chat, ChatUpdate, PresenceData } from './Chat'
|
|
6
|
+
import { Contact } from './Contact'
|
|
7
|
+
import { GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod } from './GroupMetadata'
|
|
8
|
+
import { Label } from './Label'
|
|
9
|
+
import { LabelAssociation } from './LabelAssociation'
|
|
10
|
+
import { MessageUpsertType, MessageUserReceiptUpdate, WAMessage, WAMessageKey, WAMessageUpdate } from './Message'
|
|
11
|
+
import { NewsletterViewRole, SubscriberAction, NewsletterSettingsUpdate } from './Newsletter'
|
|
12
|
+
import { ConnectionState } from './State'
|
|
13
|
+
|
|
12
14
|
export type BaileysEventMap = {
|
|
13
15
|
/** connection state has been updated -- WS closed, opened, connecting etc. */
|
|
14
|
-
'connection.update': Partial<ConnectionState
|
|
16
|
+
'connection.update': Partial<ConnectionState>
|
|
15
17
|
/** credentials updated -- some metadata, keys or something */
|
|
16
|
-
'creds.update': Partial<AuthenticationCreds
|
|
18
|
+
'creds.update': Partial<AuthenticationCreds>
|
|
17
19
|
/** set chats (history sync), everything is reverse chronologically sorted */
|
|
18
20
|
'messaging-history.set': {
|
|
19
|
-
chats: Chat[]
|
|
20
|
-
contacts: Contact[]
|
|
21
|
-
messages: WAMessage[]
|
|
22
|
-
isLatest?: boolean
|
|
23
|
-
progress?: number | null
|
|
24
|
-
syncType?: proto.HistorySync.HistorySyncType
|
|
25
|
-
peerDataRequestSessionId?: string | null
|
|
26
|
-
}
|
|
21
|
+
chats: Chat[]
|
|
22
|
+
contacts: Contact[]
|
|
23
|
+
messages: WAMessage[]
|
|
24
|
+
isLatest?: boolean
|
|
25
|
+
progress?: number | null
|
|
26
|
+
syncType?: proto.HistorySync.HistorySyncType
|
|
27
|
+
peerDataRequestSessionId?: string | null
|
|
28
|
+
}
|
|
27
29
|
/** upsert chats */
|
|
28
|
-
'chats.upsert': Chat[]
|
|
30
|
+
'chats.upsert': Chat[]
|
|
29
31
|
/** update the given chats */
|
|
30
|
-
'chats.update': ChatUpdate[]
|
|
31
|
-
'
|
|
32
|
-
lid: string
|
|
33
|
-
|
|
34
|
-
}
|
|
32
|
+
'chats.update': ChatUpdate[]
|
|
33
|
+
'chats.phoneNumberShare': {
|
|
34
|
+
lid: string
|
|
35
|
+
jid: string
|
|
36
|
+
}
|
|
35
37
|
/** delete chats with given ID */
|
|
36
|
-
'chats.delete': string[]
|
|
38
|
+
'chats.delete': string[]
|
|
37
39
|
/** presence of contact in a chat updated */
|
|
38
40
|
'presence.update': {
|
|
39
|
-
id: string
|
|
41
|
+
id: string
|
|
40
42
|
presences: {
|
|
41
|
-
[participant: string]: PresenceData
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
'contacts.upsert': Contact[]
|
|
45
|
-
'contacts.update': Partial<Contact>[]
|
|
43
|
+
[participant: string]: PresenceData
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
'contacts.upsert': Contact[]
|
|
47
|
+
'contacts.update': Partial<Contact>[]
|
|
46
48
|
'messages.delete': {
|
|
47
|
-
keys: WAMessageKey[]
|
|
49
|
+
keys: WAMessageKey[]
|
|
48
50
|
} | {
|
|
49
|
-
jid: string
|
|
50
|
-
all: true
|
|
51
|
-
}
|
|
52
|
-
'messages.update': WAMessageUpdate[]
|
|
51
|
+
jid: string
|
|
52
|
+
all: true
|
|
53
|
+
}
|
|
54
|
+
'messages.update': WAMessageUpdate[]
|
|
53
55
|
'messages.media-update': {
|
|
54
|
-
key: WAMessageKey
|
|
56
|
+
key: WAMessageKey
|
|
55
57
|
media?: {
|
|
56
|
-
ciphertext: Uint8Array
|
|
57
|
-
iv: Uint8Array
|
|
58
|
-
}
|
|
59
|
-
error?: Boom
|
|
60
|
-
}[]
|
|
58
|
+
ciphertext: Uint8Array
|
|
59
|
+
iv: Uint8Array
|
|
60
|
+
}
|
|
61
|
+
error?: Boom
|
|
62
|
+
}[]
|
|
61
63
|
/**
|
|
62
64
|
* add/update the given messages. If they were received while the connection was online,
|
|
63
65
|
* the update will have type: "notify"
|
|
64
66
|
* if requestId is provided, then the messages was received from the phone due to it being unavailable
|
|
65
67
|
* */
|
|
66
68
|
'messages.upsert': {
|
|
67
|
-
messages: WAMessage[]
|
|
68
|
-
type: MessageUpsertType
|
|
69
|
-
requestId?: string
|
|
70
|
-
}
|
|
69
|
+
messages: WAMessage[]
|
|
70
|
+
type: MessageUpsertType
|
|
71
|
+
requestId?: string
|
|
72
|
+
}
|
|
73
|
+
// 'messages.poll': {
|
|
74
|
+
// key: WAMessageKey
|
|
75
|
+
// pollUpdates: proto.IPollUpdateMessage
|
|
76
|
+
// }[]
|
|
71
77
|
/** message was reacted to. If reaction was removed -- then "reaction.text" will be falsey */
|
|
72
78
|
'messages.reaction': {
|
|
73
|
-
key: WAMessageKey
|
|
74
|
-
reaction: proto.IReaction
|
|
75
|
-
}[]
|
|
76
|
-
'message-receipt.update': MessageUserReceiptUpdate[]
|
|
77
|
-
'groups.upsert': GroupMetadata[]
|
|
78
|
-
'groups.update': Partial<GroupMetadata>[]
|
|
79
|
+
key: WAMessageKey
|
|
80
|
+
reaction: proto.IReaction
|
|
81
|
+
}[]
|
|
82
|
+
'message-receipt.update': MessageUserReceiptUpdate[]
|
|
83
|
+
'groups.upsert': GroupMetadata[]
|
|
84
|
+
'groups.update': Partial<GroupMetadata>[]
|
|
79
85
|
/** apply an action to participants in a group */
|
|
80
86
|
'group-participants.update': {
|
|
81
|
-
id: string
|
|
82
|
-
author: string
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
87
|
+
id: string
|
|
88
|
+
author: string
|
|
89
|
+
participants: string[]
|
|
90
|
+
action: ParticipantAction
|
|
91
|
+
}
|
|
87
92
|
'group.join-request': {
|
|
88
|
-
id: string
|
|
89
|
-
author: string
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
method: RequestJoinMethod;
|
|
95
|
-
};
|
|
96
|
-
'blocklist.set': {
|
|
97
|
-
blocklist: string[];
|
|
98
|
-
};
|
|
99
|
-
'blocklist.update': {
|
|
100
|
-
blocklist: string[];
|
|
101
|
-
type: 'add' | 'remove';
|
|
102
|
-
};
|
|
103
|
-
/** Receive an update on a call, including when the call was received, rejected, accepted */
|
|
104
|
-
call: WACallEvent[];
|
|
105
|
-
'labels.edit': Label;
|
|
106
|
-
'labels.association': {
|
|
107
|
-
association: LabelAssociation;
|
|
108
|
-
type: 'add' | 'remove';
|
|
109
|
-
};
|
|
110
|
-
/** Newsletter-related events */
|
|
93
|
+
id: string
|
|
94
|
+
author: string
|
|
95
|
+
participant: string
|
|
96
|
+
action: RequestJoinAction
|
|
97
|
+
method: RequestJoinMethod
|
|
98
|
+
}
|
|
111
99
|
'newsletter.reaction': {
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
id: string
|
|
101
|
+
newsletter_server_id: string
|
|
114
102
|
reaction: {
|
|
115
|
-
|
|
116
|
-
count?: number
|
|
117
|
-
removed?: boolean
|
|
118
|
-
}
|
|
119
|
-
}
|
|
103
|
+
code?: string
|
|
104
|
+
count?: number
|
|
105
|
+
removed?: boolean
|
|
106
|
+
}
|
|
107
|
+
}
|
|
120
108
|
'newsletter.view': {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
count: number
|
|
124
|
-
}
|
|
109
|
+
id: string
|
|
110
|
+
newsletter_server_id: string
|
|
111
|
+
count: number
|
|
112
|
+
}
|
|
125
113
|
'newsletter-participants.update': {
|
|
126
|
-
|
|
127
|
-
author: string
|
|
128
|
-
user: string
|
|
129
|
-
new_role:
|
|
130
|
-
action:
|
|
131
|
-
}
|
|
114
|
+
id: string
|
|
115
|
+
author: string
|
|
116
|
+
user: string
|
|
117
|
+
new_role: NewsletterViewRole
|
|
118
|
+
action: SubscriberAction
|
|
119
|
+
}
|
|
132
120
|
'newsletter-settings.update': {
|
|
133
|
-
|
|
134
|
-
update:
|
|
135
|
-
}
|
|
136
|
-
|
|
121
|
+
id: string
|
|
122
|
+
update: NewsletterSettingsUpdate
|
|
123
|
+
}
|
|
124
|
+
'limit-sharing.update': {
|
|
125
|
+
id: string
|
|
126
|
+
author: string
|
|
127
|
+
action: 'on' | 'off'
|
|
128
|
+
trigger: proto.LimitSharing.TriggerType
|
|
129
|
+
update_time: number
|
|
130
|
+
}
|
|
131
|
+
'community-owner.update': {
|
|
132
|
+
id: string
|
|
133
|
+
author: string
|
|
134
|
+
user: string
|
|
135
|
+
new_role: 'SUPERADMIN_MEMBER'
|
|
136
|
+
update_time: number
|
|
137
|
+
}
|
|
138
|
+
'blocklist.set': {
|
|
139
|
+
blocklist: string[]
|
|
140
|
+
}
|
|
141
|
+
'blocklist.update': {
|
|
142
|
+
blocklist: string[]
|
|
143
|
+
type: 'add' | 'remove'
|
|
144
|
+
}
|
|
145
|
+
/** Receive an update on a call, including when the call was received, rejected, accepted */
|
|
146
|
+
'call': WACallEvent[]
|
|
147
|
+
'labels.edit': Label
|
|
148
|
+
'labels.association': {
|
|
149
|
+
association: LabelAssociation
|
|
150
|
+
type: 'add' | 'remove'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
137
154
|
export type BufferedEventData = {
|
|
138
155
|
historySets: {
|
|
139
156
|
chats: {
|
|
140
|
-
[jid: string]: Chat
|
|
141
|
-
}
|
|
157
|
+
[jid: string]: Chat
|
|
158
|
+
}
|
|
142
159
|
contacts: {
|
|
143
|
-
[jid: string]: Contact
|
|
144
|
-
}
|
|
160
|
+
[jid: string]: Contact
|
|
161
|
+
}
|
|
145
162
|
messages: {
|
|
146
|
-
[uqId: string]: WAMessage
|
|
147
|
-
}
|
|
148
|
-
empty: boolean
|
|
149
|
-
isLatest: boolean
|
|
150
|
-
progress?: number | null
|
|
151
|
-
syncType?: proto.HistorySync.HistorySyncType
|
|
152
|
-
peerDataRequestSessionId?: string
|
|
153
|
-
}
|
|
163
|
+
[uqId: string]: WAMessage
|
|
164
|
+
}
|
|
165
|
+
empty: boolean
|
|
166
|
+
isLatest: boolean
|
|
167
|
+
progress?: number | null
|
|
168
|
+
syncType?: proto.HistorySync.HistorySyncType
|
|
169
|
+
peerDataRequestSessionId?: string
|
|
170
|
+
}
|
|
154
171
|
chatUpserts: {
|
|
155
|
-
[jid: string]: Chat
|
|
156
|
-
}
|
|
172
|
+
[jid: string]: Chat
|
|
173
|
+
}
|
|
157
174
|
chatUpdates: {
|
|
158
|
-
[jid: string]: ChatUpdate
|
|
159
|
-
}
|
|
160
|
-
chatDeletes: Set<string
|
|
175
|
+
[jid: string]: ChatUpdate
|
|
176
|
+
}
|
|
177
|
+
chatDeletes: Set<string>
|
|
161
178
|
contactUpserts: {
|
|
162
|
-
[jid: string]: Contact
|
|
163
|
-
}
|
|
179
|
+
[jid: string]: Contact
|
|
180
|
+
}
|
|
164
181
|
contactUpdates: {
|
|
165
|
-
[jid: string]: Partial<Contact
|
|
166
|
-
}
|
|
182
|
+
[jid: string]: Partial<Contact>
|
|
183
|
+
}
|
|
167
184
|
messageUpserts: {
|
|
168
185
|
[key: string]: {
|
|
169
|
-
type: MessageUpsertType
|
|
170
|
-
message: WAMessage
|
|
171
|
-
}
|
|
172
|
-
}
|
|
186
|
+
type: MessageUpsertType
|
|
187
|
+
message: WAMessage
|
|
188
|
+
}
|
|
189
|
+
}
|
|
173
190
|
messageUpdates: {
|
|
174
|
-
[key: string]: WAMessageUpdate
|
|
175
|
-
}
|
|
191
|
+
[key: string]: WAMessageUpdate
|
|
192
|
+
}
|
|
176
193
|
messageDeletes: {
|
|
177
|
-
[key: string]: WAMessageKey
|
|
178
|
-
}
|
|
194
|
+
[key: string]: WAMessageKey
|
|
195
|
+
}
|
|
196
|
+
// messagePollings: {
|
|
197
|
+
// [key: string]: {
|
|
198
|
+
// key: WAMessageKey
|
|
199
|
+
// pollUpdates: proto.IPollUpdateMessage[]
|
|
200
|
+
// }
|
|
201
|
+
// }
|
|
179
202
|
messageReactions: {
|
|
180
203
|
[key: string]: {
|
|
181
|
-
key: WAMessageKey
|
|
182
|
-
reactions: proto.IReaction[]
|
|
183
|
-
}
|
|
184
|
-
}
|
|
204
|
+
key: WAMessageKey
|
|
205
|
+
reactions: proto.IReaction[]
|
|
206
|
+
}
|
|
207
|
+
}
|
|
185
208
|
messageReceipts: {
|
|
186
209
|
[key: string]: {
|
|
187
|
-
key: WAMessageKey
|
|
188
|
-
userReceipt: proto.IUserReceipt[]
|
|
189
|
-
}
|
|
190
|
-
}
|
|
210
|
+
key: WAMessageKey
|
|
211
|
+
userReceipt: proto.IUserReceipt[]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
191
214
|
groupUpdates: {
|
|
192
|
-
[jid: string]: Partial<GroupMetadata
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
on<T extends keyof BaileysEventMap>(event: T, listener: (arg: BaileysEventMap[T]) => void): void;
|
|
198
|
-
off<T extends keyof BaileysEventMap>(event: T, listener: (arg: BaileysEventMap[T]) => void): void;
|
|
199
|
-
removeAllListeners<T extends keyof BaileysEventMap>(event: T): void;
|
|
200
|
-
emit<T extends keyof BaileysEventMap>(event: T, arg: BaileysEventMap[T]): boolean;
|
|
215
|
+
[jid: string]: Partial<GroupMetadata>
|
|
216
|
+
}
|
|
217
|
+
communityUpdates: {
|
|
218
|
+
[jid: string]: Partial<GroupMetadata>
|
|
219
|
+
}
|
|
201
220
|
}
|
|
202
|
-
|
|
221
|
+
|
|
222
|
+
export type BaileysEvent = keyof BaileysEventMap
|
|
223
|
+
|
|
224
|
+
export interface BaileysEventEmitter {
|
|
225
|
+
on<T extends keyof BaileysEventMap>(event: T, listener: (arg: BaileysEventMap[T]) => void): void
|
|
226
|
+
off<T extends keyof BaileysEventMap>(event: T, listener: (arg: BaileysEventMap[T]) => void): void
|
|
227
|
+
removeAllListeners<T extends keyof BaileysEventMap>(event: T): void
|
|
228
|
+
emit<T extends keyof BaileysEventMap>(event: T, arg: BaileysEventMap[T]): boolean
|
|
229
|
+
}
|
package/lib/Types/Events.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict"
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true })
|
|
@@ -1,67 +1,66 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export type GroupParticipant = Contact & {
|
|
4
|
-
isAdmin?: boolean
|
|
5
|
-
isSuperAdmin?: boolean
|
|
6
|
-
admin?: 'admin' | 'superadmin' | null
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type
|
|
10
|
-
|
|
1
|
+
import { Contact } from './Contact'
|
|
2
|
+
|
|
3
|
+
export type GroupParticipant = (Contact & {
|
|
4
|
+
isAdmin?: boolean
|
|
5
|
+
isSuperAdmin?: boolean
|
|
6
|
+
admin?: 'admin' | 'superadmin' | null
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export type ParticipantAction = 'add' | 'remove' | 'promote' | 'demote' | 'modify'
|
|
10
|
+
|
|
11
|
+
export type RequestJoinAction = 'created' | 'revoked' | 'rejected'
|
|
12
|
+
|
|
13
|
+
export type RequestJoinMethod = 'invite_link' | 'linked_group_join' | 'non_admin_add' | undefined
|
|
14
|
+
|
|
11
15
|
export interface GroupMetadata {
|
|
12
|
-
id: string
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ownerPn?: string | undefined;
|
|
18
|
-
owner_country_code?: string | undefined;
|
|
19
|
-
subject: string;
|
|
16
|
+
id: string
|
|
17
|
+
addressingMode: string
|
|
18
|
+
owner: string | undefined
|
|
19
|
+
ownerCountry: string,
|
|
20
|
+
subject: string
|
|
20
21
|
/** group subject owner */
|
|
21
|
-
subjectOwner?: string
|
|
22
|
-
subjectOwnerPn?: string;
|
|
22
|
+
subjectOwner?: string
|
|
23
23
|
/** group subject modification date */
|
|
24
|
-
subjectTime?: number
|
|
25
|
-
creation?: number
|
|
26
|
-
desc?: string
|
|
27
|
-
descOwner?: string
|
|
28
|
-
|
|
29
|
-
descId?: string;
|
|
30
|
-
descTime?: number;
|
|
24
|
+
subjectTime?: number
|
|
25
|
+
creation?: number
|
|
26
|
+
desc?: string
|
|
27
|
+
descOwner?: string
|
|
28
|
+
descId?: string
|
|
31
29
|
/** if this group is part of a community, it returns the jid of the community to which it belongs */
|
|
32
|
-
linkedParent?: string
|
|
30
|
+
linkedParent?: string
|
|
33
31
|
/** is set when the group only allows admins to change group settings */
|
|
34
|
-
restrict?: boolean
|
|
32
|
+
restrict?: boolean
|
|
35
33
|
/** is set when the group only allows admins to write messages */
|
|
36
|
-
announce?: boolean
|
|
34
|
+
announce?: boolean
|
|
37
35
|
/** is set when the group also allows members to add participants */
|
|
38
|
-
memberAddMode?: boolean
|
|
36
|
+
memberAddMode?: boolean
|
|
39
37
|
/** Request approval to join the group */
|
|
40
|
-
joinApprovalMode?: boolean
|
|
38
|
+
joinApprovalMode?: boolean
|
|
41
39
|
/** is this a community */
|
|
42
|
-
isCommunity?: boolean
|
|
40
|
+
isCommunity?: boolean
|
|
43
41
|
/** is this the announce of a community */
|
|
44
|
-
isCommunityAnnounce?: boolean
|
|
42
|
+
isCommunityAnnounce?: boolean
|
|
45
43
|
/** number of group participants */
|
|
46
|
-
size?: number
|
|
47
|
-
participants: GroupParticipant[]
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
size?: number
|
|
45
|
+
participants: GroupParticipant[]
|
|
46
|
+
picture?: string
|
|
47
|
+
ephemeralDuration?: number
|
|
48
|
+
inviteCode?: string
|
|
50
49
|
/** the person who added you to group or changed some setting in group */
|
|
51
|
-
author?: string
|
|
52
|
-
authorPn?: string;
|
|
50
|
+
author?: string
|
|
53
51
|
}
|
|
52
|
+
|
|
54
53
|
export interface WAGroupCreateResponse {
|
|
55
|
-
status: number
|
|
56
|
-
gid?: string
|
|
54
|
+
status: number
|
|
55
|
+
gid?: string
|
|
57
56
|
participants?: [{
|
|
58
|
-
[key: string]: {}
|
|
59
|
-
}]
|
|
57
|
+
[key: string]: {}
|
|
58
|
+
}]
|
|
60
59
|
}
|
|
60
|
+
|
|
61
61
|
export interface GroupModificationResponse {
|
|
62
|
-
status: number
|
|
62
|
+
status: number
|
|
63
63
|
participants?: {
|
|
64
|
-
[key: string]: {}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=GroupMetadata.d.ts.map
|
|
64
|
+
[key: string]: {}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict"
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true })
|
package/lib/Types/Label.d.ts
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
export interface Label {
|
|
2
2
|
/** Label uniq ID */
|
|
3
|
-
id: string
|
|
3
|
+
id: string
|
|
4
4
|
/** Label name */
|
|
5
|
-
name: string
|
|
5
|
+
name: string
|
|
6
6
|
/** Label color ID */
|
|
7
|
-
color: number
|
|
7
|
+
color: number
|
|
8
8
|
/** Is label has been deleted */
|
|
9
|
-
deleted: boolean
|
|
9
|
+
deleted: boolean
|
|
10
10
|
/** WhatsApp has 5 predefined labels (New customer, New order & etc) */
|
|
11
|
-
predefinedId?: string
|
|
11
|
+
predefinedId?: string
|
|
12
12
|
}
|
|
13
|
+
|
|
13
14
|
export interface LabelActionBody {
|
|
14
|
-
id: string
|
|
15
|
+
id: string
|
|
15
16
|
/** Label name */
|
|
16
|
-
name?: string
|
|
17
|
+
name?: string
|
|
17
18
|
/** Label color ID */
|
|
18
|
-
color?: number
|
|
19
|
+
color?: number
|
|
19
20
|
/** Is label has been deleted */
|
|
20
|
-
deleted?: boolean
|
|
21
|
+
deleted?: boolean
|
|
21
22
|
/** WhatsApp has 5 predefined labels (New customer, New order & etc) */
|
|
22
|
-
predefinedId?: number
|
|
23
|
+
predefinedId?: number
|
|
23
24
|
}
|
|
25
|
+
|
|
24
26
|
/** WhatsApp has 20 predefined colors */
|
|
25
|
-
export declare enum LabelColor {
|
|
27
|
+
export declare const enum LabelColor {
|
|
26
28
|
Color1 = 0,
|
|
27
29
|
Color2 = 1,
|
|
28
30
|
Color3 = 2,
|
|
@@ -43,5 +45,4 @@ export declare enum LabelColor {
|
|
|
43
45
|
Color18 = 17,
|
|
44
46
|
Color19 = 18,
|
|
45
47
|
Color20 = 19
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=Label.d.ts.map
|
|
48
|
+
}
|
package/lib/Types/Label.js
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
+
"use strict"
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true })
|
|
4
|
+
|
|
1
5
|
/** WhatsApp has 20 predefined colors */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
const LabelColor = {
|
|
7
|
+
Color1: 0,
|
|
8
|
+
Color2: 1,
|
|
9
|
+
Color3: 2,
|
|
10
|
+
Color4: 3,
|
|
11
|
+
Color5: 4,
|
|
12
|
+
Color6: 5,
|
|
13
|
+
Color7: 6,
|
|
14
|
+
Color8: 7,
|
|
15
|
+
Color9: 8,
|
|
16
|
+
Color10: 9,
|
|
17
|
+
Color11: 10,
|
|
18
|
+
Color12: 11,
|
|
19
|
+
Color13: 12,
|
|
20
|
+
Color14: 13,
|
|
21
|
+
Color15: 14,
|
|
22
|
+
Color16: 15,
|
|
23
|
+
Color17: 16,
|
|
24
|
+
Color18: 17,
|
|
25
|
+
Color19: 18,
|
|
26
|
+
Color20: 19
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = {
|
|
30
|
+
LabelColor
|
|
31
|
+
}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
/** Association type */
|
|
2
|
-
export declare enum LabelAssociationType {
|
|
2
|
+
export declare const enum LabelAssociationType {
|
|
3
3
|
Chat = "label_jid",
|
|
4
4
|
Message = "label_message"
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
export type LabelAssociationTypes = LabelAssociationType
|
|
8
|
+
|
|
7
9
|
/** Association for chat */
|
|
8
10
|
export interface ChatLabelAssociation {
|
|
9
|
-
type: LabelAssociationType.Chat
|
|
10
|
-
chatId: string
|
|
11
|
-
labelId: string
|
|
11
|
+
type: LabelAssociationType.Chat
|
|
12
|
+
chatId: string
|
|
13
|
+
labelId: string
|
|
12
14
|
}
|
|
15
|
+
|
|
13
16
|
/** Association for message */
|
|
14
17
|
export interface MessageLabelAssociation {
|
|
15
|
-
type: LabelAssociationType.Message
|
|
16
|
-
chatId: string
|
|
17
|
-
messageId: string
|
|
18
|
-
labelId: string
|
|
18
|
+
type: LabelAssociationType.Message
|
|
19
|
+
chatId: string
|
|
20
|
+
messageId: string
|
|
21
|
+
labelId: string
|
|
19
22
|
}
|
|
20
|
-
|
|
23
|
+
|
|
24
|
+
export type LabelAssociation = ChatLabelAssociation | MessageLabelAssociation
|
|
25
|
+
|
|
21
26
|
/** Body for add/remove chat label association action */
|
|
22
27
|
export interface ChatLabelAssociationActionBody {
|
|
23
|
-
labelId: string
|
|
28
|
+
labelId: string
|
|
24
29
|
}
|
|
30
|
+
|
|
25
31
|
/** body for add/remove message label association action */
|
|
26
32
|
export interface MessageLabelAssociationActionBody {
|
|
27
|
-
labelId: string
|
|
28
|
-
messageId: string
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=LabelAssociation.d.ts.map
|
|
33
|
+
labelId: string
|
|
34
|
+
messageId: string
|
|
35
|
+
}
|