1 | import { RouteConfig } from './Route.js';
|
2 | import { CallLog } from './CallHistory.js';
|
3 | export type URLMatcherObject = {
|
4 | begin?: string;
|
5 | end?: string;
|
6 | include?: string;
|
7 | glob?: string;
|
8 | express?: string;
|
9 | path?: string;
|
10 | regexp?: RegExp;
|
11 | };
|
12 | export type RouteMatcherUrl = string | RegExp | URL | URLMatcherObject;
|
13 | export type RouteMatcherFunction = (callLog: CallLog) => boolean;
|
14 | type MatcherGenerator = (route: RouteConfig) => RouteMatcherFunction;
|
15 | export type RouteMatcher = RouteMatcherUrl | RouteMatcherFunction;
|
16 | export type MatcherDefinition = {
|
17 | name: string;
|
18 | matcher: MatcherGenerator;
|
19 | usesBody?: boolean;
|
20 | };
|
21 | export declare const isUrlMatcher: (matcher: RouteMatcher | RouteConfig) => matcher is RouteMatcherUrl;
|
22 | export declare const isFunctionMatcher: (matcher: RouteMatcher | RouteConfig) => matcher is RouteMatcherFunction;
|
23 | export declare const builtInMatchers: MatcherDefinition[];
|
24 | export {};
|