export declare const getAllUnitTypes: () => { display: string; imperial: string; metric: string; origin: string; type: string; }[]; export declare const getDefaultUnits: () => any; /** * Updates current custom unit system with user data * @param {object} userData * @param {Record} userData.userUnits * @param {Record} userData.companyUnits */ export declare const updateUserUnits: ({ userUnits, companyUnits, companyCustomUnitSystem, userCustomUnitSystem, companyCustomUnits, }: { userUnits: Record; companyUnits: Record; }) => void; export declare function getUserUnits(): { acousticSlowness: string; angle: string; anglePerLength: string; angularVelocity: string; area: string; bitJetSize: string; bitTotalFlowArea: string; chemMassConcentration: string; chemVolumeConcentration: string; concentration: string; current: string; density: string; fluidVelocity: string; force: string; formationDensity: string; gasConcentration: string; gasVolume: string; gasFlowRate: string; gravity: string; gravityRMS: string; inversePressure: string; length: string; lengthPerAngle: string; mass: string; massConcentration: string; massFlowRate: string; massPerLength: string; msePressure: string; oil: string; oilFlowRate: string; permiability: string; porosity: string; power: string; pressure: string; pressureGradient: string; resistivity: string; revolutionPerVolume: string; shortLength: string; speed: string; spontaneousPotential: string; surveyLength: string; temperature: string; time: string; torque: string; velocity: string; voltage: string; volume: string; volumeFlowRate: string; yp: string; proportion: string; strokesRate: string; gammaRadiation: string; unitless: string; }; /** * Used for DC Isolated App container * @param {Function} newCallback */ export declare function subscribeForUserUnitsUpdates(newCallback: Function): () => void; /** * Retrieves a unit of a given type by current unit system * @param {string} unitType length, mass, volume, etc * @returns {string} */ export declare const getUnitPreference: (unitType: string) => string; /** * Lists all the units of a specific type * @param {string} type * @returns {Object[]} */ export declare const getUnitsByType: (type: string) => Object[]; /** * Returns unique units list for some measurements that use same units for imperial and metric system * @param {string} type * @returns {Object[]} */ export declare const getUniqueUnitsByType: (type: string) => Object[]; /** * @deprecated - unit system can be custom, better to use convert functions */ export declare const getUnitSystem: () => string; /** * Retrieves the unit display name for a given unit type * @param {string} unitType length, mass, volume, etc * @param {string} [unitTo=null] * @returns {string} */ export declare const getUnitDisplay: (unitType: string, unitTo?: string) => string; /** * @deprecated - should not depends on imperial system only, because we have mixed unit system * Retrieves the unit display name for imperial unit type * @param unitType length, mass, volume, etc * @returns string */ export declare const getDefaultImperialUnit: (unitType: any) => any; /** * Converts a single value * @param {number} value The value we want converted. * @param {string} unitType The class of unit such as volume, length, mass, etc. * @param {string} from The specific unit such as m, gal, lb, etc. * @param {string} to (optional) the unit that we want to convert the value to. * @param {number} precision to round to the value * May be passed in my ConvertList * @return {number} */ export declare const convertValue: (value: number, unitType: string, from: string, to?: string, precision?: number) => number; /** * Converts a property in a simple array of js objects or arrays. * @param {number[][]} iterable The array of iterables containing values that we want to convert * @param {string} key The key in each sub-element that we want to convert * @param {string} unitType The class of unit such as volume, length, mass, etc. * @param {string} from The specific unit such as m, gal, lb, etc. * @param {string} to (optional) the unit that we want to convert the value to. * @returns {number[][]} */ export declare const convertArray: (iterable: number[][] | undefined, key: string, unitType: string, from: string, to?: string, precision?: number) => number[][]; /** * Retrieves the full name for a given unit type, singular * @param {string} unitType length, mass, volume, etc * @returns {string} */ export declare const getUnitSingular: (unitType: string) => string; /** * Retrieves the full name for a given unit type, plural * @param {string} unitType length, mass, volume, etc * @returns {string} */ export declare const getUnitPlural: (unitType: string) => string; /** * Retrieves unit data * * @param {string} unitType length, mass, volume, etc * @return {{ * abbr: string, * measure: string, * system: string, * singular: string, * plural: string, * display: string * }} */ export declare const getUnitDescription: (unitType: string) => { abbr: string; measure: string; system: string; singular: string; plural: string; display: string; }; //# sourceMappingURL=convert.d.ts.map