@itwin/ecschema-editing 4.8.0-dev.3 → 4.8.0-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change Log - @itwin/ecschema-editing
2
2
 
3
- This log was last generated on Sat, 08 Jun 2024 00:53:21 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 12 Jun 2024 18:03:49 GMT and should not be manually modified.
4
+
5
+ ## 4.7.0
6
+ Wed, 12 Jun 2024 18:02:16 GMT
7
+
8
+ ### Updates
9
+
10
+ - Schema editing errors are now handled by throwing SchemaEditError instances rather than returning edit result objects.
4
11
 
5
12
  ## 4.6.2
6
13
  Sat, 08 Jun 2024 00:50:25 GMT
@@ -53,9 +53,9 @@ class Enumerations extends SchemaItems_1.SchemaItems {
53
53
  try {
54
54
  const enumeration = await this.getSchemaItem(enumerationKey, ecschema_metadata_1.SchemaItemType.Enumeration);
55
55
  if (enumeration.isInt && typeof (enumerator.value) !== "number")
56
- throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidEnumeratorType, new Exception_1.EnumerationId(enumeration, enumerator));
56
+ throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidEnumeratorType, new Exception_1.EnumeratorId(enumerator, enumeration));
57
57
  if (enumeration.isString && typeof (enumerator.value) !== "string")
58
- throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidEnumeratorType, new Exception_1.EnumerationId(enumeration, enumerator));
58
+ throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.InvalidEnumeratorType, new Exception_1.EnumeratorId(enumerator, enumeration));
59
59
  enumeration.addEnumerator(enumerator);
60
60
  }
61
61
  catch (e) {
@@ -67,7 +67,7 @@ class Enumerations extends SchemaItems_1.SchemaItems {
67
67
  const enumeration = await this.getSchemaItem(enumerationKey, ecschema_metadata_1.SchemaItemType.Enumeration);
68
68
  const enumerator = enumeration.getEnumeratorByName(enumeratorName);
69
69
  if (enumerator === undefined)
70
- throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.EnumeratorDoesNotExist, new Exception_1.EnumerationId(enumeration, enumeratorName));
70
+ throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.EnumeratorDoesNotExist, new Exception_1.EnumeratorId(enumeratorName, enumeration));
71
71
  enumerator.label = label;
72
72
  }
73
73
  catch (e) {
@@ -79,7 +79,7 @@ class Enumerations extends SchemaItems_1.SchemaItems {
79
79
  const enumeration = await this.getSchemaItem(enumerationKey, ecschema_metadata_1.SchemaItemType.Enumeration);
80
80
  const enumerator = enumeration.getEnumeratorByName(enumeratorName);
81
81
  if (enumerator === undefined)
82
- throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.EnumeratorDoesNotExist, new Exception_1.EnumerationId(enumeration, enumeratorName));
82
+ throw new Exception_1.SchemaEditingError(Exception_1.ECEditingStatus.EnumeratorDoesNotExist, new Exception_1.EnumeratorId(enumeratorName, enumeration));
83
83
  enumerator.description = description;
84
84
  }
