/** * Utilities for working with routes and endpoints */ import { RouteInfo } from '../../types'; export interface ExtendedRouteInfo extends RouteInfo { resource?: string; endpoint?: string; expectedStatus?: number; request?: { headers?: Record; query?: Record; body?: any; }; response?: Record; description?: string; testScenarios?: TestScenario[]; sourceFile?: string; lineNumber?: number; decorators?: any; } export interface TestScenario { description: string; expectedStatus: number; requestData?: any; queryParams?: any; pathParams?: any; expectedResponse?: any; } export interface UrlConfig { url: string; method?: string; resource?: string; endpoint?: string; body?: any; queryParams?: any; pathParams?: any; expectedStatus?: number; expectedResponse?: any; description?: string; } /** * Normalizes routes from different sources to a standard format */ export declare function normalizeRoutes(routes: any[], baseNormalizePath?: (path: string) => string): ExtendedRouteInfo[]; /** * Normalizes URL configs from different JSON structures */ export declare function normalizeUrlConfigs(items: any[]): UrlConfig[]; /** * Groups routes by resource name */ export declare function groupRoutesByResource(routes: ExtendedRouteInfo[]): Map; /** * Groups URL configs by resource name */ export declare function groupUrlsByResource(urlConfigs: UrlConfig[], normalizeUrlToPath: (url: string) => string): Map; /** * Returns conventional HTTP status code for a method */ export declare function getDefaultStatus(method: string): number; /** * Generates path parameters from a path pattern */ export declare function generatePathParams(path: string): any; /** * Enhances route with test scenarios based on config */ export declare function enhanceRouteWithConfig(route: RouteInfo, urlConfig: UrlConfig): ExtendedRouteInfo; /** * Enhances route with test scenarios based on response definitions */ export declare function enhanceRouteWithScenarios(route: ExtendedRouteInfo): ExtendedRouteInfo; //# sourceMappingURL=route-utils.d.ts.map