@itwin/ecschema-metadata 4.10.0-dev.37 → 4.10.0-dev.39

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 (71) hide show
  1. package/lib/cjs/Deserialization/AbstractParser.d.ts +3 -0
  2. package/lib/cjs/Deserialization/AbstractParser.d.ts.map +1 -1
  3. package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
  4. package/lib/cjs/Deserialization/Helper.d.ts +9 -0
  5. package/lib/cjs/Deserialization/Helper.d.ts.map +1 -1
  6. package/lib/cjs/Deserialization/Helper.js +24 -6
  7. package/lib/cjs/Deserialization/Helper.js.map +1 -1
  8. package/lib/cjs/Deserialization/JsonParser.d.ts +3 -0
  9. package/lib/cjs/Deserialization/JsonParser.d.ts.map +1 -1
  10. package/lib/cjs/Deserialization/JsonParser.js +55 -9
  11. package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
  12. package/lib/cjs/Deserialization/JsonProps.d.ts +4 -0
  13. package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
  14. package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
  15. package/lib/cjs/Deserialization/XmlParser.d.ts +3 -2
  16. package/lib/cjs/Deserialization/XmlParser.d.ts.map +1 -1
  17. package/lib/cjs/Deserialization/XmlParser.js +29 -12
  18. package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
  19. package/lib/cjs/Exception.d.ts +2 -1
  20. package/lib/cjs/Exception.d.ts.map +1 -1
  21. package/lib/cjs/Exception.js +1 -0
  22. package/lib/cjs/Exception.js.map +1 -1
  23. package/lib/cjs/Metadata/Class.d.ts.map +1 -1
  24. package/lib/cjs/Metadata/Class.js +10 -3
  25. package/lib/cjs/Metadata/Class.js.map +1 -1
  26. package/lib/cjs/Metadata/Enumeration.d.ts.map +1 -1
  27. package/lib/cjs/Metadata/Enumeration.js +11 -4
  28. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  29. package/lib/cjs/Metadata/RelationshipClass.d.ts.map +1 -1
  30. package/lib/cjs/Metadata/RelationshipClass.js +8 -3
  31. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  32. package/lib/cjs/Metadata/Schema.d.ts +9 -0
  33. package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
  34. package/lib/cjs/Metadata/Schema.js +74 -7
  35. package/lib/cjs/Metadata/Schema.js.map +1 -1
  36. package/lib/esm/Deserialization/AbstractParser.d.ts +3 -0
  37. package/lib/esm/Deserialization/AbstractParser.d.ts.map +1 -1
  38. package/lib/esm/Deserialization/AbstractParser.js.map +1 -1
  39. package/lib/esm/Deserialization/Helper.d.ts +9 -0
  40. package/lib/esm/Deserialization/Helper.d.ts.map +1 -1
  41. package/lib/esm/Deserialization/Helper.js +24 -6
  42. package/lib/esm/Deserialization/Helper.js.map +1 -1
  43. package/lib/esm/Deserialization/JsonParser.d.ts +3 -0
  44. package/lib/esm/Deserialization/JsonParser.d.ts.map +1 -1
  45. package/lib/esm/Deserialization/JsonParser.js +55 -9
  46. package/lib/esm/Deserialization/JsonParser.js.map +1 -1
  47. package/lib/esm/Deserialization/JsonProps.d.ts +4 -0
  48. package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
  49. package/lib/esm/Deserialization/JsonProps.js.map +1 -1
  50. package/lib/esm/Deserialization/XmlParser.d.ts +3 -2
  51. package/lib/esm/Deserialization/XmlParser.d.ts.map +1 -1
  52. package/lib/esm/Deserialization/XmlParser.js +29 -12
  53. package/lib/esm/Deserialization/XmlParser.js.map +1 -1
  54. package/lib/esm/Exception.d.ts +2 -1
  55. package/lib/esm/Exception.d.ts.map +1 -1
  56. package/lib/esm/Exception.js +1 -0
  57. package/lib/esm/Exception.js.map +1 -1
  58. package/lib/esm/Metadata/Class.d.ts.map +1 -1
  59. package/lib/esm/Metadata/Class.js +10 -3
  60. package/lib/esm/Metadata/Class.js.map +1 -1
  61. package/lib/esm/Metadata/Enumeration.d.ts.map +1 -1
  62. package/lib/esm/Metadata/Enumeration.js +11 -4
  63. package/lib/esm/Metadata/Enumeration.js.map +1 -1
  64. package/lib/esm/Metadata/RelationshipClass.d.ts.map +1 -1
  65. package/lib/esm/Metadata/RelationshipClass.js +8 -3
  66. package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
  67. package/lib/esm/Metadata/Schema.d.ts +9 -0
  68. package/lib/esm/Metadata/Schema.d.ts.map +1 -1
  69. package/lib/esm/Metadata/Schema.js +74 -7
  70. package/lib/esm/Metadata/Schema.js.map +1 -1
  71. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"JsonParser.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/JsonParser.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EACL,aAAa,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,UAAU,EAChI,uBAAuB,EAAE,eAAe,EAAE,2BAA2B,EAAoC,sBAAsB,EAC/H,qBAAqB,EAAiB,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,WAAW,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,gBAAgB,EACvL,mBAAmB,EAAE,eAAe,EACrC,MAAM,aAAa,CAAC;AAErB,UAAU,aAAa;IAAG,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE;AAK5D,gBAAgB;AAChB,qBAAa,UAAW,SAAQ,cAAc,CAAC,aAAa,CAAC;IAC3D,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,oBAAoB,CAAC,CAAS;gBAE1B,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC;IAUxC;;;;OAIG;IACI,WAAW,IAAI,WAAW;IAkCzB,aAAa,IAAI,QAAQ,CAAC,oBAAoB,CAAC;IAWvD,OAAO,CAAC,o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;IAMvE;;;;OAIG;IACI,2BAA2B,CAAC,OAAO,EAAE,aAAa,GAAG,2BAA2B;IAMvF;;;;OAIG;IACI,wBAAwB,CAAC,OAAO,EAAE,aAAa,GAAG,wBAAwB;IAOjF;;;;OAIG;IACI,uBAAuB,CAAC,OAAO,EAAE,aAAa,GAAG,uBAAuB;IAiBxE,iCAAiC,IAAI,QAAQ,CAAC,eAAe,CAAC;IAI9D,gCAAgC,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAAC,eAAe,CAAC;IAInF,mCAAmC,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAAC,eAAe,CAAC;IAItF,iDAAiD,CAAC,OAAO,EAAE,aAAa,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAe,QAAQ,CAAC,eAAe,CAAC,CAAc;IAMlK,OAAO,CAAE,2BAA2B;CAsBrC"}
