/** * @module MockRuleData */ import { Method } from "../types"; import { RequestMatcher, MockRuleCtx } from "./mock-rule-types"; export declare type MatcherData = (WildcardMatcherData | SimpleMatcherData | HeaderMatcherData | FormDataMatcherData); export declare type MatcherType = MatcherData['type']; export declare type MatcherDataLookup = { 'wildcard': WildcardMatcherData; 'simple': SimpleMatcherData; 'header': HeaderMatcherData; 'form-data': FormDataMatcherData; }; export declare class WildcardMatcherData { readonly type: 'wildcard'; } export declare class SimpleMatcherData { method: Method; path: string; ctx?: MockRuleCtx | undefined; readonly type: 'simple'; constructor(method: Method, path: string, ctx?: MockRuleCtx | undefined); } export declare class HeaderMatcherData { headers: { [key: string]: string; }; readonly type: 'header'; constructor(headers: { [key: string]: string; }); } export declare class FormDataMatcherData { formData: { [key: string]: string; }; readonly type: 'form-data'; constructor(formData: { [key: string]: string; }); } export declare function buildMatchers(matcherPartData: MatcherData[]): RequestMatcher; export declare function buildMatcher(matcherPartData: D): RequestMatcher;