import type { AxiosError } from "axios"; /** * This class provides a wrapper for network errors when making requests to NewsCatcher-V3 Production API */ export declare class NewscatcherError extends Error { /** * The response body */ readonly responseBody: unknown; /** * The error code provided from the underlying "axios" library which can be * more descriptive than the HTTP status descriptions. */ readonly code?: string; /** * The status code from the response. * For explanations, refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */ readonly status?: number; /** * The status text from the response. * For explanations, refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */ readonly statusText?: string; /** * The URL that the original request was sent to */ readonly url?: string; /** * HTTP request method (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) */ readonly method?: string; constructor(axiosError: AxiosError, responseBody: unknown, headers: unknown); toJSON(): { name: string; message: string; method: string | undefined; url: string | undefined; code: string | undefined; status: number | undefined; statusText: string | undefined; responseBody: unknown; }; } export declare function readableStreamToString(stream: ReadableStream): Promise; export declare function parseIfJson(input: unknown): object | unknown;