85
85
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"Enumerations.js","sourceRoot":"","sources":["../../../src/Editing/Enumerations.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAAiJ;AAGjJ,2CAA+F;AAC/F,+CAA4C;AAM5C;;;GAGG;AACH,MAAa,YAAa,SAAQ,yBAAW;IAC3C,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,IAAkD,EAAE,YAAqB,EAAE,QAAkB,EAAE,WAA6B;QAClL,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAc,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,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D,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,kBAAkB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7H,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,wBAAwB,CAAC,cAA6B,EAAE,cAAsB,EAAE,WAA+B;QAC1H,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,aAAa,CAAc,cAAc,EAAE,kCAAc,CAAC,WAAW,CAAC,CAAC;YAEtG,MAAM,UAAU,GAAG,WAAW,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;YACnE,IAAI,UAAU,KAAK,SAAS;gBAC1B,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,sBAAsB,EAAE,IAAI,yBAAa,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;YAEtH,UAAgC,CAAC,WAAW,GAAG,WAAW,CAAC;QAC9D,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,kBAAkB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7H,CAAC;IACH,CAAC;CACF;AAlFD,oCAkFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport { AnyEnumerator, Enumeration, EnumerationProps, PrimitiveType, SchemaItemKey, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutableEnumeration } from \"./Mutable/MutableEnumeration\";\r\nimport { ECEditingStatus, EnumerationId, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { SchemaItems } from \"./SchemaItems\";\r\n\r\ntype MutableEnumerator = {\r\n -readonly [P in keyof AnyEnumerator]: AnyEnumerator[P]\r\n};\r\n\r\n/**\r\n * @alpha\r\n * A class allowing you to create schema items of type Enumeration.\r\n */\r\nexport class Enumerations extends SchemaItems {\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.Enumeration, schemaEditor);\r\n }\r\n\r\n public async create(schemaKey: SchemaKey, name: string, type: PrimitiveType.Integer | PrimitiveType.String, displayLabel?: string, isStrict?: boolean, enumerators?: AnyEnumerator[]): Promise<SchemaItemKey> {\r\n try {\r\n const newEnum = await this.createSchemaItem<Enumeration>(schemaKey, this.schemaItemType, (schema) => schema.createEnumeration.bind(schema), name, type) as MutableEnumeration;\r\n\r\n if (undefined !== isStrict)\r\n newEnum.setIsStrict(isStrict);\r\n\r\n if (undefined !== enumerators)\r\n for (const enumerator of enumerators)\r\n await this.addEnumerator(newEnum.key, enumerator);\r\n\r\n if (displayLabel)\r\n newEnum.setDisplayLabel(displayLabel);\r\n\r\n return newEnum.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates an Enumeration through an EnumeratorProps.\r\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\r\n * @param relationshipProps a json object that will be used to populate the new RelationshipClass. Needs a name value passed in.\r\n */\r\n public async createFromProps(schemaKey: SchemaKey, enumProps: EnumerationProps): Promise<SchemaItemKey> {\r\n try {\r\n const newEnum = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createEnumeration.bind(schema), enumProps);\r\n return newEnum.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, enumProps.name!, schemaKey), e);\r\n }\r\n }\r\n\r\n public async addEnumerator(enumerationKey: SchemaItemKey, enumerator: AnyEnumerator): Promise<void> {\r\n try {\r\n const enumeration = await this.getSchemaItem<Enumeration>(enumerationKey, SchemaItemType.Enumeration);\r\n\r\n if (enumeration.isInt && typeof (enumerator.value) !== \"number\")\r\n throw new SchemaEditingError(ECEditingStatus.InvalidEnumeratorType, new EnumerationId(enumeration, enumerator));\r\n\r\n if (enumeration.isString && typeof (enumerator.value) !== \"string\")\r\n throw new SchemaEditingError(ECEditingStatus.InvalidEnumeratorType, new EnumerationId(enumeration, enumerator));\r\n\r\n (enumeration as MutableEnumeration).addEnumerator(enumerator);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.AddEnumerator, new SchemaItemId(this.schemaItemType, enumerationKey), e);\r\n }\r\n }\r\n\r\n public async setEnumeratorLabel(enumerationKey: SchemaItemKey, enumeratorName: string, label: string | undefined): Promise<void> {\r\n try {\r\n const enumeration = await this.getSchemaItem<Enumeration>(enumerationKey, SchemaItemType.Enumeration);\r\n\r\n const enumerator = enumeration.getEnumeratorByName(enumeratorName);\r\n if (enumerator === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.EnumeratorDoesNotExist, new EnumerationId(enumeration, enumeratorName));\r\n\r\n (enumerator as MutableEnumerator).label = label;\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetEnumeratorLabel, new SchemaItemId(this.schemaItemType, enumerationKey), e);\r\n }\r\n }\r\n\r\n public async setEnumeratorDescription(enumerationKey: SchemaItemKey, enumeratorName: string, description: string | undefined): Promise<void> {\r\n try {\r\n const enumeration = await this.getSchemaItem<Enumeration>(enumerationKey, SchemaItemType.Enumeration);\r\n\r\n const enumerator = enumeration.getEnumeratorByName(enumeratorName);\r\n if (enumerator === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.EnumeratorDoesNotExist, new EnumerationId(enumeration, enumeratorName));\r\n\r\n (enumerator as MutableEnumerator).description = description;\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetEnumeratorLabel, new SchemaItemId(this.schemaItemType, enumerationKey), e);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Enumerations.js","sourceRoot":"","sources":["../../../src/Editing/Enumerations.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAAiJ;AAGjJ,2CAA8F;AAC9F,+CAA4C;AAM5C;;;GAGG;AACH,MAAa,YAAa,SAAQ,yBAAW;IAC3C,YAAmB,YAAiC;QAClD,KAAK,CAAC,kCAAc,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,SAAoB,EAAE,IAAY,EAAE,IAAkD,EAAE,YAAqB,EAAE,QAAkB,EAAE,WAA6B;QAClL,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAc,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAuB,CAAC;YAE9K,IAAI,SAAS,KAAK,QAAQ;gBACxB,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YAEhC,IAAI,SAAS,KAAK,WAAW;gBAC3B,KAAK,MAAM,UAAU,IAAI,WAAW;oBAClC,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YAEtD,IAAI,YAAY;gBACd,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;YAExC,OAAO,OAAO,CAAC,GAAG,CAAC;QACrB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,sBAAsB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS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C,CAAC;YAErH,UAAgC,CAAC,WAAW,GAAG,WAAW,CAAC;QAC9D,CAAC;QAAC,OAAM,CAAM,EAAE,CAAC;YACf,MAAM,IAAI,8BAAkB,CAAC,2BAAe,CAAC,kBAAkB,EAAE,IAAI,wBAAY,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7H,CAAC;IACH,CAAC;CACF;AAlFD,oCAkFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Editing\r\n */\r\n\r\nimport { AnyEnumerator, Enumeration, EnumerationProps, PrimitiveType, SchemaItemKey, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\r\nimport { SchemaContextEditor } from \"./Editor\";\r\nimport { MutableEnumeration } from \"./Mutable/MutableEnumeration\";\r\nimport { ECEditingStatus, EnumeratorId, SchemaEditingError, SchemaItemId } from \"./Exception\";\r\nimport { SchemaItems } from \"./SchemaItems\";\r\n\r\ntype MutableEnumerator = {\r\n -readonly [P in keyof AnyEnumerator]: AnyEnumerator[P]\r\n};\r\n\r\n/**\r\n * @alpha\r\n * A class allowing you to create schema items of type Enumeration.\r\n */\r\nexport class Enumerations extends SchemaItems {\r\n public constructor(schemaEditor: SchemaContextEditor) {\r\n super(SchemaItemType.Enumeration, schemaEditor);\r\n }\r\n\r\n public async create(schemaKey: SchemaKey, name: string, type: PrimitiveType.Integer | PrimitiveType.String, displayLabel?: string, isStrict?: boolean, enumerators?: AnyEnumerator[]): Promise<SchemaItemKey> {\r\n try {\r\n const newEnum = await this.createSchemaItem<Enumeration>(schemaKey, this.schemaItemType, (schema) => schema.createEnumeration.bind(schema), name, type) as MutableEnumeration;\r\n\r\n if (undefined !== isStrict)\r\n newEnum.setIsStrict(isStrict);\r\n\r\n if (undefined !== enumerators)\r\n for (const enumerator of enumerators)\r\n await this.addEnumerator(newEnum.key, enumerator);\r\n\r\n if (displayLabel)\r\n newEnum.setDisplayLabel(displayLabel);\r\n\r\n return newEnum.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFailed, new SchemaItemId(this.schemaItemType, name, schemaKey), e);\r\n }\r\n }\r\n\r\n /**\r\n * Creates an Enumeration through an EnumeratorProps.\r\n * @param schemaKey a SchemaKey of the Schema that will house the new object.\r\n * @param relationshipProps a json object that will be used to populate the new RelationshipClass. Needs a name value passed in.\r\n */\r\n public async createFromProps(schemaKey: SchemaKey, enumProps: EnumerationProps): Promise<SchemaItemKey> {\r\n try {\r\n const newEnum = await this.createSchemaItemFromProps(schemaKey, this.schemaItemType, (schema) => schema.createEnumeration.bind(schema), enumProps);\r\n return newEnum.key;\r\n } catch (e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.CreateSchemaItemFromProps, new SchemaItemId(this.schemaItemType, enumProps.name!, schemaKey), e);\r\n }\r\n }\r\n\r\n public async addEnumerator(enumerationKey: SchemaItemKey, enumerator: AnyEnumerator): Promise<void> {\r\n try {\r\n const enumeration = await this.getSchemaItem<Enumeration>(enumerationKey, SchemaItemType.Enumeration);\r\n\r\n if (enumeration.isInt && typeof (enumerator.value) !== \"number\")\r\n throw new SchemaEditingError(ECEditingStatus.InvalidEnumeratorType, new EnumeratorId(enumerator, enumeration));\r\n\r\n if (enumeration.isString && typeof (enumerator.value) !== \"string\")\r\n throw new SchemaEditingError(ECEditingStatus.InvalidEnumeratorType, new EnumeratorId(enumerator, enumeration));\r\n\r\n (enumeration as MutableEnumeration).addEnumerator(enumerator);\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.AddEnumerator, new SchemaItemId(this.schemaItemType, enumerationKey), e);\r\n }\r\n }\r\n\r\n public async setEnumeratorLabel(enumerationKey: SchemaItemKey, enumeratorName: string, label: string | undefined): Promise<void> {\r\n try {\r\n const enumeration = await this.getSchemaItem<Enumeration>(enumerationKey, SchemaItemType.Enumeration);\r\n\r\n const enumerator = enumeration.getEnumeratorByName(enumeratorName);\r\n if (enumerator === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.EnumeratorDoesNotExist, new EnumeratorId(enumeratorName, enumeration));\r\n\r\n (enumerator as MutableEnumerator).label = label;\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetEnumeratorLabel, new SchemaItemId(this.schemaItemType, enumerationKey), e);\r\n }\r\n }\r\n\r\n public async setEnumeratorDescription(enumerationKey: SchemaItemKey, enumeratorName: string, description: string | undefined): Promise<void> {\r\n try {\r\n const enumeration = await this.getSchemaItem<Enumeration>(enumerationKey, SchemaItemType.Enumeration);\r\n\r\n const enumerator = enumeration.getEnumeratorByName(enumeratorName);\r\n if (enumerator === undefined)\r\n throw new SchemaEditingError(ECEditingStatus.EnumeratorDoesNotExist, new EnumeratorId(enumeratorName, enumeration));\r\n\r\n (enumerator as MutableEnumerator).description = description;\r\n } catch(e: any) {\r\n throw new SchemaEditingError(ECEditingStatus.SetEnumeratorLabel, new SchemaItemId(this.schemaItemType, enumerationKey), e);\r\n }\r\n }\r\n}\r\n"]}
@@ -1,7 +1,6 @@
1
1
  /** @packageDocumentation
2
2
  * @module Editing
3
3
  */
