rubjs 1.0.0 → 2.2.3
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 +55 -0
- package/package.json +6 -1
- package/rubjs/client.d.ts +1 -0
- package/rubjs/client.js +1 -0
- package/rubjs/index.d.ts +5 -2
- package/rubjs/index.js +41 -1
- package/rubjs/methods/auth/index.d.ts +5 -4
- package/rubjs/methods/auth/index.js +9 -7
- package/rubjs/methods/auth/logout.d.ts +3 -0
- package/rubjs/methods/{utilities/on_chat_updates.js → auth/logout.js} +3 -3
- package/rubjs/methods/auth/registerDevice.d.ts +3 -0
- package/rubjs/methods/auth/{register_device.js → registerDevice.js} +2 -2
- package/rubjs/methods/auth/sendCode.d.ts +3 -0
- package/rubjs/methods/auth/{send_code.js → sendCode.js} +2 -2
- package/rubjs/methods/auth/signIn.d.ts +3 -0
- package/rubjs/methods/auth/{sign_in.js → signIn.js} +2 -2
- package/rubjs/methods/channels/addChannel.d.ts +3 -0
- package/rubjs/methods/channels/addChannel.js +26 -0
- package/rubjs/methods/channels/addChannelMembers.d.ts +3 -0
- package/rubjs/methods/channels/addChannelMembers.js +22 -0
- package/rubjs/methods/channels/banChannelMember.d.ts +3 -0
- package/rubjs/methods/channels/banChannelMember.js +23 -0
- package/rubjs/methods/channels/cancelChangeObjectOwner.d.ts +3 -0
- package/rubjs/methods/{utilities/on_show_activities.js → channels/cancelChangeObjectOwner.js} +3 -3
- package/rubjs/methods/channels/channelPreviewByJoinLink.d.ts +3 -0
- package/rubjs/methods/channels/channelPreviewByJoinLink.js +19 -0
- package/rubjs/methods/channels/checkChannelUsername.d.ts +3 -0
- package/rubjs/methods/{utilities/on_show_notifications.js → channels/checkChannelUsername.js} +4 -6
- package/rubjs/methods/channels/createChannelVoiceChat.d.ts +3 -0
- package/rubjs/methods/{utilities/on_message_updates.js → channels/createChannelVoiceChat.js} +3 -3
- package/rubjs/methods/channels/discardChannelVoiceChat.d.ts +3 -0
- package/rubjs/methods/channels/discardChannelVoiceChat.js +20 -0
- package/rubjs/methods/channels/editChannelInfo.d.ts +4 -0
- package/rubjs/methods/channels/editChannelInfo.js +48 -0
- package/rubjs/methods/channels/getBannedChannelMembers.d.ts +3 -0
- package/rubjs/methods/channels/getBannedChannelMembers.js +20 -0
- package/rubjs/methods/channels/getChannelAdminAccessList.d.ts +3 -0
- package/rubjs/methods/channels/getChannelAdminAccessList.js +20 -0
- package/rubjs/methods/channels/getChannelAdminMembers.d.ts +3 -0
- package/rubjs/methods/channels/getChannelAdminMembers.js +20 -0
- package/rubjs/methods/channels/getChannelAllMembers.d.ts +3 -0
- package/rubjs/methods/channels/getChannelAllMembers.js +21 -0
- package/rubjs/methods/channels/getChannelInfo.d.ts +3 -0
- package/rubjs/methods/channels/getChannelInfo.js +17 -0
- package/rubjs/methods/channels/getChannelLink.d.ts +3 -0
- package/rubjs/methods/channels/getChannelLink.js +17 -0
- package/rubjs/methods/channels/getPendingObjectOwner.d.ts +3 -0
- package/rubjs/methods/channels/getPendingObjectOwner.js +17 -0
- package/rubjs/methods/channels/index.d.ts +26 -0
- package/rubjs/methods/channels/index.js +56 -0
- package/rubjs/methods/channels/joinChannelAction.d.ts +3 -0
- package/rubjs/methods/channels/joinChannelAction.js +19 -0
- package/rubjs/methods/channels/joinChannelByLink.d.ts +3 -0
- package/rubjs/methods/channels/joinChannelByLink.js +19 -0
- package/rubjs/methods/channels/leaveChannelVoiceChat.d.ts +3 -0
- package/rubjs/methods/channels/leaveChannelVoiceChat.js +20 -0
- package/rubjs/methods/channels/removeChannel.d.ts +3 -0
- package/rubjs/methods/channels/removeChannel.js +17 -0
- package/rubjs/methods/channels/requestChangeObjectOwner.d.ts +3 -0
- package/rubjs/methods/channels/requestChangeObjectOwner.js +20 -0
- package/rubjs/methods/channels/seenChannelMessages.d.ts +3 -0
- package/rubjs/methods/channels/seenChannelMessages.js +21 -0
- package/rubjs/methods/channels/setChannelLink.d.ts +3 -0
- package/rubjs/methods/channels/setChannelLink.js +17 -0
- package/rubjs/methods/channels/setChannelVoiceChatSetting.d.ts +3 -0
- package/rubjs/methods/channels/setChannelVoiceChatSetting.js +26 -0
- package/rubjs/methods/channels/updateChannelUsername.d.ts +3 -0
- package/rubjs/methods/channels/updateChannelUsername.js +20 -0
- package/rubjs/methods/chats/actionOnJoinRequest.d.ts +3 -0
- package/rubjs/methods/chats/actionOnJoinRequest.js +22 -0
- package/rubjs/methods/chats/addLiveComment.d.ts +3 -0
- package/rubjs/methods/chats/addLiveComment.js +17 -0
- package/rubjs/methods/chats/clickMessageUrl.d.ts +3 -0
- package/rubjs/methods/chats/clickMessageUrl.js +17 -0
- package/rubjs/methods/chats/createJoinLink.d.ts +3 -0
- package/rubjs/methods/chats/createJoinLink.js +23 -0
- package/rubjs/methods/chats/deleteAvatar.d.ts +3 -0
- package/rubjs/methods/chats/deleteAvatar.js +17 -0
- package/rubjs/methods/chats/deleteChatHistory.d.ts +3 -0
- package/rubjs/methods/chats/deleteChatHistory.js +20 -0
- package/rubjs/methods/chats/editJoinLink.d.ts +3 -0
- package/rubjs/methods/chats/editJoinLink.js +34 -0
- package/rubjs/methods/chats/getAbsObjects.d.ts +3 -0
- package/rubjs/methods/chats/getAbsObjects.js +19 -0
- package/rubjs/methods/chats/getAvatars.d.ts +3 -0
- package/rubjs/methods/chats/getAvatars.js +17 -0
- package/rubjs/methods/chats/getChatReaction.d.ts +3 -0
- package/rubjs/methods/chats/getChatReaction.js +17 -0
- package/rubjs/methods/chats/getChats.d.ts +3 -0
- package/rubjs/methods/chats/getChats.js +17 -0
- package/rubjs/methods/chats/getChatsUpdates.d.ts +3 -0
- package/rubjs/methods/chats/getChatsUpdates.js +17 -0
- package/rubjs/methods/chats/getJoinLinks.d.ts +3 -0
- package/rubjs/methods/chats/getJoinLinks.js +17 -0
- package/rubjs/methods/chats/getJoinRequests.d.ts +3 -0
- package/rubjs/methods/chats/getJoinRequests.js +17 -0
- package/rubjs/methods/chats/getLinkFromAppUrl.d.ts +3 -0
- package/rubjs/methods/chats/getLinkFromAppUrl.js +17 -0
- package/rubjs/methods/chats/getLiveComments.d.ts +3 -0
- package/rubjs/methods/chats/getLiveComments.js +17 -0
- package/rubjs/methods/chats/getLivePlayUrl.d.ts +3 -0
- package/rubjs/methods/chats/getLivePlayUrl.js +17 -0
- package/rubjs/methods/chats/getLiveStatus.d.ts +3 -0
- package/rubjs/methods/chats/getLiveStatus.js +17 -0
- package/rubjs/methods/chats/getObjectInfoByUsername.d.ts +3 -0
- package/rubjs/methods/chats/getObjectInfoByUsername.js +19 -0
- package/rubjs/methods/chats/getTopChatUsers.d.ts +3 -0
- package/rubjs/methods/chats/getTopChatUsers.js +18 -0
- package/rubjs/methods/chats/index.d.ts +29 -0
- package/rubjs/methods/chats/index.js +62 -0
- package/rubjs/methods/chats/removeFromTopChatUsers.d.ts +3 -0
- package/rubjs/methods/chats/removeFromTopChatUsers.js +17 -0
- package/rubjs/methods/chats/removeJoinLink.d.ts +3 -0
- package/rubjs/methods/chats/removeJoinLink.js +19 -0
- package/rubjs/methods/chats/searchChatMessages.d.ts +3 -0
- package/rubjs/methods/chats/searchChatMessages.js +23 -0
- package/rubjs/methods/chats/searchGlobalMessages.d.ts +3 -0
- package/rubjs/methods/chats/searchGlobalMessages.js +17 -0
- package/rubjs/methods/chats/seenChats.d.ts +3 -0
- package/rubjs/methods/chats/seenChats.js +17 -0
- package/rubjs/methods/chats/sendChatActivity.d.ts +3 -0
- package/rubjs/methods/chats/sendChatActivity.js +19 -0
- package/rubjs/methods/chats/sendLive.d.ts +3 -0
- package/rubjs/methods/chats/sendLive.js +28 -0
- package/rubjs/methods/chats/setActionChat.d.ts +3 -0
- package/rubjs/methods/chats/setActionChat.js +19 -0
- package/rubjs/methods/chats/uploadAvatar.d.ts +3 -0
- package/rubjs/methods/chats/uploadAvatar.js +29 -0
- package/rubjs/methods/contacts/addAddressBook.d.ts +3 -0
- package/rubjs/methods/contacts/addAddressBook.js +17 -0
- package/rubjs/methods/contacts/deleteContact.d.ts +3 -0
- package/rubjs/methods/contacts/deleteContact.js +17 -0
- package/rubjs/methods/contacts/getContacts.d.ts +3 -0
- package/rubjs/methods/contacts/getContacts.js +17 -0
- package/rubjs/methods/contacts/getContactsLastOnline.d.ts +3 -0
- package/rubjs/methods/contacts/getContactsLastOnline.js +17 -0
- package/rubjs/methods/contacts/getContactsUpdates.d.ts +3 -0
- package/rubjs/methods/contacts/getContactsUpdates.js +17 -0
- package/rubjs/methods/contacts/index.d.ts +7 -0
- package/rubjs/methods/contacts/index.js +18 -0
- package/rubjs/methods/contacts/resetContacts.d.ts +3 -0
- package/rubjs/methods/contacts/resetContacts.js +18 -0
- package/rubjs/methods/extras/banMember.d.ts +3 -0
- package/rubjs/methods/extras/banMember.js +20 -0
- package/rubjs/methods/extras/getInfo.d.ts +3 -0
- package/rubjs/methods/extras/getInfo.js +26 -0
- package/rubjs/methods/extras/getObjectByUsername.d.ts +3 -0
- package/rubjs/methods/extras/getObjectByUsername.js +19 -0
- package/rubjs/methods/extras/getProfileLinkItems.d.ts +3 -0
- package/rubjs/methods/extras/getProfileLinkItems.js +17 -0
- package/rubjs/methods/extras/getRelatedObjects.d.ts +3 -0
- package/rubjs/methods/extras/getRelatedObjects.js +17 -0
- package/rubjs/methods/extras/getTranscription.d.ts +3 -0
- package/rubjs/methods/extras/getTranscription.js +20 -0
- package/rubjs/methods/extras/index.d.ts +13 -0
- package/rubjs/methods/extras/index.js +30 -0
- package/rubjs/methods/extras/join.d.ts +3 -0
- package/rubjs/methods/extras/join.js +22 -0
- package/rubjs/methods/extras/leaveChat.d.ts +3 -0
- package/rubjs/methods/extras/leaveChat.js +20 -0
- package/rubjs/methods/extras/reportObject.d.ts +14 -0
- package/rubjs/methods/extras/reportObject.js +32 -0
- package/rubjs/methods/extras/searchGlobalObjects.d.ts +3 -0
- package/rubjs/methods/extras/searchGlobalObjects.js +17 -0
- package/rubjs/methods/extras/transcribeVoice.d.ts +3 -0
- package/rubjs/methods/extras/transcribeVoice.js +17 -0
- package/rubjs/methods/extras/userIsAdmin.d.ts +3 -0
- package/rubjs/methods/extras/userIsAdmin.js +29 -0
- package/rubjs/methods/gif/addToMyGifSet.d.ts +3 -0
- package/rubjs/methods/gif/addToMyGifSet.js +17 -0
- package/rubjs/methods/gif/getMyGifSet.d.ts +3 -0
- package/rubjs/methods/gif/getMyGifSet.js +17 -0
- package/rubjs/methods/gif/index.d.ts +4 -0
- package/rubjs/methods/gif/index.js +12 -0
- package/rubjs/methods/gif/removeFromMyGifSet.d.ts +3 -0
- package/rubjs/methods/gif/removeFromMyGifSet.js +17 -0
- package/rubjs/methods/groups/addGroup.d.ts +3 -0
- package/rubjs/methods/groups/addGroup.js +19 -0
- package/rubjs/methods/groups/addGroupMembers.d.ts +3 -0
- package/rubjs/methods/groups/addGroupMembers.js +19 -0
- package/rubjs/methods/groups/banGroupMember.d.ts +3 -0
- package/rubjs/methods/groups/banGroupMember.js +23 -0
- package/rubjs/methods/groups/createGroupVoiceChat.d.ts +3 -0
- package/rubjs/methods/groups/createGroupVoiceChat.js +17 -0
- package/rubjs/methods/groups/deleteNoAccessGroupChat.d.ts +3 -0
- package/rubjs/methods/groups/deleteNoAccessGroupChat.js +17 -0
- package/rubjs/methods/groups/discardGroupVoiceChat.d.ts +3 -0
- package/rubjs/methods/groups/discardGroupVoiceChat.js +20 -0
- package/rubjs/methods/groups/editGroupInfo.d.ts +6 -0
- package/rubjs/methods/groups/editGroupInfo.js +51 -0
- package/rubjs/methods/groups/getBannedGroupMembers.d.ts +3 -0
- package/rubjs/methods/groups/getBannedGroupMembers.js +17 -0
- package/rubjs/methods/groups/getGroupAdminAccessList.d.ts +3 -0
- package/rubjs/methods/groups/getGroupAdminAccessList.js +20 -0
- package/rubjs/methods/groups/getGroupAdminMembers.d.ts +3 -0
- package/rubjs/methods/groups/getGroupAdminMembers.js +17 -0
- package/rubjs/methods/groups/getGroupAllMembers.d.ts +3 -0
- package/rubjs/methods/groups/getGroupAllMembers.js +21 -0
- package/rubjs/methods/groups/getGroupDefaultAccess.d.ts +3 -0
- package/rubjs/methods/groups/getGroupDefaultAccess.js +17 -0
- package/rubjs/methods/groups/getGroupInfo.d.ts +3 -0
- package/rubjs/methods/groups/getGroupInfo.js +17 -0
- package/rubjs/methods/groups/getGroupLink.d.ts +3 -0
- package/rubjs/methods/groups/getGroupLink.js +17 -0
- package/rubjs/methods/groups/getGroupMentionList.d.ts +3 -0
- package/rubjs/methods/groups/getGroupMentionList.js +20 -0
- package/rubjs/methods/groups/getGroupOnlineCount.d.ts +3 -0
- package/rubjs/methods/groups/getGroupOnlineCount.js +17 -0
- package/rubjs/methods/groups/getGroupVoiceChatUpdates.d.ts +3 -0
- package/rubjs/methods/groups/getGroupVoiceChatUpdates.js +21 -0
- package/rubjs/methods/groups/groupPreviewByJoinLink.d.ts +3 -0
- package/rubjs/methods/groups/groupPreviewByJoinLink.js +19 -0
- package/rubjs/methods/groups/index.d.ts +28 -0
- package/rubjs/methods/groups/index.js +60 -0
- package/rubjs/methods/groups/joinGroup.d.ts +3 -0
- package/rubjs/methods/groups/joinGroup.js +19 -0
- package/rubjs/methods/groups/leaveGroup.d.ts +3 -0
- package/rubjs/methods/groups/leaveGroup.js +17 -0
- package/rubjs/methods/groups/leaveGroupVoiceChat.d.ts +3 -0
- package/rubjs/methods/groups/leaveGroupVoiceChat.js +20 -0
- package/rubjs/methods/groups/removeGroup.d.ts +3 -0
- package/rubjs/methods/groups/removeGroup.js +17 -0
- package/rubjs/methods/groups/seenGroupMessages.d.ts +3 -0
- package/rubjs/methods/groups/seenGroupMessages.js +21 -0
- package/rubjs/methods/groups/setGroupAdmin.d.ts +5 -0
- package/rubjs/methods/groups/setGroupAdmin.js +26 -0
- package/rubjs/methods/groups/setGroupDefaultAccess.d.ts +4 -0
- package/rubjs/methods/groups/setGroupDefaultAccess.js +22 -0
- package/rubjs/methods/groups/setGroupLink.d.ts +3 -0
- package/rubjs/methods/groups/setGroupLink.js +17 -0
- package/rubjs/methods/groups/setGroupVoiceChatSetting.d.ts +3 -0
- package/rubjs/methods/groups/setGroupVoiceChatSetting.js +26 -0
- package/rubjs/methods/index.d.ts +181 -16
- package/rubjs/methods/index.js +907 -24
- package/rubjs/methods/messages/actionOnMessageReaction.d.ts +3 -0
- package/rubjs/methods/messages/actionOnMessageReaction.js +25 -0
- package/rubjs/methods/messages/createPoll.d.ts +3 -0
- package/rubjs/methods/messages/createPoll.js +35 -0
- package/rubjs/methods/messages/deleteMessages.d.ts +3 -0
- package/rubjs/methods/messages/deleteMessages.js +26 -0
- package/rubjs/methods/messages/editMessage.d.ts +3 -0
- package/rubjs/methods/messages/editMessage.js +23 -0
- package/rubjs/methods/messages/forwardMessages.d.ts +3 -0
- package/rubjs/methods/messages/forwardMessages.js +31 -0
- package/rubjs/methods/messages/getMessageShareUrl.d.ts +3 -0
- package/rubjs/methods/messages/getMessageShareUrl.js +17 -0
- package/rubjs/methods/messages/getMessages.d.ts +3 -0
- package/rubjs/methods/messages/getMessages.js +23 -0
- package/rubjs/methods/messages/getMessagesByID.d.ts +3 -0
- package/rubjs/methods/messages/getMessagesByID.js +22 -0
- package/rubjs/methods/messages/getMessagesInterval.d.ts +3 -0
- package/rubjs/methods/messages/getMessagesInterval.js +20 -0
- package/rubjs/methods/messages/getMessagesUpdates.d.ts +3 -0
- package/rubjs/methods/messages/getMessagesUpdates.js +17 -0
- package/rubjs/methods/messages/getPollOptionVoters.d.ts +3 -0
- package/rubjs/methods/messages/getPollOptionVoters.js +21 -0
- package/rubjs/methods/messages/getPollStatus.d.ts +3 -0
- package/rubjs/methods/messages/getPollStatus.js +17 -0
- package/rubjs/methods/messages/index.d.ts +26 -0
- package/rubjs/methods/messages/index.js +56 -0
- package/rubjs/methods/messages/requestSendFile.d.ts +4 -0
- package/rubjs/methods/messages/requestSendFile.js +22 -0
- package/rubjs/methods/messages/sendDocument.d.ts +3 -0
- package/rubjs/methods/messages/sendDocument.js +17 -0
- package/rubjs/methods/messages/sendGif.d.ts +3 -0
- package/rubjs/methods/messages/sendGif.js +17 -0
- package/rubjs/methods/messages/sendMessage.d.ts +3 -0
- package/rubjs/methods/messages/sendMessage.js +134 -0
- package/rubjs/methods/messages/sendMusic.d.ts +3 -0
- package/rubjs/methods/messages/sendMusic.js +17 -0
- package/rubjs/methods/messages/sendPhoto.d.ts +3 -0
- package/rubjs/methods/messages/sendPhoto.js +17 -0
- package/rubjs/methods/messages/sendSticker.d.ts +3 -0
- package/rubjs/methods/messages/sendSticker.js +17 -0
- package/rubjs/methods/messages/sendText.d.ts +3 -0
- package/rubjs/methods/messages/sendText.js +17 -0
- package/rubjs/methods/messages/sendVideo.d.ts +3 -0
- package/rubjs/methods/messages/sendVideo.js +17 -0
- package/rubjs/methods/messages/sendVideoMessage.d.ts +3 -0
- package/rubjs/methods/messages/sendVideoMessage.js +17 -0
- package/rubjs/methods/messages/sendVoice.d.ts +3 -0
- package/rubjs/methods/messages/sendVoice.js +17 -0
- package/rubjs/methods/messages/setPinMessage.d.ts +3 -0
- package/rubjs/methods/messages/setPinMessage.js +23 -0
- package/rubjs/methods/messages/votePoll.d.ts +3 -0
- package/rubjs/methods/messages/votePoll.js +17 -0
- package/rubjs/methods/settings/changePassword.d.ts +3 -0
- package/rubjs/methods/settings/changePassword.js +17 -0
- package/rubjs/methods/settings/checkTwoStepPasscode.d.ts +3 -0
- package/rubjs/methods/settings/checkTwoStepPasscode.js +17 -0
- package/rubjs/methods/settings/deleteFolder.d.ts +3 -0
- package/rubjs/methods/settings/deleteFolder.js +17 -0
- package/rubjs/methods/settings/getBlockedUsers.d.ts +3 -0
- package/rubjs/methods/settings/getBlockedUsers.js +17 -0
- package/rubjs/methods/settings/getFolders.d.ts +3 -0
- package/rubjs/methods/settings/getFolders.js +17 -0
- package/rubjs/methods/settings/getMySessions.d.ts +3 -0
- package/rubjs/methods/settings/getMySessions.js +17 -0
- package/rubjs/methods/settings/getPrivacySetting.d.ts +3 -0
- package/rubjs/methods/settings/getPrivacySetting.js +17 -0
- package/rubjs/methods/settings/getSuggestedFolders.d.ts +3 -0
- package/rubjs/methods/settings/getSuggestedFolders.js +17 -0
- package/rubjs/methods/settings/getTwoPasscodeStatus.d.ts +3 -0
- package/rubjs/methods/settings/getTwoPasscodeStatus.js +17 -0
- package/rubjs/methods/settings/index.d.ts +19 -0
- package/rubjs/methods/settings/index.js +42 -0
- package/rubjs/methods/settings/requestRecoveryEmail.d.ts +3 -0
- package/rubjs/methods/settings/requestRecoveryEmail.js +20 -0
- package/rubjs/methods/settings/setSetting.d.ts +5 -0
- package/rubjs/methods/settings/setSetting.js +50 -0
- package/rubjs/methods/settings/setupTwoStepVerification.d.ts +3 -0
- package/rubjs/methods/settings/setupTwoStepVerification.js +21 -0
- package/rubjs/methods/settings/terminateOtherSessions.d.ts +3 -0
- package/rubjs/methods/settings/terminateOtherSessions.js +18 -0
- package/rubjs/methods/settings/terminateSession.d.ts +3 -0
- package/rubjs/methods/settings/terminateSession.js +17 -0
- package/rubjs/methods/settings/turnOffTwoStep.d.ts +3 -0
- package/rubjs/methods/settings/turnOffTwoStep.js +18 -0
- package/rubjs/methods/settings/updateProfile.d.ts +3 -0
- package/rubjs/methods/settings/updateProfile.js +30 -0
- package/rubjs/methods/settings/updateUsername.d.ts +3 -0
- package/rubjs/methods/settings/updateUsername.js +17 -0
- package/rubjs/methods/settings/verifyRecoveryEmail.d.ts +3 -0
- package/rubjs/methods/settings/verifyRecoveryEmail.js +17 -0
- package/rubjs/methods/stickers/actionOnStickerSet.d.ts +3 -0
- package/rubjs/methods/stickers/actionOnStickerSet.js +19 -0
- package/rubjs/methods/stickers/getMyStickerSets.d.ts +3 -0
- package/rubjs/methods/stickers/getMyStickerSets.js +17 -0
- package/rubjs/methods/stickers/getStickerSetByID.d.ts +3 -0
- package/rubjs/methods/stickers/getStickerSetByID.js +17 -0
- package/rubjs/methods/stickers/getStickersByEmoji.d.ts +3 -0
- package/rubjs/methods/stickers/getStickersByEmoji.js +17 -0
- package/rubjs/methods/stickers/getStickersBySetIds.d.ts +3 -0
- package/rubjs/methods/stickers/getStickersBySetIds.js +19 -0
- package/rubjs/methods/stickers/getTrendStickerSets.d.ts +3 -0
- package/rubjs/methods/stickers/getTrendStickerSets.js +17 -0
- package/rubjs/methods/stickers/index.d.ts +8 -0
- package/rubjs/methods/stickers/index.js +20 -0
- package/rubjs/methods/stickers/searchStickers.d.ts +3 -0
- package/rubjs/methods/stickers/searchStickers.js +17 -0
- package/rubjs/methods/users/checkUserUsername.d.ts +3 -0
- package/rubjs/methods/users/checkUserUsername.js +17 -0
- package/rubjs/methods/users/deleteUserChat.d.ts +3 -0
- package/rubjs/methods/users/deleteUserChat.js +20 -0
- package/rubjs/methods/users/getMe.d.ts +3 -0
- package/rubjs/methods/users/getMe.js +17 -0
- package/rubjs/methods/users/getUserInfo.d.ts +4 -0
- package/rubjs/methods/users/{get_user_info.js → getUserInfo.js} +2 -2
- package/rubjs/methods/users/index.d.ts +6 -2
- package/rubjs/methods/users/index.js +11 -3
- package/rubjs/methods/users/setBlockUser.d.ts +3 -0
- package/rubjs/methods/users/setBlockUser.js +19 -0
- package/rubjs/methods/utilities/download.d.ts +3 -0
- package/rubjs/methods/utilities/download.js +17 -0
- package/rubjs/methods/utilities/downloadProfilePicture.d.ts +3 -0
- package/rubjs/methods/utilities/downloadProfilePicture.js +27 -0
- package/rubjs/methods/utilities/index.d.ts +5 -2
- package/rubjs/methods/utilities/index.js +9 -3
- package/rubjs/methods/utilities/run.js +8 -1
- package/rubjs/methods/utilities/start.js +7 -5
- package/rubjs/methods/utilities/thumbnail.d.ts +5 -0
- package/rubjs/methods/utilities/thumbnail.js +61 -0
- package/rubjs/network/index.d.ts +10 -2
- package/rubjs/network/index.js +122 -10
- package/rubjs/parser/index.d.ts +25 -0
- package/rubjs/parser/index.js +110 -0
- package/rubjs/session/index.js +1 -1
- package/rubjs/types/{sign_in.d.ts → auth.d.ts} +11 -1
- package/rubjs/types/chats.d.ts +79 -0
- package/rubjs/types/{message_update.d.ts → decorators.d.ts} +56 -0
- package/rubjs/types/groups.d.ts +129 -0
- package/rubjs/types/index.d.ts +8 -9
- package/rubjs/types/index.js +51 -0
- package/rubjs/types/message.d.ts +18 -0
- package/rubjs/types/message.js +31 -0
- package/rubjs/types/messages.d.ts +176 -0
- package/rubjs/types/{get_user_info.d.ts → users.d.ts} +1 -0
- package/rubjs/utils/filters.d.ts +28 -25
- package/rubjs/utils/filters.js +89 -38
- package/rubjs/utils/index.d.ts +2 -1
- package/rubjs/utils/index.js +3 -1
- package/rubjs/utils/utils.d.ts +10 -0
- package/rubjs/utils/utils.js +12 -0
- package/rubjs/methods/auth/register_device.d.ts +0 -3
- package/rubjs/methods/auth/send_code.d.ts +0 -4
- package/rubjs/methods/auth/sign_in.d.ts +0 -4
- package/rubjs/methods/users/get_user_info.d.ts +0 -4
- package/rubjs/methods/utilities/on_chat_updates.d.ts +0 -4
- package/rubjs/methods/utilities/on_message_updates.d.ts +0 -4
- package/rubjs/methods/utilities/on_show_activities.d.ts +0 -4
- package/rubjs/methods/utilities/on_show_notifications.d.ts +0 -4
- package/rubjs/types/chat_updates.d.ts +0 -26
- package/rubjs/types/filters_optiom.d.ts +0 -10
- package/rubjs/types/send_code.d.ts +0 -10
- package/rubjs/types/show_activities.d.ts +0 -7
- package/rubjs/types/show_notifications.d.ts +0 -14
- package/rubjs/types/show_notifications.js +0 -2
- package/rubjs/types/sign_in.js +0 -2
- /package/rubjs/types/{chat_updates.js → auth.js} +0 -0
- /package/rubjs/types/{filters_optiom.js → chats.js} +0 -0
- /package/rubjs/types/{get_user_info.js → decorators.js} +0 -0
- /package/rubjs/types/{message_update.js → groups.js} +0 -0
- /package/rubjs/types/{send_code.js → messages.js} +0 -0
- /package/rubjs/types/{show_activities.js → users.js} +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function uploadAvatar(object_guid, image) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
if (["me", "cloud", "self"].includes(object_guid.toLocaleLowerCase()))
|
15
|
+
object_guid = this.userGuid;
|
16
|
+
let file_name;
|
17
|
+
if (typeof image == "string")
|
18
|
+
file_name = image.split("/")[-1];
|
19
|
+
else
|
20
|
+
file_name = "avatar.jpg";
|
21
|
+
const upload = yield this.network.uploadFile(image);
|
22
|
+
return yield this.builder("uploadAvatar", {
|
23
|
+
object_guid,
|
24
|
+
thumbnail_file_id: upload.file_id,
|
25
|
+
main_file_id: upload.file_id,
|
26
|
+
});
|
27
|
+
});
|
28
|
+
}
|
29
|
+
exports.default = uploadAvatar;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function addAddressBook(phone_1, first_name_1) {
|
13
|
+
return __awaiter(this, arguments, void 0, function* (phone, first_name, last_name = "") {
|
14
|
+
return yield this.builder("addAddressBook", { phone, first_name, last_name });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = addAddressBook;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function deleteContact(user_guid) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("deleteContact", { user_guid });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = deleteContact;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getContacts(start_id) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("getContacts", { start_id });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = getContacts;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getContactsLastOnline(user_guids) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("getContactsLastOnline", { user_guids });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = getContactsLastOnline;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getContactsUpdates() {
|
13
|
+
return __awaiter(this, arguments, void 0, function* (state = Math.round(Date.now() / 1000) - 150) {
|
14
|
+
return yield this.builder("getContactsUpdates", { state });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = getContactsUpdates;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import addAddressBook from "./addAddressBook";
|
2
|
+
import deleteContact from "./deleteContact";
|
3
|
+
import getContacts from "./getContacts";
|
4
|
+
import getContactsLastOnline from "./getContactsLastOnline";
|
5
|
+
import getContactsUpdates from "./getContactsUpdates";
|
6
|
+
import resetContacts from "./resetContacts";
|
7
|
+
export { addAddressBook, deleteContact, getContacts, getContactsLastOnline, getContactsUpdates, resetContacts };
|
@@ -0,0 +1,18 @@
|
|
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.resetContacts = exports.getContactsUpdates = exports.getContactsLastOnline = exports.getContacts = exports.deleteContact = exports.addAddressBook = void 0;
|
7
|
+
const addAddressBook_1 = __importDefault(require("./addAddressBook"));
|
8
|
+
exports.addAddressBook = addAddressBook_1.default;
|
9
|
+
const deleteContact_1 = __importDefault(require("./deleteContact"));
|
10
|
+
exports.deleteContact = deleteContact_1.default;
|
11
|
+
const getContacts_1 = __importDefault(require("./getContacts"));
|
12
|
+
exports.getContacts = getContacts_1.default;
|
13
|
+
const getContactsLastOnline_1 = __importDefault(require("./getContactsLastOnline"));
|
14
|
+
exports.getContactsLastOnline = getContactsLastOnline_1.default;
|
15
|
+
const getContactsUpdates_1 = __importDefault(require("./getContactsUpdates"));
|
16
|
+
exports.getContactsUpdates = getContactsUpdates_1.default;
|
17
|
+
const resetContacts_1 = __importDefault(require("./resetContacts"));
|
18
|
+
exports.resetContacts = resetContacts_1.default;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function resetContacts() {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder('resetContacts', {});
|
15
|
+
});
|
16
|
+
}
|
17
|
+
;
|
18
|
+
exports.default = resetContacts;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function banMember(object_guid, member_guid) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
if (object_guid.startsWith("g0"))
|
15
|
+
return yield this.banGroupMember(object_guid, member_guid);
|
16
|
+
else if (object_guid.startsWith("c0"))
|
17
|
+
return yield this.banChannelMember(object_guid, member_guid);
|
18
|
+
});
|
19
|
+
}
|
20
|
+
exports.default = banMember;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getInfo(object_guid, username) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
if (typeof object_guid === "string") {
|
15
|
+
if (object_guid.startsWith("g0"))
|
16
|
+
return yield this.getGroupInfo(object_guid);
|
17
|
+
else if (object_guid.startsWith("c0"))
|
18
|
+
return yield this.getChannelInfo(object_guid);
|
19
|
+
else if (object_guid.startsWith("u0"))
|
20
|
+
return yield this.getUserInfo(object_guid);
|
21
|
+
}
|
22
|
+
if (typeof username === "string")
|
23
|
+
return yield this.getObjectByUsername(username);
|
24
|
+
});
|
25
|
+
}
|
26
|
+
exports.default = getInfo;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getObjectByUsername(username) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("getObjectByUsername", {
|
15
|
+
username: username.replace("@", ""),
|
16
|
+
});
|
17
|
+
});
|
18
|
+
}
|
19
|
+
exports.default = getObjectByUsername;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getProfileLinkItems(object_guid) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("getProfileLinkItems", { object_guid });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = getProfileLinkItems;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getRelatedObjects(object_guid) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("getRelatedObjects", { object_guid });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = getRelatedObjects;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function getTranscription(message_id, transcription_id) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("getTranscription", {
|
15
|
+
message_id,
|
16
|
+
transcription_id,
|
17
|
+
});
|
18
|
+
});
|
19
|
+
}
|
20
|
+
exports.default = getTranscription;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import banMember from "./banMember";
|
2
|
+
import getInfo from "./getInfo";
|
3
|
+
import getObjectByUsername from "./getObjectByUsername";
|
4
|
+
import getProfileLinkItems from "./getProfileLinkItems";
|
5
|
+
import getRelatedObjects from "./getRelatedObjects";
|
6
|
+
import getTranscription from "./getTranscription";
|
7
|
+
import join from "./join";
|
8
|
+
import leaveChat from "./leaveChat";
|
9
|
+
import reportObject from "./reportObject";
|
10
|
+
import searchGlobalObjects from "./searchGlobalObjects";
|
11
|
+
import transcribeVoice from "./transcribeVoice";
|
12
|
+
import userIsAdmin from "./userIsAdmin";
|
13
|
+
export { banMember, getInfo, getObjectByUsername, getProfileLinkItems, getRelatedObjects, getTranscription, join, leaveChat, reportObject, searchGlobalObjects, transcribeVoice, userIsAdmin, };
|
@@ -0,0 +1,30 @@
|
|
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.userIsAdmin = exports.transcribeVoice = exports.searchGlobalObjects = exports.reportObject = exports.leaveChat = exports.join = exports.getTranscription = exports.getRelatedObjects = exports.getProfileLinkItems = exports.getObjectByUsername = exports.getInfo = exports.banMember = void 0;
|
7
|
+
const banMember_1 = __importDefault(require("./banMember"));
|
8
|
+
exports.banMember = banMember_1.default;
|
9
|
+
const getInfo_1 = __importDefault(require("./getInfo"));
|
10
|
+
exports.getInfo = getInfo_1.default;
|
11
|
+
const getObjectByUsername_1 = __importDefault(require("./getObjectByUsername"));
|
12
|
+
exports.getObjectByUsername = getObjectByUsername_1.default;
|
13
|
+
const getProfileLinkItems_1 = __importDefault(require("./getProfileLinkItems"));
|
14
|
+
exports.getProfileLinkItems = getProfileLinkItems_1.default;
|
15
|
+
const getRelatedObjects_1 = __importDefault(require("./getRelatedObjects"));
|
16
|
+
exports.getRelatedObjects = getRelatedObjects_1.default;
|
17
|
+
const getTranscription_1 = __importDefault(require("./getTranscription"));
|
18
|
+
exports.getTranscription = getTranscription_1.default;
|
19
|
+
const join_1 = __importDefault(require("./join"));
|
20
|
+
exports.join = join_1.default;
|
21
|
+
const leaveChat_1 = __importDefault(require("./leaveChat"));
|
22
|
+
exports.leaveChat = leaveChat_1.default;
|
23
|
+
const reportObject_1 = __importDefault(require("./reportObject"));
|
24
|
+
exports.reportObject = reportObject_1.default;
|
25
|
+
const searchGlobalObjects_1 = __importDefault(require("./searchGlobalObjects"));
|
26
|
+
exports.searchGlobalObjects = searchGlobalObjects_1.default;
|
27
|
+
const transcribeVoice_1 = __importDefault(require("./transcribeVoice"));
|
28
|
+
exports.transcribeVoice = transcribeVoice_1.default;
|
29
|
+
const userIsAdmin_1 = __importDefault(require("./userIsAdmin"));
|
30
|
+
exports.userIsAdmin = userIsAdmin_1.default;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function join(chat) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
if (chat.startsWith("c0"))
|
15
|
+
return yield this.joinChannelAction(chat);
|
16
|
+
else if (chat.includes("joing"))
|
17
|
+
return yield this.joinGroup(chat);
|
18
|
+
else if (chat.includes("joinc"))
|
19
|
+
return yield this.joinChannelByLink(chat);
|
20
|
+
});
|
21
|
+
}
|
22
|
+
exports.default = join;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function leaveChat(object_guid) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
if (object_guid.startsWith("c0"))
|
15
|
+
return yield this.joinChannelAction(object_guid, "Remove");
|
16
|
+
if (object_guid.startsWith("g0"))
|
17
|
+
return yield this.leaveGroup(object_guid);
|
18
|
+
});
|
19
|
+
}
|
20
|
+
exports.default = leaveChat;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import Client from "../..";
|
2
|
+
type ReporttypeObject = "Object" | "Message";
|
3
|
+
declare const ReportType: {
|
4
|
+
readonly OTHER: 100;
|
5
|
+
readonly VIOLENCE: 101;
|
6
|
+
readonly SPAM: 102;
|
7
|
+
readonly PORNOGRAPHY: 103;
|
8
|
+
readonly CHILD_ABUSE: 104;
|
9
|
+
readonly COPYRIGHT: 105;
|
10
|
+
readonly FISHING: 106;
|
11
|
+
};
|
12
|
+
type ReportType = typeof ReportType;
|
13
|
+
declare function reportObject(this: Client, object_guid: string, report_type: ReportType, description: string, message_id: string, report_type_object: ReporttypeObject): Promise<any>;
|
14
|
+
export default reportObject;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const ReportType = {
|
13
|
+
OTHER: 100,
|
14
|
+
VIOLENCE: 101,
|
15
|
+
SPAM: 102,
|
16
|
+
PORNOGRAPHY: 103,
|
17
|
+
CHILD_ABUSE: 104,
|
18
|
+
COPYRIGHT: 105,
|
19
|
+
FISHING: 106,
|
20
|
+
};
|
21
|
+
function reportObject(object_guid, report_type, description, message_id, report_type_object) {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
return yield this.builder("reportObject", {
|
24
|
+
object_guid,
|
25
|
+
report_type,
|
26
|
+
description,
|
27
|
+
message_id,
|
28
|
+
report_type_object,
|
29
|
+
});
|
30
|
+
});
|
31
|
+
}
|
32
|
+
exports.default = reportObject;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function searchGlobalObjects(search_text) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("searchGlobalObjects", { search_text });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = searchGlobalObjects;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function transcribeVoice(object_guid, message_id) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("transcribeVoice", { object_guid, message_id });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = transcribeVoice;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function userIsAdmin(object_guid, user_guid) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
let hasContinue = true;
|
15
|
+
let nextStartID = null;
|
16
|
+
while (hasContinue) {
|
17
|
+
let result = object_guid.startsWith("g0")
|
18
|
+
? yield this.getGroupAdminMembers(object_guid, nextStartID)
|
19
|
+
: yield this.getChannelAdminMembers(object_guid, nextStartID);
|
20
|
+
hasContinue = result.has_continue;
|
21
|
+
nextStartID = result.next_start_id;
|
22
|
+
for (let user of result.in_chat_members)
|
23
|
+
if (user_guid === user.member_guid)
|
24
|
+
return true;
|
25
|
+
}
|
26
|
+
return false;
|
27
|
+
});
|
28
|
+
}
|
29
|
+
exports.default = userIsAdmin;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
function addToMyGifSet(object_guid, message_id) {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
return yield this.builder("addToMyGifSet", { object_guid, message_id });
|
15
|
+
});
|
16
|
+
}
|
17
|
+
exports.default = addToMyGifSet;
|