unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
27 lines • 1.58 kB
TypeScript
import type { Request, Response } from 'express';
import Controller from '../../routes/controller.js';
import type { IUnleashServices } from '../../services/index.js';
import type { IUnleashConfig } from '../../types/option.js';
import { type EnvironmentsSchema } from '../../openapi/spec/environments-schema.js';
import { type EnvironmentSchema } from '../../openapi/spec/environment-schema.js';
import type { SortOrderSchema } from '../../openapi/spec/sort-order-schema.js';
import { type EnvironmentsProjectSchema } from '../../openapi/spec/environments-project-schema.js';
interface EnvironmentParam {
name: string;
}
interface ProjectParam {
projectId: string;
}
export declare class EnvironmentsController extends Controller {
private openApiService;
private service;
constructor(config: IUnleashConfig, { environmentService, openApiService, }: Pick<IUnleashServices, 'environmentService' | 'openApiService'>);
getAllEnvironments(_req: Request, res: Response<EnvironmentsSchema>): Promise<void>;
updateSortOrder(req: Request<unknown, unknown, SortOrderSchema>, res: Response): Promise<void>;
toggleEnvironmentOn(req: Request<EnvironmentParam>, res: Response): Promise<void>;
toggleEnvironmentOff(req: Request<EnvironmentParam>, res: Response): Promise<void>;
getEnvironment(req: Request<EnvironmentParam>, res: Response<EnvironmentSchema>): Promise<void>;
getProjectEnvironments(req: Request<ProjectParam>, res: Response<EnvironmentsProjectSchema>): Promise<void>;
}
export {};
//# sourceMappingURL=environments-controller.d.ts.map