UNPKG

878 BTypeScriptView Raw
1import { SwaggerCustomOptions, LegacySwaggerCustomOptions } from './interfaces';
2import { HttpServer } from '@nestjs/common/interfaces/http/http-server.interface';
3export interface FastifyExtra {
4 initOAuth?: Record<string, any>;
5 staticCSP?: boolean | string | Record<string, string | string[]>;
6 transformStaticCSP?: (header: string) => string;
7 uiHooks?: {
8 onRequest?: Function;
9 preHandler?: Function;
10 };
11}
12export interface ProcessSwaggerOptionsOutput {
13 customOptions: SwaggerCustomOptions;
14 extra: FastifyExtra;
15}
16export declare function processSwaggerOptions(options?: LegacySwaggerCustomOptions): ProcessSwaggerOptionsOutput;
17export declare function serveDocumentsFastify(finalPath: string, httpAdapter: HttpServer, swaggerInitJS: string, yamlDocument: string, jsonDocument: string, html: string, fastifyExtras: FastifyExtra): void;