UNPKG

mwoffliner

Version:
26 lines (25 loc) 862 B
import { Dump } from 'src/Dump.js'; import { DownloadErrorContext } from './Downloader.js'; interface HttpReturnCodeRange { min: number; max: number; } interface JsonContain { key: string; valueContains: string[]; } interface MatchingRule { name: string; urlContains: string[] | null; httpReturnCodes: HttpReturnCodeRange[] | null; contentTypes: string[] | null; responseIsEmpty: boolean; rawResponseDataContains: string[] | null; jsonResponseDataContains: JsonContain[] | null; detailsMessageKey: string; displayThirdLine: boolean; isHardFailure: boolean; } export declare function findFirstMatchingRule(err: DownloadErrorContext): MatchingRule | null; export declare function renderDownloadError(matchingRule: MatchingRule, dump: Dump, articleId: string, articleTitle: string): string | null; export {};