/**
 * Validation Middleware
 * Request validation using Zod schemas with TypeScript support
 *
 * Features:
 * - Request body, params, and query validation
 * - Detailed field-level error reporting
 * - Custom error messages
 * - Async validation support
 * - Schema composition and reuse
 * - Full TypeScript type inference
 */
import { z, ZodSchema } from "zod";
import { Request, Response, NextFunction } from "express";
import { ApiResponse } from "../types/index.js";
/**
 * Validation options for middleware
 */
export interface ValidationOptions {
    abortEarly?: boolean;
    stripUnknown?: boolean;
    convert?: boolean;
    presence?: "optional" | "required" | "forbidden";
    context?: Record<string, any>;
    allowUnknown?: boolean;
}
/**
 * Validation schemas for different endpoints
 */
export declare const schemas: {
    template: z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        manufacturer: z.ZodString;
        model: z.ZodOptional<z.ZodString>;
        protocol: z.ZodDefault<z.ZodEnum<["modbus", "bacnet"]>>;
        metadata: z.ZodOptional<z.ZodObject<{
            manufacturer: z.ZodOptional<z.ZodString>;
            models: z.ZodOptional<z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                variants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "strip", z.ZodTypeAny, {
                name: string;
                variants?: string[] | undefined;
            }, {
                name: string;
                variants?: string[] | undefined;
            }>, "many">>;
            category: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            source: z.ZodOptional<z.ZodString>;
            lastUpdated: z.ZodOptional<z.ZodString>;
            version: z.ZodOptional<z.ZodString>;
            author: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            source?: string | undefined;
            category?: string | undefined;
            manufacturer?: string | undefined;
            version?: string | undefined;
            models?: {
                name: string;
                variants?: string[] | undefined;
            }[] | undefined;
            tags?: string[] | undefined;
            lastUpdated?: string | undefined;
            author?: string | undefined;
        }, {
            source?: string | undefined;
            category?: string | undefined;
            manufacturer?: string | undefined;
            version?: string | undefined;
            models?: {
                name: string;
                variants?: string[] | undefined;
            }[] | undefined;
            tags?: string[] | undefined;
            lastUpdated?: string | undefined;
            author?: string | undefined;
        }>>;
        data_points: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            address: z.ZodNumber;
            type: z.ZodEnum<["coil", "discrete", "holding", "input"]>;
            dataType: z.ZodEnum<["uint16", "int16", "uint32", "int32", "float32", "string", "bool", "bits"]>;
            writable: z.ZodDefault<z.ZodBoolean>;
            unit: z.ZodOptional<z.ZodString>;
            min: z.ZodOptional<z.ZodNumber>;
            max: z.ZodOptional<z.ZodNumber>;
            scaling_factor: z.ZodDefault<z.ZodNumber>;
            description: z.ZodOptional<z.ZodString>;
            simulation_type: z.ZodOptional<z.ZodEnum<["static", "random", "csv", "function"]>>;
            initial_value: z.ZodOptional<z.ZodAny>;
            csv_file: z.ZodOptional<z.ZodString>;
            function_code: z.ZodOptional<z.ZodString>;
            update_interval: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            address: number;
            writable: boolean;
            type: "coil" | "discrete" | "holding" | "input";
            dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
            scaling_factor: number;
            description?: string | undefined;
            unit?: string | undefined;
            min?: number | undefined;
            max?: number | undefined;
            simulation_type?: "function" | "csv" | "static" | "random" | undefined;
            initial_value?: any;
            csv_file?: string | undefined;
            function_code?: string | undefined;
            update_interval?: number | undefined;
        }, {
            name: string;
            address: number;
            type: "coil" | "discrete" | "holding" | "input";
            dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
            description?: string | undefined;
            writable?: boolean | undefined;
            unit?: string | undefined;
            min?: number | undefined;
            max?: number | undefined;
            scaling_factor?: number | undefined;
            simulation_type?: "function" | "csv" | "static" | "random" | undefined;
            initial_value?: any;
            csv_file?: string | undefined;
            function_code?: string | undefined;
            update_interval?: number | undefined;
        }>, "many">;
        devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            device_type: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            unit_id: z.ZodOptional<z.ZodNumber>;
            data_points: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            device_type: string;
            description?: string | undefined;
            data_points?: any[] | undefined;
            unit_id?: number | undefined;
        }, {
            name: string;
            device_type: string;
            description?: string | undefined;
            data_points?: any[] | undefined;
            unit_id?: number | undefined;
        }>, "many">>;
        attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            size: z.ZodNumber;
            mimeType: z.ZodString;
            uploadedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            id: string;
            name: string;
            size: number;
            mimeType: string;
            uploadedAt: string;
        }, {
            id: string;
            name: string;
            size: number;
            mimeType: string;
            uploadedAt: string;
        }>, "many">>;
        intelligent: z.ZodOptional<z.ZodBoolean>;
        state_machine: z.ZodOptional<z.ZodObject<{
            states: z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                values: z.ZodRecord<z.ZodString, z.ZodAny>;
                transitions: z.ZodArray<z.ZodAny, "many">;
            }, "strip", z.ZodTypeAny, {
                name: string;
                values: Record<string, any>;
                transitions: any[];
            }, {
                name: string;
                values: Record<string, any>;
                transitions: any[];
            }>, "many">;
            initial_state: z.ZodString;
            current_state: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            states: {
                name: string;
                values: Record<string, any>;
                transitions: any[];
            }[];
            initial_state: string;
            current_state?: string | undefined;
        }, {
            states: {
                name: string;
                values: Record<string, any>;
                transitions: any[];
            }[];
            initial_state: string;
            current_state?: string | undefined;
        }>>;
        data_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
            source: z.ZodString;
            targets: z.ZodArray<z.ZodString, "many">;
            transform: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            source: string;
            targets: string[];
            transform?: string | undefined;
        }, {
            source: string;
            targets: string[];
            transform?: string | undefined;
        }>, "many">>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        name: string;
        manufacturer: string;
        protocol: "modbus" | "bacnet";
        data_points: {
            name: string;
            address: number;
            writable: boolean;
            type: "coil" | "discrete" | "holding" | "input";
            dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
            scaling_factor: number;
            description?: string | undefined;
            unit?: string | undefined;
            min?: number | undefined;
            max?: number | undefined;
            simulation_type?: "function" | "csv" | "static" | "random" | undefined;
            initial_value?: any;
            csv_file?: string | undefined;
            function_code?: string | undefined;
            update_interval?: number | undefined;
        }[];
        description?: string | undefined;
        attachments?: {
            id: string;
            name: string;
            size: number;
            mimeType: string;
            uploadedAt: string;
        }[] | undefined;
        model?: string | undefined;
        metadata?: {
            source?: string | undefined;
            category?: string | undefined;
            manufacturer?: string | undefined;
            version?: string | undefined;
            models?: {
                name: string;
                variants?: string[] | undefined;
            }[] | undefined;
            tags?: string[] | undefined;
            lastUpdated?: string | undefined;
            author?: string | undefined;
        } | undefined;
        devices?: {
            name: string;
            device_type: string;
            description?: string | undefined;
            data_points?: any[] | undefined;
            unit_id?: number | undefined;
        }[] | undefined;
        intelligent?: boolean | undefined;
        state_machine?: {
            states: {
                name: string;
                values: Record<string, any>;
                transitions: any[];
            }[];
            initial_state: string;
            current_state?: string | undefined;
        } | undefined;
        data_links?: {
            source: string;
            targets: string[];
            transform?: string | undefined;
        }[] | undefined;
    }, {
        id: string;
        name: string;
        manufacturer: string;
        data_points: {
            name: string;
            address: number;
            type: "coil" | "discrete" | "holding" | "input";
            dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
            description?: string | undefined;
            writable?: boolean | undefined;
            unit?: string | undefined;
            min?: number | undefined;
            max?: number | undefined;
            scaling_factor?: number | undefined;
            simulation_type?: "function" | "csv" | "static" | "random" | undefined;
            initial_value?: any;
            csv_file?: string | undefined;
            function_code?: string | undefined;
            update_interval?: number | undefined;
        }[];
        description?: string | undefined;
        attachments?: {
            id: string;
            name: string;
            size: number;
            mimeType: string;
            uploadedAt: string;
        }[] | undefined;
        model?: string | undefined;
        metadata?: {
            source?: string | undefined;
            category?: string | undefined;
            manufacturer?: string | undefined;
            version?: string | undefined;
            models?: {
                name: string;
                variants?: string[] | undefined;
            }[] | undefined;
            tags?: string[] | undefined;
            lastUpdated?: string | undefined;
            author?: string | undefined;
        } | undefined;
        protocol?: "modbus" | "bacnet" | undefined;
        devices?: {
            name: string;
            device_type: string;
            description?: string | undefined;
            data_points?: any[] | undefined;
            unit_id?: number | undefined;
        }[] | undefined;
        intelligent?: boolean | undefined;
        state_machine?: {
            states: {
                name: string;
                values: Record<string, any>;
                transitions: any[];
            }[];
            initial_state: string;
            current_state?: string | undefined;
        } | undefined;
        data_links?: {
            source: string;
            targets: string[];
            transform?: string | undefined;
        }[] | undefined;
    }>;
    templateUpdate: z.ZodEffects<z.ZodObject<{
        name: z.ZodOptional<z.ZodString>;
        description: z.ZodOptional<z.ZodString>;
        manufacturer: z.ZodOptional<z.ZodString>;
        model: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodAny>;
        data_points: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
        devices: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
        attachments: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
        intelligent: z.ZodOptional<z.ZodBoolean>;
        state_machine: z.ZodOptional<z.ZodAny>;
        data_links: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
    }, "strip", z.ZodTypeAny, {
        name?: string | undefined;
        description?: string | undefined;
        attachments?: any[] | undefined;
        model?: string | undefined;
        manufacturer?: string | undefined;
        metadata?: any;
        data_points?: any[] | undefined;
        devices?: any[] | undefined;
        intelligent?: boolean | undefined;
        state_machine?: any;
        data_links?: any[] | undefined;
    }, {
        name?: string | undefined;
        description?: string | undefined;
        attachments?: any[] | undefined;
        model?: string | undefined;
        manufacturer?: string | undefined;
        metadata?: any;
        data_points?: any[] | undefined;
        devices?: any[] | undefined;
        intelligent?: boolean | undefined;
        state_machine?: any;
        data_links?: any[] | undefined;
    }>, {
        name?: string | undefined;
        description?: string | undefined;
        attachments?: any[] | undefined;
        model?: string | undefined;
        manufacturer?: string | undefined;
        metadata?: any;
        data_points?: any[] | undefined;
        devices?: any[] | undefined;
        intelligent?: boolean | undefined;
        state_machine?: any;
        data_links?: any[] | undefined;
    }, {
        name?: string | undefined;
        description?: string | undefined;
        attachments?: any[] | undefined;
        model?: string | undefined;
        manufacturer?: string | undefined;
        metadata?: any;
        data_points?: any[] | undefined;
        devices?: any[] | undefined;
        intelligent?: boolean | undefined;
        state_machine?: any;
        data_links?: any[] | undefined;
    }>;
    simulator: z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        templateId: z.ZodString;
        config: z.ZodObject<{
            port: z.ZodNumber;
            host: z.ZodDefault<z.ZodString>;
            unitId: z.ZodDefault<z.ZodNumber>;
            protocol: z.ZodEnum<["modbus", "bacnet"]>;
        }, "strip", z.ZodTypeAny, {
            port: number;
            host: string;
            protocol: "modbus" | "bacnet";
            unitId: number;
        }, {
            port: number;
            protocol: "modbus" | "bacnet";
            host?: string | undefined;
            unitId?: number | undefined;
        }>;
        autoStart: z.ZodDefault<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        id: string;
        name: string;
        templateId: string;
        config: {
            port: number;
            host: string;
            protocol: "modbus" | "bacnet";
            unitId: number;
        };
        autoStart: boolean;
    }, {
        id: string;
        name: string;
        templateId: string;
        config: {
            port: number;
            protocol: "modbus" | "bacnet";
            host?: string | undefined;
            unitId?: number | undefined;
        };
        autoStart?: boolean | undefined;
    }>;
    settings: z.ZodObject<{
        api: z.ZodOptional<z.ZodObject<{
            port: z.ZodNumber;
            host: z.ZodString;
            cors: z.ZodObject<{
                enabled: z.ZodBoolean;
                origins: z.ZodArray<z.ZodString, "many">;
            }, "strip", z.ZodTypeAny, {
                enabled: boolean;
                origins: string[];
            }, {
                enabled: boolean;
                origins: string[];
            }>;
        }, "strip", z.ZodTypeAny, {
            cors: {
                enabled: boolean;
                origins: string[];
            };
            port: number;
            host: string;
        }, {
            cors: {
                enabled: boolean;
                origins: string[];
            };
            port: number;
            host: string;
        }>>;
        simulator: z.ZodOptional<z.ZodObject<{
            defaultPort: z.ZodNumber;
            autoRestart: z.ZodBoolean;
            maxInstances: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            defaultPort: number;
            autoRestart: boolean;
            maxInstances: number;
        }, {
            defaultPort: number;
            autoRestart: boolean;
            maxInstances: number;
        }>>;
        logging: z.ZodOptional<z.ZodObject<{
            level: z.ZodEnum<["error", "warn", "info", "debug"]>;
            file: z.ZodBoolean;
            console: z.ZodBoolean;
            maxSize: z.ZodString;
            maxFiles: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            level: "error" | "debug" | "warn" | "info";
            maxSize: string;
            maxFiles: string;
            file: boolean;
            console: boolean;
        }, {
            level: "error" | "debug" | "warn" | "info";
            maxSize: string;
            maxFiles: string;
            file: boolean;
            console: boolean;
        }>>;
        ui: z.ZodOptional<z.ZodObject<{
            theme: z.ZodEnum<["light", "dark", "auto"]>;
            language: z.ZodEnum<["en", "es", "fr", "de"]>;
            dateFormat: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            theme: "light" | "dark" | "auto";
            language: "en" | "es" | "fr" | "de";
            dateFormat: string;
        }, {
            theme: "light" | "dark" | "auto";
            language: "en" | "es" | "fr" | "de";
            dateFormat: string;
        }>>;
    }, "strip", z.ZodTypeAny, {
        logging?: {
            level: "error" | "debug" | "warn" | "info";
            maxSize: string;
            maxFiles: string;
            file: boolean;
            console: boolean;
        } | undefined;
        api?: {
            cors: {
                enabled: boolean;
                origins: string[];
            };
            port: number;
            host: string;
        } | undefined;
        simulator?: {
            defaultPort: number;
            autoRestart: boolean;
            maxInstances: number;
        } | undefined;
        ui?: {
            theme: "light" | "dark" | "auto";
            language: "en" | "es" | "fr" | "de";
            dateFormat: string;
        } | undefined;
    }, {
        logging?: {
            level: "error" | "debug" | "warn" | "info";
            maxSize: string;
            maxFiles: string;
            file: boolean;
            console: boolean;
        } | undefined;
        api?: {
            cors: {
                enabled: boolean;
                origins: string[];
            };
            port: number;
            host: string;
        } | undefined;
        simulator?: {
            defaultPort: number;
            autoRestart: boolean;
            maxInstances: number;
        } | undefined;
        ui?: {
            theme: "light" | "dark" | "auto";
            language: "en" | "es" | "fr" | "de";
            dateFormat: string;
        } | undefined;
    }>;
    id: z.ZodObject<{
        id: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        id: string;
    }, {
        id: string;
    }>;
    pagination: z.ZodObject<{
        page: z.ZodDefault<z.ZodNumber>;
        limit: z.ZodDefault<z.ZodNumber>;
        sort: z.ZodOptional<z.ZodString>;
        order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
    }, "strip", z.ZodTypeAny, {
        page: number;
        limit: number;
        order: "asc" | "desc";
        sort?: string | undefined;
    }, {
        sort?: string | undefined;
        page?: number | undefined;
        limit?: number | undefined;
        order?: "asc" | "desc" | undefined;
    }>;
    filter: z.ZodObject<{
        search: z.ZodOptional<z.ZodString>;
        tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        category: z.ZodOptional<z.ZodString>;
        protocol: z.ZodOptional<z.ZodEnum<["modbus", "bacnet"]>>;
        status: z.ZodOptional<z.ZodEnum<["active", "inactive", "error"]>>;
    }, "strip", z.ZodTypeAny, {
        status?: "error" | "active" | "inactive" | undefined;
        search?: string | undefined;
        category?: string | undefined;
        protocol?: "modbus" | "bacnet" | undefined;
        tags?: string[] | undefined;
    }, {
        status?: "error" | "active" | "inactive" | undefined;
        search?: string | undefined;
        category?: string | undefined;
        protocol?: "modbus" | "bacnet" | undefined;
        tags?: string[] | undefined;
    }>;
};
/**
 * Create a validation middleware for request body
 */
