@itwin/ecschema-metadata 5.0.0-dev.105 → 5.0.0-dev.109

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 (281) hide show
  1. package/lib/cjs/Context.d.ts +3 -3
  2. package/lib/cjs/Context.d.ts.map +1 -1
  3. package/lib/cjs/Context.js +6 -6
  4. package/lib/cjs/Context.js.map +1 -1
  5. package/lib/cjs/DelayedPromise.d.ts +9 -8
  6. package/lib/cjs/DelayedPromise.d.ts.map +1 -1
  7. package/lib/cjs/DelayedPromise.js +2 -2
  8. package/lib/cjs/DelayedPromise.js.map +1 -1
  9. package/lib/cjs/Deserialization/Helper.d.ts.map +1 -1
  10. package/lib/cjs/Deserialization/Helper.js +27 -26
  11. package/lib/cjs/Deserialization/Helper.js.map +1 -1
  12. package/lib/cjs/Deserialization/JsonParser.js +150 -150
  13. package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
  14. package/lib/cjs/Deserialization/JsonProps.d.ts +34 -34
  15. package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
  16. package/lib/cjs/Deserialization/JsonProps.js +3 -3
  17. package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
  18. package/lib/cjs/Deserialization/XmlParser.js +49 -49
  19. package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
  20. package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts +0 -5
  21. package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts.map +1 -1
  22. package/lib/cjs/Deserialization/XmlSerializationUtils.js +6 -11
  23. package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
  24. package/lib/cjs/ECName.d.ts +2 -2
  25. package/lib/cjs/ECName.js +4 -4
  26. package/lib/cjs/ECName.js.map +1 -1
  27. package/lib/cjs/ECObjects.d.ts +23 -11
  28. package/lib/cjs/ECObjects.d.ts.map +1 -1
  29. package/lib/cjs/ECObjects.js +47 -24
  30. package/lib/cjs/ECObjects.js.map +1 -1
  31. package/lib/cjs/Exception.d.ts +4 -4
  32. package/lib/cjs/Exception.d.ts.map +1 -1
  33. package/lib/cjs/Exception.js +60 -60
  34. package/lib/cjs/Exception.js.map +1 -1
  35. package/lib/cjs/Interfaces.d.ts +30 -35
  36. package/lib/cjs/Interfaces.d.ts.map +1 -1
  37. package/lib/cjs/Interfaces.js.map +1 -1
  38. package/lib/cjs/Metadata/Class.d.ts +99 -14
  39. package/lib/cjs/Metadata/Class.d.ts.map +1 -1
  40. package/lib/cjs/Metadata/Class.js +107 -30
  41. package/lib/cjs/Metadata/Class.js.map +1 -1
  42. package/lib/cjs/Metadata/Constant.d.ts +12 -9
  43. package/lib/cjs/Metadata/Constant.d.ts.map +1 -1
  44. package/lib/cjs/Metadata/Constant.js +12 -9
  45. package/lib/cjs/Metadata/Constant.js.map +1 -1
  46. package/lib/cjs/Metadata/CustomAttribute.d.ts +2 -2
  47. package/lib/cjs/Metadata/CustomAttribute.d.ts.map +1 -1
  48. package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
  49. package/lib/cjs/Metadata/CustomAttributeClass.d.ts +5 -3
  50. package/lib/cjs/Metadata/CustomAttributeClass.d.ts.map +1 -1
  51. package/lib/cjs/Metadata/CustomAttributeClass.js +7 -5
  52. package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
  53. package/lib/cjs/Metadata/EntityClass.d.ts +20 -3
  54. package/lib/cjs/Metadata/EntityClass.d.ts.map +1 -1
  55. package/lib/cjs/Metadata/EntityClass.js +30 -12
  56. package/lib/cjs/Metadata/EntityClass.js.map +1 -1
  57. package/lib/cjs/Metadata/Enumeration.d.ts +16 -9
  58. package/lib/cjs/Metadata/Enumeration.d.ts.map +1 -1
  59. package/lib/cjs/Metadata/Enumeration.js +20 -13
  60. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  61. package/lib/cjs/Metadata/Format.d.ts +32 -24
  62. package/lib/cjs/Metadata/Format.d.ts.map +1 -1
  63. package/lib/cjs/Metadata/Format.js +47 -27
  64. package/lib/cjs/Metadata/Format.js.map +1 -1
  65. package/lib/cjs/Metadata/InvertedUnit.d.ts +11 -7
  66. package/lib/cjs/Metadata/InvertedUnit.d.ts.map +1 -1
  67. package/lib/cjs/Metadata/InvertedUnit.js +16 -10
  68. package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
  69. package/lib/cjs/Metadata/KindOfQuantity.d.ts +24 -15
  70. package/lib/cjs/Metadata/KindOfQuantity.d.ts.map +1 -1
  71. package/lib/cjs/Metadata/KindOfQuantity.js +54 -29
  72. package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
  73. package/lib/cjs/Metadata/Mixin.d.ts +16 -3
  74. package/lib/cjs/Metadata/Mixin.d.ts.map +1 -1
  75. package/lib/cjs/Metadata/Mixin.js +20 -7
  76. package/lib/cjs/Metadata/Mixin.js.map +1 -1
  77. package/lib/cjs/Metadata/OverrideFormat.d.ts +12 -12
  78. package/lib/cjs/Metadata/OverrideFormat.d.ts.map +1 -1
  79. package/lib/cjs/Metadata/OverrideFormat.js +27 -19
  80. package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
  81. package/lib/cjs/Metadata/Phenomenon.d.ts +10 -2
  82. package/lib/cjs/Metadata/Phenomenon.d.ts.map +1 -1
  83. package/lib/cjs/Metadata/Phenomenon.js +11 -3
  84. package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
  85. package/lib/cjs/Metadata/Property.d.ts +46 -28
  86. package/lib/cjs/Metadata/Property.d.ts.map +1 -1
  87. package/lib/cjs/Metadata/Property.js +46 -22
  88. package/lib/cjs/Metadata/Property.js.map +1 -1
  89. package/lib/cjs/Metadata/PropertyCategory.d.ts +6 -3
  90. package/lib/cjs/Metadata/PropertyCategory.d.ts.map +1 -1
  91. package/lib/cjs/Metadata/PropertyCategory.js +12 -5
  92. package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
  93. package/lib/cjs/Metadata/RelationshipClass.d.ts +48 -25
  94. package/lib/cjs/Metadata/RelationshipClass.d.ts.map +1 -1
  95. package/lib/cjs/Metadata/RelationshipClass.js +54 -34
  96. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  97. package/lib/cjs/Metadata/Schema.d.ts +50 -28
  98. package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
  99. package/lib/cjs/Metadata/Schema.js +64 -42
  100. package/lib/cjs/Metadata/Schema.js.map +1 -1
  101. package/lib/cjs/Metadata/SchemaItem.d.ts +10 -19
  102. package/lib/cjs/Metadata/SchemaItem.d.ts.map +1 -1
  103. package/lib/cjs/Metadata/SchemaItem.js +12 -20
  104. package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
  105. package/lib/cjs/Metadata/Unit.d.ts +17 -21
  106. package/lib/cjs/Metadata/Unit.d.ts.map +1 -1
  107. package/lib/cjs/Metadata/Unit.js +20 -22
  108. package/lib/cjs/Metadata/Unit.js.map +1 -1
  109. package/lib/cjs/Metadata/UnitSystem.d.ts +3 -1
  110. package/lib/cjs/Metadata/UnitSystem.d.ts.map +1 -1
  111. package/lib/cjs/Metadata/UnitSystem.js +4 -2
  112. package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
  113. package/lib/cjs/PropertyTypes.d.ts +11 -11
  114. package/lib/cjs/PropertyTypes.d.ts.map +1 -1
  115. package/lib/cjs/PropertyTypes.js +28 -20
  116. package/lib/cjs/PropertyTypes.js.map +1 -1
  117. package/lib/cjs/SchemaFormatsProvider.d.ts +39 -0
  118. package/lib/cjs/SchemaFormatsProvider.d.ts.map +1 -0
  119. package/lib/cjs/SchemaFormatsProvider.js +146 -0
  120. package/lib/cjs/SchemaFormatsProvider.js.map +1 -0
  121. package/lib/cjs/SchemaJsonLocater.d.ts +5 -5
  122. package/lib/cjs/SchemaJsonLocater.js +4 -4
  123. package/lib/cjs/SchemaJsonLocater.js.map +1 -1
  124. package/lib/cjs/SchemaKey.d.ts +6 -6
  125. package/lib/cjs/SchemaKey.d.ts.map +1 -1
  126. package/lib/cjs/SchemaKey.js +9 -9
  127. package/lib/cjs/SchemaKey.js.map +1 -1
  128. package/lib/cjs/SchemaLoader.d.ts +3 -3
  129. package/lib/cjs/SchemaLoader.js +4 -4
  130. package/lib/cjs/SchemaLoader.js.map +1 -1
  131. package/lib/cjs/SchemaPartVisitorDelegate.d.ts +2 -2
  132. package/lib/cjs/SchemaPartVisitorDelegate.js +1 -1
  133. package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
  134. package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
  135. package/lib/cjs/ecschema-metadata.d.ts +2 -1
  136. package/lib/cjs/ecschema-metadata.d.ts.map +1 -1
  137. package/lib/cjs/ecschema-metadata.js +1 -0
  138. package/lib/cjs/ecschema-metadata.js.map +1 -1
  139. package/lib/cjs/utils/SchemaGraph.js +3 -3
  140. package/lib/cjs/utils/SchemaGraph.js.map +1 -1
  141. package/lib/esm/Context.d.ts +3 -3
  142. package/lib/esm/Context.d.ts.map +1 -1
  143. package/lib/esm/Context.js +7 -7
  144. package/lib/esm/Context.js.map +1 -1
  145. package/lib/esm/DelayedPromise.d.ts +9 -8
  146. package/lib/esm/DelayedPromise.d.ts.map +1 -1
  147. package/lib/esm/DelayedPromise.js +2 -2
  148. package/lib/esm/DelayedPromise.js.map +1 -1
  149. package/lib/esm/Deserialization/Helper.d.ts.map +1 -1
  150. package/lib/esm/Deserialization/Helper.js +28 -27
  151. package/lib/esm/Deserialization/Helper.js.map +1 -1
  152. package/lib/esm/Deserialization/JsonParser.js +151 -151
  153. package/lib/esm/Deserialization/JsonParser.js.map +1 -1
  154. package/lib/esm/Deserialization/JsonProps.d.ts +34 -34
  155. package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
  156. package/lib/esm/Deserialization/JsonProps.js +3 -3
  157. package/lib/esm/Deserialization/JsonProps.js.map +1 -1
  158. package/lib/esm/Deserialization/XmlParser.js +50 -50
  159. package/lib/esm/Deserialization/XmlParser.js.map +1 -1
  160. package/lib/esm/Deserialization/XmlSerializationUtils.d.ts +0 -5
  161. package/lib/esm/Deserialization/XmlSerializationUtils.d.ts.map +1 -1
  162. package/lib/esm/Deserialization/XmlSerializationUtils.js +7 -12
  163. package/lib/esm/Deserialization/XmlSerializationUtils.js.map +1 -1
  164. package/lib/esm/ECName.d.ts +2 -2
  165. package/lib/esm/ECName.js +5 -5
  166. package/lib/esm/ECName.js.map +1 -1
  167. package/lib/esm/ECObjects.d.ts +23 -11
  168. package/lib/esm/ECObjects.d.ts.map +1 -1
  169. package/lib/esm/ECObjects.js +48 -25
  170. package/lib/esm/ECObjects.js.map +1 -1
  171. package/lib/esm/Exception.d.ts +4 -4
  172. package/lib/esm/Exception.d.ts.map +1 -1
  173. package/lib/esm/Exception.js +58 -58
  174. package/lib/esm/Exception.js.map +1 -1
  175. package/lib/esm/Interfaces.d.ts +30 -35
  176. package/lib/esm/Interfaces.d.ts.map +1 -1
  177. package/lib/esm/Interfaces.js.map +1 -1
  178. package/lib/esm/Metadata/Class.d.ts +99 -14
  179. package/lib/esm/Metadata/Class.d.ts.map +1 -1
  180. package/lib/esm/Metadata/Class.js +108 -31
  181. package/lib/esm/Metadata/Class.js.map +1 -1
  182. package/lib/esm/Metadata/Constant.d.ts +12 -9
  183. package/lib/esm/Metadata/Constant.d.ts.map +1 -1
  184. package/lib/esm/Metadata/Constant.js +13 -10
  185. package/lib/esm/Metadata/Constant.js.map +1 -1
  186. package/lib/esm/Metadata/CustomAttribute.d.ts +2 -2
  187. package/lib/esm/Metadata/CustomAttribute.d.ts.map +1 -1
  188. package/lib/esm/Metadata/CustomAttribute.js.map +1 -1
  189. package/lib/esm/Metadata/CustomAttributeClass.d.ts +5 -3
  190. package/lib/esm/Metadata/CustomAttributeClass.d.ts.map +1 -1
  191. package/lib/esm/Metadata/CustomAttributeClass.js +8 -6
  192. package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
  193. package/lib/esm/Metadata/EntityClass.d.ts +20 -3
  194. package/lib/esm/Metadata/EntityClass.d.ts.map +1 -1
  195. package/lib/esm/Metadata/EntityClass.js +31 -13
  196. package/lib/esm/Metadata/EntityClass.js.map +1 -1
  197. package/lib/esm/Metadata/Enumeration.d.ts +16 -9
  198. package/lib/esm/Metadata/Enumeration.d.ts.map +1 -1
  199. package/lib/esm/Metadata/Enumeration.js +21 -14
  200. package/lib/esm/Metadata/Enumeration.js.map +1 -1
  201. package/lib/esm/Metadata/Format.d.ts +32 -24
  202. package/lib/esm/Metadata/Format.d.ts.map +1 -1
  203. package/lib/esm/Metadata/Format.js +48 -28
  204. package/lib/esm/Metadata/Format.js.map +1 -1
  205. package/lib/esm/Metadata/InvertedUnit.d.ts +11 -7
  206. package/lib/esm/Metadata/InvertedUnit.d.ts.map +1 -1
  207. package/lib/esm/Metadata/InvertedUnit.js +17 -11
  208. package/lib/esm/Metadata/InvertedUnit.js.map +1 -1
  209. package/lib/esm/Metadata/KindOfQuantity.d.ts +24 -15
  210. package/lib/esm/Metadata/KindOfQuantity.d.ts.map +1 -1
  211. package/lib/esm/Metadata/KindOfQuantity.js +55 -30
  212. package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
  213. package/lib/esm/Metadata/Mixin.d.ts +16 -3
  214. package/lib/esm/Metadata/Mixin.d.ts.map +1 -1
  215. package/lib/esm/Metadata/Mixin.js +21 -8
  216. package/lib/esm/Metadata/Mixin.js.map +1 -1
  217. package/lib/esm/Metadata/OverrideFormat.d.ts +12 -12
  218. package/lib/esm/Metadata/OverrideFormat.d.ts.map +1 -1
  219. package/lib/esm/Metadata/OverrideFormat.js +28 -20
  220. package/lib/esm/Metadata/OverrideFormat.js.map +1 -1
  221. package/lib/esm/Metadata/Phenomenon.d.ts +10 -2
  222. package/lib/esm/Metadata/Phenomenon.d.ts.map +1 -1
  223. package/lib/esm/Metadata/Phenomenon.js +12 -4
  224. package/lib/esm/Metadata/Phenomenon.js.map +1 -1
  225. package/lib/esm/Metadata/Property.d.ts +46 -28
  226. package/lib/esm/Metadata/Property.d.ts.map +1 -1
  227. package/lib/esm/Metadata/Property.js +47 -23
  228. package/lib/esm/Metadata/Property.js.map +1 -1
  229. package/lib/esm/Metadata/PropertyCategory.d.ts +6 -3
  230. package/lib/esm/Metadata/PropertyCategory.d.ts.map +1 -1
  231. package/lib/esm/Metadata/PropertyCategory.js +13 -6
  232. package/lib/esm/Metadata/PropertyCategory.js.map +1 -1
  233. package/lib/esm/Metadata/RelationshipClass.d.ts +48 -25
  234. package/lib/esm/Metadata/RelationshipClass.d.ts.map +1 -1
  235. package/lib/esm/Metadata/RelationshipClass.js +55 -35
  236. package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
  237. package/lib/esm/Metadata/Schema.d.ts +50 -28
  238. package/lib/esm/Metadata/Schema.d.ts.map +1 -1
  239. package/lib/esm/Metadata/Schema.js +65 -43
  240. package/lib/esm/Metadata/Schema.js.map +1 -1
  241. package/lib/esm/Metadata/SchemaItem.d.ts +10 -19
  242. package/lib/esm/Metadata/SchemaItem.d.ts.map +1 -1
  243. package/lib/esm/Metadata/SchemaItem.js +13 -21
  244. package/lib/esm/Metadata/SchemaItem.js.map +1 -1
  245. package/lib/esm/Metadata/Unit.d.ts +17 -21
  246. package/lib/esm/Metadata/Unit.d.ts.map +1 -1
  247. package/lib/esm/Metadata/Unit.js +21 -23
  248. package/lib/esm/Metadata/Unit.js.map +1 -1
  249. package/lib/esm/Metadata/UnitSystem.d.ts +3 -1
  250. package/lib/esm/Metadata/UnitSystem.d.ts.map +1 -1
  251. package/lib/esm/Metadata/UnitSystem.js +5 -3
  252. package/lib/esm/Metadata/UnitSystem.js.map +1 -1
  253. package/lib/esm/PropertyTypes.d.ts +11 -11
  254. package/lib/esm/PropertyTypes.d.ts.map +1 -1
  255. package/lib/esm/PropertyTypes.js +29 -21
  256. package/lib/esm/PropertyTypes.js.map +1 -1
  257. package/lib/esm/SchemaFormatsProvider.d.ts +39 -0
  258. package/lib/esm/SchemaFormatsProvider.d.ts.map +1 -0
  259. package/lib/esm/SchemaFormatsProvider.js +142 -0
  260. package/lib/esm/SchemaFormatsProvider.js.map +1 -0
  261. package/lib/esm/SchemaJsonLocater.d.ts +5 -5
  262. package/lib/esm/SchemaJsonLocater.js +4 -4
  263. package/lib/esm/SchemaJsonLocater.js.map +1 -1
  264. package/lib/esm/SchemaKey.d.ts +6 -6
  265. package/lib/esm/SchemaKey.d.ts.map +1 -1
  266. package/lib/esm/SchemaKey.js +10 -10
  267. package/lib/esm/SchemaKey.js.map +1 -1
  268. package/lib/esm/SchemaLoader.d.ts +3 -3
  269. package/lib/esm/SchemaLoader.js +5 -5
  270. package/lib/esm/SchemaLoader.js.map +1 -1
  271. package/lib/esm/SchemaPartVisitorDelegate.d.ts +2 -2
  272. package/lib/esm/SchemaPartVisitorDelegate.js +1 -1
  273. package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -1
  274. package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -1
  275. package/lib/esm/ecschema-metadata.d.ts +2 -1
  276. package/lib/esm/ecschema-metadata.d.ts.map +1 -1
  277. package/lib/esm/ecschema-metadata.js +1 -0
  278. package/lib/esm/ecschema-metadata.js.map +1 -1
  279. package/lib/esm/utils/SchemaGraph.js +4 -4
  280. package/lib/esm/utils/SchemaGraph.js.map +1 -1
  281. package/package.json +8 -6
