import type { StratifyConfig, Violation, EnforcementMode } from '../types/types.js'; /** * Options for the validateLayers API. */ export interface ValidateLayersOptions { /** Workspace root directory. Defaults to process.cwd(). */ workspaceRoot?: string; /** Path to the config file, relative to workspaceRoot. */ configPath?: string; /** Provide a pre-built config directly, skipping file loading. */ config?: StratifyConfig; /** Override the enforcement mode from config. */ mode?: EnforcementMode; } /** * Result of running layer validation. */ export interface ValidateLayersResult { violations: Violation[]; totalPackages: number; duration: number; } /** * Validate monorepo packages against architectural layer rules. * * @param options - Configuration and workspace options. * @returns Violations found, total package count, and duration. * @throws {StratifyError} On config loading/parsing or package discovery failures. * * @example * ```ts * import { validateLayers, StratifyError } from 'stratifyjs'; * * try { * const result = await validateLayers({ workspaceRoot: '.' }); * for (const v of result.violations) { * console.log(v.detailedMessage); * } * } catch (e) { * if (e instanceof StratifyError) { * console.error(e.message); * } * } * ``` */ export declare function validateLayers(options?: ValidateLayersOptions): Promise;