import { CBFileSystem } from '../node/file-system'; import { IparamDefn, IparamInputs, IparamDefns, IparamValue } from '../types/common'; /** * Validator for parameter inputs * Validates input values against the sectioned iparamDefns */ export declare class IparamInputsValidator { private fileSystem; constructor(fileSystem: CBFileSystem); /** * Validates whether the value counts as a provided input. * Not whether it is allowed by iparam definitions—that is handled by {@link IparamInputsValidator.validateInputs}. */ static isProvidedIparamInputValue(value: IparamValue | undefined | null): value is IparamValue; /** * Validates and loads the iparam inputs from a file (no validation against iparamDefns). * Only ensures the file is valid JSON and the root value is an object. * @param {string} path - Path to the iparams.local.json file * @returns {IparamInputs} The loaded inputs * @throws {Error} If the file does not exist, cannot be read or parsed, or root is not an object */ validateAndGetIparamInputsFile(path: string): IparamInputs; /** * Ensures the inputs value is a plain object * @param {any} inputs - The value to check * @throws {Error} If inputs is not a plain object */ ensureInputsIsObject(inputs: any): void; /** * Validates inputs against the iparamDefns (without applying defaults) * Only validates provided values, does not include defaults in the result * @param {IparamInputs} inputs - The input values to validate * @param {IparamDefns} iparamDefns - The iparamDefns * @returns {IparamInputs} The validated inputs (only provided values, no defaults) * @throws {Error} If validation fails * @throws {MissingRequiredParamsError} If required parameters are missing */ validateInputs(inputs: IparamInputs, iparamDefns: IparamDefns): IparamInputs; /** * Validates a single parameter value against its parameter definition. * @param {IparamDefn} param - The parameter definition * @param {any} value - The value to validate * @param {string} [sectionDotParam] - Optional section.param identifier for error messages (e.g. processing_fee_configuration.fee_percentage) * @throws {Error} If the value is invalid */ validateParamValue(param: IparamDefn, value: unknown, sectionDotParam?: string): void; /** * Requires value to be a non-empty string, optionally with max length. * @throws {Error} If not a string, empty after trim, or exceeds maxLength */ private requireNonEmptyString; /** * Requires value to be one of the allowed options. */ private requireInOptions; private validateNumber; private validateBoolean; private validateUrl; private validateDate; private validateDropdown; private validateMultiselectDropdown; }