/**
 * Result of building a single microservice bundle.
 *
 * Extends the build result with cache status information.
 *
 * **Validates: Requirements 1.5**
 */
export interface MicroserviceBuildResult {
    /** Name of the microservice that was built */
    microserviceName: string;
    /** Full path to the generated bundle file */
    bundlePath: string;
    /** Size of the bundle in bytes */
    bundleSize: number;
    /** Build duration in milliseconds (0 if cached) */
    buildDuration: number;
    /** Whether the bundle was served from cache (not rebuilt) */
    cached: boolean;
}
/**
 * Aggregated result of the build:microservices command.
 *
 * Contains results for all microservices, including both successful
 * builds and failures.
 *
 * **Validates: Requirements 1.5**
 */
export interface BuildMicroservicesResult {
    /** Whether all microservices built successfully */
    success: boolean;
    /** Results for each successfully built microservice */
    results: MicroserviceBuildResult[];
    /** Total duration of the build process in milliseconds */
    totalDuration: number;
    /** Errors for microservices that failed to build */
    errors: Array<{
        microserviceName: string;
        error: string;
    }>;
}
/**
 * Cache entry for tracking a single microservice's build state.
 *
 * Used to determine if a rebuild is necessary by comparing
 * source file hashes and timestamps.
 *
 * **Validates: Requirements 6.1, 6.4**
 */
export interface BuildCacheEntry {
    /** Name of the microservice */
    microserviceName: string;
    /** Deployment stage (dev, staging, prod) */
    stage: string;
    /** Full path to the cached bundle file */
    bundlePath: string;
    /** Hash of the bundle file contents */
    bundleHash: string;
    /** Hash of all source files that contribute to this bundle */
    sourceFilesHash: string;
    /** Unix timestamp (ms) when the bundle was built */
    buildTimestamp: number;
}
/**
 * Build cache stored in cdk.out/.build-cache.json.
 *
 * Tracks build state for all microservices to enable
 * incremental builds and avoid unnecessary rebuilds.
 *
 * **Validates: Requirements 6.1, 6.4**
 */
export interface BuildCache {
    /** Cache format version for compatibility checking */
    version: string;
    /** Map of cache keys to cache entries (key format: `{microserviceName}-{stage}`) */
    entries: Record<string, BuildCacheEntry>;
}
