import type { EventEmitter } from "node:events"; type ErrorEventEmitter = Pick & object; export declare function attachGatewaySocketErrorSink(socket: ErrorEventEmitter | null | undefined, onError?: (error: unknown) => void): void; /** * When an app returns a redirect to a root-relative path that doesn't already * include the app prefix, prepend it. This handles the common case where a * framework server-side redirect uses a plain path like "/" or "/login" * without knowing it's mounted at "/{appId}" by the gateway. * * Only rewrites path-only locations (starting with "/") to avoid touching * absolute URLs (e.g. redirects to Google OAuth or external sites). */ export declare function rewriteRedirectLocation(app: { id: string; }, location: string | undefined): string | undefined; export declare function normalizeOrigin(value: string | undefined): string | undefined; export declare function escapeHtml(value: string): string; export {}; //# sourceMappingURL=gateway-helpers.d.ts.map