/**
 * File operation validation utilities.
 *
 * Provides centralized validation logic for all filesystem operations,
 * including blacklist checking, path restrictions, and operation-specific rules.
 *
 * Supports both YAML mode (flat structure) and SDK mode (nested structure)
 * through the PathValidator abstraction.
 */
import { type FileOperation, type FileOperationValidationOptions } from "../constants.js";
import type { PathValidator } from "./path-validator.js";
/**
 * Creates the appropriate path validator based on feature flag.
 *
 * @param sdkApiEnabled - Whether SDK API mode is enabled
 * @returns PathValidator implementation for the appropriate mode
 */
export declare function createPathValidator(sdkApiEnabled: boolean): PathValidator;
/**
 * Error thrown when a file operation fails validation.
 */
export declare class FileValidationError extends Error {
    readonly code: "BLACKLISTED" | "API_FILE" | "SCOPE_FILE" | "PACKAGE_JSON" | "DIRECT_PAGE" | "ROOT_DIR" | "READ_REQUIRED";
    constructor(message: string, code: "BLACKLISTED" | "API_FILE" | "SCOPE_FILE" | "PACKAGE_JSON" | "DIRECT_PAGE" | "ROOT_DIR" | "READ_REQUIRED");
}
/**
 * Checks if a path is an API file path.
 *
 * @param filePath - Relative file path to check
 * @param validator - Optional path validator (defaults to YAML mode)
 * @returns true if the path is an API file path
 */
export declare function isApiFilePath(filePath: string, validator?: PathValidator): boolean;
/**
 * Checks if a path is a direct page path (pages/xyz.tsx rather than pages/xyz/index.tsx).
 *
 * @param filePath - Relative file path to check
 * @param validator - Optional path validator (defaults to YAML mode)
 * @returns true if the path is a direct page file
 */
export declare function isDirectPagePath(filePath: string, validator?: PathValidator): boolean;
/**
 * Checks if a path is a scope file.
 *
 * @param filePath - Relative file path to check
 * @param validator - Optional path validator (defaults to YAML mode)
 * @returns true if the path is a scope file
 */
export declare function isScopeFile(filePath: string, validator?: PathValidator): boolean;
/**
 * Checks if a path is the package.json file.
 *
 * @param filePath - Relative file path to check
 * @returns true if the path is package.json
 */
export declare function isPackageJson(filePath: string): boolean;
/**
 * Checks if a path is in the blacklist.
 *
 * @param relativePath - Relative path to check
 * @param _appRootDirPath - Application root directory for relative path calculation
 * @param validator - Optional path validator (defaults to YAML mode)
 * @returns Error message if blacklisted, null otherwise
 */
export declare function checkBlacklist(relativePath: string, _appRootDirPath: string, validator?: PathValidator): string | null;
/**
 * Validates a file operation against all applicable rules.
 *
 * @param operation - The type of file operation
 * @param relativePath - Relative path of the file
 * @param appRootDirPath - Application root directory
 * @param options - Optional validation options to override defaults
 * @param validator - Optional path validator (defaults to YAML mode)
 * @throws FileValidationError if validation fails
 */
export declare function validateFileOperation(operation: FileOperation, relativePath: string, appRootDirPath: string, options?: Partial<FileOperationValidationOptions>, validator?: PathValidator): void;
/**
 * Recursively checks if a directory contains any blacklisted content.
 *
 * @param entries - Directory entries to scan
 * @param validator - Optional path validator (defaults to YAML mode)
 * @returns Error message if blacklisted content found, null otherwise
 */
export declare function checkDirectoryContentBlacklist(entries: Array<{
    name: string;
    isDirectory: boolean;
}>, validator?: PathValidator): string | null;
//# sourceMappingURL=validation.d.ts.map