@wppconnect/wa-js 1.0.13 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +72 -2
- package/dist/{src/assert → assert}/assertChat.d.ts +0 -0
- package/dist/assert/assertColor.d.ts +35 -0
- package/dist/assert/assertIsBusiness.d.ts +20 -0
- package/dist/{src/assert → assert}/assertWid.d.ts +0 -0
- package/dist/assert/index.d.ts +19 -0
- package/dist/auth/eventEmitter.d.ts +52 -0
- package/dist/auth/events/index.d.ts +18 -0
- package/dist/{src/deviceName.d.ts → auth/events/registerChangeEvent.d.ts} +0 -0
- package/dist/{src/patch.d.ts → auth/events/registerIdleEvent.d.ts} +0 -0
- package/dist/auth/events/registerLogoutEvent.d.ts +16 -0
- package/dist/auth/functions/getAuthCode.d.ts +22 -0
- package/dist/{src/contact/Contact.d.ts → auth/functions/index.d.ts} +7 -11
- package/dist/{src/whatsapp → auth}/functions/isAuthenticated.d.ts +0 -1
- package/dist/auth/functions/isIdle.d.ts +16 -0
- package/dist/auth/functions/isMultiDevice.d.ts +16 -0
- package/dist/auth/functions/logout.d.ts +16 -0
- package/dist/auth/functions/poke.d.ts +16 -0
- package/dist/auth/functions/setMultiDevice.d.ts +23 -0
- package/dist/{src/contact → auth}/index.d.ts +3 -4
- package/dist/{src/auth → auth}/types.d.ts +0 -5
- package/dist/blocklist/eventEmitter.d.ts +49 -0
- package/dist/{src/assert → blocklist/events}/index.d.ts +1 -2
- package/dist/blocklist/events/registerSyncedEvent.d.ts +16 -0
- package/dist/{src/contact/types.d.ts → blocklist/functions/all.d.ts} +2 -3
- package/dist/blocklist/functions/blockContact.d.ts +18 -0
- package/dist/blocklist/functions/index.d.ts +19 -0
- package/dist/blocklist/functions/isBlocked.d.ts +17 -0
- package/dist/blocklist/functions/unblockContact.d.ts +18 -0
- package/dist/blocklist/index.d.ts +18 -0
- package/dist/{src/blocklist → blocklist}/types.d.ts +0 -3
- package/dist/chat/defaultSendMessageOptions.d.ts +19 -0
- package/dist/chat/eventEmitter.d.ts +107 -0
- package/dist/chat/events/index.d.ts +18 -0
- package/dist/chat/events/registerAckMessageEvent.d.ts +16 -0
- package/dist/chat/events/registerLiveLocationUpdateEvent.d.ts +16 -0
- package/dist/chat/events/registerRevokeMessageEvent.d.ts +16 -0
- package/dist/chat/functions/clear.d.ts +26 -0
- package/dist/chat/functions/delete.d.ts +26 -0
- package/dist/chat/functions/deleteMessage.d.ts +35 -0
- package/dist/chat/functions/downloadMedia.d.ts +21 -0
- package/dist/chat/functions/find.d.ts +24 -0
- package/dist/chat/functions/generateMessageID.d.ts +22 -0
- package/dist/chat/functions/get.d.ts +22 -0
- package/dist/chat/functions/getMessageById.d.ts +35 -0
- package/dist/chat/functions/getMessages.d.ts +48 -0
- package/dist/chat/functions/index.d.ts +37 -0
- package/dist/chat/functions/markIsComposing.d.ts +31 -0
- package/dist/chat/functions/markIsPaused.d.ts +27 -0
- package/dist/chat/functions/markIsRead.d.ts +30 -0
- package/dist/chat/functions/markIsRecording.d.ts +31 -0
- package/dist/chat/functions/markIsUnread.d.ts +29 -0
- package/dist/chat/functions/prepareLinkPreview.d.ts +53 -0
- package/dist/chat/functions/prepareMessageButtons.d.ts +40 -0
- package/dist/chat/functions/prepareRawMessage.d.ts +23 -0
- package/dist/chat/functions/sendFileMessage.d.ts +116 -0
- package/dist/{src/group/types.d.ts → chat/functions/sendListMessage.d.ts} +26 -25
- package/dist/chat/functions/sendRawMessage.d.ts +22 -0
- package/dist/chat/functions/sendTextMessage.d.ts +23 -0
- package/dist/chat/functions/sendVCardContactMessage.d.ts +27 -0
- package/dist/chat/index.d.ts +20 -0
- package/dist/chat/types.d.ts +104 -0
- package/dist/{src/config.d.ts → config.d.ts} +0 -0
- package/dist/contact/eventEmitter.d.ts +48 -0
- package/dist/contact/functions/index.d.ts +16 -0
- package/dist/contact/functions/queryExists.d.ts +20 -0
- package/dist/{src/chat → contact}/index.d.ts +2 -5
- package/dist/deviceName.d.ts +16 -0
- package/dist/{src/enums.d.ts → enums.d.ts} +0 -0
- package/dist/group/eventEmitter.d.ts +48 -0
- package/dist/group/functions/addParticipants.d.ts +17 -0
- package/dist/group/functions/canAdd.d.ts +17 -0
- package/dist/group/functions/canDemote.d.ts +17 -0
- package/dist/group/functions/canPromote.d.ts +17 -0
- package/dist/group/functions/canRemove.d.ts +17 -0
- package/dist/group/functions/create.d.ts +25 -0
- package/dist/group/functions/demoteParticipants.d.ts +17 -0
- package/dist/group/functions/ensureGroup.d.ts +17 -0
- package/dist/group/functions/ensureGroupAndParticipants.d.ts +20 -0
- package/dist/group/functions/getParticipants.d.ts +25 -0
- package/dist/group/functions/iAmAdmin.d.ts +17 -0
- package/dist/group/functions/iAmMember.d.ts +17 -0
- package/dist/group/functions/iAmRestrictedMember.d.ts +17 -0
- package/dist/group/functions/iAmSuperAdmin.d.ts +17 -0
- package/dist/group/functions/index.d.ts +31 -0
- package/dist/group/functions/promoteParticipants.d.ts +17 -0
- package/dist/group/functions/removeParticipants.d.ts +17 -0
- package/dist/{src/auth → group}/index.d.ts +2 -5
- package/dist/{src/index.d.ts → index.d.ts} +9 -8
- package/dist/{src/internal.d.ts → internal.d.ts} +0 -0
- package/dist/labels/eventEmitter.d.ts +48 -0
- package/dist/labels/functions/addNewLabel.d.ts +35 -0
- package/dist/{src/auth/Auth.d.ts → labels/functions/addOrRemoveLabels.d.ts} +15 -16
- package/dist/labels/functions/colorIsInLabelPalette.d.ts +26 -0
- package/dist/labels/functions/deleteAllLabels.d.ts +17 -0
- package/dist/labels/functions/deleteLabel.d.ts +21 -0
- package/dist/labels/functions/getAllLabels.d.ts +17 -0
- package/dist/labels/functions/getLabelColorPalette.d.ts +19 -0
- package/dist/labels/functions/getNewLabelColor.d.ts +19 -0
- package/dist/labels/functions/index.d.ts +23 -0
- package/dist/{src/blocklist → labels}/index.d.ts +2 -4
- package/dist/labels/types.d.ts +21 -0
- package/dist/patch.d.ts +16 -0
- package/dist/status/defaultSendStatusOptions.d.ts +19 -0
- package/dist/status/eventEmitter.d.ts +49 -0
- package/dist/status/events/index.d.ts +16 -0
- package/dist/status/events/registerSyncedEvent.d.ts +16 -0
- package/dist/status/functions/get.d.ts +17 -0
- package/dist/status/functions/getMyStatus.d.ts +17 -0
- package/dist/status/functions/index.d.ts +19 -0
- package/dist/status/functions/sendRawStatus.d.ts +20 -0
- package/dist/{src/status/types.d.ts → status/functions/sendTextStatus.d.ts} +11 -8
- package/dist/status/index.d.ts +19 -0
- package/dist/{src/types.d.ts → types.d.ts} +0 -0
- package/dist/util/convertToFile.d.ts +16 -0
- package/dist/{src/util → util}/createWid.d.ts +0 -0
- package/dist/{src/util → util}/errors.d.ts +0 -0
- package/dist/{src/util → util}/index.d.ts +0 -0
- package/dist/{src/util → util}/types.d.ts +0 -0
- package/dist/{src/webpack.d.ts → webpack.d.ts} +3 -1
- package/dist/{src/whatsapp/collections/CollectionCache.d.ts → whatsapp/collections/BaseCollection.d.ts} +4 -4
- package/dist/{src/whatsapp → whatsapp}/collections/BlocklistCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/BusinessCategoriesResultCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/BusinessProfileCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/ButtonCollection.d.ts +3 -3
- package/dist/{src/whatsapp → whatsapp}/collections/CallCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/CartCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/CartItemCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/CatalogCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/ChatCollection.d.ts +3 -3
- package/dist/{src/whatsapp → whatsapp}/collections/ChatstateCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/Collection.d.ts +4 -3
- package/dist/{src/whatsapp → whatsapp}/collections/ContactCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/EmojiVariantCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/GroupMetadataCollection.d.ts +3 -5
- package/dist/{src/whatsapp → whatsapp}/collections/LabelCollection.d.ts +4 -3
- package/dist/{src/whatsapp → whatsapp}/collections/LabelItemCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/LiveLocationCollection.d.ts +3 -4
- package/dist/{src/whatsapp → whatsapp}/collections/MsgCollection.d.ts +3 -3
- package/dist/{src/whatsapp → whatsapp}/collections/MsgInfoCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/MuteCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/OrderCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/OrderItemCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/ParticipantCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/PresenceCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/ProductCollCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/ProductCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/ProductImageCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/ProductMessageListCollection.d.ts +4 -4
- package/dist/{src/whatsapp → whatsapp}/collections/ProfilePicThumbCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/QuickReplyCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/RecentEmojiCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/RecentStickerCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/StarredMsgCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/StarredStickerCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/StatusCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/StatusV3Collection.d.ts +3 -3
- package/dist/{src/whatsapp → whatsapp}/collections/StickerCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/StickerPackCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/StickerSearchCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/TemplateButtonCollection.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/collections/index.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/enums/LogoutReason.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/enums/OUTWARD_TYPES.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/enums/SendMsgResult.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/enums/index.d.ts +0 -0
- package/dist/{src/whatsapp → whatsapp}/exportModule.d.ts +0 -0
- package/dist/{src/whatsapp → whatsapp}/functions/addAndSendMsgToChat.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/blockContact.d.ts +2 -2
- package/dist/whatsapp/functions/fetchLinkPreview.d.ts +29 -0
- package/dist/{src/whatsapp → whatsapp}/functions/findChat.d.ts +1 -1
- package/dist/whatsapp/functions/findFirstWebLink.d.ts +17 -0
- package/dist/{src/whatsapp → whatsapp}/functions/getOrGenerate.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/groupParticipants.d.ts +4 -4
- package/dist/whatsapp/functions/handleAck.d.ts +21 -0
- package/dist/{src/whatsapp → whatsapp}/functions/index.d.ts +4 -0
- package/dist/whatsapp/functions/isAuthenticated.d.ts +17 -0
- package/dist/{src/blocklist/Blocklist.d.ts → whatsapp/functions/markSeen.d.ts} +11 -11
- package/dist/{src/whatsapp → whatsapp}/functions/msgFindQuery.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/products.d.ts +4 -4
- package/dist/{src/whatsapp → whatsapp}/functions/randomId.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/functions/sendClear.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/sendCreateGroup.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/sendDelete.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/sendQueryExists.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/sendTextMsgToChat.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/functions/uploadProductImage.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/index.d.ts +0 -0
- package/dist/{src/whatsapp → whatsapp}/misc/Base64.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/Browser.d.ts +1 -1
- package/dist/whatsapp/misc/ChatPresence.d.ts +25 -0
- package/dist/whatsapp/misc/Clock.d.ts +45 -0
- package/dist/{src/whatsapp → whatsapp}/misc/Cmd.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/misc/Conn.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/Constants.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/EventEmitter.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/Features.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/ImageUtils.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/Locale.d.ts +1 -1
- package/dist/whatsapp/misc/MediaBlobCache.d.ts +30 -0
- package/dist/{src/whatsapp → whatsapp}/misc/MediaObject.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/MediaObjectUtil.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/MediaPrep.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/MediaUtils.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/MsgKey.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/MsgLoadState.d.ts +4 -4
- package/dist/{src/whatsapp → whatsapp}/misc/OpaqueData.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/misc/State.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/UserPrefs.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/VCard.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/Wid.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/WidFactory.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/misc/index.d.ts +3 -1
- package/dist/{src/whatsapp → whatsapp}/models/AttachMediaModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/BlocklistModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/BusinessCategoriesResultModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/BusinessProfileModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/CallModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/CallParticipantModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/CartItemModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/CartModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/CatalogModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ChatModel.d.ts +4 -4
- package/dist/{src/whatsapp → whatsapp}/models/ChatPreferenceModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ChatstateModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ConnModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ContactModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ConversionTupleModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/EmojiVariantModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/GroupMetadataModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/LabelItemModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/LabelModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/LiveLocationModel.d.ts +4 -3
- package/dist/{src/whatsapp → whatsapp}/models/LiveLocationParticipantModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/MediaDataModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/Model.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/models/ModelChatBase.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/models/MsgButtonReplyMsgModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/MsgInfoModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/MsgModel.d.ts +25 -15
- package/dist/{src/whatsapp → whatsapp}/models/MuteModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/OrderItemModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/OrderModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ParticipantModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ProductCollModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ProductImageModel.d.ts +2 -2
- package/dist/{src/whatsapp/models/Product_listModel.d.ts → whatsapp/models/ProductMessageListModel.d.ts} +5 -5
- package/dist/{src/whatsapp → whatsapp}/models/ProductModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ProfilePicThumbModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/QuickReplyModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/RecentEmojiModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/RecentStickerModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/ReplyButtonModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/StateModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/StatusModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/StatusV3Model.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/StickerModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/StickerPackModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/TemplateButtonModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/UnreadMentionModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/WebCallModel.d.ts +2 -2
- package/dist/{src/whatsapp → whatsapp}/models/index.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/multidevice/adv.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/multidevice/index.d.ts +0 -0
- package/dist/{src/whatsapp → whatsapp}/multidevice/waNoiseInfo.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/multidevice/waSignalStore.d.ts +1 -1
- package/dist/{src/whatsapp → whatsapp}/stores.d.ts +29 -29
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +22 -23
- package/dist/src/chat/Chat.d.ts +0 -162
- package/dist/src/chat/types.d.ts +0 -177
- package/dist/src/group/Group.d.ts +0 -45
- package/dist/src/group/index.d.ts +0 -20
- package/dist/src/status/Status.d.ts +0 -37
- package/dist/src/status/index.d.ts +0 -20
- package/dist/src/whatsapp/misc/ClockSkew.d.ts +0 -43
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect/wa-js",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "WPPConnect/WA-JS is an open-source project with the aim of exporting functions from WhatsApp Web",
|
|
5
|
-
"main": "dist/wppconnect-wa.js",
|
|
6
5
|
"types": "dist/index.d.ts",
|
|
7
6
|
"exports": {
|
|
8
7
|
".": "./dist/wppconnect-wa.js"
|
|
@@ -36,43 +35,43 @@
|
|
|
36
35
|
"watch": "webpack watch --devtool inline-source-map --mode development"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@commitlint/cli": "^
|
|
40
|
-
"@commitlint/config-conventional": "^
|
|
41
|
-
"@commitlint/cz-commitlint": "^
|
|
38
|
+
"@commitlint/cli": "^16.0.1",
|
|
39
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
40
|
+
"@commitlint/cz-commitlint": "^16.0.0",
|
|
42
41
|
"@types/data-urls": "^2.0.1",
|
|
43
42
|
"@types/debug": "^4.1.7",
|
|
44
|
-
"@types/node": "^14.
|
|
45
|
-
"@types/shelljs": "^0.8.
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
47
|
-
"@typescript-eslint/parser": "^
|
|
48
|
-
"@wppconnect/wa-version": "^1.1.
|
|
43
|
+
"@types/node": "^14.18.5",
|
|
44
|
+
"@types/shelljs": "^0.8.10",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
46
|
+
"@typescript-eslint/parser": "^5.9.0",
|
|
47
|
+
"@wppconnect/wa-version": "^1.1.26",
|
|
49
48
|
"buffer": "^6.0.3",
|
|
50
49
|
"commitizen": "^4.2.4",
|
|
51
|
-
"conventional-changelog-cli": "^2.
|
|
50
|
+
"conventional-changelog-cli": "^2.2.2",
|
|
52
51
|
"data-urls": "^3.0.1",
|
|
53
|
-
"debug": "^4.3.
|
|
52
|
+
"debug": "^4.3.3",
|
|
54
53
|
"emittery": "^0.10.0",
|
|
55
|
-
"eslint": "^
|
|
54
|
+
"eslint": "^8.6.0",
|
|
56
55
|
"eslint-config-prettier": "^8.3.0",
|
|
57
56
|
"eslint-plugin-header": "^3.1.1",
|
|
58
|
-
"eslint-plugin-import": "^2.25.
|
|
57
|
+
"eslint-plugin-import": "^2.25.4",
|
|
59
58
|
"eslint-plugin-prettier": "^4.0.0",
|
|
60
59
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
61
|
-
"file-type": "
|
|
60
|
+
"file-type": "~16.5.3",
|
|
62
61
|
"husky": "^7.0.4",
|
|
63
|
-
"playwright": "^1.
|
|
64
|
-
"prettier": "^2.
|
|
65
|
-
"pretty-quick": "^3.1.
|
|
66
|
-
"release-it": "^14.11.
|
|
62
|
+
"playwright-chromium": "^1.17.1",
|
|
63
|
+
"prettier": "^2.5.1",
|
|
64
|
+
"pretty-quick": "^3.1.3",
|
|
65
|
+
"release-it": "^14.11.8",
|
|
67
66
|
"shx": "^0.3.3",
|
|
68
67
|
"ts-loader": "^9.2.6",
|
|
69
|
-
"ts-morph": "^
|
|
68
|
+
"ts-morph": "^13.0.2",
|
|
70
69
|
"ts-node": "^10.4.0",
|
|
71
70
|
"typedoc": "^0.22.4",
|
|
72
71
|
"typedoc-plugin-mdn-links": "^1.0.4",
|
|
73
|
-
"typedoc-plugin-missing-exports": "^0.22.
|
|
74
|
-
"typescript": "^4.
|
|
75
|
-
"webpack": "^5.
|
|
72
|
+
"typedoc-plugin-missing-exports": "^0.22.6",
|
|
73
|
+
"typescript": "^4.5.4",
|
|
74
|
+
"webpack": "^5.65.0",
|
|
76
75
|
"webpack-cli": "^4.9.1"
|
|
77
76
|
},
|
|
78
77
|
"config": {
|
package/dist/src/chat/Chat.d.ts
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import Emittery from 'emittery';
|
|
17
|
-
import { ChatModel, MsgKey, MsgModel, Wid } from '../whatsapp';
|
|
18
|
-
import { AudioMessageOptions, DeleteMessageReturn, DocumentMessageOptions, ImageMessageOptions, SendMessageReturn, VCardContact, VideoMessageOptions } from '.';
|
|
19
|
-
import { ChatEventTypes, GetMessagesOptions, ListMessageOptions, MessageButtonsOptions, RawMessage, SendMessageOptions, TextMessageOptions } from './types';
|
|
20
|
-
export declare class Chat extends Emittery<ChatEventTypes> {
|
|
21
|
-
defaultSendMessageOptions: SendMessageOptions;
|
|
22
|
-
constructor();
|
|
23
|
-
initialize(): Promise<void>;
|
|
24
|
-
protected registerRevokeMessageEvent(): void;
|
|
25
|
-
protected registerAckMessageEvent(): void;
|
|
26
|
-
protected registerEvents(): void;
|
|
27
|
-
find(chatId: string | Wid): Promise<ChatModel>;
|
|
28
|
-
get(chatId: string | Wid): ChatModel | undefined;
|
|
29
|
-
delete(chatId: string | Wid): Promise<{
|
|
30
|
-
wid: Wid;
|
|
31
|
-
status: number;
|
|
32
|
-
}>;
|
|
33
|
-
clear(chatId: string | Wid, keepStarred?: boolean): Promise<{
|
|
34
|
-
wid: Wid;
|
|
35
|
-
status: number;
|
|
36
|
-
keepStarred: boolean;
|
|
37
|
-
}>;
|
|
38
|
-
/**
|
|
39
|
-
* Fetch messages from a chat
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```javascript
|
|
43
|
-
* // Some messages
|
|
44
|
-
* WPP.chat.getMessages('<number>@c.us', {
|
|
45
|
-
* count: 20,
|
|
46
|
-
* });
|
|
47
|
-
*
|
|
48
|
-
* // All messages
|
|
49
|
-
* WPP.chat.getMessages('<number>@c.us', {
|
|
50
|
-
* count: -1,
|
|
51
|
-
* });
|
|
52
|
-
*
|
|
53
|
-
* // 20 messages before specific message
|
|
54
|
-
* WPP.chat.getMessages('<number>@c.us', {
|
|
55
|
-
* count: 20,
|
|
56
|
-
* direction: 'before',
|
|
57
|
-
* id: '<full message id>'
|
|
58
|
-
* });
|
|
59
|
-
* ```
|
|
60
|
-
*
|
|
61
|
-
* @return {RawMessage[]} List of raw messages
|
|
62
|
-
*/
|
|
63
|
-
getMessages(chatId: string | Wid, options?: GetMessagesOptions): Promise<RawMessage[]>;
|
|
64
|
-
getMessageById(chatId: string | Wid, id: string): Promise<MsgModel>;
|
|
65
|
-
getMessageById(chatId: string | Wid, ids: string[]): Promise<MsgModel[]>;
|
|
66
|
-
deleteMessage(chatId: string | Wid, id: string, deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn>;
|
|
67
|
-
deleteMessage(chatId: string | Wid, ids: string[], deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn[]>;
|
|
68
|
-
generateMessageID(chat: string | ChatModel | Wid): MsgKey;
|
|
69
|
-
prepareMessageButtons<T extends RawMessage>(message: T, options: MessageButtonsOptions): T;
|
|
70
|
-
prepareRawMessage<T extends RawMessage>(chat: ChatModel, message: T, options?: SendMessageOptions): Promise<T>;
|
|
71
|
-
sendRawMessage(chatId: any, rawMessage: RawMessage, options?: SendMessageOptions): Promise<SendMessageReturn>;
|
|
72
|
-
sendTextMessage(chatId: any, content: any, options?: TextMessageOptions): Promise<SendMessageReturn>;
|
|
73
|
-
/**
|
|
74
|
-
* Send a list message
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```javascript
|
|
78
|
-
* WPP.chat.sendListMessage('<number>@c.us', {
|
|
79
|
-
* buttonText: 'Click Me!',
|
|
80
|
-
* description: "Hello it's list message",
|
|
81
|
-
* sections: [{
|
|
82
|
-
* title: 'Section 1',
|
|
83
|
-
* rows: [{
|
|
84
|
-
* rowId: 'rowid1',
|
|
85
|
-
* title: 'Row 1',
|
|
86
|
-
* description: "Hello it's description 1",
|
|
87
|
-
* },{
|
|
88
|
-
* rowId: 'rowid2',
|
|
89
|
-
* title: 'Row 2',
|
|
90
|
-
* description: "Hello it's description 2",
|
|
91
|
-
* }]
|
|
92
|
-
* }]
|
|
93
|
-
* });
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
sendListMessage(chatId: any, options: ListMessageOptions): Promise<SendMessageReturn>;
|
|
97
|
-
protected convertToFile(data: string, mimetype?: string, filename?: string): Promise<File>;
|
|
98
|
-
/**
|
|
99
|
-
* Send a file message, that can be an audio, document, image or video
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```javascript
|
|
103
|
-
* // Single document
|
|
104
|
-
* WPP.chat.sendFileMessage(
|
|
105
|
-
* '<number>@c.us', {
|
|
106
|
-
* 'data:image/jpeg;base64,<a long base64 file...>',
|
|
107
|
-
* {
|
|
108
|
-
* type: 'document',
|
|
109
|
-
* caption: 'My document', // Optional
|
|
110
|
-
* filename: 'myfile.doc', // Optional
|
|
111
|
-
* mimetype: 'application/msword' // Optional
|
|
112
|
-
* }
|
|
113
|
-
* });
|
|
114
|
-
*
|
|
115
|
-
* // Image with view once
|
|
116
|
-
* WPP.chat.sendFileMessage(
|
|
117
|
-
* '<number>@c.us', {
|
|
118
|
-
* 'data:image/jpeg;base64,<a long base64 file...>',
|
|
119
|
-
* {
|
|
120
|
-
* type: 'image',
|
|
121
|
-
* caption: 'My image', // Optional
|
|
122
|
-
* isViewOnce: true
|
|
123
|
-
* }
|
|
124
|
-
* });
|
|
125
|
-
*
|
|
126
|
-
* // PTT audio
|
|
127
|
-
* WPP.chat.sendFileMessage(
|
|
128
|
-
* '<number>@c.us', {
|
|
129
|
-
* 'data:audio/mp3;base64,<a long base64 file...>',
|
|
130
|
-
* {
|
|
131
|
-
* type: 'audio',
|
|
132
|
-
* isPtt: true // false for common audio
|
|
133
|
-
* }
|
|
134
|
-
* });
|
|
135
|
-
*
|
|
136
|
-
* // Image with view buttons
|
|
137
|
-
* WPP.chat.sendFileMessage(
|
|
138
|
-
* '<number>@c.us', {
|
|
139
|
-
* 'data:image/jpeg;base64,<a long base64 file...>',
|
|
140
|
-
* {
|
|
141
|
-
* type: 'image',
|
|
142
|
-
* caption: 'My image'
|
|
143
|
-
* buttons: [
|
|
144
|
-
* {
|
|
145
|
-
* id: 'your custom id 1',
|
|
146
|
-
* text: 'Some text'
|
|
147
|
-
* },
|
|
148
|
-
* {
|
|
149
|
-
* id: 'another id 2',
|
|
150
|
-
* text: 'Another text'
|
|
151
|
-
* }
|
|
152
|
-
* ],
|
|
153
|
-
* footer: 'Footer text' // Optional
|
|
154
|
-
* }
|
|
155
|
-
* });
|
|
156
|
-
* ```
|
|
157
|
-
*
|
|
158
|
-
* @return {SendMessageReturn} The result
|
|
159
|
-
*/
|
|
160
|
-
sendFileMessage(chatId: any, content: any, options: AudioMessageOptions | DocumentMessageOptions | ImageMessageOptions | VideoMessageOptions): Promise<SendMessageReturn>;
|
|
161
|
-
sendVCardContact(chatId: any, contacts: string | Wid | VCardContact | (string | Wid | VCardContact)[], options?: SendMessageOptions): Promise<SendMessageReturn>;
|
|
162
|
-
}
|
package/dist/src/chat/types.d.ts
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { ModelPropertiesContructor, MsgKey, MsgModel, Wid } from '../whatsapp';
|
|
17
|
-
import { SendMsgResult } from '../whatsapp/enums';
|
|
18
|
-
export interface ChatEventTypes {
|
|
19
|
-
change: string;
|
|
20
|
-
idle: undefined;
|
|
21
|
-
msg_revoke: {
|
|
22
|
-
/**
|
|
23
|
-
* Author of message, only for groups
|
|
24
|
-
*/
|
|
25
|
-
author?: Wid;
|
|
26
|
-
from: Wid;
|
|
27
|
-
/**
|
|
28
|
-
* Message id of revoke event
|
|
29
|
-
*/
|
|
30
|
-
id: MsgKey;
|
|
31
|
-
/**
|
|
32
|
-
* Message id of revoked message
|
|
33
|
-
*/
|
|
34
|
-
refId: MsgKey;
|
|
35
|
-
to: Wid;
|
|
36
|
-
};
|
|
37
|
-
msg_ack_change: {
|
|
38
|
-
ack: number;
|
|
39
|
-
/**
|
|
40
|
-
* Who sended the ack, only for groups, broadcast and status
|
|
41
|
-
*/
|
|
42
|
-
sender?: Wid;
|
|
43
|
-
/**
|
|
44
|
-
* The chat that sended the messeage
|
|
45
|
-
*/
|
|
46
|
-
chat: Wid;
|
|
47
|
-
/**
|
|
48
|
-
* Message id of revoke event
|
|
49
|
-
*/
|
|
50
|
-
ids: MsgKey[];
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export interface GetMessagesOptions {
|
|
54
|
-
count?: number;
|
|
55
|
-
direction?: 'after' | 'before';
|
|
56
|
-
id?: string;
|
|
57
|
-
}
|
|
58
|
-
export interface DeleteMessageReturn {
|
|
59
|
-
id: string;
|
|
60
|
-
sendMsgResult: Promise<SendMsgResult>;
|
|
61
|
-
isRevoked: boolean;
|
|
62
|
-
isDeleted: boolean;
|
|
63
|
-
}
|
|
64
|
-
export interface SendMessageOptions {
|
|
65
|
-
createChat?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Automatic detect and add the mentioned contacts with @<number>
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```javascript
|
|
71
|
-
* WPP.chat.sendTextMessage('<number>@c.us', 'Hello @123 and @456', {
|
|
72
|
-
* detectMentioned: true
|
|
73
|
-
* });
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
detectMentioned?: boolean;
|
|
77
|
-
messageId?: string | MsgKey;
|
|
78
|
-
/**
|
|
79
|
-
* Define a mentioned list for a message
|
|
80
|
-
* This option work better with a message with mension
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```javascript
|
|
84
|
-
* WPP.chat.sendTextMessage('<number>@c.us', 'Hello @123 and @456', {
|
|
85
|
-
* mentionedList: ['123@c.us', '456@c.us']
|
|
86
|
-
* })
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
mentionedList?: (string | Wid)[];
|
|
90
|
-
/**
|
|
91
|
-
* Quote a message, like a reply message
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```javascript
|
|
95
|
-
* WPP.chat.sendTextMessage('<number>@c.us', 'This is a reply', {
|
|
96
|
-
* quotedMsg: 'true_<number>@c.us_3EB0F435D95D32C4C638'
|
|
97
|
-
* })
|
|
98
|
-
* ```
|
|
99
|
-
*/
|
|
100
|
-
quotedMsg?: string | MsgKey | MsgModel;
|
|
101
|
-
/**
|
|
102
|
-
* Wait for send while the ACK of message is SENT(1)
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* ```javascript
|
|
106
|
-
* WPP.chat.sendTextMessage('<number>@c.us', 'Wait for sent', {
|
|
107
|
-
* waitForAck: true
|
|
108
|
-
* })
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
waitForAck?: boolean;
|
|
112
|
-
}
|
|
113
|
-
export interface SendMessageReturn {
|
|
114
|
-
id: string;
|
|
115
|
-
ack: number;
|
|
116
|
-
sendMsgResult: Promise<SendMsgResult>;
|
|
117
|
-
}
|
|
118
|
-
export interface MessageButtonsOptions {
|
|
119
|
-
/**
|
|
120
|
-
* List of buttons, with at least 1 option and a maximum of 3
|
|
121
|
-
*/
|
|
122
|
-
buttons?: Array<{
|
|
123
|
-
id: string;
|
|
124
|
-
text: string;
|
|
125
|
-
}>;
|
|
126
|
-
/**
|
|
127
|
-
* Title for buttons, only for text message
|
|
128
|
-
*/
|
|
129
|
-
title?: string;
|
|
130
|
-
/**
|
|
131
|
-
* Footer text for buttons
|
|
132
|
-
*/
|
|
133
|
-
footer?: string;
|
|
134
|
-
}
|
|
135
|
-
export interface ListMessageOptions extends SendMessageOptions {
|
|
136
|
-
buttonText: string;
|
|
137
|
-
description: string;
|
|
138
|
-
sections: Array<{
|
|
139
|
-
title: string;
|
|
140
|
-
rows: Array<{
|
|
141
|
-
rowId: string;
|
|
142
|
-
title: string;
|
|
143
|
-
description: string;
|
|
144
|
-
}>;
|
|
145
|
-
}>;
|
|
146
|
-
}
|
|
147
|
-
export declare type TextMessageOptions = SendMessageOptions & MessageButtonsOptions;
|
|
148
|
-
export interface FileMessageOptions extends SendMessageOptions {
|
|
149
|
-
type: string;
|
|
150
|
-
caption?: string;
|
|
151
|
-
filename?: string;
|
|
152
|
-
mimetype?: string;
|
|
153
|
-
}
|
|
154
|
-
export interface AutoDetectMessageOptions extends FileMessageOptions {
|
|
155
|
-
type: 'auto-detect';
|
|
156
|
-
}
|
|
157
|
-
export interface AudioMessageOptions extends FileMessageOptions {
|
|
158
|
-
type: 'audio';
|
|
159
|
-
isPtt?: boolean;
|
|
160
|
-
}
|
|
161
|
-
export interface DocumentMessageOptions extends FileMessageOptions, MessageButtonsOptions {
|
|
162
|
-
type: 'document';
|
|
163
|
-
}
|
|
164
|
-
export interface ImageMessageOptions extends FileMessageOptions, MessageButtonsOptions {
|
|
165
|
-
type: 'image';
|
|
166
|
-
isViewOnce?: boolean;
|
|
167
|
-
}
|
|
168
|
-
export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsOptions {
|
|
169
|
-
type: 'video';
|
|
170
|
-
isGif?: boolean;
|
|
171
|
-
}
|
|
172
|
-
export interface VCardContact {
|
|
173
|
-
id: string | Wid;
|
|
174
|
-
name: string;
|
|
175
|
-
}
|
|
176
|
-
export declare type AllMessageOptions = SendMessageOptions & MessageButtonsOptions & Partial<ListMessageOptions>;
|
|
177
|
-
export declare type RawMessage = ModelPropertiesContructor<MsgModel>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import Emittery from 'emittery';
|
|
17
|
-
import { Wid } from '../whatsapp';
|
|
18
|
-
import { ChatEventTypes as GroupEventTypes } from './types';
|
|
19
|
-
export declare class Group extends Emittery<GroupEventTypes> {
|
|
20
|
-
constructor();
|
|
21
|
-
initialize(): Promise<void>;
|
|
22
|
-
private ensureGroup;
|
|
23
|
-
iAmAdmin(groupId: string | Wid): boolean;
|
|
24
|
-
iAmMember(groupId: string | Wid): boolean;
|
|
25
|
-
iAmRestrictedMember(groupId: string | Wid): boolean;
|
|
26
|
-
iAmSuperAdmin(groupId: string | Wid): boolean;
|
|
27
|
-
private ensureGroupAndParticipants;
|
|
28
|
-
canAdd(groupId: string | Wid): boolean;
|
|
29
|
-
canDemote(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): boolean;
|
|
30
|
-
canPromote(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): boolean;
|
|
31
|
-
canRemove(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): boolean;
|
|
32
|
-
addParticipants(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): Promise<void>;
|
|
33
|
-
removeParticipants(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): Promise<void>;
|
|
34
|
-
promoteParticipants(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): Promise<void>;
|
|
35
|
-
demoteParticipants(groupId: string | Wid, participantsIds: (string | Wid) | (string | Wid)[]): Promise<void>;
|
|
36
|
-
create(groupName: string, participantsIds: (string | Wid) | (string | Wid)[]): Promise<{
|
|
37
|
-
gid: Wid;
|
|
38
|
-
participants: {
|
|
39
|
-
[key: string]: {
|
|
40
|
-
code: string;
|
|
41
|
-
};
|
|
42
|
-
}[];
|
|
43
|
-
status: number;
|
|
44
|
-
}>;
|
|
45
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Group } from './Group';
|
|
17
|
-
export * from './Group';
|
|
18
|
-
export * from './types';
|
|
19
|
-
declare const _default: Group;
|
|
20
|
-
export default _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import Emittery from 'emittery';
|
|
17
|
-
import { RawMessage } from '../chat';
|
|
18
|
-
import { StatusV3Model, Wid } from '../whatsapp';
|
|
19
|
-
import { SendStatusOptions, TextStatusOptions } from '.';
|
|
20
|
-
import { StatusEventTypes } from './types';
|
|
21
|
-
export declare class Status extends Emittery<StatusEventTypes> {
|
|
22
|
-
defaultSendMessageOptions: SendStatusOptions;
|
|
23
|
-
constructor();
|
|
24
|
-
initialize(): Promise<void>;
|
|
25
|
-
get(chatId: string | Wid): StatusV3Model | undefined;
|
|
26
|
-
getMyStatus(): Promise<StatusV3Model>;
|
|
27
|
-
sendRawStatus(message: RawMessage, options?: SendStatusOptions): Promise<import("../chat").SendMessageReturn>;
|
|
28
|
-
/**
|
|
29
|
-
* Send a text message to status stories
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```javascript
|
|
33
|
-
* WPP.status.sendTextStatus(`Bootstrap primary color: #0275d8`, { backgroundColor: '#0275d8', font: 2});
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
sendTextStatus(content: any, options?: TextStatusOptions): Promise<any>;
|
|
37
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Status } from './Status';
|
|
17
|
-
export * from './Status';
|
|
18
|
-
export * from './types';
|
|
19
|
-
declare const _default: Status;
|
|
20
|
-
export default _default;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/** @whatsapp 2.2144.11:25142 */
|
|
17
|
-
export declare namespace ClockSkew {
|
|
18
|
-
const is24h: boolean;
|
|
19
|
-
const skew: number;
|
|
20
|
-
const skewMS: number;
|
|
21
|
-
const timeZoneHardCode: string;
|
|
22
|
-
function getIs24Hour(): boolean;
|
|
23
|
-
function setIs24Hour(is24h: boolean): void;
|
|
24
|
-
function setSkew(skew: number): void;
|
|
25
|
-
function getSkew(): number;
|
|
26
|
-
function localUnixTime(timestamp?: number): number;
|
|
27
|
-
function globalUnixTime(timestamp?: number): number;
|
|
28
|
-
function relativeStr(timestamp: number): string;
|
|
29
|
-
function relativeDateStr(timestamp: number): string;
|
|
30
|
-
function relativeDateAndTimeStr(timestamp: number): string;
|
|
31
|
-
function timeStr(timestamp: number): string;
|
|
32
|
-
function timestampStr(timestamp: number): string;
|
|
33
|
-
function timestampStrFormat(): string;
|
|
34
|
-
function timestampHour(timestamp: number): number;
|
|
35
|
-
function createdStr(timestamp: number): string;
|
|
36
|
-
function untilStr(timestamp: number): string;
|
|
37
|
-
function lastSeenStr(timestamp: number): string;
|
|
38
|
-
function daysDelta(a: number, b: number): number;
|
|
39
|
-
function durationStr(seconds: number | string): string;
|
|
40
|
-
function paymentTimestampStr(timestamp: number): string;
|
|
41
|
-
function liveLocationLastUpdatedStr(timestamp: number): string;
|
|
42
|
-
function shouldUseIntlDateTimeFormat(): boolean;
|
|
43
|
-
}
|