4
- import { BentleyError } from "@itwin/core-bentley";
5
4
  import { AnyDiagnostic } from "../Validation/Diagnostic";
6
5
  import { AnyEnumerator, CustomAttributeContainerProps, Enumeration, Property, RelationshipConstraint, SchemaItemKey, SchemaItemType, SchemaKey } from "@itwin/ecschema-metadata";
7
6
  /** @alpha */
@@ -24,75 +23,75 @@ export declare enum ECEditingStatus {
24
23
  InvalidEnumeratorType = 196622,
25
24
  InvalidBaseClass = 196623,
26
25
  EnumeratorDoesNotExist = 196624,
27
- InvalidStrengthDirection = 196625,
28
- InvalidECName = 196626,
29
- InvalidFormatUnitsSpecified = 196627,
30
- CreateSchemaItemFailed = 196628,
31
- CreateSchemaItemFromProps = 196629,
32
- CreateElement = 196630,
33
- CreateElementUniqueAspect = 196631,
34
- CreateElementMultiAspect = 196632,
35
- SetBaseClass = 196633,
36
- SetSourceConstraint = 196634,
37
- SetTargetConstraint = 196635,
38
- AddConstraintClass = 196636,
39
- RemoveConstraintClass = 196637,
40
- SetAbstractConstraint = 196638,
41
- AddCustomAttributeToConstraint = 196639,
42
- AddCustomAttributeToProperty = 196640,
43
- AddCustomAttributeToClass = 196641,
44
- CreateNavigationProperty = 196642,
45
- CreateNavigationPropertyFromProps = 196643,
46
- SetInvertsUnit = 196644,
47
- SetUnitSystem = 196645,
48
- SetDescription = 196646,
49
- SetLabel = 196647,
50
- SetIsReadOnly = 196648,
51
- SetPriority = 196649,
52
- SetCategory = 196650,
53
- SetMinOccurs = 196651,
54
- SetMaxOccurs = 196652,
55
- SetExtendedTypeName = 196653,
56
- SetMinLength = 196654,
57
- SetMaxLength = 196655,
58
- SetMinValue = 196656,
59
- SetMaxValue = 196657,
60
- SetPropertyName = 196658,
61
- AddMixin = 196659,
62
- AddEnumerator = 196660,
63
- SetEnumeratorLabel = 196661,
64
- SetEnumeratorDescription = 196662,
65
- AddPresentationUnit = 196663,
66
- AddPresentationOverride = 196664,
67
- CreateFormatOverride = 196665,
68
- SetPropertyCategoryPriority = 196666,
69
- CreatePrimitiveProperty = 196667,
70
- CreatePrimitivePropertyFromProps = 196668,
71
- CreateEnumerationProperty = 196669,
72
- CreateEnumerationPropertyFromProps = 196670,
73
- CreatePrimitiveArrayProperty = 196671,
74
- CreatePrimitiveArrayPropertyFromProps = 196672,
75
- CreateEnumerationArrayProperty = 196673,
76
- CreateEnumerationArrayPropertyFromProps = 196674,
77
- CreateStructProperty = 196675,
78
- CreateStructPropertyFromProps = 196676,
79
- CreateStructArrayProperty = 196677,
80
- CreateStructArrayPropertyFromProps = 196678,
81
- DeleteProperty = 196679,
82
- DeleteClass = 196680,
83
- SetClassName = 196681,
84
- AddSchemaReference = 196682,
85
- SetSchemaVersion = 196683,
86
- IncrementSchemaMinorVersion = 196684
26
+ InvalidECName = 196625,
27
+ InvalidFormatUnitsSpecified = 196626,
28
+ CreateSchemaItemFailed = 196627,
29
+ CreateSchemaItemFromProps = 196628,
30
+ CreateElement = 196629,
31
+ CreateElementUniqueAspect = 196630,
32
+ CreateElementMultiAspect = 196631,
33
+ SetBaseClass = 196632,
34
+ SetSourceConstraint = 196633,
35
+ SetTargetConstraint = 196634,
36
+ AddConstraintClass = 196635,
37
+ RemoveConstraintClass = 196636,
38
+ SetAbstractConstraint = 196637,
39
+ AddCustomAttributeToConstraint = 196638,
40
+ AddCustomAttributeToProperty = 196639,
41
+ AddCustomAttributeToClass = 196640,
42
+ CreateNavigationProperty = 196641,
43
+ CreateNavigationPropertyFromProps = 196642,
44
+ SetInvertsUnit = 196643,
45
+ SetUnitSystem = 196644,
46
+ SetDescription = 196645,
47
+ SetLabel = 196646,
48
+ SetIsReadOnly = 196647,
49
+ SetPriority = 196648,
50
+ SetCategory = 196649,
51
+ SetMinOccurs = 196650,
52
+ SetMaxOccurs = 196651,
53
+ SetExtendedTypeName = 196652,
54
+ SetMinLength = 196653,
55
+ SetMaxLength = 196654,
56
+ SetMinValue = 196655,
57
+ SetMaxValue = 196656,
58
+ SetPropertyName = 196657,
59
+ AddMixin = 196658,
60
+ AddEnumerator = 196659,
61
+ SetEnumeratorLabel = 196660,
62
+ SetEnumeratorDescription = 196661,
63
+ AddPresentationUnit = 196662,
64
+ AddPresentationOverride = 196663,
65
+ CreateFormatOverride = 196664,
66
+ SetPropertyCategoryPriority = 196665,
67
+ CreatePrimitiveProperty = 196666,
68
+ CreatePrimitivePropertyFromProps = 196667,
69
+ CreateEnumerationProperty = 196668,
70
+ CreateEnumerationPropertyFromProps = 196669,
71
+ CreatePrimitiveArrayProperty = 196670,
72
+ CreatePrimitiveArrayPropertyFromProps = 196671,
73
+ CreateEnumerationArrayProperty = 196672,
74
+ CreateEnumerationArrayPropertyFromProps = 196673,
75
+ CreateStructProperty = 196674,
76
+ CreateStructPropertyFromProps = 196675,
77
+ CreateStructArrayProperty = 196676,
78
+ CreateStructArrayPropertyFromProps = 196677,
79
+ DeleteProperty = 196678,
80
+ DeleteClass = 196679,
81
+ SetClassName = 196680,
82
+ AddSchemaReference = 196681,
83
+ SetSchemaVersion = 196682,
84
+ IncrementSchemaMinorVersion = 196683
87
85
  }
