n8n-nodes-arubacentral
Version:
n8n community node for Aruba Central API integration with comprehensive monitoring, configuration, and management capabilities
27 lines (26 loc) • 1.17 kB
TypeScript
/**
* Type guard to validate response against expected interface
*
* @param data The data to validate
* @param requiredProps Array of required property names
* @param arrayProps Object mapping property names to expected array types
* @returns boolean indicating if data matches expected format
*/
export declare function validateResponseFormat<T>(data: unknown, requiredProps?: string[], arrayProps?: Record<string, boolean>): data is T;
/**
* Validates that all required parameters are provided
*
* @param params Object containing parameters to validate
* @param required Array of required parameter names
* @returns Error message if validation fails, otherwise null
*/
export declare function validateRequiredParameters(params: Record<string, unknown>, required: string[]): string | null;
/**
* Validates that a parameter's value is within a set of allowed values
*
* @param param Parameter name
* @param value Parameter value
* @param allowedValues Array of allowed values
* @returns Error message if validation fails, otherwise null
*/
export declare function validateAllowedValue<T>(param: string, value: T, allowedValues: T[]): string | null;