import * as _homer0_jimple from '@homer0/jimple'; import { a as ControllerConnectFn } from '../../index-DAUqbQ6h.js'; import { ExpressMiddleware, AsyncExpressMiddleware } from '../../types/express.js'; import { SimpleConfig } from '@homer0/simple-config'; import { ResponsesBuilder } from '../../services/http/responsesBuilder.js'; import { Response } from 'express'; import '../../types/http.js'; import 'https'; import 'http'; import 'spdy'; import 'node-fetch'; import '../../types/utils.js'; import '@homer0/path-utils'; import '@homer0/simple-logger'; import '@homer0/events-hub'; import '../../utils/fns/statuses.js'; import 'statuses'; /** * The options to construct a {@link ConfigController}. * * @group Controllers/Config */ type ConfigControllerOptions = { /** * A dictionary with the dependencies to inject. */ inject: { responsesBuilder: ResponsesBuilder; config: SimpleConfig; }; }; /** * The controller class that allows to show and switch the application configuration. * * @group Controller Classes * @group Controllers/Config * @prettierignore */ declare class ConfigController { /** * The service in charge or building the responses. */ protected readonly _responsesBuilder: ResponsesBuilder; /** * The service in charge of the configuration. */ protected readonly _config: SimpleConfig; /** * @param options The options to construct the controller. */ constructor({ inject }: ConfigControllerOptions); /** * Creates the middleware the shows the current configuration. */ showConfig(): ExpressMiddleware; /** * Creates the middleware the allows to switch the configuration. */ switchConfig(): AsyncExpressMiddleware; /** * Utility to respond with the current configuration. */ protected respondWithConfig(res: Response): void; } /** * This controller is kind of special as it will only mount the routes if the * `debug.configController` setting of the app configuration is set to `true`. * * It provides routes for: * - `/`: Showing the current configuration. * - `/switch/:name`: Switching the configuration, but only if the service allows it. * * @group Controllers * @group Controllers/Config */ declare const configController: _homer0_jimple.Resource<"controller", "connect", ControllerConnectFn>; export { ConfigController, type ConfigControllerOptions, configController };