import { NextRequest, NextResponse } from 'next/server';
import { AccountExperienceConfiguration } from '@ory/client-fetch';

/**
 *
 */
type OryMiddlewareOptions = {
    /**
     * Per default headers are filtered to forward only a fixed list.
     *
     * If you need to forward additional headers you can use this setting to define them.
     */
    forwardAdditionalHeaders?: string[];
    forceCookieDomain?: string;
    project?: Partial<AccountExperienceConfiguration>;
};
/**
 * Creates a Next.js middleware function that proxies requests to the Ory SDK.
 *
 * This middleware function intercepts requests to the Ory SDK and rewrites the URLs if
 * in development mode or on vercel.com domains.
 *
 * @param options - The Ory configuration to use for the middleware.
 * @returns The Ory Next.js middleware function
 * @public
 */
declare function createOryMiddleware(options: OryMiddlewareOptions): (r: NextRequest) => Promise<NextResponse<unknown>>;

export { createOryMiddleware };
