import type { AuthagonalBffOptions } from './options.js'; interface ExpressReq { method?: string; url?: string; originalUrl?: string; headers: Record; socket?: { encrypted?: boolean; remoteAddress?: string; }; /** Express's own resolved client address. It honours the host app's `trust proxy` setting, which is * why the proxy asserts it rather than re-deriving a trust decision the host has already made. */ ip?: string; body?: unknown; on(event: string, cb: (chunk?: unknown) => void): void; } interface ExpressRes { statusCode: number; setHeader(name: string, value: string | string[]): void; getHeader(name: string): string | number | string[] | undefined; end(body?: string | Uint8Array): void; } type NextFn = (err?: unknown) => void; /** * Express middleware that serves the Authagonal BFF endpoints and calls `next()` for everything else: * * ```ts * app.use(authagonalBff({ authority, clientId, clientSecret, cookieSecret })); * ``` */ export declare function authagonalBff(options: AuthagonalBffOptions): (req: ExpressReq, res: ExpressRes, next: NextFn) => void; export {};