/**
 * Scale Assessment Types
 *
 * Types for load profiling, bottleneck detection, and capacity estimation.
 *
 * @module scanners/scale/types
 */
import { z } from "zod";
/**
 * Load testing tool
 */
export type LoadTool = "k6" | "artillery" | "autocannon" | "wrk";
/**
 * Load scenario type
 */
export type ScenarioType = "ramp" | "spike" | "soak" | "stress" | "breakpoint";
/**
 * Endpoint definition for load testing
 */
export declare const EndpointSchema: z.ZodObject<{
    path: z.ZodString;
    method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>>;
    weight: z.ZodDefault<z.ZodNumber>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    thresholds: z.ZodOptional<z.ZodObject<{
        p95: z.ZodOptional<z.ZodNumber>;
        p99: z.ZodOptional<z.ZodNumber>;
        errorRate: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
    }, {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
    }>>;
}, "strip", z.ZodTypeAny, {
    path: string;
    method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
    weight: number;
    headers?: Record<string, string> | undefined;
    body?: Record<string, unknown> | undefined;
    thresholds?: {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
    } | undefined;
}, {
    path: string;
    headers?: Record<string, string> | undefined;
    body?: Record<string, unknown> | undefined;
    method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
    thresholds?: {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
    } | undefined;
    weight?: number | undefined;
}>;
export type Endpoint = z.infer<typeof EndpointSchema>;
/**
 * Load scenario definition
 */
export declare const ScenarioSchema: z.ZodObject<{
    name: z.ZodString;
    type: z.ZodDefault<z.ZodEnum<["ramp", "spike", "soak", "stress", "breakpoint"]>>;
    duration: z.ZodString;
    vus: z.ZodUnion<[z.ZodNumber, z.ZodObject<{
        start: z.ZodNumber;
        end: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        end: number;
        start: number;
    }, {
        end: number;
        start: number;
    }>]>;
    endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>>;
        weight: z.ZodDefault<z.ZodNumber>;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        thresholds: z.ZodOptional<z.ZodObject<{
            p95: z.ZodOptional<z.ZodNumber>;
            p99: z.ZodOptional<z.ZodNumber>;
            errorRate: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        }, {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
        weight: number;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
    }, {
        path: string;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
        weight?: number | undefined;
    }>, "many">>;
}, "strip", z.ZodTypeAny, {
    name: string;
    type: "ramp" | "spike" | "soak" | "stress" | "breakpoint";
    duration: string;
    vus: number | {
        end: number;
        start: number;
    };
    endpoints?: {
        path: string;
        method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
        weight: number;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
    }[] | undefined;
}, {
    name: string;
    duration: string;
    vus: number | {
        end: number;
        start: number;
    };
    type?: "ramp" | "spike" | "soak" | "stress" | "breakpoint" | undefined;
    endpoints?: {
        path: string;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
        weight?: number | undefined;
    }[] | undefined;
}>;
export type Scenario = z.infer<typeof ScenarioSchema>;
/**
 * Load profile definition (YAML schema)
 */
