@itwin/ecschema-metadata 4.10.0-dev.9 → 4.10.0

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 (190) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/lib/cjs/Constants.js.map +1 -1
  3. package/lib/cjs/DelayedPromise.d.ts.map +1 -1
  4. package/lib/cjs/DelayedPromise.js.map +1 -1
  5. package/lib/cjs/Deserialization/AbstractParser.d.ts +3 -0
  6. package/lib/cjs/Deserialization/AbstractParser.d.ts.map +1 -1
  7. package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
  8. package/lib/cjs/Deserialization/Helper.d.ts +9 -0
  9. package/lib/cjs/Deserialization/Helper.d.ts.map +1 -1
  10. package/lib/cjs/Deserialization/Helper.js +24 -6
  11. package/lib/cjs/Deserialization/Helper.js.map +1 -1
  12. package/lib/cjs/Deserialization/JsonParser.d.ts +3 -0
  13. package/lib/cjs/Deserialization/JsonParser.d.ts.map +1 -1
  14. package/lib/cjs/Deserialization/JsonParser.js +55 -9
  15. package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
  16. package/lib/cjs/Deserialization/JsonProps.d.ts +4 -0
  17. package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
  18. package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
  19. package/lib/cjs/Deserialization/SchemaGraphUtil.js.map +1 -1
  20. package/lib/cjs/Deserialization/XmlParser.d.ts +3 -2
  21. package/lib/cjs/Deserialization/XmlParser.d.ts.map +1 -1
  22. package/lib/cjs/Deserialization/XmlParser.js +32 -13
  23. package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
  24. package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
  25. package/lib/cjs/ECName.js.map +1 -1
  26. package/lib/cjs/ECObjects.d.ts.map +1 -1
  27. package/lib/cjs/ECObjects.js +24 -21
  28. package/lib/cjs/ECObjects.js.map +1 -1
  29. package/lib/cjs/Exception.d.ts +2 -1
  30. package/lib/cjs/Exception.d.ts.map +1 -1
  31. package/lib/cjs/Exception.js +1 -0
  32. package/lib/cjs/Exception.js.map +1 -1
  33. package/lib/cjs/Interfaces.js.map +1 -1
  34. package/lib/cjs/Metadata/Class.d.ts.map +1 -1
  35. package/lib/cjs/Metadata/Class.js +10 -3
  36. package/lib/cjs/Metadata/Class.js.map +1 -1
  37. package/lib/cjs/Metadata/Constant.js.map +1 -1
  38. package/lib/cjs/Metadata/CustomAttribute.js +1 -2
  39. package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
  40. package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
  41. package/lib/cjs/Metadata/EntityClass.js +3 -3
  42. package/lib/cjs/Metadata/EntityClass.js.map +1 -1
  43. package/lib/cjs/Metadata/Enumeration.d.ts.map +1 -1
  44. package/lib/cjs/Metadata/Enumeration.js +11 -4
  45. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  46. package/lib/cjs/Metadata/Format.d.ts.map +1 -1
  47. package/lib/cjs/Metadata/Format.js +6 -6
  48. package/lib/cjs/Metadata/Format.js.map +1 -1
  49. package/lib/cjs/Metadata/InvertedUnit.d.ts +4 -0
  50. package/lib/cjs/Metadata/InvertedUnit.d.ts.map +1 -1
  51. package/lib/cjs/Metadata/InvertedUnit.js +6 -0
  52. package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
  53. package/lib/cjs/Metadata/KindOfQuantity.d.ts +0 -4
  54. package/lib/cjs/Metadata/KindOfQuantity.d.ts.map +1 -1
  55. package/lib/cjs/Metadata/KindOfQuantity.js +2 -54
  56. package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
  57. package/lib/cjs/Metadata/Mixin.js.map +1 -1
  58. package/lib/cjs/Metadata/OverrideFormat.d.ts +12 -0
  59. package/lib/cjs/Metadata/OverrideFormat.d.ts.map +1 -1
  60. package/lib/cjs/Metadata/OverrideFormat.js +55 -2
  61. package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
  62. package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
  63. package/lib/cjs/Metadata/Property.js.map +1 -1
  64. package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
  65. package/lib/cjs/Metadata/RelationshipClass.d.ts.map +1 -1
  66. package/lib/cjs/Metadata/RelationshipClass.js +8 -3
  67. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  68. package/lib/cjs/Metadata/Schema.d.ts +9 -0
  69. package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
  70. package/lib/cjs/Metadata/Schema.js +74 -7
  71. package/lib/cjs/Metadata/Schema.js.map +1 -1
  72. package/lib/cjs/Metadata/SchemaItem.d.ts.map +1 -1
  73. package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
  74. package/lib/cjs/Metadata/Unit.js.map +1 -1
  75. package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
  76. package/lib/cjs/PropertyTypes.js +2 -2
  77. package/lib/cjs/PropertyTypes.js.map +1 -1
  78. package/lib/cjs/SchemaJsonLocater.js.map +1 -1
  79. package/lib/cjs/SchemaKey.d.ts.map +1 -1
  80. package/lib/cjs/SchemaKey.js +1 -5
  81. package/lib/cjs/SchemaKey.js.map +1 -1
  82. package/lib/cjs/SchemaLoader.js.map +1 -1
  83. package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
  84. package/lib/cjs/UnitConversion/Graph.d.ts.map +1 -1
  85. package/lib/cjs/UnitConversion/Graph.js.map +1 -1
  86. package/lib/cjs/UnitConversion/Parser.js +1 -2
  87. package/lib/cjs/UnitConversion/Parser.js.map +1 -1
  88. package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
  89. package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
  90. package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
  91. package/lib/cjs/UnitProvider/SchemaUnitProvider.d.ts +1 -6
  92. package/lib/cjs/UnitProvider/SchemaUnitProvider.d.ts.map +1 -1
  93. package/lib/cjs/UnitProvider/SchemaUnitProvider.js +100 -58
  94. package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
  95. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  96. package/lib/cjs/ecschema-metadata.js.map +1 -1
  97. package/lib/cjs/utils/SchemaGraph.js.map +1 -1
  98. package/lib/esm/Constants.js.map +1 -1
  99. package/lib/esm/DelayedPromise.d.ts.map +1 -1
  100. package/lib/esm/DelayedPromise.js.map +1 -1
  101. package/lib/esm/Deserialization/AbstractParser.d.ts +3 -0
  102. package/lib/esm/Deserialization/AbstractParser.d.ts.map +1 -1
  103. package/lib/esm/Deserialization/AbstractParser.js.map +1 -1
  104. package/lib/esm/Deserialization/Helper.d.ts +9 -0
  105. package/lib/esm/Deserialization/Helper.d.ts.map +1 -1
  106. package/lib/esm/Deserialization/Helper.js +24 -6
  107. package/lib/esm/Deserialization/Helper.js.map +1 -1
  108. package/lib/esm/Deserialization/JsonParser.d.ts +3 -0
  109. package/lib/esm/Deserialization/JsonParser.d.ts.map +1 -1
  110. package/lib/esm/Deserialization/JsonParser.js +55 -9
  111. package/lib/esm/Deserialization/JsonParser.js.map +1 -1
  112. package/lib/esm/Deserialization/JsonProps.d.ts +4 -0
  113. package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
  114. package/lib/esm/Deserialization/JsonProps.js.map +1 -1
  115. package/lib/esm/Deserialization/SchemaGraphUtil.js.map +1 -1
  116. package/lib/esm/Deserialization/XmlParser.d.ts +3 -2
  117. package/lib/esm/Deserialization/XmlParser.d.ts.map +1 -1
  118. package/lib/esm/Deserialization/XmlParser.js +32 -13
  119. package/lib/esm/Deserialization/XmlParser.js.map +1 -1
  120. package/lib/esm/Deserialization/XmlSerializationUtils.js.map +1 -1
  121. package/lib/esm/ECName.js.map +1 -1
  122. package/lib/esm/ECObjects.d.ts.map +1 -1
  123. package/lib/esm/ECObjects.js +8 -5
  124. package/lib/esm/ECObjects.js.map +1 -1
  125. package/lib/esm/Exception.d.ts +2 -1
  126. package/lib/esm/Exception.d.ts.map +1 -1
  127. package/lib/esm/Exception.js +1 -0
  128. package/lib/esm/Exception.js.map +1 -1
  129. package/lib/esm/Interfaces.js.map +1 -1
  130. package/lib/esm/Metadata/Class.d.ts.map +1 -1
  131. package/lib/esm/Metadata/Class.js +10 -3
  132. package/lib/esm/Metadata/Class.js.map +1 -1
  133. package/lib/esm/Metadata/Constant.js.map +1 -1
  134. package/lib/esm/Metadata/CustomAttribute.js.map +1 -1
  135. package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
  136. package/lib/esm/Metadata/EntityClass.js.map +1 -1
  137. package/lib/esm/Metadata/Enumeration.d.ts.map +1 -1
  138. package/lib/esm/Metadata/Enumeration.js +11 -4
  139. package/lib/esm/Metadata/Enumeration.js.map +1 -1
  140. package/lib/esm/Metadata/Format.d.ts.map +1 -1
  141. package/lib/esm/Metadata/Format.js +7 -7
  142. package/lib/esm/Metadata/Format.js.map +1 -1
  143. package/lib/esm/Metadata/InvertedUnit.d.ts +4 -0
  144. package/lib/esm/Metadata/InvertedUnit.d.ts.map +1 -1
  145. package/lib/esm/Metadata/InvertedUnit.js +6 -0
  146. package/lib/esm/Metadata/InvertedUnit.js.map +1 -1
  147. package/lib/esm/Metadata/KindOfQuantity.d.ts +0 -4
  148. package/lib/esm/Metadata/KindOfQuantity.d.ts.map +1 -1
  149. package/lib/esm/Metadata/KindOfQuantity.js +2 -54
  150. package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
  151. package/lib/esm/Metadata/Mixin.js.map +1 -1
  152. package/lib/esm/Metadata/OverrideFormat.d.ts +12 -0
  153. package/lib/esm/Metadata/OverrideFormat.d.ts.map +1 -1
  154. package/lib/esm/Metadata/OverrideFormat.js +53 -0
  155. package/lib/esm/Metadata/OverrideFormat.js.map +1 -1
  156. package/lib/esm/Metadata/Phenomenon.js.map +1 -1
  157. package/lib/esm/Metadata/Property.js.map +1 -1
  158. package/lib/esm/Metadata/PropertyCategory.js.map +1 -1
  159. package/lib/esm/Metadata/RelationshipClass.d.ts.map +1 -1
  160. package/lib/esm/Metadata/RelationshipClass.js +8 -3
  161. package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
  162. package/lib/esm/Metadata/Schema.d.ts +9 -0
  163. package/lib/esm/Metadata/Schema.d.ts.map +1 -1
  164. package/lib/esm/Metadata/Schema.js +74 -7
  165. package/lib/esm/Metadata/Schema.js.map +1 -1
  166. package/lib/esm/Metadata/SchemaItem.d.ts.map +1 -1
  167. package/lib/esm/Metadata/SchemaItem.js.map +1 -1
  168. package/lib/esm/Metadata/Unit.js.map +1 -1
  169. package/lib/esm/Metadata/UnitSystem.js.map +1 -1
  170. package/lib/esm/PropertyTypes.js.map +1 -1
  171. package/lib/esm/SchemaJsonLocater.js.map +1 -1
  172. package/lib/esm/SchemaKey.d.ts.map +1 -1
  173. package/lib/esm/SchemaKey.js +1 -5
  174. package/lib/esm/SchemaKey.js.map +1 -1
  175. package/lib/esm/SchemaLoader.js.map +1 -1
  176. package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -1
  177. package/lib/esm/UnitConversion/Graph.d.ts.map +1 -1
  178. package/lib/esm/UnitConversion/Graph.js.map +1 -1
  179. package/lib/esm/UnitConversion/Parser.js.map +1 -1
  180. package/lib/esm/UnitConversion/UnitConversion.js.map +1 -1
  181. package/lib/esm/UnitConversion/UnitConverter.js.map +1 -1
  182. package/lib/esm/UnitConversion/UnitTree.js.map +1 -1
  183. package/lib/esm/UnitProvider/SchemaUnitProvider.d.ts +1 -6
  184. package/lib/esm/UnitProvider/SchemaUnitProvider.d.ts.map +1 -1
  185. package/lib/esm/UnitProvider/SchemaUnitProvider.js +100 -58
  186. package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -1
  187. package/lib/esm/Validation/SchemaWalker.js.map +1 -1
  188. package/lib/esm/ecschema-metadata.js.map +1 -1
  189. package/lib/esm/utils/SchemaGraph.js.map +1 -1
  190. package/package.json +10 -10
