import { Context, Schema, Service } from "koishi";
import { CookieJar } from 'tough-cookie';
import { Notifier } from "@koishijs/plugin-notifier";
declare module 'koishi' {
    interface Context {
        ba: BiliAPI;
    }
}
declare class BiliAPI extends Service {
    static inject: string[];
    jar: CookieJar;
    client: any;
    apiConfig: BiliAPI.Config;
    loginData: any;
    loginNotifier: Notifier;
    refreshCookieTimer: Function;
    loginInfoIsLoaded: boolean;
    constructor(ctx: Context, config: BiliAPI.Config);
    protected start(): void | Promise<void>;
    getMixinKey: (orig: string) => string;
    encWbi(params: {
        [key: string]: string | number | object;
    }, img_key: string, sub_key: string): string;
    getWbi(params: {
        [key: string]: string | number | object;
    }): Promise<string>;
    encrypt(text: string): string;
    decrypt(text: string): string;
    getLiveRoomInfoStreamKey(roomId: string): Promise<any>;
    getServerUTCTime(): Promise<number>;
    getTimeNow(): Promise<any>;
    getAllGroup(): Promise<any>;
    removeUserFromGroup(mid: string): Promise<any>;
    copyUserToGroup(mid: string, groupId: string): Promise<any>;
    getUserSpaceDynamic(mid: string): Promise<any>;
    createGroup(tag: string): Promise<any>;
    getAllDynamic(updateBaseline?: string): Promise<any>;
    hasNewDynamic(updateBaseline: string): Promise<any>;
    follow(fid: string): Promise<any>;
    getRelationGroupDetail(tagid: string): Promise<any>;
    getCookieInfo(refreshToken: string): Promise<any>;
    getUserInfo(mid: string): Promise<any>;
    getWbiKeys(): Promise<{
        img_key: any;
        sub_key: any;
    }>;
    getMyselfInfo(): Promise<any>;
    getLoginQRCode(): Promise<any>;
    getLoginStatus(qrcodeKey: string): Promise<any>;
    getLiveRoomInfo(roomId: string): Promise<any>;
    getMasterInfo(mid: string): Promise<any>;
    disposeNotifier(): void;
    getRandomUserAgent(): string;
    createNewClient(): void;
    getTimeOfUTC8(): number;
    getCookies(): string;
    getLoginInfoIsLoaded(): boolean;
    getLoginInfoFromDB(): Promise<{
        cookies: any;
        refresh_token: string;
    }>;
    getCSRF(): any;
    loadCookiesFromDatabase(): Promise<void>;
    enableRefreshCookiesDetect(): void;
    checkIfTokenNeedRefresh(refreshToken: string, csrf: string, times?: number): Promise<void>;
}
declare namespace BiliAPI {
    interface Config {
        userAgent: string;
        key: string;
    }
    const Config: Schema<Config>;
}
export default BiliAPI;
