import { Context, Schema } from 'koishi';
import { ImageSource } from 'koishi-plugin-booru';
import { PixivAppApi } from './types';
declare class PixivImageSource extends ImageSource<PixivImageSource.Config> {
    static inject: {
        required: string[];
        optional: string[];
    };
    languages: string[];
    source: string;
    private userId?;
    private accessToken?;
    private refreshToken?;
    private refreshTime?;
    private logger;
    constructor(ctx: Context, config: PixivImageSource.Config);
    tokenize(query: string): string[];
    get(query: ImageSource.Query): Promise<ImageSource.Result[]>;
    search(keyword: string): Promise<PixivAppApi.Result>;
    recommend(): Promise<PixivAppApi.Result>;
    _login(): Promise<string>;
    _getHeaders(): Record<string, string>;
    _handleImage(url: string): Promise<string>;
}
declare namespace PixivImageSource {
    interface Config extends ImageSource.Config {
        endpoint: string;
        token?: string;
        target: 'partial_match_for_tags' | 'exact_match_for_tags' | 'title_and_caption';
        sort: 'date_desc' | 'date_asc' | 'popular_desc';
        duration: 'within_last_day' | 'within_last_week' | 'within_last_month' | 'all' | 'custom';
        minBookmarks: number;
        maxBookmarks: number;
        rank: number;
        ai: number;
        bypassMethod: 'proxy' | 'route' | 'asset';
        proxy?: {
            endpoint: string;
        } | string;
        route?: string;
        aesKey?: string;
    }
    const Config: Schema<Config>;
}
export default PixivImageSource;