@@ -5,9 +5,11 @@
5
5
  import { ECObjectsError, ECObjectsStatus } from "../Exception";
6
6
  import { ECName } from "../ECName";
7
7
  import { AbstractParser } from "./AbstractParser";
8
+ import { SchemaReadHelper } from "./Helper";
8
9
  function isObject(x) {
9
10
  return typeof (x) === "object";
10
11
  }
12
+ const SCHEMAURL_JSON = "https://dev\\.bentley\\.com/json_schemas/ec";
11
13
  /** @internal */
12
14
  export class JsonParser extends AbstractParser {
13
15
  constructor(rawSchema) {
@@ -16,6 +18,18 @@ export class JsonParser extends AbstractParser {
16
18
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Invalid JSON object.`);
17
19
  this._rawSchema = rawSchema;
18
20
  this._schemaName = rawSchema.name;
21
+ this._ecSpecVersion = JsonParser.parseJSUri(rawSchema.$schema);
22
+ }
23
+ get getECSpecVersion() { return this._ecSpecVersion; }
24
+ static parseJSUri(uri) {
25
+ if (uri === undefined)
26
+ return undefined;
27
+ const match = uri.match(`^${SCHEMAURL_JSON}/([0-9]+)/ecschema$`);
28
+ if (!match)
29
+ return;
30
+ const readVersion = parseInt(match[1][0], 10);
31
+ const writeVersion = parseInt(match[1][1], 10);
32
+ return { readVersion, writeVersion };
19
33
  }
20
34
  /**
21
35
  * Type checks Schema and returns SchemaProps interface
@@ -47,7 +61,12 @@ export class JsonParser extends AbstractParser {
47
61
  if (typeof (this._rawSchema.description) !== "string")
48
62
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'description' attribute. It should be of type 'string'.`);
49
63
  }
50
- return this._rawSchema;
64
+ const ecVersions = JsonParser.parseJSUri(this._rawSchema.$schema);
65
+ return {
66
+ ...this._rawSchema,
67
+ ecSpecMajorVersion: ecVersions?.readVersion,
68
+ ecSpecMinorVersion: ecVersions?.writeVersion,
69
+ };
51
70
  }
52
71
  *getReferences() {
53
72
  if (undefined !== this._rawSchema.references) {
@@ -143,8 +162,11 @@ export class JsonParser extends AbstractParser {
143
162
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} does not have the required 'type' attribute.`);
144
163
  if (typeof (property.type) !== "string")
145
164
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. It should be of type 'string'.`);
146
- if (!this.isValidPropertyType(property.type))
165
+ if (!this.isValidPropertyType(property.type)) {
166
+ if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
167
+ return;
147
168
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);
169
+ }
148
170
  yield [property.name, property.type, property];
149
171
  }
150
172
  }
@@ -184,7 +206,11 @@ export class JsonParser extends AbstractParser {
184
206
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);
185
207
  }
186
208
  }
187
- return jsonObj;
209
+ return {
210
+ ...jsonObj,
211
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
212
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
213
+ };
188
214
  }
