import { Identifier, Schema } from '@lightweightform/storage'; import { LfXmlSerializerSchemaProperties } from '../types/schema-properties'; import { LfXmlSerializerOptions } from '../types/xml-serializer-options'; /** * XML element name according to provided schema and options. * @param schema Schema of the value. * @param path Path of the value. * @param options XML serialiser options. * @returns XML element name of the value or `undefined` if one wasn't specified * in the schema or options. */ export declare function specifiedElementName(schema: Schema & LfXmlSerializerSchemaProperties, path: string, options: Readonly): string | undefined; /** * XML element name of the child element. * @param name XML element name of the parent. * @param schema Schema of the parent. * @param childSchema Schema of the child. * @param childPathP Path of the child with collection value ids replaced with * placeholders. * @param childId Identifier of the child (for records/tuples, unneeded * otherwise). * @param options XML serialiser options. * @returns XML element name of the child. */ export declare function childElementName(name: string, schema: Schema & LfXmlSerializerSchemaProperties, childSchema: Schema & LfXmlSerializerSchemaProperties, childPathP: string, childId: Identifier | undefined, options: Readonly): string; /** * Name of the XML property on children elements of maps used to specify the * value's key. * @param schema Schema of the map. * @param options XML serialiser options. * @returns Name of the property. */ export declare function mapValueKeyAttributeName(schema: Schema, options: Readonly): string; /** * Serialises all attributes to set in a certain XML element. * @param js Value for which to set attributes. * @param schema Schema of value with attributes to serialise. * @param path Path of value with attributes to serialise. * @param pathP Path of value with attributes to serialise with collection value * ids replaced with placeholders. * @param option XML serialiser options. * @returns Serialised attributes to set in the XML element. */ export declare function serializeAttributes(js: any, schema: Schema & LfXmlSerializerSchemaProperties, path: string, pathP: string, options: Readonly): Record | undefined; /** * Deserialises all attributes from a certain XML element. * @param js Value from which to unset attributes. * @param libAttrs Attributes of the XML element. * @param schema Schema of value with attributes to deserialise. * @param path Path of value with attributes to deserialise. * @param pathP Path of value with attributes to deserialise with collection * value ids replaced with placeholders. * @param option XML serialiser options. */ export declare function deserializeAttributes(js: any, libAttrs: Record, schema: Schema & LfXmlSerializerSchemaProperties, path: string, pathP: string, options: Readonly): void; /** * Runs all simple serialisers for a value of a simple schema. * @param value Value on which to run simple serialisers. * @param schema Schema of value on which to run serialisers. * @param path Path of value on which to run serialisers. * @param options XML serialiser options. * @returns Serialised value. */ export declare function runSimpleSerializers(value: any, schema: Schema & LfXmlSerializerSchemaProperties, path: string, options: Readonly): any; /** * Runs all simple deserialisers for a value of a simple schema. * @param value Value on which to run simple deserialisers. * @param schema Schema of value on which to run deserialisers. * @param path Path of value on which to run deserialisers. * @param options XML serialiser options. * @returns Deserialised value. */ export declare function runSimpleDeserializers(value: any, schema: Schema & LfXmlSerializerSchemaProperties, path: string, options: Readonly): any; /** * Runs all serialisers for a lib value of a given schema. * @param value Lib value on which to run serialisers. * @param schema Schema of value on which to run serialisers. * @param path Path of value on which to run serialisers. * @param options XML serialiser options. * @returns Serialised lib value. */ export declare function runSerializers(lib: any, schema: Schema & LfXmlSerializerSchemaProperties, path: string, options: Readonly): any; /** * Runs all deserialisers for a lib value of a given schema. * @param value Lib value on which to run deserialisers. * @param schema Schema of value on which to run deserialisers. * @param path Path of value on which to run deserialisers. * @param options XML serialiser options. * @returns Deserialised lib value. */ export declare function runDeserializers(lib: any, schema: Schema & LfXmlSerializerSchemaProperties, path: string, options: Readonly): any;