@trackunit/iris-app-api 1.14.42 → 1.14.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 1.14.43 (2026-02-25)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
1
5
|
## 1.14.42 (2026-02-23)
|
|
2
6
|
|
|
3
7
|
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TranslationKey, TranslationLanguageKeys } from "./irisAppExtensionManifest";
|
|
2
2
|
export declare type CustomFieldDefinitionType = "STRING" | "STRING_LIST" | "NUMBER" | "DATE" | "BOOLEAN" | "DROPDOWN" | "EMAIL" | "PHONE_NUMBER" | "WEB_ADDRESS" | "JSON" | "MONETARY";
|
|
3
|
-
export declare type EntityType = "ASSET" | "ACCOUNT" | "SITE" | "GROUP";
|
|
3
|
+
export declare type EntityType = "ASSET" | "ACCOUNT" | "SITE" | "GROUP" | "CUSTOMER";
|
|
4
4
|
export declare const ScopeType: {
|
|
5
5
|
/**
|
|
6
6
|
* Values with account scope will be shared within a single account
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"irisAppCustomFields.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppCustomFields.ts"],"names":[],"mappings":";;;AAiBa,QAAA,SAAS,GAAG;IACvB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,yBAAyB,EAAE,2BAA2B;IACtD;;OAEG;IACH,MAAM,EAAE,QAAQ;CACR,CAAC;AAGX;;GAEG;AACI,MAAM,6BAA6B,GAAG,CAC3C,MAA6F,EACtD,EAAE;IACzC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC/B,CA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AC7B,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,gBAAgB,EAAE,kBAAkB;IACpC,kBAAkB,EAAE,oBAAoB;IACxC,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;IACpC,wBAAwB,EAAE,0BAA0B;IACpD,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC","sourcesContent":["import { TranslationKey, TranslationLanguageKeys } from \"./irisAppExtensionManifest\";\n\nexport declare type CustomFieldDefinitionType =\n | \"STRING\"\n | \"STRING_LIST\"\n | \"NUMBER\"\n | \"DATE\"\n | \"BOOLEAN\"\n | \"DROPDOWN\"\n | \"EMAIL\"\n | \"PHONE_NUMBER\"\n | \"WEB_ADDRESS\"\n | \"JSON\"\n | \"MONETARY\";\n\nexport declare type EntityType = \"ASSET\" | \"ACCOUNT\" | \"SITE\" | \"GROUP\";\n\nexport const ScopeType = {\n /**\n * Values with account scope will be shared within a single account\n */\n ACCOUNT: \"ACCOUNT\",\n /**\n * Values will be shared within a single account (write) and visible to all accounts (read)\n */\n ACCOUNT_WRITE_GLOBAL_READ: \"ACCOUNT_WRITE_GLOBAL_READ\",\n /**\n * Values with global scope will be shared between all accounts with access to the entity.\n */\n GLOBAL: \"GLOBAL\",\n} as const;\nexport type ScopeTypeType = (typeof ScopeType)[keyof typeof ScopeType];\n\n/**\n * Test if the object is a CustomFieldTranslation array.\n */\nexport const isCustomFieldTranslationArray = (\n object: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey }\n): object is CustomFieldTranslationArray => {\n return Array.isArray(object);\n};\n\nexport interface CustomFieldTranslation {\n language: TranslationLanguageKeys;\n title: string;\n description?: string;\n}\n\nexport interface CustomFieldTranslationWithoutEnglish {\n language: Exclude<TranslationLanguageKeys, \"en\">;\n title: string;\n description?: string;\n}\n\nexport type CustomFieldTranslationArray = [\n { language: \"en\"; title: string; description?: string },\n ...Array<CustomFieldTranslationWithoutEnglish>,\n];\n\nexport interface AbstractCustomFieldDefinition {\n /**\n * The key is the name you use to get the custom field.\n */\n key: string;\n\n /**\n * The type of the entity to attach this custom field on.\n */\n entityType: EntityType;\n\n /**\n * Who can access the field value. Default is only within the users account.\n */\n scopeType?: ScopeTypeType;\n\n /**\n * The translations for the custom field definition.\n * For Arrays of translations, the list must contain the language \"en\" as the default.\n * Either a list of translations or a single translation object with\n * translation keys it will look for all available languages in src/locales/<languagecode>/translation.json\n */\n translations: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey };\n\n /**\n * Should this be visible in the generic UI in Manager.\n */\n uiVisible?: boolean;\n\n /**\n * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.\n */\n uiEditable?: boolean;\n\n /**\n * The type of this custom field definition\n */\n type: CustomFieldDefinitionType;\n}\n\nexport interface StringFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING\";\n minimumLength?: number;\n maximumLength?: number;\n pattern?: string;\n}\n\nexport interface StringListFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING_LIST\";\n itemMinimumLength?: number;\n itemMaximumLength?: number;\n pattern?: string;\n maximumItems?: number;\n}\n\nexport interface EmailFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"EMAIL\";\n}\n\nexport interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"WEB_ADDRESS\";\n}\n\nexport interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"PHONE_NUMBER\";\n}\nexport interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"BOOLEAN\";\n}\n\nexport interface DateFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DATE\";\n}\n\nexport interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DROPDOWN\";\n multiSelect?: boolean;\n allValues?: Array<string>;\n /**\n * Map from old values not in the allValues to new values. Used for updating existing data when changing\n * the drop down options.\n */\n valueReplacements?: Record<string, string>;\n}\n\nexport const UnitOfMeasurement = {\n NEWTON: \"NEWTON\",\n PASCAL: \"PASCAL\",\n KILOPASCAL: \"KILOPASCAL\",\n WATT: \"WATT\",\n BAR: \"BAR\",\n CENTIMETRE: \"CENTIMETRE\",\n MILLIMETRE: \"MILLIMETRE\",\n METRE: \"METRE\",\n KILOMETRE: \"KILOMETRE\",\n GRAM: \"GRAM\",\n KILOGRAM: \"KILOGRAM\",\n VOLT: \"VOLT\",\n AMPERE_HOUR: \"AMPERE_HOUR\",\n KILOWATT: \"KILOWATT\",\n KILOWATT_HOUR: \"KILOWATT_HOUR\",\n KILOGRAM_PER_HOUR: \"KILOGRAM_PER_HOUR\",\n KILOGRAM_PER_SECOND: \"KILOGRAM_PER_SECOND\",\n SQUARE_KILOMETRE: \"SQUARE_KILOMETRE\",\n KILOMETRE_PER_HOUR: \"KILOMETRE_PER_HOUR\",\n LITRE: \"LITRE\",\n SQUARE_METRE: \"SQUARE_METRE\",\n CUBIC_METRE: \"CUBIC_METRE\",\n METRE_PER_SECOND: \"METRE_PER_SECOND\",\n METRE_PER_SECOND_SQUARED: \"METRE_PER_SECOND_SQUARED\",\n METRIC_TON: \"METRIC_TON\",\n ARE: \"ARE\",\n HECTARE: \"HECTARE\",\n YEAR: \"YEAR\",\n MONTH: \"MONTH\",\n DAY: \"DAY\",\n HOUR: \"HOUR\",\n LITRES_PER_HOUR: \"LITRES_PER_HOUR\",\n REVOLUTIONS_PER_MINUTE: \"REVOLUTIONS_PER_MINUTE\",\n VOLT_AMPERE: \"VOLT_AMPERE\",\n G_FORCE: \"G_FORCE\",\n CELSIUS: \"CELSIUS\",\n PERCENT: \"PERCENT\",\n DEGREE_ANGLE: \"DEGREE_ANGLE\",\n MILLISECOND: \"MILLISECOND\",\n SECOND: \"SECOND\",\n MINUTE: \"MINUTE\",\n WEEK: \"WEEK\",\n AMPERE: \"AMPERE\",\n HERTZ: \"HERTZ\",\n ACRE: \"ACRE\",\n FOOT: \"FOOT\",\n SQUARE_FOOT: \"SQUARE_FOOT\",\n CUBIC_FOOT: \"CUBIC_FOOT\",\n GALLON_LIQUID: \"GALLON_LIQUID\",\n INCH: \"INCH\",\n POUND: \"POUND\",\n POUND_PER_HOUR: \"POUND_PER_HOUR\",\n POUND_PER_SECOND: \"POUND_PER_SECOND\",\n MILE: \"MILE\",\n MILE_PER_HOUR: \"MILE_PER_HOUR\",\n OUNCE: \"OUNCE\",\n US_TON: \"US_TON\",\n YARD: \"YARD\",\n POUND_PER_SQUARE_INCH: \"POUND_PER_SQUARE_INCH\",\n INCHES_OF_WATER: \"INCHES_OF_WATER\",\n GALLONS_PER_HOUR: \"GALLONS_PER_HOUR\",\n FAHRENHEIT: \"FAHRENHEIT\",\n} as const;\nexport type UnitOfMeasurementType = (typeof UnitOfMeasurement)[keyof typeof UnitOfMeasurement];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitUs = {\n acre: \"ACRE\",\n foot: \"FOOT\",\n square_foot: \"SQUARE_FOOT\",\n cubic_foot: \"CUBIC_FOOT\",\n gallon_liquid: \"GALLON_LIQUID\",\n inch: \"INCH\",\n pound: \"POUND\",\n pound_per_hour: \"POUND_PER_HOUR\",\n pound_per_second: \"POUND_PER_SECOND\",\n mile: \"MILE\",\n mile_per_hour: \"MILE_PER_HOUR\",\n ounce: \"OUNCE\",\n ton_us: \"US_TON\",\n yard: \"YARD\",\n pound_per_square_inch: \"POUND_PER_SQUARE_INCH\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitUsType = (typeof UnitUs)[keyof typeof UnitUs];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitSi = {\n newton: \"NEWTON\",\n pascal: \"PASCAL\",\n kilopascal: \"KILOPASCAL\",\n amperehour: \"AMPERE_HOUR\",\n volt: \"VOLT\",\n watt: \"WATT\",\n bar: \"BAR\",\n centimetre: \"CENTIMETRE\",\n millimetre: \"MILLIMETRE\",\n metre: \"METRE\",\n kilometre: \"KILOMETRE\",\n gram: \"GRAM\",\n kilogram: \"KILOGRAM\",\n kilowatt: \"KILOWATT\",\n kilowatthour: \"KILOWATT_HOUR\",\n kilogram_per_hour: \"KILOGRAM_PER_HOUR\",\n kilogram_per_second: \"KILOGRAM_PER_SECOND\",\n square_kilometre: \"SQUARE_KILOMETRE\",\n kilometre_per_hour: \"KILOMETRE_PER_HOUR\",\n litre: \"LITRE\",\n square_metre: \"SQUARE_METRE\",\n cubic_metre: \"CUBIC_METRE\",\n metre_per_second: \"METRE_PER_SECOND\",\n metre_per_second_squared: \"METRE_PER_SECOND_SQUARED\",\n ton: \"TON\",\n hectare: \"HECTARE\",\n hour: \"HOUR\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitSiType = (typeof UnitSi)[keyof typeof UnitSi];\n\nexport interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n unitSi?: UnitOfMeasurementType;\n unitUs?: UnitOfMeasurementType;\n\n isInteger: false;\n}\n\nexport interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n isInteger: true;\n}\n\nexport type JSONValue = string | number | boolean | null | { [x: string]: JSONValue } | Array<JSONValue>;\n\nexport interface JsonFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"JSON\";\n}\n\nexport interface MonetaryFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"MONETARY\";\n /**\n * The currency of the monetary field definition - ISO 4217 compliant.\n */\n currency: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"irisAppCustomFields.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppCustomFields.ts"],"names":[],"mappings":";;;AAiBa,QAAA,SAAS,GAAG;IACvB;;OAEG;IACH,OAAO,EAA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E,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,eAAe;IAC7B,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,gBAAgB,EAAE,kBAAkB;IACpC,kBAAkB,EAAE,oBAAoB;IACxC,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,gBAAgB,EAAE,kBAAkB;IACpC,wBAAwB,EAAE,0BAA0B;IACpD,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC","sourcesContent":["import { TranslationKey, TranslationLanguageKeys } from \"./irisAppExtensionManifest\";\n\nexport declare type CustomFieldDefinitionType =\n | \"STRING\"\n | \"STRING_LIST\"\n | \"NUMBER\"\n | \"DATE\"\n | \"BOOLEAN\"\n | \"DROPDOWN\"\n | \"EMAIL\"\n | \"PHONE_NUMBER\"\n | \"WEB_ADDRESS\"\n | \"JSON\"\n | \"MONETARY\";\n\nexport declare type EntityType = \"ASSET\" | \"ACCOUNT\" | \"SITE\" | \"GROUP\" | \"CUSTOMER\";\n\nexport const ScopeType = {\n /**\n * Values with account scope will be shared within a single account\n */\n ACCOUNT: \"ACCOUNT\",\n /**\n * Values will be shared within a single account (write) and visible to all accounts (read)\n */\n ACCOUNT_WRITE_GLOBAL_READ: \"ACCOUNT_WRITE_GLOBAL_READ\",\n /**\n * Values with global scope will be shared between all accounts with access to the entity.\n */\n GLOBAL: \"GLOBAL\",\n} as const;\nexport type ScopeTypeType = (typeof ScopeType)[keyof typeof ScopeType];\n\n/**\n * Test if the object is a CustomFieldTranslation array.\n */\nexport const isCustomFieldTranslationArray = (\n object: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey }\n): object is CustomFieldTranslationArray => {\n return Array.isArray(object);\n};\n\nexport interface CustomFieldTranslation {\n language: TranslationLanguageKeys;\n title: string;\n description?: string;\n}\n\nexport interface CustomFieldTranslationWithoutEnglish {\n language: Exclude<TranslationLanguageKeys, \"en\">;\n title: string;\n description?: string;\n}\n\nexport type CustomFieldTranslationArray = [\n { language: \"en\"; title: string; description?: string },\n ...Array<CustomFieldTranslationWithoutEnglish>,\n];\n\nexport interface AbstractCustomFieldDefinition {\n /**\n * The key is the name you use to get the custom field.\n */\n key: string;\n\n /**\n * The type of the entity to attach this custom field on.\n */\n entityType: EntityType;\n\n /**\n * Who can access the field value. Default is only within the users account.\n */\n scopeType?: ScopeTypeType;\n\n /**\n * The translations for the custom field definition.\n * For Arrays of translations, the list must contain the language \"en\" as the default.\n * Either a list of translations or a single translation object with\n * translation keys it will look for all available languages in src/locales/<languagecode>/translation.json\n */\n translations: CustomFieldTranslationArray | { title: TranslationKey; description?: TranslationKey };\n\n /**\n * Should this be visible in the generic UI in Manager.\n */\n uiVisible?: boolean;\n\n /**\n * Should this be editable in the generic UI in Manager. This does not mean you cannot change it inside a app.\n */\n uiEditable?: boolean;\n\n /**\n * The type of this custom field definition\n */\n type: CustomFieldDefinitionType;\n}\n\nexport interface StringFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING\";\n minimumLength?: number;\n maximumLength?: number;\n pattern?: string;\n}\n\nexport interface StringListFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"STRING_LIST\";\n itemMinimumLength?: number;\n itemMaximumLength?: number;\n pattern?: string;\n maximumItems?: number;\n}\n\nexport interface EmailFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"EMAIL\";\n}\n\nexport interface WebAddressFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"WEB_ADDRESS\";\n}\n\nexport interface PhoneNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"PHONE_NUMBER\";\n}\nexport interface BooleanFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"BOOLEAN\";\n}\n\nexport interface DateFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DATE\";\n}\n\nexport interface DropDownFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"DROPDOWN\";\n multiSelect?: boolean;\n allValues?: Array<string>;\n /**\n * Map from old values not in the allValues to new values. Used for updating existing data when changing\n * the drop down options.\n */\n valueReplacements?: Record<string, string>;\n}\n\nexport const UnitOfMeasurement = {\n NEWTON: \"NEWTON\",\n PASCAL: \"PASCAL\",\n KILOPASCAL: \"KILOPASCAL\",\n WATT: \"WATT\",\n BAR: \"BAR\",\n CENTIMETRE: \"CENTIMETRE\",\n MILLIMETRE: \"MILLIMETRE\",\n METRE: \"METRE\",\n KILOMETRE: \"KILOMETRE\",\n GRAM: \"GRAM\",\n KILOGRAM: \"KILOGRAM\",\n VOLT: \"VOLT\",\n AMPERE_HOUR: \"AMPERE_HOUR\",\n KILOWATT: \"KILOWATT\",\n KILOWATT_HOUR: \"KILOWATT_HOUR\",\n KILOGRAM_PER_HOUR: \"KILOGRAM_PER_HOUR\",\n KILOGRAM_PER_SECOND: \"KILOGRAM_PER_SECOND\",\n SQUARE_KILOMETRE: \"SQUARE_KILOMETRE\",\n KILOMETRE_PER_HOUR: \"KILOMETRE_PER_HOUR\",\n LITRE: \"LITRE\",\n SQUARE_METRE: \"SQUARE_METRE\",\n CUBIC_METRE: \"CUBIC_METRE\",\n METRE_PER_SECOND: \"METRE_PER_SECOND\",\n METRE_PER_SECOND_SQUARED: \"METRE_PER_SECOND_SQUARED\",\n METRIC_TON: \"METRIC_TON\",\n ARE: \"ARE\",\n HECTARE: \"HECTARE\",\n YEAR: \"YEAR\",\n MONTH: \"MONTH\",\n DAY: \"DAY\",\n HOUR: \"HOUR\",\n LITRES_PER_HOUR: \"LITRES_PER_HOUR\",\n REVOLUTIONS_PER_MINUTE: \"REVOLUTIONS_PER_MINUTE\",\n VOLT_AMPERE: \"VOLT_AMPERE\",\n G_FORCE: \"G_FORCE\",\n CELSIUS: \"CELSIUS\",\n PERCENT: \"PERCENT\",\n DEGREE_ANGLE: \"DEGREE_ANGLE\",\n MILLISECOND: \"MILLISECOND\",\n SECOND: \"SECOND\",\n MINUTE: \"MINUTE\",\n WEEK: \"WEEK\",\n AMPERE: \"AMPERE\",\n HERTZ: \"HERTZ\",\n ACRE: \"ACRE\",\n FOOT: \"FOOT\",\n SQUARE_FOOT: \"SQUARE_FOOT\",\n CUBIC_FOOT: \"CUBIC_FOOT\",\n GALLON_LIQUID: \"GALLON_LIQUID\",\n INCH: \"INCH\",\n POUND: \"POUND\",\n POUND_PER_HOUR: \"POUND_PER_HOUR\",\n POUND_PER_SECOND: \"POUND_PER_SECOND\",\n MILE: \"MILE\",\n MILE_PER_HOUR: \"MILE_PER_HOUR\",\n OUNCE: \"OUNCE\",\n US_TON: \"US_TON\",\n YARD: \"YARD\",\n POUND_PER_SQUARE_INCH: \"POUND_PER_SQUARE_INCH\",\n INCHES_OF_WATER: \"INCHES_OF_WATER\",\n GALLONS_PER_HOUR: \"GALLONS_PER_HOUR\",\n FAHRENHEIT: \"FAHRENHEIT\",\n} as const;\nexport type UnitOfMeasurementType = (typeof UnitOfMeasurement)[keyof typeof UnitOfMeasurement];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitUs = {\n acre: \"ACRE\",\n foot: \"FOOT\",\n square_foot: \"SQUARE_FOOT\",\n cubic_foot: \"CUBIC_FOOT\",\n gallon_liquid: \"GALLON_LIQUID\",\n inch: \"INCH\",\n pound: \"POUND\",\n pound_per_hour: \"POUND_PER_HOUR\",\n pound_per_second: \"POUND_PER_SECOND\",\n mile: \"MILE\",\n mile_per_hour: \"MILE_PER_HOUR\",\n ounce: \"OUNCE\",\n ton_us: \"US_TON\",\n yard: \"YARD\",\n pound_per_square_inch: \"POUND_PER_SQUARE_INCH\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitUsType = (typeof UnitUs)[keyof typeof UnitUs];\n\n/**\n * @deprecated Use UnitOfMeasurement instead\n */\nexport const UnitSi = {\n newton: \"NEWTON\",\n pascal: \"PASCAL\",\n kilopascal: \"KILOPASCAL\",\n amperehour: \"AMPERE_HOUR\",\n volt: \"VOLT\",\n watt: \"WATT\",\n bar: \"BAR\",\n centimetre: \"CENTIMETRE\",\n millimetre: \"MILLIMETRE\",\n metre: \"METRE\",\n kilometre: \"KILOMETRE\",\n gram: \"GRAM\",\n kilogram: \"KILOGRAM\",\n kilowatt: \"KILOWATT\",\n kilowatthour: \"KILOWATT_HOUR\",\n kilogram_per_hour: \"KILOGRAM_PER_HOUR\",\n kilogram_per_second: \"KILOGRAM_PER_SECOND\",\n square_kilometre: \"SQUARE_KILOMETRE\",\n kilometre_per_hour: \"KILOMETRE_PER_HOUR\",\n litre: \"LITRE\",\n square_metre: \"SQUARE_METRE\",\n cubic_metre: \"CUBIC_METRE\",\n metre_per_second: \"METRE_PER_SECOND\",\n metre_per_second_squared: \"METRE_PER_SECOND_SQUARED\",\n ton: \"TON\",\n hectare: \"HECTARE\",\n hour: \"HOUR\",\n} as const;\n/**\n * @deprecated Use UnitOfMeasurementType instead\n */\nexport type UnitSiType = (typeof UnitSi)[keyof typeof UnitSi];\n\nexport interface DecimalNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n unitSi?: UnitOfMeasurementType;\n unitUs?: UnitOfMeasurementType;\n\n isInteger: false;\n}\n\nexport interface IntegerNumberFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"NUMBER\";\n\n minimum?: number;\n maximum?: number;\n\n isInteger: true;\n}\n\nexport type JSONValue = string | number | boolean | null | { [x: string]: JSONValue } | Array<JSONValue>;\n\nexport interface JsonFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"JSON\";\n}\n\nexport interface MonetaryFieldDefinition extends AbstractCustomFieldDefinition {\n type: \"MONETARY\";\n /**\n * The currency of the monetary field definition - ISO 4217 compliant.\n */\n currency: string;\n}\n"]}
|