import { Api } from 'telegram'; import { Dog, DogBan, DogProfile, DogTask, RepostChatPrivacy, TResultError } from 'dprx-types'; import { DogExt } from '..'; export type DogSave = (dog: Dog) => Promise; export type DogDelete = (phone: string) => Promise; export type DogSpamBlock = (opts: { phone: string; entity?: string; }) => Promise; export type DogAddTaskEvt = (task: DogTask) => Promise; export type DogRemoveTaskEvt = (id: string) => Promise; export type DogSleep = (phone: string, seconds: number) => Promise; export type DogBanEvt = (phone: string, ban: DogBan) => Promise; export type UsersRestrcited = (tgUsersIds: string[]) => Promise; export type RepostChatPrivacyEvt = (repostChatPrivacy: RepostChatPrivacy) => Promise; export type UpdatesEvt = (opts: { update: Api.TypeUpdate; dogExt: DogExt; }) => Promise; export type CreateComment = (opts: { text: string; }) => TResultError; export type RewriteEvt = (opts: { html: string; targetLang: string; }) => TResultError; export type DogLogEvt = (opts: { roomId: string; phone: string; error?: any; info?: any; inputKey?: string; profile?: DogProfile; session?: string; updateStatus?: boolean; telegramId?: string; result?: any; propertyKey?: string; entity?: string; }) => void; export declare class DogExternalApi { static log?: DogLogEvt; static save?: DogSave; static del?: DogDelete; static sleep?: DogSleep; static spamBlock?: DogSpamBlock; static restricted?: UsersRestrcited; static ban?: DogBanEvt; static addTask?: DogAddTaskEvt; static rmTask?: DogRemoveTaskEvt; static repostChatPrivacy?: RepostChatPrivacyEvt; static updatesEvt?: UpdatesEvt; static createComment?: CreateComment; static rewriteEvt?: RewriteEvt; static build({ log, save, del, dogSleep, restricted, ban, spamBlock, addTask, rmTask, repostChatPrivacy, updatesEvt, createComment, rewriteEvt, }: { log?: DogLogEvt; save?: DogSave; del?: DogDelete; ban?: DogBanEvt; dogSleep?: DogSleep; restricted?: UsersRestrcited; spamBlock?: DogSpamBlock; addTask?: DogAddTaskEvt; rmTask?: DogRemoveTaskEvt; repostChatPrivacy?: RepostChatPrivacyEvt; updatesEvt?: UpdatesEvt; createComment?: CreateComment; rewriteEvt?: RewriteEvt; }): Promise; }