import type { APIContext, MiddlewareHandler } from 'astro'; type MiddlewareOptions = { /** * If true, the client IP will be attached to the event by calling `setUser`. * * Important: Only enable this option if your Astro app is configured for (hybrid) SSR * via the `output: 'server' | 'hybrid'` option in your `astro.config.mjs` file. * Otherwise, Astro will throw an error when starting the server. * * Only set this to `true` if you're fine with collecting potentially personally identifiable information (PII). * * @default `dataCollection.userInfo` (`true` unless disabled) */ trackClientIp?: boolean; }; export declare const handleRequest: (options?: MiddlewareOptions) => MiddlewareHandler; /** * Interpolates the route from the URL and the passed params. * Best we can do to get a route name instead of a raw URL. * * exported for testing * * @param rawUrlPathname - The raw URL pathname, e.g. '/users/123/details' * @param params - The params object, e.g. `{ userId: '123' }` * * @returns The interpolated route, e.g. '/users/[userId]/details' */ export declare function interpolateRouteFromUrlAndParams(rawUrlPathname: string, params: APIContext['params']): string | undefined; export {}; //# sourceMappingURL=middleware.d.ts.map