@itwin/core-backend 3.4.0-dev.47 → 3.4.0-dev.48

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 (219) hide show
  1. package/lib/cjs/AliCloudStorageService.d.ts +17 -17
  2. package/lib/cjs/AliCloudStorageService.js +68 -68
  3. package/lib/cjs/AliCloudStorageService.js.map +1 -1
  4. package/lib/cjs/BackendHubAccess.d.ts +224 -224
  5. package/lib/cjs/BackendHubAccess.js +41 -41
  6. package/lib/cjs/BackendHubAccess.js.map +1 -1
  7. package/lib/cjs/BackendLoggerCategory.d.ts +82 -82
  8. package/lib/cjs/BackendLoggerCategory.js +90 -90
  9. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  10. package/lib/cjs/BisCoreSchema.d.ts +21 -21
  11. package/lib/cjs/BisCoreSchema.js +60 -60
  12. package/lib/cjs/BisCoreSchema.js.map +1 -1
  13. package/lib/cjs/BriefcaseManager.d.ts +165 -165
  14. package/lib/cjs/BriefcaseManager.js +405 -405
  15. package/lib/cjs/BriefcaseManager.js.map +1 -1
  16. package/lib/cjs/Category.d.ts +153 -153
  17. package/lib/cjs/Category.js +243 -243
  18. package/lib/cjs/Category.js.map +1 -1
  19. package/lib/cjs/ChangeSummaryManager.d.ts +187 -187
  20. package/lib/cjs/ChangeSummaryManager.js +445 -445
  21. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  22. package/lib/cjs/ChangedElementsDb.d.ts +99 -99
  23. package/lib/cjs/ChangedElementsDb.js +165 -165
  24. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  25. package/lib/cjs/ChangedElementsManager.d.ts +39 -39
  26. package/lib/cjs/ChangedElementsManager.js +88 -88
  27. package/lib/cjs/ChangedElementsManager.js.map +1 -1
  28. package/lib/cjs/CheckpointManager.d.ts +122 -122
  29. package/lib/cjs/CheckpointManager.js +354 -354
  30. package/lib/cjs/CheckpointManager.js.map +1 -1
  31. package/lib/cjs/ClassRegistry.d.ts +71 -71
  32. package/lib/cjs/ClassRegistry.js +213 -213
  33. package/lib/cjs/ClassRegistry.js.map +1 -1
  34. package/lib/cjs/CloudSqlite.d.ts +328 -328
  35. package/lib/cjs/CloudSqlite.js +135 -135
  36. package/lib/cjs/CloudSqlite.js.map +1 -1
  37. package/lib/cjs/CloudStorageBackend.d.ts +46 -46
  38. package/lib/cjs/CloudStorageBackend.js +164 -164
  39. package/lib/cjs/CloudStorageBackend.js.map +1 -1
  40. package/lib/cjs/CodeService.d.ts +391 -391
  41. package/lib/cjs/CodeService.js +61 -61
  42. package/lib/cjs/CodeService.js.map +1 -1
  43. package/lib/cjs/CodeSpecs.d.ts +50 -50
  44. package/lib/cjs/CodeSpecs.js +112 -112
  45. package/lib/cjs/CodeSpecs.js.map +1 -1
  46. package/lib/cjs/ConcurrentQuery.d.ts +11 -11
  47. package/lib/cjs/ConcurrentQuery.js +30 -30
  48. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  49. package/lib/cjs/CustomViewState3dCreator.d.ts +32 -32
  50. package/lib/cjs/CustomViewState3dCreator.js +99 -99
  51. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  52. package/lib/cjs/DevTools.d.ts +71 -71
  53. package/lib/cjs/DevTools.js +154 -154
  54. package/lib/cjs/DevTools.js.map +1 -1
  55. package/lib/cjs/DisplayStyle.d.ts +106 -106
  56. package/lib/cjs/DisplayStyle.js +256 -256
  57. package/lib/cjs/DisplayStyle.js.map +1 -1
  58. package/lib/cjs/ECDb.d.ts +191 -191
  59. package/lib/cjs/ECDb.js +350 -350
  60. package/lib/cjs/ECDb.js.map +1 -1
  61. package/lib/cjs/ECSchemaXmlContext.d.ts +18 -18
  62. package/lib/cjs/ECSchemaXmlContext.js +41 -41
  63. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  64. package/lib/cjs/ECSqlStatement.d.ts +466 -466
  65. package/lib/cjs/ECSqlStatement.js +791 -791
  66. package/lib/cjs/ECSqlStatement.js.map +1 -1
  67. package/lib/cjs/Element.d.ts +1109 -1109
  68. package/lib/cjs/Element.js +1421 -1421
  69. package/lib/cjs/Element.js.map +1 -1
  70. package/lib/cjs/ElementAspect.d.ts +156 -156
  71. package/lib/cjs/ElementAspect.js +178 -178
  72. package/lib/cjs/ElementAspect.js.map +1 -1
  73. package/lib/cjs/ElementGraphics.d.ts +9 -9
  74. package/lib/cjs/ElementGraphics.js +41 -41
  75. package/lib/cjs/ElementGraphics.js.map +1 -1
  76. package/lib/cjs/ElementTreeWalker.d.ts +162 -162
  77. package/lib/cjs/ElementTreeWalker.js +409 -409
  78. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  79. package/lib/cjs/Entity.d.ts +76 -76
  80. package/lib/cjs/Entity.js +82 -82
  81. package/lib/cjs/Entity.js.map +1 -1
  82. package/lib/cjs/ExportGraphics.d.ts +317 -317
  83. package/lib/cjs/ExportGraphics.js +208 -208
  84. package/lib/cjs/ExportGraphics.js.map +1 -1
  85. package/lib/cjs/ExternalSource.d.ts +94 -94
  86. package/lib/cjs/ExternalSource.js +125 -125
  87. package/lib/cjs/ExternalSource.js.map +1 -1
  88. package/lib/cjs/GeoCoordConfig.d.ts +19 -19
  89. package/lib/cjs/GeoCoordConfig.js +82 -82
  90. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  91. package/lib/cjs/GeometrySummary.d.ts +4 -4
  92. package/lib/cjs/GeometrySummary.js +380 -380
  93. package/lib/cjs/GeometrySummary.js.map +1 -1
  94. package/lib/cjs/HubMock.d.ts +93 -93
  95. package/lib/cjs/HubMock.js +190 -190
  96. package/lib/cjs/HubMock.js.map +1 -1
  97. package/lib/cjs/IModelCloneContext.d.ts +85 -85
  98. package/lib/cjs/IModelCloneContext.js +150 -150
  99. package/lib/cjs/IModelCloneContext.js.map +1 -1
  100. package/lib/cjs/IModelDb.d.ts +1164 -1164
  101. package/lib/cjs/IModelDb.js +2321 -2321
  102. package/lib/cjs/IModelDb.js.map +1 -1
  103. package/lib/cjs/IModelHost.d.ts +347 -347
  104. package/lib/cjs/IModelHost.js +457 -457
  105. package/lib/cjs/IModelHost.js.map +1 -1
  106. package/lib/cjs/IModelJsFs.d.ts +62 -62
  107. package/lib/cjs/IModelJsFs.js +140 -140
  108. package/lib/cjs/IModelJsFs.js.map +1 -1
  109. package/lib/cjs/IpcHost.d.ts +98 -98
  110. package/lib/cjs/IpcHost.js +234 -234
  111. package/lib/cjs/IpcHost.js.map +1 -1
  112. package/lib/cjs/LineStyle.d.ts +311 -311
  113. package/lib/cjs/LineStyle.js +295 -295
  114. package/lib/cjs/LineStyle.js.map +1 -1
  115. package/lib/cjs/LocalHub.d.ts +162 -162
  116. package/lib/cjs/LocalHub.js +587 -587
  117. package/lib/cjs/LocalHub.js.map +1 -1
  118. package/lib/cjs/LocalhostIpcHost.d.ts +20 -20
  119. package/lib/cjs/LocalhostIpcHost.js +81 -81
  120. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  121. package/lib/cjs/Material.d.ts +103 -103
  122. package/lib/cjs/Material.js +147 -147
  123. package/lib/cjs/Material.js.map +1 -1
  124. package/lib/cjs/Model.d.ts +386 -386
  125. package/lib/cjs/Model.js +468 -468
  126. package/lib/cjs/Model.js.map +1 -1
  127. package/lib/cjs/NativeAppStorage.d.ts +51 -51
  128. package/lib/cjs/NativeAppStorage.js +202 -202
  129. package/lib/cjs/NativeAppStorage.js.map +1 -1
  130. package/lib/cjs/NativeHost.d.ts +52 -52
  131. package/lib/cjs/NativeHost.js +168 -168
  132. package/lib/cjs/NativeHost.js.map +1 -1
  133. package/lib/cjs/NavigationRelationship.d.ts +156 -156
  134. package/lib/cjs/NavigationRelationship.js +225 -225
  135. package/lib/cjs/NavigationRelationship.js.map +1 -1
  136. package/lib/cjs/PromiseMemoizer.d.ts +51 -51
  137. package/lib/cjs/PromiseMemoizer.js +95 -95
  138. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  139. package/lib/cjs/PropertyStore.d.ts +132 -132
  140. package/lib/cjs/PropertyStore.js +11 -11
  141. package/lib/cjs/PropertyStore.js.map +1 -1
  142. package/lib/cjs/Relationship.d.ts +400 -400
  143. package/lib/cjs/Relationship.js +465 -465
  144. package/lib/cjs/Relationship.js.map +1 -1
  145. package/lib/cjs/RpcBackend.d.ts +28 -28
  146. package/lib/cjs/RpcBackend.js +126 -126
  147. package/lib/cjs/RpcBackend.js.map +1 -1
  148. package/lib/cjs/SQLiteDb.d.ts +219 -219
  149. package/lib/cjs/SQLiteDb.js +214 -214
  150. package/lib/cjs/SQLiteDb.js.map +1 -1
  151. package/lib/cjs/Schema.d.ts +55 -55
  152. package/lib/cjs/Schema.js +83 -83
  153. package/lib/cjs/Schema.js.map +1 -1
  154. package/lib/cjs/ServerBasedLocks.d.ts +57 -57
  155. package/lib/cjs/ServerBasedLocks.js +168 -168
  156. package/lib/cjs/ServerBasedLocks.js.map +1 -1
  157. package/lib/cjs/SqliteStatement.d.ts +283 -283
  158. package/lib/cjs/SqliteStatement.js +448 -448
  159. package/lib/cjs/SqliteStatement.js.map +1 -1
  160. package/lib/cjs/Texture.d.ts +58 -58
  161. package/lib/cjs/Texture.js +82 -82
  162. package/lib/cjs/Texture.js.map +1 -1
  163. package/lib/cjs/TxnManager.d.ts +202 -202
  164. package/lib/cjs/TxnManager.js +353 -353
  165. package/lib/cjs/TxnManager.js.map +1 -1
  166. package/lib/cjs/ViewDefinition.d.ts +435 -435
  167. package/lib/cjs/ViewDefinition.js +629 -629
  168. package/lib/cjs/ViewDefinition.js.map +1 -1
  169. package/lib/cjs/ViewStateHydrator.d.ts +13 -13
  170. package/lib/cjs/ViewStateHydrator.js +103 -103
  171. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  172. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  173. package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +67 -67
  174. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +31 -31
  175. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +52 -52
  176. package/lib/cjs/assets/Settings/backend.setting.json5 +138 -138
  177. package/lib/cjs/core-backend.d.ts +178 -178
  178. package/lib/cjs/core-backend.js +198 -198
  179. package/lib/cjs/core-backend.js.map +1 -1
  180. package/lib/cjs/domains/FunctionalElements.d.ts +101 -101
  181. package/lib/cjs/domains/FunctionalElements.js +145 -145
  182. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  183. package/lib/cjs/domains/FunctionalSchema.d.ts +13 -13
  184. package/lib/cjs/domains/FunctionalSchema.js +40 -40
  185. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  186. package/lib/cjs/domains/GenericElements.d.ts +177 -177
  187. package/lib/cjs/domains/GenericElements.js +263 -263
  188. package/lib/cjs/domains/GenericElements.js.map +1 -1
  189. package/lib/cjs/domains/GenericSchema.d.ts +10 -10
  190. package/lib/cjs/domains/GenericSchema.js +28 -28
  191. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  192. package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts +15 -15
  193. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js +32 -32
  194. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  195. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +45 -45
  196. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +262 -262
  197. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  198. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts +20 -20
  199. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +195 -195
  200. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  201. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +36 -36
  202. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +165 -165
  203. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  204. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +16 -16
  205. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +43 -43
  206. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  207. package/lib/cjs/rpc-impl/WipRpcImpl.d.ts +15 -15
  208. package/lib/cjs/rpc-impl/WipRpcImpl.js +37 -37
  209. package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -1
  210. package/lib/cjs/workspace/Settings.d.ts +186 -186
  211. package/lib/cjs/workspace/Settings.js +152 -152
  212. package/lib/cjs/workspace/Settings.js.map +1 -1
  213. package/lib/cjs/workspace/SettingsSchemas.d.ts +75 -75
  214. package/lib/cjs/workspace/SettingsSchemas.js +191 -191
  215. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  216. package/lib/cjs/workspace/Workspace.d.ts +405 -405
  217. package/lib/cjs/workspace/Workspace.js +539 -539
  218. package/lib/cjs/workspace/Workspace.js.map +1 -1
  219. package/package.json +11 -11
