@shaclmate/compiler 4.0.40 → 4.0.42
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/dist/ShapesGraphToAstTransformer.d.ts +1 -8
- package/dist/ShapesGraphToAstTransformer.js +11 -126
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +128 -160
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.d.ts +17 -0
- package/dist/_ShapesGraphToAstTransformer/{transformPropertyShapeToAstObjectTypeProperty.js → transformPropertyShapeToAstStructTypeField.js} +71 -48
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +29 -20
- package/dist/_ShapesGraphToAstTransformer/{transformShapeToAstObjectType.d.ts → transformShapeToAstStructType.d.ts} +3 -3
- package/dist/_ShapesGraphToAstTransformer/{transformShapeToAstObjectType.js → transformShapeToAstStructType.js} +35 -45
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +2 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +3 -3
- package/dist/ast/AbstractCompoundType.d.ts +3 -2
- package/dist/ast/AbstractCompoundType.js +5 -5
- package/dist/ast/AbstractContainerType.d.ts +2 -2
- package/dist/ast/AbstractContainerType.js +4 -4
- package/dist/ast/{AbstractLazyObjectType.d.ts → AbstractLazyType.d.ts} +10 -12
- package/dist/ast/{AbstractLazyObjectType.js → AbstractLazyType.js} +3 -3
- package/dist/ast/AbstractType.d.ts +1 -1
- package/dist/ast/AbstractType.js +3 -0
- package/dist/ast/Ast.d.ts +2 -6
- package/dist/ast/DefaultValueType.js +2 -1
- package/dist/ast/IntersectionType.d.ts +2 -2
- package/dist/ast/IntersectionType.js +3 -3
- package/dist/ast/LazyOptionType.d.ts +6 -0
- package/dist/ast/LazyOptionType.js +5 -0
- package/dist/ast/LazySetType.d.ts +6 -0
- package/dist/ast/LazySetType.js +5 -0
- package/dist/ast/LazyType.d.ts +5 -0
- package/dist/ast/LazyType.js +5 -0
- package/dist/ast/ListType.d.ts +2 -2
- package/dist/ast/ListType.js +5 -5
- package/dist/ast/OptionType.js +2 -1
- package/dist/ast/SetType.js +2 -1
- package/dist/ast/StructCompoundType.d.ts +12 -0
- package/dist/ast/{ObjectCompoundType.js → StructCompoundType.js} +18 -18
- package/dist/ast/StructIntersectionType.d.ts +4 -0
- package/dist/ast/StructIntersectionType.js +2 -0
- package/dist/ast/{ObjectType.d.ts → StructType.d.ts} +28 -39
- package/dist/ast/{ObjectType.js → StructType.js} +81 -156
- package/dist/ast/StructUnionType.d.ts +4 -0
- package/dist/ast/StructUnionType.js +2 -0
- package/dist/ast/Type.d.ts +5 -5
- package/dist/ast/Type.js +4 -4
- package/dist/ast/UnionType.d.ts +2 -2
- package/dist/ast/UnionType.js +3 -3
- package/dist/ast/index.d.ts +7 -7
- package/dist/ast/index.js +7 -7
- package/dist/generators/AstJsonGenerator.js +7 -3
- package/dist/generators/transformAstToLabeledPropertyGraph.js +59 -56
- package/dist/generators/ts/AbstractCollectionType.d.ts +4 -11
- package/dist/generators/ts/AbstractCollectionType.js +3 -62
- package/dist/generators/ts/AbstractContainerType.d.ts +1 -2
- package/dist/generators/ts/AbstractContainerType.js +7 -10
- package/dist/generators/ts/AbstractDateType.d.ts +5 -8
- package/dist/generators/ts/AbstractDateType.js +7 -12
- package/dist/generators/ts/AbstractIdentifierType.d.ts +4 -0
- package/dist/generators/ts/AbstractIdentifierType.js +3 -0
- package/dist/generators/ts/{AbstractLazyObjectType.d.ts → AbstractLazyType.d.ts} +8 -8
- package/dist/generators/ts/{AbstractLazyObjectType.js → AbstractLazyType.js} +30 -17
- package/dist/generators/ts/AbstractLiteralType.d.ts +3 -5
- package/dist/generators/ts/AbstractLiteralType.js +0 -21
- package/dist/generators/ts/AbstractNumericType.d.ts +1 -7
- package/dist/generators/ts/AbstractNumericType.js +17 -27
- package/dist/generators/ts/AbstractObjectSetType.d.ts +1 -1
- package/dist/generators/ts/AbstractObjectSetType.js +2 -2
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +2 -1
- package/dist/generators/ts/AbstractPrimitiveType.js +1 -1
- package/dist/generators/ts/AbstractTermType.d.ts +7 -23
- package/dist/generators/ts/AbstractTermType.js +27 -58
- package/dist/generators/ts/AbstractType.d.ts +86 -63
- package/dist/generators/ts/AbstractType.js +48 -22
- package/dist/generators/ts/BigDecimalType.d.ts +7 -3
- package/dist/generators/ts/BigDecimalType.js +7 -9
- package/dist/generators/ts/BigIntType.d.ts +5 -3
- package/dist/generators/ts/BigIntType.js +8 -5
- package/dist/generators/ts/BlankNodeType.d.ts +2 -7
- package/dist/generators/ts/BlankNodeType.js +4 -9
- package/dist/generators/ts/BooleanType.d.ts +6 -4
- package/dist/generators/ts/BooleanType.js +13 -15
- package/dist/generators/ts/DateTimeType.d.ts +2 -2
- package/dist/generators/ts/DateTimeType.js +14 -4
- package/dist/generators/ts/DateType.d.ts +2 -2
- package/dist/generators/ts/DateType.js +14 -4
- package/dist/generators/ts/DefaultValueType.d.ts +40 -2
- package/dist/generators/ts/DefaultValueType.js +15 -14
- package/dist/generators/ts/FloatType.d.ts +5 -3
- package/dist/generators/ts/FloatType.js +8 -5
- package/dist/generators/ts/GraphqlSchema.js +2 -2
- package/dist/generators/ts/IdentifierType.d.ts +2 -2
- package/dist/generators/ts/IdentifierType.js +8 -11
- package/dist/generators/ts/IntType.d.ts +5 -3
- package/dist/generators/ts/IntType.js +8 -5
- package/dist/generators/ts/IriType.d.ts +2 -2
- package/dist/generators/ts/IriType.js +16 -16
- package/dist/generators/ts/{LazyObjectOptionType.d.ts → LazyOptionType.d.ts} +13 -11
- package/dist/generators/ts/LazyOptionType.js +75 -0
- package/dist/generators/ts/LazySetType.d.ts +20 -0
- package/dist/generators/ts/LazySetType.js +76 -0
- package/dist/generators/ts/LazyType.d.ts +19 -0
- package/dist/generators/ts/LazyType.js +65 -0
- package/dist/generators/ts/ListType.d.ts +11 -2
- package/dist/generators/ts/ListType.js +53 -26
- package/dist/generators/ts/LiteralType.d.ts +7 -2
- package/dist/generators/ts/LiteralType.js +12 -5
- package/dist/generators/ts/ObjectType.d.ts +24 -25
- package/dist/generators/ts/ObjectType.js +303 -161
- package/dist/generators/ts/ObjectUnionType.js +42 -42
- package/dist/generators/ts/OptionType.d.ts +6 -2
- package/dist/generators/ts/OptionType.js +16 -9
- package/dist/generators/ts/RdfjsDatasetObjectSetType.js +1 -4
- package/dist/generators/ts/SetType.d.ts +17 -2
- package/dist/generators/ts/SetType.js +85 -9
- package/dist/generators/ts/Snippets.d.ts +29 -9
- package/dist/generators/ts/Snippets.js +179 -39
- package/dist/generators/ts/StringType.d.ts +7 -4
- package/dist/generators/ts/StringType.js +23 -12
- package/dist/generators/ts/TermType.d.ts +9 -3
- package/dist/generators/ts/TermType.js +29 -7
- package/dist/generators/ts/TsGenerator.d.ts +1 -1
- package/dist/generators/ts/TsGenerator.js +62 -32
- package/dist/generators/ts/Type.d.ts +4 -4
- package/dist/generators/ts/TypeFactory.d.ts +5 -5
- package/dist/generators/ts/TypeFactory.js +90 -82
- package/dist/generators/ts/UnionType.d.ts +25 -23
- package/dist/generators/ts/UnionType.js +254 -261
- package/dist/generators/ts/ZodGenerator.d.ts +1 -1
- package/dist/generators/ts/ZodGenerator.js +29 -14
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +28 -16
- package/dist/generators/ts/_ObjectType/AbstractProperty.js +1 -24
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.d.ts +15 -17
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.js +24 -54
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +8 -2
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +48 -20
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.js +28 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.js +15 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_filterTypeDeclaration.js → ObjectType_filterTypeExpression.js} +5 -10
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectType_focusSparqlConstructTriplesFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js → ObjectType_focusSparqlConstructTriplesFunctionExpression.js} +5 -13
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts → ObjectType_focusSparqlWherePatternsFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionDeclaration.js → ObjectType_focusSparqlWherePatternsFunctionExpression.js} +8 -31
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.js +43 -0
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_graphqlTypeVariableStatement.js → ObjectType_graphqlTypeExpression.js} +6 -13
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.js +30 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.js +13 -0
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +11 -8
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +1 -2
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.js +2 -6
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.js +17 -0
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.d.ts +1 -1
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.js +2 -2
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +5 -9
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +4 -8
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.js +14 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_toRdfResourceFunctionDeclaration.js → ObjectType_toRdfResourceFunctionExpression.js} +7 -13
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.js +7 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectType_valueSparqlConstructTriplesFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js +8 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts → ObjectType_valueSparqlWherePatternsFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js +10 -0
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +9 -2
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +70 -38
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +4 -3
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +4 -3
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +3 -3
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +6 -5
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +2 -1
- package/dist/generators/ts/_snippets/snippets_IriSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.js +22 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.js +25 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.js +40 -0
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +2 -1
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +6 -8
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +32 -32
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +1 -1
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +5 -3
- package/dist/generators/ts/_snippets/snippets_TermFilter.js +3 -3
- package/dist/generators/ts/_snippets/snippets_TermSchema.js +4 -2
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.js +8 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.js +33 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.js +27 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.js +7 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.js +15 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.js +10 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterNumeric.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +1 -2
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.js +15 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.js +11 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +1 -1
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.js +9 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.js +13 -7
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.js +1 -1
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.js +17 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.js +60 -0
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +2 -2
- package/dist/input/generated.d.ts +1116 -400
- package/dist/input/generated.js +1879 -1917
- package/package.json +2 -4
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.d.ts +0 -9
- package/dist/ast/LazyObjectOptionType.d.ts +0 -6
- package/dist/ast/LazyObjectOptionType.js +0 -5
- package/dist/ast/LazyObjectSetType.d.ts +0 -6
- package/dist/ast/LazyObjectSetType.js +0 -5
- package/dist/ast/LazyObjectType.d.ts +0 -5
- package/dist/ast/LazyObjectType.js +0 -5
- package/dist/ast/ObjectCompoundType.d.ts +0 -12
- package/dist/ast/ObjectIntersectionType.d.ts +0 -4
- package/dist/ast/ObjectIntersectionType.js +0 -2
- package/dist/ast/ObjectUnionType.d.ts +0 -4
- package/dist/ast/ObjectUnionType.js +0 -2
- package/dist/generators/ts/LazyObjectOptionType.js +0 -62
- package/dist/generators/ts/LazyObjectSetType.d.ts +0 -20
- package/dist/generators/ts/LazyObjectSetType.js +0 -61
- package/dist/generators/ts/LazyObjectType.d.ts +0 -19
- package/dist/generators/ts/LazyObjectType.js +0 -53
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.js +0 -65
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.js +0 -23
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.js +0 -24
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +0 -43
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.js +0 -80
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +0 -15
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.js +0 -10
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.js +0 -45
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.js +0 -16
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.js +0 -31
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.js +0 -16
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.js +0 -17
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +0 -14
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.js +0 -41
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.js +0 -36
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +0 -11
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js +0 -13
- package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.js +0 -27
- package/dist/generators/ts/_snippets/snippets_LazyObject.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObject.js +0 -22
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.js +0 -25
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.js +0 -40
- package/dist/generators/ts/_snippets/snippets_convertToArray.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToArray.js +0 -8
- package/dist/generators/ts/_snippets/snippets_convertToLazyObject.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObject.js +0 -15
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectOption.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectOption.js +0 -31
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectSet.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectSet.js +0 -25
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +0 -15
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.js +0 -23
|
@@ -2,10 +2,12 @@ import type { Literal } from "@rdfjs/types";
|
|
|
2
2
|
import { AbstractNumericType } from "./AbstractNumericType.js";
|
|
3
3
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
4
4
|
export declare class FloatType extends AbstractNumericType<number> {
|
|
5
|
+
readonly jsTypes: readonly [{
|
|
6
|
+
readonly typeof: "number";
|
|
7
|
+
}];
|
|
5
8
|
readonly kind = "Float";
|
|
6
|
-
|
|
9
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
7
10
|
get graphqlType(): import("./AbstractType.js").AbstractType.GraphqlType;
|
|
8
|
-
|
|
9
|
-
protected fromRdfResourceValueExpression({ variables, }: Parameters<AbstractNumericType<number>["fromRdfResourceValueExpression"]>[0]): Code;
|
|
11
|
+
literalValueExpression(literal: Literal | number): Code;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=FloatType.d.ts.map
|
|
@@ -9,18 +9,21 @@ import { Memoize } from "typescript-memoize";
|
|
|
9
9
|
import { AbstractNumericType } from "./AbstractNumericType.js";
|
|
10
10
|
import { code } from "./ts-poet-wrapper.js";
|
|
11
11
|
export class FloatType extends AbstractNumericType {
|
|
12
|
+
jsTypes = [{ typeof: "number" }];
|
|
12
13
|
kind = "Float";
|
|
13
|
-
|
|
14
|
+
get fromRdfResourceValuesFunction() {
|
|
15
|
+
return code `${this.reusables.snippets.floatFromRdfResourceValues}<${this.expression}>`;
|
|
16
|
+
}
|
|
14
17
|
get graphqlType() {
|
|
15
18
|
return new AbstractNumericType.GraphqlType(code `${this.reusables.imports.GraphQLFloat}`, this.reusables);
|
|
16
19
|
}
|
|
17
|
-
|
|
20
|
+
literalValueExpression(literal) {
|
|
18
21
|
return code `${typeof literal === "number" ? literal : LiteralDecoder.decodeFloatLiteral(literal).unsafeCoerce()}`;
|
|
19
22
|
}
|
|
20
|
-
fromRdfResourceValueExpression({ variables, }) {
|
|
21
|
-
return code `${variables.value}.toFloat(${this.primitiveIn.length > 0 ? `${JSON.stringify(this.primitiveIn)} as const` : ""})`;
|
|
22
|
-
}
|
|
23
23
|
}
|
|
24
|
+
__decorate([
|
|
25
|
+
Memoize()
|
|
26
|
+
], FloatType.prototype, "fromRdfResourceValuesFunction", null);
|
|
24
27
|
__decorate([
|
|
25
28
|
Memoize()
|
|
26
29
|
], FloatType.prototype, "graphqlType", null);
|
|
@@ -32,7 +32,7 @@ export const graphqlSchema = new ${this.reusables.imports.GraphQLSchema}({ query
|
|
|
32
32
|
(await ${this.reusables.imports.EitherAsync}<Error, ${namedObjectType.expression}>(async ({ liftEither }) =>
|
|
33
33
|
liftEither(await objectSet.${namedObjectType.objectSetMethodNames.object}(await liftEither(${namedObjectType.identifierTypeAlias}.parse(args.identifier))))
|
|
34
34
|
)).unsafeCoerce()`,
|
|
35
|
-
type: namedObjectType.graphqlType.
|
|
35
|
+
type: namedObjectType.graphqlType.expression,
|
|
36
36
|
};
|
|
37
37
|
fields[namedObjectType.objectSetMethodNames.objectIdentifiers] = {
|
|
38
38
|
args: {
|
|
@@ -73,7 +73,7 @@ export const graphqlSchema = new ${this.reusables.imports.GraphQLSchema}({ query
|
|
|
73
73
|
}
|
|
74
74
|
return await liftEither(await objectSet.${namedObjectType.objectSetMethodNames.objects}({ filter, limit: args.limit !== null ? args.limit : undefined, offset: args.offset !== null ? args.offset : undefined }));
|
|
75
75
|
})).unsafeCoerce()`,
|
|
76
|
-
type: code `new ${this.reusables.imports.GraphQLNonNull}(new ${this.reusables.imports.GraphQLList}(${namedObjectType.graphqlType.
|
|
76
|
+
type: code `new ${this.reusables.imports.GraphQLNonNull}(new ${this.reusables.imports.GraphQLList}(${namedObjectType.graphqlType.expression}))`,
|
|
77
77
|
};
|
|
78
78
|
fields[namedObjectType.objectSetMethodNames.objectCount] = {
|
|
79
79
|
resolve: code `\
|
|
@@ -4,10 +4,11 @@ import { Maybe } from "purify-ts";
|
|
|
4
4
|
import { AbstractIdentifierType } from "./AbstractIdentifierType.js";
|
|
5
5
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
6
6
|
export declare class IdentifierType extends AbstractIdentifierType<BlankNode | NamedNode> {
|
|
7
|
+
protected readonly inlineExpression: Code;
|
|
7
8
|
readonly conversionFunction: Maybe<AbstractIdentifierType.ConversionFunction>;
|
|
8
|
-
readonly expression: Code;
|
|
9
9
|
readonly filterFunction: Code;
|
|
10
10
|
readonly filterType: Code;
|
|
11
|
+
readonly fromRdfResourceValuesFunction: Code;
|
|
11
12
|
readonly kind = "Identifier";
|
|
12
13
|
readonly nodeKinds: ReadonlySet<IdentifierNodeKind>;
|
|
13
14
|
readonly parseFunction: Code;
|
|
@@ -18,6 +19,5 @@ export declare class IdentifierType extends AbstractIdentifierType<BlankNode | N
|
|
|
18
19
|
jsonSchema({ includeDiscriminantProperty, }: Parameters<AbstractIdentifierType<BlankNode | NamedNode>["jsonSchema"]>[0]): Code;
|
|
19
20
|
jsonType(parameters?: Parameters<AbstractIdentifierType<BlankNode | NamedNode>["jsonType"]>[0]): AbstractIdentifierType.JsonType;
|
|
20
21
|
toJsonExpression({ includeDiscriminantProperty, variables, }: Parameters<AbstractIdentifierType<BlankNode | NamedNode>["toJsonExpression"]>[0]): Code;
|
|
21
|
-
protected fromRdfResourceValuesExpressionChain({ variables, }: Parameters<AbstractIdentifierType<BlankNode | NamedNode>["fromRdfResourceValuesExpressionChain"]>[0]): ReturnType<AbstractIdentifierType<BlankNode | NamedNode>["fromRdfResourceValuesExpressionChain"]>;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=IdentifierType.d.ts.map
|
|
@@ -10,30 +10,33 @@ import { Memoize } from "typescript-memoize";
|
|
|
10
10
|
import { AbstractIdentifierType } from "./AbstractIdentifierType.js";
|
|
11
11
|
import { arrayOf, code } from "./ts-poet-wrapper.js";
|
|
12
12
|
export class IdentifierType extends AbstractIdentifierType {
|
|
13
|
+
inlineExpression = code `(${this.reusables.imports.BlankNode} | ${this.reusables.imports.NamedNode})`;
|
|
13
14
|
conversionFunction = Maybe.of({
|
|
14
15
|
code: code `${this.reusables.snippets.convertToIdentifier}`,
|
|
15
16
|
sourceTypes: [
|
|
16
17
|
{
|
|
17
18
|
expression: code `${this.reusables.imports.BlankNode}`,
|
|
18
|
-
|
|
19
|
+
jsType: this.jsTypes[0],
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
expression: code `${this.reusables.imports.NamedNode}`,
|
|
22
|
-
|
|
23
|
+
jsType: this.jsTypes[0],
|
|
23
24
|
},
|
|
24
25
|
{
|
|
26
|
+
// To NamedNode
|
|
25
27
|
expression: code `string`,
|
|
26
|
-
typeof: "string",
|
|
28
|
+
jsType: { typeof: "string" },
|
|
27
29
|
},
|
|
28
30
|
{
|
|
31
|
+
// To BlankNode
|
|
29
32
|
expression: code `undefined`,
|
|
30
|
-
typeof: "undefined",
|
|
33
|
+
jsType: { typeof: "undefined" },
|
|
31
34
|
},
|
|
32
35
|
],
|
|
33
36
|
});
|
|
34
|
-
expression = code `(${this.reusables.imports.BlankNode} | ${this.reusables.imports.NamedNode})`;
|
|
35
37
|
filterFunction = code `${this.reusables.snippets.filterIdentifier}`;
|
|
36
38
|
filterType = code `${this.reusables.snippets.IdentifierFilter}`;
|
|
39
|
+
fromRdfResourceValuesFunction = code `${this.reusables.snippets.identifierFromRdfResourceValues}`;
|
|
37
40
|
kind = "Identifier";
|
|
38
41
|
nodeKinds = nodeKinds;
|
|
39
42
|
parseFunction = code `${this.reusables.snippets.parseIdentifier};`;
|
|
@@ -69,12 +72,6 @@ export class IdentifierType extends AbstractIdentifierType {
|
|
|
69
72
|
const valueToNamedNode = code `{ "@id": ${variables.value}.value${discriminantProperty} }`;
|
|
70
73
|
return code `(${variables.value}.termType === "BlankNode" ? ${valueToBlankNode} : ${valueToNamedNode})`;
|
|
71
74
|
}
|
|
72
|
-
fromRdfResourceValuesExpressionChain({ variables, }) {
|
|
73
|
-
return {
|
|
74
|
-
...super.fromRdfResourceValuesExpressionChain({ variables }),
|
|
75
|
-
valueTo: code `chain(values => values.chainMap(value => value.toIdentifier()))`,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
75
|
}
|
|
79
76
|
__decorate([
|
|
80
77
|
Memoize()
|
|
@@ -2,10 +2,12 @@ import type { Literal } from "@rdfjs/types";
|
|
|
2
2
|
import { AbstractNumericType } from "./AbstractNumericType.js";
|
|
3
3
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
4
4
|
export declare class IntType extends AbstractNumericType<number> {
|
|
5
|
+
readonly jsTypes: readonly [{
|
|
6
|
+
readonly typeof: "number";
|
|
7
|
+
}];
|
|
5
8
|
readonly kind = "Int";
|
|
6
|
-
|
|
9
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
7
10
|
get graphqlType(): import("./AbstractType.js").AbstractType.GraphqlType;
|
|
8
|
-
|
|
9
|
-
protected fromRdfResourceValueExpression({ variables, }: Parameters<AbstractNumericType<number>["fromRdfResourceValueExpression"]>[0]): Code;
|
|
11
|
+
literalValueExpression(literal: Literal | number): Code;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=IntType.d.ts.map
|
|
@@ -9,18 +9,21 @@ import { Memoize } from "typescript-memoize";
|
|
|
9
9
|
import { AbstractNumericType } from "./AbstractNumericType.js";
|
|
10
10
|
import { code } from "./ts-poet-wrapper.js";
|
|
11
11
|
export class IntType extends AbstractNumericType {
|
|
12
|
+
jsTypes = [{ typeof: "number" }];
|
|
12
13
|
kind = "Int";
|
|
13
|
-
|
|
14
|
+
get fromRdfResourceValuesFunction() {
|
|
15
|
+
return code `${this.reusables.snippets.intFromRdfResourceValues}<${this.expression}>`;
|
|
16
|
+
}
|
|
14
17
|
get graphqlType() {
|
|
15
18
|
return new AbstractNumericType.GraphqlType(code `${this.reusables.imports.GraphQLInt}`, this.reusables);
|
|
16
19
|
}
|
|
17
|
-
|
|
20
|
+
literalValueExpression(literal) {
|
|
18
21
|
return code `${typeof literal === "number" ? literal : LiteralDecoder.decodeIntLiteral(literal).unsafeCoerce()}`;
|
|
19
22
|
}
|
|
20
|
-
fromRdfResourceValueExpression({ variables, }) {
|
|
21
|
-
return code `${variables.value}.toInt(${this.primitiveIn.length > 0 ? `${JSON.stringify(this.primitiveIn)} as const` : ""})`;
|
|
22
|
-
}
|
|
23
23
|
}
|
|
24
|
+
__decorate([
|
|
25
|
+
Memoize()
|
|
26
|
+
], IntType.prototype, "fromRdfResourceValuesFunction", null);
|
|
24
27
|
__decorate([
|
|
25
28
|
Memoize()
|
|
26
29
|
], IntType.prototype, "graphqlType", null);
|
|
@@ -10,14 +10,14 @@ export declare class IriType extends AbstractIdentifierType<NamedNode> {
|
|
|
10
10
|
readonly schemaType: Code;
|
|
11
11
|
readonly valueSparqlWherePatternsFunction: Code;
|
|
12
12
|
get conversionFunction(): Maybe<AbstractIdentifierType.ConversionFunction>;
|
|
13
|
-
get
|
|
13
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
14
14
|
get parseFunction(): Code;
|
|
15
|
+
protected get inlineExpression(): Code;
|
|
15
16
|
protected get schemaInitializers(): readonly Code[];
|
|
16
17
|
private get valueTypeExpression();
|
|
17
18
|
fromJsonExpression({ variables, }: Parameters<AbstractIdentifierType<NamedNode>["fromJsonExpression"]>[0]): Code;
|
|
18
19
|
jsonSchema({ includeDiscriminantProperty, }: Parameters<AbstractIdentifierType<NamedNode>["jsonSchema"]>[0]): Code;
|
|
19
20
|
jsonType(parameters?: Parameters<AbstractIdentifierType<NamedNode>["jsonType"]>[0]): AbstractIdentifierType.JsonType;
|
|
20
21
|
toJsonExpression({ includeDiscriminantProperty, variables, }: Parameters<AbstractIdentifierType<NamedNode>["toJsonExpression"]>[0]): Code;
|
|
21
|
-
protected fromRdfResourceValuesExpressionChain({ variables, }: Parameters<AbstractIdentifierType<NamedNode>["fromRdfResourceValuesExpressionChain"]>[0]): ReturnType<AbstractIdentifierType<NamedNode>["fromRdfResourceValuesExpressionChain"]>;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=IriType.d.ts.map
|
|
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Maybe } from "purify-ts";
|
|
8
|
+
import { invariant } from "ts-invariant";
|
|
8
9
|
import { Memoize } from "typescript-memoize";
|
|
9
10
|
import { AbstractIdentifierType } from "./AbstractIdentifierType.js";
|
|
10
11
|
import { arrayOf, code, joinCode } from "./ts-poet-wrapper.js";
|
|
@@ -16,25 +17,23 @@ export class IriType extends AbstractIdentifierType {
|
|
|
16
17
|
schemaType = code `${this.reusables.snippets.IriSchema}<${this.valueTypeExpression}>`;
|
|
17
18
|
valueSparqlWherePatternsFunction = code `${this.reusables.snippets.iriSparqlWherePatterns}`;
|
|
18
19
|
get conversionFunction() {
|
|
20
|
+
invariant(this.jsTypes.length === 1);
|
|
19
21
|
return Maybe.of({
|
|
20
22
|
code: code `${this.reusables.snippets.convertToIri}<${this.valueTypeExpression}>`,
|
|
21
23
|
sourceTypes: [
|
|
22
24
|
{
|
|
23
25
|
expression: this.valueTypeExpression,
|
|
24
|
-
typeof: "string",
|
|
26
|
+
jsType: { typeof: "string" },
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
29
|
expression: this.expression,
|
|
28
|
-
|
|
30
|
+
jsType: this.jsTypes[0],
|
|
29
31
|
},
|
|
30
32
|
],
|
|
31
33
|
});
|
|
32
34
|
}
|
|
33
|
-
get
|
|
34
|
-
|
|
35
|
-
return code `${this.reusables.imports.NamedNode}<${this.valueTypeExpression}>`;
|
|
36
|
-
}
|
|
37
|
-
return code `${this.reusables.imports.NamedNode}`;
|
|
35
|
+
get fromRdfResourceValuesFunction() {
|
|
36
|
+
return code `${this.reusables.snippets.iriFromRdfResourceValues}<${this.valueTypeExpression}>`;
|
|
38
37
|
}
|
|
39
38
|
get parseFunction() {
|
|
40
39
|
if (this.in_.length > 0) {
|
|
@@ -42,6 +41,12 @@ export class IriType extends AbstractIdentifierType {
|
|
|
42
41
|
}
|
|
43
42
|
return code `${this.reusables.snippets.parseIri}`;
|
|
44
43
|
}
|
|
44
|
+
get inlineExpression() {
|
|
45
|
+
if (this.in_.length > 0) {
|
|
46
|
+
return code `${this.reusables.imports.NamedNode}<${this.valueTypeExpression}>`;
|
|
47
|
+
}
|
|
48
|
+
return code `${this.reusables.imports.NamedNode}`;
|
|
49
|
+
}
|
|
45
50
|
get schemaInitializers() {
|
|
46
51
|
let initializers = super.schemaInitializers;
|
|
47
52
|
if (this.in_.length > 0) {
|
|
@@ -84,24 +89,19 @@ export class IriType extends AbstractIdentifierType {
|
|
|
84
89
|
: "";
|
|
85
90
|
return code `{ "@id": ${variables.value}.value${discriminantProperty} }`;
|
|
86
91
|
}
|
|
87
|
-
fromRdfResourceValuesExpressionChain({ variables, }) {
|
|
88
|
-
return {
|
|
89
|
-
...super.fromRdfResourceValuesExpressionChain({ variables }),
|
|
90
|
-
valueTo: code `chain(values => values.chainMap(value => value.toIri(${this.in_.length > 0
|
|
91
|
-
? code `[${joinCode(this.in_.map((in_) => this.rdfjsTermExpression(in_)), { on: ", " })}]`
|
|
92
|
-
: ""})))`,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
92
|
}
|
|
96
93
|
__decorate([
|
|
97
94
|
Memoize()
|
|
98
95
|
], IriType.prototype, "conversionFunction", null);
|
|
99
96
|
__decorate([
|
|
100
97
|
Memoize()
|
|
101
|
-
], IriType.prototype, "
|
|
98
|
+
], IriType.prototype, "fromRdfResourceValuesFunction", null);
|
|
102
99
|
__decorate([
|
|
103
100
|
Memoize()
|
|
104
101
|
], IriType.prototype, "parseFunction", null);
|
|
102
|
+
__decorate([
|
|
103
|
+
Memoize()
|
|
104
|
+
], IriType.prototype, "inlineExpression", null);
|
|
105
105
|
__decorate([
|
|
106
106
|
Memoize()
|
|
107
107
|
], IriType.prototype, "valueTypeExpression", null);
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import {
|
|
2
|
+
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
3
3
|
import type { OptionType } from "./OptionType.js";
|
|
4
4
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
5
|
-
type Super =
|
|
5
|
+
type Super = AbstractLazyType<OptionType<AbstractLazyType.ItemTypeConstraint>, OptionType<AbstractLazyType.ItemTypeConstraint>>;
|
|
6
6
|
declare const Super: (abstract new ({ partialType, resolveType, ...superParameters }: {
|
|
7
|
-
partialType: OptionType<
|
|
8
|
-
resolveType: OptionType<
|
|
7
|
+
partialType: OptionType<AbstractLazyType.ItemTypeConstraint>;
|
|
8
|
+
resolveType: OptionType<AbstractLazyType.ItemTypeConstraint>;
|
|
9
9
|
} & {
|
|
10
|
-
|
|
10
|
+
name: Maybe<string>;
|
|
11
11
|
comment: Maybe<string>;
|
|
12
12
|
configuration: import("./TsGenerator.js").TsGenerator.Configuration;
|
|
13
13
|
label: Maybe<string>;
|
|
14
14
|
logger: import("ts-log").Logger;
|
|
15
15
|
reusables: import("./Reusables.js").Reusables;
|
|
16
|
-
|
|
16
|
+
shapeIdentifier: import("@rdfjs/types").BlankNode | import("@rdfjs/types").NamedNode;
|
|
17
|
+
}) => AbstractLazyType<OptionType<AbstractLazyType.ItemTypeConstraint>, OptionType<AbstractLazyType.ItemTypeConstraint>>) & {
|
|
17
18
|
readonly GraphqlType: typeof import("./AbstractType.js").AbstractType.GraphqlType;
|
|
18
19
|
readonly JsonType: typeof import("./AbstractType.js").AbstractType.JsonType;
|
|
20
|
+
JsType: typeof import("./AbstractType.js").AbstractType.JsType;
|
|
19
21
|
};
|
|
20
|
-
export declare class
|
|
22
|
+
export declare class LazyOptionType extends Super {
|
|
21
23
|
readonly graphqlArgs: Super["graphqlArgs"];
|
|
22
|
-
readonly kind = "
|
|
23
|
-
get conversionFunction(): Maybe<
|
|
24
|
+
readonly kind = "LazyOption";
|
|
25
|
+
get conversionFunction(): Maybe<AbstractLazyType.ConversionFunction>;
|
|
24
26
|
protected get runtimeClass(): {
|
|
25
27
|
name: Code;
|
|
26
28
|
partialPropertyName: string;
|
|
27
29
|
rawName: Code;
|
|
28
30
|
};
|
|
29
31
|
fromJsonExpression(parameters: Parameters<Super["fromJsonExpression"]>[0]): Code;
|
|
30
|
-
|
|
32
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
31
33
|
graphqlResolveExpression({ variables, }: Parameters<Super["graphqlResolveExpression"]>[0]): Code;
|
|
32
34
|
}
|
|
33
35
|
export {};
|
|
34
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=LazyOptionType.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Maybe } from "purify-ts";
|
|
8
|
+
import { invariant } from "ts-invariant";
|
|
9
|
+
import { Memoize } from "typescript-memoize";
|
|
10
|
+
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
11
|
+
import { code } from "./ts-poet-wrapper.js";
|
|
12
|
+
const Super = (AbstractLazyType);
|
|
13
|
+
export class LazyOptionType extends Super {
|
|
14
|
+
graphqlArgs = Maybe.empty();
|
|
15
|
+
kind = "LazyOption";
|
|
16
|
+
get conversionFunction() {
|
|
17
|
+
invariant(this.jsTypes.length === 1);
|
|
18
|
+
invariant(this.resolveType.jsTypes.length === 1);
|
|
19
|
+
invariant(this.resolveType.itemType.jsTypes.length === 1);
|
|
20
|
+
return Maybe.of({
|
|
21
|
+
code: code `${this.reusables.snippets.convertToLazyOption}<${this.partialType.itemType.expression}, ${this.resolveType.itemType.expression}>(${this.resolveToPartialFunction({ partialType: this.partialType.itemType, resolveType: this.resolveType.itemType })})`,
|
|
22
|
+
sourceTypes: [
|
|
23
|
+
{
|
|
24
|
+
expression: this.expression,
|
|
25
|
+
jsType: this.jsTypes[0],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
expression: this.resolveType.expression,
|
|
29
|
+
jsType: this.resolveType.jsTypes[0],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
expression: this.resolveType.itemType.expression,
|
|
33
|
+
jsType: this.resolveType.itemType.jsTypes[0],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
expression: code `undefined`,
|
|
37
|
+
jsType: { typeof: "undefined" },
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
get runtimeClass() {
|
|
43
|
+
return {
|
|
44
|
+
name: code `${this.reusables.snippets.LazyOption}<${this.partialType.itemType.expression}, ${this.resolveType.itemType.expression}>`,
|
|
45
|
+
partialPropertyName: "partial",
|
|
46
|
+
rawName: code `${this.reusables.snippets.LazyOption}`,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
fromJsonExpression(parameters) {
|
|
50
|
+
return code `${this.partialType.fromJsonExpression(parameters)}.map(partial => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}: partial, resolver: (partial) => Promise.resolve(${this.reusables.imports.Left}(new Error(\`unable to resolve \${partial} deserialized from JSON\`))) }))`;
|
|
51
|
+
}
|
|
52
|
+
get fromRdfResourceValuesFunction() {
|
|
53
|
+
return code `\
|
|
54
|
+
(
|
|
55
|
+
(
|
|
56
|
+
(values, { objectSet, schema, ...otherOptions }) =>
|
|
57
|
+
${this.partialType.fromRdfResourceValuesFunction}(values, { ...otherOptions, objectSet, schema: schema.partialType })
|
|
58
|
+
.map(values => values.map(${this.runtimeClass.partialPropertyName} => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}, resolver: (partial, options) => objectSet.${this.resolveType.itemType.objectSetMethodNames.object}(partial.${this.configuration.syntheticNamePrefix}identifier(), options) })))
|
|
59
|
+
) satisfies ${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.expression}, ${this.schemaType}>
|
|
60
|
+
)`;
|
|
61
|
+
}
|
|
62
|
+
graphqlResolveExpression({ variables, }) {
|
|
63
|
+
return code `${variables.value}.resolve().then(either => either.unsafeCoerce().extractNullable())`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
__decorate([
|
|
67
|
+
Memoize()
|
|
68
|
+
], LazyOptionType.prototype, "conversionFunction", null);
|
|
69
|
+
__decorate([
|
|
70
|
+
Memoize()
|
|
71
|
+
], LazyOptionType.prototype, "runtimeClass", null);
|
|
72
|
+
__decorate([
|
|
73
|
+
Memoize()
|
|
74
|
+
], LazyOptionType.prototype, "fromRdfResourceValuesFunction", null);
|
|
75
|
+
//# sourceMappingURL=LazyOptionType.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Maybe } from "purify-ts";
|
|
2
|
+
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
3
|
+
import type { SetType } from "./SetType.js";
|
|
4
|
+
import { type Code } from "./ts-poet-wrapper.js";
|
|
5
|
+
export declare class LazySetType extends AbstractLazyType<SetType<AbstractLazyType.ItemTypeConstraint>, SetType<AbstractLazyType.ItemTypeConstraint>> {
|
|
6
|
+
readonly graphqlArgs: Super["graphqlArgs"];
|
|
7
|
+
readonly kind = "LazySet";
|
|
8
|
+
get conversionFunction(): Maybe<AbstractLazyType.ConversionFunction>;
|
|
9
|
+
protected get runtimeClass(): {
|
|
10
|
+
name: Code;
|
|
11
|
+
partialPropertyName: string;
|
|
12
|
+
rawName: Code;
|
|
13
|
+
};
|
|
14
|
+
fromJsonExpression(parameters: Parameters<Super["fromJsonExpression"]>[0]): Code;
|
|
15
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
16
|
+
graphqlResolveExpression({ variables, }: Parameters<Super["graphqlResolveExpression"]>[0]): Code;
|
|
17
|
+
}
|
|
18
|
+
type Super = AbstractLazyType<SetType<AbstractLazyType.ItemTypeConstraint>, SetType<AbstractLazyType.ItemTypeConstraint>>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=LazySetType.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Maybe } from "purify-ts";
|
|
8
|
+
import { invariant } from "ts-invariant";
|
|
9
|
+
import { Memoize } from "typescript-memoize";
|
|
10
|
+
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
11
|
+
import { code } from "./ts-poet-wrapper.js";
|
|
12
|
+
export class LazySetType extends AbstractLazyType {
|
|
13
|
+
graphqlArgs = Maybe.of({
|
|
14
|
+
limit: {
|
|
15
|
+
type: code `${this.reusables.imports.GraphQLInt}`,
|
|
16
|
+
},
|
|
17
|
+
offset: {
|
|
18
|
+
type: code `${this.reusables.imports.GraphQLInt}`,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
kind = "LazySet";
|
|
22
|
+
get conversionFunction() {
|
|
23
|
+
invariant(this.jsTypes.length === 1);
|
|
24
|
+
invariant(this.resolveType.jsTypes.length === 1);
|
|
25
|
+
return Maybe.of({
|
|
26
|
+
code: code `${this.reusables.snippets.convertToLazySet}<${this.partialType.itemType.expression}, ${this.resolveType.itemType.expression}>(${this.resolveToPartialFunction({ partialType: this.partialType.itemType, resolveType: this.resolveType.itemType })})`,
|
|
27
|
+
sourceTypes: [
|
|
28
|
+
{
|
|
29
|
+
expression: this.expression,
|
|
30
|
+
jsType: this.jsTypes[0],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
expression: this.resolveType.expression,
|
|
34
|
+
jsType: this.resolveType.jsTypes[0],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
expression: code `undefined`,
|
|
38
|
+
jsType: { typeof: "undefined" },
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
get runtimeClass() {
|
|
44
|
+
return {
|
|
45
|
+
name: code `${this.reusables.snippets.LazySet}<${this.partialType.itemType.expression}, ${this.resolveType.itemType.expression}>`,
|
|
46
|
+
partialPropertyName: "partials",
|
|
47
|
+
rawName: code `${this.reusables.snippets.LazySet}`,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
fromJsonExpression(parameters) {
|
|
51
|
+
return code `${this.partialType.fromJsonExpression(parameters)}.map(partials => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}: partials, resolver: () => Promise.resolve(${this.reusables.imports.Left}(new Error("unable to resolve partials deserialized from JSON"))) }))`;
|
|
52
|
+
}
|
|
53
|
+
get fromRdfResourceValuesFunction() {
|
|
54
|
+
return code `\
|
|
55
|
+
(
|
|
56
|
+
(
|
|
57
|
+
(values, { objectSet, schema, ...otherOptions }) =>
|
|
58
|
+
${this.partialType.fromRdfResourceValuesFunction}(values, { ...otherOptions, objectSet, schema: schema.partialType })
|
|
59
|
+
.map(values => values.map(${this.runtimeClass.partialPropertyName} => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}, resolver: (partials, options) => objectSet.${this.resolveType.itemType.objectSetMethodNames.objects}({ identifiers: partials.map(partial => partial.${this.configuration.syntheticNamePrefix}identifier()), ...options }) })))
|
|
60
|
+
) satisfies ${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.expression}, ${this.schemaType}>
|
|
61
|
+
)`;
|
|
62
|
+
}
|
|
63
|
+
graphqlResolveExpression({ variables, }) {
|
|
64
|
+
return code `(${variables.value}.resolve({ limit: ${variables.args}.limit, offset: ${variables.args}.offset })).then(either => either.unsafeCoerce())`;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
__decorate([
|
|
68
|
+
Memoize()
|
|
69
|
+
], LazySetType.prototype, "conversionFunction", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
Memoize()
|
|
72
|
+
], LazySetType.prototype, "runtimeClass", null);
|
|
73
|
+
__decorate([
|
|
74
|
+
Memoize()
|
|
75
|
+
], LazySetType.prototype, "fromRdfResourceValuesFunction", null);
|
|
76
|
+
//# sourceMappingURL=LazySetType.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Maybe } from "purify-ts";
|
|
2
|
+
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
3
|
+
import { type Code } from "./ts-poet-wrapper.js";
|
|
4
|
+
export declare class LazyType extends AbstractLazyType<AbstractLazyType.ItemTypeConstraint, AbstractLazyType.ItemTypeConstraint> {
|
|
5
|
+
readonly graphqlArgs: Super["graphqlArgs"];
|
|
6
|
+
readonly kind = "Lazy";
|
|
7
|
+
get conversionFunction(): Maybe<AbstractLazyType.ConversionFunction>;
|
|
8
|
+
protected get runtimeClass(): {
|
|
9
|
+
name: Code;
|
|
10
|
+
partialPropertyName: string;
|
|
11
|
+
rawName: Code;
|
|
12
|
+
};
|
|
13
|
+
fromJsonExpression(parameters: Parameters<Super["fromJsonExpression"]>[0]): Code;
|
|
14
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
15
|
+
graphqlResolveExpression({ variables, }: Parameters<Super["graphqlResolveExpression"]>[0]): Code;
|
|
16
|
+
}
|
|
17
|
+
type Super = AbstractLazyType<AbstractLazyType.ItemTypeConstraint, AbstractLazyType.ItemTypeConstraint>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=LazyType.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Maybe } from "purify-ts";
|
|
8
|
+
import { invariant } from "ts-invariant";
|
|
9
|
+
import { Memoize } from "typescript-memoize";
|
|
10
|
+
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
11
|
+
import { code } from "./ts-poet-wrapper.js";
|
|
12
|
+
export class LazyType extends AbstractLazyType {
|
|
13
|
+
graphqlArgs = Maybe.empty();
|
|
14
|
+
kind = "Lazy";
|
|
15
|
+
get conversionFunction() {
|
|
16
|
+
invariant(this.jsTypes.length === 1);
|
|
17
|
+
invariant(this.resolveType.jsTypes.length === 1);
|
|
18
|
+
return Maybe.of({
|
|
19
|
+
code: code `${this.reusables.snippets.convertToLazy}<${this.partialType.expression}, ${this.resolveType.expression}>(${this.resolveToPartialFunction({ partialType: this.partialType, resolveType: this.resolveType })})`,
|
|
20
|
+
sourceTypes: [
|
|
21
|
+
{
|
|
22
|
+
expression: this.expression,
|
|
23
|
+
jsType: this.jsTypes[0],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
expression: this.resolveType.expression,
|
|
27
|
+
jsType: this.resolveType.jsTypes[0],
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
get runtimeClass() {
|
|
33
|
+
return {
|
|
34
|
+
name: code `${this.reusables.snippets.Lazy}<${this.partialType.expression}, ${this.resolveType.expression}>`,
|
|
35
|
+
partialPropertyName: "partial",
|
|
36
|
+
rawName: code `${this.reusables.snippets.Lazy}`,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
fromJsonExpression(parameters) {
|
|
40
|
+
return code `${this.partialType.fromJsonExpression(parameters)}.map(partial => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}: partial, resolver: (partial) => Promise.resolve(${this.reusables.imports.Left}(new Error(\`unable to resolve \${partial} deserialized from JSON\`))) }))`;
|
|
41
|
+
}
|
|
42
|
+
get fromRdfResourceValuesFunction() {
|
|
43
|
+
return code `\
|
|
44
|
+
(
|
|
45
|
+
(
|
|
46
|
+
(values, { objectSet, schema, ...otherOptions }) =>
|
|
47
|
+
${this.partialType.fromRdfResourceValuesFunction}(values, { ...otherOptions, objectSet, schema: schema.partialType })
|
|
48
|
+
.map(values => values.map(${this.runtimeClass.partialPropertyName} => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}, resolver: (partial, options) => objectSet.${this.resolveType.objectSetMethodNames.object}(partial.${this.configuration.syntheticNamePrefix}identifier(), options) })))
|
|
49
|
+
) satisfies ${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.expression}, ${this.schemaType}>
|
|
50
|
+
)`;
|
|
51
|
+
}
|
|
52
|
+
graphqlResolveExpression({ variables, }) {
|
|
53
|
+
return code `${variables.value}.resolve().then(either => either.unsafeCoerce())`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
__decorate([
|
|
57
|
+
Memoize()
|
|
58
|
+
], LazyType.prototype, "conversionFunction", null);
|
|
59
|
+
__decorate([
|
|
60
|
+
Memoize()
|
|
61
|
+
], LazyType.prototype, "runtimeClass", null);
|
|
62
|
+
__decorate([
|
|
63
|
+
Memoize()
|
|
64
|
+
], LazyType.prototype, "fromRdfResourceValuesFunction", null);
|
|
65
|
+
//# sourceMappingURL=LazyType.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NamedNode } from "@rdfjs/types";
|
|
2
|
+
import { Maybe } from "purify-ts";
|
|
2
3
|
import { AbstractCollectionType } from "./AbstractCollectionType.js";
|
|
3
4
|
import type { BigDecimalType } from "./BigDecimalType.js";
|
|
4
5
|
import type { BigIntType } from "./BigIntType.js";
|
|
@@ -21,20 +22,28 @@ import type { UnionType } from "./UnionType.js";
|
|
|
21
22
|
export declare class ListType<ItemTypeT extends ListType.ItemType> extends AbstractCollectionType<ItemTypeT> {
|
|
22
23
|
private readonly identifierNodeKind;
|
|
23
24
|
private readonly toRdfTypes;
|
|
25
|
+
readonly jsTypes: readonly [{
|
|
26
|
+
readonly instanceof: "Array";
|
|
27
|
+
readonly typeof: "object";
|
|
28
|
+
}];
|
|
24
29
|
readonly kind = "List";
|
|
25
30
|
constructor({ identifierNodeKind, toRdfTypes, ...superParameters }: {
|
|
26
31
|
identifierNodeKind: ListType<ItemTypeT>["identifierNodeKind"];
|
|
27
32
|
toRdfTypes: readonly NamedNode[];
|
|
28
33
|
} & ConstructorParameters<typeof AbstractCollectionType<ItemTypeT>>[0]);
|
|
34
|
+
get conversionFunction(): Maybe<AbstractCollectionType.ConversionFunction>;
|
|
35
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
36
|
+
get toRdfResourceValueTypes(): AbstractCollectionType<ItemTypeT>["toRdfResourceValueTypes"];
|
|
29
37
|
get valueSparqlConstructTriplesFunction(): Code;
|
|
30
38
|
get valueSparqlWherePatternsFunction(): Code;
|
|
31
|
-
|
|
39
|
+
fromJsonExpression({ variables, }: Parameters<AbstractCollectionType<ItemTypeT>["fromJsonExpression"]>[0]): Code;
|
|
40
|
+
jsonSchema(parameters: Parameters<AbstractCollectionType<ItemTypeT>["jsonSchema"]>[0]): Code;
|
|
32
41
|
jsonType(): AbstractCollectionType.JsonType;
|
|
33
42
|
toRdfResourceValuesExpression({ variables, }: Parameters<AbstractCollectionType<ItemTypeT>["toRdfResourceValuesExpression"]>[0]): Code;
|
|
34
43
|
toStringExpression({ variables, }: Parameters<AbstractCollectionType<ItemTypeT>["toStringExpression"]>[0]): Code;
|
|
35
44
|
}
|
|
36
45
|
export declare namespace ListType {
|
|
37
|
-
type ItemType = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | FloatType | IdentifierType | IntType | IriType | LiteralType | ObjectUnionType | ObjectType | StringType | TermType | UnionType<Type>;
|
|
46
|
+
type ItemType = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | FloatType | IdentifierType | IntType | IriType | ListType<ListType.ItemType> | LiteralType | ObjectUnionType | ObjectType | StringType | TermType | UnionType<Type>;
|
|
38
47
|
function isItemType(type: Type): type is ItemType;
|
|
39
48
|
}
|
|
40
49
|
//# sourceMappingURL=ListType.d.ts.map
|