import { IJSDOM } from 'jsdom-extra'; import _NovelSite from '../index'; import { PromiseBluebird } from '../index'; import parseContentType from 'content-type-parser'; export type IOptionsPlus = {}; export type IDownloadOptions = _NovelSite.IDownloadOptions & _NovelSite.IOptions & IOptionsPlus; export type IOptionsRuntime = _NovelSite.IOptionsRuntime & IOptionsPlus; export import INovel = _NovelSite.INovel; import { ResponseRequest } from 'request'; import { IRowChapter, IRowVolume } from '../../tree'; export type IFetchChapter = { body?: any; dom?: IJSDOM; res?: ResponseRequest; json?: any; url?: URL; contentTypeParsed?: ReturnType; }; export type ISessionData = { [key: string]: any; }; export declare class NovelSiteDemo extends _NovelSite { static readonly IDKEY: string; constructor(options: IDownloadOptions, ...argv: any[]); /** * @todo 讓此方法有意義 * * 用來說明目前站點的所需 session cookies * * @param {T} data * @returns {T} */ checkSessionData(data: T, optionsRuntime?: IOptionsRuntime): T; session(optionsRuntime: Partial, url: URL, domain?: string): this; download(inputUrl: string | URL, downloadOptions?: IDownloadOptions): PromiseBluebird<_NovelSite.INovel>; protected _outputAttach(novel: INovel, optionsRuntime: IOptionsRuntime, _cache_: { url: URL; path_novel: string; }, ...argv: any[]): Promise | IRowChapter<{}> | import("../../tree").IRowRoot<{}>; }[]>; protected _processNovel(novel: INovel, optionsRuntime: IOptionsRuntime, _cache_: { url: URL; path_novel: string; }, ...argv: any[]): Promise; processNovel(novel: INovel, optionsRuntime: IOptionsRuntime, _cache_: { url: URL; path_novel: string; }, ...argv: any[]): PromiseBluebird<{ novel: _NovelSite.INovel; optionsRuntime: IOptionsRuntime; _cache_: { url: URL; path_novel: string; }; ret: T; }>; protected _stripContent(text: string): string; protected _parseChapter(ret: IFetchChapter, optionsRuntime: T & IOptionsRuntime, cache: { file: string; novel: _NovelSite.INovel; volume: _NovelSite.IVolume; chapter: _NovelSite.IChapter; doRetry: number; }): string | Promise; protected _fetchChapterRetryError(message: string, ret: IFetchChapter, optionsRuntime: T & IOptionsRuntime, cache: { file: string; novel: _NovelSite.INovel; volume: _NovelSite.IVolume; chapter: _NovelSite.IChapter; doRetry: number; }): Error & { doRetry: number; }; protected _fetchChapterMain(argv: { url: URL; file: string; volume: _NovelSite.IVolume; chapter: _NovelSite.IChapter; }, optionsRuntime: T & IOptionsRuntime, _cache_: { novel: INovel; }): PromiseBluebird; protected _fetchChapter(url: URL, optionsRuntime: T & IOptionsRuntime, _cache_: { novel: INovel; }): PromiseBluebird; protected _exportDownloadOptions(optionsRuntime?: T & IOptionsRuntime): Partial; protected _saveReadme(optionsRuntime: IOptionsRuntime, options?: {}, ...opts: any[]): Promise<{ file: string; md: string; }>; protected _get_meta(inputUrl: any, optionsRuntime: any, cache?: { dom?: IJSDOM; }): void; } export declare const NovelSite: typeof NovelSiteDemo; export default NovelSiteDemo;