import Signal, { Req } from "badmfck-signal"; import { BaseService } from "../BaseService"; import { ValidationModel } from "../helper/Validator"; import { IError } from "../structures/Interfaces"; declare const _ProjectState: { readonly active: ""; readonly $__active_values: readonly ["blue", "green"]; readonly lastDeployed: ""; readonly $__lastDeployed_values: readonly ["blue", "green"]; readonly history: readonly [{ readonly slot: ""; readonly $__slot_values: readonly ["blue", "green"]; readonly action: ""; readonly $__action_values: readonly ["deploy", "switch", "rollback", "restore"]; readonly user: ""; readonly at: 0; }]; readonly statusToken: ""; readonly $__statusToken_optional: true; }; export type IProjectState = ValidationModel; declare const _TConfig: { readonly name: ""; readonly destination: ""; readonly description: ""; readonly token: ""; readonly unpack: true; readonly ignoreDirectoryClean: false; readonly backup: true; readonly install: true; readonly migrate: false; readonly $__migrate_optional: true; readonly pm2: true; readonly pm2_attributes: readonly [""]; readonly $__pm2_attributes_optional: true; readonly chmod: 0; readonly email: readonly [""]; readonly phone: readonly [""]; readonly liveness: ""; readonly $__liveness_optional: true; readonly readiness: ""; readonly $__readiness_optional: true; readonly config: {}; readonly bluegreen: { readonly blue_config: {}; readonly blue_pm2_attributes: readonly [""]; readonly $__blue_pm2_attributes_optional: true; readonly green_config: {}; readonly green_pm2_attributes: readonly [""]; readonly $__green_pm2_attributes_optional: true; readonly on_switch: readonly [""]; readonly $__on_switch_optional: true; }; readonly $__bluegreen_optional: true; readonly nginx: { readonly config_dir: ""; readonly $__config_dir_optional: true; readonly domain: ""; readonly $__domain_optional: true; readonly upstream_name: ""; readonly $__upstream_name_optional: true; }; readonly $__nginx_optional: true; }; export type IConfig = ValidationModel; export declare const REQ_DEPLOYMENT_CONFIG: Req>; export declare const REQ_DEPLOYMENT_CONFIG_ADD: Req<{ name: string; destination: string; description: string; token: string; unpack: boolean; ignoreDirectoryClean: boolean; backup: boolean; install: boolean; migrate?: boolean | undefined; pm2: boolean; pm2_attributes?: string[] | undefined; chmod: number; email: string[]; phone: string[]; liveness?: string | undefined; readiness?: string | undefined; config: {}; bluegreen?: { blue_config: {}; blue_pm2_attributes?: string[] | undefined; green_config: {}; green_pm2_attributes?: string[] | undefined; on_switch?: string[] | undefined; } | undefined; nginx?: { config_dir?: string | undefined; domain?: string | undefined; upstream_name?: string | undefined; } | undefined; }, IError | { name: string; destination: string; description: string; token: string; unpack: boolean; ignoreDirectoryClean: boolean; backup: boolean; install: boolean; migrate?: boolean | undefined; pm2: boolean; pm2_attributes?: string[] | undefined; chmod: number; email: string[]; phone: string[]; liveness?: string | undefined; readiness?: string | undefined; config: {}; bluegreen?: { blue_config: {}; blue_pm2_attributes?: string[] | undefined; green_config: {}; green_pm2_attributes?: string[] | undefined; on_switch?: string[] | undefined; } | undefined; nginx?: { config_dir?: string | undefined; domain?: string | undefined; upstream_name?: string | undefined; } | undefined; }>; export declare const REQ_DEPLOYMENT_CONFIG_DELETE: Req; export declare const S_CONFIG_UPDATED: Signal; export declare class ConfigService extends BaseService { private configurations; private dir; private busy; private retake; private watchDebounceTimer; private _lastConfigHash; constructor(dir: string); init(): Promise; configurationDelete(name: string): Promise; configurationAdd(req: IConfig): Promise; getConfig(): void; validateRequest(data: IConfig): Promise; checkName(name: string): IError | undefined; } export {};