export declare function validate<T extends ZodSchema>(schema: T, options?: ValidationOptions): (req: Request, res: Response<ApiResponse<any>>, next: NextFunction) => any;
/**
 * Validate request parameters
 */
export declare function validateParams<T extends ZodSchema>(schema: T, options?: ValidationOptions): (req: Request, res: Response<ApiResponse<any>>, next: NextFunction) => any;
/**
 * Validate query parameters
 */
export declare function validateQuery<T extends ZodSchema>(schema: T, options?: ValidationOptions): (req: Request, res: Response<ApiResponse<any>>, next: NextFunction) => any;
/**
 * Combined validation for body, params, and query
 */
export declare function validateRequest<T extends {
    body?: ZodSchema;
    params?: ZodSchema;
    query?: ZodSchema;
}>(schemas: T, options?: ValidationOptions): (req: Request, res: Response<ApiResponse<any>>, next: NextFunction) => any;
/**
 * Async validation wrapper for custom validation logic
 */
export declare function validateAsync(validationFn: (req: Request) => Promise<any>): (req: Request, res: Response<ApiResponse<any>>, next: NextFunction) => Promise<void>;
/**
 * Create a conditional validation middleware
 */
export declare function validateIf<T extends ZodSchema>(condition: (req: Request) => boolean, schema: T, options?: ValidationOptions): (req: Request, res: Response<ApiResponse<any>>, next: NextFunction) => any;
/**
 * Schema composition helpers using Zod's built-in methods
 */
