import { TelegramClient } from 'telegram'; import { Dog, DogProfile } from 'dprx-types'; import { StringSession } from 'telegram/sessions'; import { TelegramClientParams } from 'telegram/client/telegramBaseClient'; export declare class DogExt extends Dog { client?: TelegramClient; clientParams?: TelegramClientParams; } export declare type DogLog = (opts: { roomId: string; phone: string; error?: any; info?: any; inputKey?: string; profile?: DogProfile; session?: string; updateStatus?: boolean; telegramId?: string; result?: any; propertyKey?: string; }) => void; export declare type DogSave = (dog: Dog) => Promise; export declare type DogDelete = (phone: string) => Promise; export declare type DogSleep = (phone: string, seconds: number) => Promise; export declare type UsersRestrcited = (tgUsersIds: string[]) => Promise; export declare type TTwoFaSettings = { currentPassword?: string; newPassword: string; hint: string; }; export declare class DogSvc { static log?: DogLog; static save?: DogSave; static del?: DogDelete; static sleep?: DogSleep; static restricted?: UsersRestrcited; static dogs: DogExt[]; protected static invalidPhones: string[]; protected static waitValues: { [phoneInputkey: string]: string; }; constructor(); static build({ roomId, dogs, log, save, del, dogSleep, restricted, }: { roomId: string; dogs: DogExt[]; log?: DogLog; save?: DogSave; del?: DogDelete; dogSleep?: DogSleep; restricted?: UsersRestrcited; }): Promise<{ deletedList: any[]; successList: DogExt[]; }>; static disconnectAll({}: {}): Promise; static addBulk({ parentDir, roomId, token, resetAuthorizations, twoFaSettings, }: { parentDir: string; roomId?: string; token: string; resetAuthorizations: boolean; twoFaSettings: TTwoFaSettings; }): Promise<{ result: any[]; }>; static load({ phone, subdir, appId, appHash, session, roomId, token, resetAuthorizations, twoFaSettings, privacies, }: { phone: string; subdir: string; appId: string; appHash: string; session: string; roomId: string; token: string; resetAuthorizations: boolean; twoFaSettings?: TTwoFaSettings; privacies?: { key: any; rules: any[]; }[]; }): Promise<{ error: string; dogExt?: undefined; resetAuthorizations?: undefined; } | { dogExt: DogExt; resetAuthorizations: false | { result?: any; error?: any; propertyKey?: string | undefined; }; error?: undefined; }>; static pauseDog({ phones }: { phones: string[]; }): Promise; static getDog({ phone }: { phone: string; }): DogExt | undefined; static getSession({ phone }: { phone: string; }): string | undefined; static getInputKey(phone: string, inputKey: string): string; static setInputKeyValue({ phone, inputKey, value }: { phone: string; inputKey: string; value: string; }): Promise; static waitInputKey({ phone, inputKey, timeout }: { phone: string; inputKey: string; timeout: number; }): Promise; protected static getStringSession(session: string): StringSession; static errorHandler({ error, phone }: { error: any; phone: string; }): Promise; }