/** * 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"; /** * Validation options for middleware */ export interface ValidationOptions { /** Whether to stop on first error (not used with Zod) */ abortEarly?: boolean; /** Whether to strip unknown properties from validated data */ stripUnknown?: boolean; } /** * Validation schemas for different endpoints */ export declare const schemas: { template: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodOptional; manufacturer: z.ZodString; model: z.ZodOptional; protocol: z.ZodDefault>; metadata: z.ZodOptional; models: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name: string; variants?: string[] | undefined; }, { name: string; variants?: string[] | undefined; }>, "many">>; category: z.ZodOptional; tags: z.ZodOptional>; source: z.ZodOptional; lastUpdated: z.ZodOptional; version: z.ZodOptional; author: z.ZodOptional; }, "strip", z.ZodTypeAny, { source?: string | undefined; category?: string | undefined; manufacturer?: string | undefined; version?: string | undefined; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | undefined; lastUpdated?: string | undefined; author?: string | undefined; }, { source?: string | undefined; category?: string | undefined; manufacturer?: string | undefined; version?: string | undefined; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | undefined; lastUpdated?: string | undefined; author?: string | undefined; }>>; data_points: z.ZodArray; dataType: z.ZodEnum<["uint16", "int16", "uint32", "int32", "float32", "string", "bool", "bits"]>; writable: z.ZodDefault; unit: z.ZodOptional; min: z.ZodOptional; max: z.ZodOptional; scaling_factor: z.ZodDefault; description: z.ZodOptional; simulation_type: z.ZodOptional>; initial_value: z.ZodOptional; csv_file: z.ZodOptional; function_code: z.ZodOptional; update_interval: z.ZodOptional; }, "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; unit_id: z.ZodOptional; data_points: z.ZodOptional>; }, "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, "many">>; intelligent: z.ZodOptional; state_machine: z.ZodOptional; transitions: z.ZodArray; }, "strip", z.ZodTypeAny, { name: string; values: Record; transitions: any[]; }, { name: string; values: Record; transitions: any[]; }>, "many">; initial_state: z.ZodString; current_state: z.ZodOptional; }, "strip", z.ZodTypeAny, { states: { name: string; values: Record; transitions: any[]; }[]; initial_state: string; current_state?: string | undefined; }, { states: { name: string; values: Record; transitions: any[]; }[]; initial_state: string; current_state?: string | undefined; }>>; data_links: z.ZodOptional; transform: z.ZodOptional; }, "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; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | 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; 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; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | 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; transitions: any[]; }[]; initial_state: string; current_state?: string | undefined; } | undefined; data_links?: { source: string; targets: string[]; transform?: string | undefined; }[] | undefined; }>; templateUpdate: z.ZodEffects; description: z.ZodOptional; manufacturer: z.ZodOptional; model: z.ZodOptional; metadata: z.ZodOptional; data_points: z.ZodOptional>; devices: z.ZodOptional>; attachments: z.ZodOptional>; intelligent: z.ZodOptional; state_machine: z.ZodOptional; data_links: z.ZodOptional>; }, "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; unitId: z.ZodDefault; 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; }, "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; }, "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>; logging: z.ZodOptional; file: z.ZodBoolean; console: z.ZodBoolean; maxSize: z.ZodString; maxFiles: z.ZodString; }, "strip", z.ZodTypeAny, { level: "debug" | "error" | "info" | "warn"; maxSize: string; maxFiles: string; file: boolean; console: boolean; }, { level: "debug" | "error" | "info" | "warn"; maxSize: string; maxFiles: string; file: boolean; console: boolean; }>>; ui: z.ZodOptional; 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: "debug" | "error" | "info" | "warn"; 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: "debug" | "error" | "info" | "warn"; 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; limit: z.ZodDefault; sort: z.ZodOptional; order: z.ZodDefault>; }, "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; tags: z.ZodOptional>; category: z.ZodOptional; protocol: z.ZodOptional>; status: z.ZodOptional>; }, "strip", z.ZodTypeAny, { status?: "error" | "active" | "inactive" | undefined; search?: string | undefined; category?: string | undefined; tags?: string[] | undefined; protocol?: "modbus" | "bacnet" | undefined; }, { status?: "error" | "active" | "inactive" | undefined; search?: string | undefined; category?: string | undefined; tags?: string[] | undefined; protocol?: "modbus" | "bacnet" | undefined; }>; }; /** * Create a validation middleware for request body */ export declare function validate(schema: T, options?: ValidationOptions): (req: Request, res: Response, next: NextFunction) => void; /** * Validate request parameters */ export declare function validateParams(schema: T, options?: ValidationOptions): (req: Request, res: Response, next: NextFunction) => void; /** * Validate query parameters */ export declare function validateQuery(schema: T, options?: ValidationOptions): (req: Request, res: Response, next: NextFunction) => void; /** * Combined validation for body, params, and query */ export declare function validateRequest(validationSchemas: T, options?: ValidationOptions): (req: Request, res: Response, next: NextFunction) => void; /** * Async validation wrapper for custom validation logic */ export declare function validateAsync(validationFn: (req: Request) => Promise): (req: Request, res: Response, next: NextFunction) => Promise; /** * Create a conditional validation middleware */ export declare function validateIf(condition: (req: Request) => boolean, schema: T, options?: ValidationOptions): (req: Request, res: Response, next: NextFunction) => void; /** * Schema composition helpers using Zod's built-in methods */ export declare const compose: { /** * Merge multiple schemas */ merge: (schema1: T, schema2: U) => z.ZodObject)["shape"]>, (U & z.ZodObject)["_def"]["unknownKeys"], (U & z.ZodObject)["_def"]["catchall"], z.objectOutputType)["shape"]>, (U & z.ZodObject)["_def"]["catchall"], (U & z.ZodObject)["_def"]["unknownKeys"]>, z.objectInputType)["shape"]>, (U & z.ZodObject)["_def"]["catchall"], (U & z.ZodObject)["_def"]["unknownKeys"]>> | z.ZodIntersection; /** * Make all fields optional */ partial: >(schema: T) => z.ZodObject<{ [x: string]: z.ZodOptional; }, z.UnknownKeysParam, z.ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>; /** * Make specific fields required */ require: >(schema: T, fields: Array) => z.ZodObject<{} & { [x: string]: z.ZodTypeAny; }, z.UnknownKeysParam, z.ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>; /** * Pick specific fields from a schema */ pick: >(schema: T, fields: Array) => z.ZodObject, "strip", z.ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>; /** * Omit specific fields from a schema */ omit: >(schema: T, fields: Array) => z.ZodObject, z.UnknownKeysParam, z.ZodTypeAny, { [x: number]: any; }, { [x: number]: any; }>; }; /** * 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; manufacturer: z.ZodString; model: z.ZodOptional; protocol: z.ZodDefault>; metadata: z.ZodOptional; models: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name: string; variants?: string[] | undefined; }, { name: string; variants?: string[] | undefined; }>, "many">>; category: z.ZodOptional; tags: z.ZodOptional>; source: z.ZodOptional; lastUpdated: z.ZodOptional; version: z.ZodOptional; author: z.ZodOptional; }, "strip", z.ZodTypeAny, { source?: string | undefined; category?: string | undefined; manufacturer?: string | undefined; version?: string | undefined; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | undefined; lastUpdated?: string | undefined; author?: string | undefined; }, { source?: string | undefined; category?: string | undefined; manufacturer?: string | undefined; version?: string | undefined; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | undefined; lastUpdated?: string | undefined; author?: string | undefined; }>>; data_points: z.ZodArray; dataType: z.ZodEnum<["uint16", "int16", "uint32", "int32", "float32", "string", "bool", "bits"]>; writable: z.ZodDefault; unit: z.ZodOptional; min: z.ZodOptional; max: z.ZodOptional; scaling_factor: z.ZodDefault; description: z.ZodOptional; simulation_type: z.ZodOptional>; initial_value: z.ZodOptional; csv_file: z.ZodOptional; function_code: z.ZodOptional; update_interval: z.ZodOptional; }, "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; unit_id: z.ZodOptional; data_points: z.ZodOptional>; }, "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, "many">>; intelligent: z.ZodOptional; state_machine: z.ZodOptional; transitions: z.ZodArray; }, "strip", z.ZodTypeAny, { name: string; values: Record; transitions: any[]; }, { name: string; values: Record; transitions: any[]; }>, "many">; initial_state: z.ZodString; current_state: z.ZodOptional; }, "strip", z.ZodTypeAny, { states: { name: string; values: Record; transitions: any[]; }[]; initial_state: string; current_state?: string | undefined; }, { states: { name: string; values: Record; transitions: any[]; }[]; initial_state: string; current_state?: string | undefined; }>>; data_links: z.ZodOptional; transform: z.ZodOptional; }, "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; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | 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; 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; tags?: string[] | undefined; models?: { name: string; variants?: string[] | undefined; }[] | 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; transitions: any[]; }[]; initial_state: string; current_state?: string | undefined; } | undefined; data_links?: { source: string; targets: string[]; transform?: string | undefined; }[] | undefined; }>; templateUpdate: z.ZodEffects; description: z.ZodOptional; manufacturer: z.ZodOptional; model: z.ZodOptional; metadata: z.ZodOptional; data_points: z.ZodOptional>; devices: z.ZodOptional>; attachments: z.ZodOptional>; intelligent: z.ZodOptional; state_machine: z.ZodOptional; data_links: z.ZodOptional>; }, "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; unitId: z.ZodDefault; 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; }, "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; }, "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>; logging: z.ZodOptional; file: z.ZodBoolean; console: z.ZodBoolean; maxSize: z.ZodString; maxFiles: z.ZodString; }, "strip", z.ZodTypeAny, { level: "debug" | "error" | "info" | "warn"; maxSize: string; maxFiles: string; file: boolean; console: boolean; }, { level: "debug" | "error" | "info" | "warn"; maxSize: string; maxFiles: string; file: boolean; console: boolean; }>>; ui: z.ZodOptional; 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: "debug" | "error" | "info" | "warn"; 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: "debug" | "error" | "info" | "warn"; 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; limit: z.ZodDefault; sort: z.ZodOptional; order: z.ZodDefault>; }, "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; tags: z.ZodOptional>; category: z.ZodOptional; protocol: z.ZodOptional>; status: z.ZodOptional>; }, "strip", z.ZodTypeAny, { status?: "error" | "active" | "inactive" | undefined; search?: string | undefined; category?: string | undefined; tags?: string[] | undefined; protocol?: "modbus" | "bacnet" | undefined; }, { status?: "error" | "active" | "inactive" | undefined; search?: string | undefined; category?: string | undefined; tags?: string[] | undefined; protocol?: "modbus" | "bacnet" | undefined; }>; }; compose: { /** * Merge multiple schemas */ merge: (schema1: T, schema2: U) => z.ZodObject)["shape"]>, (U & z.ZodObject)["_def"]["unknownKeys"], (U & z.ZodObject)["_def"]["catchall"], z.objectOutputType)["shape"]>, (U & z.ZodObject)["_def"]["catchall"], (U & z.ZodObject)["_def"]["unknownKeys"]>, z.objectInputType)["shape"]>, (U & z.ZodObject)["_def"]["catchall"], (U & z.ZodObject)["_def"]["unknownKeys"]>> | z.ZodIntersection; /** * Make all fields optional */ partial: >(schema: T) => z.ZodObject<{ [x: string]: z.ZodOptional; }, z.UnknownKeysParam, z.ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>; /** * Make specific fields required */ require: >(schema: T, fields: Array) => z.ZodObject<{} & { [x: string]: z.ZodTypeAny; }, z.UnknownKeysParam, z.ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>; /** * Pick specific fields from a schema */ pick: >(schema: T, fields: Array) => z.ZodObject, "strip", z.ZodTypeAny, { [x: string]: any; }, { [x: string]: any; }>; /** * Omit specific fields from a schema */ omit: >(schema: T, fields: Array) => z.ZodObject, z.UnknownKeysParam, z.ZodTypeAny, { [x: number]: any; }, { [x: number]: any; }>; }; z: typeof z; }; export default _default; //# sourceMappingURL=validation.d.ts.map