@@ -1,401 +1,401 @@
1
- /** @packageDocumentation
2
- * @module Relationships
3
- */
4
- import { Id64String } from "@itwin/core-bentley";
5
- import { RelationshipProps, SourceAndTarget } from "@itwin/core-common";
6
- import { Entity } from "./Entity";
7
- import { IModelDb } from "./IModelDb";
8
- export type { SourceAndTarget, RelationshipProps } from "@itwin/core-common";
9
- /** Base class for all link table ECRelationships
10
- * @public
11
- */
12
- export declare class Relationship extends Entity {
13
- /** @internal */
14
- static get className(): string;
15
- readonly sourceId: Id64String;
16
- readonly targetId: Id64String;
17
- /** @internal */
18
- constructor(props: RelationshipProps, iModel: IModelDb);
19
- /** @internal */
20
- toJSON(): RelationshipProps;
21
- /**
22
- * Callback invoked by saveChanges on an ElementDrivesElement relationship when its input has changed or is the output of some upstream relationship whose input has changed.
23
- * This callback is invoked after the input element has been processed by upstream relationships.
24
- * A subclass of ElementDrivesElement can re-implement this static method to take some action. onRootChanged may modify the output element only.
25
- * @param _props The ElementDrivesElement relationship instance.
26
- * @param _iModel The iModel
27
- */
28
- static onRootChanged(_props: RelationshipProps, _iModel: IModelDb): void;
29
- /**
30
- * Callback invoked by saveChanges on an ElementDrivesElement relationship when the relationship instance has been deleted.
31
- * A subclass of ElementDrivesElement can re-implement this static method to take some action.
32
- * @param _props The deleted ElementDrivesElement relationship instance.
33
- * @param _iModel The iModel
34
- */
35
- static onDeletedDependency(_props: RelationshipProps, _iModel: IModelDb): void;
36
- /** Insert this Relationship into the iModel. */
37
- insert(): Id64String;
38
- /** Update this Relationship in the iModel. */
39
- update(): void;
40
- /** Delete this Relationship from the iModel. */
41
- delete(): void;
42
- static getInstance<T extends Relationship>(iModel: IModelDb, criteria: Id64String | SourceAndTarget): T;
43
- }
44
- /** A Relationship where one Element refers to another Element
45
- * @public
46
- */
47
- export declare class ElementRefersToElements extends Relationship {
48
- /** @internal */
49
- static get className(): string;
50
- /** Create an instance of the Relationship.
51
- * @param iModel The iModel that will contain the relationship
52
- * @param sourceId The sourceId of the relationship, that is, the driver element
53
- * @param targetId The targetId of the relationship, that is, the driven element
54
- * @return an instance of the specified class.
55
- */
56
- static create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): T;
57
- /** Insert a new instance of the Relationship.
58
- * @param iModel The iModel that will contain the relationship
59
- * @param sourceId The sourceId of the relationship, that is, the driver element
60
- * @param targetId The targetId of the relationship, that is, the driven element
61
- * @return The Id of the inserted Relationship.
62
- */
63
- static insert<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): Id64String;
64
- }
65
- /** Relates a [[DrawingGraphic]] to the [[Element]] that it represents
66
- * @public
67
- */
68
- export declare class DrawingGraphicRepresentsElement extends ElementRefersToElements {
69
- /** @internal */
70
- static get className(): string;
71
- }
72
- /** Relates a [[GraphicalElement3d]] to the [[Element]] that it represents
73
- * @public
74
- */
75
- export declare class GraphicalElement3dRepresentsElement extends ElementRefersToElements {
76
- /** @internal */
77
- static get className(): string;
78
- }
79
- /** Relates a [[SynchronizationConfigLink]] to N [[ExternalSource]] instances.
80
- * Each relationship instance represents an external source processed by the synchronization configuration.
81
- * @note The associated ECClass was added to the BisCore schema in version 1.0.13
82
- * @beta
83
- */
84
- export declare class SynchronizationConfigProcessesSources extends ElementRefersToElements {
85
- /** @internal */
86
- static get className(): string;
87
- }
88
- /** Relates a [[SynchronizationConfigLink]] to *root* [[ExternalSource]] instances.
89
- * @note The associated ECClass was added to the BisCore schema in version 1.0.13
90
- * @beta
91
- */
92
- export declare class SynchronizationConfigSpecifiesRootSources extends SynchronizationConfigProcessesSources {
93
- /** @internal */
94
- static get className(): string;
95
- }
96
- /** Properties that are common to all types of link table ECRelationships
97
- * @public
98
- */
99
- export interface ElementGroupsMembersProps extends RelationshipProps {
100
- memberPriority: number;
101
- }
102
- /** An ElementRefersToElements relationship where one Element *groups* a set of other Elements.
103
- * @public
104
- */
105
- export declare class ElementGroupsMembers extends ElementRefersToElements {
106
- /** @internal */
107
- static get className(): string;
108
- memberPriority: number;
109
- constructor(props: ElementGroupsMembersProps, iModel: IModelDb);
110
- static create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String, memberPriority?: number): T;
111
- }
112
- /** Relates a [[DefinitionGroup]] to its [[DefinitionElement]] members.
113
- * @note The associated ECClass was added to the BisCore schema in version 1.0.10
114
- * @public
115
- */
116
- export declare class DefinitionGroupGroupsDefinitions extends ElementGroupsMembers {
117
- /** @internal */
118
- static get className(): string;
119
- }
120
- /** Represents group membership where the group Element (and its properties) impart information about the member Elements above mere membership.
121
- * Implies that properties of the group should be considered as properties of its members.
122
- * @note The associated ECClass was added to the BisCore schema in version 1.0.11
123
- * @public
124
- */
125
- export declare class GroupImpartsToMembers extends ElementGroupsMembers {
126
- /** @internal */
127
- static get className(): string;
128
- }
129
- /** Relates an [[ExternalSourceGroup]] to its [[ExternalSource]] members.
130
- * @note The associated ECClass was added to the BisCore schema in version 1.0.13
131
- * @beta
132
- */
133
- export declare class ExternalSourceGroupGroupsSources extends ElementGroupsMembers {
134
- /** @internal */
135
- static get className(): string;
136
- }
137
- /** Properties that are common to all types of ElementDrivesElements
138
- * @beta
139
- */
140
- export interface ElementDrivesElementProps extends RelationshipProps {
141
- status: number;
142
- priority: number;
143
- }
144
- /** A Relationship indicating that one Element *drives* another Element.
145
- * An ElementDrivesElement relationship defines a one-way "driving" relationship from the source to the target.
146
- * When the source of an ElementDrivesElement relationship changes, the ElementDrivesElement itself can get a callback, and both the source and target elements can get callbacks.
147
- * By inserting ElementDrivesElement relationships, an app can create and store an acyclic directed graph of dependencies between elements.
148
- *
149
- * # Defining dependencies
150
- * Create an ElementDrivesElement relationship to specify that the source element drives the target element.
151
- * For example, to specify that element e1 drives element e2, create a relationship between them like this:
152
- * ```ts
153
- * const ede = ElementDrivesElement.create(iModel, e1id, e2id);
154
- * ede.insert();
155
- * ```
156
- * This creates a persistent relationship. The fact that e1 drives e2 is persisted in the iModel.
157
- *
158
- * # Defining dependency graphs
159
- * When you create multiple ElementDrivesElement relationships, you create a network of dependencies. The target of one may be the source of another.
160
- * A change in the content of an DgnElement can therefore trigger changes to many downstream elements.
161
- *
162
- * For example, to make element e1 drive element e2 and e2 drive another element, e3, create two relationships like this:
163
- * ```ts
164
- * const ede12 = ElementDrivesElement.create(iModel, e1id, e2id);
165
- * const ede23 = ElementDrivesElement.create(iModel, e2id, e3id);
166
- * ede12.insert();
167
- * ede23.insert();
168
- * ```
169
- * Those two relationships create this graph:
170
- * ```
171
- * e1 --> e2 --> e3
172
- * ```
173
- * Where the "-->" is meant to represent a driving relationship.
174
- *
175
- * The order in which you create the relationships does not matter.
176
- * The graph indicates that e3 depends on e2 and e2 depends on e1.
177
- *
178
- * An ElementDrivesElement relationship is between one source element and one target element.
179
- * Many ElementDrivesElement relationships can point to a given element, and many can point out of it.
180
- * Thus, you can define many:many relationships.
181
- * For example:
182
- * ```ts
183
- * const ede12 = ElementDrivesElement.create(iModel, e1id, e2id);
184
- * const ede112 = ElementDrivesElement.create(iModel, e11id, e2id);
185
- * const ede23 = ElementDrivesElement.create(iModel, e2id, e3id);
186
- * const ede231 = ElementDrivesElement.create(iModel, e2id, e31id);
187
- * ede12.insert();
188
- * ede112.insert();
189
- * ede23.insert();
190
- * ede231.insert();
191
- * ```
192
- * Creates this graph:
193
- * ```
194
- * e1 e3
195
- * \ /
196
- * e2
197
- * / \
198
- * e11 e31
199
- * ```
200
- * e2 depends on both e1 and e11. e2 then drives e3 and e31.
201
- *
202
- * In an ElementDrivesElement dependency graph, the relationships are the "edges" and the Elements are the "nodes".
203
- * The following terms are used when referring to the elements (nodes) in a dependency graph:
204
- * * Inputs - The sources of all edges that point to the element. This includes all upstream elements that flow into the element.
205
- * * Outputs - The targets of all edges that point out of the element. This includes all downstream elements.
206
- *
207
- * # Subgraph Processing
208
- * When changes are made, only the part of the overall graph that is affected will be processed. So, for example,
209
- * suppose we have this graph:
210
- * ```
211
- * e1 --> e2 --> e3
212
- * ```
213
- * If e1 changes, then the subgraph to be processed is equal to the full graph, as shown.
214
- *
215
- * If only e2 changes, then the subgraph to be processed is just:
216
- * ```
217
- * e2 --> e3
218
- * ```
219
- * If only e3 changes, then the subgraph consists of e3 by itself.
220
- *
221
- * Returning to the second example above, suppose we have this graph:
222
- * ```
223
- * e1 e3
224
- * \ /
225
- * e2
226
- * / \
227
- * e11 e31
228
- * ```
229
- * If e1 is changed, the affected subgraph is:
230
- * ```
231
- * e1 e3
232
- * \ /
233
- * e2
234
- * \
235
- * e31
236
- * ```
237
- * If e2 is changed, the affected subgraph is:
238
- * ```
239
- * e3
240
- * /
241
- * e2
242
- * \
243
- * e31
244
- * ```
245
- * # Callbacks
246
- * Once the affected subgraph to process is found, it propagates changes through it by making callbacks.
247
- * Classes for both elements (nodes) and ElementDrivesElements relationships (edges) can receive callbacks.
248
- *
249
- * ## ElementDrivesElement Callbacks
250
- * The following callbacks are invoked on ElementDrivesElement relationship classes (edges):
251
- * * onRootChanged
252
- * * onDeletedDependency
253
- *
254
- * Note that these are static methods. Their default implementations do nothing.
255
- * To receive and act on these callbacks, a domain should define a subclass of ElementDrivesElement and use that to create relationships.
256
- * The subclass should then implement the callbacks that it would like to act on.
257
- *
258
- * A ElementDrivesElement subclass callback is expected to make changes to the output element only!
259
- *
260
- * ## Element Callbacks
261
- * The following callbacks are invoked on Element classes (nodes):
262
- * * Element.onBeforeOutputsHandled
263
- * * Element.onAllInputsHandled
264
- *
265
- * ## Order
266
- * Callbacks are invoked by BriefcaseDb.saveChanges.
267
- * They are invoked in dependency (topological) order: driving elements first, then driven elements.
268
- *
269
- * Each callback is invoked only once. No matter how many times a given element was changed during the transaction,
270
- * a callback such as ElementDrivesElement.onRootChanged will be invoked only once.
271
- * In the same way, no matter how many of its inputs were changed, a callback such as Element.onAllInputsHandled will be
272
- * invoked only once.
273
- *
274
- * For example, suppose we have a graph:
275
- * ```
276
- * e1 --> e2 --> e3
277
- * ```
278
- *
279
- * Suppose that e1 is directly modified. No callbacks are made at that time.
280
- * Later, when BriefcaseDb.saveChanges is called, the following callbacks are made, in order:
281
- * 1. Element.onBeforeOutputsHandled e1
282
- * 1. ElementDrivesElement.onRootChanged e1->e2
283
- * 1. Element.onAllInputsHandled e2
284
- * 1. ElementDrivesElement.onRootChanged e2->e3
285
- * 1. Element.onAllInputsHandled e3
286
- *
287
- * Suppose that e3 is modified directly and BriefcaseDb.saveChanges is called.
288
- * Since no input to a relationship was changed, the sub-graph will be empty, and no callbacks will be made.
289
- *
290
- * Returning to the second example above, suppose we have this graph:
291
- * ```
292
- * e1 e3
293
- * \ /
294
- * e2
295
- * / \
296
- * e11 e31
297
- * ```
298
- * If e1 is changed and BriefcaseDb.saveChanges is called, the subgraph is:
299
- * ```
300
- * e1 e3
301
- * \ /
302
- * e2
303
- * \
304
- * e31
305
- * ```
306
- * The callbacks are:
307
- * 1. Element.onBeforeOutputsHandled e1
308
- * 1. ElementDrivesElement.onRootChanged e1->e2
309
- * 1. Element.onAllInputsHandled e2
310
- * 1. ElementDrivesElement.onRootChanged e2->e3
311
- * 1. Element.onAllInputsHandled e3
312
- * 1. ElementDrivesElement.onRootChanged e2->e31
313
- * 1. Element.onAllInputsHandled e31
314
- *
315
- * (The ElementDrivesElement.)
316
- *
317
- * #Errors
318
- * Circular dependencies are not permitted. If a cycle is detected, that is treated as a fatal error. All ElementDrivesElement relationships
319
- * involved in a cycle will have their status set to 1, indicating a failure.
320
- *
321
- * A callback may call txnManager.reportError to reject an invalid change. It can classify the error as fatal or just a warning.
322
- * A callback make set the status value of an ElementDrivesElement instance to 1 to indicate a processing failure in that edge.
323
- *
324
- * After BriefcaseDb.saveChanges is called, an app should check db.txns.validationErrors and db.txns.hasFatalError to find out if graph-evaluation failed.
325
- *
326
- * @beta
327
- */
328
- export declare class ElementDrivesElement extends Relationship {
329
- /** @internal */
330
- static get className(): string;
331
- /** Relationship status
332
- * * 0 indicates no errors. Set after a successful evaluation.
333
- * * 1 indicates that this driving relationship could not be evaluated. The callback itself can set this to indicate that it failed to process the input changes. Also, it is set if the relationship is part of a circular dependency.
334
- * * 0x80 The app or callback can set this to indicate to not propagate changes through this relationship.
335
- */
336
- status: number;
337
- /** Affects the order in which relationships are processed in the case where two relationships have the same output. */
338
- priority: number;
339
- /** @internal */
340
- constructor(props: ElementDrivesElementProps, iModel: IModelDb);
341
- static create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String, priority?: number): T;
342
- toJSON(): ElementDrivesElementProps;
343
- }
344
- /** Manages [[Relationship]]s.
345
- * @public
346
- */
347
- export declare class Relationships {
348
- private _iModel;
349
- /** @internal */
350
- constructor(iModel: IModelDb);
351
- /** Create a new instance of a Relationship.
352
- * @param props The properties of the new Relationship.
353
- * @throws [[IModelError]] if there is a problem creating the Relationship.
354
- */
355
- createInstance(props: RelationshipProps): Relationship;
356
- /** Check classFullName to ensure it is a link table relationship class. */
357
- private checkRelationshipClass;
358
- /** Insert a new relationship instance into the iModel. The relationship provided must be subclass of BisCore:ElementRefersToElements or BisCore:ElementDrivesElement.
359
- * @param props The properties of the new relationship.
360
- * @returns The Id of the newly inserted relationship.
361
- * @note The id property of the props object is set as a side effect of this function.
362
- */
363
- insertInstance(props: RelationshipProps): Id64String;
364
- /** Update the properties of an existing relationship instance in the iModel.
365
- * @param props the properties of the relationship instance to update. Any properties that are not present will be left unchanged.
366
- */
367
- updateInstance(props: RelationshipProps): void;
368
- /** Delete an Relationship instance from this iModel. */
369
- deleteInstance(props: RelationshipProps): void;
370
- /** Get the props of a Relationship instance
371
- * @param relClassFullName The full class name of the relationship in the form of "schema:class"
372
- * @param criteria Either the relationship instanceId or the source and target Ids
373
- * @throws [IModelError]($common) if the relationship is not found or cannot be loaded.
374
- * @see tryGetInstanceProps
375
- */
376
- getInstanceProps<T extends RelationshipProps>(relClassFullName: string, criteria: Id64String | SourceAndTarget): T;
377
- /** Get the props of a Relationship instance
378
- * @param relClassFullName The full class name of the relationship in the form of "schema:class"
379
- * @param criteria Either the relationship instanceId or the source and target Ids
380
- * @returns The RelationshipProps or `undefined` if the relationship is not found.
381
- * @note Useful for cases when a relationship may or may not exist and throwing an `Error` would be overkill.
382
- * @see getInstanceProps
383
- */
384
- tryGetInstanceProps<T extends RelationshipProps>(relClassFullName: string, criteria: Id64String | SourceAndTarget): T | undefined;
385
- /** Get a Relationship instance
386
- * @param relClassFullName The full class name of the relationship in the form of "schema:class"
387
- * @param criteria Either the relationship instanceId or the source and target Ids
388
- * @throws [IModelError]($common) if the relationship is not found or cannot be loaded.
389
- * @see tryGetInstance
390
- */
391
- getInstance<T extends Relationship>(relClassSqlName: string, criteria: Id64String | SourceAndTarget): T;
392
- /** Get a Relationship instance
393
- * @param relClassFullName The full class name of the relationship in the form of "schema:class"
394
- * @param criteria Either the relationship instanceId or the source and target Ids
395
- * @returns The relationship or `undefined` if the relationship is not found.
396
- * @note Useful for cases when a relationship may or may not exist and throwing an `Error` would be overkill.
397
- * @see getInstance
398
- */
399
- tryGetInstance<T extends Relationship>(relClassFullName: string, criteria: Id64String | SourceAndTarget): T | undefined;
400
- }
1
+ /** @packageDocumentation
2
+ * @module Relationships
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { RelationshipProps, SourceAndTarget } from "@itwin/core-common";
6
+ import { Entity } from "./Entity";
7
+ import { IModelDb } from "./IModelDb";
8
+ export type { SourceAndTarget, RelationshipProps } from "@itwin/core-common";
9
+ /** Base class for all link table ECRelationships
10
+ * @public
11
+ */
12
+ export declare class Relationship extends Entity {
13
+ /** @internal */
14
+ static get className(): string;
15
+ readonly sourceId: Id64String;
16
+ readonly targetId: Id64String;
17
+ /** @internal */
18
+ constructor(props: RelationshipProps, iModel: IModelDb);
19
+ /** @internal */
20
+ toJSON(): RelationshipProps;
21
+ /**
22
+ * Callback invoked by saveChanges on an ElementDrivesElement relationship when its input has changed or is the output of some upstream relationship whose input has changed.
23
+ * This callback is invoked after the input element has been processed by upstream relationships.
24
+ * A subclass of ElementDrivesElement can re-implement this static method to take some action. onRootChanged may modify the output element only.
25
+ * @param _props The ElementDrivesElement relationship instance.
26
+ * @param _iModel The iModel
27
+ */
28
+ static onRootChanged(_props: RelationshipProps, _iModel: IModelDb): void;
29
+ /**
30
+ * Callback invoked by saveChanges on an ElementDrivesElement relationship when the relationship instance has been deleted.
31
+ * A subclass of ElementDrivesElement can re-implement this static method to take some action.
32
+ * @param _props The deleted ElementDrivesElement relationship instance.
33
+ * @param _iModel The iModel
34
+ */
35
+ static onDeletedDependency(_props: RelationshipProps, _iModel: IModelDb): void;
36
+ /** Insert this Relationship into the iModel. */
37
+ insert(): Id64String;
38
+ /** Update this Relationship in the iModel. */
39
+ update(): void;
40
+ /** Delete this Relationship from the iModel. */
41
+ delete(): void;
42
+ static getInstance<T extends Relationship>(iModel: IModelDb, criteria: Id64String | SourceAndTarget): T;
43
+ }
44
+ /** A Relationship where one Element refers to another Element
45
+ * @public
46
+ */
47
+ export declare class ElementRefersToElements extends Relationship {
48
+ /** @internal */
49
+ static get className(): string;
50
+ /** Create an instance of the Relationship.
51
+ * @param iModel The iModel that will contain the relationship
52
+ * @param sourceId The sourceId of the relationship, that is, the driver element
53
+ * @param targetId The targetId of the relationship, that is, the driven element
54
+ * @return an instance of the specified class.
55
+ */
56
+ static create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): T;
57
+ /** Insert a new instance of the Relationship.
58
+ * @param iModel The iModel that will contain the relationship
59
+ * @param sourceId The sourceId of the relationship, that is, the driver element
60
+ * @param targetId The targetId of the relationship, that is, the driven element
61
+ * @return The Id of the inserted Relationship.
62
+ */
63
+ static insert<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): Id64String;
64
+ }
65
+ /** Relates a [[DrawingGraphic]] to the [[Element]] that it represents
66
+ * @public
67
+ */
68
+ export declare class DrawingGraphicRepresentsElement extends ElementRefersToElements {
69
+ /** @internal */
70
+ static get className(): string;
71
+ }
72
+ /** Relates a [[GraphicalElement3d]] to the [[Element]] that it represents
73
+ * @public
74
+ */
75
+ export declare class GraphicalElement3dRepresentsElement extends ElementRefersToElements {
76
+ /** @internal */
77
+ static get className(): string;
78
+ }
79
+ /** Relates a [[SynchronizationConfigLink]] to N [[ExternalSource]] instances.
80
+ * Each relationship instance represents an external source processed by the synchronization configuration.
81
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
82
+ * @beta
83
+ */
84
+ export declare class SynchronizationConfigProcessesSources extends ElementRefersToElements {
85
+ /** @internal */
86
+ static get className(): string;
87
+ }
88
+ /** Relates a [[SynchronizationConfigLink]] to *root* [[ExternalSource]] instances.
89
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
90
+ * @beta
91
+ */
92
+ export declare class SynchronizationConfigSpecifiesRootSources extends SynchronizationConfigProcessesSources {
93
+ /** @internal */
94
+ static get className(): string;
95
+ }
96
+ /** Properties that are common to all types of link table ECRelationships
97
+ * @public
98
+ */
99
+ export interface ElementGroupsMembersProps extends RelationshipProps {
100
+ memberPriority: number;
101
+ }
102
+ /** An ElementRefersToElements relationship where one Element *groups* a set of other Elements.
103
+ * @public
104
+ */
105
+ export declare class ElementGroupsMembers extends ElementRefersToElements {
106
+ /** @internal */
107
+ static get className(): string;
108
+ memberPriority: number;
109
+ constructor(props: ElementGroupsMembersProps, iModel: IModelDb);
110
+ static create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String, memberPriority?: number): T;
111
+ }
112
+ /** Relates a [[DefinitionGroup]] to its [[DefinitionElement]] members.
113
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.10
114
+ * @public
115
+ */
116
+ export declare class DefinitionGroupGroupsDefinitions extends ElementGroupsMembers {
117
+ /** @internal */
118
+ static get className(): string;
119
+ }
120
+ /** Represents group membership where the group Element (and its properties) impart information about the member Elements above mere membership.
121
+ * Implies that properties of the group should be considered as properties of its members.
122
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.11
123
+ * @public
124
+ */
125
+ export declare class GroupImpartsToMembers extends ElementGroupsMembers {
126
+ /** @internal */
127
+ static get className(): string;
128
+ }
129
+ /** Relates an [[ExternalSourceGroup]] to its [[ExternalSource]] members.
130
+ * @note The associated ECClass was added to the BisCore schema in version 1.0.13
131
+ * @beta
132
+ */
133
+ export declare class ExternalSourceGroupGroupsSources extends ElementGroupsMembers {
134
+ /** @internal */
135
+ static get className(): string;
136
+ }
137
+ /** Properties that are common to all types of ElementDrivesElements
138
+ * @beta
139
+ */
140
+ export interface ElementDrivesElementProps extends RelationshipProps {
141
+ status: number;
142
+ priority: number;
143
+ }
144
+ /** A Relationship indicating that one Element *drives* another Element.
145
+ * An ElementDrivesElement relationship defines a one-way "driving" relationship from the source to the target.
146
+ * When the source of an ElementDrivesElement relationship changes, the ElementDrivesElement itself can get a callback, and both the source and target elements can get callbacks.
147
+ * By inserting ElementDrivesElement relationships, an app can create and store an acyclic directed graph of dependencies between elements.
148
+ *
149
+ * # Defining dependencies
150
+ * Create an ElementDrivesElement relationship to specify that the source element drives the target element.
151
+ * For example, to specify that element e1 drives element e2, create a relationship between them like this:
152
+ * ```ts
153
+ * const ede = ElementDrivesElement.create(iModel, e1id, e2id);
154
+ * ede.insert();
155
+ * ```
156
+ * This creates a persistent relationship. The fact that e1 drives e2 is persisted in the iModel.
157
+ *
158
+ * # Defining dependency graphs
159
+ * When you create multiple ElementDrivesElement relationships, you create a network of dependencies. The target of one may be the source of another.
160
+ * A change in the content of an DgnElement can therefore trigger changes to many downstream elements.
161
+ *
162
+ * For example, to make element e1 drive element e2 and e2 drive another element, e3, create two relationships like this:
163
+ * ```ts
164
+ * const ede12 = ElementDrivesElement.create(iModel, e1id, e2id);
165
+ * const ede23 = ElementDrivesElement.create(iModel, e2id, e3id);
166
+ * ede12.insert();
167
+ * ede23.insert();
168
+ * ```
169
+ * Those two relationships create this graph:
170
+ * ```
171
+ * e1 --> e2 --> e3
172
+ * ```
173
+ * Where the "-->" is meant to represent a driving relationship.
174
+ *
175
+ * The order in which you create the relationships does not matter.
176
+ * The graph indicates that e3 depends on e2 and e2 depends on e1.
177
+ *
178
+ * An ElementDrivesElement relationship is between one source element and one target element.
179
+ * Many ElementDrivesElement relationships can point to a given element, and many can point out of it.
180
+ * Thus, you can define many:many relationships.
181
+ * For example:
182
+ * ```ts
183
+ * const ede12 = ElementDrivesElement.create(iModel, e1id, e2id);
184
+ * const ede112 = ElementDrivesElement.create(iModel, e11id, e2id);
185
+ * const ede23 = ElementDrivesElement.create(iModel, e2id, e3id);
186
+ * const ede231 = ElementDrivesElement.create(iModel, e2id, e31id);
187
+ * ede12.insert();
188
+ * ede112.insert();
189
+ * ede23.insert();
190
+ * ede231.insert();
191
+ * ```
192
+ * Creates this graph:
193
+ * ```
194
+ * e1 e3
195
+ * \ /
196
+ * e2
197
+ * / \
198
+ * e11 e31
199
+ * ```
200
+ * e2 depends on both e1 and e11. e2 then drives e3 and e31.
201
+ *
202
+ * In an ElementDrivesElement dependency graph, the relationships are the "edges" and the Elements are the "nodes".
203
+ * The following terms are used when referring to the elements (nodes) in a dependency graph:
204
+ * * Inputs - The sources of all edges that point to the element. This includes all upstream elements that flow into the element.
205
+ * * Outputs - The targets of all edges that point out of the element. This includes all downstream elements.
206
+ *
207
+ * # Subgraph Processing
208
+ * When changes are made, only the part of the overall graph that is affected will be processed. So, for example,
209
+ * suppose we have this graph:
210
+ * ```
211
+ * e1 --> e2 --> e3
212
+ * ```
213
+ * If e1 changes, then the subgraph to be processed is equal to the full graph, as shown.
214
+ *
215
+ * If only e2 changes, then the subgraph to be processed is just:
216
+ * ```
217
+ * e2 --> e3
218
+ * ```
219
+ * If only e3 changes, then the subgraph consists of e3 by itself.
220
+ *
221
+ * Returning to the second example above, suppose we have this graph:
222
+ * ```
223
+ * e1 e3
224
+ * \ /
225
+ * e2
226
+ * / \
227
+ * e11 e31
228
+ * ```
229
+ * If e1 is changed, the affected subgraph is:
230
+ * ```
231
+ * e1 e3
232
+ * \ /
233
+ * e2
234
+ * \
235
+ * e31
236
+ * ```
237
+ * If e2 is changed, the affected subgraph is:
238
+ * ```
239
+ * e3
240
+ * /
241
+ * e2
242
+ * \
243
+ * e31
244
+ * ```
245
+ * # Callbacks
246
+ * Once the affected subgraph to process is found, it propagates changes through it by making callbacks.
247
+ * Classes for both elements (nodes) and ElementDrivesElements relationships (edges) can receive callbacks.
248
+ *
249
+ * ## ElementDrivesElement Callbacks
250
+ * The following callbacks are invoked on ElementDrivesElement relationship classes (edges):
251
+ * * onRootChanged
252
+ * * onDeletedDependency
253
+ *
254
+ * Note that these are static methods. Their default implementations do nothing.
255
+ * To receive and act on these callbacks, a domain should define a subclass of ElementDrivesElement and use that to create relationships.
256
+ * The subclass should then implement the callbacks that it would like to act on.
257
+ *
258
+ * A ElementDrivesElement subclass callback is expected to make changes to the output element only!
259
+ *
260
+ * ## Element Callbacks
261
+ * The following callbacks are invoked on Element classes (nodes):
262
+ * * Element.onBeforeOutputsHandled
263
+ * * Element.onAllInputsHandled
264
+ *
265
+ * ## Order
266
+ * Callbacks are invoked by BriefcaseDb.saveChanges.
267
+ * They are invoked in dependency (topological) order: driving elements first, then driven elements.
268
+ *
269
+ * Each callback is invoked only once. No matter how many times a given element was changed during the transaction,
270
+ * a callback such as ElementDrivesElement.onRootChanged will be invoked only once.
271
+ * In the same way, no matter how many of its inputs were changed, a callback such as Element.onAllInputsHandled will be
272
+ * invoked only once.
273
+ *
274
+ * For example, suppose we have a graph:
275
+ * ```
276
+ * e1 --> e2 --> e3
277
+ * ```
278
+ *
279
+ * Suppose that e1 is directly modified. No callbacks are made at that time.
280
+ * Later, when BriefcaseDb.saveChanges is called, the following callbacks are made, in order:
281
+ * 1. Element.onBeforeOutputsHandled e1
282
+ * 1. ElementDrivesElement.onRootChanged e1->e2
283
+ * 1. Element.onAllInputsHandled e2
284
+ * 1. ElementDrivesElement.onRootChanged e2->e3
285
+ * 1. Element.onAllInputsHandled e3
286
+ *
287
+ * Suppose that e3 is modified directly and BriefcaseDb.saveChanges is called.
288
+ * Since no input to a relationship was changed, the sub-graph will be empty, and no callbacks will be made.
289
+ *
290
+ * Returning to the second example above, suppose we have this graph:
291
+ * ```
292
+ * e1 e3
293
+ * \ /
294
+ * e2
295
+ * / \
296
+ * e11 e31
297
+ * ```
298
+ * If e1 is changed and BriefcaseDb.saveChanges is called, the subgraph is:
299
+ * ```
300
+ * e1 e3
301
+ * \ /
302
+ * e2
303
+ * \
304
+ * e31
305
+ * ```
306
+ * The callbacks are:
307
+ * 1. Element.onBeforeOutputsHandled e1
308
+ * 1. ElementDrivesElement.onRootChanged e1->e2
309
+ * 1. Element.onAllInputsHandled e2
310
+ * 1. ElementDrivesElement.onRootChanged e2->e3
311
+ * 1. Element.onAllInputsHandled e3
312
+ * 1. ElementDrivesElement.onRootChanged e2->e31
313
+ * 1. Element.onAllInputsHandled e31
314
+ *
315
+ * (The ElementDrivesElement.)
316
+ *
317
+ * #Errors
318
+ * Circular dependencies are not permitted. If a cycle is detected, that is treated as a fatal error. All ElementDrivesElement relationships
319
+ * involved in a cycle will have their status set to 1, indicating a failure.
320
+ *
321
+ * A callback may call txnManager.reportError to reject an invalid change. It can classify the error as fatal or just a warning.
322
+ * A callback make set the status value of an ElementDrivesElement instance to 1 to indicate a processing failure in that edge.
323
+ *
324
+ * After BriefcaseDb.saveChanges is called, an app should check db.txns.validationErrors and db.txns.hasFatalError to find out if graph-evaluation failed.
325
+ *
326
+ * @beta
327
+ */
328
+ export declare class ElementDrivesElement extends Relationship {
329
+ /** @internal */
330
+ static get className(): string;
331
+ /** Relationship status
332
+ * * 0 indicates no errors. Set after a successful evaluation.
333
+ * * 1 indicates that this driving relationship could not be evaluated. The callback itself can set this to indicate that it failed to process the input changes. Also, it is set if the relationship is part of a circular dependency.
334
+ * * 0x80 The app or callback can set this to indicate to not propagate changes through this relationship.
335
+ */
336
+ status: number;
337
+ /** Affects the order in which relationships are processed in the case where two relationships have the same output. */
338
+ priority: number;
339
+ /** @internal */
340
+ constructor(props: ElementDrivesElementProps, iModel: IModelDb);
341
+ static create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String, priority?: number): T;
342
+ toJSON(): ElementDrivesElementProps;
343
+ }
344
+ /** Manages [[Relationship]]s.
345
+ * @public
346
+ */
347
+ export declare class Relationships {
348
+ private _iModel;
349
+ /** @internal */
350
+ constructor(iModel: IModelDb);
351
+ /** Create a new instance of a Relationship.
352
+ * @param props The properties of the new Relationship.
353
+ * @throws [[IModelError]] if there is a problem creating the Relationship.
354
+ */
355
+ createInstance(props: RelationshipProps): Relationship;
356
+ /** Check classFullName to ensure it is a link table relationship class. */
357
+ private checkRelationshipClass;
358
+ /** Insert a new relationship instance into the iModel. The relationship provided must be subclass of BisCore:ElementRefersToElements or BisCore:ElementDrivesElement.
359
+ * @param props The properties of the new relationship.
360
+ * @returns The Id of the newly inserted relationship.
361
+ * @note The id property of the props object is set as a side effect of this function.
362
+ */
363
+ insertInstance(props: RelationshipProps): Id64String;
364
+ /** Update the properties of an existing relationship instance in the iModel.
365
+ * @param props the properties of the relationship instance to update. Any properties that are not present will be left unchanged.
366
+ */
367
+ updateInstance(props: RelationshipProps): void;
368
+ /** Delete an Relationship instance from this iModel. */
369
+ deleteInstance(props: RelationshipProps): void;
370
+ /** Get the props of a Relationship instance
371
+ * @param relClassFullName The full class name of the relationship in the form of "schema:class"
372
+ * @param criteria Either the relationship instanceId or the source and target Ids
373
+ * @throws [IModelError]($common) if the relationship is not found or cannot be loaded.
374
+ * @see tryGetInstanceProps
375
+ */
376
+ getInstanceProps<T extends RelationshipProps>(relClassFullName: string, criteria: Id64String | SourceAndTarget): T;
377
+ /** Get the props of a Relationship instance
378
+ * @param relClassFullName The full class name of the relationship in the form of "schema:class"
379
+ * @param criteria Either the relationship instanceId or the source and target Ids
380
+ * @returns The RelationshipProps or `undefined` if the relationship is not found.
381
+ * @note Useful for cases when a relationship may or may not exist and throwing an `Error` would be overkill.
382
+ * @see getInstanceProps
383
+ */
384
+ tryGetInstanceProps<T extends RelationshipProps>(relClassFullName: string, criteria: Id64String | SourceAndTarget): T | undefined;
385
+ /** Get a Relationship instance
386
+ * @param relClassFullName The full class name of the relationship in the form of "schema:class"
387
+ * @param criteria Either the relationship instanceId or the source and target Ids
388
+ * @throws [IModelError]($common) if the relationship is not found or cannot be loaded.
389
+ * @see tryGetInstance
390
+ */
391
+ getInstance<T extends Relationship>(relClassSqlName: string, criteria: Id64String | SourceAndTarget): T;
392
+ /** Get a Relationship instance
393
+ * @param relClassFullName The full class name of the relationship in the form of "schema:class"
394
+ * @param criteria Either the relationship instanceId or the source and target Ids
395
+ * @returns The relationship or `undefined` if the relationship is not found.
396
+ * @note Useful for cases when a relationship may or may not exist and throwing an `Error` would be overkill.
397
+ * @see getInstance
398
+ */
399
+ tryGetInstance<T extends Relationship>(relClassFullName: string, criteria: Id64String | SourceAndTarget): T | undefined;
400
+ }
401
401
  //# sourceMappingURL=Relationship.d.ts.map