import { InitOptionType, SimOption } from '@dooboostore/simple-boot'; import { ConstructorType } from '@dooboostore/core'; import { Server as HttpServer, ServerOptions } from 'http'; import { Server as HttpsServer, ServerOptions as HttpsServerOption } from 'https'; import { Filter } from '../filters/Filter'; import { EndPoint } from '../endpoints/EndPoint'; import { RequestResponse } from '../models/RequestResponse'; import { SimpleBootHttpServer } from '../SimpleBootHttpServer'; import { TransactionManager } from '@dooboostore/core'; import { WebSocketEndPoint } from '../endpoints/WebSocketEndPoint'; export type Listen = { port?: number; hostname?: string; backlog?: number; listeningListener?: (server: SimpleBootHttpServer, httpServer: HttpServer | HttpsServer) => void; }; export interface ListenData extends Listen { port: number; hostname: string; } export type SessionOption = { key: string; expiredTime: number; httpOnly?: boolean; secure?: boolean; maxAge?: number; sameSite?: boolean | 'lax' | 'strict' | 'none'; domain?: string; path?: string; provider?: { uuids: () => Promise; delete: (uuid: string) => Promise; get: (uuid: string) => Promise<{ access: number; data?: any; }>; set: (uuid: string, data: { access: number; data?: any; }) => Promise; }; }; export type FilterSupportType = { filter: Filter | ConstructorType; isSupport: boolean | ((rr: RequestResponse) => boolean) | RegExp; }; export declare class HttpServerOption extends SimOption { static readonly DEFAULT_PORT = 8081; static readonly DEFAULT_HOSTNAME = "127.0.0.1"; serverOption?: ServerOptions | HttpsServerOption; listen: ListenData; filters?: FilterSupportType[]; fileUploadTempPath?: string; requestEndPoints?: (EndPoint | ConstructorType)[]; webSocketEndPoints?: (WebSocketEndPoint | ConstructorType)[]; closeEndPoints?: (EndPoint | ConstructorType)[]; errorEndPoints?: (EndPoint | ConstructorType)[]; sessionOption: SessionOption; globalAdvice?: any | ConstructorType; noSuchRouteEndPointMappingThrow?: (rr: RequestResponse) => any; transactionManagerFactory?: () => TransactionManager; constructor({ serverOption, listen, filters, requestEndPoints, closeEndPoints, errorEndPoints, webSocketEndPoints, sessionOption, globalAdvice, fileUploadTempPath, noSuchRouteEndPointMappingThrow, transactionManagerFactory }?: { serverOption?: ServerOptions | HttpsServerOption; listen?: Listen; filters?: (FilterSupportType)[]; requestEndPoints?: (EndPoint | ConstructorType)[]; closeEndPoints?: (EndPoint | ConstructorType)[]; errorEndPoints?: (EndPoint | ConstructorType)[]; webSocketEndPoints?: (WebSocketEndPoint | ConstructorType)[]; sessionOption?: { key?: string; expiredTime?: number; provider?: { uuids: () => Promise; delete: (uuid: string) => Promise; get: (uuid: string) => Promise<{ access: number; data?: any; }>; set: (uuid: string, data: { access: number; data?: any; }) => Promise; }; }; globalAdvice?: any | ConstructorType; fileUploadTempPath?: string; noSuchRouteEndPointMappingThrow?: (rr: RequestResponse) => any; transactionManagerFactory?: () => TransactionManager; }, initSimOption?: InitOptionType); get hostname(): string; get port(): number; get protocol(): "http" | "https"; get address(): string; get isSecure(): boolean; } //# sourceMappingURL=HttpServerOption.d.ts.map