rubjs 3.0.1 → 3.1.1
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 +27 -6
- package/lib/clients/loginClient.js +3 -3
- package/lib/clients/network_login.js +1 -1
- package/lib/core/bot/bot.d.ts +25 -0
- package/lib/core/bot/bot.js +57 -0
- package/lib/core/bot/contexts/inline.context.d.ts +16 -0
- package/lib/core/bot/contexts/inline.context.js +27 -0
- package/lib/core/bot/contexts/message.context.d.ts +17 -0
- package/lib/core/bot/contexts/message.context.js +39 -0
- package/lib/core/bot/filters.d.ts +14 -0
- package/lib/core/bot/filters.js +45 -0
- package/lib/core/bot/methods/advanced/builder.d.ts +3 -0
- package/lib/core/bot/methods/advanced/builder.js +15 -0
- package/lib/core/bot/methods/bot/getMe.d.ts +3 -0
- package/lib/core/bot/methods/bot/getMe.js +6 -0
- package/lib/core/bot/methods/bot/index.d.ts +2 -0
- package/lib/core/bot/methods/bot/index.js +8 -0
- package/lib/core/bot/methods/chat/getChat.d.ts +3 -0
- package/lib/core/bot/methods/chat/getChat.js +6 -0
- package/lib/core/bot/methods/chat/index.d.ts +2 -0
- package/lib/core/bot/methods/chat/index.js +8 -0
- package/lib/core/bot/methods/files/getFile.d.ts +3 -0
- package/lib/core/bot/methods/files/getFile.js +6 -0
- package/lib/core/bot/methods/files/index.d.ts +4 -0
- package/lib/core/bot/methods/files/index.js +12 -0
- package/lib/core/bot/methods/files/requestSendFile.d.ts +4 -0
- package/lib/core/bot/methods/files/requestSendFile.js +6 -0
- package/lib/core/bot/methods/files/uploadFile.d.ts +3 -0
- package/lib/core/bot/methods/files/uploadFile.js +32 -0
- package/lib/core/bot/methods/index.d.ts +34 -0
- package/lib/core/bot/methods/index.js +116 -0
- package/lib/core/bot/methods/messages/deleteMessage.d.ts +3 -0
- package/lib/core/bot/methods/messages/deleteMessage.js +9 -0
- package/lib/core/bot/methods/messages/editChatKeypad.d.ts +4 -0
- package/lib/core/bot/methods/messages/editChatKeypad.js +14 -0
- package/lib/core/bot/methods/messages/editMessageKeypad.d.ts +4 -0
- package/lib/core/bot/methods/messages/editMessageKeypad.js +11 -0
- package/lib/core/bot/methods/messages/editMessageText.d.ts +3 -0
- package/lib/core/bot/methods/messages/editMessageText.js +10 -0
- package/lib/core/bot/methods/messages/forwardMessage.d.ts +3 -0
- package/lib/core/bot/methods/messages/forwardMessage.js +11 -0
- package/lib/core/bot/methods/messages/index.d.ts +10 -0
- package/lib/core/bot/methods/messages/index.js +24 -0
- package/lib/core/bot/methods/messages/sendContact.d.ts +4 -0
- package/lib/core/bot/methods/messages/sendContact.js +24 -0
- package/lib/core/bot/methods/messages/sendLocation.d.ts +4 -0
- package/lib/core/bot/methods/messages/sendLocation.js +23 -0
- package/lib/core/bot/methods/messages/sendMessage.d.ts +4 -0
- package/lib/core/bot/methods/messages/sendMessage.js +22 -0
- package/lib/core/bot/methods/messages/sendPoll.d.ts +3 -0
- package/lib/core/bot/methods/messages/sendPoll.js +6 -0
- package/lib/core/bot/methods/settings/index.d.ts +3 -0
- package/lib/core/bot/methods/settings/index.js +10 -0
- package/lib/core/bot/methods/settings/setCommands.d.ts +4 -0
- package/lib/core/bot/methods/settings/setCommands.js +6 -0
- package/lib/core/bot/methods/settings/updateBotEndpoints.d.ts +4 -0
- package/lib/core/bot/methods/settings/updateBotEndpoints.js +9 -0
- package/lib/core/bot/methods/utilities/getUpdates.d.ts +3 -0
- package/lib/core/bot/methods/utilities/getUpdates.js +6 -0
- package/lib/core/bot/methods/utilities/handleUpdates.d.ts +4 -0
- package/lib/core/bot/methods/utilities/handleUpdates.js +41 -0
- package/lib/core/bot/methods/utilities/index.d.ts +5 -0
- package/lib/core/bot/methods/utilities/index.js +14 -0
- package/lib/core/bot/methods/utilities/run.d.ts +4 -0
- package/lib/core/bot/methods/utilities/run.js +13 -0
- package/lib/core/bot/methods/utilities/start.d.ts +3 -0
- package/lib/core/bot/methods/utilities/start.js +27 -0
- package/lib/core/bot/methods/utilities/webhook.d.ts +4 -0
- package/lib/core/bot/methods/utilities/webhook.js +57 -0
- package/lib/core/bot/network/index.d.ts +9 -0
- package/lib/core/bot/network/index.js +48 -0
- package/lib/core/bot/network/polling.d.ts +0 -0
- package/lib/core/bot/network/polling.js +44 -0
- package/lib/core/bot/types/bot.type.d.ts +26 -0
- package/lib/core/bot/types/models.d.ts +303 -0
- package/lib/core/bot/types/models.js +131 -0
- package/lib/core/{client.d.ts → client/client.d.ts} +4 -4
- package/lib/core/{client.js → client/client.js} +2 -2
- package/lib/core/{context → client/contexts}/activities.type.d.ts +2 -2
- package/lib/core/{context → client/contexts}/chat.type.d.ts +2 -2
- package/lib/core/{context → client/contexts}/message.type.d.ts +2 -2
- package/lib/core/{context → client/contexts}/notifications.type.d.ts +2 -2
- package/lib/core/{filters.d.ts → client/filters.d.ts} +3 -3
- package/lib/core/{filters.js → client/filters.js} +27 -27
- package/lib/core/client/methods/advanced/index.d.ts +2 -0
- package/lib/core/client/methods/advanced/index.js +8 -0
- package/lib/core/{methods → client/methods}/extras/onEditMessages.d.ts +1 -1
- package/lib/core/{methods → client/methods}/utilities/download.d.ts +1 -1
- package/lib/core/{methods → client/methods}/utilities/start.js +2 -2
- package/lib/core/{methods → client/methods}/utilities/usePlugin.d.ts +1 -1
- package/lib/core/{network → client/network}/index.d.ts +1 -1
- package/lib/core/{network → client/network}/websocket.js +13 -29
- package/lib/{types → core/client/types}/client.type.d.ts +5 -5
- package/lib/core/client/types/session.type.d.ts +11 -0
- package/lib/core/client/types/session.type.js +2 -0
- package/lib/exceptions/index.d.ts +6 -0
- package/lib/exceptions/index.js +16 -0
- package/lib/index.d.ts +11 -9
- package/lib/index.js +11 -5
- package/lib/utils/checkFilters.d.ts +1 -0
- package/lib/utils/checkFilters.js +20 -0
- package/lib/{core → utils}/session.d.ts +4 -2
- package/lib/{core → utils}/session.js +27 -11
- package/package.json +49 -43
- package/lib/types/session.type.d.ts +0 -7
- /package/lib/core/{methods → bot/methods}/advanced/index.d.ts +0 -0
- /package/lib/core/{methods → bot/methods}/advanced/index.js +0 -0
- /package/lib/{types/client.type.js → core/bot/types/bot.type.js} +0 -0
- /package/lib/core/{context → client/contexts}/activities.type.js +0 -0
- /package/lib/core/{context → client/contexts}/chat.type.js +0 -0
- /package/lib/core/{context → client/contexts}/contextConstructors.d.ts +0 -0
- /package/lib/core/{context → client/contexts}/contextConstructors.js +0 -0
- /package/lib/core/{context → client/contexts}/index.d.ts +0 -0
- /package/lib/core/{context → client/contexts}/index.js +0 -0
- /package/lib/core/{context → client/contexts}/message.type.js +0 -0
- /package/lib/core/{context → client/contexts}/notifications.type.js +0 -0
- /package/lib/core/{crypto.d.ts → client/crypto.d.ts} +0 -0
- /package/lib/core/{crypto.js → client/crypto.js} +0 -0
- /package/lib/core/{methods → client/methods}/advanced/builder.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/advanced/builder.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/index.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/logout.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/logout.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/registerDevice.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/registerDevice.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/sendCode.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/sendCode.js +0 -0
- /package/lib/core/{methods → client/methods}/auth/signIn.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/auth/signIn.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannel.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannel.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannelMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/addChannelMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/banChannelMember.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/banChannelMember.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/cancelChangeObjectOwner.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/cancelChangeObjectOwner.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/channelPreviewByJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/channelPreviewByJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/checkChannelUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/checkChannelUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/createChannelVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/createChannelVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/discardChannelVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/discardChannelVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/editChannelInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/editChannelInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getBannedChannelMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getBannedChannelMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminAccessList.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminAccessList.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAdminMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAllMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelAllMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getChannelLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/getPendingObjectOwner.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/getPendingObjectOwner.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/index.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelAction.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelAction.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelByLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/joinChannelByLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/leaveChannelVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/leaveChannelVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/removeChannel.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/removeChannel.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/requestChangeObjectOwner.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/requestChangeObjectOwner.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/seenChannelMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/seenChannelMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelLink.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelVoiceChatSetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/setChannelVoiceChatSetting.js +0 -0
- /package/lib/core/{methods → client/methods}/channels/updateChannelUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/channels/updateChannelUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/actionOnJoinRequest.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/actionOnJoinRequest.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/addLiveComment.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/addLiveComment.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/clickMessageUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/clickMessageUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/createJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/createJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteAvatar.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteAvatar.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteChatHistory.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/deleteChatHistory.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/editJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/editJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAbsObjects.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAbsObjects.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAvatars.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getAvatars.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatReaction.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatReaction.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChats.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChats.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatsUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getChatsUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinLinks.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinLinks.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinRequests.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getJoinRequests.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLinkFromAppUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLinkFromAppUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveComments.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveComments.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLivePlayUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLivePlayUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveStatus.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getLiveStatus.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getObjectInfoByUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getObjectInfoByUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/getTopChatUsers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/getTopChatUsers.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/index.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeFromTopChatUsers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeFromTopChatUsers.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/removeJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchChatMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchChatMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchGlobalMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/searchGlobalMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/seenChats.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/seenChats.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendChatActivity.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendChatActivity.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendLive.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/sendLive.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/setActionChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/setActionChat.js +0 -0
- /package/lib/core/{methods → client/methods}/chats/uploadAvatar.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/chats/uploadAvatar.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/addAddressBook.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/addAddressBook.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/deleteContact.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/deleteContact.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContacts.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContacts.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsLastOnline.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsLastOnline.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/getContactsUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/index.js +0 -0
- /package/lib/core/{methods → client/methods}/contacts/resetContacts.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/contacts/resetContacts.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/banMember.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/banMember.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/deleteMessagebyCount.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/deleteMessagebyCount.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getObjectByUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getObjectByUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getProfileLinkItems.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getProfileLinkItems.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getRelatedObjects.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getRelatedObjects.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/getTranscription.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/getTranscription.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/index.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/join.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/join.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/joinVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/joinVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/leaveChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/leaveChat.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/onEditMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/reportObject.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/reportObject.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/searchGlobalObjects.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/searchGlobalObjects.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/sendVoiceChatActivity.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/sendVoiceChatActivity.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/setVoiceChatState.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/setVoiceChatState.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/transcribeVoice.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/transcribeVoice.js +0 -0
- /package/lib/core/{methods → client/methods}/extras/userIsAdmin.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/extras/userIsAdmin.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/addToMyGifSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/addToMyGifSet.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/getMyGifSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/getMyGifSet.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/index.js +0 -0
- /package/lib/core/{methods → client/methods}/gif/removeFromMyGifSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/gif/removeFromMyGifSet.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroupMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/addGroupMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/banGroupMember.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/banGroupMember.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/createGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/createGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/deleteNoAccessGroupChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/deleteNoAccessGroupChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/discardGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/discardGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/editGroupInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/editGroupInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getBannedGroupMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getBannedGroupMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminAccessList.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminAccessList.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAdminMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAllMembers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupAllMembers.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupDefaultAccess.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupDefaultAccess.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupLink.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupMentionList.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupMentionList.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupOnlineCount.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupOnlineCount.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatParticipants.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatParticipants.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/getGroupVoiceChatUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/groupPreviewByJoinLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/groupPreviewByJoinLink.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/index.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/joinGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroupVoiceChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/leaveGroupVoiceChat.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/removeGroup.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/removeGroup.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/seenGroupMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/seenGroupMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupAdmin.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupAdmin.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupDefaultAccess.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupDefaultAccess.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupLink.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupLink.js +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupVoiceChatSetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/groups/setGroupVoiceChatSetting.js +0 -0
- /package/lib/core/{methods → client/methods}/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/index.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/actionOnMessageReaction.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/actionOnMessageReaction.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/createPoll.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/createPoll.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/deleteMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/deleteMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/editMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/editMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/forwardMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/forwardMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessageShareUrl.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessageShareUrl.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessages.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessages.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesByID.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesByID.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesInterval.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesInterval.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesUpdates.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getMessagesUpdates.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollOptionVoters.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollOptionVoters.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollStatus.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/getPollStatus.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/index.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendDocument.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendDocument.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendFileInline.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendFileInline.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendGif.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendGif.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMusic.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendMusic.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendPhoto.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendPhoto.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendSticker.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendSticker.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendText.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendText.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideo.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideoMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVideoMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVoice.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/sendVoice.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/setPinMessage.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/setPinMessage.js +0 -0
- /package/lib/core/{methods → client/methods}/messages/votePoll.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/messages/votePoll.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/changePassword.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/changePassword.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/checkTwoStepPasscode.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/checkTwoStepPasscode.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/deleteFolder.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/deleteFolder.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getBlockedUsers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getBlockedUsers.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getFolders.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getFolders.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getMySessions.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getMySessions.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getPrivacySetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getPrivacySetting.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getSuggestedFolders.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getSuggestedFolders.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/getTwoPasscodeStatus.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/getTwoPasscodeStatus.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/index.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/requestRecoveryEmail.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/requestRecoveryEmail.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/setSetting.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/setSetting.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/setupTwoStepVerification.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/setupTwoStepVerification.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateOtherSessions.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateOtherSessions.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateSession.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/terminateSession.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/turnOffTwoStep.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/turnOffTwoStep.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateProfile.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateProfile.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/updateUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/settings/verifyRecoveryEmail.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/settings/verifyRecoveryEmail.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/actionOnStickerSet.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/actionOnStickerSet.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getMyStickerSets.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getMyStickerSets.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickerSetByID.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickerSetByID.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersByEmoji.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersByEmoji.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersBySetIds.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getStickersBySetIds.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getTrendStickerSets.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/getTrendStickerSets.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/index.js +0 -0
- /package/lib/core/{methods → client/methods}/stickers/searchStickers.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/stickers/searchStickers.js +0 -0
- /package/lib/core/{methods → client/methods}/users/checkUserUsername.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/checkUserUsername.js +0 -0
- /package/lib/core/{methods → client/methods}/users/deleteUserChat.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/deleteUserChat.js +0 -0
- /package/lib/core/{methods → client/methods}/users/getMe.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/getMe.js +0 -0
- /package/lib/core/{methods → client/methods}/users/getUserInfo.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/getUserInfo.js +0 -0
- /package/lib/core/{methods → client/methods}/users/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/index.js +0 -0
- /package/lib/core/{methods → client/methods}/users/setBlockUser.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/users/setBlockUser.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/download.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/downloadProfilePicture.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/downloadProfilePicture.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/index.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/index.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/requestSendFile.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/requestSendFile.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/run.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/run.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/start.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/thumbnail.d.ts +0 -0
- /package/lib/core/{methods → client/methods}/utilities/thumbnail.js +0 -0
- /package/lib/core/{methods → client/methods}/utilities/usePlugin.js +0 -0
- /package/lib/core/{network → client/network}/api.d.ts +0 -0
- /package/lib/core/{network → client/network}/api.js +0 -0
- /package/lib/core/{network → client/network}/file.d.ts +0 -0
- /package/lib/core/{network → client/network}/file.js +0 -0
- /package/lib/core/{network → client/network}/index.js +0 -0
- /package/lib/core/{network → client/network}/utils.d.ts +0 -0
- /package/lib/core/{network → client/network}/utils.js +0 -0
- /package/lib/core/{network → client/network}/websocket.d.ts +0 -0
- /package/lib/core/{parser.d.ts → client/parser.d.ts} +0 -0
- /package/lib/core/{parser.js → client/parser.js} +0 -0
- /package/lib/{types/decorators.type.js → core/client/types/client.type.js} +0 -0
- /package/lib/{types → core/client/types}/decorators.type.d.ts +0 -0
- /package/lib/{types/network.type.js → core/client/types/decorators.type.js} +0 -0
- /package/lib/{types → core/client/types}/index.type.d.ts +0 -0
- /package/lib/{types → core/client/types}/index.type.js +0 -0
- /package/lib/{types → core/client/types}/network.type.d.ts +0 -0
- /package/lib/{types/session.type.js → core/client/types/network.type.js} +0 -0
@@ -0,0 +1,303 @@
|
|
1
|
+
export declare enum ChatTypeEnum {
|
2
|
+
User = "User",
|
3
|
+
Bot = "Bot",
|
4
|
+
Group = "Group",
|
5
|
+
Channel = "Channel"
|
6
|
+
}
|
7
|
+
export declare enum ForwardedFromEnum {
|
8
|
+
User = "User",
|
9
|
+
Channel = "Channel",
|
10
|
+
Bot = "Bot"
|
11
|
+
}
|
12
|
+
export declare enum PaymentStatusEnum {
|
13
|
+
Paid = "Paid",
|
14
|
+
NotPaid = "NotPaid"
|
15
|
+
}
|
16
|
+
export declare enum PollStatusEnum {
|
17
|
+
Open = "Open",
|
18
|
+
Closed = "Closed"
|
19
|
+
}
|
20
|
+
export declare enum LiveLocationStatusEnum {
|
21
|
+
Stopped = "Stopped",
|
22
|
+
Live = "Live"
|
23
|
+
}
|
24
|
+
export declare enum FileTypeEnum {
|
25
|
+
File = "File",
|
26
|
+
Image = "Image",
|
27
|
+
Voice = "Voice",
|
28
|
+
Music = "Music",
|
29
|
+
Gif = "Gif",
|
30
|
+
Video = "Video"
|
31
|
+
}
|
32
|
+
export declare enum ButtonSelectionTypeEnum {
|
33
|
+
TextOnly = "TextOnly",
|
34
|
+
TextImgThu = "TextImgThu",
|
35
|
+
TextImgBig = "TextImgBig"
|
36
|
+
}
|
37
|
+
export declare enum ButtonSelectionSearchEnum {
|
38
|
+
None = "None",
|
39
|
+
Local = "Local",
|
40
|
+
Api = "Api"
|
41
|
+
}
|
42
|
+
export declare enum ButtonSelectionGetEnum {
|
43
|
+
Local = "Local",
|
44
|
+
Api = "Api"
|
45
|
+
}
|
46
|
+
export declare enum ButtonCalendarTypeEnum {
|
47
|
+
DatePersian = "DatePersian",
|
48
|
+
DateGregorian = "DateGregorian"
|
49
|
+
}
|
50
|
+
export declare enum ButtonTextboxTypeKeypadEnum {
|
51
|
+
String = "String",
|
52
|
+
Number = "Number"
|
53
|
+
}
|
54
|
+
export declare enum ButtonTextboxTypeLineEnum {
|
55
|
+
SingleLine = "SingleLine",
|
56
|
+
MultiLine = "MultiLine"
|
57
|
+
}
|
58
|
+
export declare enum ButtonLocationTypeEnum {
|
59
|
+
Picker = "Picker",
|
60
|
+
View = "View"
|
61
|
+
}
|
62
|
+
export declare enum MessageSenderEnum {
|
63
|
+
User = "User",
|
64
|
+
Bot = "Bot"
|
65
|
+
}
|
66
|
+
export declare enum UpdateTypeEnum {
|
67
|
+
UpdatedMessage = "UpdatedMessage",
|
68
|
+
NewMessage = "NewMessage",
|
69
|
+
RemovedMessage = "RemovedMessage",
|
70
|
+
StartedBot = "StartedBot",
|
71
|
+
StoppedBot = "StoppedBot",
|
72
|
+
UpdatedPayment = "UpdatedPayment"
|
73
|
+
}
|
74
|
+
export declare enum ChatKeypadTypeEnum {
|
75
|
+
None = "None",
|
76
|
+
New = "New",
|
77
|
+
Remove = "Remove"
|
78
|
+
}
|
79
|
+
export declare enum UpdateEndpointTypeEnum {
|
80
|
+
ReceiveUpdate = "ReceiveUpdate",
|
81
|
+
ReceiveInlineMessage = "ReceiveInlineMessage",
|
82
|
+
ReceiveQuery = "ReceiveQuery",
|
83
|
+
GetSelectionItem = "GetSelectionItem",
|
84
|
+
SearchSelectionItems = "SearchSelectionItems"
|
85
|
+
}
|
86
|
+
export declare enum ButtonTypeEnum {
|
87
|
+
Simple = "Simple",
|
88
|
+
Selection = "Selection",
|
89
|
+
Calendar = "Calendar",
|
90
|
+
NumberPicker = "NumberPicker",
|
91
|
+
StringPicker = "StringPicker",
|
92
|
+
Location = "Location",
|
93
|
+
Payment = "Payment",
|
94
|
+
CameraImage = "CameraImage",
|
95
|
+
CameraVideo = "CameraVideo",
|
96
|
+
GalleryImage = "GalleryImage",
|
97
|
+
GalleryVideo = "GalleryVideo",
|
98
|
+
File = "File",
|
99
|
+
Audio = "Audio",
|
100
|
+
RecordAudio = "RecordAudio",
|
101
|
+
MyPhoneNumber = "MyPhoneNumber",
|
102
|
+
MyLocation = "MyLocation",
|
103
|
+
Textbox = "Textbox",
|
104
|
+
Link = "Link",
|
105
|
+
AskMyPhoneNumber = "AskMyPhoneNumber",
|
106
|
+
AskLocation = "AskLocation",
|
107
|
+
Barcode = "Barcode"
|
108
|
+
}
|
109
|
+
export interface Chat {
|
110
|
+
chat_id: string;
|
111
|
+
chat_type: ChatTypeEnum;
|
112
|
+
user_id: string;
|
113
|
+
first_name: string;
|
114
|
+
last_name: string;
|
115
|
+
title: string;
|
116
|
+
username: string;
|
117
|
+
}
|
118
|
+
export interface File {
|
119
|
+
file_id: string;
|
120
|
+
file_name: string;
|
121
|
+
size: string;
|
122
|
+
}
|
123
|
+
export interface ForwardedFrom {
|
124
|
+
type_from: ForwardedFromEnum;
|
125
|
+
message_id: string;
|
126
|
+
from_chat_id: string;
|
127
|
+
from_sender_id: string;
|
128
|
+
}
|
129
|
+
export interface PaymentStatus {
|
130
|
+
payment_id: string;
|
131
|
+
status: PaymentStatusEnum;
|
132
|
+
}
|
133
|
+
export interface MessageTextUpdate {
|
134
|
+
message_id: string;
|
135
|
+
text: string;
|
136
|
+
}
|
137
|
+
export interface Bot {
|
138
|
+
bot: {
|
139
|
+
bot_id: string;
|
140
|
+
bot_title: string;
|
141
|
+
avatar: File;
|
142
|
+
description: string;
|
143
|
+
username: string;
|
144
|
+
start_message: string;
|
145
|
+
share_url: string;
|
146
|
+
};
|
147
|
+
}
|
148
|
+
export interface BotCommand {
|
149
|
+
command: string;
|
150
|
+
description: string;
|
151
|
+
}
|
152
|
+
export interface Sticker {
|
153
|
+
sticker_id: string;
|
154
|
+
file: File;
|
155
|
+
emoji_character: string;
|
156
|
+
}
|
157
|
+
export interface ContactMessage {
|
158
|
+
phone_number: string;
|
159
|
+
first_name: string;
|
160
|
+
last_name: string;
|
161
|
+
}
|
162
|
+
export interface PollStatus {
|
163
|
+
state: PollStatusEnum;
|
164
|
+
selection_index: number;
|
165
|
+
percent_vote_options: number[];
|
166
|
+
total_vote: number;
|
167
|
+
show_total_votes: boolean;
|
168
|
+
}
|
169
|
+
export interface Poll {
|
170
|
+
question: string;
|
171
|
+
options: string[];
|
172
|
+
poll_status: PollStatus;
|
173
|
+
}
|
174
|
+
export interface Location {
|
175
|
+
longitude: string;
|
176
|
+
latitude: string;
|
177
|
+
}
|
178
|
+
export interface LiveLocation {
|
179
|
+
start_time: string;
|
180
|
+
live_period: number;
|
181
|
+
current_location: Location;
|
182
|
+
user_id: string;
|
183
|
+
status: LiveLocationStatusEnum;
|
184
|
+
last_update_time: string;
|
185
|
+
}
|
186
|
+
export interface ButtonSelectionItem {
|
187
|
+
text: string;
|
188
|
+
image_url: string;
|
189
|
+
type: ButtonSelectionTypeEnum;
|
190
|
+
}
|
191
|
+
export interface ButtonSelection {
|
192
|
+
selection_id: string;
|
193
|
+
search_type: string;
|
194
|
+
get_type: string;
|
195
|
+
items: ButtonSelectionItem[];
|
196
|
+
is_multi_selection: boolean;
|
197
|
+
columns_count: string;
|
198
|
+
title: string;
|
199
|
+
}
|
200
|
+
export interface ButtonCalendar {
|
201
|
+
default_value?: string;
|
202
|
+
type: ButtonCalendarTypeEnum;
|
203
|
+
min_year: string;
|
204
|
+
max_year: string;
|
205
|
+
title: string;
|
206
|
+
}
|
207
|
+
export interface ButtonNumberPicker {
|
208
|
+
min_value: string;
|
209
|
+
max_value: string;
|
210
|
+
default_value?: string;
|
211
|
+
title: string;
|
212
|
+
}
|
213
|
+
export interface ButtonStringPicker {
|
214
|
+
items: string[];
|
215
|
+
default_value?: string;
|
216
|
+
title?: string;
|
217
|
+
}
|
218
|
+
export interface ButtonTextbox {
|
219
|
+
type_line: ButtonTextboxTypeLineEnum;
|
220
|
+
type_keypad: ButtonTextboxTypeKeypadEnum;
|
221
|
+
place_holder?: string;
|
222
|
+
title?: string;
|
223
|
+
default_value?: string;
|
224
|
+
}
|
225
|
+
export interface ButtonLocation {
|
226
|
+
default_pointer_location: Location;
|
227
|
+
default_map_location: Location;
|
228
|
+
type: ButtonLocationTypeEnum;
|
229
|
+
title?: string;
|
230
|
+
location_image_url: string;
|
231
|
+
}
|
232
|
+
export interface AuxData {
|
233
|
+
start_id: string;
|
234
|
+
button_id: string;
|
235
|
+
}
|
236
|
+
export interface Button {
|
237
|
+
id: string;
|
238
|
+
type: ButtonTypeEnum;
|
239
|
+
button_text: string;
|
240
|
+
button_selection?: ButtonSelection;
|
241
|
+
button_calendar?: ButtonCalendar;
|
242
|
+
button_number_picker?: ButtonNumberPicker;
|
243
|
+
button_string_picker?: ButtonStringPicker;
|
244
|
+
button_location?: ButtonLocation;
|
245
|
+
button_textbox?: ButtonTextbox;
|
246
|
+
}
|
247
|
+
export interface KeypadRow {
|
248
|
+
buttons: Button[];
|
249
|
+
}
|
250
|
+
export interface Keypad {
|
251
|
+
rows: KeypadRow[];
|
252
|
+
resize_keyboard?: boolean;
|
253
|
+
on_time_keyboard?: boolean;
|
254
|
+
}
|
255
|
+
export interface InlineKeypad {
|
256
|
+
rows: KeypadRow[];
|
257
|
+
}
|
258
|
+
export interface MessageKeypadUpdate {
|
259
|
+
message_id: string;
|
260
|
+
inline_keypad: Keypad;
|
261
|
+
}
|
262
|
+
export interface Message {
|
263
|
+
message_id: string;
|
264
|
+
text?: string;
|
265
|
+
time: number;
|
266
|
+
is_edited: boolean;
|
267
|
+
sender_type: MessageSenderEnum;
|
268
|
+
sender_id: string;
|
269
|
+
aux_data?: AuxData;
|
270
|
+
file?: File;
|
271
|
+
reply_to_message_id?: string;
|
272
|
+
forwarded_from?: ForwardedFrom;
|
273
|
+
forwarded_no_link?: string;
|
274
|
+
location?: Location;
|
275
|
+
sticker?: Sticker;
|
276
|
+
contact_message?: ContactMessage;
|
277
|
+
poll?: Poll;
|
278
|
+
live_location?: LiveLocation;
|
279
|
+
}
|
280
|
+
export interface Update {
|
281
|
+
type: UpdateTypeEnum;
|
282
|
+
chat_id: string;
|
283
|
+
removed_message_id?: string;
|
284
|
+
new_message?: Message;
|
285
|
+
updated_message?: Message;
|
286
|
+
updated_payment?: PaymentStatus;
|
287
|
+
}
|
288
|
+
export interface InlineMessage {
|
289
|
+
sender_id: string;
|
290
|
+
text: string;
|
291
|
+
file?: File;
|
292
|
+
location?: Location;
|
293
|
+
aux_data?: AuxData;
|
294
|
+
message_id: string;
|
295
|
+
chat_id: string;
|
296
|
+
}
|
297
|
+
export interface SendMessage {
|
298
|
+
message_id: string;
|
299
|
+
}
|
300
|
+
export interface Commend {
|
301
|
+
command: string;
|
302
|
+
description: string;
|
303
|
+
}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
"use strict";
|
2
|
+
// rubika-models.ts
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.ButtonTypeEnum = exports.UpdateEndpointTypeEnum = exports.ChatKeypadTypeEnum = exports.UpdateTypeEnum = exports.MessageSenderEnum = exports.ButtonLocationTypeEnum = exports.ButtonTextboxTypeLineEnum = exports.ButtonTextboxTypeKeypadEnum = exports.ButtonCalendarTypeEnum = exports.ButtonSelectionGetEnum = exports.ButtonSelectionSearchEnum = exports.ButtonSelectionTypeEnum = exports.FileTypeEnum = exports.LiveLocationStatusEnum = exports.PollStatusEnum = exports.PaymentStatusEnum = exports.ForwardedFromEnum = exports.ChatTypeEnum = void 0;
|
5
|
+
// ================= Enums =================
|
6
|
+
var ChatTypeEnum;
|
7
|
+
(function (ChatTypeEnum) {
|
8
|
+
ChatTypeEnum["User"] = "User";
|
9
|
+
ChatTypeEnum["Bot"] = "Bot";
|
10
|
+
ChatTypeEnum["Group"] = "Group";
|
11
|
+
ChatTypeEnum["Channel"] = "Channel";
|
12
|
+
})(ChatTypeEnum || (exports.ChatTypeEnum = ChatTypeEnum = {}));
|
13
|
+
var ForwardedFromEnum;
|
14
|
+
(function (ForwardedFromEnum) {
|
15
|
+
ForwardedFromEnum["User"] = "User";
|
16
|
+
ForwardedFromEnum["Channel"] = "Channel";
|
17
|
+
ForwardedFromEnum["Bot"] = "Bot";
|
18
|
+
})(ForwardedFromEnum || (exports.ForwardedFromEnum = ForwardedFromEnum = {}));
|
19
|
+
var PaymentStatusEnum;
|
20
|
+
(function (PaymentStatusEnum) {
|
21
|
+
PaymentStatusEnum["Paid"] = "Paid";
|
22
|
+
PaymentStatusEnum["NotPaid"] = "NotPaid";
|
23
|
+
})(PaymentStatusEnum || (exports.PaymentStatusEnum = PaymentStatusEnum = {}));
|
24
|
+
var PollStatusEnum;
|
25
|
+
(function (PollStatusEnum) {
|
26
|
+
PollStatusEnum["Open"] = "Open";
|
27
|
+
PollStatusEnum["Closed"] = "Closed";
|
28
|
+
})(PollStatusEnum || (exports.PollStatusEnum = PollStatusEnum = {}));
|
29
|
+
var LiveLocationStatusEnum;
|
30
|
+
(function (LiveLocationStatusEnum) {
|
31
|
+
LiveLocationStatusEnum["Stopped"] = "Stopped";
|
32
|
+
LiveLocationStatusEnum["Live"] = "Live";
|
33
|
+
})(LiveLocationStatusEnum || (exports.LiveLocationStatusEnum = LiveLocationStatusEnum = {}));
|
34
|
+
var FileTypeEnum;
|
35
|
+
(function (FileTypeEnum) {
|
36
|
+
FileTypeEnum["File"] = "File";
|
37
|
+
FileTypeEnum["Image"] = "Image";
|
38
|
+
FileTypeEnum["Voice"] = "Voice";
|
39
|
+
FileTypeEnum["Music"] = "Music";
|
40
|
+
FileTypeEnum["Gif"] = "Gif";
|
41
|
+
FileTypeEnum["Video"] = "Video";
|
42
|
+
})(FileTypeEnum || (exports.FileTypeEnum = FileTypeEnum = {}));
|
43
|
+
var ButtonSelectionTypeEnum;
|
44
|
+
(function (ButtonSelectionTypeEnum) {
|
45
|
+
ButtonSelectionTypeEnum["TextOnly"] = "TextOnly";
|
46
|
+
ButtonSelectionTypeEnum["TextImgThu"] = "TextImgThu";
|
47
|
+
ButtonSelectionTypeEnum["TextImgBig"] = "TextImgBig";
|
48
|
+
})(ButtonSelectionTypeEnum || (exports.ButtonSelectionTypeEnum = ButtonSelectionTypeEnum = {}));
|
49
|
+
var ButtonSelectionSearchEnum;
|
50
|
+
(function (ButtonSelectionSearchEnum) {
|
51
|
+
ButtonSelectionSearchEnum["None"] = "None";
|
52
|
+
ButtonSelectionSearchEnum["Local"] = "Local";
|
53
|
+
ButtonSelectionSearchEnum["Api"] = "Api";
|
54
|
+
})(ButtonSelectionSearchEnum || (exports.ButtonSelectionSearchEnum = ButtonSelectionSearchEnum = {}));
|
55
|
+
var ButtonSelectionGetEnum;
|
56
|
+
(function (ButtonSelectionGetEnum) {
|
57
|
+
ButtonSelectionGetEnum["Local"] = "Local";
|
58
|
+
ButtonSelectionGetEnum["Api"] = "Api";
|
59
|
+
})(ButtonSelectionGetEnum || (exports.ButtonSelectionGetEnum = ButtonSelectionGetEnum = {}));
|
60
|
+
var ButtonCalendarTypeEnum;
|
61
|
+
(function (ButtonCalendarTypeEnum) {
|
62
|
+
ButtonCalendarTypeEnum["DatePersian"] = "DatePersian";
|
63
|
+
ButtonCalendarTypeEnum["DateGregorian"] = "DateGregorian";
|
64
|
+
})(ButtonCalendarTypeEnum || (exports.ButtonCalendarTypeEnum = ButtonCalendarTypeEnum = {}));
|
65
|
+
var ButtonTextboxTypeKeypadEnum;
|
66
|
+
(function (ButtonTextboxTypeKeypadEnum) {
|
67
|
+
ButtonTextboxTypeKeypadEnum["String"] = "String";
|
68
|
+
ButtonTextboxTypeKeypadEnum["Number"] = "Number";
|
69
|
+
})(ButtonTextboxTypeKeypadEnum || (exports.ButtonTextboxTypeKeypadEnum = ButtonTextboxTypeKeypadEnum = {}));
|
70
|
+
var ButtonTextboxTypeLineEnum;
|
71
|
+
(function (ButtonTextboxTypeLineEnum) {
|
72
|
+
ButtonTextboxTypeLineEnum["SingleLine"] = "SingleLine";
|
73
|
+
ButtonTextboxTypeLineEnum["MultiLine"] = "MultiLine";
|
74
|
+
})(ButtonTextboxTypeLineEnum || (exports.ButtonTextboxTypeLineEnum = ButtonTextboxTypeLineEnum = {}));
|
75
|
+
var ButtonLocationTypeEnum;
|
76
|
+
(function (ButtonLocationTypeEnum) {
|
77
|
+
ButtonLocationTypeEnum["Picker"] = "Picker";
|
78
|
+
ButtonLocationTypeEnum["View"] = "View";
|
79
|
+
})(ButtonLocationTypeEnum || (exports.ButtonLocationTypeEnum = ButtonLocationTypeEnum = {}));
|
80
|
+
var MessageSenderEnum;
|
81
|
+
(function (MessageSenderEnum) {
|
82
|
+
MessageSenderEnum["User"] = "User";
|
83
|
+
MessageSenderEnum["Bot"] = "Bot";
|
84
|
+
})(MessageSenderEnum || (exports.MessageSenderEnum = MessageSenderEnum = {}));
|
85
|
+
var UpdateTypeEnum;
|
86
|
+
(function (UpdateTypeEnum) {
|
87
|
+
UpdateTypeEnum["UpdatedMessage"] = "UpdatedMessage";
|
88
|
+
UpdateTypeEnum["NewMessage"] = "NewMessage";
|
89
|
+
UpdateTypeEnum["RemovedMessage"] = "RemovedMessage";
|
90
|
+
UpdateTypeEnum["StartedBot"] = "StartedBot";
|
91
|
+
UpdateTypeEnum["StoppedBot"] = "StoppedBot";
|
92
|
+
UpdateTypeEnum["UpdatedPayment"] = "UpdatedPayment";
|
93
|
+
})(UpdateTypeEnum || (exports.UpdateTypeEnum = UpdateTypeEnum = {}));
|
94
|
+
var ChatKeypadTypeEnum;
|
95
|
+
(function (ChatKeypadTypeEnum) {
|
96
|
+
ChatKeypadTypeEnum["None"] = "None";
|
97
|
+
ChatKeypadTypeEnum["New"] = "New";
|
98
|
+
ChatKeypadTypeEnum["Remove"] = "Remove";
|
99
|
+
})(ChatKeypadTypeEnum || (exports.ChatKeypadTypeEnum = ChatKeypadTypeEnum = {}));
|
100
|
+
var UpdateEndpointTypeEnum;
|
101
|
+
(function (UpdateEndpointTypeEnum) {
|
102
|
+
UpdateEndpointTypeEnum["ReceiveUpdate"] = "ReceiveUpdate";
|
103
|
+
UpdateEndpointTypeEnum["ReceiveInlineMessage"] = "ReceiveInlineMessage";
|
104
|
+
UpdateEndpointTypeEnum["ReceiveQuery"] = "ReceiveQuery";
|
105
|
+
UpdateEndpointTypeEnum["GetSelectionItem"] = "GetSelectionItem";
|
106
|
+
UpdateEndpointTypeEnum["SearchSelectionItems"] = "SearchSelectionItems";
|
107
|
+
})(UpdateEndpointTypeEnum || (exports.UpdateEndpointTypeEnum = UpdateEndpointTypeEnum = {}));
|
108
|
+
var ButtonTypeEnum;
|
109
|
+
(function (ButtonTypeEnum) {
|
110
|
+
ButtonTypeEnum["Simple"] = "Simple";
|
111
|
+
ButtonTypeEnum["Selection"] = "Selection";
|
112
|
+
ButtonTypeEnum["Calendar"] = "Calendar";
|
113
|
+
ButtonTypeEnum["NumberPicker"] = "NumberPicker";
|
114
|
+
ButtonTypeEnum["StringPicker"] = "StringPicker";
|
115
|
+
ButtonTypeEnum["Location"] = "Location";
|
116
|
+
ButtonTypeEnum["Payment"] = "Payment";
|
117
|
+
ButtonTypeEnum["CameraImage"] = "CameraImage";
|
118
|
+
ButtonTypeEnum["CameraVideo"] = "CameraVideo";
|
119
|
+
ButtonTypeEnum["GalleryImage"] = "GalleryImage";
|
120
|
+
ButtonTypeEnum["GalleryVideo"] = "GalleryVideo";
|
121
|
+
ButtonTypeEnum["File"] = "File";
|
122
|
+
ButtonTypeEnum["Audio"] = "Audio";
|
123
|
+
ButtonTypeEnum["RecordAudio"] = "RecordAudio";
|
124
|
+
ButtonTypeEnum["MyPhoneNumber"] = "MyPhoneNumber";
|
125
|
+
ButtonTypeEnum["MyLocation"] = "MyLocation";
|
126
|
+
ButtonTypeEnum["Textbox"] = "Textbox";
|
127
|
+
ButtonTypeEnum["Link"] = "Link";
|
128
|
+
ButtonTypeEnum["AskMyPhoneNumber"] = "AskMyPhoneNumber";
|
129
|
+
ButtonTypeEnum["AskLocation"] = "AskLocation";
|
130
|
+
ButtonTypeEnum["Barcode"] = "Barcode";
|
131
|
+
})(ButtonTypeEnum || (exports.ButtonTypeEnum = ButtonTypeEnum = {}));
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import Network from './network';
|
2
2
|
import Methods from './methods';
|
3
|
-
import SessionManager from '
|
4
|
-
import Message from './
|
5
|
-
import { ClientTypes } from '
|
6
|
-
import { ContextMap, Handler } from '
|
3
|
+
import SessionManager from '../../utils/session';
|
4
|
+
import Message from './contexts/message.type';
|
5
|
+
import { ClientTypes } from './types/index.type';
|
6
|
+
import { ContextMap, Handler } from './types/client.type';
|
7
7
|
export default class Client extends Methods {
|
8
8
|
private session;
|
9
9
|
platform: ClientTypes.PlatformType;
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const network_1 = __importDefault(require("./network"));
|
7
7
|
const methods_1 = __importDefault(require("./methods"));
|
8
|
-
const session_1 = __importDefault(require("
|
8
|
+
const session_1 = __importDefault(require("../../utils/session"));
|
9
9
|
class Client extends methods_1.default {
|
10
10
|
constructor(session, platform = 'Web', timeout = 5000) {
|
11
11
|
super();
|
@@ -21,7 +21,7 @@ class Client extends methods_1.default {
|
|
21
21
|
activities: [],
|
22
22
|
notifications: [],
|
23
23
|
};
|
24
|
-
this.sessionDb = new session_1.default(this.session);
|
24
|
+
this.sessionDb = new session_1.default(this.session, undefined, "CLIENT");
|
25
25
|
this.network = new network_1.default(this);
|
26
26
|
this.start();
|
27
27
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Client } from '
|
2
|
-
import { DecoratorsTypes } from '
|
1
|
+
import { Client } from '../../..';
|
2
|
+
import { DecoratorsTypes } from '../types/index.type';
|
3
3
|
declare class Activities implements DecoratorsTypes.ShowActivities {
|
4
4
|
type: string;
|
5
5
|
object_guid: string;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Client } from '
|
2
|
-
import { DecoratorsTypes } from '
|
1
|
+
import { Client } from '../../..';
|
2
|
+
import { DecoratorsTypes } from '../types/index.type';
|
3
3
|
declare class Chat implements DecoratorsTypes.ChatUpdates {
|
4
4
|
object_guid: string;
|
5
5
|
action: string;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Client } from '
|
2
|
-
import { DecoratorsTypes } from '
|
1
|
+
import { Client } from '../../..';
|
2
|
+
import { DecoratorsTypes } from '../types/index.type';
|
3
3
|
declare class Message implements DecoratorsTypes.MessageUpdate {
|
4
4
|
message_id: string;
|
5
5
|
action: string;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Client } from '
|
2
|
-
import { DecoratorsTypes } from '
|
1
|
+
import { Client } from '../../..';
|
2
|
+
import { DecoratorsTypes } from '../types/index.type';
|
3
3
|
declare class Notifications implements DecoratorsTypes.ShowNotifications {
|
4
4
|
notification_id: string;
|
5
5
|
type: string;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { MessageUpdate, FileInline } from "
|
2
|
-
declare class
|
1
|
+
import { MessageUpdate, FileInline } from "./types/decorators.type";
|
2
|
+
declare class ClientFilters {
|
3
3
|
static findKey(message: any, key: string): any;
|
4
4
|
static guidType(message: MessageUpdate, startWith: string): boolean;
|
5
5
|
static isMention(message: MessageUpdate): boolean;
|
@@ -30,4 +30,4 @@ declare class Filters {
|
|
30
30
|
static startsWithCommand(text: string, object_guid?: string, length?: number): (message: MessageUpdate) => boolean | undefined;
|
31
31
|
static equalCommand(text: string, object_guid?: string): (message: MessageUpdate) => boolean | undefined;
|
32
32
|
}
|
33
|
-
export default
|
33
|
+
export default ClientFilters;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
class
|
3
|
+
class ClientFilters {
|
4
4
|
static findKey(message, key) {
|
5
5
|
if (!message || typeof message !== "object") {
|
6
6
|
return undefined;
|
@@ -14,14 +14,14 @@ class Filters {
|
|
14
14
|
if (Array.isArray(value)) {
|
15
15
|
for (const item of value) {
|
16
16
|
if (typeof item === "object") {
|
17
|
-
const found =
|
17
|
+
const found = ClientFilters.findKey(item, key);
|
18
18
|
if (found !== undefined)
|
19
19
|
return found;
|
20
20
|
}
|
21
21
|
}
|
22
22
|
}
|
23
23
|
if (typeof value === "object") {
|
24
|
-
const found =
|
24
|
+
const found = ClientFilters.findKey(value, key);
|
25
25
|
if (found !== undefined)
|
26
26
|
return found;
|
27
27
|
}
|
@@ -29,23 +29,23 @@ class Filters {
|
|
29
29
|
return undefined;
|
30
30
|
}
|
31
31
|
static guidType(message, startWith) {
|
32
|
-
const result =
|
32
|
+
const result = ClientFilters.findKey(message, "object_guid");
|
33
33
|
return result?.startsWith(startWith) ?? false;
|
34
34
|
}
|
35
35
|
static isMention(message) {
|
36
|
-
return !!
|
36
|
+
return !!ClientFilters.findKey(message.message?.metadata?.meta_data_parts, "link");
|
37
37
|
}
|
38
38
|
static isMarkdown(message) {
|
39
|
-
return !!
|
39
|
+
return !!ClientFilters.findKey(message.message, "metadata");
|
40
40
|
}
|
41
41
|
static isReply(message) {
|
42
|
-
return !!
|
42
|
+
return !!ClientFilters.findKey(message, "reply_to_message_id");
|
43
43
|
}
|
44
44
|
static isEdited(message) {
|
45
|
-
return !!
|
45
|
+
return !!ClientFilters.findKey(message, "is_edited");
|
46
46
|
}
|
47
47
|
static isLink(message) {
|
48
|
-
const link =
|
48
|
+
const link = ClientFilters.findKey(message, "text");
|
49
49
|
if (!link)
|
50
50
|
return false;
|
51
51
|
const RUBIKA_LINK_PATTERN = /\brubika\.ir\b/;
|
@@ -55,19 +55,19 @@ class Filters {
|
|
55
55
|
USERNAME_PATTERN.test(link));
|
56
56
|
}
|
57
57
|
static isText(message) {
|
58
|
-
return !!
|
58
|
+
return !!ClientFilters.findKey(message, "text");
|
59
59
|
}
|
60
60
|
static isGroup(message) {
|
61
|
-
return
|
61
|
+
return ClientFilters.guidType(message, "g0");
|
62
62
|
}
|
63
63
|
static isChannel(message) {
|
64
|
-
return
|
64
|
+
return ClientFilters.guidType(message, "c0");
|
65
65
|
}
|
66
66
|
static isPrivate(message) {
|
67
|
-
return
|
67
|
+
return ClientFilters.guidType(message, "u0");
|
68
68
|
}
|
69
69
|
static isForward(message) {
|
70
|
-
return !!
|
70
|
+
return !!ClientFilters.findKey(message, "forwarded_from");
|
71
71
|
}
|
72
72
|
static fileInline(message) {
|
73
73
|
return message.message?.file_inline;
|
@@ -76,40 +76,40 @@ class Filters {
|
|
76
76
|
return ["FileInline", "FileInlineCaption"].includes(message.message?.type);
|
77
77
|
}
|
78
78
|
static isFile(message) {
|
79
|
-
return
|
79
|
+
return ClientFilters.fileInline(message)?.type === "File";
|
80
80
|
}
|
81
81
|
static isPhoto(message) {
|
82
|
-
return
|
82
|
+
return ClientFilters.fileInline(message)?.type === "Image";
|
83
83
|
}
|
84
84
|
static isSticker(message) {
|
85
|
-
return
|
85
|
+
return ClientFilters.fileInline(message)?.type === "Sticker";
|
86
86
|
}
|
87
87
|
static isVideo(message) {
|
88
|
-
return
|
88
|
+
return ClientFilters.fileInline(message)?.type === "Video";
|
89
89
|
}
|
90
90
|
static isVoice(message) {
|
91
|
-
return
|
91
|
+
return ClientFilters.fileInline(message)?.type === "Voice";
|
92
92
|
}
|
93
93
|
static isGif(message) {
|
94
|
-
return
|
94
|
+
return ClientFilters.fileInline(message)?.type === "Gif";
|
95
95
|
}
|
96
96
|
static isMusic(message) {
|
97
|
-
return
|
97
|
+
return ClientFilters.fileInline(message)?.type === "Music";
|
98
98
|
}
|
99
99
|
static isLocation(message) {
|
100
|
-
return !!
|
100
|
+
return !!ClientFilters.findKey(message.message, "location");
|
101
101
|
}
|
102
102
|
static isContact(message) {
|
103
|
-
return !!
|
103
|
+
return !!ClientFilters.findKey(message.message, "contact_message");
|
104
104
|
}
|
105
105
|
static isPoll(message) {
|
106
|
-
return !!
|
106
|
+
return !!ClientFilters.findKey(message, "poll");
|
107
107
|
}
|
108
108
|
static isLive(message) {
|
109
|
-
return !!
|
109
|
+
return !!ClientFilters.findKey(message, "live_data");
|
110
110
|
}
|
111
111
|
static isEvent(message) {
|
112
|
-
return !!
|
112
|
+
return !!ClientFilters.findKey(message, "event_data");
|
113
113
|
}
|
114
114
|
static isLength(length, object_guid) {
|
115
115
|
return (message) => {
|
@@ -150,4 +150,4 @@ class Filters {
|
|
150
150
|
};
|
151
151
|
}
|
152
152
|
}
|
153
|
-
exports.default =
|
153
|
+
exports.default = ClientFilters;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.builder = void 0;
|
7
|
+
const builder_1 = __importDefault(require("./builder"));
|
8
|
+
exports.builder = builder_1.default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import Message from "../../
|
1
|
+
import Message from "../../contexts/message.type";
|
2
2
|
import Client from "../../client";
|
3
3
|
declare function onEditMessages(this: Client, object_guid: string, callback: (message: Message) => any): void;
|
4
4
|
export default onEditMessages;
|