import type { Subscription } from 'rxjs';
import type { IPipeline, IStage, IStageOrTriggerTypeConfig, ITrigger } from '../../../domain';
export interface IStageValidationResults {
    stage: IStage;
    messages: string[];
}
export interface IPipelineValidationResults {
    stages: IStageValidationResults[];
    pipeline: string[];
    hasWarnings?: boolean;
    preventSave?: boolean;
}
export interface IValidatorField {
    fieldName?: string;
    fieldLabel?: string;
}
export interface IValidatorConfig extends IValidatorField {
    type: string;
    message?: string;
    skipValidation?: (pipeline: IPipeline, stage: IStage) => boolean;
    preventSave?: boolean;
    checkParentTriggers?: boolean;
    fields?: IValidatorField[];
    stageTypes?: string[];
}
export interface IStageOrTriggerValidator {
    validate(pipeline: IPipeline, stageOrTrigger: IStage | ITrigger, validator: IValidatorConfig, config: IStageOrTriggerTypeConfig): string | PromiseLike<string>;
}
export interface ICustomValidator extends IStageOrTriggerValidator, IValidatorConfig {
    [k: string]: any;
}
export declare class PipelineConfigValidator {
    private static validators;
    private static validationStream;
    static registerValidator(type: string, validator: IStageOrTriggerValidator): void;
    static validatePipeline(pipeline: IPipeline): PromiseLike<IPipelineValidationResults>;
    private static flattenValues;
    private static getValidator;
    private static getPipelineLevelValidations;
    /**
     * Subscribes to validation events
     * @param method
     * @returns {Subscription}, which should be unsubscribed when the subscriber is destroyed
     */
    static subscribe(method: (result: IPipelineValidationResults) => any): Subscription;
}