@@ -11,25 +11,30 @@ import { Schema } from "./Schema";
11
11
  import { SchemaItem } from "./SchemaItem";
12
12
  /**
13
13
  * A common abstract class for all of the ECClass types.
14
- * @beta
14
+ * @public @preview
15
15
  */
16
16
  export declare abstract class ECClass extends SchemaItem implements CustomAttributeContainerProps {
17
+ /** @internal */
17
18
  static get schemaItemType(): SupportedSchemaItemType;
18
- protected _modifier: ECClassModifier;
19
- protected _baseClass?: LazyLoadedECClass;
20
- protected _derivedClasses?: Map<string, LazyLoadedECClass>;
21
- protected _properties?: Map<string, Property>;
19
+ private _modifier;
20
+ private _baseClass?;
21
+ private _derivedClasses?;
22
+ private _properties?;
22
23
  private _customAttributes?;
23
24
  private _mergedPropertyCache?;
24
25
  get modifier(): ECClassModifier;
25
26
  get customAttributes(): CustomAttributeSet | undefined;
27
+ /** @internal */
26
28
  constructor(schema: Schema, name: string, modifier?: ECClassModifier);
27
29
  /**
28
30
  * Gets the base class if it exists, otherwise returns undefined.
29
31
  */
30
32
  get baseClass(): LazyLoadedECClass | undefined;
33
+ getBaseClassSync(): ECClass | undefined;
31
34
  /**
32
35
  * Sets the base class of the ECClass. Pass undefined to 'remove' the base class.
36
+ *
37
+ * @internal
33
38
  */
34
39
  protected setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;
35
40
  /**
@@ -41,21 +46,22 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
41
46
  * Convenience method for adding an already loaded ECProperty used by create*Property methods.
42
47
  * @param prop The property to add.
43
48
  * @return The property that was added.
49
+ *
50
+ * @internal
44
51
  */
45
52
  protected addProperty<T extends Property>(prop: T): T;
46
53
  /**
47
54
  * Deletes a property from within this class.
48
55
  * @param name The property name to delete, lookup is case-insensitive
49
- * @alpha
56
+ * @internal
50
57
  */
51
58
  protected deleteProperty(name: string): Promise<void>;
52
59
  /**
53
60
  * Deletes a property from within this class.
54
61
  * @param name The property name to delete, lookup is case-insensitive
55
- * @alpha
62
+ * @internal
56
63
  */
57
64
  protected deletePropertySync(name: string): void;
58
- getBaseClassSync(): ECClass | undefined;
59
65
  /**
60
66
  * Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on
61
67
  * all base classes. Set excludeInherited to 'true' to only search the local class.
@@ -83,7 +89,9 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
83
89
  * Creates a PrimitiveECProperty.
84
90
  * @param name The name of property to create.
85
91
  * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
86
- * @throws ECObjectsStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
92
+ * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
93
+ *
94
+ * @internal
87
95
  */
88
96
  protected createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;
89
97
  protected createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;
@@ -91,7 +99,9 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
91
99
  * Creates a PrimitiveECProperty.
92
100
  * @param name The name of property to create.
93
101
  * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
94
- * @throws ECObjectsStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
102
+ * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.
103
+ *
104
+ * @internal
95
105
  */
96
106
  protected createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;
97
107
  protected createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;
@@ -99,6 +109,8 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
99
109
  * Creates a PrimitiveArrayECProperty.
100
110
  * @param name The name of property to create.
101
111
  * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
112
+ *
113
+ * @internal
102
114
  */
103
115
  protected createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;
104
116
  protected createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;
@@ -106,6 +118,8 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
106
118
  * Creates a PrimitiveArrayECProperty.
107
119
  * @param name The name of property to create.
108
120
  * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer
121
+ *
122
+ * @internal
109
123
  */
110
124
  protected createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;
111
125
  protected createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;
@@ -113,29 +127,69 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
113
127
  *
114
128
  * @param name The name of property to create.
115
129
  * @param structType The struct type of property to create.
130
+ *
131
+ * @internal
116
132
  */
117
133
  protected createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;
118
134
  /**
119
135
  *
120
136
  * @param name The name of property to create.
121
137
  * @param structType The struct type of property to create.
138
+ *
139
+ * @internal
122
140
  */
123
141
  protected createStructPropertySync(name: string, structType: string | StructClass): StructProperty;
124
142
  /**
125
143
  *
126
144
  * @param name
127
145
  * @param type
146
+ *
147
+ * @internal
128
148
  */
129
149
  protected createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;
130
150
  /**
131
151
  *
132
152
  * @param name
133
153
  * @param type
154
+ *
155
+ * @internal
134
156
  */
135
157
  protected createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;
158
+ /**
159
+ *
160
+ * @param structType
161
+ * @param schema
162
+ * @returns
163
+ *
164
+ * @internal
165
+ */
136
166
  protected loadStructType(structType: string | StructClass | undefined, schema: Schema): Promise<StructClass>;
167
+ /**
168
+ *
169
+ * @param structType
170
+ * @param schema
171
+ * @returns
172
+ *
173
+ * @internal
174
+ */
137
175
  protected loadStructTypeSync(structType: string | StructClass | undefined, schema: Schema): StructClass;
176
+ /**
177
+ *
178
+ * @param primitiveType
179
+ * @param schema
180
+ * @returns
181
+ *
182
+ * @internal
183
+ */
138
184
  protected loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): Promise<PrimitiveType | Enumeration>;
