@@ -17,28 +17,45 @@ import {getTranslationConnection} from "./translation.js";
1717import { Value } from "@code0-tech/tucana/pb/shared.struct_pb.js" ;
1818
1919enum GenericCombinationStrategyType {
20+ /** Represents a logical AND combination. */
2021 And = 'AND' ,
22+ /** Represents a logical OR combination. */
2123 Or = 'OR'
2224}
2325
2426enum DataTypeRulesVariant {
27+ /** The rule checks if a key is present in the data type. */
2528 ContainsKey = 'CONTAINS_KEY' ,
29+ /** The rule checks if a specific type is present in the data type. */
2630 ContainsType = 'CONTAINS_TYPE' ,
27- InputType = 'INPUT_TYPE' ,
31+ /** The rule checks if the data type matches a specific input type. */
32+ InputTypes = 'INPUT_TYPES' ,
33+ /** The rule checks if an item is part of a collection in the data type. */
2834 ItemOfCollection = 'ITEM_OF_COLLECTION' ,
35+ /** The rule checks if a number falls within a specified range. */
2936 NumberRange = 'NUMBER_RANGE' ,
37+ /** The rule checks if the data type is a child of a specific parent type. */
3038 ParentType = 'PARENT_TYPE' ,
39+ /** The rule checks if a string matches a specified regular expression. */
3140 Regex = 'REGEX' ,
41+ /** The rule checks if the data type matches a specific return type. */
3242 ReturnType = 'RETURN_TYPE'
3343}
3444
3545enum DataTypeVariant {
46+ /** Represents an array */
3647 Array = 'ARRAY' ,
48+ /** Represents an data type containing a data type */
3749 DataType = 'DATA_TYPE' ,
50+ /** Represents a error */
3851 Error = 'ERROR' ,
52+ /** Represents a node */
3953 Node = 'NODE' ,
54+ /** Represents an object */
4055 Object = 'OBJECT' ,
56+ /** Represents a primitive datatype */
4157 Primitive = 'PRIMITIVE' ,
58+ /** Represents a type */
4259 Type = 'TYPE'
4360}
4461
@@ -51,9 +68,12 @@ function getDataType(identifier: string, constructedDataTypes: ConstructedDataTy
5168 return null
5269 }
5370 const constructed : DataType = {
71+ __typename : "DataType" ,
5472 id : `gid://sagittarius/DataType/${ getID ( constructedDataTypes ) } ` ,
5573 genericKeys : tucanaDataType . genericKeys ,
5674 identifier : tucanaDataType . identifier ,
75+ aliases : getTranslationConnection ( tucanaDataType . alias ) ,
76+ displayMessages : getTranslationConnection ( tucanaDataType . displayMessage ) ,
5777 name : getTranslationConnection ( tucanaDataType . name ) ,
5878 rules : createRules ( tucanaDataType . rules , constructedDataTypes ) ,
5979 variant : getDataTypeVariant ( tucanaDataType . variant ) ,
@@ -135,7 +155,7 @@ function createRules(rule: DefinitionDataTypeRule[], constructedDataTypes: Const
135155 } ) ,
136156 }
137157 const rule : DataTypeRule = {
138- variant : DataTypeRulesVariant . InputType ,
158+ variant : DataTypeRulesVariant . InputTypes ,
139159 config : ruleConfig
140160 }
141161 return rule ;
0 commit comments