189
215
  /**
190
216
  * Type checks mixin and returns MixinProps interface
@@ -197,7 +223,11 @@ export class JsonParser extends AbstractParser {
197
223
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);
198
224
  if (typeof (jsonObj.appliesTo) !== "string")
199
225
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);
200
- return jsonObj;
226
+ return {
227
+ ...jsonObj,
228
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
229
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
230
+ };
201
231
  }
202
232
  /**
203
233
  * Type checks custom attribute class and returns CustomAttributeClassProps interface
@@ -210,11 +240,19 @@ export class JsonParser extends AbstractParser {
210
240
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);
211
241
  if (typeof (jsonObj.appliesTo) !== "string")
212
242
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);
213
- return jsonObj;
243
+ return {
244
+ ...jsonObj,
245
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
246
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
247
+ };
214
248
  }
215
249
  parseStructClass(jsonObj) {
216
250
  this.checkClassProps(jsonObj);
217
- return jsonObj;
251
+ return {
252
+ ...jsonObj,
253
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
254
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
255
+ };
218
256
  }
219
257
  parseUnitSystem(jsonObj) {
220
258
  this.checkSchemaItemProps(jsonObj);
@@ -245,7 +283,11 @@ export class JsonParser extends AbstractParser {
245
283
  if (!isObject(jsonObj.target))
246
284
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid target constraint. It should be of type 'object'.`);
247
285
  this.checkRelationshipConstraintProps(jsonObj.target, false);
248
- return jsonObj;
286
+ return {
287
+ ...jsonObj,
288
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
289
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
290
+ };
249
291
  }
250
292
  /**
251
293
  * Type checks Relationship Constraint and returns RelationshipConstraintProps interface.
@@ -297,8 +339,12 @@ export class JsonParser extends AbstractParser {
297
339
  (type === "integer") ||
298
340
  (type === "string");
299
341
  };
300
- if (!isValidEnumerationType(jsonObj.type))
301
- throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either "int" or "string".`);
342
+ if (!isValidEnumerationType(jsonObj.type)) {
343
+ if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
344
+ jsonObj.type = "string";
345
+ else
346
+ throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either "int" or "string".`);
347
+ }
302
348
  if (undefined !== jsonObj.isStrict) { // TODO: make required
303
349
  if (typeof (jsonObj.isStrict) !== "boolean")
304
350
  throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'isStrict' attribute. It should be of type 'boolean'.`);
@@ -1 +1 @@
1
- {"version":3,"file":"JsonParser.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonParser.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,cAAc,EAAmB,MAAM,kBAAkB,CAAC;AASnE,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED,gBAAgB;AAChB,MAAM,OAAO,UAAW,SAAQ,cAA6B;IAK3D,YAAY,SAA4B;QACtC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YACtB,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;QAElF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,IAA0B,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACI,WAAW;QAChB,IAAI,SAAS,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI;YACpC,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,uDAAuD,CAAC,CAAC;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L,MAAM,QAAQ,GAAG,CAAC,QAA8B,EAAE,EAAE;oBAClD,OAAO,QAA2B,CAAC;gBACrC,CAAC,CAAC;gBAEF,MAAM,OAAO,GAAoB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAChE,MAAM,OAAO,CAAC;YAChB,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\r\nimport { CustomAttribute } from \"../Metadata/CustomAttribute\";\r\nimport { CustomAttributeClass } from \"../Metadata/CustomAttributeClass\";\r\nimport { ECName } from \"../ECName\";\r\nimport { AbstractParser, CAProviderTuple } from \"./AbstractParser\";\r\nimport {\r\n ConstantProps, CustomAttributeClassProps, EntityClassProps, EnumerationProps, InvertedUnitProps, KindOfQuantityProps, MixinProps,\r\n NavigationPropertyProps, PhenomenonProps, PrimitiveArrayPropertyProps, PrimitiveOrEnumPropertyBaseProps, PrimitivePropertyProps,\r\n PropertyCategoryProps, PropertyProps, RelationshipClassProps, SchemaItemFormatProps, SchemaItemUnitProps, SchemaProps, SchemaReferenceProps, StructArrayPropertyProps, StructClassProps,\r\n StructPropertyProps, UnitSystemProps,\r\n} from \"./JsonProps\";\r\n\r\ninterface UnknownObject { readonly [name: string]: unknown }\r\nfunction isObject(x: unknown): x is UnknownObject {\r\n return typeof (x) === \"object\";\r\n}\r\n\r\n/** @internal */\r\nexport class JsonParser extends AbstractParser<UnknownObject> {\r\n private _rawSchema: UnknownObject;\r\n private _schemaName?: string;\r\n private _currentItemFullName?: string;\r\n\r\n constructor(rawSchema: Readonly<unknown>) {\r\n super();\r\n\r\n if (!isObject(rawSchema))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Invalid JSON object.`);\r\n\r\n this._rawSchema = rawSchema;\r\n this._schemaName = rawSchema.name as string | undefined;\r\n }\r\n\r\n /**\r\n * Type checks Schema and returns SchemaProps interface\r\n * @param this._rawSchema\r\n * @returns SchemaProps\r\n */\r\n public parseSchema(): SchemaProps {\r\n if (undefined === this._rawSchema.name)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema is missing the required 'name' attribute.`);\r\n if (typeof (this._rawSchema.name) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema has an invalid 'name' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === this._rawSchema.$schema)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required '$schema' attribute.`);\r\n if (typeof (this._rawSchema.$schema) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid '$schema' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === this._rawSchema.version)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required 'version' attribute.`);\r\n if (typeof (this._rawSchema.version) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'version' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== this._rawSchema.alias) {\r\n if (typeof (this._rawSchema.alias) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'alias' attribute. It should be of type 'string'.`);\r\n }\r\n\r\n if (undefined !== this._rawSchema.label) {\r\n if (typeof (this._rawSchema.label) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'label' attribute. It should be of type 'string'.`);\r\n }\r\n\r\n if (undefined !== this._rawSchema.description) {\r\n if (typeof (this._rawSchema.description) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'description' attribute. It should be of type 'string'.`);\r\n }\r\n\r\n return (this._rawSchema as unknown) as SchemaProps;\r\n }\r\n\r\n public *getReferences(): Iterable<SchemaReferenceProps> {\r\n if (undefined !== this._rawSchema.references) {\r\n if (!Array.isArray(this._rawSchema.references))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._rawSchema.name} has an invalid 'references' attribute. It should be of type 'object[]'.`);\r\n\r\n for (const ref of this._rawSchema.references) {\r\n yield this.checkSchemaReference(ref);\r\n }\r\n }\r\n }\r\n\r\n private checkSchemaReference(jsonObj: Readonly<unknown>): SchemaReferenceProps {\r\n if (!isObject(jsonObj))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. It should be of type 'object[]'.`);\r\n if (undefined === jsonObj.name)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'name' attribute.`);\r\n if (typeof (jsonObj.name) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'name' attribute. It should be of type 'string'.`);\r\n if (undefined === jsonObj.version)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'version' attribute.`);\r\n if (typeof (jsonObj.version) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'version' attribute. It should be of type 'string'.`);\r\n return (jsonObj as unknown) as SchemaReferenceProps;\r\n }\r\n\r\n public *getItems(): Iterable<[string, string, UnknownObject]> {\r\n const items = this._rawSchema.items;\r\n if (undefined !== items) {\r\n if (!isObject(items) || Array.isArray(items))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\r\n\r\n // eslint-disable-next-line guard-for-in\r\n for (const itemName in items) {\r\n const item = items[itemName];\r\n if (!isObject(item))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\r\n\r\n if (!ECName.validate(itemName))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\r\n\r\n if (undefined === item.schemaItemType)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\r\n if (typeof (item.schemaItemType) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\r\n\r\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\r\n yield [itemName, item.schemaItemType, item];\r\n }\r\n }\r\n }\r\n\r\n public findItem(itemName: string): [string, string, UnknownObject] | undefined {\r\n const items = this._rawSchema.items;\r\n if (undefined !== items) {\r\n if (!isObject(items) || Array.isArray(items))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\r\n\r\n const item = items[itemName];\r\n if (undefined !== item) {\r\n if (!isObject(item))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\r\n\r\n if (!ECName.validate(itemName))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\r\n\r\n if (undefined === item.schemaItemType)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\r\n if (typeof (item.schemaItemType) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\r\n\r\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\r\n return [itemName, item.schemaItemType, item];\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Type checks all Schema Item attributes.\r\n * @param jsonObj The JSON object to check if it represents a Schema Item.\r\n */\r\n private checkSchemaItemProps(jsonObj: UnknownObject): void {\r\n if (undefined !== jsonObj.description) {\r\n if (typeof (jsonObj.description) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'description' attribute. It should be of type 'string'.`);\r\n }\r\n\r\n if (undefined !== jsonObj.label) {\r\n if (typeof (jsonObj.label) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'label' attribute. It should be of type 'string'.`);\r\n }\r\n }\r\n\r\n public *getProperties(jsonObj: UnknownObject, itemName: string): Iterable<[string, string, UnknownObject]> {\r\n const properties = jsonObj.properties;\r\n if (undefined !== properties) {\r\n if (!Array.isArray(properties))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${itemName} has an invalid 'properties' attribute. It should be of type 'object[]'.`);\r\n\r\n for (const property of properties as unknown[]) {\r\n if (!isObject(property))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is an invalid JSON object.`);\r\n\r\n if (undefined === property.name)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is missing the required 'name' attribute.`);\r\n if (typeof (property.name) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} has an invalid 'name' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === property.type)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} does not have the required 'type' attribute.`);\r\n if (typeof (property.type) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. It should be of type 'string'.`);\r\n if (!this.isValidPropertyType(property.type))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);\r\n\r\n yield [property.name, property.type, property];\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Type checks Class and returns ClassProps interface\r\n * @param jsonObj The JSON object to check if it represents a Class.\r\n */\r\n private checkClassProps(jsonObj: UnknownObject): void {\r\n this.checkSchemaItemProps(jsonObj);\r\n\r\n if (undefined !== jsonObj.modifier) {\r\n if (typeof (jsonObj.modifier) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'modifier' attribute. It should be of type 'string'.`);\r\n }\r\n\r\n if (undefined !== jsonObj.baseClass) {\r\n if (typeof (jsonObj.baseClass) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'baseClass' attribute. It should be of type 'string'.`);\r\n }\r\n if (undefined !== jsonObj.customAttributes) {\r\n if (!Array.isArray(jsonObj.customAttributes)) {\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Type checks entity class and returns EntityClassProps interface\r\n * @param jsonObj\r\n * @returns EntityClassProps\r\n */\r\n public parseEntityClass(jsonObj: UnknownObject): EntityClassProps {\r\n this.checkClassProps(jsonObj);\r\n\r\n if (undefined !== jsonObj.mixins) {\r\n if (!Array.isArray(jsonObj.mixins))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\r\n for (const mixinName of jsonObj.mixins) {\r\n if (typeof (mixinName) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\r\n }\r\n }\r\n return jsonObj as EntityClassProps;\r\n }\r\n\r\n /**\r\n * Type checks mixin and returns MixinProps interface\r\n * @param jsonObj\r\n * @returns MixinProps\r\n */\r\n public parseMixin(jsonObj: UnknownObject): MixinProps {\r\n this.checkClassProps(jsonObj);\r\n if (undefined === jsonObj.appliesTo)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\r\n if (typeof (jsonObj.appliesTo) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\r\n return (jsonObj as unknown) as MixinProps;\r\n }\r\n\r\n /**\r\n * Type checks custom attribute class and returns CustomAttributeClassProps interface\r\n * @param jsonObj\r\n * @returns CustomAttributeClassProps\r\n */\r\n public parseCustomAttributeClass(jsonObj: UnknownObject): CustomAttributeClassProps {\r\n this.checkClassProps(jsonObj);\r\n if (undefined === jsonObj.appliesTo)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\r\n if (typeof (jsonObj.appliesTo) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\r\n return (jsonObj as unknown) as CustomAttributeClassProps;\r\n }\r\n\r\n public parseStructClass(jsonObj: UnknownObject): StructClassProps {\r\n this.checkClassProps(jsonObj);\r\n return jsonObj as StructClassProps;\r\n }\r\n\r\n public parseUnitSystem(jsonObj: UnknownObject): UnitSystemProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n return jsonObj as UnitSystemProps;\r\n }\r\n\r\n /**\r\n * Type checks Relationship Class and returns RelationshipClassProps interface\r\n * @param jsonObj\r\n * @returns RelationshipClassProps\r\n */\r\n public parseRelationshipClass(jsonObj: UnknownObject): RelationshipClassProps {\r\n this.checkClassProps(jsonObj);\r\n if (undefined === jsonObj.strength)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strength' attribute.`);\r\n if (typeof (jsonObj.strength) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strength' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.strengthDirection)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strengthDirection' attribute.`);\r\n if (typeof (jsonObj.strengthDirection) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strengthDirection' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.source)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required source constraint.`);\r\n if (!isObject(jsonObj.source))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid source constraint. It should be of type 'object'.`);\r\n this.checkRelationshipConstraintProps(jsonObj.source, true);\r\n\r\n if (undefined === jsonObj.target)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required target constraint.`);\r\n if (!isObject(jsonObj.target))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid target constraint. It should be of type 'object'.`);\r\n this.checkRelationshipConstraintProps(jsonObj.target, false);\r\n\r\n return (jsonObj as unknown) as RelationshipClassProps;\r\n }\r\n\r\n /**\r\n * Type checks Relationship Constraint and returns RelationshipConstraintProps interface.\r\n * @param jsonObj\r\n * @param isSource For sake of error message, is this relationship constraint a source or target\r\n * @returns RelationshipConstraintProps\r\n */\r\n private checkRelationshipConstraintProps(jsonObj: UnknownObject, isSource: boolean): void {\r\n const constraintName = `${(isSource) ? \"Source\" : \"Target\"} Constraint of ${this._currentItemFullName}`; // most specific name to call RelationshipConstraint\r\n\r\n if (undefined === jsonObj.multiplicity)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'multiplicity' attribute.`);\r\n if (typeof (jsonObj.multiplicity) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'multiplicity' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.roleLabel)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'roleLabel' attribute.`);\r\n if (typeof (jsonObj.roleLabel) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'roleLabel' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.polymorphic)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'polymorphic' attribute.`);\r\n if (typeof (jsonObj.polymorphic) !== \"boolean\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'polymorphic' attribute. It should be of type 'boolean'.`);\r\n\r\n if (undefined !== jsonObj.abstractConstraint && typeof (jsonObj.abstractConstraint) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'abstractConstraint' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.constraintClasses)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'constraintClasses' attribute.`);\r\n if (!Array.isArray(jsonObj.constraintClasses))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\r\n\r\n for (const constraintClassName of jsonObj.constraintClasses) {\r\n if (typeof (constraintClassName) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\r\n }\r\n\r\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\r\n }\r\n\r\n /**\r\n * Type checks Enumeration and returns EnumerationProps interface\r\n * @param jsonObj\r\n * @returns EnumerationProps\r\n */\r\n public parseEnumeration(jsonObj: UnknownObject): EnumerationProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined === jsonObj.type)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'type' attribute.`);\r\n if (typeof (jsonObj.type) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\r\n\r\n const isValidEnumerationType = (type: string): boolean => {\r\n type = type.toLowerCase();\r\n return (type === \"int\") ||\r\n (type === \"integer\") ||\r\n (type === \"string\");\r\n };\r\n if (!isValidEnumerationType(jsonObj.type))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either \"int\" or \"string\".`);\r\n\r\n if (undefined !== jsonObj.isStrict) { // TODO: make required\r\n if (typeof (jsonObj.isStrict) !== \"boolean\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'isStrict' attribute. It should be of type 'boolean'.`);\r\n }\r\n\r\n if (undefined === jsonObj.enumerators)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'enumerators' attribute.`);\r\n if (!Array.isArray(jsonObj.enumerators))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\r\n\r\n for (const enumerator of jsonObj.enumerators) {\r\n if (!isObject(enumerator))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\r\n\r\n if (undefined === enumerator.value)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'value'.`);\r\n\r\n // TODO: Should this really be handled here?\r\n const expectedType = jsonObj.type;\r\n const receivedType = (typeof (enumerator.value) === \"number\") ? \"int\" : typeof (enumerator.value);\r\n if (!expectedType.includes(receivedType)) // is receivedType a substring of expectedType? - easiest way to check \"int\" === \"int\" | \"integer\" && \"string\" === \"string\"\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an incompatible type. It must be \"${expectedType}\", not \"${receivedType}\".`);\r\n\r\n if (undefined === enumerator.name)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'name'.`);\r\n if (typeof (enumerator.name) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'name' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== enumerator.label) {\r\n if (typeof (enumerator.label) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'label' attribute. It should be of type 'string'.`);\r\n }\r\n\r\n if (undefined !== enumerator.description) {\r\n if (typeof (enumerator.description) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'description' attribute. It should be of type 'string'.`);\r\n }\r\n }\r\n\r\n return (jsonObj as unknown) as EnumerationProps;\r\n }\r\n\r\n /**\r\n * Type checks KindOfQuantity and returns KindOfQuantityProps interface\r\n * @param jsonObj\r\n * @returns KindOfQuantityProps\r\n */\r\n public parseKindOfQuantity(jsonObj: UnknownObject): KindOfQuantityProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined === jsonObj.relativeError)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'relativeError' attribute.`);\r\n if (typeof (jsonObj.relativeError) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'relativeError' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.presentationUnits) {\r\n if (!Array.isArray(jsonObj.presentationUnits) && typeof (jsonObj.presentationUnits) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'presentationUnits' attribute. It should be of type 'string' or 'string[]'.`);\r\n }\r\n\r\n if (undefined === jsonObj.persistenceUnit)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'persistenceUnit' attribute.`);\r\n if (typeof (jsonObj.persistenceUnit) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'persistenceUnit' attribute. It should be of type 'string'.`);\r\n\r\n return (jsonObj as unknown) as KindOfQuantityProps;\r\n }\r\n\r\n /**\r\n * Type checks Property Category and returns PropertyCategoryProps interface\r\n * @param jsonObj\r\n * @returns PropertyCategoryProps\r\n */\r\n public parsePropertyCategory(jsonObj: UnknownObject): PropertyCategoryProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined !== jsonObj.priority) { // TODO: make required\r\n if (typeof (jsonObj.priority) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The PropertyCategory ${this._currentItemFullName} has an invalid 'priority' attribute. It should be of type 'number'.`);\r\n }\r\n\r\n return (jsonObj as unknown) as PropertyCategoryProps;\r\n }\r\n\r\n /**\r\n * Type checks unit and returns UnitProps interface\r\n * @param jsonObj\r\n * @returns UnitProps\r\n */\r\n public parseUnit(jsonObj: UnknownObject): SchemaItemUnitProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined === jsonObj.phenomenon)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\r\n if (typeof (jsonObj.phenomenon) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.unitSystem)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\r\n if (typeof (jsonObj.unitSystem) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.definition)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'definition' attribute.`);\r\n if (typeof (jsonObj.definition) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.numerator) {\r\n if (typeof (jsonObj.numerator) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\r\n }\r\n\r\n if (undefined !== jsonObj.denominator) {\r\n if (typeof (jsonObj.denominator) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\r\n }\r\n\r\n if (undefined !== jsonObj.offset) {\r\n if (typeof (jsonObj.offset) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'offset' attribute. It should be of type 'number'.`);\r\n }\r\n return (jsonObj as unknown) as SchemaItemUnitProps;\r\n }\r\n\r\n /**\r\n * Type checks inverted unit and returns InvertedUnitProps interface\r\n * @param jsonObj\r\n * @returns InvertedUnitProps\r\n */\r\n public parseInvertedUnit(jsonObj: UnknownObject): InvertedUnitProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined === jsonObj.invertsUnit)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'invertsUnit' attribute.`);\r\n if (typeof (jsonObj.invertsUnit) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'invertsUnit' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.unitSystem)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\r\n if (typeof (jsonObj.unitSystem) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\r\n\r\n return (jsonObj as unknown) as InvertedUnitProps;\r\n }\r\n\r\n /**\r\n * Type checks constant and returns ConstantProps interface\r\n * @param jsonObj\r\n * @returns ConstantProps\r\n */\r\n public parseConstant(jsonObj: UnknownObject): ConstantProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined === jsonObj.phenomenon)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\r\n if (typeof (jsonObj.phenomenon) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.definition)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'definition' attribute.`);\r\n if (typeof (jsonObj.definition) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.numerator) {\r\n if (typeof (jsonObj.numerator) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\r\n }\r\n\r\n if (undefined !== jsonObj.denominator) {\r\n if (typeof (jsonObj.denominator) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\r\n }\r\n\r\n return (jsonObj as unknown) as ConstantProps;\r\n }\r\n\r\n /**\r\n * Type checks phenomenon and returns PhenomenonProps interface\r\n * @param jsonObj\r\n * @returns PhenomenonProps\r\n */\r\n public parsePhenomenon(jsonObj: UnknownObject): PhenomenonProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined === jsonObj.definition)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} does not have the required 'definition' attribute.`);\r\n if (typeof (jsonObj.definition) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\r\n return (jsonObj as unknown) as PhenomenonProps;\r\n }\r\n\r\n /**\r\n * Type checks format and returns SchemaItemFormatProps interface\r\n * @param jsonObj\r\n * @returns SchemaItemFormatProps\r\n */\r\n public parseFormat(jsonObj: UnknownObject): SchemaItemFormatProps {\r\n this.checkSchemaItemProps(jsonObj);\r\n if (undefined === jsonObj.type)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} does not have the required 'type' attribute.`);\r\n if (typeof (jsonObj.type) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.precision && typeof (jsonObj.precision) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'precision' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.roundFactor && typeof (jsonObj.roundFactor) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'roundFactor' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.minWidth && typeof (jsonObj.minWidth) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'minWidth' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.showSignOption && typeof (jsonObj.showSignOption) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'showSignOption' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.formatTraits) {\r\n if (!Array.isArray(jsonObj.formatTraits) && typeof (jsonObj.formatTraits) !== \"string\") // must be either an array of strings or a string\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'formatTraits' attribute. It should be of type 'string' or 'string[]'.`);\r\n }\r\n\r\n if (undefined !== jsonObj.decimalSeparator && typeof (jsonObj.decimalSeparator) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'decimalSeparator' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.thousandSeparator && typeof (jsonObj.thousandSeparator) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'thousandSeparator' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.uomSeparator && typeof (jsonObj.uomSeparator) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'uomSeparator' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.scientificType && typeof (jsonObj.scientificType) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'scientificType' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.stationOffsetSize && typeof (jsonObj.stationOffsetSize) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationOffsetSize' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.stationSeparator && typeof (jsonObj.stationSeparator) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationSeparator' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.composite) { // optional\r\n if (!isObject(jsonObj.composite))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'composite' object.`);\r\n if (undefined !== jsonObj.composite.includeZero && typeof (jsonObj.composite.includeZero) !== \"boolean\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'includeZero' attribute. It should be of type 'boolean'.`);\r\n\r\n if (undefined !== jsonObj.composite.spacer && typeof (jsonObj.composite.spacer) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'spacer' attribute. It should be of type 'string'.`);\r\n\r\n // if composite is defined\r\n if (undefined === jsonObj.composite.units)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'Composite' attribute. It should have 1-4 units.`);\r\n if (!Array.isArray(jsonObj.composite.units))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\r\n\r\n for (let i = 0; i < jsonObj.composite.units.length; i++) {\r\n if (!isObject(jsonObj.composite.units[i]))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\r\n\r\n if (undefined === jsonObj.composite.units[i].name) // required\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} is missing the required 'name' attribute.`);\r\n if (typeof (jsonObj.composite.units[i].name) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'name' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.composite.units[i].label && typeof (jsonObj.composite.units[i].label) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'label' attribute. It should be of type 'string'.`);\r\n }\r\n }\r\n return (jsonObj as unknown) as SchemaItemFormatProps;\r\n }\r\n\r\n private isValidPropertyType(type: string): boolean {\r\n type = type.toLowerCase();\r\n return (type === \"primitiveproperty\") ||\r\n (type === \"structproperty\") ||\r\n (type === \"primitivearrayproperty\") ||\r\n (type === \"structarrayproperty\") ||\r\n (type === \"navigationproperty\");\r\n }\r\n\r\n /**\r\n * Type checks property and returns PropertyProps interface\r\n * @param jsonObj\r\n * @returns PropertyProps\r\n */\r\n private checkPropertyProps(jsonObj: UnknownObject): PropertyProps {\r\n const propName = jsonObj.name;\r\n\r\n if (undefined !== jsonObj.label && typeof (jsonObj.label) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'label' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.description && typeof (jsonObj.description) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'description' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.priority && typeof (jsonObj.priority) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'priority' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.isReadOnly && typeof (jsonObj.isReadOnly) !== \"boolean\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'isReadOnly' attribute. It should be of type 'boolean'.`);\r\n\r\n if (undefined !== jsonObj.category && typeof (jsonObj.category) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'category' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.kindOfQuantity && typeof (jsonObj.kindOfQuantity) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'kindOfQuantity' attribute. It should be of type 'string'.`);\r\n\r\n if (undefined !== jsonObj.inherited && typeof (jsonObj.inherited) !== \"boolean\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'inherited' attribute. It should be of type 'boolean'.`);\r\n\r\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\r\n return (jsonObj as unknown) as PropertyProps;\r\n }\r\n\r\n private checkPropertyTypename(jsonObj: UnknownObject): void {\r\n const propName = jsonObj.name;\r\n if (undefined === jsonObj.typeName)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} is missing the required 'typeName' attribute.`);\r\n if (typeof (jsonObj.typeName) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'typeName' attribute. It should be of type 'string'.`);\r\n }\r\n\r\n private checkPropertyMinAndMaxOccurs(jsonObj: UnknownObject): void {\r\n const propName = jsonObj.name;\r\n if (undefined !== jsonObj.minOccurs && typeof (jsonObj.minOccurs) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minOccurs' attribute. It should be of type 'number'.`);\r\n if (undefined !== jsonObj.maxOccurs && typeof (jsonObj.maxOccurs) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxOccurs' attribute. It should be of type 'number'.`);\r\n }\r\n\r\n /**\r\n * Type checks PrimitiveOrEnumProperty and returns PrimitiveOrEnumPropertyBaseProps interface\r\n * @param jsonObj\r\n * @returns PrimitiveOrEnumPropertyBaseProps\r\n */\r\n private checkPrimitiveOrEnumPropertyBaseProps(jsonObj: UnknownObject): PrimitiveOrEnumPropertyBaseProps {\r\n this.checkPropertyProps(jsonObj);\r\n this.checkPropertyTypename(jsonObj);\r\n const propName = jsonObj.name;\r\n\r\n if (undefined !== jsonObj.minLength && typeof (jsonObj.minLength) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minLength' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.maxLength && typeof (jsonObj.maxLength) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxLength' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.minValue && typeof (jsonObj.minValue) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minValue' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.maxValue && typeof (jsonObj.maxValue) !== \"number\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxValue' attribute. It should be of type 'number'.`);\r\n\r\n if (undefined !== jsonObj.extendedTypeName && typeof (jsonObj.extendedTypeName) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'extendedTypeName' attribute. It should be of type 'string'.`);\r\n return (jsonObj as unknown) as PrimitiveOrEnumPropertyBaseProps;\r\n }\r\n\r\n /**\r\n * Type checks PrimitiveProperty and returns PrimitivePropertyProps interface\r\n * @param jsonObj\r\n * @returns PrimitivePropertyProps\r\n */\r\n public parsePrimitiveProperty(jsonObj: UnknownObject): PrimitivePropertyProps {\r\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\r\n return (jsonObj as unknown) as PrimitivePropertyProps;\r\n }\r\n\r\n /**\r\n * Type checks StructProperty and returns StructPropertyProps interface\r\n * @param jsonObj\r\n * @returns StructPropertyProps\r\n */\r\n public parseStructProperty(jsonObj: UnknownObject): StructPropertyProps {\r\n this.checkPropertyProps(jsonObj);\r\n this.checkPropertyTypename(jsonObj);\r\n return (jsonObj as unknown) as StructPropertyProps;\r\n }\r\n\r\n /**\r\n * Type checks PrimitiveArrayProperty and returns PrimitiveArrayPropertyProps interface\r\n * @param jsonObj\r\n * @returns PrimitiveArrayPropertyProps\r\n */\r\n public parsePrimitiveArrayProperty(jsonObj: UnknownObject): PrimitiveArrayPropertyProps {\r\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\r\n this.checkPropertyMinAndMaxOccurs(jsonObj);\r\n return (jsonObj as unknown) as PrimitiveArrayPropertyProps;\r\n }\r\n\r\n /**\r\n * Type checks StructArrayProperty and returns StructArrayPropertyProps interface\r\n * @param jsonObj\r\n * @returns StructArrayPropertyProps\r\n */\r\n public parseStructArrayProperty(jsonObj: UnknownObject): StructArrayPropertyProps {\r\n this.checkPropertyProps(jsonObj);\r\n this.checkPropertyTypename(jsonObj);\r\n this.checkPropertyMinAndMaxOccurs(jsonObj);\r\n return (jsonObj as unknown) as StructArrayPropertyProps;\r\n }\r\n\r\n /**\r\n * Type checks NavigationProperty and returns NavigationPropertyProps interface\r\n * @param jsonObj\r\n * @returns NavigationPropertyProps\r\n */\r\n public parseNavigationProperty(jsonObj: UnknownObject): NavigationPropertyProps {\r\n this.checkPropertyProps(jsonObj);\r\n const fullname = `${this._currentItemFullName}.${jsonObj.name}`;\r\n\r\n if (undefined === jsonObj.relationshipName)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'relationshipName' property.`);\r\n if (typeof (jsonObj.relationshipName) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'relationshipName' property. It should be of type 'string'.`);\r\n\r\n if (undefined === jsonObj.direction)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'direction' property.`);\r\n if (typeof (jsonObj.direction) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'direction' property. It should be of type 'string'.`);\r\n\r\n return (jsonObj as unknown) as NavigationPropertyProps;\r\n }\r\n\r\n public getSchemaCustomAttributeProviders(): Iterable<CAProviderTuple> {\r\n return this.getCustomAttributeProviders(this._rawSchema, \"Schema\", this._schemaName);\r\n }\r\n\r\n public getClassCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\r\n return this.getCustomAttributeProviders(jsonObj, \"ECClass\", this._currentItemFullName);\r\n }\r\n\r\n public getPropertyCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\r\n return this.getCustomAttributeProviders(jsonObj, \"ECProperty\", `${this._currentItemFullName}.${jsonObj.name}`);\r\n }\r\n\r\n public getRelationshipConstraintCustomAttributeProviders(jsonObj: UnknownObject): [Iterable<CAProviderTuple> /* source */, Iterable<CAProviderTuple> /* target */] {\r\n const sourceCustomAttributes = this.getCustomAttributeProviders(jsonObj.source as UnknownObject, \"Source Constraint of\", this._currentItemFullName);\r\n const targetCustomAttributes = this.getCustomAttributeProviders(jsonObj.target as UnknownObject, \"Target Constraint of\", this._currentItemFullName);\r\n return [sourceCustomAttributes, targetCustomAttributes];\r\n }\r\n\r\n private *getCustomAttributeProviders(jsonObj: UnknownObject, type: string, name?: string): Iterable<CAProviderTuple> {\r\n if (undefined !== jsonObj.customAttributes) {\r\n if (!Array.isArray(jsonObj.customAttributes))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\r\n\r\n for (const instance of jsonObj.customAttributes) {\r\n if (!isObject(instance) || Array.isArray(instance))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\r\n if (undefined === instance.className)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes is missing the required 'className' attribute.`);\r\n if (typeof (instance.className) !== \"string\")\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes has an invalid 'className' attribute. It should be of type 'string'.`);\r\n\r\n const provider = (_caClass: CustomAttributeClass) => {\r\n return instance as CustomAttribute;\r\n };\r\n\r\n const caTuple: CAProviderTuple = [instance.className, provider];\r\n yield caTuple;\r\n }\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"JsonParser.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonParser.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,cAAc,EAAmB,MAAM,kBAAkB,CAAC;AAOnE,OAAO,EAAiB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG3D,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED,MAAM,cAAc,GAAG,6CAA6C,CAAC;AAErE,gBAAgB;AAChB,MAAM,OAAO,UAAW,SAAQ,cAA6B;IAK3D,YAAY,SAA4B;QACtC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YACtB,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;QAElF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,IAA0B,CAAC;QACxD,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,OAAiB,CAAC,CAAC;IAC3E,CAA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AI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;oBAChD,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,IAAI,IAAI,IAAI,gFAAgF,CAAC,CAAC;gBAC/J,IAAI,SAAS,KAAK,QAAQ,CAAC,SAAS;oBAClC,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,wBAAwB,IAAI,kEAAkE,CAAC,CAAC;gBAC1J,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,QAAQ;oBAC1C,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,wBAAwB,IAAI,wFAAwF,CAAC,CAAC;gBAEhL,MAAM,QAAQ,GAAG,CAAC,QAA8B,EAAE,EAAE;oBAClD,OAAO,QAA2B,CAAC;gBACrC,CAAC,CAAC;gBAEF,MAAM,OAAO,GAAoB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAChE,MAAM,OAAO,CAAC;YAChB,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\nimport { CustomAttribute } from \"../Metadata/CustomAttribute\";\nimport { CustomAttributeClass } from \"../Metadata/CustomAttributeClass\";\nimport { ECName } from \"../ECName\";\nimport { AbstractParser, CAProviderTuple } from \"./AbstractParser\";\nimport {\n ConstantProps, CustomAttributeClassProps, EntityClassProps, EnumerationProps, InvertedUnitProps, KindOfQuantityProps, MixinProps,\n NavigationPropertyProps, PhenomenonProps, PrimitiveArrayPropertyProps, PrimitiveOrEnumPropertyBaseProps, PrimitivePropertyProps,\n PropertyCategoryProps, PropertyProps, RelationshipClassProps, SchemaItemFormatProps, SchemaItemUnitProps, SchemaProps, SchemaReferenceProps, StructArrayPropertyProps, StructClassProps,\n StructPropertyProps, UnitSystemProps,\n} from \"./JsonProps\";\nimport { ECSpecVersion, SchemaReadHelper } from \"./Helper\";\n\ninterface UnknownObject { readonly [name: string]: unknown }\nfunction isObject(x: unknown): x is UnknownObject {\n return typeof (x) === \"object\";\n}\n\nconst SCHEMAURL_JSON = \"https://dev\\\\.bentley\\\\.com/json_schemas/ec\";\n\n/** @internal */\nexport class JsonParser extends AbstractParser<UnknownObject> {\n private _rawSchema: UnknownObject;\n private _schemaName?: string;\n private _currentItemFullName?: string;\n\n constructor(rawSchema: Readonly<unknown>) {\n super();\n\n if (!isObject(rawSchema))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `Invalid JSON object.`);\n\n this._rawSchema = rawSchema;\n this._schemaName = rawSchema.name as string | undefined;\n this._ecSpecVersion = JsonParser.parseJSUri(rawSchema.$schema as string);\n }\n\n public get getECSpecVersion(): ECSpecVersion | undefined { return this._ecSpecVersion; }\n\n public static parseJSUri(uri: string): ECSpecVersion | undefined {\n if (uri === undefined)\n return undefined;\n\n const match = uri.match(`^${SCHEMAURL_JSON}/([0-9]+)/ecschema$`);\n if (!match)\n return;\n\n const readVersion = parseInt(match[1][0], 10);\n const writeVersion = parseInt(match[1][1], 10);\n return { readVersion, writeVersion };\n }\n\n /**\n * Type checks Schema and returns SchemaProps interface\n * @param this._rawSchema\n * @returns SchemaProps\n */\n public parseSchema(): SchemaProps {\n if (undefined === this._rawSchema.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema is missing the required 'name' attribute.`);\n if (typeof (this._rawSchema.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECSchema has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined === this._rawSchema.$schema)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required '$schema' attribute.`);\n if (typeof (this._rawSchema.$schema) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid '$schema' attribute. It should be of type 'string'.`);\n\n if (undefined === this._rawSchema.version)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} is missing the required 'version' attribute.`);\n if (typeof (this._rawSchema.version) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'version' attribute. It should be of type 'string'.`);\n\n if (undefined !== this._rawSchema.alias) {\n if (typeof (this._rawSchema.alias) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'alias' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== this._rawSchema.label) {\n if (typeof (this._rawSchema.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== this._rawSchema.description) {\n if (typeof (this._rawSchema.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'description' attribute. It should be of type 'string'.`);\n }\n\n const ecVersions = JsonParser.parseJSUri(this._rawSchema.$schema);\n\n return {\n ...this._rawSchema,\n ecSpecMajorVersion: ecVersions?.readVersion,\n ecSpecMinorVersion: ecVersions?.writeVersion,\n } as SchemaProps;\n }\n\n public *getReferences(): Iterable<SchemaReferenceProps> {\n if (undefined !== this._rawSchema.references) {\n if (!Array.isArray(this._rawSchema.references))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._rawSchema.name} has an invalid 'references' attribute. It should be of type 'object[]'.`);\n\n for (const ref of this._rawSchema.references) {\n yield this.checkSchemaReference(ref);\n }\n }\n }\n\n private checkSchemaReference(jsonObj: Readonly<unknown>): SchemaReferenceProps {\n if (!isObject(jsonObj))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. It should be of type 'object[]'.`);\n if (undefined === jsonObj.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'name' attribute.`);\n if (typeof (jsonObj.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'name' attribute. It should be of type 'string'.`);\n if (undefined === jsonObj.version)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references is missing the required 'version' attribute.`);\n if (typeof (jsonObj.version) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'references' attribute. One of the references has an invalid 'version' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as SchemaReferenceProps;\n }\n\n public *getItems(): Iterable<[string, string, UnknownObject]> {\n const items = this._rawSchema.items;\n if (undefined !== items) {\n if (!isObject(items) || Array.isArray(items))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\n\n // eslint-disable-next-line guard-for-in\n for (const itemName in items) {\n const item = items[itemName];\n if (!isObject(item))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\n\n if (!ECName.validate(itemName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\n\n if (undefined === item.schemaItemType)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\n if (typeof (item.schemaItemType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\n\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\n yield [itemName, item.schemaItemType, item];\n }\n }\n }\n\n public findItem(itemName: string): [string, string, UnknownObject] | undefined {\n const items = this._rawSchema.items;\n if (undefined !== items) {\n if (!isObject(items) || Array.isArray(items))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The schema ${this._schemaName} has an invalid 'items' attribute. It should be of type 'object'.`);\n\n const item = items[itemName];\n if (undefined !== item) {\n if (!isObject(item))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A SchemaItem in ${this._schemaName} is an invalid JSON object.`);\n\n if (!ECName.validate(itemName))\n throw new ECObjectsError(ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'name' attribute. '${itemName}' is not a valid ECName.`);\n\n if (undefined === item.schemaItemType)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} is missing the required 'schemaItemType' attribute.`);\n if (typeof (item.schemaItemType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._schemaName}.${itemName} has an invalid 'schemaItemType' attribute. It should be of type 'string'.`);\n\n this._currentItemFullName = `${this._schemaName}.${itemName}`;\n return [itemName, item.schemaItemType, item];\n }\n }\n\n return undefined;\n }\n\n /**\n * Type checks all Schema Item attributes.\n * @param jsonObj The JSON object to check if it represents a Schema Item.\n */\n private checkSchemaItemProps(jsonObj: UnknownObject): void {\n if (undefined !== jsonObj.description) {\n if (typeof (jsonObj.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'description' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== jsonObj.label) {\n if (typeof (jsonObj.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The SchemaItem ${this._currentItemFullName} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n }\n\n public *getProperties(jsonObj: UnknownObject, itemName: string): Iterable<[string, string, UnknownObject]> {\n const properties = jsonObj.properties;\n if (undefined !== properties) {\n if (!Array.isArray(properties))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${itemName} has an invalid 'properties' attribute. It should be of type 'object[]'.`);\n\n for (const property of properties as unknown[]) {\n if (!isObject(property))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is an invalid JSON object.`);\n\n if (undefined === property.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} is missing the required 'name' attribute.`);\n if (typeof (property.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `An ECProperty in ${itemName} has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined === property.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} does not have the required 'type' attribute.`);\n if (typeof (property.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. It should be of type 'string'.`);\n if (!this.isValidPropertyType(property.type)) {\n if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))\n return;\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);\n }\n\n yield [property.name, property.type, property];\n }\n }\n }\n\n /**\n * Type checks Class and returns ClassProps interface\n * @param jsonObj The JSON object to check if it represents a Class.\n */\n private checkClassProps(jsonObj: UnknownObject): void {\n this.checkSchemaItemProps(jsonObj);\n\n if (undefined !== jsonObj.modifier) {\n if (typeof (jsonObj.modifier) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'modifier' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== jsonObj.baseClass) {\n if (typeof (jsonObj.baseClass) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'baseClass' attribute. It should be of type 'string'.`);\n }\n if (undefined !== jsonObj.customAttributes) {\n if (!Array.isArray(jsonObj.customAttributes)) {\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECClass ${this._currentItemFullName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n }\n }\n }\n\n /**\n * Type checks entity class and returns EntityClassProps interface\n * @param jsonObj\n * @returns EntityClassProps\n */\n public parseEntityClass(jsonObj: UnknownObject): EntityClassProps {\n this.checkClassProps(jsonObj);\n\n if (undefined !== jsonObj.mixins) {\n if (!Array.isArray(jsonObj.mixins))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\n for (const mixinName of jsonObj.mixins) {\n if (typeof (mixinName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);\n }\n }\n\n return {\n ...jsonObj,\n originalECSpecMajorVersion : this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as EntityClassProps;\n }\n\n /**\n * Type checks mixin and returns MixinProps interface\n * @param jsonObj\n * @returns MixinProps\n */\n public parseMixin(jsonObj: UnknownObject): MixinProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.appliesTo)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\n if (typeof (jsonObj.appliesTo) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as MixinProps;\n }\n\n /**\n * Type checks custom attribute class and returns CustomAttributeClassProps interface\n * @param jsonObj\n * @returns CustomAttributeClassProps\n */\n public parseCustomAttributeClass(jsonObj: UnknownObject): CustomAttributeClassProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.appliesTo)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);\n if (typeof (jsonObj.appliesTo) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as CustomAttributeClassProps;\n }\n\n public parseStructClass(jsonObj: UnknownObject): StructClassProps {\n this.checkClassProps(jsonObj);\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as StructClassProps;\n }\n\n public parseUnitSystem(jsonObj: UnknownObject): UnitSystemProps {\n this.checkSchemaItemProps(jsonObj);\n return jsonObj as UnitSystemProps;\n }\n\n /**\n * Type checks Relationship Class and returns RelationshipClassProps interface\n * @param jsonObj\n * @returns RelationshipClassProps\n */\n public parseRelationshipClass(jsonObj: UnknownObject): RelationshipClassProps {\n this.checkClassProps(jsonObj);\n if (undefined === jsonObj.strength)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strength' attribute.`);\n if (typeof (jsonObj.strength) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strength' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.strengthDirection)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required 'strengthDirection' attribute.`);\n if (typeof (jsonObj.strengthDirection) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid 'strengthDirection' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.source)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required source constraint.`);\n if (!isObject(jsonObj.source))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid source constraint. It should be of type 'object'.`);\n this.checkRelationshipConstraintProps(jsonObj.source, true);\n\n if (undefined === jsonObj.target)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} is missing the required target constraint.`);\n if (!isObject(jsonObj.target))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid target constraint. It should be of type 'object'.`);\n this.checkRelationshipConstraintProps(jsonObj.target, false);\n\n return {\n ...jsonObj,\n originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,\n originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,\n } as unknown as RelationshipClassProps;\n }\n\n /**\n * Type checks Relationship Constraint and returns RelationshipConstraintProps interface.\n * @param jsonObj\n * @param isSource For sake of error message, is this relationship constraint a source or target\n * @returns RelationshipConstraintProps\n */\n private checkRelationshipConstraintProps(jsonObj: UnknownObject, isSource: boolean): void {\n const constraintName = `${(isSource) ? \"Source\" : \"Target\"} Constraint of ${this._currentItemFullName}`; // most specific name to call RelationshipConstraint\n\n if (undefined === jsonObj.multiplicity)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'multiplicity' attribute.`);\n if (typeof (jsonObj.multiplicity) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'multiplicity' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.roleLabel)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'roleLabel' attribute.`);\n if (typeof (jsonObj.roleLabel) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'roleLabel' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.polymorphic)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'polymorphic' attribute.`);\n if (typeof (jsonObj.polymorphic) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'polymorphic' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.abstractConstraint && typeof (jsonObj.abstractConstraint) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'abstractConstraint' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.constraintClasses)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} is missing the required 'constraintClasses' attribute.`);\n if (!Array.isArray(jsonObj.constraintClasses))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\n\n for (const constraintClassName of jsonObj.constraintClasses) {\n if (typeof (constraintClassName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'constraintClasses' attribute. It should be of type 'string[]'.`);\n }\n\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${constraintName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n }\n\n /**\n * Type checks Enumeration and returns EnumerationProps interface\n * @param jsonObj\n * @returns EnumerationProps\n */\n public parseEnumeration(jsonObj: UnknownObject): EnumerationProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'type' attribute.`);\n if (typeof (jsonObj.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\n\n const isValidEnumerationType = (type: string): boolean => {\n type = type.toLowerCase();\n return (type === \"int\") ||\n (type === \"integer\") ||\n (type === \"string\");\n };\n if (!isValidEnumerationType(jsonObj.type)) {\n if (SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))\n (jsonObj as any).type = \"string\";\n else\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either \"int\" or \"string\".`);\n }\n\n if (undefined !== jsonObj.isStrict) { // TODO: make required\n if (typeof (jsonObj.isStrict) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'isStrict' attribute. It should be of type 'boolean'.`);\n }\n\n if (undefined === jsonObj.enumerators)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} is missing the required 'enumerators' attribute.`);\n if (!Array.isArray(jsonObj.enumerators))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\n\n for (const enumerator of jsonObj.enumerators) {\n if (!isObject(enumerator))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'enumerators' attribute. It should be of type 'object[]'.`);\n\n if (undefined === enumerator.value)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'value'.`);\n\n // TODO: Should this really be handled here?\n const expectedType = jsonObj.type;\n const receivedType = (typeof (enumerator.value) === \"number\") ? \"int\" : typeof (enumerator.value);\n if (!expectedType.includes(receivedType)) // is receivedType a substring of expectedType? - easiest way to check \"int\" === \"int\" | \"integer\" && \"string\" === \"string\"\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an incompatible type. It must be \"${expectedType}\", not \"${receivedType}\".`);\n\n if (undefined === enumerator.name)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator that is missing the required attribute 'name'.`);\n if (typeof (enumerator.name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined !== enumerator.label) {\n if (typeof (enumerator.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'label' attribute. It should be of type 'string'.`);\n }\n\n if (undefined !== enumerator.description) {\n if (typeof (enumerator.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an enumerator with an invalid 'description' attribute. It should be of type 'string'.`);\n }\n }\n\n return (jsonObj as unknown) as EnumerationProps;\n }\n\n /**\n * Type checks KindOfQuantity and returns KindOfQuantityProps interface\n * @param jsonObj\n * @returns KindOfQuantityProps\n */\n public parseKindOfQuantity(jsonObj: UnknownObject): KindOfQuantityProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.relativeError)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'relativeError' attribute.`);\n if (typeof (jsonObj.relativeError) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'relativeError' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.presentationUnits) {\n if (!Array.isArray(jsonObj.presentationUnits) && typeof (jsonObj.presentationUnits) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'presentationUnits' attribute. It should be of type 'string' or 'string[]'.`);\n }\n\n if (undefined === jsonObj.persistenceUnit)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} is missing the required 'persistenceUnit' attribute.`);\n if (typeof (jsonObj.persistenceUnit) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The KindOfQuantity ${this._currentItemFullName} has an invalid 'persistenceUnit' attribute. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as KindOfQuantityProps;\n }\n\n /**\n * Type checks Property Category and returns PropertyCategoryProps interface\n * @param jsonObj\n * @returns PropertyCategoryProps\n */\n public parsePropertyCategory(jsonObj: UnknownObject): PropertyCategoryProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined !== jsonObj.priority) { // TODO: make required\n if (typeof (jsonObj.priority) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The PropertyCategory ${this._currentItemFullName} has an invalid 'priority' attribute. It should be of type 'number'.`);\n }\n\n return (jsonObj as unknown) as PropertyCategoryProps;\n }\n\n /**\n * Type checks unit and returns UnitProps interface\n * @param jsonObj\n * @returns UnitProps\n */\n public parseUnit(jsonObj: UnknownObject): SchemaItemUnitProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.phenomenon)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\n if (typeof (jsonObj.phenomenon) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.unitSystem)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\n if (typeof (jsonObj.unitSystem) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.numerator) {\n if (typeof (jsonObj.numerator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.denominator) {\n if (typeof (jsonObj.denominator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.offset) {\n if (typeof (jsonObj.offset) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Unit ${this._currentItemFullName} has an invalid 'offset' attribute. It should be of type 'number'.`);\n }\n return (jsonObj as unknown) as SchemaItemUnitProps;\n }\n\n /**\n * Type checks inverted unit and returns InvertedUnitProps interface\n * @param jsonObj\n * @returns InvertedUnitProps\n */\n public parseInvertedUnit(jsonObj: UnknownObject): InvertedUnitProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.invertsUnit)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'invertsUnit' attribute.`);\n if (typeof (jsonObj.invertsUnit) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'invertsUnit' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.unitSystem)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} does not have the required 'unitSystem' attribute.`);\n if (typeof (jsonObj.unitSystem) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The InvertedUnit ${this._currentItemFullName} has an invalid 'unitSystem' attribute. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as InvertedUnitProps;\n }\n\n /**\n * Type checks constant and returns ConstantProps interface\n * @param jsonObj\n * @returns ConstantProps\n */\n public parseConstant(jsonObj: UnknownObject): ConstantProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.phenomenon)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'phenomenon' attribute.`);\n if (typeof (jsonObj.phenomenon) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'phenomenon' attribute. It should be of type 'string'.`);\n\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.numerator) {\n if (typeof (jsonObj.numerator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'numerator' attribute. It should be of type 'number'.`);\n }\n\n if (undefined !== jsonObj.denominator) {\n if (typeof (jsonObj.denominator) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Constant ${this._currentItemFullName} has an invalid 'denominator' attribute. It should be of type 'number'.`);\n }\n\n return (jsonObj as unknown) as ConstantProps;\n }\n\n /**\n * Type checks phenomenon and returns PhenomenonProps interface\n * @param jsonObj\n * @returns PhenomenonProps\n */\n public parsePhenomenon(jsonObj: UnknownObject): PhenomenonProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.definition)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} does not have the required 'definition' attribute.`);\n if (typeof (jsonObj.definition) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this._currentItemFullName} has an invalid 'definition' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as PhenomenonProps;\n }\n\n /**\n * Type checks format and returns SchemaItemFormatProps interface\n * @param jsonObj\n * @returns SchemaItemFormatProps\n */\n public parseFormat(jsonObj: UnknownObject): SchemaItemFormatProps {\n this.checkSchemaItemProps(jsonObj);\n if (undefined === jsonObj.type)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} does not have the required 'type' attribute.`);\n if (typeof (jsonObj.type) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'type' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.precision && typeof (jsonObj.precision) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'precision' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.roundFactor && typeof (jsonObj.roundFactor) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'roundFactor' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.minWidth && typeof (jsonObj.minWidth) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'minWidth' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.showSignOption && typeof (jsonObj.showSignOption) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'showSignOption' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.formatTraits) {\n if (!Array.isArray(jsonObj.formatTraits) && typeof (jsonObj.formatTraits) !== \"string\") // must be either an array of strings or a string\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'formatTraits' attribute. It should be of type 'string' or 'string[]'.`);\n }\n\n if (undefined !== jsonObj.decimalSeparator && typeof (jsonObj.decimalSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'decimalSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.thousandSeparator && typeof (jsonObj.thousandSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'thousandSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.uomSeparator && typeof (jsonObj.uomSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'uomSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.scientificType && typeof (jsonObj.scientificType) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'scientificType' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.stationOffsetSize && typeof (jsonObj.stationOffsetSize) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationOffsetSize' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.stationSeparator && typeof (jsonObj.stationSeparator) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'stationSeparator' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.composite) { // optional\n if (!isObject(jsonObj.composite))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'composite' object.`);\n if (undefined !== jsonObj.composite.includeZero && typeof (jsonObj.composite.includeZero) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'includeZero' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.composite.spacer && typeof (jsonObj.composite.spacer) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'spacer' attribute. It should be of type 'string'.`);\n\n // if composite is defined\n if (undefined === jsonObj.composite.units)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has an invalid 'Composite' attribute. It should have 1-4 units.`);\n if (!Array.isArray(jsonObj.composite.units))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\n\n for (let i = 0; i < jsonObj.composite.units.length; i++) {\n if (!isObject(jsonObj.composite.units[i]))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. It should be of type 'object[]'.`);\n\n if (undefined === jsonObj.composite.units[i].name) // required\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} is missing the required 'name' attribute.`);\n if (typeof (jsonObj.composite.units[i].name) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'name' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.composite.units[i].label && typeof (jsonObj.composite.units[i].label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Format ${this._currentItemFullName} has a Composite with an invalid 'units' attribute. The object at position ${i} has an invalid 'label' attribute. It should be of type 'string'.`);\n }\n }\n return (jsonObj as unknown) as SchemaItemFormatProps;\n }\n\n private isValidPropertyType(type: string): boolean {\n type = type.toLowerCase();\n return (type === \"primitiveproperty\") ||\n (type === \"structproperty\") ||\n (type === \"primitivearrayproperty\") ||\n (type === \"structarrayproperty\") ||\n (type === \"navigationproperty\");\n }\n\n /**\n * Type checks property and returns PropertyProps interface\n * @param jsonObj\n * @returns PropertyProps\n */\n private checkPropertyProps(jsonObj: UnknownObject): PropertyProps {\n const propName = jsonObj.name;\n\n if (undefined !== jsonObj.label && typeof (jsonObj.label) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'label' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.description && typeof (jsonObj.description) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'description' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.priority && typeof (jsonObj.priority) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'priority' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.isReadOnly && typeof (jsonObj.isReadOnly) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'isReadOnly' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.category && typeof (jsonObj.category) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'category' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.kindOfQuantity && typeof (jsonObj.kindOfQuantity) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'kindOfQuantity' attribute. It should be of type 'string'.`);\n\n if (undefined !== jsonObj.inherited && typeof (jsonObj.inherited) !== \"boolean\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'inherited' attribute. It should be of type 'boolean'.`);\n\n if (undefined !== jsonObj.customAttributes && !Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'customAttributes' attribute. It should be of type 'array'.`);\n return (jsonObj as unknown) as PropertyProps;\n }\n\n private checkPropertyTypename(jsonObj: UnknownObject): void {\n const propName = jsonObj.name;\n if (undefined === jsonObj.typeName)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} is missing the required 'typeName' attribute.`);\n if (typeof (jsonObj.typeName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'typeName' attribute. It should be of type 'string'.`);\n }\n\n private checkPropertyMinAndMaxOccurs(jsonObj: UnknownObject): void {\n const propName = jsonObj.name;\n if (undefined !== jsonObj.minOccurs && typeof (jsonObj.minOccurs) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minOccurs' attribute. It should be of type 'number'.`);\n if (undefined !== jsonObj.maxOccurs && typeof (jsonObj.maxOccurs) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxOccurs' attribute. It should be of type 'number'.`);\n }\n\n /**\n * Type checks PrimitiveOrEnumProperty and returns PrimitiveOrEnumPropertyBaseProps interface\n * @param jsonObj\n * @returns PrimitiveOrEnumPropertyBaseProps\n */\n private checkPrimitiveOrEnumPropertyBaseProps(jsonObj: UnknownObject): PrimitiveOrEnumPropertyBaseProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n const propName = jsonObj.name;\n\n if (undefined !== jsonObj.minLength && typeof (jsonObj.minLength) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minLength' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.maxLength && typeof (jsonObj.maxLength) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxLength' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.minValue && typeof (jsonObj.minValue) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'minValue' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.maxValue && typeof (jsonObj.maxValue) !== \"number\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'maxValue' attribute. It should be of type 'number'.`);\n\n if (undefined !== jsonObj.extendedTypeName && typeof (jsonObj.extendedTypeName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${this._currentItemFullName}.${propName} has an invalid 'extendedTypeName' attribute. It should be of type 'string'.`);\n return (jsonObj as unknown) as PrimitiveOrEnumPropertyBaseProps;\n }\n\n /**\n * Type checks PrimitiveProperty and returns PrimitivePropertyProps interface\n * @param jsonObj\n * @returns PrimitivePropertyProps\n */\n public parsePrimitiveProperty(jsonObj: UnknownObject): PrimitivePropertyProps {\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\n return (jsonObj as unknown) as PrimitivePropertyProps;\n }\n\n /**\n * Type checks StructProperty and returns StructPropertyProps interface\n * @param jsonObj\n * @returns StructPropertyProps\n */\n public parseStructProperty(jsonObj: UnknownObject): StructPropertyProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n return (jsonObj as unknown) as StructPropertyProps;\n }\n\n /**\n * Type checks PrimitiveArrayProperty and returns PrimitiveArrayPropertyProps interface\n * @param jsonObj\n * @returns PrimitiveArrayPropertyProps\n */\n public parsePrimitiveArrayProperty(jsonObj: UnknownObject): PrimitiveArrayPropertyProps {\n this.checkPrimitiveOrEnumPropertyBaseProps(jsonObj);\n this.checkPropertyMinAndMaxOccurs(jsonObj);\n return (jsonObj as unknown) as PrimitiveArrayPropertyProps;\n }\n\n /**\n * Type checks StructArrayProperty and returns StructArrayPropertyProps interface\n * @param jsonObj\n * @returns StructArrayPropertyProps\n */\n public parseStructArrayProperty(jsonObj: UnknownObject): StructArrayPropertyProps {\n this.checkPropertyProps(jsonObj);\n this.checkPropertyTypename(jsonObj);\n this.checkPropertyMinAndMaxOccurs(jsonObj);\n return (jsonObj as unknown) as StructArrayPropertyProps;\n }\n\n /**\n * Type checks NavigationProperty and returns NavigationPropertyProps interface\n * @param jsonObj\n * @returns NavigationPropertyProps\n */\n public parseNavigationProperty(jsonObj: UnknownObject): NavigationPropertyProps {\n this.checkPropertyProps(jsonObj);\n const fullname = `${this._currentItemFullName}.${jsonObj.name}`;\n\n if (undefined === jsonObj.relationshipName)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'relationshipName' property.`);\n if (typeof (jsonObj.relationshipName) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'relationshipName' property. It should be of type 'string'.`);\n\n if (undefined === jsonObj.direction)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} is missing the required 'direction' property.`);\n if (typeof (jsonObj.direction) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Navigation Property ${fullname} has an invalid 'direction' property. It should be of type 'string'.`);\n\n return (jsonObj as unknown) as NavigationPropertyProps;\n }\n\n public getSchemaCustomAttributeProviders(): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(this._rawSchema, \"Schema\", this._schemaName);\n }\n\n public getClassCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(jsonObj, \"ECClass\", this._currentItemFullName);\n }\n\n public getPropertyCustomAttributeProviders(jsonObj: UnknownObject): Iterable<CAProviderTuple> {\n return this.getCustomAttributeProviders(jsonObj, \"ECProperty\", `${this._currentItemFullName}.${jsonObj.name}`);\n }\n\n public getRelationshipConstraintCustomAttributeProviders(jsonObj: UnknownObject): [Iterable<CAProviderTuple> /* source */, Iterable<CAProviderTuple> /* target */] {\n const sourceCustomAttributes = this.getCustomAttributeProviders(jsonObj.source as UnknownObject, \"Source Constraint of\", this._currentItemFullName);\n const targetCustomAttributes = this.getCustomAttributeProviders(jsonObj.target as UnknownObject, \"Target Constraint of\", this._currentItemFullName);\n return [sourceCustomAttributes, targetCustomAttributes];\n }\n\n private *getCustomAttributeProviders(jsonObj: UnknownObject, type: string, name?: string): Iterable<CAProviderTuple> {\n if (undefined !== jsonObj.customAttributes) {\n if (!Array.isArray(jsonObj.customAttributes))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\n\n for (const instance of jsonObj.customAttributes) {\n if (!isObject(instance) || Array.isArray(instance))\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ${type} ${name} has an invalid 'customAttributes' attribute. It should be of type 'object[]'.`);\n if (undefined === instance.className)\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes is missing the required 'className' attribute.`);\n if (typeof (instance.className) !== \"string\")\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `A CustomAttribute in ${name}.customAttributes has an invalid 'className' attribute. It should be of type 'string'.`);\n\n const provider = (_caClass: CustomAttributeClass) => {\n return instance as CustomAttribute;\n };\n\n const caTuple: CAProviderTuple = [instance.className, provider];\n yield caTuple;\n }\n }\n }\n}\n"]}
@@ -31,6 +31,8 @@ export interface SchemaProps {
31
31
  readonly customAttributes?: Array<{
32
32
  [value: string]: any;
33
33
  }>;
34
+ readonly ecSpecMajorVersion?: number;
35
+ readonly ecSpecMinorVersion?: number;
34
36
  }
35
37
  /**
36
38
  * JSON Object interface used to deserialize into a [[SchemaKey]].
@@ -67,6 +69,8 @@ export interface SchemaItemProps {
67
69
  readonly customAttributes?: Array<{
68
70
  [value: string]: any;
69
71
  }>;
72
+ readonly originalECSpecMajorVersion?: number;
73
+ readonly originalECSpecMinorVersion?: number;
70
74
  }
71
75
  /**
72
76
  * @beta
@@ -1 +1 @@
1
- {"version":3,"file":"JsonProps.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/JsonProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,mBAAmB,GAAG,2BAA2B,GAAG,wBAAwB,GAAG,uBAAuB,CAAC;AAC/J;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,UAAU,GAAG,yBAAyB,GAAG,sBAAsB,CAAC;AAC/G;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,aAAa,GAAG,eAAe,GAAG,qBAAqB,GAAG,6BAA6B,CAAC;AAEpP;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,oBA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