export interface IApplicationNameValidationMessage { cloudProvider?: string; message: string; } export interface IValidationResult { warnings: string[]; errors: string[]; } export interface IApplicationNameValidationResult { warnings: IApplicationNameValidationMessage[]; errors: IApplicationNameValidationMessage[]; } export interface IApplicationNameValidator { validate: (applicationName: string) => IValidationResult; } /** * Responsible for registering validators around the application name, then running them * when creating a new application. */ export declare class ApplicationNameValidator { private static providerMap; /** * Registers a validator for a cloud provider. * @param cloudProvider the key of the cloud provider, e.g. "aws", "gce" * @param validator the actual validator */ static registerValidator(cloudProvider: string, validator: IApplicationNameValidator): void; /** * Overwrites the validators of a cloud provider with the given array. * @param cloudProvider the key of the cloud provider, e.g. "aws", "gce" * @param validators the validators to use for the provider */ static setValidators(cloudProvider: string, validators: IApplicationNameValidator[]): void; /** * Performs the actual validation. If there are no providers supplied, all configured validators will fire * and add their messages to the result. * @param applicationName the name of the application * @param providersToTest the configured cloud providers; if empty, validators for all providers will fire * @returns {{errors: Array, warnings: Array}} */ static validate(applicationName: string, providersToTest: string[]): PromiseLike; }