import { Api } from 'telegram'; import { DogProfile, TResultError } from 'dprx-types'; import { DogExt, DogExtProfile, TTwoFaSettings } from '../..'; import { EntityLike, MessageIDLike } from 'telegram/define'; export type TDogApiArgs = { dogExt: DogExt; phone?: string; roomId?: string; actionsNames?: string[]; profile?: DogProfile; telegramId?: string; channels?: EntityLike[]; entity?: EntityLike; users?: Api.InputPeerUser[]; }; export declare class DogApi { #private; static exec(opts: TDogApiArgs): Promise<{ error: string; } | undefined>; static mute({ channel, participant, untilDate, }: { channel?: any; participant?: any; untilDate: number; }): TResultError; static getDialogs({ dogExt, excludePinned, limit, }: { excludePinned?: boolean; limit: number; } & TDogApiArgs): TResultError; static JoinChannelByUsername({ dogExt, roomId, phone, username, }: { username?: string; } & TDogApiArgs): TResultError; static InviteToChannel({ dogExt, roomId, phone, channelId, usersIds, }: { channelId?: string; usersIds?: string[]; } & TDogApiArgs): TResultError; static GetProfilePhoto({ dogExt, roomId, phone, userId, }: { userId?: string; } & TDogApiArgs): TResultError; static GetUsers({ dogExt, roomId, phone, ids, }: { ids: (string | number)[]; } & TDogApiArgs): TResultError; static ForwardMessages(opts: { fromPeer?: EntityLike; toPeer?: EntityLike; ids: number[]; topMsgId?: MessageIDLike; silent?: boolean; dropAuthor?: boolean; noforwards?: boolean; } & TDogApiArgs): TResultError; static SendMessage(opts: { message?: string; peer?: EntityLike; replyToMsgId?: number; topMsgId?: number; noWebpage?: boolean; } & TDogApiArgs): TResultError; static getForumTopics(opts: { peer?: EntityLike; limit?: number; } & TDogApiArgs): TResultError; static getForumTopicsByID(opts: { peer?: EntityLike; topics?: number[]; } & TDogApiArgs): TResultError; static readMessageContents({ dogExt, roomId, phone, channel, ids, }: { channel: EntityLike; ids: number[]; } & TDogApiArgs): TResultError; static markAsReadHistoryChannel({ dogExt, roomId, phone, channel, maxId, }: { channel: EntityLike; maxId: number; } & TDogApiArgs): TResultError; static markAsReadHistory({ dogExt, roomId, phone, peer, maxId, }: { peer: EntityLike; maxId: number; } & TDogApiArgs): TResultError; static getHistory({ dogExt, roomId, phone, peer, limit, addOffset, hash, maxId, minId, offsetDate, offsetId, }: { peer?: EntityLike; limit?: number; addOffset?: number; maxId?: number; minId?: number; offsetDate?: number; offsetId?: number; hash?: string; } & TDogApiArgs): TResultError; static GetUsersDialogs({ dogExt, roomId, phone, users, }: { users?: Api.InputPeerUser[]; } & TDogApiArgs): TResultError; static GetChannelsDialogs({ dogExt, roomId, phone, channels, }: { channels?: EntityLike[]; } & TDogApiArgs): TResultError; static GetDeeplinkInfo({ dogExt, roomId, phone, path }: { path?: string; } & TDogApiArgs): TResultError; static SearchGlobal({ dogExt, roomId, phone, link }: { link?: string; } & TDogApiArgs): TResultError; static search({ dogExt, roomId, phone, chantEntity, userEntity, }: { chantEntity: any; userEntity: any; q: string; } & TDogApiArgs): TResultError; static GetContact({ dogExt, roomId, phone, username }: { username?: string; } & TDogApiArgs): TResultError; static GetInviteChat({ dogExt, roomId, phone, username, }: { username?: string; } & TDogApiArgs): TResultError; static GetMessages({ dogExt, roomId, phone, channel, ids, }: { channel?: EntityLike; ids?: Api.InputMessageID[]; } & TDogApiArgs): TResultError; static GetChannels({ dogExt, roomId, phone, ids }: { ids?: string[]; } & TDogApiArgs): TResultError; static GetFullChannel({ dogExt, roomId, phone, channel, }: { channel?: string; } & TDogApiArgs): TResultError; static setTyping({ dogExt, peer, topMsgId, }: { peer?: EntityLike; topMsgId?: MessageIDLike; } & TDogApiArgs): TResultError; static SendReaction({ dogExt, roomId, phone, big, peer, msgId, emoticon, }: { big?: boolean; emoticon?: string; peer?: EntityLike; msgId?: MessageIDLike; } & TDogApiArgs): TResultError; static GetWebPage({ dogExt, roomId, phone, url }: { url?: string; } & TDogApiArgs): TResultError; static GetWebPagePreview({ dogExt, roomId, phone, message, }: { message?: string; } & TDogApiArgs): TResultError; static GetFullChat({ dogExt, roomId, phone, chatId }: { chatId?: string; } & TDogApiArgs): TResultError; static GetDialogs({ dogExt, offsetPeer, offsetDate, offsetId, folderId, hash, excludePinned, limit, }: { offsetPeer?: string; limit?: number; offsetDate?: number; offsetId?: number; excludePinned?: boolean; folderId?: number; hash?: string; } & TDogApiArgs): TResultError; static GetFolders({ dogExt, roomId, phone }: {} & TDogApiArgs): TResultError; static GetCommonChats({ dogExt, roomId, phone, userId, maxId, limit, }: { maxId?: number; limit?: number; userId?: string; } & TDogApiArgs): TResultError; static GetChats({ dogExt, roomId, phone, ids }: { ids?: string[]; } & TDogApiArgs): TResultError; static GetAllChats({ dogExt, roomId, phone, exceptIds, }: { exceptIds?: string[]; } & TDogApiArgs): TResultError; static UpdatePasswordSettings({ dogExt, roomId, phone, currentPassword, newPassword, hint, }: TTwoFaSettings & TDogApiArgs): TResultError; static ResetAuthorization({ dogExt, roomId, phone, hash }: { hash: string; } & TDogApiArgs): TResultError; static ResetAuthorizations({ dogExt, roomId, phone }: {} & TDogApiArgs): TResultError; static SetPrivacy({ dogExt, roomId, phone, privacy, }: { privacy?: { key: any; rules: any[]; }; } & TDogApiArgs): TResultError; static GetAuthorizations({ dogExt, roomId, phone }: {} & TDogApiArgs): TResultError; static GetGroupsForDiscussion({ dogExt, roomId, phone }: {} & TDogApiArgs): TResultError; static JoinToInviteLink({ dogExt, roomId, phone, link }: { link?: string; } & TDogApiArgs): TResultError<{ roomId?: string; phone?: string; invoke?: { importChatInvite: any; inviteChat: any; }; }>; private static getDialogPeer; static Join({ dogExt, roomId, phone, entity }: TDogApiArgs): TResultError; static JoinTo({ dogExt, roomId, phone, channels }: TDogApiArgs): TResultError; static UpdateStatus({ dogExt, roomId, phone, offline, }: { offline?: boolean; } & TDogApiArgs): TResultError; static leaveChannel({ dogExt, channel }: { channel: Api.InputChannel; } & TDogApiArgs): TResultError; static uploadProfilePhoto(opts: { filePath: string; } & TDogApiArgs): TResultError; static uploadProfilePhotoBase64(opts: { base64: string; } & TDogApiArgs): TResultError; static UpdateProfile(opts: { firstName?: string; lastName?: string; about?: string; } & TDogApiArgs): TResultError; static updateAboutUser(opts: { about?: string; } & TDogApiArgs): TResultError; static UpdateUsername(opts: { username: string; } & TDogApiArgs): Promise<{ result?: { profile: DogExtProfile; } | undefined; error?: any; propertyKey?: string | undefined; }>; static getParticipant({ dogExt, channel, participant, }: { channel: EntityLike; participant: EntityLike; } & TDogApiArgs): Promise<{ result: Api.channels.ChannelParticipant | undefined; }>; static isAdmin({ dogExt, channel, participant, }: { channel: EntityLike; participant: EntityLike; } & TDogApiArgs): Promise<{ result: Api.channels.ChannelParticipant | undefined; }>; static GetUsernamesChannelAsAdmin(opts: { channel: string; } & TDogApiArgs): Promise<{ result: { usernames: string[]; }; }>; static GetFullUser({ dogExt, roomId, phone, telegramId }: TDogApiArgs): TResultError<{ profile: DogExtProfile; }>; }