/** * @license * @preserve * * KeeeX SAS Public code * https://keeex.me * Copyright 2013-2023 KeeeX All Rights Reserved. * * These computer program listings and specifications, herein, * are and remain the property of KeeeX SAS. The intellectual * and technical concepts herein are proprietary to KeeeX SAS * and may be covered by EU and foreign patents, * patents in process, trade secrets and copyright law. * * These listings are published as a way to provide third party * with the ability to process KeeeX data. * As such, support for public inquiries is limited. * They are provided "as-is", without warrany of any kind. * * They shall not be reproduced or copied or used in whole or * in part as the basis for manufacture or sale of items unless * prior written permission is obtained from KeeeX SAS. * * For a license agreement, please contact: * * */ /** Possible field type in a LocalTypeData */ type LocalTypeDataType = string | number | boolean; /** Possible field type in a LocalTypeData */ export declare enum LocalTypeFieldType { string = "string", number = "number", boolean = "boolean" } /** Extra info to compare different keys of the same general type */ export type LocalTypeData = Array; /** Convert a local type array of data to a string */ export declare const localTypeToString: (localTypeRaw: LocalTypeData) => string; /** Convert a string from localTypeToString() into local type array of data */ export declare const stringToLocalType: (localTypeStr: string) => LocalTypeData; /** Take either a LocalTypeData or string as input, and always return a LocalTypeData */ export declare const inputToLocalType: (localType: string | LocalTypeData | undefined) => LocalTypeData; /** Description of a field to extract from LocalTypeData */ interface LocalTypeFieldInfoString { name: string; type: LocalTypeFieldType.string; defaultValue: string; } interface LocalTypeFieldInfoNumber { name: string; type: LocalTypeFieldType.number; defaultValue: number; } interface LocalTypeFieldInfoBoolean { name: string; type: LocalTypeFieldType.boolean; defaultValue: boolean; } type LocalTypeFieldInfo = LocalTypeFieldInfoString | LocalTypeFieldInfoNumber | LocalTypeFieldInfoBoolean; /** * Store info from LocalTypeData into an object * * The output's type are checked to match the fields specification and can be safely typechecked * against. * Take care of providing the appropriate type for ResultType. */ export declare const extractFromLocalTypeData: >(localType: LocalTypeData, fields: Array) => ResultType; /** * Put data from a (flat) record into a LocalTypeData array. * * @public */ export declare const putIntoLocalTypeData: (data: unknown, fieldOrder: Array) => LocalTypeData; export {};