import { BlockValidation } from "."; import { BlockInstance } from "@wordpress/blocks"; export declare enum BlockPresence { Required = "required", Recommended = "recommended", Optional = "optional", Unknown = "unknown" } /** * Contains the result of a block validation. */ export declare class BlockValidationResult { /** * The name of the validated block. */ name: string; /** * The clientId of the validated block. */ clientId: string; /** * The validation result. */ result: BlockValidation; /** * The block presence. */ blockPresence: BlockPresence; /** * The validation issues for this block's innerblocks or attributes, if any. */ issues: BlockValidationResult[]; /** * An optional message describing the result. */ message: string; /** * @param clientId The clientId of the validated block. * @param name The name of the validated block. * @param result The validation result. * @param blockPresence The block type. * @param message An optional message describing the result. */ constructor(clientId: string, name: string, result: BlockValidation, blockPresence: BlockPresence, message?: string); /** * Named constructor for a 'missing attribute' validation result. * * @param blockInstance The block instance. * @param [name] Optional name. * @param [blockPresence] The block type. * * @constructor */ static MissingAttribute(blockInstance: BlockInstance, name?: string, blockPresence?: BlockPresence): BlockValidationResult; /** * Named constructor for a 'missing recommended / required block' validation result. * * @param name The name of the missing block. * @param [blockPresence] The block presence. * * @constructor */ static MissingBlock(name: string, blockPresence?: BlockPresence): BlockValidationResult; /** * Named constructor for a 'missing recommended block' validation result. * * @param name The name of the missing block. * * @constructor */ private static MissingRecommendedBlock; /** * Named constructor for a 'valid' validation result. * * @param blockInstance The block instance. * @param [name] Optional name. * @param [blockPresence] Optional BlockPresence. * * @constructor */ static Valid(blockInstance: BlockInstance, name?: string, blockPresence?: BlockPresence): BlockValidationResult; }