185
+ /**
186
+ *
187
+ * @param primitiveType
188
+ * @param schema
189
+ * @returns
190
+ *
191
+ * @internal
192
+ */
139
193
  protected loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): PrimitiveType | Enumeration;
140
194
  /**
141
195
  * Save this Classes properties to an object for serializing to JSON.
@@ -147,6 +201,12 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
147
201
  toXml(schemaXml: Document): Promise<Element>;
148
202
  fromJSONSync(classProps: ClassProps): void;
149
203
  fromJSON(classProps: ClassProps): Promise<void>;
204
+ /**
205
+ *
206
+ * @param customAttribute
207
+ *
208
+ * @internal
209
+ */
150
210
  protected addCustomAttribute(customAttribute: CustomAttribute): void;
151
211
  /**
152
212
  * Iterates (recursively) over all base classes and mixins, in "property override" order.
@@ -154,8 +214,33 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
154
214
  */
155
215
  getAllBaseClasses(): AsyncIterable<ECClass>;
156
216
  getAllBaseClassesSync(): Iterable<AnyClass>;
217
+ /**
218
+ *
219
+ * @param target
220
+ * @param existingValues
221
+ * @param propertiesToMerge
222
+ * @param overwriteExisting
223
+ *
224
+ * @internal
225
+ */
157
226
  protected static mergeProperties(target: Property[], existingValues: Map<string, number>, propertiesToMerge: Iterable<Property>, overwriteExisting: boolean): void;
