since import { Bifunctor3 } from 'fp-ts/Bifunctor' ; import { Alt3 } from 'fp-ts/Alt' ; import { Monad3 } from 'fp-ts/Monad' ; import { MonadTask3 } from 'fp-ts/MonadTask' ; import { MonadThrow3 } from 'fp-ts/MonadThrow' ; import { IncomingMessage } from 'http' ; import * as M from './Middleware' ; since export const MediaType = { applicationFormURLEncoded : 'application/x-www-form-urlencoded' , applicationJSON : 'application/json' , applicationJavascript : 'application/javascript' , applicationOctetStream : 'application/octet-stream' , applicationXML : 'application/xml' , imageGIF : 'image/gif' , imageJPEG : 'image/jpeg' , imagePNG : 'image/png' , multipartFormData : 'multipart/form-data' , textCSV : 'text/csv' , textHTML : 'text/html' , textPlain : 'text/plain' , textXML : 'text/xml' , } as const ; since export type MediaType = typeof MediaType [ keyof typeof MediaType ] ; since export const Status = { Continue : 100 , SwitchingProtocols : 101 , Processing : 102 , EarlyHints : 103 , OK : 200 , Created : 201 , Accepted : 202 , NonAuthoritativeInformation : 203 , NoContent : 204 , ResetContent : 205 , PartialContent : 206 , MultiStatus : 207 , AlreadyReported : 208 , IMUsed : 226 , MultipleChoices : 300 , MovedPermanently : 301 , Found : 302 , SeeOther : 303 , NotModified : 304 , UseProxy : 305 , SwitchProxy : 306 , TemporaryRedirect : 307 , PermanentRedirect : 308 , BadRequest : 400 , Unauthorized : 401 , PaymentRequired : 402 , Forbidden : 403 , NotFound : 404 , MethodNotAllowed : 405 , NotAcceptable : 406 , ProxyAuthenticationRequired : 407 , RequestTimeout : 408 , Conflict : 409 , Gone : 410 , LengthRequired : 411 , PreconditionFailed : 412 , PayloadTooLarge : 413 , URITooLong : 414 , UnsupportedMediaType : 415 , RangeNotSatisfiable : 416 , ExpectationFailed : 417 , Teapot : 418 , MisdirectedRequest : 421 , UnprocessableEntity : 422 , Locked : 423 , FailedDependency : 424 , TooEarly : 425 , UpgradeRequired : 426 , PreconditionRequired : 428 , TooManyRequests : 429 , RequestHeaderFieldsTooLarge : 431 , UnavailableForLegalReasons : 451 , InternalServerError : 500 , NotImplemented : 501 , BadGateway : 502 , ServiceUnavailable : 503 , GatewayTimeout : 504 , HTTPVersionNotSupported : 505 , VariantAlsoNegotiates : 506 , InsufficientStorage : 507 , LoopDetected : 508 , NotExtended : 510 , NetworkAuthenticationRequired : 511 , } as const ; since export type Status = typeof Status [ keyof typeof Status ] ; since export interface CookieOptions { readonly expires ? : Date ; readonly domain ? : string ; readonly httpOnly ? : boolean ; readonly maxAge ? : number ; readonly path ? : string ; readonly sameSite ? : boolean | 'strict' | 'lax' ; readonly secure ? : boolean ; readonly signed ? : boolean ; } since export interface StatusOpen { readonly StatusOpen : unique symbol ; } since export interface HeadersOpen { readonly HeadersOpen : unique symbol ; } since export interface BodyOpen { readonly BodyOpen : unique symbol ; } since export interface ResponseEnded { readonly ResponseEnded : unique symbol ; } category since export interface Connection < S > { since readonly _S : S ; readonly getRequest : ( ) => IncomingMessage ; readonly getBody : ( ) => unknown ; readonly getHeader : ( name : string ) => unknown ; readonly getParams : ( ) => unknown ; readonly getQuery : ( ) => unknown ; readonly getOriginalUrl : ( ) => string ; readonly getMethod : ( ) => string ; readonly setCookie : ( this : Connection < HeadersOpen > , name : string , value : string , options : CookieOptions ) => Connection < HeadersOpen > ; readonly clearCookie : ( this : Connection < HeadersOpen > , name : string , options : CookieOptions ) => Connection < HeadersOpen > ; readonly setHeader : ( this : Connection < HeadersOpen > , name : string , value : string ) => Connection < HeadersOpen > ; readonly setStatus : ( this : Connection < StatusOpen > , status : Status ) => Connection < HeadersOpen > ; readonly setBody : ( this : Connection < BodyOpen > , body : string | Buffer ) => Connection < ResponseEnded > ; readonly pipeStream : ( this : Connection < BodyOpen > , stream : NodeJS . ReadableStream ) => Connection < ResponseEnded > ; readonly endResponse : ( this : Connection < BodyOpen > ) => Connection < ResponseEnded > ; } category since deprecated export const gets = M . gets ; category since deprecated export const fromConnection = M . fromConnection ; category since deprecated export const modifyConnection = M . modifyConnection ; category since deprecated export const URI = M . URI ; category since deprecated export type URI = typeof M . URI ; category since deprecated export type Middleware < I , O , E , A > = M . Middleware < I , O , E , A > ; category since deprecated export const map = M . map ; category since deprecated export const bimap = M . bimap ; category since deprecated export const mapLeft = M . mapLeft ; category since deprecated export const ap = M . ap ; category since deprecated export const apW = M . apW ; category since deprecated export const of = M . of ; category since deprecated export const iof = M . iof ; category since deprecated export const chain = M . chain ; category since deprecated export const chainW = M . chainW ; category since deprecated export const ichain = M . ichain ; category since deprecated export const ichainW = M . ichainW ; since deprecated export const evalMiddleware = M . evalMiddleware ; since deprecated export const execMiddleware = M . execMiddleware ; category since deprecated export const orElse = M . orElse ; category since deprecated export const tryCatch = M . tryCatch ; category since deprecated export const fromTaskEither = M . fromTaskEither ; category since deprecated export const right = M . right ; category since deprecated export const left = M . left ; category since deprecated export const rightTask = M . rightTask ; category since deprecated export const leftTask = M . leftTask ; category since deprecated export const rightIO = M . rightIO ; category since deprecated export const leftIO = M . leftIO ; category since deprecated export const fromIOEither = M . fromIOEither ; category since deprecated export const status = M . status ; category since deprecated export const header = M . header ; category since deprecated export const contentType = M . contentType ; category since deprecated export const cookie = M . cookie ; category since deprecated export const clearCookie = M . clearCookie ; category since deprecated export const closeHeaders = M . closeHeaders ; category since deprecated export const send = M . send ; category since deprecated export const end = M . end ; category since deprecated export const json = M . json ; category since deprecated export const redirect = M . redirect ; category since deprecated export const pipeStream = M . pipeStream ; category since deprecated export const decodeParam = M . decodeParam ; category since deprecated export const decodeParams = M . decodeParams ; category since deprecated export const decodeQuery = M . decodeQuery ; category since deprecated export const decodeBody = M . decodeBody ; category since deprecated export const decodeMethod = M . decodeMethod ; category since deprecated export const decodeHeader = M . decodeHeader ; since deprecated export const Do = M . Do ; since deprecated export const bindTo = M . bindTo ; since deprecated export const bindW = M . bindW ; since deprecated export const bind = M . bind ; category since deprecated export const middleware = { ... M . Functor , ... M . Bifunctor , ... M . MonadTask , ... M . MonadThrow , ... M . Alt , } ;