/** * JSON Schema function library: * * buildSchemaFromLayout: TODO: Write this function * * buildSchemaFromData: * * getFromSchema: * * removeRecursiveReferences: * * getInputType: * * checkInlineType: * * isInputRequired: * * updateInputOptions: * * getTitleMapFromOneOf: * * getControlValidators: * * resolveSchemaReferences: * * getSubSchema: * * combineAllOf: * * fixRequiredArrayProperties: */ /** * 'buildSchemaFromLayout' function * * TODO: Build a JSON Schema from a JSON Form layout */ export declare function buildSchemaFromLayout(layout: any): void; /** * 'buildSchemaFromData' function * * Build a JSON Schema from a data object */ export declare function buildSchemaFromData(data: any, requireAllFields?: boolean, isRoot?: boolean): any; /** * 'getFromSchema' function * * Uses a JSON Pointer for a value within a data object to retrieve * the schema for that value within schema for the data object. * * The optional third parameter can also be set to return something else: * 'schema' (default): the schema for the value indicated by the data pointer * 'parentSchema': the schema for the value's parent object or array * 'schemaPointer': a pointer to the value's schema within the object's schema * 'parentSchemaPointer': a pointer to the schema for the value's parent object or array */ export declare function getFromSchema(schema: any, dataPointer: any, returnType?: string): any; /** * 'removeRecursiveReferences' function * * Checks a JSON Pointer against a map of recursive references and returns * a JSON Pointer to the shallowest equivalent location in the same object. * * Using this functions enables an object to be constructed with unlimited * recursion, while maintaing a fixed set of metadata, such as field data types. * The object can grow as large as it wants, and deeply recursed nodes can * just refer to the metadata for their shallow equivalents, instead of having * to add additional redundant metadata for each recursively added node. * * Example: * * pointer: '/stuff/and/more/and/more/and/more/and/more/stuff' * recursiveRefMap: [['/stuff/and/more/and/more', '/stuff/and/more/']] * returned: '/stuff/and/more/stuff' */ export declare function removeRecursiveReferences(pointer: any, recursiveRefMap: any, arrayMap?: Map): any; /** * 'getInputType' function */ export declare function getInputType(schema: any, layoutNode?: any): any; /** * 'checkInlineType' function * * Checks layout and schema nodes for 'inline: true', and converts * 'radios' or 'checkboxes' to 'radios-inline' or 'checkboxes-inline' */ export declare function checkInlineType(controlType: any, schema: any, layoutNode?: any): any; /** * 'isInputRequired' function * * Checks a JSON Schema to see if an item is required */ export declare function isInputRequired(schema: any, schemaPointer: any): any; /** * 'updateInputOptions' function */ export declare function updateInputOptions(layoutNode: any, schema: any, jsf: any): void; /** * 'getTitleMapFromOneOf' function */ export declare function getTitleMapFromOneOf(schema?: any, flatList?: boolean, validateOnly?: boolean): any; /** * 'getControlValidators' function */ export declare function getControlValidators(schema: any): any; /** * 'resolveSchemaReferences' function * * Find all $ref links in schema and save links and referenced schemas in * schemaRefLibrary, schemaRecursiveRefMap, and dataRecursiveRefMap */ export declare function resolveSchemaReferences(schema: any, schemaRefLibrary: any, schemaRecursiveRefMap: any, dataRecursiveRefMap: any, arrayMap: any): any; /** * 'getSubSchema' function */ export declare function getSubSchema(schema: any, pointer: any, schemaRefLibrary?: any, schemaRecursiveRefMap?: Map, usedPointers?: string[]): any; /** * 'combineAllOf' function * * Attempt to convert an allOf schema object into * a non-allOf schema object with equivalent rules. */ export declare function combineAllOf(schema: any): any; /** * 'fixRequiredArrayProperties' function * * Fixes an incorrectly placed required list inside an array schema, by moving * it into items.properties or additionalItems.properties, where it belongs. */ export declare function fixRequiredArrayProperties(schema: any): any;