227
+ /**
228
+ *
229
+ * @param result
230
+ * @param existingValues
231
+ * @returns
232
+ *
233
+ * @internal
234
+ */
158
235
  protected buildPropertyCache(result: Property[], existingValues?: Map<string, number>): Promise<void>;
236
+ /**
237
+ *
238
+ * @param result
239
+ * @param existingValues
240
+ * @returns
241
+ *
242
+ * @internal
243
+ */
159
244
  protected buildPropertyCacheSync(result: Property[], existingValues?: Map<string, number>): void;
160
245
  /**
161
246
  * Clears all caches on this object. This is called implicitly for this class,
@@ -221,9 +306,9 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
221
306
  */
222
307
  static isECClass(object: any): object is ECClass;
223
308
  /**
224
- * @alpha
225
309
  * A setter method for the ECClass modifier, used specifically for schema editing.
226
310
  * @param modifier
311
+ * @internal
227
312
  */
228
313
  protected setModifier(modifier: ECClassModifier): void;
229
314
  /**
@@ -243,17 +328,16 @@ export declare abstract class ECClass extends SchemaItem implements CustomAttrib
243
328
  }
244
329
  /**
245
330
  * A Typescript class representation of an ECStructClass.
246
- * @beta
331
+ * @public @preview
247
332
  */
