Expression
Expression that can be evaluated for any object.
| Name | Description | Type |
|---|---|---|
type | The type of the expression (e.g. property value or status value). | ExpressionType |
data | The expression data, optionally including indirection levels. Indirection levels allow the expression to traverse linked objects — for example, evaluating "Project.Customer.Country" follows the Project property, then the Customer property, and finally evaluates Country. The indirection levels (e.g., "Project.Customer") are stored as an array of PropertyDefOrObjectType structs, and the final segment is specified as the expression itself. | ExpressionUnion |
indirection_levels | The indirection levels. | IndirectionLevel[] |
Helper Methods and Properties
⚠️ Note
These helper methods and properties are available when using the npm package @m-filescorporation/uix-vault-messages. Install it in your project to use these helpers. For more information, see Vault API Helpers.
Factory Methods
| Method | Description | Parameters | Returns |
|---|---|---|---|
Text | Creates a new Text expression. | options: FTSFLAGS | Expression |
Status | Creates a new Status expression. | type: StatusType | Expression |
Property | Creates a new Property expression for the specified property definition ID. | propertyDef: number | Expression |
AnyLookupProperty | Creates a new AnyLookupProperty expression for the specified value list. | valueList: number | Expression |
Creating Objects
// Creates a new Text expression.
const result = Expression.Text({});
// Creates a new Status expression.
const result = Expression.Status(0);
// Creates a new Property expression for the specified property definition ID.
const result = Expression.Property(0);
// Creates a new AnyLookupProperty expression for the specified value list.
const result = Expression.AnyLookupProperty(0);
Example
{
"type": 7 /* Enum: ExpressionType */,
"data": {
"permissions": {
"type": 6 /* Enum: PermissionsExpressionType */
}
},
"indirection_levels": [] /* Array of IndirectionLevel */
}