import { CustomFieldValue, SystemOfMeasurementType, UnitOfMeasurementType } from "@trackunit/iris-app-runtime-core-api"; export interface DropdownSelection { value: string; } /** * Get the value of a custom field from a raw value. * * @param customFieldDefinition the definition of the custom field * @param customFieldDefinition.__typename the type of the custom field definition * @param customFieldDefinition.isInteger whether the custom field is an integer * @param newValue the new value to set * @returns { CustomFieldValue } an updated CustomFieldValue */ export declare const getCustomFieldValueToSaveFromRawValue: (customFieldDefinition: { __typename: "BooleanFieldDefinition" | "DateFieldDefinition" | "DropDownFieldDefinition" | "EmailFieldDefinition" | "FileFieldDefinition" | "JsonFieldDefinition" | "MonetaryFieldDefinition" | "NumberFieldDefinition" | "PhoneNumberFieldDefinition" | "StringFieldDefinition" | "StringListFieldDefinition" | "WebAddressFieldDefinition"; isInteger?: boolean | null; }, newValue: boolean | string | Array | Array | DropdownSelection | number | Date | null) => CustomFieldValue; /** * Convert the received value to a string */ export declare const getStringValue: (value: boolean | string | Array | Array | DropdownSelection | number | null | undefined) => string | null; /** * Format the received value to a date string * yyyy-mm-dd */ export declare const getDateValue: (value: string | Date) => string | undefined; /** * Format a custom field value to ensure a consistent representation in the ui. */ export declare const getCustomFieldValueForDisplayInUI: (value: number | string | null | undefined, _unit: UnitOfMeasurementType | null | undefined, _systemOfMeasurement?: SystemOfMeasurementType | null, language?: string) => number | string | null | undefined; /** * type guard to ensure that a value is of a type compatible with custom fields */ export declare const isValidCustomFieldValue: (value: unknown) => value is boolean | string | Array | Array | DropdownSelection | number | null;