@shaclmate/compiler 2.0.22 → 2.0.23

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.
Files changed (172) hide show
  1. package/dist/ShapesGraphToAstTransformer.d.ts +1 -0
  2. package/dist/ShapesGraphToAstTransformer.js +56 -12
  3. package/dist/_ShapesGraphToAstTransformer/flattenAstObjectCompositeTypeMemberTypes.d.ts +13 -0
  4. package/dist/_ShapesGraphToAstTransformer/flattenAstObjectCompositeTypeMemberTypes.js +51 -0
  5. package/dist/_ShapesGraphToAstTransformer/shapeAstName.js +53 -12
  6. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +5 -0
  7. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +130 -54
  8. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.d.ts +2 -3
  9. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.js +122 -129
  10. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.d.ts +2 -2
  11. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.d.ts +2 -2
  12. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +127 -5
  13. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.d.ts +3 -3
  14. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.d.ts +2 -3
  15. package/dist/ast/Ast.d.ts +0 -1
  16. package/dist/ast/Curie.d.ts +14 -0
  17. package/dist/ast/Curie.js +21 -0
  18. package/dist/ast/IdentifierType.d.ts +3 -2
  19. package/dist/ast/ListType.d.ts +2 -1
  20. package/dist/ast/LiteralType.d.ts +1 -1
  21. package/dist/ast/Name.d.ts +40 -5
  22. package/dist/ast/ObjectCompositeType.d.ts +11 -0
  23. package/dist/ast/ObjectType.d.ts +18 -13
  24. package/dist/ast/ObjectUnionType.d.ts +0 -11
  25. package/dist/ast/OptionType.d.ts +2 -2
  26. package/dist/ast/SetType.d.ts +2 -2
  27. package/dist/ast/TermType.d.ts +12 -4
  28. package/dist/ast/Type.d.ts +1 -1
  29. package/dist/enums/TsFeature.d.ts +1 -4
  30. package/dist/enums/TsFeature.js +1 -15
  31. package/dist/generators/json/AstJsonGenerator.js +19 -3
  32. package/dist/generators/ts/BooleanType.d.ts +3 -1
  33. package/dist/generators/ts/BooleanType.js +11 -2
  34. package/dist/generators/ts/DateTimeType.d.ts +8 -7
  35. package/dist/generators/ts/DateTimeType.js +31 -7
  36. package/dist/generators/ts/DateType.d.ts +5 -2
  37. package/dist/generators/ts/DateType.js +15 -1
  38. package/dist/generators/ts/DeclaredType.d.ts +2 -2
  39. package/dist/generators/ts/DeclaredType.js +2 -2
  40. package/dist/generators/ts/FloatType.d.ts +6 -0
  41. package/dist/generators/ts/FloatType.js +18 -0
  42. package/dist/generators/ts/IdentifierType.d.ts +12 -7
  43. package/dist/generators/ts/IdentifierType.js +94 -6
  44. package/dist/generators/ts/Import.d.ts +2 -0
  45. package/dist/generators/ts/Import.js +10 -0
  46. package/dist/generators/ts/IntType.d.ts +6 -0
  47. package/dist/generators/ts/IntType.js +18 -0
  48. package/dist/generators/ts/ListType.d.ts +15 -12
  49. package/dist/generators/ts/ListType.js +98 -57
  50. package/dist/generators/ts/LiteralType.d.ts +10 -9
  51. package/dist/generators/ts/LiteralType.js +13 -2
  52. package/dist/generators/ts/NumberType.d.ts +2 -1
  53. package/dist/generators/ts/NumberType.js +7 -2
  54. package/dist/generators/ts/ObjectType.d.ts +66 -43
  55. package/dist/generators/ts/ObjectType.js +144 -123
  56. package/dist/generators/ts/ObjectUnionType.d.ts +49 -8
  57. package/dist/generators/ts/ObjectUnionType.js +290 -97
  58. package/dist/generators/ts/OptionType.d.ts +14 -10
  59. package/dist/generators/ts/OptionType.js +60 -34
  60. package/dist/generators/ts/PrimitiveType.d.ts +4 -4
  61. package/dist/generators/ts/PrimitiveType.js +18 -3
  62. package/dist/generators/ts/SetType.d.ts +16 -12
  63. package/dist/generators/ts/SetType.js +69 -40
  64. package/dist/generators/ts/SnippetDeclarations.d.ts +13 -8
  65. package/dist/generators/ts/SnippetDeclarations.js +215 -101
  66. package/dist/generators/ts/StringType.d.ts +3 -1
  67. package/dist/generators/ts/StringType.js +14 -2
  68. package/dist/generators/ts/TermType.d.ts +22 -14
  69. package/dist/generators/ts/TermType.js +53 -25
  70. package/dist/generators/ts/TsGenerator.d.ts +2 -1
  71. package/dist/generators/ts/TsGenerator.js +23 -12
  72. package/dist/generators/ts/Type.d.ts +89 -31
  73. package/dist/generators/ts/Type.js +57 -54
  74. package/dist/generators/ts/TypeFactory.d.ts +4 -5
  75. package/dist/generators/ts/TypeFactory.js +290 -226
  76. package/dist/generators/ts/UnionType.d.ts +14 -10
  77. package/dist/generators/ts/UnionType.js +319 -142
  78. package/dist/generators/ts/_ObjectType/EagerShaclProperty.d.ts +12 -0
  79. package/dist/generators/ts/_ObjectType/EagerShaclProperty.js +30 -0
  80. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.d.ts +13 -12
  81. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.js +46 -47
  82. package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +20 -13
  83. package/dist/generators/ts/_ObjectType/IdentifierProperty.js +152 -124
  84. package/dist/generators/ts/_ObjectType/LazyShaclProperty.d.ts +87 -0
  85. package/dist/generators/ts/_ObjectType/LazyShaclProperty.js +237 -0
  86. package/dist/generators/ts/_ObjectType/Property.d.ts +39 -44
  87. package/dist/generators/ts/_ObjectType/Property.js +1 -10
  88. package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +25 -30
  89. package/dist/generators/ts/_ObjectType/ShaclProperty.js +108 -85
  90. package/dist/generators/ts/_ObjectType/TypeDiscriminatorProperty.d.ts +21 -17
  91. package/dist/generators/ts/_ObjectType/TypeDiscriminatorProperty.js +61 -53
  92. package/dist/generators/ts/_ObjectType/classDeclaration.js +6 -5
  93. package/dist/generators/ts/_ObjectType/createFunctionDeclaration.js +5 -4
  94. package/dist/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.js +5 -4
  95. package/dist/generators/ts/_ObjectType/fromRdfTypeVariableStatement.d.ts +1 -1
  96. package/dist/generators/ts/_ObjectType/fromRdfTypeVariableStatement.js +8 -5
  97. package/dist/generators/ts/_ObjectType/graphqlTypeVariableStatement.d.ts +5 -0
  98. package/dist/generators/ts/_ObjectType/graphqlTypeVariableStatement.js +37 -0
  99. package/dist/generators/ts/_ObjectType/hashFunctionOrMethodDeclarations.js +7 -8
  100. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +7 -0
  101. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.js +54 -0
  102. package/dist/generators/ts/_ObjectType/index.d.ts +9 -7
  103. package/dist/generators/ts/_ObjectType/index.js +9 -7
  104. package/dist/generators/ts/_ObjectType/interfaceDeclaration.js +1 -1
  105. package/dist/generators/ts/_ObjectType/jsonFunctionDeclarations.d.ts +4 -0
  106. package/dist/generators/ts/_ObjectType/jsonFunctionDeclarations.js +189 -0
  107. package/dist/generators/ts/_ObjectType/jsonTypeAliasDeclaration.d.ts +5 -0
  108. package/dist/generators/ts/_ObjectType/jsonTypeAliasDeclaration.js +28 -0
  109. package/dist/generators/ts/_ObjectType/objectSetMethodNames.d.ts +9 -0
  110. package/dist/generators/ts/_ObjectType/objectSetMethodNames.js +18 -0
  111. package/dist/generators/ts/_ObjectType/propertiesVariableStatement.d.ts +5 -0
  112. package/dist/generators/ts/_ObjectType/propertiesVariableStatement.js +37 -0
  113. package/dist/generators/ts/_ObjectType/rdfFunctionDeclarations.d.ts +4 -0
  114. package/dist/generators/ts/_ObjectType/rdfFunctionDeclarations.js +152 -0
  115. package/dist/generators/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.d.ts +1 -1
  116. package/dist/generators/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.js +4 -3
  117. package/dist/generators/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.d.ts +1 -1
  118. package/dist/generators/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.js +3 -2
  119. package/dist/generators/ts/_ObjectType/sparqlFunctionDeclarations.js +103 -35
  120. package/dist/generators/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.js +6 -6
  121. package/dist/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.js +15 -13
  122. package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +9 -0
  123. package/dist/generators/ts/graphqlSchemaVariableStatement.js +86 -0
  124. package/dist/generators/ts/objectSetDeclarations.d.ts +8 -0
  125. package/dist/generators/ts/objectSetDeclarations.js +59 -0
  126. package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +8 -0
  127. package/dist/generators/ts/objectSetInterfaceDeclaration.js +46 -0
  128. package/dist/generators/ts/objectSetMethodSignatures.d.ts +11 -0
  129. package/dist/generators/ts/objectSetMethodSignatures.js +52 -0
  130. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +8 -0
  131. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +393 -0
  132. package/dist/generators/ts/rdfjsTermExpression.d.ts +3 -0
  133. package/dist/generators/ts/rdfjsTermExpression.js +57 -0
  134. package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +8 -0
  135. package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +415 -0
  136. package/dist/generators/ts/syntheticNamePrefix.d.ts +2 -0
  137. package/dist/generators/ts/syntheticNamePrefix.js +2 -0
  138. package/dist/generators/ts/tsName.js +27 -13
  139. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.d.ts +10 -0
  140. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.js +19 -0
  141. package/dist/input/NodeShape.d.ts +6 -8
  142. package/dist/input/NodeShape.js +20 -44
  143. package/dist/input/Ontology.d.ts +0 -3
  144. package/dist/input/Ontology.js +0 -9
  145. package/dist/input/PropertyPath.d.ts +6 -5
  146. package/dist/input/PropertyPath.js +14 -22
  147. package/dist/input/PropertyShape.d.ts +3 -1
  148. package/dist/input/PropertyShape.js +8 -2
  149. package/dist/input/ShapesGraph.js +4 -4
  150. package/dist/input/generated.d.ts +923 -105
  151. package/dist/input/generated.js +1865 -969
  152. package/dist/input/tsFeatures.d.ts +3 -2
  153. package/dist/input/tsFeatures.js +44 -27
  154. package/package.json +18 -16
  155. package/dist/generators/ts/_ObjectType/fromJsonFunctionDeclarations.d.ts +0 -4
  156. package/dist/generators/ts/_ObjectType/fromJsonFunctionDeclarations.js +0 -78
  157. package/dist/generators/ts/_ObjectType/fromRdfFunctionDeclarations.d.ts +0 -4
  158. package/dist/generators/ts/_ObjectType/fromRdfFunctionDeclarations.js +0 -91
  159. package/dist/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.d.ts +0 -5
  160. package/dist/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.js +0 -19
  161. package/dist/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.d.ts +0 -5
  162. package/dist/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.js +0 -31
  163. package/dist/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.d.ts +0 -5
  164. package/dist/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.js +0 -37
  165. package/dist/generators/ts/_ObjectType/rdfjsTermExpression.d.ts +0 -6
  166. package/dist/generators/ts/_ObjectType/rdfjsTermExpression.js +0 -17
  167. package/dist/generators/ts/_ObjectType/toJsonFunctionDeclaration.d.ts +0 -5
  168. package/dist/generators/ts/_ObjectType/toJsonFunctionDeclaration.js +0 -19
  169. package/dist/generators/ts/_ObjectType/toJsonReturnType.d.ts +0 -3
  170. package/dist/generators/ts/_ObjectType/toJsonReturnType.js +0 -17
  171. package/dist/generators/ts/_ObjectType/toRdfFunctionDeclaration.d.ts +0 -5
  172. package/dist/generators/ts/_ObjectType/toRdfFunctionDeclaration.js +0 -19
