import { Api } from 'telegram'; import { DogProfile, TResultError } from 'dprx-types'; import { DogExt, TTwoFaSettings } from './DogSvc'; import { EntityLike, MessageIDLike } from 'telegram/define'; export declare type TDogApiArgs = { phone: string; roomId: string; dogExt: DogExt; actionsNames?: string[]; profile?: DogProfile; telegramId?: string; channels?: any[]; users?: Api.InputPeerUser[]; }; export declare class DogApi { static exec(opts: TDogApiArgs): Promise<{ error: string; } | undefined>; 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({ dogExt, roomId, phone, fromPeer, toPeer, ids, silent, }: { fromPeer?: EntityLike; toPeer?: EntityLike; ids: number[]; silent?: boolean; } & TDogApiArgs): TResultError; static SendMessage({ dogExt, roomId, phone, message, peer, replyToMsgId, noWebpage, }: { message?: string; peer?: EntityLike; replyToMsgId?: number; noWebpage?: boolean; } & 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?: { channelId: string; accessHash: string; }[]; } & TDogApiArgs): TResultError; static GetDeeplinkInfo({ dogExt, roomId, phone, path }: { path?: string; } & TDogApiArgs): TResultError; static SearchGlobal({ dogExt, roomId, phone, link }: { link?: 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?: string; 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, roomId, phone, peer, topMsgId, }: { big?: boolean; emoticon?: string; peer?: string; topMsgId?: MessageIDLike; } & TDogApiArgs): TResultError; static SendReaction({ dogExt, roomId, phone, big, peer, msgId, emoticon, }: { big?: boolean; emoticon?: string; peer?: string; 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, roomId, phone, 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; static JoinTo({ dogExt, roomId, phone, channels }: TDogApiArgs): TResultError; static UpdateStatus({ dogExt, roomId, phone, offline, }: { offline?: boolean; } & TDogApiArgs): TResultError; static UpdateProfile(opts: { firstName?: string; lastName?: string; about?: string; } & TDogApiArgs): TResultError; static UpdateUsername(opts: { username: string; } & TDogApiArgs): Promise<{ result?: any; error?: any; propertyKey?: string | undefined; }>; static GetUsernamesChannelAsAdmin(opts: { channel: string; } & TDogApiArgs): Promise<{ result: { usernames: string[]; }; }>; static GetFullUser({ dogExt, roomId, phone, telegramId }: TDogApiArgs): TResultError; }