248
333
  export declare class StructClass extends ECClass {
249
334
  /**
250
335
  * Get the type of item represented by this instance
251
- * @beta
252
336
  */
253
337
  readonly schemaItemType: SchemaItemType;
254
338
  /**
255
339
  * Get the type of item represented by this class
256
- * @beta
340
+ * @internal
257
341
  */
258
342
  static get schemaItemType(): SchemaItemType;
259
343
  /**
@@ -266,6 +350,7 @@ export declare class StructClass extends ECClass {
266
350
  * Type assertion to check if the SchemaItem is of type StructClass.
267
351
  * @param item The SchemaItem to check.
268
352
  * @returns The item cast to StructClass if it is a StructClass, undefined otherwise.
353
+ * @internal
269
354
  */
270
355
  static assertIsStructClass(item?: SchemaItem): asserts item is StructClass;
271
356
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Class.d.ts","sourceRoot":"","sources":["../../../src/Metadata/Class.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAiD,eAAe,EAA0C,aAAa,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE9L,OAAO,EAAE,QAAQ,EAAa,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,6BAA6B,EAAE,kBAAkB,EAA6B,MAAM,mBAAmB,CAAC;AAClI,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,wBAAwB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,cAAc,EACxI,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,8BAAsB,OAAQ,SAAQ,UAAW,YAAW,6BAA6B;IACvF,WAA2B,cAAc,IAAI,uBAAuB,CAAyC;IAC7G,SAAS,CAAC,SAAS,EAAE,eAAe,CAAC;IACrC,SAAS,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IACzC,SAAS,CAAC,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,i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= require("./SchemaItem");
21
21
  const Helper_1 = require("../Deserialization/Helper");
22
22
  /**
23
23
  * A common abstract class for all of the ECClass types.
24
- * @beta
24
+ * @public @preview
25
25
  */
26
26
  class ECClass extends SchemaItem_1.SchemaItem {
27
+ /** @internal */
27
28
  static get schemaItemType() { return ECObjects_1.AbstractSchemaItemType.Class; } // need this so getItem("name", ECClass) in schema works
28
29
  _modifier;
29
30
  _baseClass;
@@ -33,6 +34,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
33
34
  _mergedPropertyCache;
34
35
  get modifier() { return this._modifier; }
35
36
  get customAttributes() { return this._customAttributes; }
37
+ /** @internal */
36
38
  constructor(schema, name, modifier) {
37
39
  super(schema, name);
38
40
  if (modifier)
@@ -46,8 +48,16 @@ class ECClass extends SchemaItem_1.SchemaItem {
46
48
  get baseClass() {
47
49
  return this._baseClass;
48
50
  }
51
+ getBaseClassSync() {
52
+ if (!this.baseClass) {
53
+ return undefined;
54
+ }
55
+ return this.schema.lookupItemSync(this.baseClass, ECClass);
56
+ }
49
57
  /**
50
58
  * Sets the base class of the ECClass. Pass undefined to 'remove' the base class.
59
+ *
60
+ * @internal
51
61
  */
52
62
  async setBaseClass(baseClass) {
53
63
  const oldBaseClass = this._baseClass;
@@ -70,6 +80,8 @@ class ECClass extends SchemaItem_1.SchemaItem {
70
80
  * Convenience method for adding an already loaded ECProperty used by create*Property methods.
71
81
  * @param prop The property to add.
72
82
  * @return The property that was added.
83
+ *
84
+ * @internal
73
85
  */
74
86
  addProperty(prop) {
75
87
  if (!this._properties)
@@ -81,7 +93,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
81
93
  /**
82
94
  * Deletes a property from within this class.
83
95
  * @param name The property name to delete, lookup is case-insensitive
84
- * @alpha
96
+ * @internal
85
97
  */
86
98
  async deleteProperty(name) {
87
99
  if (this._properties) {
@@ -95,7 +107,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
95
107
  /**
96
108
  * Deletes a property from within this class.
97
109
  * @param name The property name to delete, lookup is case-insensitive
98
- * @alpha
110
+ * @internal
99
111
  */
100
112
  deletePropertySync(name) {
101
113
  if (this._properties) {
@@ -106,12 +118,6 @@ class ECClass extends SchemaItem_1.SchemaItem {
106
118
  }
107
119
  }
108
120
  }
109
- getBaseClassSync() {
110
- if (!this.baseClass) {
111
- return undefined;
112
- }
113
- return this.schema.lookupItemSync(this.baseClass, ECClass);
114
- }
115
121
  /**
116
122
  * Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on
117
123
  * all base classes. Set excludeInherited to 'true' to only search the local class.
@@ -170,7 +176,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
170
176
  }
171
177
  async createPrimitiveProperty(name, primitiveType) {
172
178
  if (await this.getProperty(name, true))
173
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
179
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
174
180
  const propType = await this.loadPrimitiveType(primitiveType, this.schema);
175
181
  if (typeof (propType) === "number")
176
182
  return this.addProperty(new Property_1.PrimitiveProperty(this, name, propType));
@@ -178,7 +184,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
178
184
  }
179
185
  createPrimitivePropertySync(name, primitiveType) {
180
186
  if (this.getPropertySync(name, true))
181
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
187
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
182
188
  const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);
183
189
  if (typeof (propType) === "number")
184
190
  return this.addProperty(new Property_1.PrimitiveProperty(this, name, propType));
@@ -186,7 +192,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
186
192
  }
187
193
  async createPrimitiveArrayProperty(name, primitiveType) {
188
194
  if (await this.getProperty(name, true))
189
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
195
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
190
196
  const propType = await this.loadPrimitiveType(primitiveType, this.schema);
191
197
  if (typeof (propType) === "number")
192
198
  return this.addProperty(new Property_1.PrimitiveArrayProperty(this, name, propType));
@@ -194,7 +200,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
194
200
  }
195
201
  createPrimitiveArrayPropertySync(name, primitiveType) {
196
202
  if (this.getPropertySync(name, true))
197
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
203
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
198
204
  const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);
199
205
  if (typeof (propType) === "number")
200
206
  return this.addProperty(new Property_1.PrimitiveArrayProperty(this, name, propType));
@@ -204,42 +210,58 @@ class ECClass extends SchemaItem_1.SchemaItem {
204
210
  *
205
211
  * @param name The name of property to create.
206
212
  * @param structType The struct type of property to create.
213
+ *
214
+ * @internal
207
215
  */
208
216
  async createStructProperty(name, structType) {
209
217
  if (await this.getProperty(name, true))
210
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
218
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
211
219
  return this.addProperty(new Property_1.StructProperty(this, name, await this.loadStructType(structType, this.schema)));
212
220
  }
213
221
  /**
214
222
  *
215
223
  * @param name The name of property to create.
216
224
  * @param structType The struct type of property to create.
225
+ *
226
+ * @internal
217
227
  */
218
228
  createStructPropertySync(name, structType) {
219
229
  if (this.getPropertySync(name, true))
220
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
230
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
221
231
  return this.addProperty(new Property_1.StructProperty(this, name, this.loadStructTypeSync(structType, this.schema)));
222
232
  }
223
233
  /**
224
234
  *
225
235
  * @param name
226
236
  * @param type
237
+ *
238
+ * @internal
227
239
  */
228
240
  async createStructArrayProperty(name, structType) {
229
241
  if (await this.getProperty(name, true))
230
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
242
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
231
243
  return this.addProperty(new Property_1.StructArrayProperty(this, name, await this.loadStructType(structType, this.schema)));
232
244
  }
233
245
  /**
234
246
  *
235
247
  * @param name
236
248
  * @param type
249
+ *
250
+ * @internal
237
251
  */
238
252
  createStructArrayPropertySync(name, structType) {
239
253
  if (this.getPropertySync(name, true))
240
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
254
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);
241
255
  return this.addProperty(new Property_1.StructArrayProperty(this, name, this.loadStructTypeSync(structType, this.schema)));
242
256
  }
257
+ /**
258
+ *
259
+ * @param structType
260
+ * @param schema
261
+ * @returns
262
+ *
263
+ * @internal
264
+ */
243
265
  async loadStructType(structType, schema) {
244
266
  let correctType;
245
267
  if (typeof (structType) === "string") {
@@ -248,9 +270,17 @@ class ECClass extends SchemaItem_1.SchemaItem {
248
270
  else
249
271
  correctType = structType;
250
272
  if (!correctType)
251
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
273
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
252
274
  return correctType;
253
275
  }
276
+ /**
277
+ *
278
+ * @param structType
279
+ * @param schema
280
+ * @returns
281
+ *
282
+ * @internal
283
+ */
254
284
  loadStructTypeSync(structType, schema) {
255
285
  let correctType;
256
286
  if (typeof (structType) === "string") {
@@ -259,9 +289,17 @@ class ECClass extends SchemaItem_1.SchemaItem {
259
289
  else
260
290
  correctType = structType;
261
291
  if (!correctType)
262
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
292
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
263
293
  return correctType;
264
294
  }
295
+ /**
296
+ *
297
+ * @param primitiveType
298
+ * @param schema
299
+ * @returns
300
+ *
301
+ * @internal
302
+ */
265
303
  async loadPrimitiveType(primitiveType, schema) {
266
304
  if (primitiveType === undefined)
267
305
  return ECObjects_1.PrimitiveType.Integer;
@@ -271,14 +309,22 @@ class ECClass extends SchemaItem_1.SchemaItem {
271
309
  resolvedType = await schema.lookupItem(primitiveType, Enumeration_1.Enumeration);
272
310
  }
273
311
  if (resolvedType === undefined)
274
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
312
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
275
313
  // If resolvedType is a SchemaItem, make sure it is an Enumeration- if not, throw an error
276
314
  if (typeof (resolvedType) !== "number" && resolvedType.schemaItemType !== ECObjects_1.SchemaItemType.Enumeration)
277
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
315
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
278
316
  return resolvedType;
279
317
  }
280
318
  return primitiveType;
281
319
  }
320
+ /**
321
+ *
322
+ * @param primitiveType
323
+ * @param schema
324
+ * @returns
325
+ *
326
+ * @internal
327
+ */
282
328
  loadPrimitiveTypeSync(primitiveType, schema) {
283
329
  if (primitiveType === undefined)
284
330
  return ECObjects_1.PrimitiveType.Integer;
@@ -288,7 +334,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
288
334
  resolvedType = schema.lookupItemSync(primitiveType, Enumeration_1.Enumeration);
289
335
  }
290
336
  if (resolvedType === undefined)
291
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
337
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);
292
338
  return resolvedType;
293
339
  }
294
340
  return primitiveType;
@@ -349,7 +395,7 @@ class ECClass extends SchemaItem_1.SchemaItem {
349
395
  if (Helper_1.SchemaReadHelper.isECSpecVersionNewer({ readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion }))
350
396
  this._modifier = ECObjects_1.ECClassModifier.None;
351
397
  else
352
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);
398
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);
353
399
  }
354
400
  else {
355
401
  this._modifier = modifier;
@@ -358,14 +404,14 @@ class ECClass extends SchemaItem_1.SchemaItem {
358
404
  if (undefined !== classProps.baseClass) {
359
405
  const ecClassSchemaItemKey = this.schema.getSchemaItemKey(classProps.baseClass);
360
406
  if (!ecClassSchemaItemKey)
361
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);
407
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);
362
408
  const baseClass = this.schema.lookupItemSync(ecClassSchemaItemKey);
363
409
  let lazyBase;
364
410
  if (!baseClass) {
365
411
  lazyBase = new DelayedPromise_1.DelayedPromiseWithProps(ecClassSchemaItemKey, async () => {
366
412
  const baseItem = await this.schema.lookupItem(ecClassSchemaItemKey);
367
413
  if (undefined === baseItem || !ECClass.isECClass(baseItem))
368
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);
414
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);
369
415
  return baseItem;
370
416
  });
371
417
  }
@@ -383,6 +429,12 @@ class ECClass extends SchemaItem_1.SchemaItem {
383
429
  async fromJSON(classProps) {
384
430
  this.fromJSONSync(classProps);
385
431
  }
432
+ /**
433
+ *
434
+ * @param customAttribute
435
+ *
436
+ * @internal
437
+ */
386
438
  addCustomAttribute(customAttribute) {
387
439
  if (!this._customAttributes)
388
440
  this._customAttributes = new Map();
@@ -429,6 +481,15 @@ class ECClass extends SchemaItem_1.SchemaItem {
429
481
  yield baseClass;
430
482
  }
431
483
  }
484
+ /**
485
+ *
486
+ * @param target
487
+ * @param existingValues
488
+ * @param propertiesToMerge
489
+ * @param overwriteExisting
490
+ *
491
+ * @internal
492
+ */
432
493
  static mergeProperties(target, existingValues, propertiesToMerge, overwriteExisting) {
433
494
  for (const property of propertiesToMerge) {
434
495
  const upperCaseName = property.name.toUpperCase();
@@ -444,6 +505,14 @@ class ECClass extends SchemaItem_1.SchemaItem {
444
505
  }
445
506
  }
446
507
  }
508
+ /**
509
+ *
510
+ * @param result
511
+ * @param existingValues
512
+ * @returns
513
+ *
514
+ * @internal
515
+ */
447
516
  async buildPropertyCache(result, existingValues) {
448
517
  if (!existingValues) {
449
518
  existingValues = new Map();
@@ -458,6 +527,14 @@ class ECClass extends SchemaItem_1.SchemaItem {
458
527
  return;
459
528
  ECClass.mergeProperties(result, existingValues, [...this._properties.values()], true);
460
529
  }
530
+ /**
531
+ *
532
+ * @param result
533
+ * @param existingValues
534
+ * @returns
535
+ *
536
+ * @internal
537
+ */
461
538
  buildPropertyCacheSync(result, existingValues) {
462
539
  if (!existingValues) {
463
540
  existingValues = new Map();
@@ -600,9 +677,9 @@ class ECClass extends SchemaItem_1.SchemaItem {
600
677
  object.schemaItemType === ECObjects_1.SchemaItemType.StructClass || object.schemaItemType === ECObjects_1.SchemaItemType.CustomAttributeClass;
601
678
  }
602
679
  /**
603
- * @alpha
604
680
  * A setter method for the ECClass modifier, used specifically for schema editing.
605
681
  * @param modifier
682
+ * @internal
606
683
  */
607
684
  setModifier(modifier) {
608
685
  this._modifier = modifier;
@@ -640,17 +717,16 @@ class ECClass extends SchemaItem_1.SchemaItem {
640
717
  exports.ECClass = ECClass;
641
718
  /**
642
719
  * A Typescript class representation of an ECStructClass.
643
- * @beta
720
+ * @public @preview
644
721
  */
645
722
  class StructClass extends ECClass {
646
723
  /**
647
724
  * Get the type of item represented by this instance
648
- * @beta
649
725
  */
650
726
  schemaItemType = StructClass.schemaItemType;
651
727
  /**
652
728
  * Get the type of item represented by this class
653
- * @beta
729
+ * @internal
654
730
  */
655
731
  static get schemaItemType() { return ECObjects_1.SchemaItemType.StructClass; }
656
732
  /**
@@ -667,10 +743,11 @@ class StructClass extends ECClass {
667
743
  * Type assertion to check if the SchemaItem is of type StructClass.
668
744
  * @param item The SchemaItem to check.
669
745
  * @returns The item cast to StructClass if it is a StructClass, undefined otherwise.
746
+ * @internal
670
747
  */
671
748
  static assertIsStructClass(item) {
672
749
  if (!this.isStructClass(item))
673
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidSchemaItemType, `Expected '${ECObjects_1.SchemaItemType.StructClass}' (StructClass)`);
750
+ throw new Exception_1.ECSchemaError(Exception_1.ECSchemaStatus.InvalidSchemaItemType, `Expected '${ECObjects_1.SchemaItemType.StructClass}' (StructClass)`);
674
751
  }
675
752
  }
676
753
  exports.StructClass = StructClass;