import { IHeaders, ISerializedHttp } from './http-serializer'; export interface ISaveFile { records: ISerializedHttp[]; } export interface ISaveOptions { records?: ISerializedHttp[]; } export interface IFileOptions { filename: string; } export interface IPartialMockRequest { headers?: IHeaders; body?: string | object; port?: number; path?: string; method: string; protocol: 'http' | 'https'; host: string; } export interface IPartialMockResponse { body?: string | object; headers?: IHeaders; statusCode: number; } export interface IHttpMock { readonly request: IPartialMockRequest; readonly response: IPartialMockResponse; } /** * Read mocks from a specified file. * * @throws YesNoError If file is improperly formatted */ export declare function load({ filename }: IFileOptions): Promise; /** * Save HTTP records to the specified file */ export declare function save({ filename, records, }: ISaveOptions & IFileOptions): Promise; export declare function hydrateHttpMock(mock: IHttpMock): ISerializedHttp; /** * Get the generated filename for a mock name. */ export declare function getMockFilename(name: string, dir: string): string;