@@ -1,5 +1,13 @@
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
+ };
1
7
  import { xsd } from "@tpluscode/rdf-ns-builders";
8
+ import { Memoize } from "typescript-memoize";
2
9
  import { TermType } from "./TermType.js";
10
+ import { Type } from "./Type.js";
3
11
  export class LiteralType extends TermType {
4
12
  languageIn;
5
13
  constructor({ languageIn, ...superParameters }) {
@@ -10,10 +18,10 @@ export class LiteralType extends TermType {
10
18
  this.languageIn = languageIn;
11
19
  }
12
20
  get jsonName() {
13
- return '{ readonly "@language": string | undefined, readonly "@type": string | undefined, readonly "@value": string }';
21
+ return new Type.JsonName('{ readonly "@language"?: string, readonly "@type"?: string, readonly "@value": string }');
14
22
  }
15
23
  fromJsonExpression({ variables, }) {
16
- return `${this.dataFactoryVariable}.literal(${variables.value}["@value"], typeof ${variables.value}["@language"] !== "undefined" ? ${variables.value}["@language"] : (typeof ${variables.value}["@type"] !== "undefined" ? dataFactory.namedNode(${variables.value}["@type"]) : undefined))`;
24
+ return `dataFactory.literal(${variables.value}["@value"], typeof ${variables.value}["@language"] !== "undefined" ? ${variables.value}["@language"] : (typeof ${variables.value}["@type"] !== "undefined" ? dataFactory.namedNode(${variables.value}["@type"]) : undefined))`;
17
25
  }
18
26
  hashStatements({ depth, variables, }) {
19
27
  return [
@@ -44,4 +52,7 @@ export class LiteralType extends TermType {
44
52
  })`;
45
53
  }
46
54
  }
55
+ __decorate([
56
+ Memoize()
57
+ ], LiteralType.prototype, "jsonName", null);
47
58
  //# sourceMappingURL=LiteralType.js.map
@@ -1,7 +1,8 @@
1
1
  import { PrimitiveType } from "./PrimitiveType.js";
2
2
  import type { Type } from "./Type.js";
3
- export declare class NumberType extends PrimitiveType<number> {
3
+ export declare abstract class NumberType extends PrimitiveType<number> {
4
4
  readonly kind = "NumberType";
5
+ readonly typeof = "number";
5
6
  get conversions(): readonly Type.Conversion[];
6
7
  get name(): string;
7
8
  jsonZodSchema({ variables, }: Parameters<Type["jsonZodSchema"]>[0]): ReturnType<Type["jsonZodSchema"]>;
@@ -9,6 +9,7 @@ import { PrimitiveType } from "./PrimitiveType.js";
9
9
  import { objectInitializer } from "./objectInitializer.js";
10
10
  export class NumberType extends PrimitiveType {
11
11
  kind = "NumberType";
12
+ typeof = "number";
12
13
  get conversions() {
13
14
  const conversions = [
14
15
  {
@@ -30,7 +31,7 @@ export class NumberType extends PrimitiveType {
30
31
  if (this.primitiveIn.length > 0) {
31
32
  return this.primitiveIn.map((value) => value.toString()).join(" | ");
32
33
  }
33
- return "number";
34
+ return this.typeof;
34
35
  }
35
36
  jsonZodSchema({ variables, }) {
36
37
  switch (this.primitiveIn.length) {
@@ -45,7 +46,8 @@ export class NumberType extends PrimitiveType {
45
46
  propertyFromRdfResourceValueExpression({ variables, }) {
46
47
  let expression = `${variables.resourceValue}.toNumber()`;
47
48
  if (this.primitiveIn.length > 0) {
48
- expression = `${expression}.chain(value => { switch (value) { ${this.primitiveIn.map((value) => `case ${value}:`).join(" ")} return purify.Either.of(value); default: return purify.Left(new rdfjsResource.Resource.MistypedValueError(${objectInitializer({ actualValue: "rdfLiteral.toRdf(value)", expectedValueType: JSON.stringify(this.name), focusResource: variables.resource, predicate: variables.predicate })})); } })`;
49
+ const eitherTypeParameters = `<Error, ${this.name}>`;
50
+ expression = `${expression}.chain(value => { switch (value) { ${this.primitiveIn.map((value) => `case ${value}:`).join(" ")} return purify.Either.of${eitherTypeParameters}(value); default: return purify.Left${eitherTypeParameters}(new rdfjsResource.Resource.MistypedValueError(${objectInitializer({ actualValue: "rdfLiteral.toRdf(value)", expectedValueType: JSON.stringify(this.name), focusResource: variables.resource, predicate: variables.predicate })})); } })`;
49
51
  }
50
52
  return expression;
51
53
  }
@@ -55,6 +57,9 @@ export class NumberType extends PrimitiveType {
55
57
  .orDefault(variables.value);
56
58
  }
57
59
  }
60
+ __decorate([
61
+ Memoize()
62
+ ], NumberType.prototype, "conversions", null);
58
63
  __decorate([
59
64
  Memoize()
60
65
  ], NumberType.prototype, "name", null);
@@ -1,44 +1,47 @@
1
1
  import type { NamedNode } from "@rdfjs/types";
2
2
  import { Maybe } from "purify-ts";
3
3
  import { type ClassDeclarationStructure, type InterfaceDeclarationStructure, type ModuleDeclarationStructure } from "ts-morph";
4
- import type { IdentifierMintingStrategy, TsFeature, TsObjectDeclarationType } from "../../enums/index.js";
4
+ import * as _ObjectType from "./_ObjectType/index.js";
5
+ import type { IdentifierMintingStrategy, TsObjectDeclarationType } from "../../enums/index.js";
5
6
  import { DeclaredType } from "./DeclaredType.js";
6
7
  import type { IdentifierType } from "./IdentifierType.js";
7
8
  import { Import } from "./Import.js";
8
- import type { Type } from "./Type.js";
9
- import * as _ObjectType from "./_ObjectType/index.js";
9
+ import { Type } from "./Type.js";
10
10
  export declare class ObjectType extends DeclaredType {
11
- readonly abstract: boolean;
12
- readonly declarationType: TsObjectDeclarationType;
13
- readonly kind = "ObjectType";
11
+ private readonly imports;
14
12
  protected readonly comment: Maybe<string>;
15
- protected readonly extern: boolean;
16
- protected readonly fromRdfType: Maybe<NamedNode>;
17
- protected readonly label: Maybe<string>;
18
13
  protected readonly identifierMintingStrategy: Maybe<IdentifierMintingStrategy>;
14
+ protected readonly label: Maybe<string>;
19
15
  protected readonly toRdfTypes: readonly NamedNode[];
20
- private readonly imports;
21
- private readonly lazyAncestorObjectTypes;
22
- private readonly lazyDescendantObjectTypes;
23
- private readonly lazyParentObjectTypes;
24
- private readonly lazyProperties;
25
- constructor({ abstract, comment, declarationType, extern, fromRdfType, label, lazyAncestorObjectTypes, lazyDescendantObjectTypes, lazyParentObjectTypes, lazyProperties, imports, identifierMintingStrategy, toRdfTypes, ...superParameters }: {
16
+ readonly abstract: boolean;
17
+ readonly declarationType: TsObjectDeclarationType;
18
+ readonly extern: boolean;
19
+ readonly fromRdfType: Maybe<NamedNode>;
20
+ readonly kind = "ObjectType";
21
+ readonly staticModuleName: string;
22
+ readonly synthetic: boolean;
23
+ readonly typeof = "object";
24
+ constructor({ abstract, comment, declarationType, extern, fromRdfType, imports, identifierMintingStrategy, label, lazyAncestorObjectTypes, lazyChildObjectTypes, lazyDescendantObjectTypes, lazyParentObjectTypes, lazyProperties, staticModuleName, synthetic, toRdfTypes, ...superParameters }: {
26
25
  abstract: boolean;
27
26
  comment: Maybe<string>;
28
27
  declarationType: TsObjectDeclarationType;
29
28
  extern: boolean;
30
29
  fromRdfType: Maybe<NamedNode>;
30
+ identifierMintingStrategy: Maybe<IdentifierMintingStrategy>;
31
31
  imports: readonly string[];
32
32
  label: Maybe<string>;
33
33
  lazyAncestorObjectTypes: () => readonly ObjectType[];
34
+ lazyChildObjectTypes: () => readonly ObjectType[];
34
35
  lazyDescendantObjectTypes: () => readonly ObjectType[];
35
36
  lazyParentObjectTypes: () => readonly ObjectType[];
36
- lazyProperties: () => readonly ObjectType.Property[];
37
- identifierMintingStrategy: Maybe<IdentifierMintingStrategy>;
37
+ lazyProperties: (objectType: ObjectType) => readonly ObjectType.Property[];
38
+ staticModuleName: string;
39
+ synthetic: boolean;
38
40
  toRdfTypes: readonly NamedNode[];
39
41
  } & ConstructorParameters<typeof DeclaredType>[0]);
40
42
  get _discriminatorProperty(): Type.DiscriminatorProperty;
41
43
  get ancestorObjectTypes(): readonly ObjectType[];
44
+ get childObjectTypes(): readonly ObjectType[];
42
45
  get conversions(): readonly Type.Conversion[];
43
46
  get declarationImports(): readonly Import[];
44
47
  get declarations(): (ClassDeclarationStructure | InterfaceDeclarationStructure | ModuleDeclarationStructure)[];
@@ -46,52 +49,72 @@ export declare class ObjectType extends DeclaredType {
46
49
  get discriminatorProperty(): Maybe<Type.DiscriminatorProperty>;
47
50
  get discriminatorValue(): string;
48
51
  get equalsFunction(): string;
49
- get hashFunctionName(): string;
50
- get hashShaclPropertiesFunctionName(): string;
52
+ get fromRdfTypeVariable(): Maybe<string>;
53
+ get graphqlName(): Type.GraphqlName;
51
54
  get identifierProperty(): ObjectType.IdentifierProperty;
52
55
  get identifierType(): IdentifierType;
53
- get jsonName(): string;
54
- get jsonUiSchemaFunctionName(): string;
55
- get jsonZodSchemaFunctionName(): string;
56
+ get identifierTypeAlias(): string;
57
+ get jsonName(): Type.JsonName;
56
58
  get mutable(): boolean;
59
+ newExpression({ parameters }: {
60
+ parameters: string;
61
+ }): string;
62
+ get objectSetMethodNames(): ObjectType.ObjectSetMethodNames;
57
63
  get ownProperties(): readonly ObjectType.Property[];
58
64
  get ownShaclProperties(): readonly ObjectType.Property[];
59
65
  get parentObjectTypes(): readonly ObjectType[];
60
66
  get properties(): readonly ObjectType.Property[];
67
+ get toRdfjsResourceType(): string;
61
68
  protected get thisVariable(): string;
62
- fromJsonExpression({ variables, }: Parameters<Type["fromJsonExpression"]>[0]): string;
63
- fromRdfExpression({ variables, }: Parameters<Type["fromRdfExpression"]>[0]): string;
64
- hashStatements({ variables, }: Parameters<Type["hashStatements"]>[0]): readonly string[];
65
- jsonUiSchemaElement({ variables, }: {
69
+ fromJsonExpression({ variables, }: Parameters<DeclaredType["fromJsonExpression"]>[0]): string;
70
+ fromRdfExpression({ variables, }: Parameters<DeclaredType["fromRdfExpression"]>[0]): string;
71
+ graphqlResolveExpression({ variables, }: {
66
72
  variables: {
67
- scopePrefix: string;
73
+ value: string;
68
74
  };
69
- }): Maybe<string>;
70
- jsonZodSchema(_parameters: Parameters<Type["jsonZodSchema"]>[0]): ReturnType<Type["jsonZodSchema"]>;
71
- rdfjsResourceType(options?: {
72
- mutable?: boolean;
73
- }): {
74
- readonly mutable: boolean;
75
- readonly name: string;
76
- readonly named: boolean;
77
- };
78
- snippetDeclarations(): readonly string[];
79
- sparqlConstructTemplateTriples({ context, variables, }: Parameters<Type["sparqlConstructTemplateTriples"]>[0]): readonly string[];
80
- sparqlWherePatterns({ context, variables, }: Parameters<Type["sparqlWherePatterns"]>[0]): readonly string[];
81
- toJsonExpression({ variables, }: Parameters<Type["toJsonExpression"]>[0]): string;
82
- toRdfExpression({ variables, }: Parameters<Type["toRdfExpression"]>[0]): string;
83
- useImports(_features: Set<TsFeature>): readonly Import[];
75
+ }): string;
76
+ hashStatements({ variables, }: Parameters<DeclaredType["hashStatements"]>[0]): readonly string[];
77
+ jsonUiSchemaElement({ variables, }: Parameters<DeclaredType["jsonUiSchemaElement"]>[0]): Maybe<string>;
78
+ jsonZodSchema({ context, variables, }: Parameters<DeclaredType["jsonZodSchema"]>[0]): ReturnType<DeclaredType["jsonZodSchema"]>;
79
+ snippetDeclarations({ recursionStack, }: Parameters<DeclaredType["snippetDeclarations"]>[0]): readonly string[];
80
+ sparqlConstructTemplateTriples(parameters: Parameters<DeclaredType["sparqlConstructTemplateTriples"]>[0]): readonly string[];
81
+ sparqlWherePatterns(parameters: Parameters<DeclaredType["sparqlWherePatterns"]>[0]): readonly string[];
82
+ toJsonExpression({ variables, }: Parameters<DeclaredType["toJsonExpression"]>[0]): string;
83
+ toRdfExpression({ variables, }: Parameters<DeclaredType["toRdfExpression"]>[0]): string;
84
+ useImports(): readonly Import[];
84
85
  protected ensureAtMostOneSuperObjectType(): void;
86
+ private readonly lazyAncestorObjectTypes;
87
+ private readonly lazyChildObjectTypes;
88
+ private readonly lazyDescendantObjectTypes;
89
+ private readonly lazyParentObjectTypes;
90
+ private readonly lazyProperties;
85
91
  }
86
92
  export declare namespace ObjectType {
93
+ const EagerShaclProperty: typeof _ObjectType.EagerShaclProperty;
94
+ type EagerShaclProperty<TypeT extends Type = Type> = _ObjectType.EagerShaclProperty<TypeT>;
87
95
  const IdentifierPrefixProperty: typeof _ObjectType.IdentifierPrefixProperty;
88
96
  type IdentifierPrefixProperty = _ObjectType.IdentifierPrefixProperty;
89
97
  const IdentifierProperty: typeof _ObjectType.IdentifierProperty;
90
98
  type IdentifierProperty = _ObjectType.IdentifierProperty;
99
+ const LazyShaclProperty: typeof _ObjectType.LazyShaclProperty;
100
+ type LazyShaclProperty<LazyTypeT extends _ObjectType.LazyShaclProperty.Type<ResolvedTypeT, StubTypeT>, ResolvedTypeT extends _ObjectType.LazyShaclProperty.Type.ResolvedTypeConstraint, StubTypeT extends _ObjectType.LazyShaclProperty.Type.StubTypeConstraint> = _ObjectType.LazyShaclProperty<LazyTypeT, ResolvedTypeT, StubTypeT>;
101
+ namespace LazyShaclProperty {
102
+ type Type<ResolvedTypeT extends _ObjectType.LazyShaclProperty.Type.ResolvedTypeConstraint, StubTypeT extends _ObjectType.LazyShaclProperty.Type.StubTypeConstraint> = _ObjectType.LazyShaclProperty.Type<ResolvedTypeT, StubTypeT>;
103
+ namespace Type {
104
+ type ResolvedTypeConstraint = _ObjectType.LazyShaclProperty.Type.ResolvedTypeConstraint;
105
+ type StubTypeConstraint = _ObjectType.LazyShaclProperty.Type.StubTypeConstraint;
106
+ }
107
+ }
108
+ type ObjectSetMethodNames = {
109
+ readonly object: string;
110
+ readonly objectsCount: string;
111
+ readonly objectIdentifiers: string;
112
+ readonly objects: string;
113
+ };
91
114
  const Property: typeof _ObjectType.Property;
92
115
  type Property = _ObjectType.Property<any>;
93
116
  const ShaclProperty: typeof _ObjectType.ShaclProperty;
94
- type ShaclProperty = _ObjectType.ShaclProperty;
117
+ type ShaclProperty<TypeT extends Type> = _ObjectType.ShaclProperty<TypeT>;
95
118
  const TypeDiscriminatorProperty: typeof _ObjectType.TypeDiscriminatorProperty;
96
119
  type TypeDiscriminatorProperty = _ObjectType.TypeDiscriminatorProperty;
97
120
  }