UNPKG

@mridang/nestjs-auth

Version:

A comprehensive Auth.js integration for NestJS applications with TypeScript support, framework-agnostic HTTP adapters, and role-based access control

13 lines (12 loc) 697 B
import { HttpAdapter } from '../adapters/http.adapter.js'; import type { Request as ExpressRequest, Response as ExpressResponse } from 'express'; import type { FastifyReply, FastifyRequest } from 'fastify'; /** * Converts a framework-specific request (Fastify or Express) into a * standard Web API `Request` object… */ export declare function toWebRequest(request: FastifyRequest | ExpressRequest, adapter: HttpAdapter<unknown, unknown>): Request; /** * Maps a standard Web API `Response` object to a framework-specific response… */ export declare function toHttpResponse(webResponse: Response, res: FastifyReply | ExpressResponse, adapter: HttpAdapter<unknown, unknown>): Promise<void>;