import { Entry, Har } from 'har-format'; /** * Reads a HAR file and returns the parsed HAR object. * * @param {string} filePath - The path of the HAR file to read * @returns {Promise} The parsed HAR object * @throws Will throw an error if the HAR file cannot be read or parsed */ export declare function loadHarData(filePath: string): Promise; /** * Loads a HAR file, filters it, and saves the filtered result to a new file. * * @param {string} inputFilePath - The path of the input HAR file to load and filter. * @param {string} outputFilePath - The path of the output file to save the filtered HAR log. * @param {string} method - The HTTP method to filter by. * @param {string} endpoint - The endpoint (pathname and search) to filter by, e.g., "/users?id=123". * @param {RegExp} [endpointRegex] - Optional regular expression to match the endpoint against. * @param {boolean} [ignoreSearch=false] - Optional flag to ignore the search part of the URL when matching endpoints. * @param {string} [prefixToRemove] - Optional prefix to remove from the beginning of the `entry.request.path` property before matching the endpoint. * @param {boolean} [sanitize] - Optional remove headers and cookies from the har file. * @returns {Promise} A Promise that resolves when the filtered HAR log is saved to the output file, or rejects if there's an error. */ export declare function filterAndSaveHarLog(inputFilePath: string, outputFilePath: string, method: string, endpoint: string, endpointRegex?: RegExp, ignoreSearch?: boolean, prefixToRemove?: string, sanitize?: boolean): Promise; /** * Appends the given HAR entry to the existing HAR log and saves it to the specified file. * If the file does not exist or cannot be read, a new HAR log will be created with the given entry. * * @param {Entry} entry - The HAR entry to save * @param {string} filePath - The path of the file to save the HAR log to * @returns {Promise} The updated HAR object */ export declare function appendEntryAndSaveHar(entry: Entry, filePath: string): Promise;