import { Filter, WpResponse } from './Filter'; import { MethodMeta } from './MethodMeta'; import { FilterDefinition } from './WebAppMeta'; /** * Type alias for HTTP filters that work with MethodMeta and ResponseWrapper. */ export type HttpFilter = Filter>; /** * FilterMatcher - Matches filters to routes based on filepath patterns. * Similar to Java SharedMatchUtil.findMatchingFilters(). * * Responsibilities: * 1. Filter based on filepath glob pattern matching * 2. Sort matching filters by priority (higher first) * * Differences from Java: * - Uses glob patterns instead of regex * - Only matches filepaths (no URL path or HTTPS filtering yet) * - Simpler API focused on one responsibility */ export declare class FilterMatcher { /** * Find filters that match the given controller filepath. * * @param controllerFilepath - The filepath of the controller source file * @param allFilters - All registered filters with their definitions * @returns Array of matching filters, sorted by priority (highest first) */ static findMatchingFilters(controllerFilepath: string | undefined, allFilters: Array): HttpFilter[]; /** * Normalize a controller filepath for consistent matching. * - Converts backslashes to forward slashes (Windows compatibility) * - Removes leading './' * * @param filepath - Raw filepath * @returns Normalized filepath */ static normalizeFilepath(filepath: string): string; }