/** * Framework-agnostic request interface for DID Connect handlers. * * Designed to match Express's `req` shape so that Express requests * satisfy it natively (zero-wrapping). Hono adapter creates a wrapper * that maps Hono Context to this interface. */ export interface ConnectRequest { /** Parsed request body (from body-parser or Hono) */ body: Record; /** Parsed query string parameters */ query: Record; /** URL path parameters (e.g. :action) */ params: Record; /** Raw request headers */ headers: Record; /** Parsed cookies (from cookie-parser or manual parsing) */ cookies: Record; /** Request protocol ('http' or 'https') */ protocol: string; /** Full original URL including query string */ originalUrl: string; /** Session context, populated by ensureContext middleware */ context?: any; /** Flag to prevent double monkey-patching in ensureSignedJson */ ensureSignedJson?: boolean; /** Case-insensitive header getter (matches Express req.get) */ get(name: string): string | undefined; /** Content negotiation for locale (matches Express req.acceptsLanguages) */ acceptsLanguages(...languages: string[]): string | false; /** Original framework-specific request object (Express req or Hono Context) */ raw?: any; } /** * Framework-agnostic response interface for DID Connect handlers. * * Express: maps directly to res.jsonp/res.json/res.status().json(). * Hono: uses a buffer pattern — calls are captured, then the outer * Hono handler reads the buffer to return c.json(). */ export interface ConnectResponse { /** Send JSON response (Express JSONP, Hono json) */ jsonp(data: any): void; /** Send JSON response */ json(data: any): void; /** Set status code and return object with json() method */ status(code: number): { json(data: any): void; }; } /** Middleware next() callback */ export type NextFunction = () => void; //# sourceMappingURL=types.d.ts.map