UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

25 lines 1.08 kB
import type { Express, RequestHandler, Response } from 'express'; import type { IUnleashConfig } from '../types/option.js'; import { type JsonSchemaProps, type SchemaId } from '../openapi/index.js'; import type { ApiOperation, StabilityRelease } from '../openapi/util/api-operation.js'; type LegacyApiOperation = Omit<ApiOperation, 'release'> & { release?: StabilityRelease; }; export declare class OpenApiService { private readonly config; private readonly logger; private readonly api; private readonly isDevelopment; private flagResolver; constructor(config: IUnleashConfig); validPath(op: ApiOperation | LegacyApiOperation): RequestHandler; useDocs(app: Express): void; private removeAlphaOperations; docsPath(): string; registerCustomSchemas<T extends JsonSchemaProps>(schemas: Record<string, T>): void; respondWithValidation<T, S = SchemaId>(status: number, res: Response<T>, schema: SchemaId, data: T, headers?: { [header: string]: string; }): void; } export {}; //# sourceMappingURL=openapi-service.d.ts.map