import { HttpRequest } from '@angular/common/http'; import UrlPattern from 'url-pattern'; declare type IReq = 'get' | 'post' | 'put' | 'head' | 'delete' | 'patch' | 'options'; export declare type IMockCollectValue = { [key in IReq]?: IMockResponse | IMockData; }; export interface IMockCollect { method: string; url: string; params?: ISafeAny; pattern: UrlPattern; query?: ISafeAny; value: ISafeAny; } export interface IMockInfo extends IMockCollect { [key: string]: ISafeAny; method: string; url: string; params?: ISafeAny; } export interface IMockRequest { params?: ISafeAny; query?: ISafeAny; _httpReq: HttpRequest; } export interface IMockConfig { data: ISafeAny; log?: boolean; delay?: number; ignoreOtherInterceptors?: boolean; interceptors?: { response: (res: ISafeAny) => ISafeAny; }; } export interface IMockData { delay?: number; disable?: boolean; value: IMockResponse; } export declare type IMockResponse = (res: IMockRequest) => ISafeAny; export declare type ISafeAny = any; export declare const REQUEST_METHOD: string[]; export interface IMock { [key: string]: IMockResponse | IMockCollectValue; } export {};