import { DataItem, JsonValue } from '../types/DataConnectorTypes'; /** * Utility tools for mapping between `EngineDataItem` and `DataItem`. */ export declare class DataItemMappingTools { /** * Checks if the given value is a `DatePropertyWrapper`. * * @param value The value to check. * @returns `true` if the value is a `DatePropertyWrapper`, otherwise `false`. */ private isDatePropertyWrapper; /** * Checks if the given value is a `Date` object instance. * * @param value The value to check. * @returns `true` if the value is a `Date` object, otherwise `false`. */ private isDateObject; /** * Transforms an `EngineDataItem` into a `DataItem`. * * Converts `DatePropertyWrapper` values to JavaScript `Date` objects * while keeping other values unchanged. * * @param dataItem the EngineDataItem to transform. * @returns the resulting `DataItem` with parsed date properties. */ mapEngineToDataItem(dataItem: EngineDataItem): DataItem; /** * Transforms a `DataItem` into an `EngineDataItem`. * * Converts JavaScript `Date` objects to `DatePropertyWrapper` objects * while keeping other values unchanged. * * @param dataItem the `DataItem` to transform. * @returns the resulting `EngineDataItem` with parsed date properties. */ mapDataItemToEngine(dataItem: DataItem): EngineDataItem; } /** * Internal type used to wrap date objects on the engine side. */ export type DatePropertyWrapper = { value: number; type: 'date'; chiliReservedTag: 'date'; }; /** * Engine data item type. */ export type EngineDataItem = { [key: string]: JsonValue | DatePropertyWrapper; };