export declare const compose: {
    /**
     * Merge multiple schemas
     */
    merge: <T extends ZodSchema, U extends ZodSchema>(schema1: T, schema2: U) => z.ZodObject<z.objectUtil.extendShape<any, (U & z.ZodObject<any, any, any, any, any>)["shape"]>, (U & z.ZodObject<any, any, any, any, any>)["_def"]["unknownKeys"], (U & z.ZodObject<any, any, any, any, any>)["_def"]["catchall"], z.objectOutputType<z.objectUtil.extendShape<any, (U & z.ZodObject<any, any, any, any, any>)["shape"]>, (U & z.ZodObject<any, any, any, any, any>)["_def"]["catchall"], (U & z.ZodObject<any, any, any, any, any>)["_def"]["unknownKeys"]>, z.objectInputType<z.objectUtil.extendShape<any, (U & z.ZodObject<any, any, any, any, any>)["shape"]>, (U & z.ZodObject<any, any, any, any, any>)["_def"]["catchall"], (U & z.ZodObject<any, any, any, any, any>)["_def"]["unknownKeys"]>> | z.ZodIntersection<T, U>;
    /**
     * Make all fields optional
     */
    partial: <T extends z.ZodObject<any>>(schema: T) => z.ZodObject<{
        [x: string]: z.ZodOptional<any>;
    }, z.UnknownKeysParam, z.ZodTypeAny, {
        [x: string]: any;
    }, {
        [x: string]: any;
    }>;
    /**
     * Make specific fields required
     */
    require: <T extends z.ZodObject<any>>(schema: T, fields: Array<keyof T["shape"]>) => z.ZodObject<{} & {
        [x: string]: any;
    }, z.UnknownKeysParam, z.ZodTypeAny, {
        [x: string]: any;
    }, {
        [x: string]: any;
    }>;
    /**
     * Pick specific fields from a schema
     */
    pick: <T extends z.ZodObject<any>>(schema: T, fields: Array<keyof T["shape"]>) => z.ZodObject<any, "strip", z.ZodTypeAny, {
        [x: string]: any;
    }, {
        [x: string]: any;
    }>;
    /**
     * Omit specific fields from a schema
     */
    omit: <T extends z.ZodObject<any>>(schema: T, fields: Array<keyof T["shape"]>) => z.ZodObject<Omit<any, string | number | symbol>, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>;
};
/**
 * Export Zod for direct use
 */
