/// import { Binding, Component, ProviderMap, ServiceOrProviderClass } from '@loopback/core'; import { ExpressRequestHandler, RestApplication } from '@loopback/rest'; import { CoreConfig } from './types'; export declare class CoreComponent implements Component { private readonly application; private readonly coreConfig; private readonly expressMiddlewares; constructor(application: RestApplication, coreConfig: CoreConfig, expressMiddlewares: ExpressRequestHandler[]); /** * The function `_setupSwaggerStats` sets up Swagger stats middleware based on configuration and * sanitized OpenAPI spec. * @returns The `_setupSwaggerStats` function returns an Express request handler or `undefined`. */ private _setupSwaggerStats; /** * This function retrieves a sanitized OpenAPI specification by potentially modifying path definitions * based on a provided configuration. * @returns The `_getSanitizedSpec` method returns a sanitized OpenAPI specification object with * modified path definitions based on the `modifyPathDefinition` function provided in the * `coreConfig`. If the `modifyPathDefinition` function is not provided or returns `null` for a path, * that path is removed from the specification. */ private _getSanitizedSpec; /** * The function `_buildMiddlewareConfig` constructs a configuration object for middleware based on * input specifications and core configuration settings. * @param sanitizedSpec - The `sanitizedSpec` parameter is an object that contains the `paths` * property. It is used to build a middleware configuration object in the `_buildMiddlewareConfig` * method. This method combines various configurations such as `name`, `uriPath`, `swaggerSpec`, * `authentication`, and `on * @returns The function `_buildMiddlewareConfig` is returning an object `config` that contains the * following properties: */ private _buildMiddlewareConfig; /** * The function returns a handler function for Swagger authentication in TypeScript. * @returns A function is being returned that takes three parameters: `req`, `username`, and * `password`, and returns a boolean value. If `this.coreConfig.swaggerAuthenticate` is truthy, it * returns that value. Otherwise, it returns a function that checks if the `username` and `password` * match the values stored in `this.coreConfig.swaggerUsername` and `this.coreConfig.swaggerPassword` */ private _getSwaggerAuthHandler; localeObj: i18nAPI; providers?: ProviderMap; bindings: Binding[]; services?: ServiceOrProviderClass[]; }