@@ -8,9 +8,11 @@ exports.JsonParser = void 0;
8
8
  const Exception_1 = require("../Exception");
9
9
  const ECName_1 = require("../ECName");
10
10
  const AbstractParser_1 = require("./AbstractParser");
11
+ const Helper_1 = require("./Helper");
11
12
  function isObject(x) {
12
13
  return typeof (x) === "object";
13
14
  }
15
+ const SCHEMAURL_JSON = "https://dev\\.bentley\\.com/json_schemas/ec";
14
16
  /** @internal */
15
17
  class JsonParser extends AbstractParser_1.AbstractParser {
16
18
  constructor(rawSchema) {
@@ -19,6 +21,18 @@ class JsonParser extends AbstractParser_1.AbstractParser {
19
21
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `Invalid JSON object.`);
20
22
  this._rawSchema = rawSchema;
21
23
  this._schemaName = rawSchema.name;
24
+ this._ecSpecVersion = JsonParser.parseJSUri(rawSchema.$schema);
25
+ }
26
+ get getECSpecVersion() { return this._ecSpecVersion; }
27
+ static parseJSUri(uri) {
28
+ if (uri === undefined)
29
+ return undefined;
30
+ const match = uri.match(`^${SCHEMAURL_JSON}/([0-9]+)/ecschema$`);
31
+ if (!match)
32
+ return;
33
+ const readVersion = parseInt(match[1][0], 10);
34
+ const writeVersion = parseInt(match[1][1], 10);
35
+ return { readVersion, writeVersion };
22
36
  }
23
37
  /**
24
38
  * Type checks Schema and returns SchemaProps interface
@@ -50,7 +64,12 @@ class JsonParser extends AbstractParser_1.AbstractParser {
50
64
  if (typeof (this._rawSchema.description) !== "string")
51
65
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'description' attribute. It should be of type 'string'.`);
52
66
  }
53
- return this._rawSchema;
67
+ const ecVersions = JsonParser.parseJSUri(this._rawSchema.$schema);
68
+ return {
69
+ ...this._rawSchema,
70
+ ecSpecMajorVersion: ecVersions?.readVersion,
71
+ ecSpecMinorVersion: ecVersions?.writeVersion,
72
+ };
54
73
  }
55
74
  *getReferences() {
56
75
  if (undefined !== this._rawSchema.references) {
@@ -146,8 +165,11 @@ class JsonParser extends AbstractParser_1.AbstractParser {
146
165
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} does not have the required 'type' attribute.`);
147
166
  if (typeof (property.type) !== "string")
148
167
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. It should be of type 'string'.`);
149
- if (!this.isValidPropertyType(property.type))
168
+ if (!this.isValidPropertyType(property.type)) {
169
+ if (Helper_1.SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
170
+ return;
150
171
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);
172
+ }
151
173
  yield [property.name, property.type, property];
152
174
  }
153
175
  }
@@ -187,7 +209,11 @@ class JsonParser extends AbstractParser_1.AbstractParser {
187
209
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);
188
210
  }
189
211
  }
190
- return jsonObj;
212
+ return {
213
+ ...jsonObj,
214
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
215
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
216
+ };
191
217
  }
192
218
  /**
193
219
  * Type checks mixin and returns MixinProps interface
@@ -200,7 +226,11 @@ class JsonParser extends AbstractParser_1.AbstractParser {
200
226
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);
201
227
  if (typeof (jsonObj.appliesTo) !== "string")
202
228
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);
203
- return jsonObj;
229
+ return {
230
+ ...jsonObj,
231
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
232
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
233
+ };
204
234
  }
205
235
  /**
206
236
  * Type checks custom attribute class and returns CustomAttributeClassProps interface
@@ -213,11 +243,19 @@ class JsonParser extends AbstractParser_1.AbstractParser {
213
243
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);
214
244
  if (typeof (jsonObj.appliesTo) !== "string")
215
245
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);
216
- return jsonObj;
246
+ return {
247
+ ...jsonObj,
248
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
249
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
250
+ };
217
251
  }
218
252
  parseStructClass(jsonObj) {
219
253
  this.checkClassProps(jsonObj);
220
- return jsonObj;
254
+ return {
255
+ ...jsonObj,
256
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
257
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
258
+ };
221
259
  }
222
260
  parseUnitSystem(jsonObj) {
223
261
  this.checkSchemaItemProps(jsonObj);
@@ -248,7 +286,11 @@ class JsonParser extends AbstractParser_1.AbstractParser {
248
286
  if (!isObject(jsonObj.target))
249
287
  throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid target constraint. It should be of type 'object'.`);
250
288
  this.checkRelationshipConstraintProps(jsonObj.target, false);
251
- return jsonObj;
289
+ return {
290
+ ...jsonObj,
291
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
292
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
293
+ };
252
294
  }
253
295
  /**
254
296
  * Type checks Relationship Constraint and returns RelationshipConstraintProps interface.
@@ -300,8 +342,12 @@ class JsonParser extends AbstractParser_1.AbstractParser {
300
342
  (type === "integer") ||
301
343
  (type === "string");
302
344
  };
303
- if (!isValidEnumerationType(jsonObj.type))
304
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either "int" or "string".`);
345
+ if (!isValidEnumerationType(jsonObj.type)) {
346
+ if (Helper_1.SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
347
+ jsonObj.type = "string";
348
+ else
349
+ throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either "int" or "string".`);
350
+ }
305
351
  if (undefined !== jsonObj.isStrict) { // TODO: make required
306
352
  if (typeof (jsonObj.isStrict) !== "boolean")
307
353
  throw new Exception_1.ECObjectsError(Exception_1.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,4CAA+D;AAG/D,sCAAmC;AACnC,qDAAmE;AASnE,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED,gBAAgB;AAChB,MAAa,UAAW,SAAQ,+BAA6B;IAK3D,YAAY,SAA4B;QACtC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YACtB,MAAM,IAAI,0BAAc,CAAC,2BAAe,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,0BAAc,CAAC,2BAAe,CAAC,aAAa,EAAE,uDAAuD,CAAC,CAAC;QACnH,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,QAAQ;YAC5C,MAAM,IAAI,0BAAc,CAAC,2BAAe,CAAC,aAAa,EAAE,6EAA6E,CAAC,CAAC;QAEzI,IAAI,SAAS,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO;YACvC,MAAM,IAAI,0BAAc,CAAC,2BAAe,CAAC,aAAa,EAAE,gBAAgB,IAAI,CAAC,WAAW,+CAA+C,CAAC,CAAC;QAC3I,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,QAAQ;YAC/C,MAAM,IAAI,0BAAc,CAAC,2BAAe,CAAC,aAAa,EAAE,gBAAgB,IAAI,CAAC,WAAW,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AAoB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBAChE,MAAM,OAAO,CAAC;YAChB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AApyBD,gCAoyBC","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\";\n\ninterface UnknownObject { readonly [name: string]: unknown }\nfunction isObject(x: unknown): x is UnknownObject {\n return typeof (x) === \"object\";\n}\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 }\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 return (this._rawSchema as unknown) 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 throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);\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 return jsonObj 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 (jsonObj 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 (jsonObj as unknown) as CustomAttributeClassProps;\n }\n\n public parseStructClass(jsonObj: UnknownObject): StructClassProps {\n this.checkClassProps(jsonObj);\n return jsonObj 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 (jsonObj 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 throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either \"int\" or \"string\".`);\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"]}
1
+ {"version":3,"file":"JsonParser.js","sourceRoot":"","sources":["../../../src/Deserialization/JsonParser.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,4CAA+D;AAG/D,sCAAmC;AACnC,qDAAmE;AAOnE,qCAA2D;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,MAAa,UAAW,SAAQ,+BAA6B;IAK3D,YAAY,SAA4B;QACtC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YACtB,MAAM,IAAI,0BAAc,CAAC,2BAAe,CAAC,aAAa,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E,MAAM,OAAO,CAAC;YAChB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAt1BD,gCAs1BC","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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