export { z, z as zod };
declare const _default: {
    validate: typeof validate;
    validateParams: typeof validateParams;
    validateQuery: typeof validateQuery;
    validateRequest: typeof validateRequest;
    validateAsync: typeof validateAsync;
    validateIf: typeof validateIf;
    schemas: {
        template: z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            manufacturer: z.ZodString;
            model: z.ZodOptional<z.ZodString>;
            protocol: z.ZodDefault<z.ZodEnum<["modbus", "bacnet"]>>;
            metadata: z.ZodOptional<z.ZodObject<{
                manufacturer: z.ZodOptional<z.ZodString>;
                models: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    name: z.ZodString;
                    variants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, "strip", z.ZodTypeAny, {
                    name: string;
                    variants?: string[] | undefined;
                }, {
                    name: string;
                    variants?: string[] | undefined;
                }>, "many">>;
                category: z.ZodOptional<z.ZodString>;
                tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                source: z.ZodOptional<z.ZodString>;
                lastUpdated: z.ZodOptional<z.ZodString>;
                version: z.ZodOptional<z.ZodString>;
                author: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                source?: string | undefined;
                category?: string | undefined;
                manufacturer?: string | undefined;
                version?: string | undefined;
                models?: {
                    name: string;
                    variants?: string[] | undefined;
                }[] | undefined;
                tags?: string[] | undefined;
                lastUpdated?: string | undefined;
                author?: string | undefined;
            }, {
                source?: string | undefined;
                category?: string | undefined;
                manufacturer?: string | undefined;
                version?: string | undefined;
                models?: {
                    name: string;
                    variants?: string[] | undefined;
                }[] | undefined;
                tags?: string[] | undefined;
                lastUpdated?: string | undefined;
                author?: string | undefined;
            }>>;
            data_points: z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                address: z.ZodNumber;
                type: z.ZodEnum<["coil", "discrete", "holding", "input"]>;
                dataType: z.ZodEnum<["uint16", "int16", "uint32", "int32", "float32", "string", "bool", "bits"]>;
                writable: z.ZodDefault<z.ZodBoolean>;
                unit: z.ZodOptional<z.ZodString>;
                min: z.ZodOptional<z.ZodNumber>;
                max: z.ZodOptional<z.ZodNumber>;
                scaling_factor: z.ZodDefault<z.ZodNumber>;
                description: z.ZodOptional<z.ZodString>;
                simulation_type: z.ZodOptional<z.ZodEnum<["static", "random", "csv", "function"]>>;
                initial_value: z.ZodOptional<z.ZodAny>;
                csv_file: z.ZodOptional<z.ZodString>;
                function_code: z.ZodOptional<z.ZodString>;
                update_interval: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                name: string;
                address: number;
                writable: boolean;
                type: "coil" | "discrete" | "holding" | "input";
                dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
                scaling_factor: number;
                description?: string | undefined;
                unit?: string | undefined;
                min?: number | undefined;
                max?: number | undefined;
                simulation_type?: "function" | "csv" | "static" | "random" | undefined;
                initial_value?: any;
                csv_file?: string | undefined;
                function_code?: string | undefined;
                update_interval?: number | undefined;
            }, {
                name: string;
                address: number;
                type: "coil" | "discrete" | "holding" | "input";
                dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
                description?: string | undefined;
                writable?: boolean | undefined;
                unit?: string | undefined;
                min?: number | undefined;
                max?: number | undefined;
                scaling_factor?: number | undefined;
                simulation_type?: "function" | "csv" | "static" | "random" | undefined;
                initial_value?: any;
                csv_file?: string | undefined;
                function_code?: string | undefined;
                update_interval?: number | undefined;
            }>, "many">;
            devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                device_type: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
                unit_id: z.ZodOptional<z.ZodNumber>;
                data_points: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
            }, "strip", z.ZodTypeAny, {
                name: string;
                device_type: string;
                description?: string | undefined;
                data_points?: any[] | undefined;
                unit_id?: number | undefined;
            }, {
                name: string;
                device_type: string;
                description?: string | undefined;
                data_points?: any[] | undefined;
                unit_id?: number | undefined;
            }>, "many">>;
            attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                size: z.ZodNumber;
                mimeType: z.ZodString;
                uploadedAt: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                id: string;
                name: string;
                size: number;
                mimeType: string;
                uploadedAt: string;
            }, {
                id: string;
                name: string;
                size: number;
                mimeType: string;
                uploadedAt: string;
            }>, "many">>;
            intelligent: z.ZodOptional<z.ZodBoolean>;
            state_machine: z.ZodOptional<z.ZodObject<{
                states: z.ZodArray<z.ZodObject<{
                    name: z.ZodString;
                    values: z.ZodRecord<z.ZodString, z.ZodAny>;
                    transitions: z.ZodArray<z.ZodAny, "many">;
                }, "strip", z.ZodTypeAny, {
                    name: string;
                    values: Record<string, any>;
                    transitions: any[];
                }, {
                    name: string;
                    values: Record<string, any>;
                    transitions: any[];
                }>, "many">;
                initial_state: z.ZodString;
                current_state: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                states: {
                    name: string;
                    values: Record<string, any>;
                    transitions: any[];
                }[];
                initial_state: string;
                current_state?: string | undefined;
            }, {
                states: {
                    name: string;
                    values: Record<string, any>;
                    transitions: any[];
                }[];
                initial_state: string;
                current_state?: string | undefined;
            }>>;
            data_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
                source: z.ZodString;
                targets: z.ZodArray<z.ZodString, "many">;
                transform: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                source: string;
                targets: string[];
                transform?: string | undefined;
            }, {
                source: string;
                targets: string[];
                transform?: string | undefined;
            }>, "many">>;
        }, "strip", z.ZodTypeAny, {
            id: string;
            name: string;
            manufacturer: string;
            protocol: "modbus" | "bacnet";
            data_points: {
                name: string;
                address: number;
                writable: boolean;
                type: "coil" | "discrete" | "holding" | "input";
                dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
                scaling_factor: number;
                description?: string | undefined;
                unit?: string | undefined;
                min?: number | undefined;
                max?: number | undefined;
                simulation_type?: "function" | "csv" | "static" | "random" | undefined;
                initial_value?: any;
                csv_file?: string | undefined;
                function_code?: string | undefined;
                update_interval?: number | undefined;
            }[];
            description?: string | undefined;
            attachments?: {
                id: string;
                name: string;
                size: number;
                mimeType: string;
                uploadedAt: string;
            }[] | undefined;
            model?: string | undefined;
            metadata?: {
                source?: string | undefined;
                category?: string | undefined;
                manufacturer?: string | undefined;
                version?: string | undefined;
                models?: {
                    name: string;
                    variants?: string[] | undefined;
                }[] | undefined;
                tags?: string[] | undefined;
                lastUpdated?: string | undefined;
                author?: string | undefined;
            } | undefined;
            devices?: {
                name: string;
                device_type: string;
                description?: string | undefined;
                data_points?: any[] | undefined;
                unit_id?: number | undefined;
            }[] | undefined;
            intelligent?: boolean | undefined;
            state_machine?: {
                states: {
                    name: string;
                    values: Record<string, any>;
                    transitions: any[];
                }[];
                initial_state: string;
                current_state?: string | undefined;
            } | undefined;
            data_links?: {
                source: string;
                targets: string[];
                transform?: string | undefined;
            }[] | undefined;
        }, {
            id: string;
            name: string;
            manufacturer: string;
            data_points: {
                name: string;
                address: number;
                type: "coil" | "discrete" | "holding" | "input";
                dataType: "string" | "uint16" | "int16" | "uint32" | "int32" | "float32" | "bool" | "bits";
                description?: string | undefined;
                writable?: boolean | undefined;
                unit?: string | undefined;
                min?: number | undefined;
                max?: number | undefined;
                scaling_factor?: number | undefined;
                simulation_type?: "function" | "csv" | "static" | "random" | undefined;
                initial_value?: any;
                csv_file?: string | undefined;
                function_code?: string | undefined;
                update_interval?: number | undefined;
            }[];
            description?: string | undefined;
            attachments?: {
                id: string;
                name: string;
                size: number;
                mimeType: string;
                uploadedAt: string;
            }[] | undefined;
            model?: string | undefined;
            metadata?: {
                source?: string | undefined;
                category?: string | undefined;
                manufacturer?: string | undefined;
                version?: string | undefined;
                models?: {
                    name: string;
                    variants?: string[] | undefined;
                }[] | undefined;
                tags?: string[] | undefined;
                lastUpdated?: string | undefined;
                author?: string | undefined;
            } | undefined;
            protocol?: "modbus" | "bacnet" | undefined;
            devices?: {
                name: string;
                device_type: string;
                description?: string | undefined;
                data_points?: any[] | undefined;
                unit_id?: number | undefined;
            }[] | undefined;
            intelligent?: boolean | undefined;
            state_machine?: {
                states: {
                    name: string;
                    values: Record<string, any>;
                    transitions: any[];
                }[];
                initial_state: string;
                current_state?: string | undefined;
            } | undefined;
            data_links?: {
                source: string;
                targets: string[];
                transform?: string | undefined;
            }[] | undefined;
        }>;
        templateUpdate: z.ZodEffects<z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            description: z.ZodOptional<z.ZodString>;
            manufacturer: z.ZodOptional<z.ZodString>;
            model: z.ZodOptional<z.ZodString>;
            metadata: z.ZodOptional<z.ZodAny>;
            data_points: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
            devices: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
            attachments: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
            intelligent: z.ZodOptional<z.ZodBoolean>;
            state_machine: z.ZodOptional<z.ZodAny>;
            data_links: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
        }, "strip", z.ZodTypeAny, {
            name?: string | undefined;
            description?: string | undefined;
            attachments?: any[] | undefined;
            model?: string | undefined;
            manufacturer?: string | undefined;
            metadata?: any;
            data_points?: any[] | undefined;
            devices?: any[] | undefined;
            intelligent?: boolean | undefined;
            state_machine?: any;
            data_links?: any[] | undefined;
        }, {
            name?: string | undefined;
            description?: string | undefined;
            attachments?: any[] | undefined;
            model?: string | undefined;
            manufacturer?: string | undefined;
            metadata?: any;
            data_points?: any[] | undefined;
            devices?: any[] | undefined;
            intelligent?: boolean | undefined;
            state_machine?: any;
            data_links?: any[] | undefined;
        }>, {
            name?: string | undefined;
            description?: string | undefined;
            attachments?: any[] | undefined;
            model?: string | undefined;
            manufacturer?: string | undefined;
            metadata?: any;
            data_points?: any[] | undefined;
            devices?: any[] | undefined;
            intelligent?: boolean | undefined;
            state_machine?: any;
            data_links?: any[] | undefined;
        }, {
            name?: string | undefined;
            description?: string | undefined;
            attachments?: any[] | undefined;
            model?: string | undefined;
            manufacturer?: string | undefined;
            metadata?: any;
            data_points?: any[] | undefined;
            devices?: any[] | undefined;
            intelligent?: boolean | undefined;
            state_machine?: any;
            data_links?: any[] | undefined;
        }>;
        simulator: z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            templateId: z.ZodString;
            config: z.ZodObject<{
                port: z.ZodNumber;
                host: z.ZodDefault<z.ZodString>;
                unitId: z.ZodDefault<z.ZodNumber>;
                protocol: z.ZodEnum<["modbus", "bacnet"]>;
            }, "strip", z.ZodTypeAny, {
                port: number;
                host: string;
                protocol: "modbus" | "bacnet";
                unitId: number;
            }, {
                port: number;
                protocol: "modbus" | "bacnet";
                host?: string | undefined;
                unitId?: number | undefined;
            }>;
            autoStart: z.ZodDefault<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            id: string;
            name: string;
            templateId: string;
            config: {
                port: number;
                host: string;
                protocol: "modbus" | "bacnet";
                unitId: number;
            };
            autoStart: boolean;
        }, {
            id: string;
            name: string;
            templateId: string;
            config: {
                port: number;
                protocol: "modbus" | "bacnet";
                host?: string | undefined;
                unitId?: number | undefined;
            };
            autoStart?: boolean | undefined;
        }>;
        settings: z.ZodObject<{
            api: z.ZodOptional<z.ZodObject<{
                port: z.ZodNumber;
                host: z.ZodString;
                cors: z.ZodObject<{
                    enabled: z.ZodBoolean;
                    origins: z.ZodArray<z.ZodString, "many">;
                }, "strip", z.ZodTypeAny, {
                    enabled: boolean;
                    origins: string[];
                }, {
                    enabled: boolean;
                    origins: string[];
                }>;
            }, "strip", z.ZodTypeAny, {
                cors: {
                    enabled: boolean;
                    origins: string[];
                };
                port: number;
                host: string;
            }, {
                cors: {
                    enabled: boolean;
                    origins: string[];
                };
                port: number;
                host: string;
            }>>;
            simulator: z.ZodOptional<z.ZodObject<{
                defaultPort: z.ZodNumber;
                autoRestart: z.ZodBoolean;
                maxInstances: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                defaultPort: number;
                autoRestart: boolean;
                maxInstances: number;
            }, {
                defaultPort: number;
                autoRestart: boolean;
                maxInstances: number;
            }>>;
            logging: z.ZodOptional<z.ZodObject<{
                level: z.ZodEnum<["error", "warn", "info", "debug"]>;
                file: z.ZodBoolean;
                console: z.ZodBoolean;
                maxSize: z.ZodString;
                maxFiles: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                level: "error" | "debug" | "warn" | "info";
                maxSize: string;
                maxFiles: string;
                file: boolean;
                console: boolean;
            }, {
                level: "error" | "debug" | "warn" | "info";
                maxSize: string;
                maxFiles: string;
                file: boolean;
                console: boolean;
            }>>;
            ui: z.ZodOptional<z.ZodObject<{
                theme: z.ZodEnum<["light", "dark", "auto"]>;
                language: z.ZodEnum<["en", "es", "fr", "de"]>;
                dateFormat: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                theme: "light" | "dark" | "auto";
                language: "en" | "es" | "fr" | "de";
                dateFormat: string;
            }, {
                theme: "light" | "dark" | "auto";
                language: "en" | "es" | "fr" | "de";
                dateFormat: string;
            }>>;
        }, "strip", z.ZodTypeAny, {
            logging?: {
                level: "error" | "debug" | "warn" | "info";
                maxSize: string;
                maxFiles: string;
                file: boolean;
                console: boolean;
            } | undefined;
            api?: {
                cors: {
                    enabled: boolean;
                    origins: string[];
                };
                port: number;
                host: string;
            } | undefined;
            simulator?: {
                defaultPort: number;
                autoRestart: boolean;
                maxInstances: number;
            } | undefined;
            ui?: {
                theme: "light" | "dark" | "auto";
                language: "en" | "es" | "fr" | "de";
                dateFormat: string;
            } | undefined;
        }, {
            logging?: {
                level: "error" | "debug" | "warn" | "info";
                maxSize: string;
                maxFiles: string;
                file: boolean;
                console: boolean;
            } | undefined;
            api?: {
                cors: {
                    enabled: boolean;
                    origins: string[];
                };
                port: number;
                host: string;
            } | undefined;
            simulator?: {
                defaultPort: number;
                autoRestart: boolean;
                maxInstances: number;
            } | undefined;
            ui?: {
                theme: "light" | "dark" | "auto";
                language: "en" | "es" | "fr" | "de";
                dateFormat: string;
            } | undefined;
        }>;
        id: z.ZodObject<{
            id: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            id: string;
        }, {
            id: string;
        }>;
        pagination: z.ZodObject<{
            page: z.ZodDefault<z.ZodNumber>;
            limit: z.ZodDefault<z.ZodNumber>;
            sort: z.ZodOptional<z.ZodString>;
            order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
        }, "strip", z.ZodTypeAny, {
            page: number;
            limit: number;
            order: "asc" | "desc";
            sort?: string | undefined;
        }, {
            sort?: string | undefined;
            page?: number | undefined;
            limit?: number | undefined;
            order?: "asc" | "desc" | undefined;
        }>;
        filter: z.ZodObject<{
            search: z.ZodOptional<z.ZodString>;
            tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            category: z.ZodOptional<z.ZodString>;
            protocol: z.ZodOptional<z.ZodEnum<["modbus", "bacnet"]>>;
            status: z.ZodOptional<z.ZodEnum<["active", "inactive", "error"]>>;
        }, "strip", z.ZodTypeAny, {
            status?: "error" | "active" | "inactive" | undefined;
            search?: string | undefined;
            category?: string | undefined;
            protocol?: "modbus" | "bacnet" | undefined;
            tags?: string[] | undefined;
        }, {
            status?: "error" | "active" | "inactive" | undefined;
            search?: string | undefined;
            category?: string | undefined;
            protocol?: "modbus" | "bacnet" | undefined;
            tags?: string[] | undefined;
        }>;
    };
    compose: {
        /**
         * Merge multiple schemas
         */
        merge: <T extends ZodSchema, U extends ZodSchema>(schema1: T, schema2: U) => z.ZodObject<z.objectUtil.extendShape<any, (U & z.ZodObject<any, any, any, any, any>)["shape"]>, (U & z.ZodObject<any, any, any, any, any>)["_def"]["unknownKeys"], (U & z.ZodObject<any, any, any, any, any>)["_def"]["catchall"], z.objectOutputType<z.objectUtil.extendShape<any, (U & z.ZodObject<any, any, any, any, any>)["shape"]>, (U & z.ZodObject<any, any, any, any, any>)["_def"]["catchall"], (U & z.ZodObject<any, any, any, any, any>)["_def"]["unknownKeys"]>, z.objectInputType<z.objectUtil.extendShape<any, (U & z.ZodObject<any, any, any, any, any>)["shape"]>, (U & z.ZodObject<any, any, any, any, any>)["_def"]["catchall"], (U & z.ZodObject<any, any, any, any, any>)["_def"]["unknownKeys"]>> | z.ZodIntersection<T, U>;
        /**
         * Make all fields optional
         */
        partial: <T extends z.ZodObject<any>>(schema: T) => z.ZodObject<{
            [x: string]: z.ZodOptional<any>;
        }, z.UnknownKeysParam, z.ZodTypeAny, {
            [x: string]: any;
        }, {
            [x: string]: any;
        }>;
        /**
         * Make specific fields required
         */
        require: <T extends z.ZodObject<any>>(schema: T, fields: Array<keyof T["shape"]>) => z.ZodObject<{} & {
            [x: string]: any;
        }, z.UnknownKeysParam, z.ZodTypeAny, {
            [x: string]: any;
        }, {
            [x: string]: any;
        }>;
        /**
         * Pick specific fields from a schema
         */
        pick: <T extends z.ZodObject<any>>(schema: T, fields: Array<keyof T["shape"]>) => z.ZodObject<any, "strip", z.ZodTypeAny, {
            [x: string]: any;
        }, {
            [x: string]: any;
        }>;
        /**
         * Omit specific fields from a schema
         */
        omit: <T extends z.ZodObject<any>>(schema: T, fields: Array<keyof T["shape"]>) => z.ZodObject<Omit<any, string | number | symbol>, z.UnknownKeysParam, z.ZodTypeAny, {}, {}>;
    };
    z: typeof z;
};
export default _default;
//# sourceMappingURL=validation.d.ts.map