import { CorsOptions } from "cors"; import { NextAuthentication } from "../authentication/NextAuthentication"; import { NextAuthorizationBase } from "../authorization/NextAuthorizationBase"; import { NextSocketOptions } from "../sockets/NextSocketOptions"; import { Algorithm as JWTAlgorithm, VerifyOptions as JWTVerifyOptions, SignOptions as JWTSignOptions, JwtPayload } from 'jsonwebtoken'; import { NextApplication } from "../NextApplication"; import { NextAuthenticationMethod } from ".."; import { ConfigurationFileType, ConfigurationSourceType, VaultConfig } from "./ConfigurationReader"; export declare class NextOptions { baseUrl?: string; debug: boolean; port: number; routerDirs: string[]; cors?: CorsOptions; disableCorsMiddleware: boolean; authorization?: NextAuthorizationBase; authentication?: NextAuthentication; sockets?: NextSocketOptions; socketRouterDirs?: string[]; healthCheck?: NextHealthCheckOptions; bodyParser?: NextBodyParserOptions; staticDir?: string; routeNotFoundContent?: string; enableServices?: boolean; rendering?: NextRenderingOptions; security: NextSecurityOptions; switchLoggerAsConsole?: boolean; enableCookiesForSession?: boolean; openApi?: NextOpenApiOptions; swagger?: NextSwaggerOptions; enableRealtimeConfig?: boolean; workingDataFormat?: NextWorkingDataFormat; configuration?: NextConfigurationOptions; addAuthMethod(method: NextAuthenticationMethod): void; } export declare class NextConfigurationOptions { sourceType?: ConfigurationSourceType; fileOptions?: { path?: string; type?: ConfigurationFileType; }; envOptions?: { prefix?: string; }; vaultOptions?: VaultConfig; } export declare class NextSecurityOptions { jwt?: NextJwtOptions; } export declare class NextJwtOptions { algorithm?: JWTAlgorithm; secret?: string; checkIfGranted?: (req: Request) => Promise; verifyOptions?: JWTVerifyOptions; verifyPayload?: (payload: any) => Promise; signOptions?: JWTSignOptions; createPayload?: (req: Request, app: NextApplication, additional: any) => Promise; messages?: { unauthorized: string; invalidToken: string; }; refreshWhen?: (payload: JwtPayload) => Promise; resolveSessionId?: (payload: JwtPayload) => Promise; refreshTokenWhenExpired?: boolean; anonymousPaths?: (string | RegExp)[]; } export declare class NextRenderingOptions { viewDir?: string; enabled?: boolean; } export declare class NextBodyParserOptions { json?: { limit: string; strict: boolean; }; urlencoded?: { extended: boolean; limit: string; }; raw?: { limit: string; }; } export declare class NextHealthCheckOptions { livenessPath: string; readinessPath: string; } export declare class NextHealthCheckStatus { success: boolean; message?: string; constructor(success: boolean, message?: string); static Dead(): NextHealthCheckStatus; static Alive(): NextHealthCheckStatus; } export declare class NextOpenApiOptions { path: string; enabled?: boolean; title: string; version: string; description: string; https: boolean; http: boolean; termsOfService?: string; contactName?: string; contactUrl?: string; contactEmail?: string; licenseName?: string; licenseUrl?: string; /** * Default tags for grouping endpoints * Each tag should have a name and description */ tags?: Array<{ name: string; description: string; }>; /** * Configure servers list in OpenAPI docs * Allows for additional environments (staging, production, etc) */ additionalServers?: Array<{ url: string; description: string; }>; /** * Custom external documentation links */ externalDocs?: { description: string; url: string; }; /** * Set to true to sort endpoints by path */ sortEndpoints?: boolean; /** * Set to true to organize endpoints by tag instead of path */ organizeByTags?: boolean; } export declare class NextSwaggerOptions { path: string; enabled?: boolean; customScript?: string; customCss?: string; customFavicon?: string; customSiteTitle?: string; customHeadContent?: string; /** * Enable Swagger UI dark mode */ darkMode?: boolean; /** * Enable filtering of operations */ filter?: boolean; /** * Configure default models expansion depth (0-10) * -1: everything is expanded * 0: no expansion * n: expand n levels */ defaultModelsExpandDepth?: number; /** * Controls expansion of operation details * This does not affect the expansion of models */ defaultModelExpandDepth?: number; /** * Display operationId in the operations list */ displayOperationId?: boolean; /** * Controls the display of extensions (x-) fields and values */ showExtensions?: boolean; /** * Controls how models are shown when model is clicked * 'model': show model only * 'example': show example only * 'schema': show schema only * 'model-example': show model and example */ defaultModelRendering?: 'model' | 'example' | 'schema' | 'model-example'; /** * Enable syntax highlighting for code examples */ syntaxHighlight?: boolean; /** * Show request headers in curl examples */ showRequestHeaders?: boolean; /** * Controls the display of vendor extensions (x-) */ showCommonExtensions?: boolean; /** * The default expansion depth for the JSON documentation */ docExpansion?: 'list' | 'full' | 'none'; /** * Maximum displayed tags */ maxDisplayedTags?: number; /** * Display the request duration (in milliseconds) */ displayRequestDuration?: boolean; } export declare enum NextWorkingDataFormat { JSON = "json", YAML = "yaml" } //# sourceMappingURL=NextOptions.d.ts.map