import { P as PluginRoutesFactory, E as EndpointFailure } from '../route-C8RuFaMN.mjs'; import { a as APIRouteParams, A as APIRouteMatch } from '../route-pattern-W-SsJGSp.mjs'; export { b as APIRouteParamValue, m as matchAPIRoute } from '../route-pattern-W-SsJGSp.mjs'; import '../cache.mjs'; interface APIRouteShapeSource { routePath: string; source: TSource; filePath: string; } /** Validate API URL shapes and return the lower-priority route replaced by this source. */ declare function registerAPIRouteShape(shapes: Map>, routePath: string, filePath: string, source: TSource): string | undefined; interface MountedRoute { path: string; methods: string[]; endpoints: Record; filePath?: string; pluginMethods?: string[]; } /** The same registration step is used by dev discovery and the production bundle. */ declare function mergePluginAPIRoutes(existing: readonly MountedRoute[], plugins: readonly { name: string; routes?: PluginRoutesFactory; }[], expected?: readonly { path: string; methods: readonly string[]; }[]): Array; interface APIRouteMethodTable { methods: string[]; endpoints: Record; } declare function resolveAPIRouteEndpoint(route: APIRouteMethodTable, method: string): any | undefined; declare function getAllowedAPIRouteMethods(route: APIRouteMethodTable): string[]; /** Match canonical routes through a configurable same-origin public API path. */ declare function matchAPIRouteAtBasePath(routes: Map, pathname: string, serverBasePath?: string): APIRouteMatch | null; /** Test whether a pathname belongs to the configured local API surface. */ declare function isFarmAPIPathname(pathname: string, serverBasePath?: string): boolean; declare function invokeAPIRouteEndpoint(endpoint: any, request: Request, params?: APIRouteParams, bodySizeLimit?: number): Promise; declare function normalizeRouteResponse(result: unknown): Response; declare function isWebResponse(value: unknown): value is Response; declare function createEndpointFailureResponse(failure: EndpointFailure): Response; export { APIRouteMatch, APIRouteParams, type APIRouteShapeSource, createEndpointFailureResponse, getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isFarmAPIPathname, isWebResponse, matchAPIRouteAtBasePath, mergePluginAPIRoutes, normalizeRouteResponse, registerAPIRouteShape, resolveAPIRouteEndpoint };