@shaclmate/compiler 4.0.41 → 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 -0
- package/dist/ShapesGraphToAstTransformer.js +10 -45
- 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} +2 -2
- package/dist/_ShapesGraphToAstTransformer/{transformShapeToAstObjectType.js → transformShapeToAstStructType.js} +35 -29
- 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 +2 -2
- package/dist/ast/AbstractCompoundType.js +4 -4
- 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 -10
- 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 -4
- 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 +4 -4
- 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 -27
- package/dist/ast/{ObjectType.js → StructType.js} +81 -78
- 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 +2 -2
- package/dist/generators/transformAstToLabeledPropertyGraph.js +8 -8
- package/dist/generators/ts/AbstractContainerType.d.ts +1 -1
- package/dist/generators/ts/AbstractContainerType.js +6 -6
- package/dist/generators/ts/AbstractDateType.d.ts +1 -7
- package/dist/generators/ts/AbstractDateType.js +1 -11
- package/dist/generators/ts/{AbstractLazyObjectType.d.ts → AbstractLazyType.d.ts} +7 -7
- package/dist/generators/ts/{AbstractLazyObjectType.js → AbstractLazyType.js} +19 -17
- package/dist/generators/ts/AbstractLiteralType.d.ts +2 -5
- package/dist/generators/ts/AbstractLiteralType.js +0 -21
- package/dist/generators/ts/AbstractNumericType.d.ts +1 -7
- package/dist/generators/ts/AbstractNumericType.js +15 -25
- package/dist/generators/ts/AbstractObjectSetType.d.ts +1 -1
- package/dist/generators/ts/AbstractObjectSetType.js +2 -2
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +1 -1
- package/dist/generators/ts/AbstractPrimitiveType.js +1 -1
- package/dist/generators/ts/AbstractTermType.d.ts +6 -21
- package/dist/generators/ts/AbstractTermType.js +26 -55
- package/dist/generators/ts/AbstractType.d.ts +40 -47
- package/dist/generators/ts/AbstractType.js +17 -6
- package/dist/generators/ts/BigDecimalType.d.ts +3 -3
- package/dist/generators/ts/BigDecimalType.js +3 -8
- package/dist/generators/ts/BigIntType.d.ts +2 -2
- package/dist/generators/ts/BigIntType.js +7 -4
- package/dist/generators/ts/BlankNodeType.d.ts +2 -7
- package/dist/generators/ts/BlankNodeType.js +2 -7
- package/dist/generators/ts/BooleanType.d.ts +3 -3
- package/dist/generators/ts/BooleanType.js +12 -14
- 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 +8 -8
- package/dist/generators/ts/DefaultValueType.js +10 -12
- package/dist/generators/ts/FloatType.d.ts +2 -2
- package/dist/generators/ts/FloatType.js +7 -4
- package/dist/generators/ts/IdentifierType.d.ts +2 -2
- package/dist/generators/ts/IdentifierType.js +2 -7
- package/dist/generators/ts/IntType.d.ts +2 -2
- package/dist/generators/ts/IntType.js +7 -4
- package/dist/generators/ts/IriType.d.ts +2 -2
- package/dist/generators/ts/IriType.js +12 -14
- package/dist/generators/ts/{LazyObjectOptionType.d.ts → LazyOptionType.d.ts} +12 -11
- package/dist/generators/ts/{LazyObjectOptionType.js → LazyOptionType.js} +23 -14
- package/dist/generators/ts/LazySetType.d.ts +20 -0
- package/dist/generators/ts/{LazyObjectSetType.js → LazySetType.js} +22 -13
- package/dist/generators/ts/LazyType.d.ts +19 -0
- package/dist/generators/ts/{LazyObjectType.js → LazyType.js} +22 -13
- package/dist/generators/ts/ListType.d.ts +1 -1
- package/dist/generators/ts/ListType.js +9 -19
- package/dist/generators/ts/LiteralType.d.ts +3 -2
- package/dist/generators/ts/LiteralType.js +6 -2
- package/dist/generators/ts/ObjectType.d.ts +16 -3
- package/dist/generators/ts/ObjectType.js +301 -91
- package/dist/generators/ts/ObjectUnionType.js +40 -40
- package/dist/generators/ts/OptionType.d.ts +2 -2
- package/dist/generators/ts/OptionType.js +7 -5
- package/dist/generators/ts/SetType.d.ts +3 -3
- package/dist/generators/ts/SetType.js +8 -10
- package/dist/generators/ts/Snippets.d.ts +26 -8
- package/dist/generators/ts/Snippets.js +161 -35
- package/dist/generators/ts/StringType.d.ts +4 -3
- package/dist/generators/ts/StringType.js +18 -11
- package/dist/generators/ts/TermType.d.ts +7 -5
- package/dist/generators/ts/TermType.js +28 -9
- package/dist/generators/ts/TsGenerator.js +11 -6
- package/dist/generators/ts/Type.d.ts +4 -4
- package/dist/generators/ts/TypeFactory.d.ts +5 -5
- package/dist/generators/ts/TypeFactory.js +79 -58
- package/dist/generators/ts/UnionType.d.ts +23 -18
- package/dist/generators/ts/UnionType.js +227 -221
- package/dist/generators/ts/ZodGenerator.js +15 -7
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +24 -15
- package/dist/generators/ts/_ObjectType/AbstractProperty.js +1 -24
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.d.ts +8 -6
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.js +11 -24
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +8 -2
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +44 -16
- 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_equalsFunctionDeclaration.js → ObjectType_equalsFunctionExpression.js} +6 -10
- 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} +6 -8
- 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 -9
- 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} +5 -9
- 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_fromRdfResourceFunctionDeclaration.js → ObjectType_fromRdfResourceFunctionExpression.js} +8 -16
- 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/{identifierTypeDeclarations.js → ObjectType_identifierTypeDeclarations.js} +2 -5
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +3 -3
- 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_jsonSchemaFunctionDeclaration.js → ObjectType_jsonSchemaExpression.js} +3 -10
- 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} +6 -12
- 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 +65 -33
- 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_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_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 +464 -389
- package/dist/input/generated.js +1748 -2294
- package/package.json +2 -2
- 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/LazyObjectSetType.d.ts +0 -20
- package/dist/generators/ts/LazyObjectType.d.ts +0 -19
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.js +0 -44
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.js +0 -21
- 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 -18
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +0 -5
- 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 -41
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.js +0 -12
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.js +0 -9
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.js +0 -15
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +0 -12
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.js +0 -20
- 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 -29
- 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/_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_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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@shaclmate/shacl-ast": "4.0.
|
|
3
|
+
"@shaclmate/shacl-ast": "4.0.42",
|
|
4
4
|
"@rdfjs/dataset": "~2.0.2",
|
|
5
5
|
"@rdfjs/prefix-map": "~0.1.2",
|
|
6
6
|
"@rdfjs/term-map": "~2.0.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
},
|
|
67
67
|
"type": "module",
|
|
68
68
|
"types": "./dist/index.d.ts",
|
|
69
|
-
"version": "4.0.
|
|
69
|
+
"version": "4.0.42"
|
|
70
70
|
}
|
package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Either } from "purify-ts";
|
|
2
|
-
import * as ast from "../ast/index.js";
|
|
3
|
-
import type * as input from "../input/index.js";
|
|
4
|
-
import type { ShapesGraphToAstTransformer } from "../ShapesGraphToAstTransformer.js";
|
|
5
|
-
export declare function transformPropertyShapeToAstObjectTypeProperty(this: ShapesGraphToAstTransformer, { objectType, propertyShape, }: {
|
|
6
|
-
objectType: ast.ObjectType;
|
|
7
|
-
propertyShape: input.PropertyShape;
|
|
8
|
-
}): Either<Error, ast.ObjectType.Property>;
|
|
9
|
-
//# sourceMappingURL=transformPropertyShapeToAstObjectTypeProperty.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AbstractLazyObjectType } from "./AbstractLazyObjectType.js";
|
|
2
|
-
import type { OptionType } from "./OptionType.js";
|
|
3
|
-
export declare class LazyObjectOptionType extends AbstractLazyObjectType<OptionType<AbstractLazyObjectType.ObjectTypeConstraint>, OptionType<AbstractLazyObjectType.ObjectTypeConstraint>> {
|
|
4
|
-
readonly kind = "LazyObjectOption";
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=LazyObjectOptionType.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AbstractLazyObjectType } from "./AbstractLazyObjectType.js";
|
|
2
|
-
import type { SetType } from "./SetType.js";
|
|
3
|
-
export declare class LazyObjectSetType extends AbstractLazyObjectType<SetType<AbstractLazyObjectType.ObjectTypeConstraint>, SetType<AbstractLazyObjectType.ObjectTypeConstraint>> {
|
|
4
|
-
readonly kind = "LazyObjectSet";
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=LazyObjectSetType.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AbstractLazyObjectType } from "./AbstractLazyObjectType.js";
|
|
2
|
-
export declare class LazyObjectType extends AbstractLazyObjectType<AbstractLazyObjectType.ObjectTypeConstraint, AbstractLazyObjectType.ObjectTypeConstraint> {
|
|
3
|
-
readonly kind = "LazyObject";
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=LazyObjectType.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BlankNodeType } from "./BlankNodeType.js";
|
|
2
|
-
import { IdentifierType } from "./IdentifierType.js";
|
|
3
|
-
import { IriType } from "./IriType.js";
|
|
4
|
-
import type { ObjectIntersectionType } from "./ObjectIntersectionType.js";
|
|
5
|
-
import type { ObjectType } from "./ObjectType.js";
|
|
6
|
-
import type { ObjectUnionType } from "./ObjectUnionType.js";
|
|
7
|
-
export type ObjectCompoundType = ObjectIntersectionType | ObjectUnionType;
|
|
8
|
-
export declare namespace ObjectCompoundType {
|
|
9
|
-
function identifierType(objectCompoundType: ObjectCompoundType): BlankNodeType | IdentifierType | IriType;
|
|
10
|
-
function memberObjectTypes(objectCompoundType: ObjectCompoundType): readonly ObjectType[];
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=ObjectCompoundType.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { AbstractLazyObjectType } from "./AbstractLazyObjectType.js";
|
|
3
|
-
import type { SetType } from "./SetType.js";
|
|
4
|
-
import { type Code } from "./ts-poet-wrapper.js";
|
|
5
|
-
export declare class LazyObjectSetType extends AbstractLazyObjectType<SetType<AbstractLazyObjectType.ObjectTypeConstraint>, SetType<AbstractLazyObjectType.ObjectTypeConstraint>> {
|
|
6
|
-
readonly graphqlArgs: Super["graphqlArgs"];
|
|
7
|
-
readonly kind = "LazyObjectSet";
|
|
8
|
-
get conversionFunction(): Maybe<AbstractLazyObjectType.ConversionFunction>;
|
|
9
|
-
protected get runtimeClass(): {
|
|
10
|
-
name: Code;
|
|
11
|
-
partialPropertyName: string;
|
|
12
|
-
rawName: Code;
|
|
13
|
-
};
|
|
14
|
-
fromJsonExpression(parameters: Parameters<Super["fromJsonExpression"]>[0]): Code;
|
|
15
|
-
fromRdfResourceValuesExpression(parameters: Parameters<Super["fromRdfResourceValuesExpression"]>[0]): Code;
|
|
16
|
-
graphqlResolveExpression({ variables, }: Parameters<Super["graphqlResolveExpression"]>[0]): Code;
|
|
17
|
-
}
|
|
18
|
-
type Super = AbstractLazyObjectType<SetType<AbstractLazyObjectType.ObjectTypeConstraint>, SetType<AbstractLazyObjectType.ObjectTypeConstraint>>;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=LazyObjectSetType.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { AbstractLazyObjectType } from "./AbstractLazyObjectType.js";
|
|
3
|
-
import { type Code } from "./ts-poet-wrapper.js";
|
|
4
|
-
export declare class LazyObjectType extends AbstractLazyObjectType<AbstractLazyObjectType.ObjectTypeConstraint, AbstractLazyObjectType.ObjectTypeConstraint> {
|
|
5
|
-
readonly graphqlArgs: Super["graphqlArgs"];
|
|
6
|
-
readonly kind = "LazyObject";
|
|
7
|
-
get conversionFunction(): Maybe<AbstractLazyObjectType.ConversionFunction>;
|
|
8
|
-
protected get runtimeClass(): {
|
|
9
|
-
name: Code;
|
|
10
|
-
partialPropertyName: string;
|
|
11
|
-
rawName: Code;
|
|
12
|
-
};
|
|
13
|
-
fromJsonExpression(parameters: Parameters<Super["fromJsonExpression"]>[0]): Code;
|
|
14
|
-
fromRdfResourceValuesExpression(parameters: Parameters<Super["fromRdfResourceValuesExpression"]>[0]): Code;
|
|
15
|
-
graphqlResolveExpression({ variables, }: Parameters<Super["graphqlResolveExpression"]>[0]): Code;
|
|
16
|
-
}
|
|
17
|
-
type Super = AbstractLazyObjectType<AbstractLazyObjectType.ObjectTypeConstraint, AbstractLazyObjectType.ObjectTypeConstraint>;
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=LazyObjectType.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_createFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_createFunctionDeclaration.d.ts.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { invariant } from "ts-invariant";
|
|
3
|
-
import { code, joinCode, literalOf } from "../ts-poet-wrapper.js";
|
|
4
|
-
export function ObjectType_createFunctionDeclaration() {
|
|
5
|
-
if (!this.configuration.features.has("Object.create")) {
|
|
6
|
-
return Maybe.empty();
|
|
7
|
-
}
|
|
8
|
-
const parametersPropertySignatures = this.properties.flatMap((property) => property.constructorParameter.toList());
|
|
9
|
-
const parametersType = parametersPropertySignatures.length > 0
|
|
10
|
-
? code `{ ${joinCode(parametersPropertySignatures)} }`
|
|
11
|
-
: code `object`;
|
|
12
|
-
const parametersHasQuestionToken = parametersPropertySignatures.every((propertySignature) => propertySignature.toCodeString([]).indexOf("?:") !== -1);
|
|
13
|
-
const parametersVariable = code `parameters${parametersHasQuestionToken ? "?" : ""}`;
|
|
14
|
-
const parametersSignature = code `parameters${parametersHasQuestionToken ? "?" : ""}: ${parametersType}`;
|
|
15
|
-
const propertyInitializers = this.properties.flatMap((property) => property
|
|
16
|
-
.constructorInitializer({
|
|
17
|
-
variables: { parameters: parametersVariable },
|
|
18
|
-
})
|
|
19
|
-
.toList());
|
|
20
|
-
invariant(propertyInitializers.length > 0);
|
|
21
|
-
let returnExpression = code `${this.reusables.snippets.sequenceRecord}({ ${joinCode(propertyInitializers, { on: "," })} })`;
|
|
22
|
-
this.discriminantProperty.ifJust((discriminantProperty) => {
|
|
23
|
-
returnExpression = code `${returnExpression}.map(properties => ({ ...properties, ${discriminantProperty.name}: ${literalOf(discriminantProperty.value)} as const }))`;
|
|
24
|
-
});
|
|
25
|
-
const monkeyPatchMethods = [];
|
|
26
|
-
if (this.configuration.features.has("Object.toJson")) {
|
|
27
|
-
monkeyPatchMethods.push("toJson");
|
|
28
|
-
}
|
|
29
|
-
if (this.configuration.features.has("Object.toString")) {
|
|
30
|
-
monkeyPatchMethods.push(`${this.configuration.syntheticNamePrefix}toString`);
|
|
31
|
-
}
|
|
32
|
-
if (monkeyPatchMethods.length > 0) {
|
|
33
|
-
returnExpression = code `${returnExpression}.map(object => ${this.reusables.snippets.monkeyPatchObject}(object, { ${monkeyPatchMethods.join(", ")} }))`;
|
|
34
|
-
}
|
|
35
|
-
return Maybe.of(code `\
|
|
36
|
-
export function create(${parametersSignature}): ${this.reusables.imports.Either}<Error, ${this.expression}> {
|
|
37
|
-
return ${returnExpression};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function createUnsafe(${parametersSignature}): ${this.expression} {
|
|
41
|
-
return create(parameters).unsafeCoerce();
|
|
42
|
-
}`);
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=ObjectType_createFunctionDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_equalsFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_equalsFunctionDeclaration.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_filterFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_filterFunctionDeclaration.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_filterFunctionDeclaration() {
|
|
4
|
-
if (!this.configuration.features.has("Object.filter")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
const statements = [];
|
|
8
|
-
if (this.properties.length > 0) {
|
|
9
|
-
for (const property of this.properties) {
|
|
10
|
-
property.filterProperty.ifJust(({ name }) => {
|
|
11
|
-
statements.push(code `if (filter.${name} !== undefined && !${property.type.filterFunction}(filter.${name}, ${property.accessExpression({ variables: { object: code `value` } })})) { return false; }`);
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
statements.push(code `return true;`);
|
|
16
|
-
return Maybe.of(code `\
|
|
17
|
-
export function filter(filter: ${this.filterType}, value: ${this.expression}): boolean {
|
|
18
|
-
${joinCode(statements)}
|
|
19
|
-
}`);
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=ObjectType_filterFunctionDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_filterTypeDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_filterTypeDeclaration.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_fromJsonFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_fromJsonFunctionDeclaration.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { invariant } from "ts-invariant";
|
|
3
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
4
|
-
export function ObjectType_fromJsonFunctionDeclaration() {
|
|
5
|
-
if (!this.configuration.features.has("Object.fromJson")) {
|
|
6
|
-
return Maybe.empty();
|
|
7
|
-
}
|
|
8
|
-
const variables = {
|
|
9
|
-
jsonObject: code `${this.configuration.syntheticNamePrefix}json`,
|
|
10
|
-
};
|
|
11
|
-
const propertyInitializers = this.properties.flatMap((property) => property.fromJsonInitializer({ variables }).toList());
|
|
12
|
-
invariant(propertyInitializers.length > 0);
|
|
13
|
-
return Maybe.of(code `\
|
|
14
|
-
export function fromJson(${variables.jsonObject}: ${this.jsonType().expression}): ${this.reusables.imports.Either}<Error, ${this.expression}> {
|
|
15
|
-
return ${this.reusables.snippets.sequenceRecord}({ ${joinCode(propertyInitializers, { on: "," })} }).chain(create);
|
|
16
|
-
}`);
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=ObjectType_fromJsonFunctionDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_fromRdfResourceFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_fromRdfResourceFunctionDeclaration.d.ts.map
|
package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_fromRdfResourceValuesFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts.map
|
package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_fromRdfResourceValuesFunctionDeclaration() {
|
|
4
|
-
if (!this.configuration.features.has("Object.fromRdf")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
return Maybe.of(code `\
|
|
8
|
-
export const fromRdfResourceValues: ${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.alias.unsafeCoerce()}> = (values, options) =>
|
|
9
|
-
values.chain(
|
|
10
|
-
values => values.chainMap(
|
|
11
|
-
value => value.toResource().chain(resource => ${this.alias.unsafeCoerce()}.fromRdfResource(resource, options))
|
|
12
|
-
)
|
|
13
|
-
);`);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=ObjectType_fromRdfResourceValuesFunctionDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_fromRdfTypeVariableStatement(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_fromRdfTypeVariableStatement.d.ts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_fromRdfTypeVariableStatement() {
|
|
4
|
-
if (!this.configuration.features.has("Object.fromRdf")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
return this.fromRdfType.map((fromRdfType) => code `\
|
|
8
|
-
export const fromRdfType: ${this.reusables.imports.NamedNode}<string> = ${this.rdfjsTermExpression(fromRdfType)};`);
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=ObjectType_fromRdfTypeVariableStatement.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_graphqlTypeVariableStatement(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_graphqlTypeVariableStatement.d.ts.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
2
|
-
const hasherVariable = code `hasher`;
|
|
3
|
-
export function ObjectType_hashFunctionDeclarations() {
|
|
4
|
-
if (!this.configuration.features.has("Object.hash")) {
|
|
5
|
-
return [];
|
|
6
|
-
}
|
|
7
|
-
return [
|
|
8
|
-
code `\
|
|
9
|
-
export function hash<HasherT extends ${this.reusables.snippets.Hasher}>(${hasherVariable}: HasherT, ${this.thisVariable}: ${this.expression}): HasherT {
|
|
10
|
-
${joinCode([
|
|
11
|
-
code `${this.alias.unsafeCoerce()}.hashShaclProperties(${hasherVariable}, ${this.thisVariable});`,
|
|
12
|
-
...this.properties
|
|
13
|
-
.filter((property) => property.kind !== "Shacl")
|
|
14
|
-
.flatMap((property) => property.hashStatements({
|
|
15
|
-
variables: {
|
|
16
|
-
hasher: hasherVariable,
|
|
17
|
-
value: code `${property.accessExpression({ variables: { object: this.thisVariable } })}`,
|
|
18
|
-
},
|
|
19
|
-
})),
|
|
20
|
-
code `return ${hasherVariable};`,
|
|
21
|
-
])}
|
|
22
|
-
}`,
|
|
23
|
-
code `\
|
|
24
|
-
export function hashShaclProperties<HasherT extends ${this.reusables.snippets.Hasher}>(${hasherVariable}: HasherT, ${this.thisVariable}: ${this.expression}): HasherT {
|
|
25
|
-
${joinCode([
|
|
26
|
-
...this.properties.flatMap((property) => property.kind === "Shacl"
|
|
27
|
-
? property.hashStatements({
|
|
28
|
-
variables: {
|
|
29
|
-
hasher: hasherVariable,
|
|
30
|
-
value: property.accessExpression({
|
|
31
|
-
variables: { object: this.thisVariable },
|
|
32
|
-
}),
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
: []),
|
|
36
|
-
code `return ${hasherVariable};`,
|
|
37
|
-
])}
|
|
38
|
-
}`,
|
|
39
|
-
];
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=ObjectType_hashFunctionDeclarations.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
2
|
-
import { tsComment } from "../tsComment.js";
|
|
3
|
-
export function ObjectType_interfaceDeclaration() {
|
|
4
|
-
return code `\
|
|
5
|
-
${this.comment
|
|
6
|
-
.alt(this.label)
|
|
7
|
-
.map(tsComment)
|
|
8
|
-
.orDefault("")}export interface ${this.alias.unsafeCoerce()} {
|
|
9
|
-
${joinCode(this.properties.map((property) => property.declaration), { on: "\n\n" })}
|
|
10
|
-
}`;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=ObjectType_interfaceDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_jsonSchemaFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_jsonSchemaFunctionDeclaration.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_jsonTypeAliasDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_jsonTypeAliasDeclaration.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_jsonTypeAliasDeclaration() {
|
|
4
|
-
if (!this.configuration.features.has("Object.JSON.type")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
return Maybe.of(code `export type Json = { ${joinCode(this.properties.flatMap((property) => property.jsonSignature.toList()), { on: ";" })} }`);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=ObjectType_jsonTypeAliasDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_jsonUiSchemaFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_jsonUiSchemaFunctionDeclaration.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_jsonUiSchemaFunctionDeclaration() {
|
|
4
|
-
if (!this.configuration.features.has("Object.JSON.uiSchema")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
const variables = { scopePrefix: code `scopePrefix` };
|
|
8
|
-
const elements = this.properties.flatMap((property) => property.jsonUiSchemaElement({ variables }).toList());
|
|
9
|
-
return Maybe.of(code `\
|
|
10
|
-
export function uiSchema(parameters?: { scopePrefix?: string }): any {
|
|
11
|
-
const scopePrefix = parameters?.scopePrefix ?? "#";
|
|
12
|
-
return { "elements": [ ${joinCode(elements, { on: "," })} ], label: "${this.label.orDefault(this.alias.unsafeCoerce())}", type: "Group" };
|
|
13
|
-
}`);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=ObjectType_jsonUiSchemaFunctionDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_schemaVariableStatement(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_schemaVariableStatement.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_schemaVariableStatement() {
|
|
4
|
-
if (!this.configuration.features.has("Object.schema")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
return Maybe.of(code `\
|
|
8
|
-
export const schema = { properties: { ${joinCode(this.properties.flatMap((property) => property.schema
|
|
9
|
-
.toList()
|
|
10
|
-
.map((propertySchema) => code `${property.name}: ${propertySchema}`)), { on: ", " })} } } as const;`);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=ObjectType_schemaVariableStatement.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_toJsonFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_toJsonFunctionDeclaration.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_toJsonFunctionDeclaration() {
|
|
4
|
-
if (!this.configuration.features.has("Object.toJson")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
return Maybe.of(code `\
|
|
8
|
-
export function toJson(${this.thisVariable}: ${this.expression}): ${this.jsonType().expression} {
|
|
9
|
-
return JSON.parse(JSON.stringify({ ${joinCode(this.properties.flatMap((property) => property
|
|
10
|
-
.toJsonInitializer({
|
|
11
|
-
variables: {
|
|
12
|
-
value: property.accessExpression({
|
|
13
|
-
variables: { object: this.thisVariable },
|
|
14
|
-
}),
|
|
15
|
-
},
|
|
16
|
-
})
|
|
17
|
-
.toList()), { on: "," })} } satisfies ${this.jsonType().expression}));
|
|
18
|
-
}`);
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=ObjectType_toJsonFunctionDeclaration.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
3
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
|
-
export declare function ObjectType_toRdfResourceFunctionDeclaration(this: ObjectType): Maybe<Code>;
|
|
5
|
-
//# sourceMappingURL=ObjectType_toRdfResourceFunctionDeclaration.d.ts.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ObjectType } from "../ObjectType.js";
|
|
2
|
-
import { type Code } from "../ts-poet-wrapper.js";
|
|
3
|
-
export declare function ObjectType_toStringFunctionDeclarations(this: ObjectType): readonly Code[];
|
|
4
|
-
//# sourceMappingURL=ObjectType_toStringFunctionDeclarations.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
2
|
-
export function ObjectType_toStringFunctionDeclarations() {
|
|
3
|
-
if (!this.configuration.features.has("Object.toString")) {
|
|
4
|
-
return [];
|
|
5
|
-
}
|
|
6
|
-
const propertiesToStringsReturnExpression = code `${this.reusables.snippets.compactRecord}({${joinCode(this.properties.flatMap((property) => property
|
|
7
|
-
.toStringInitializer({
|
|
8
|
-
variables: {
|
|
9
|
-
value: property.accessExpression({
|
|
10
|
-
variables: { object: this.thisVariable },
|
|
11
|
-
}),
|
|
12
|
-
},
|
|
13
|
-
})
|
|
14
|
-
.toList()), { on: "," })}})`;
|
|
15
|
-
const toStringReturnExpression = (propertiesToStrings) => code `\`${this.alias.unsafeCoerce()}(\${JSON.stringify(${propertiesToStrings})})\``;
|
|
16
|
-
const syntheticNamePrefix = this.configuration.syntheticNamePrefix;
|
|
17
|
-
return [
|
|
18
|
-
// Use overloads to allow the function to be attached to an instance or used freestanding
|
|
19
|
-
code `\
|
|
20
|
-
export function _propertiesToStrings(${this.thisVariable}: ${this.expression}): Record<string, string> {
|
|
21
|
-
return ${propertiesToStringsReturnExpression};
|
|
22
|
-
}`,
|
|
23
|
-
code `\
|
|
24
|
-
export function ${syntheticNamePrefix}toString(${this.thisVariable}: ${this.expression}): string {
|
|
25
|
-
return ${toStringReturnExpression(code `_propertiesToStrings(${this.thisVariable})`)};
|
|
26
|
-
}`,
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=ObjectType_toStringFunctionDeclarations.js.map
|
package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_valueSparqlConstructTriplesFunctionDeclaration() {
|
|
4
|
-
if (!this.configuration.features.has("Object.SPARQL")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
return Maybe.of(code `\
|
|
8
|
-
export const valueSparqlConstructTriples: ${this.reusables.snippets.ValueSparqlConstructTriplesFunction}<${this.filterType}, ${this.schemaType}> = ({ filter, ignoreRdfType, valueVariable, variablePrefix }) =>
|
|
9
|
-
${this.alias.unsafeCoerce()}.focusSparqlConstructTriples({ filter, focusIdentifier: valueVariable, ignoreRdfType, variablePrefix });`);
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js.map
|
package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Maybe } from "purify-ts";
|
|
2
|
-
import { code } from "../ts-poet-wrapper.js";
|
|
3
|
-
export function ObjectType_valueSparqlWherePatternsFunctionDeclaration() {
|
|
4
|
-
if (!this.configuration.features.has("Object.SPARQL")) {
|
|
5
|
-
return Maybe.empty();
|
|
6
|
-
}
|
|
7
|
-
return Maybe.of(code `\
|
|
8
|
-
export const valueSparqlWherePatterns: ${this.reusables.snippets.ValueSparqlWherePatternsFunction}<${this.filterType}, ${this.schemaType}> = ({ filter, ignoreRdfType, preferredLanguages, propertyPatterns, valueVariable, variablePrefix }) =>
|
|
9
|
-
(propertyPatterns as readonly ${this.reusables.snippets.SparqlPattern}[]).concat(
|
|
10
|
-
${this.alias.unsafeCoerce()}.focusSparqlWherePatterns({ filter, focusIdentifier: valueVariable, ignoreRdfType, preferredLanguages, variablePrefix })
|
|
11
|
-
);`);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=ObjectType_valueSparqlWherePatternsFunctionDeclaration.js.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
-
export const snippets_LazyObject = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}LazyObject`, code `\
|
|
3
|
-
/**
|
|
4
|
-
* Type of lazy properties that return a single required object. This is a class instead of an interface so it can be instanceof'd elsewhere.
|
|
5
|
-
*/
|
|
6
|
-
export class ${syntheticNamePrefix}LazyObject<ObjectIdentifierT extends ${imports.BlankNode} | ${imports.NamedNode}, PartialObjectT extends { ${syntheticNamePrefix}identifier: () => ObjectIdentifierT }, ResolvedObjectT extends { ${syntheticNamePrefix}identifier: () => ObjectIdentifierT }> {
|
|
7
|
-
readonly partial: PartialObjectT;
|
|
8
|
-
private readonly resolver: (identifier: ObjectIdentifierT, options?: { preferredLanguages?: readonly string[] }) => Promise<${imports.Either}<Error, ResolvedObjectT>>;
|
|
9
|
-
|
|
10
|
-
constructor({ partial, resolver }: {
|
|
11
|
-
partial: PartialObjectT
|
|
12
|
-
resolver: (identifier: ObjectIdentifierT, options?: { preferredLanguages?: readonly string[] }) => Promise<${imports.Either}<Error, ResolvedObjectT>>,
|
|
13
|
-
}) {
|
|
14
|
-
this.partial = partial;
|
|
15
|
-
this.resolver = resolver;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
resolve(options?: { preferredLanguages?: readonly string[] }): Promise<${imports.Either}<Error, ResolvedObjectT>> {
|
|
19
|
-
return this.resolver(this.partial.${syntheticNamePrefix}identifier(), options);
|
|
20
|
-
}
|
|
21
|
-
}`);
|
|
22
|
-
//# sourceMappingURL=snippets_LazyObject.js.map
|