import { ReturnCode } from "./common-types"; export enum SettingDataType { NUMBER = 0, STRING = 1 } /** @brief This enum represents each setting control type. */ export enum ControlType { cntrlRadio = 0, cntrlToggle, cntrlComboBox, cntrlDrpDown, cntrlLabel, cntrlTextBox, cntrlButton, cntrlUnknown } /** @brief This structure represents each setting info. */ export interface SettingInfo { settingGuid: string, // Setting GUID name: string, // Setting Name helpText: string, // Setting Help Text currValue: number | string, // Current Device value for this setting dataType: SettingDataType, listSize: number, // Number of values for this setting isDeviceRestart: boolean, // If device restart is required for this setting isSettingProtected: boolean, // Is setting protected isSettingProtectionEnabled: boolean, // Is setting protection enabled cntrlType: ControlType, // This represents what type of control for setting groupName: string, // This represents group name of the setting groupHelpText: string, // This represents group help text of the setting isDepedentsetting: boolean, // Whether dependency setting is present or not dependentDefaultValue: null | undefined | number | string, // Default dependent value when setting is disabled isValidationSupport: boolean, // If validation rule is supported or not // This structure contains the validation rule validationRule: null | undefined | { minLength: number, maxLength: number, regExp: string, errorMessage: string }, // Structure for all key-value pairs for this setting listKeyValue: Array<{ key: number, value: string, dependentcount?: number, dependents: Array<{ GUID: string, enableFlag: boolean }> }> } /** @brief This structure represents all settings available for the device. */ export interface DeviceSettings { RetCode: ReturnCode listSettingInfo: Array; // Setting information of all settings of the device }