/** * Allowed top-level keys in `iparams.json`. */ export const IPARAMS_INSTALLATION_PARAMETERS_LABEL = 'installation_parameters'; export const IPARAMS_ROOT_ALLOWED_KEYS = [IPARAMS_INSTALLATION_PARAMETERS_LABEL] as const; /** * File name for iparam definitions in an app directory. */ export const IPARAMS_JSON_FILENAME = 'iparams.json'; /** * Label for the `sections` array in validation error messages. */ export const IPARAMS_SECTIONS_LABEL = 'sections'; /** * Allowed keys under `installation_parameters` in `iparams.json`. */ export const IPARAMS_INSTALLATION_PARAMETERS_ALLOWED_KEYS = [IPARAMS_SECTIONS_LABEL] as const; /** * Maximum number of parameter definitions allowed in a single `iparams.json` array. */ export const IPARAMS_MAX_COUNT = 20; /** * Central limits for iparam definition fields (`iparams.json`). */ export const IPARAM_DEFN_MAX_LENGTHS = { NAME: 50, DISPLAY_NAME: 50, DESCRIPTION: 250 } as const; /** * Limits for DROPDOWN and MULTISELECT_DROPDOWN `options` arrays in definitions. */ export const OPTIONS_LIMITS = { MAX_COUNT: 20, MAX_OPTION_LENGTH: 250 } as const; /** * Max lengths for iparam input values when validating `iparams.local.json` / runtime inputs. */ export const IPARAM_VALUE_MAX_LENGTHS = { TEXT: 250, SECRET: 250, URL: 250, DATE: 10 } as const; /** * Allowed {@link URL#protocol} values for iparam type `URL`. */ export const IPARAM_URL_ALLOWED_PROTOCOLS = ['http:', 'https:'] as const;