@itwin/ecschema-editing 4.7.0-dev.15 → 4.7.0-dev.16
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/lib/cjs/Differencing/Errors.js.map +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
- package/lib/cjs/Editing/Constants.d.ts +6 -6
- package/lib/cjs/Editing/Constants.d.ts.map +1 -1
- package/lib/cjs/Editing/Constants.js +26 -31
- package/lib/cjs/Editing/Constants.js.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts +3 -3
- package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.js +18 -28
- package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
- package/lib/cjs/Editing/ECClasses.d.ts +24 -23
- package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/ECClasses.js +126 -156
- package/lib/cjs/Editing/ECClasses.js.map +1 -1
- package/lib/cjs/Editing/Editor.d.ts +10 -31
- package/lib/cjs/Editing/Editor.d.ts.map +1 -1
- package/lib/cjs/Editing/Editor.js +59 -43
- package/lib/cjs/Editing/Editor.js.map +1 -1
- package/lib/cjs/Editing/Entities.d.ts +9 -9
- package/lib/cjs/Editing/Entities.d.ts.map +1 -1
- package/lib/cjs/Editing/Entities.js +65 -85
- package/lib/cjs/Editing/Entities.js.map +1 -1
- package/lib/cjs/Editing/Enumerations.d.ts +6 -6
- package/lib/cjs/Editing/Enumerations.d.ts.map +1 -1
- package/lib/cjs/Editing/Enumerations.js +57 -55
- package/lib/cjs/Editing/Enumerations.js.map +1 -1
- package/lib/cjs/Editing/Exception.d.ts +257 -0
- package/lib/cjs/Editing/Exception.d.ts.map +1 -0
- package/lib/cjs/Editing/Exception.js +426 -0
- package/lib/cjs/Editing/Exception.js.map +1 -0
- package/lib/cjs/Editing/Formats.d.ts +6 -6
- package/lib/cjs/Editing/Formats.d.ts.map +1 -1
- package/lib/cjs/Editing/Formats.js +28 -33
- package/lib/cjs/Editing/Formats.js.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.d.ts +6 -6
- package/lib/cjs/Editing/InvertedUnits.d.ts.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.js +41 -56
- package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.d.ts +6 -6
- package/lib/cjs/Editing/KindOfQuantities.d.ts.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.js +50 -57
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mixins.d.ts +5 -5
- package/lib/cjs/Editing/Mixins.d.ts.map +1 -1
- package/lib/cjs/Editing/Mixins.js +43 -58
- package/lib/cjs/Editing/Mixins.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableArrayProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.d.ts +1 -5
- package/lib/cjs/Editing/Mutable/MutableEntityClass.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js +1 -45
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableNavigationProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableStructProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
- package/lib/cjs/Editing/Phenomena.d.ts +7 -7
- package/lib/cjs/Editing/Phenomena.d.ts.map +1 -1
- package/lib/cjs/Editing/Phenomena.js +23 -23
- package/lib/cjs/Editing/Phenomena.js.map +1 -1
- package/lib/cjs/Editing/Properties.d.ts +7 -6
- package/lib/cjs/Editing/Properties.d.ts.map +1 -1
- package/lib/cjs/Editing/Properties.js +99 -46
- package/lib/cjs/Editing/Properties.js.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.d.ts +6 -6
- package/lib/cjs/Editing/PropertyCategories.d.ts.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.js +29 -27
- package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.d.ts +15 -17
- package/lib/cjs/Editing/RelationshipClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.js +97 -101
- package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
- package/lib/cjs/Editing/SchemaItems.d.ts +13 -5
- package/lib/cjs/Editing/SchemaItems.d.ts.map +1 -1
- package/lib/cjs/Editing/SchemaItems.js +58 -6
- package/lib/cjs/Editing/SchemaItems.js.map +1 -1
- package/lib/cjs/Editing/Structs.d.ts +3 -3
- package/lib/cjs/Editing/Structs.d.ts.map +1 -1
- package/lib/cjs/Editing/Structs.js +17 -27
- package/lib/cjs/Editing/Structs.js.map +1 -1
- package/lib/cjs/Editing/UnitSystems.d.ts +7 -7
- package/lib/cjs/Editing/UnitSystems.d.ts.map +1 -1
- package/lib/cjs/Editing/UnitSystems.js +22 -20
- package/lib/cjs/Editing/UnitSystems.js.map +1 -1
- package/lib/cjs/Editing/Units.d.ts +6 -6
- package/lib/cjs/Editing/Units.d.ts.map +1 -1
- package/lib/cjs/Editing/Units.js +26 -35
- package/lib/cjs/Editing/Units.js.map +1 -1
- package/lib/cjs/Merging/CAClassMerger.js +2 -2
- package/lib/cjs/Merging/CAClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ClassMerger.d.ts +1 -2
- package/lib/cjs/Merging/ClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/ClassMerger.js +15 -39
- package/lib/cjs/Merging/ClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.js +2 -3
- package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.d.ts +4 -5
- package/lib/cjs/Merging/CustomAttributeMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.js +8 -18
- package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.d.ts +1 -2
- package/lib/cjs/Merging/EntityClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.js +3 -10
- package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js +8 -10
- package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.js +2 -3
- package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
- package/lib/cjs/Merging/MixinMerger.js +2 -2
- package/lib/cjs/Merging/MixinMerger.js.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.js +1 -2
- package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyCategoryMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PropertyCategoryMerger.js +1 -2
- package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.d.ts +2 -3
- package/lib/cjs/Merging/PropertyMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.js +21 -42
- package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts +5 -3
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.js +19 -31
- package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.d.ts +3 -4
- package/lib/cjs/Merging/SchemaItemMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.js +3 -2
- package/lib/cjs/Merging/SchemaItemMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.js +2 -8
- package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
- package/lib/cjs/Merging/UnitSystemMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/UnitSystemMerger.js +1 -2
- package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
- package/lib/cjs/Validation/Diagnostic.js.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
- package/lib/cjs/Validation/Rules.js.map +1 -1
- package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-editing.js.map +1 -1
- package/package.json +9 -9
- package/public/locales/en/ECSchemaEditing.json +26 -26
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Editing
|
|
3
|
+
*/
|
|
4
|
+
import { BentleyError } from "@itwin/core-bentley";
|
|
5
|
+
import { AnyDiagnostic } from "../Validation/Diagnostic";
|
|
6
|
+
import { AnyEnumerator, CustomAttributeContainerProps, Enumeration, Property, RelationshipConstraint, SchemaItemKey, SchemaItemType, SchemaKey } from "@itwin/ecschema-metadata";
|
|
7
|
+
/** @alpha */
|
|
8
|
+
export declare enum ECEditingStatus {
|
|
9
|
+
EC_EDITING_ERROR_BASE = 196608,
|
|
10
|
+
Unknown = 0,
|
|
11
|
+
RuleViolation = 196609,
|
|
12
|
+
SchemaNotFound = 196610,
|
|
13
|
+
SchemaItemNotFound = 196611,
|
|
14
|
+
SchemaItemNotFoundInContext = 196612,
|
|
15
|
+
PropertyAlreadyExists = 196613,
|
|
16
|
+
PropertyNotFound = 196614,
|
|
17
|
+
InvalidPropertyType = 196615,
|
|
18
|
+
BaseClassIsNotElement = 196616,
|
|
19
|
+
BaseClassIsNotElementUniqueAspect = 196617,
|
|
20
|
+
BaseClassIsNotElementMultiAspect = 196618,
|
|
21
|
+
SchemaItemNameNotSpecified = 196619,
|
|
22
|
+
InvalidSchemaItemType = 196620,
|
|
23
|
+
SchemaItemNameAlreadyExists = 196621,
|
|
24
|
+
InvalidEnumeratorType = 196622,
|
|
25
|
+
InvalidBaseClass = 196623,
|
|
26
|
+
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
|
|
87
|
+
}
|
|
88
|
+
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
|
+
}
|
|
96
|
+
export declare enum PropertyTypeName {
|
|
97
|
+
ArrayProperty = "ArrayProperty",
|
|
98
|
+
PrimitiveProperty = "PrimitiveProperty",
|
|
99
|
+
EnumerationProperty = "EnumerationProperty",
|
|
100
|
+
NavigationProperty = "NavigationProperty",
|
|
101
|
+
StructProperty = "StructProperty"
|
|
102
|
+
}
|
|
103
|
+
type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass;
|
|
104
|
+
export interface SchemaTypeIdentifier {
|
|
105
|
+
name: string;
|
|
106
|
+
}
|
|
107
|
+
export declare class SchemaId implements SchemaTypeIdentifier {
|
|
108
|
+
readonly name: string;
|
|
109
|
+
readonly schemaKey: SchemaKey;
|
|
110
|
+
constructor(schemaKey: SchemaKey);
|
|
111
|
+
}
|
|
112
|
+
export declare class SchemaItemId implements SchemaTypeIdentifier {
|
|
113
|
+
readonly name: string;
|
|
114
|
+
readonly type: SchemaItemType;
|
|
115
|
+
readonly schemaKey: SchemaKey;
|
|
116
|
+
readonly schemaItemKey: SchemaItemKey;
|
|
117
|
+
constructor(schemaItemType: SchemaItemType, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey);
|
|
118
|
+
}
|
|
119
|
+
export declare class ClassId extends SchemaItemId {
|
|
120
|
+
constructor(schemaItemType: ECClassSchemaItems, schemaItemKeyOrName: SchemaItemKey | string, schemaKey?: SchemaKey);
|
|
121
|
+
}
|
|
122
|
+
export declare class PropertyId implements SchemaTypeIdentifier {
|
|
123
|
+
readonly name: string;
|
|
124
|
+
readonly fullName: string;
|
|
125
|
+
readonly ecClass: ClassId;
|
|
126
|
+
readonly schemaKey: SchemaKey;
|
|
127
|
+
readonly typeName?: PropertyTypeName;
|
|
128
|
+
constructor(schemaItemType: ECClassSchemaItems, classKey: SchemaItemKey, property: Property | string, typeName?: PropertyTypeName);
|
|
129
|
+
}
|
|
130
|
+
export declare class EnumerationId extends SchemaItemId {
|
|
131
|
+
readonly enumerationType: string;
|
|
132
|
+
readonly enumeratorName: string;
|
|
133
|
+
readonly enumeratorType: string;
|
|
134
|
+
constructor(enumeration: Enumeration, enumerator: AnyEnumerator | string);
|
|
135
|
+
private getEnumeratorType;
|
|
136
|
+
}
|
|
137
|
+
export declare class CustomAttributeId implements SchemaTypeIdentifier {
|
|
138
|
+
readonly name: string;
|
|
139
|
+
readonly schemaKey: SchemaKey;
|
|
140
|
+
readonly containerFullName: string;
|
|
141
|
+
constructor(name: string, container: CustomAttributeContainerProps);
|
|
142
|
+
}
|
|
143
|
+
export declare class RelationshipConstraintId implements SchemaTypeIdentifier {
|
|
144
|
+
readonly name: string;
|
|
145
|
+
readonly relationshipKey: SchemaItemKey;
|
|
146
|
+
readonly schemaKey: SchemaKey;
|
|
147
|
+
constructor(constraint: RelationshipConstraint);
|
|
148
|
+
}
|
|
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
|
+
/**
|
|
193
|
+
* @internal
|
|
194
|
+
* An exception class for the ecschema-editing API. Contains identifiers for schema types involved in the
|
|
195
|
+
* exception. An example being SchemaItemId which contains the name of the SchemaItem, SchemaItemKey, SchemaItemType, etc.
|
|
196
|
+
* Typically will contain an innerError of type SchemaEditingError containing the identifier of the schema item that
|
|
197
|
+
* caused the exception. The containing error instance will identify the method called (identified by the errorNumber)
|
|
198
|
+
* and the identifier of the schema item being modified/created.
|
|
199
|
+
*/
|
|
200
|
+
export declare class SchemaEditingError extends BentleyError {
|
|
201
|
+
readonly errorNumber: number;
|
|
202
|
+
readonly identifier: AnyIdentifier;
|
|
203
|
+
readonly innerError?: AnyEditingError | undefined;
|
|
204
|
+
private _ruleViolations?;
|
|
205
|
+
private _schemaKey;
|
|
206
|
+
/**
|
|
207
|
+
* Constructs a new SchemaEditingError instance.
|
|
208
|
+
* @param errorNumber The unique ECEditingStatus code identifying the error.
|
|
209
|
+
* @param identifier The identifier instance containing information about the EC object involved with the exception.
|
|
210
|
+
* @param innerError The SchemaEditingError containing the identifier of the EC object that caused the initial exception.
|
|
211
|
+
* @param ruleViolations Will contain EC rule violations of type [[AnyDiagnostic]] for exceptions with the error code ECEditingStatus.RuleViolation.
|
|
212
|
+
* @param message Optional error message. Most messages on automatically generated by this class based on the ECEditingStatus code.
|
|
213
|
+
*/
|
|
214
|
+
constructor(errorNumber: number, identifier: AnyIdentifier, innerError?: AnyEditingError | undefined, ruleViolations?: AnyDiagnostic[], message?: string);
|
|
215
|
+
/**
|
|
216
|
+
* Gets the SchemaId instance.
|
|
217
|
+
* @throws Error if the identifier is not an instance of SchemaId.
|
|
218
|
+
*/
|
|
219
|
+
get schemaId(): SchemaId;
|
|
220
|
+
/**
|
|
221
|
+
* Gets the SchemaItemId instance.
|
|
222
|
+
* @throws Error if the identifier is not an instance of SchemaItemId.
|
|
223
|
+
*/
|
|
224
|
+
get schemaItemId(): SchemaItemId;
|
|
225
|
+
/**
|
|
226
|
+
* Gets the ClassId instance.
|
|
227
|
+
* @throws Error if the identifier is not an instance of ClassId.
|
|
228
|
+
*/
|
|
229
|
+
get classId(): ClassId;
|
|
230
|
+
/**
|
|
231
|
+
* Gets the PropertyId instance.
|
|
232
|
+
* @throws Error if the identifier is not an instance of PropertyId.
|
|
233
|
+
*/
|
|
234
|
+
get propertyId(): PropertyId;
|
|
235
|
+
/**
|
|
236
|
+
* Gets the EnumerationId instance.
|
|
237
|
+
* @throws Error if the identifier is not an instance of EnumerationId.
|
|
238
|
+
*/
|
|
239
|
+
get enumerationId(): EnumerationId;
|
|
240
|
+
/**
|
|
241
|
+
* Gets the CustomAttributeId instance.
|
|
242
|
+
* @throws Error if the identifier is not an instance of CustomAttributeId.
|
|
243
|
+
*/
|
|
244
|
+
get customAttributeId(): CustomAttributeId;
|
|
245
|
+
/**
|
|
246
|
+
* Gets the RelationshipConstraintId instance.
|
|
247
|
+
* @throws Error if the identifier is not an instance of RelationshipConstraintId.
|
|
248
|
+
*/
|
|
249
|
+
get relationshipConstraintId(): RelationshipConstraintId;
|
|
250
|
+
get ruleViolations(): AnyDiagnostic[] | undefined;
|
|
251
|
+
toDebugString(): string;
|
|
252
|
+
private _appendMessage;
|
|
253
|
+
private generateMessage;
|
|
254
|
+
private getRuleViolationMessage;
|
|
255
|
+
}
|
|
256
|
+
export {};
|
|
257
|
+
//# sourceMappingURL=Exception.d.ts.map
|
|
@@ -0,0 +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,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