Skip to main content

PropertyMeta

PropertyMeta is a part of ResourceMeta that keeps data that's transported to frontend. Information about properties of a resource.

Properties

displayName

displayName: string

User-frendly name for the property that is displayed in the Ui. By default, it's generated from the property name, but can be explicitly set using the @label decorator.


enumerationDisplayName?

optional enumerationDisplayName: string[]

Display names for enum values when the property is an enum


enumerationValues?

optional enumerationValues: number[]

Enum values corresponding to the display names in the same order. Each numeric value is paired with the text representation at the same index in enumerationDisplayName.


fileUploadType?

optional fileUploadType: FileUploadType

Type of file upload for this property (multiple or single). Can be set using the @fileUploadType decorator.


id

id: string

Unique identifier for the property. By default, this is a randomly generated Uuid, but it can be explicitly set using the @resourcePropertyId decorator.


isBlobImage?

optional isBlobImage: boolean

Indicates whether the property is a Blob image that should be displayed as an image in the user interface. Can be set using the @blobImage decorator.


isDisplayable

isDisplayable: boolean

Indicates whether the property is visible in Ui interface elements. Can be set to false using the @notDisplayable decorator.


isDynamic?

optional isDynamic: boolean

Indicates whether the property is dynamic, meaning that it is not stored in the database but instead is generated by handlers at runtime. Can be set using the @dynamic decorator.


isListDisplayAdvisable

isListDisplayAdvisable: boolean

Indicates whether the property is visible in list. Can be set to false using the @notListDisplayable decorator.


isOutsideEditable

isOutsideEditable: boolean

Indicates whether the property can be edited externally (via Api or client interface). When false, client-side edits will not be allowed. Can be set to false using the @notEditableFromOutside decorator.


isOutsideExcluded

isOutsideExcluded: boolean

Determines whether the property is completely excluded from external. Can be set to true using the @outsideExcluded decorator.


isViewVisible?

optional isViewVisible: boolean

Forces the property to be shown in view even if it would otherwise be hidden


name

name: string

Property name from the resource class


relation?

optional relation: Relation

Relationships between resources when this property represents a link to another resource


required

required: boolean

Indicates whether the property is required when creating or updating a resource When true and the property is missing during update, an error will be thrown. Can be set using the @required decorator.


requiredIfOtherArePresent?

optional requiredIfOtherArePresent: string[]

Array of property names that, if they have values, will make this property required. Can be set using the @requiredIfOtherArePresent decorator.


requiredIfPropHasValue?

optional requiredIfPropHasValue: [string, unknown]

Makes this property required if another specified property has a specific value. Can be set using the @requiredIfPropHasValue decorator.


type

type: PropertyType

Type of the property, indicating what kind of values the property will contain


typeFormat

typeFormat: string

More specific type format for Ui rendering and validation. While 'type' represents the base data type, typeFormat provides additional typing information for specialized Ui handling.

Can be set with decorators @dateOnly, @richText, @markdown, @url, @phoneNumber, @email, @bigText, @currency, @flagsEnum.

See

propertyTypeFormats


ui

ui: UiPropertyMetaOld

Display priority of the property in the Ui.