86
+ /**
87
+ * A type that constrains the possible error types handled by SchemaEditingError
88
+ * @alpha
89
+ */
88
90
  export type AnyEditingError = SchemaEditingError | Error;
89
- export declare enum TaskType {
90
- Add = 0,
91
- Create = 1,
92
- Update = 2,
93
- Change = 3,
94
- Delete = 4
95
- }
91
+ /**
92
+ * Defines the possible property type names.
93
+ * @alpha
94
+ */
96
95
  export declare enum PropertyTypeName {
97
96
  ArrayProperty = "ArrayProperty",
98
97
  PrimitiveProperty = "PrimitiveProperty",
@@ -100,26 +99,142 @@ export declare enum PropertyTypeName {
100
99
  NavigationProperty = "NavigationProperty",
101
100
  StructProperty = "StructProperty"
102
101
  }
103
- type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass;
104
- export interface SchemaTypeIdentifier {
105
- name: string;
102
+ /**
103
+ * Defines the possible schema type identifiers.
104
+ * @alpha
105
+ */
106
+ export declare enum SchemaTypeIdentifiers {
107
+ SchemaIdentifier = "Schema",
108
+ SchemaItemIdentifier = "SchemaItem",
109
+ ClassIdentifier = "Class",
110
+ PropertyIdentifier = "Property",
111
+ EnumerationIdentifier = "Enumeration",
112
+ EnumeratorIdentifier = "Enumerator",
113
+ CustomAttributeIdentifier = "CustomAttribute",
114
+ RelationshipConstraintIdentifier = "RelationshipConstraint"
106
115
  }
107
- export declare class SchemaId implements SchemaTypeIdentifier {
116
+ /**
117
+ * Type that constrains SchemaItemType enum to those used by EC Class types.
118
+ * @alpha
119
+ */
120
+ export type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass;
121
+ /**
122
+ * Type that defines the possible SchemaTypeIdentifiers for SchemaItemId classes.
123
+ * @alpha
124
+ */
125
+ export type AnySchemaItemTypeIdentifier = SchemaTypeIdentifiers.SchemaItemIdentifier | SchemaTypeIdentifiers.ClassIdentifier;
126
+ /**
127
+ * Type that encompasses all ISchemaTypeIdentifier interfaces
128
+ * @alpha
129
+ */
130
+ export type AnyIdentifier = ISchemaIdentifier | ISchemaItemIdentifier | IClassIdentifier | IPropertyIdentifier | ICustomAttributeIdentifier | IRelationshipConstraintIdentifier | IEnumeratorIdentifier;
131
+ /**
132
+ * A base interface that defines what is needed to identity any schema type.
133
+ * @alpha
134
+ */
135
+ export interface ISchemaTypeIdentifier {
136
+ readonly name: string;
137
+ readonly schemaKey: SchemaKey;
138
+ readonly typeIdentifier: SchemaTypeIdentifiers;
139
+ }
140
+ /**
141
+ * Interface that defines the data needed to identify a Schema.
142
+ * @alpha
143
+ */
144
+ export interface ISchemaIdentifier extends ISchemaTypeIdentifier {
145
+ readonly typeIdentifier: SchemaTypeIdentifiers.SchemaIdentifier;
146
+ }
147
+ /**
148
+ * Interface that defines the data needed to identify a SchemaItem.
149
+ * @alpha
150
+ */
151
+ export interface ISchemaItemIdentifier extends ISchemaTypeIdentifier {
152
+ readonly schemaItemType: SchemaItemType;
153
+ readonly schemaItemKey: SchemaItemKey;
154
+ readonly typeIdentifier: AnySchemaItemTypeIdentifier;
155
+ }
156
+ /**
157
+ * Interface that defines the data needed to identify an EC Class.
158
+ * @alpha
159
+ */
160
+ export interface IClassIdentifier extends ISchemaTypeIdentifier {
161
+ readonly schemaItemType: ECClassSchemaItems;
162
+ readonly schemaItemKey: SchemaItemKey;
163
+ readonly typeIdentifier: SchemaTypeIdentifiers.ClassIdentifier;
164
+ }
165
+ /**
166
+ * Interface that defines the data needed to identify an EC Property.
167
+ * @alpha
168
+ */
169
+ export interface IPropertyIdentifier extends ISchemaTypeIdentifier {
170
+ readonly fullName: string;
171
+ readonly ecClass: ClassId;
172
+ readonly typeName?: PropertyTypeName;
173
+ readonly typeIdentifier: SchemaTypeIdentifiers.PropertyIdentifier;
174
+ }
175
+ /**
176
+ * Interface that defines the data needed to identify an Enumerator.
177
+ * @alpha
178
+ */
179
+ interface IEnumeratorIdentifier extends ISchemaTypeIdentifier {
180
+ readonly enumeratorType: string;
181
+ readonly enumeration: SchemaItemKey;
182
+ readonly enumerationType: string;
183
+ readonly typeIdentifier: SchemaTypeIdentifiers.EnumeratorIdentifier;
184
+ }
185
+ /**
186
+ * Interface that defines the data needed to identify a CustomAttribute.
187
+ * @alpha
188
+ */
189
+ export interface ICustomAttributeIdentifier extends ISchemaTypeIdentifier {
190
+ readonly containerFullName: string;
191
+ readonly typeIdentifier: SchemaTypeIdentifiers.CustomAttributeIdentifier;
192
+ }
193
+ /**
194
+ * Interface that defines the data needed to identify a RelationshipConstraint.
195
+ * @alpha
196
+ */
197
+ export interface IRelationshipConstraintIdentifier extends ISchemaTypeIdentifier {
198
+ readonly relationshipKey: SchemaItemKey;
199
+ readonly typeIdentifier: SchemaTypeIdentifiers.RelationshipConstraintIdentifier;
200
+ }
201
+ /**
202
+ * An ISchemaIdentifier implementation to identify Schemas
203
+ * @alpha
204
+ */
205
+ export declare class SchemaId implements ISchemaIdentifier {
206
+ readonly typeIdentifier = SchemaTypeIdentifiers.SchemaIdentifier;
108
207
  readonly name: string;
109
208
  readonly schemaKey: SchemaKey;
110
209
  constructor(schemaKey: SchemaKey);
111
210
  }
112
- export declare class SchemaItemId implements SchemaTypeIdentifier {
211
+ /**
212
+ * An ISchemItemIdentifier implementation to identify SchemaItems
213
+ * @alpha
214
+ */
215
+ export declare class SchemaItemId implements ISchemaItemIdentifier {
216
+ readonly typeIdentifier: AnySchemaItemTypeIdentifier;
113
217
  readonly name: string;
114
- readonly type: SchemaItemType;
115
218
  readonly schemaKey: SchemaKey;
219
+ readonly schemaItemType: SchemaItemType;
116
220
  readonly schemaItemKey: SchemaItemKey;
117
221
  constructor(schemaItemType: SchemaItemType, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey);
118
222
  }
119
- export declare class ClassId extends SchemaItemId {
223
+ /**
224
+ * An IClassIdentifier implementation to identify Class instances.
225
+ * @alpha
226
+ */
227
+ export declare class ClassId extends SchemaItemId implements IClassIdentifier {
228
+ readonly typeIdentifier = SchemaTypeIdentifiers.ClassIdentifier;
229
+ readonly schemaItemType: ECClassSchemaItems;
120
230
  constructor(schemaItemType: ECClassSchemaItems, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey);
121
231
  }
122
- export declare class PropertyId implements SchemaTypeIdentifier {
232
+ /**
233
+ * An IPropertyIdentifier implementation to identify Property instances.
234
+ * @alpha
235
+ */
236
+ export declare class PropertyId implements IPropertyIdentifier {
237
+ readonly typeIdentifier = SchemaTypeIdentifiers.PropertyIdentifier;
123
238
  readonly name: string;
124
239
  readonly fullName: string;
125
240
  readonly ecClass: ClassId;
@@ -127,78 +242,51 @@ export declare class PropertyId implements SchemaTypeIdentifier {
127
242
  readonly typeName?: PropertyTypeName;
128
243
  constructor(schemaItemType: ECClassSchemaItems, classKey: SchemaItemKey, property: Property | string, typeName?: PropertyTypeName);
129
244
  }
130
- export declare class EnumerationId extends SchemaItemId {
245
+ /**
246
+ * An IEnumeratorIdentifier implementation to identify Enumerator instances.
247
+ * @alpha
248
+ */
249
+ export declare class EnumeratorId implements IEnumeratorIdentifier {
250
+ readonly typeIdentifier = SchemaTypeIdentifiers.EnumeratorIdentifier;
251
+ readonly enumeration: SchemaItemKey;
131
252
  readonly enumerationType: string;
132
- readonly enumeratorName: string;
133
253
  readonly enumeratorType: string;
134
- constructor(enumeration: Enumeration, enumerator: AnyEnumerator | string);
135
- private getEnumeratorType;
254
+ readonly name: string;
255
+ readonly schemaKey: SchemaKey;
256
+ constructor(enumerator: AnyEnumerator | string, enumeration: Enumeration);
136
257
  }
137
- export declare class CustomAttributeId implements SchemaTypeIdentifier {
258
+ /**
259
+ * An ICustomAttributeIdentifier implementation to identify CustomAttribute instances.
260
+ * @alpha
261
+ */
262
+ export declare class CustomAttributeId implements ICustomAttributeIdentifier {
263
+ readonly typeIdentifier = SchemaTypeIdentifiers.CustomAttributeIdentifier;
138
264
  readonly name: string;
139
265
  readonly schemaKey: SchemaKey;
140
266
  readonly containerFullName: string;
141
267
  constructor(name: string, container: CustomAttributeContainerProps);
142
268
  }
143
- export declare class RelationshipConstraintId implements SchemaTypeIdentifier {
269
+ /**
270
+ * An IRelationshipConstraintIdentifier implementation to identify RelationshipConstraints.
271
+ * @alpha
272
+ */
273
+ export declare class RelationshipConstraintId implements IRelationshipConstraintIdentifier {
274
+ readonly typeIdentifier = SchemaTypeIdentifiers.RelationshipConstraintIdentifier;
144
275
  readonly name: string;
145
276
  readonly relationshipKey: SchemaItemKey;
146
277
  readonly schemaKey: SchemaKey;
147
278
  constructor(constraint: RelationshipConstraint);
148
279
  }
149
- type AnyIdentifier = SchemaId | PropertyId | CustomAttributeId | RelationshipConstraintId | EnumerationId;
150
- /**
151
- * Indicates if the given identifier is a SchemaId instance.
152
- * @param identifier The identifier to check.
153
- * @returns true if the identifier is the correct type.
154
- */
155
- export declare function isSchemaIdentifier(identifier: AnyIdentifier): identifier is SchemaId;
156
- /**
157
- * Indicates if the given identifier is a SchemaId instance.
158
- * @param identifier The identifier to check.
159
- * @returns true if the identifier is the correct type.
160
- */
161
- export declare function isSchemaItemIdentifier(identifier: AnyIdentifier): identifier is SchemaItemId;
162
- /**
163
- * Indicates if the given identifier is a ClassId instance.
164
- * @param identifier The identifier to check.
165
- * @returns true if the identifier is the correct type.
166
- */
167
- export declare function isClassIdentifier(identifier: AnyIdentifier): identifier is ClassId;
168
- /**
169
- * Indicates if the given identifier is a PropertyId instance.
170
- * @param identifier The identifier to check.
171
- * @returns true if the identifier is the correct type.
172
- */
173
- export declare function isPropertyIdentifier(identifier: AnyIdentifier): identifier is PropertyId;
174
- /**
175
- * Indicates if the given identifier is a EnumerationId instance.
176
- * @param identifier The identifier to check.
177
- * @returns true if the identifier is the correct type.
178
- */
179
- export declare function isEnumerationIdentifier(identifier: AnyIdentifier): identifier is EnumerationId;
180
- /**
181
- * Indicates if the given identifier is a CustomAttributeId instance.
182
- * @param identifier The identifier to check.
183
- * @returns true if the identifier is the correct type.
184
- */
185
- export declare function isCustomAttributeIdentifier(identifier: AnyIdentifier): identifier is CustomAttributeId;
186
- /**
187
- * Indicates if the given identifier is a RelationshipConstraintId instance.
188
- * @param identifier The identifier to check.
189
- * @returns true if the identifier is the correct type.
190
- */
191
- export declare function isRelationshipConstraintIdentifier(identifier: AnyIdentifier): identifier is RelationshipConstraintId;
192
280
  /**
193
- * @internal
194
281
  * An exception class for the ecschema-editing API. Contains identifiers for schema types involved in the
195
282
  * exception. An example being SchemaItemId which contains the name of the SchemaItem, SchemaItemKey, SchemaItemType, etc.
196
283
  * Typically will contain an innerError of type SchemaEditingError containing the identifier of the schema item that
197
284
  * caused the exception. The containing error instance will identify the method called (identified by the errorNumber)
198
285
  * and the identifier of the schema item being modified/created.
286
+ * @alpha
199
287
  */
200
- export declare class SchemaEditingError extends BentleyError {
201
- readonly errorNumber: number;
288
+ export declare class SchemaEditingError extends Error {
289
+ readonly errorNumber: ECEditingStatus;
202
290
  readonly identifier: AnyIdentifier;
203
291
  readonly innerError?: AnyEditingError | undefined;
204
292
  private _ruleViolations?;
@@ -211,47 +299,57 @@ export declare class SchemaEditingError extends BentleyError {
211
299
  * @param ruleViolations Will contain EC rule violations of type [[AnyDiagnostic]] for exceptions with the error code ECEditingStatus.RuleViolation.
212
300
  * @param message Optional error message. Most messages on automatically generated by this class based on the ECEditingStatus code.
213
301
  */
214
- constructor(errorNumber: number, identifier: AnyIdentifier, innerError?: AnyEditingError | undefined, ruleViolations?: AnyDiagnostic[], message?: string);
302
+ constructor(errorNumber: ECEditingStatus, identifier: AnyIdentifier, innerError?: AnyEditingError | undefined, ruleViolations?: AnyDiagnostic[], message?: string);
215
303
  /**
216
304
  * Gets the SchemaId instance.
217
305
  * @throws Error if the identifier is not an instance of SchemaId.
218
306
  */
219
- get schemaId(): SchemaId;
307
+ private get _schemaId();
220
308
  /**
221
309
  * Gets the SchemaItemId instance.
222
310
  * @throws Error if the identifier is not an instance of SchemaItemId.
223
311
  */
224
- get schemaItemId(): SchemaItemId;
312
+ private get _schemaItemId();
225
313
  /**
226
314
  * Gets the ClassId instance.
227
315
  * @throws Error if the identifier is not an instance of ClassId.
228
316
  */
229
- get classId(): ClassId;
317
+ private get _classId();
230
318
  /**
231
319
  * Gets the PropertyId instance.
232
320
  * @throws Error if the identifier is not an instance of PropertyId.
233
321
  */
234
- get propertyId(): PropertyId;
322
+ private get _propertyId();
235
323
  /**
236
- * Gets the EnumerationId instance.
237
- * @throws Error if the identifier is not an instance of EnumerationId.
324
+ * Gets the EnumeratorId instance.
325
+ * @throws Error if the identifier is not an instance of EnumeratorId.
238
326
  */
239
- get enumerationId(): EnumerationId;
327
+ private get _enumeratorId();
240
328
  /**
241
329
  * Gets the CustomAttributeId instance.
242
330
  * @throws Error if the identifier is not an instance of CustomAttributeId.
243
331
  */
244
- get customAttributeId(): CustomAttributeId;
332
+ private get _customAttributeId();
245
333
  /**
246
334
  * Gets the RelationshipConstraintId instance.
247
335
  * @throws Error if the identifier is not an instance of RelationshipConstraintId.
248
336
  */
249
- get relationshipConstraintId(): RelationshipConstraintId;
337
+ private get _relationshipConstraintId();
338
+ /** Gets rule violations that were reported during validation. Returns an array of [[AnyDiagnostic]] if
339
+ * the errorNumber is ECEditingStatus.RuleViolation, otherwise undefined.
340
+ */
250
341
  get ruleViolations(): AnyDiagnostic[] | undefined;
342
+ /**
343
+ * Returns a readable string containing the ECEditingStatus along with the error message. Any
344
+ * innerError will also be appended.
345
+ * @returns
346
+ */
251
347
  toDebugString(): string;
252
- private _appendMessage;
253
348
  private generateMessage;
254
- private getRuleViolationMessage;
349
+ private _appendMessage;
350
+ private _getRuleViolationMessage;
351
+ private _createTaskErrorMessage;
352
+ private isSchemaItemIdentifier;
255
353
  }
256
354
  export {};
257
355
  //# sourceMappingURL=Exception.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Exception.d.ts","sourceRoot":"","sources":["../../../src/Editing/Exception.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAE,WAAW,EAAyB,QAAQ,EAAE,sBAAsB,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAExM,aAAa;AACb,oBAAY,eAAe;IACzB,qBAAqB,SAAU;IAC/B,OAAO,IAAI;IACX,aAAa,SAA4B;IACzC,cAAc,SAAA;IACd,kBAAkB,SAAA;IAClB,2BAA2B,SAAA;IAC3B,qBAAqB,SAAA;IACrB,gBAAgB,SAAA;IAChB,mBAAmB,SAAA;IACnB,qBAAqB,SAAA;IACrB,iCAAiC,SAAA;IACjC,gCAAgC,SAAA;IAChC,0BAA0B,SAAA;IAC1B,qBAAqB,SAAA;IACrB,2BAA2B,SAAA;IAC3B,qBAAqB,SAAA;IACrB,gBAAgB,SAAA;IAChB,sBAAsB,SAAA;IACtB,wBAAwB,SAAA;IACxB,aAAa,SAAA;IACb,2BAA2B,SAAA;IAE3B,sBAAsB,SAAA;IACtB,yBAAyB,SAAA;IACzB,aAAa,SAAA;IACb,yBAAyB,SAAA;IACzB,wBAAwB,SAAA;IACxB,YAAY,SAAA;IACZ,mBAAmB,SAAA;IACnB,mBAAmB,SAAA;IACnB,kBAAkB,SAAA;IAClB,qBAAqB,SAAA;IACrB,qBAAqB,SAAA;IACrB,8BAA8B,SAAA;IAC9B,4BAA4B,SAAA;IAC5B,yBAAyB,SAAA;IACzB,wBAAwB,SAAA;IACxB,iCAAiC,SAAA;I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