export declare const LoadProfileSchema: z.ZodObject<{
    name: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    baseUrl: z.ZodOptional<z.ZodString>;
    tool: z.ZodDefault<z.ZodEnum<["k6", "artillery", "autocannon", "wrk"]>>;
    scenarios: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        type: z.ZodDefault<z.ZodEnum<["ramp", "spike", "soak", "stress", "breakpoint"]>>;
        duration: z.ZodString;
        vus: z.ZodUnion<[z.ZodNumber, z.ZodObject<{
            start: z.ZodNumber;
            end: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            end: number;
            start: number;
        }, {
            end: number;
            start: number;
        }>]>;
        endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
            path: z.ZodString;
            method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>>;
            weight: z.ZodDefault<z.ZodNumber>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            thresholds: z.ZodOptional<z.ZodObject<{
                p95: z.ZodOptional<z.ZodNumber>;
                p99: z.ZodOptional<z.ZodNumber>;
                errorRate: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            }, {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            }>>;
        }, "strip", z.ZodTypeAny, {
            path: string;
            method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
            weight: number;
            headers?: Record<string, string> | undefined;
            body?: Record<string, unknown> | undefined;
            thresholds?: {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            } | undefined;
        }, {
            path: string;
            headers?: Record<string, string> | undefined;
            body?: Record<string, unknown> | undefined;
            method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
            thresholds?: {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            } | undefined;
            weight?: number | undefined;
        }>, "many">>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        type: "ramp" | "spike" | "soak" | "stress" | "breakpoint";
        duration: string;
        vus: number | {
            end: number;
            start: number;
        };
        endpoints?: {
            path: string;
            method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
            weight: number;
            headers?: Record<string, string> | undefined;
            body?: Record<string, unknown> | undefined;
            thresholds?: {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            } | undefined;
        }[] | undefined;
    }, {
        name: string;
        duration: string;
        vus: number | {
            end: number;
            start: number;
        };
        type?: "ramp" | "spike" | "soak" | "stress" | "breakpoint" | undefined;
        endpoints?: {
            path: string;
            headers?: Record<string, string> | undefined;
            body?: Record<string, unknown> | undefined;
            method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
            thresholds?: {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            } | undefined;
            weight?: number | undefined;
        }[] | undefined;
    }>, "many">;
    thresholds: z.ZodOptional<z.ZodObject<{
        p95: z.ZodOptional<z.ZodNumber>;
        p99: z.ZodOptional<z.ZodNumber>;
        errorRate: z.ZodOptional<z.ZodNumber>;
        throughput: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
        throughput?: number | undefined;
    }, {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
        throughput?: number | undefined;
    }>>;
    endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>>;
        weight: z.ZodDefault<z.ZodNumber>;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        thresholds: z.ZodOptional<z.ZodObject<{
            p95: z.ZodOptional<z.ZodNumber>;
            p99: z.ZodOptional<z.ZodNumber>;
            errorRate: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        }, {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
        weight: number;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
    }, {
        path: string;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
        weight?: number | undefined;
    }>, "many">>;
}, "strip", z.ZodTypeAny, {
    name: string;
    tool: "k6" | "artillery" | "autocannon" | "wrk";
    scenarios: {
        name: string;
        type: "ramp" | "spike" | "soak" | "stress" | "breakpoint";
        duration: string;
        vus: number | {
            end: number;
            start: number;
        };
        endpoints?: {
            path: string;
            method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
            weight: number;
            headers?: Record<string, string> | undefined;
            body?: Record<string, unknown> | undefined;
            thresholds?: {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            } | undefined;
        }[] | undefined;
    }[];
    description?: string | undefined;
    thresholds?: {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
        throughput?: number | undefined;
    } | undefined;
    baseUrl?: string | undefined;
    endpoints?: {
        path: string;
        method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
        weight: number;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
    }[] | undefined;
}, {
    name: string;
    scenarios: {
        name: string;
        duration: string;
        vus: number | {
            end: number;
            start: number;
        };
        type?: "ramp" | "spike" | "soak" | "stress" | "breakpoint" | undefined;
        endpoints?: {
            path: string;
            headers?: Record<string, string> | undefined;
            body?: Record<string, unknown> | undefined;
            method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
            thresholds?: {
                p95?: number | undefined;
                p99?: number | undefined;
                errorRate?: number | undefined;
            } | undefined;
            weight?: number | undefined;
        }[] | undefined;
    }[];
    description?: string | undefined;
    tool?: "k6" | "artillery" | "autocannon" | "wrk" | undefined;
    thresholds?: {
        p95?: number | undefined;
        p99?: number | undefined;
        errorRate?: number | undefined;
        throughput?: number | undefined;
    } | undefined;
    baseUrl?: string | undefined;
    endpoints?: {
        path: string;
        headers?: Record<string, string> | undefined;
        body?: Record<string, unknown> | undefined;
        method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
        thresholds?: {
            p95?: number | undefined;
            p99?: number | undefined;
            errorRate?: number | undefined;
        } | undefined;
        weight?: number | undefined;
    }[] | undefined;
}>;
export type LoadProfile = z.infer<typeof LoadProfileSchema>;
/**
 * Latency percentiles
 */
export interface LatencyMetrics {
    min: number;
    max: number;
    mean: number;
    median: number;
    p90: number;
    p95: number;
    p99: number;
}
/**
 * Endpoint result from load test
 */
export interface EndpointResult {
    path: string;
    method: string;
    requests: number;
    failures: number;
    errorRate: number;
    latency: LatencyMetrics;
    throughput: number;
    passed: boolean;
}
/**
 * Scenario result from load test
 */
export interface ScenarioResult {
    name: string;
    type: ScenarioType;
    duration: number;
    vusMax: number;
    totalRequests: number;
    failedRequests: number;
    errorRate: number;
    latency: LatencyMetrics;
    throughput: number;
    endpoints: EndpointResult[];
    passed: boolean;
}
/**
 * Full load test result
 */
export interface LoadTestResult {
    profile: string;
    tool: LoadTool;
    startTime: string;
    endTime: string;
    duration: number;
    scenarios: ScenarioResult[];
    summary: {
        totalRequests: number;
        failedRequests: number;
        errorRate: number;
        avgThroughput: number;
        peakThroughput: number;
        latency: LatencyMetrics;
    };
    passed: boolean;
    score: number;
}
/**
 * Bottleneck detection result
 */
export interface Bottleneck {
    type: "endpoint" | "database" | "memory" | "cpu" | "network" | "external";
    location: string;
    severity: "critical" | "high" | "medium" | "low";
    description: string;
    metrics: {
        current: number;
        threshold: number;
        unit: string;
    };
    recommendation: string;
}
/**
 * Capacity estimation result
 */
export interface CapacityEstimate {
    maxConcurrentUsers: number;
    maxRequestsPerSecond: number;
    estimatedBreakpoint: {
        vus: number;
        confidence: number;
    };
    recommendations: string[];
    costProjection?: {
        provider: string;
        monthlyCost: number;
        instanceType: string;
        instances: number;
    };
}
/**
 * Full scale assessment result
 */
export interface ScaleAssessmentResult {
    success: boolean;
    loadTest?: LoadTestResult;
    bottlenecks: Bottleneck[];
    capacity: CapacityEstimate;
    score: {
        loadTestScore: number;
        bottleneckScore: number;
        capacityScore: number;
        overallScore: number;
    };
    duration: number;
    error?: string;
}
//# sourceMappingURL=types.d.ts.map