import type { Promisable } from "../promise.cjs";
import type { ExtendableManifest, ExtendableSnapFiles, UnvalidatedSnapFiles } from "../types.cjs";
export type ValidatorFix = (files: {
    manifest: ExtendableManifest;
}) => Promisable<{
    manifest: ExtendableManifest;
}>;
/**
 * The options for the validator context.
 */
export type ValidatorContextOptions = {
    /**
     * An object containing the names of the handlers and their respective
     * permission name. This must be provided to avoid circular dependencies
     * between `@metamask/snaps-utils` and `@metamask/snaps-rpc-methods`.
     */
    handlerEndowments?: Record<string, string | null>;
    /**
     * Exports detected by evaluating the bundle. This may be used by one or more
     * validators to determine whether the snap is valid.
     */
    exports?: string[];
};
export type ValidatorSeverity = 'error' | 'warning';
export type ValidatorContext = {
    readonly report: (id: string, message: string, fix?: ValidatorFix) => void;
    readonly options?: ValidatorContextOptions;
};
export type ValidatorReport = {
    id: string;
    severity: ValidatorSeverity;
    message: string;
    fix?: ValidatorFix;
};
export type ValidatorMeta = {
    severity: ValidatorSeverity;
    /**
     * 1. Run the validator on unverified files to ensure that the files are
     * structurally sound.
     *
     * @param files - Files to be verified
     * @param context - Validator context to report errors
     */
    structureCheck?: (files: UnvalidatedSnapFiles, context: ValidatorContext) => void | Promise<void>;
    /**
     * 2. Run the validator after the files were checked to be structurally sound.
     *
     * @param files - Files to be verified
     * @param context - Validator context to report errors
     */
    semanticCheck?: (files: ExtendableSnapFiles, context: ValidatorContext) => void | Promise<void>;
};
//# sourceMappingURL=validator-types.d.cts.map