@itwin/core-backend 3.0.0-dev.100

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 (245) hide show
  1. package/CHANGELOG.md +1525 -0
  2. package/LICENSE.md +9 -0
  3. package/README.md +11 -0
  4. package/lib/cjs/AliCloudStorageService.d.ts +12 -0
  5. package/lib/cjs/AliCloudStorageService.d.ts.map +1 -0
  6. package/lib/cjs/AliCloudStorageService.js +70 -0
  7. package/lib/cjs/AliCloudStorageService.js.map +1 -0
  8. package/lib/cjs/BackendHubAccess.d.ts +208 -0
  9. package/lib/cjs/BackendHubAccess.d.ts.map +1 -0
  10. package/lib/cjs/BackendHubAccess.js +42 -0
  11. package/lib/cjs/BackendHubAccess.js.map +1 -0
  12. package/lib/cjs/BackendLoggerCategory.d.ts +83 -0
  13. package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -0
  14. package/lib/cjs/BackendLoggerCategory.js +91 -0
  15. package/lib/cjs/BackendLoggerCategory.js.map +1 -0
  16. package/lib/cjs/BisCoreSchema.d.ts +22 -0
  17. package/lib/cjs/BisCoreSchema.d.ts.map +1 -0
  18. package/lib/cjs/BisCoreSchema.js +61 -0
  19. package/lib/cjs/BisCoreSchema.js.map +1 -0
  20. package/lib/cjs/BriefcaseManager.d.ts +167 -0
  21. package/lib/cjs/BriefcaseManager.d.ts.map +1 -0
  22. package/lib/cjs/BriefcaseManager.js +406 -0
  23. package/lib/cjs/BriefcaseManager.js.map +1 -0
  24. package/lib/cjs/Category.d.ts +154 -0
  25. package/lib/cjs/Category.d.ts.map +1 -0
  26. package/lib/cjs/Category.js +244 -0
  27. package/lib/cjs/Category.js.map +1 -0
  28. package/lib/cjs/ChangeSummaryManager.d.ts +188 -0
  29. package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -0
  30. package/lib/cjs/ChangeSummaryManager.js +444 -0
  31. package/lib/cjs/ChangeSummaryManager.js.map +1 -0
  32. package/lib/cjs/ChangedElementsDb.d.ts +97 -0
  33. package/lib/cjs/ChangedElementsDb.d.ts.map +1 -0
  34. package/lib/cjs/ChangedElementsDb.js +166 -0
  35. package/lib/cjs/ChangedElementsDb.js.map +1 -0
  36. package/lib/cjs/ChangedElementsManager.d.ts +40 -0
  37. package/lib/cjs/ChangedElementsManager.d.ts.map +1 -0
  38. package/lib/cjs/ChangedElementsManager.js +89 -0
  39. package/lib/cjs/ChangedElementsManager.js.map +1 -0
  40. package/lib/cjs/CheckpointManager.d.ts +101 -0
  41. package/lib/cjs/CheckpointManager.d.ts.map +1 -0
  42. package/lib/cjs/CheckpointManager.js +257 -0
  43. package/lib/cjs/CheckpointManager.js.map +1 -0
  44. package/lib/cjs/ClassRegistry.d.ts +72 -0
  45. package/lib/cjs/ClassRegistry.d.ts.map +1 -0
  46. package/lib/cjs/ClassRegistry.js +154 -0
  47. package/lib/cjs/ClassRegistry.js.map +1 -0
  48. package/lib/cjs/CloudStorageBackend.d.ts +46 -0
  49. package/lib/cjs/CloudStorageBackend.d.ts.map +1 -0
  50. package/lib/cjs/CloudStorageBackend.js +157 -0
  51. package/lib/cjs/CloudStorageBackend.js.map +1 -0
  52. package/lib/cjs/CodeSpecs.d.ts +51 -0
  53. package/lib/cjs/CodeSpecs.d.ts.map +1 -0
  54. package/lib/cjs/CodeSpecs.js +113 -0
  55. package/lib/cjs/CodeSpecs.js.map +1 -0
  56. package/lib/cjs/ConcurrentQuery.d.ts +12 -0
  57. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -0
  58. package/lib/cjs/ConcurrentQuery.js +24 -0
  59. package/lib/cjs/ConcurrentQuery.js.map +1 -0
  60. package/lib/cjs/DevTools.d.ts +72 -0
  61. package/lib/cjs/DevTools.d.ts.map +1 -0
  62. package/lib/cjs/DevTools.js +155 -0
  63. package/lib/cjs/DevTools.js.map +1 -0
  64. package/lib/cjs/DisplayStyle.d.ts +107 -0
  65. package/lib/cjs/DisplayStyle.d.ts.map +1 -0
  66. package/lib/cjs/DisplayStyle.js +292 -0
  67. package/lib/cjs/DisplayStyle.js.map +1 -0
  68. package/lib/cjs/ECDb.d.ts +196 -0
  69. package/lib/cjs/ECDb.d.ts.map +1 -0
  70. package/lib/cjs/ECDb.js +354 -0
  71. package/lib/cjs/ECDb.js.map +1 -0
  72. package/lib/cjs/ECSchemaXmlContext.d.ts +18 -0
  73. package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -0
  74. package/lib/cjs/ECSchemaXmlContext.js +36 -0
  75. package/lib/cjs/ECSchemaXmlContext.js.map +1 -0
  76. package/lib/cjs/ECSqlStatement.d.ts +467 -0
  77. package/lib/cjs/ECSqlStatement.d.ts.map +1 -0
  78. package/lib/cjs/ECSqlStatement.js +783 -0
  79. package/lib/cjs/ECSqlStatement.js.map +1 -0
  80. package/lib/cjs/Element.d.ts +1082 -0
  81. package/lib/cjs/Element.d.ts.map +1 -0
  82. package/lib/cjs/Element.js +1392 -0
  83. package/lib/cjs/Element.js.map +1 -0
  84. package/lib/cjs/ElementAspect.d.ts +157 -0
  85. package/lib/cjs/ElementAspect.d.ts.map +1 -0
  86. package/lib/cjs/ElementAspect.js +179 -0
  87. package/lib/cjs/ElementAspect.js.map +1 -0
  88. package/lib/cjs/ElementGraphics.d.ts +10 -0
  89. package/lib/cjs/ElementGraphics.d.ts.map +1 -0
  90. package/lib/cjs/ElementGraphics.js +42 -0
  91. package/lib/cjs/ElementGraphics.js.map +1 -0
  92. package/lib/cjs/Entity.d.ts +57 -0
  93. package/lib/cjs/Entity.d.ts.map +1 -0
  94. package/lib/cjs/Entity.js +63 -0
  95. package/lib/cjs/Entity.js.map +1 -0
  96. package/lib/cjs/ExportGraphics.d.ts +302 -0
  97. package/lib/cjs/ExportGraphics.d.ts.map +1 -0
  98. package/lib/cjs/ExportGraphics.js +206 -0
  99. package/lib/cjs/ExportGraphics.js.map +1 -0
  100. package/lib/cjs/ExternalSource.d.ts +95 -0
  101. package/lib/cjs/ExternalSource.d.ts.map +1 -0
  102. package/lib/cjs/ExternalSource.js +126 -0
  103. package/lib/cjs/ExternalSource.js.map +1 -0
  104. package/lib/cjs/GeometrySummary.d.ts +5 -0
  105. package/lib/cjs/GeometrySummary.d.ts.map +1 -0
  106. package/lib/cjs/GeometrySummary.js +378 -0
  107. package/lib/cjs/GeometrySummary.js.map +1 -0
  108. package/lib/cjs/IModelCloneContext.d.ts +74 -0
  109. package/lib/cjs/IModelCloneContext.d.ts.map +1 -0
  110. package/lib/cjs/IModelCloneContext.js +130 -0
  111. package/lib/cjs/IModelCloneContext.js.map +1 -0
  112. package/lib/cjs/IModelDb.d.ts +1107 -0
  113. package/lib/cjs/IModelDb.d.ts.map +1 -0
  114. package/lib/cjs/IModelDb.js +2161 -0
  115. package/lib/cjs/IModelDb.js.map +1 -0
  116. package/lib/cjs/IModelHost.d.ts +284 -0
  117. package/lib/cjs/IModelHost.d.ts.map +1 -0
  118. package/lib/cjs/IModelHost.js +411 -0
  119. package/lib/cjs/IModelHost.js.map +1 -0
  120. package/lib/cjs/IModelJsFs.d.ts +63 -0
  121. package/lib/cjs/IModelJsFs.d.ts.map +1 -0
  122. package/lib/cjs/IModelJsFs.js +141 -0
  123. package/lib/cjs/IModelJsFs.js.map +1 -0
  124. package/lib/cjs/IModelSchemaLoader.d.ts +26 -0
  125. package/lib/cjs/IModelSchemaLoader.d.ts.map +1 -0
  126. package/lib/cjs/IModelSchemaLoader.js +95 -0
  127. package/lib/cjs/IModelSchemaLoader.js.map +1 -0
  128. package/lib/cjs/IpcHost.d.ts +99 -0
  129. package/lib/cjs/IpcHost.d.ts.map +1 -0
  130. package/lib/cjs/IpcHost.js +234 -0
  131. package/lib/cjs/IpcHost.js.map +1 -0
  132. package/lib/cjs/LineStyle.d.ts +312 -0
  133. package/lib/cjs/LineStyle.d.ts.map +1 -0
  134. package/lib/cjs/LineStyle.js +296 -0
  135. package/lib/cjs/LineStyle.js.map +1 -0
  136. package/lib/cjs/LocalhostIpcHost.d.ts +19 -0
  137. package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -0
  138. package/lib/cjs/LocalhostIpcHost.js +52 -0
  139. package/lib/cjs/LocalhostIpcHost.js.map +1 -0
  140. package/lib/cjs/Material.d.ts +102 -0
  141. package/lib/cjs/Material.d.ts.map +1 -0
  142. package/lib/cjs/Material.js +146 -0
  143. package/lib/cjs/Material.js.map +1 -0
  144. package/lib/cjs/Model.d.ts +387 -0
  145. package/lib/cjs/Model.d.ts.map +1 -0
  146. package/lib/cjs/Model.js +469 -0
  147. package/lib/cjs/Model.js.map +1 -0
  148. package/lib/cjs/NativeAppStorage.d.ts +52 -0
  149. package/lib/cjs/NativeAppStorage.d.ts.map +1 -0
  150. package/lib/cjs/NativeAppStorage.js +203 -0
  151. package/lib/cjs/NativeAppStorage.js.map +1 -0
  152. package/lib/cjs/NativeHost.d.ts +71 -0
  153. package/lib/cjs/NativeHost.d.ts.map +1 -0
  154. package/lib/cjs/NativeHost.js +221 -0
  155. package/lib/cjs/NativeHost.js.map +1 -0
  156. package/lib/cjs/NavigationRelationship.d.ts +157 -0
  157. package/lib/cjs/NavigationRelationship.d.ts.map +1 -0
  158. package/lib/cjs/NavigationRelationship.js +226 -0
  159. package/lib/cjs/NavigationRelationship.js.map +1 -0
  160. package/lib/cjs/PromiseMemoizer.d.ts +52 -0
  161. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -0
  162. package/lib/cjs/PromiseMemoizer.js +93 -0
  163. package/lib/cjs/PromiseMemoizer.js.map +1 -0
  164. package/lib/cjs/Relationship.d.ts +400 -0
  165. package/lib/cjs/Relationship.d.ts.map +1 -0
  166. package/lib/cjs/Relationship.js +460 -0
  167. package/lib/cjs/Relationship.js.map +1 -0
  168. package/lib/cjs/RpcBackend.d.ts +23 -0
  169. package/lib/cjs/RpcBackend.d.ts.map +1 -0
  170. package/lib/cjs/RpcBackend.js +94 -0
  171. package/lib/cjs/RpcBackend.js.map +1 -0
  172. package/lib/cjs/SQLiteDb.d.ts +66 -0
  173. package/lib/cjs/SQLiteDb.d.ts.map +1 -0
  174. package/lib/cjs/SQLiteDb.js +140 -0
  175. package/lib/cjs/SQLiteDb.js.map +1 -0
  176. package/lib/cjs/Schema.d.ts +56 -0
  177. package/lib/cjs/Schema.d.ts.map +1 -0
  178. package/lib/cjs/Schema.js +84 -0
  179. package/lib/cjs/Schema.js.map +1 -0
  180. package/lib/cjs/ServerBasedLocks.d.ts +64 -0
  181. package/lib/cjs/ServerBasedLocks.d.ts.map +1 -0
  182. package/lib/cjs/ServerBasedLocks.js +177 -0
  183. package/lib/cjs/ServerBasedLocks.js.map +1 -0
  184. package/lib/cjs/SqliteStatement.d.ts +264 -0
  185. package/lib/cjs/SqliteStatement.d.ts.map +1 -0
  186. package/lib/cjs/SqliteStatement.js +417 -0
  187. package/lib/cjs/SqliteStatement.js.map +1 -0
  188. package/lib/cjs/Texture.d.ts +59 -0
  189. package/lib/cjs/Texture.d.ts.map +1 -0
  190. package/lib/cjs/Texture.js +83 -0
  191. package/lib/cjs/Texture.js.map +1 -0
  192. package/lib/cjs/TxnManager.d.ts +203 -0
  193. package/lib/cjs/TxnManager.d.ts.map +1 -0
  194. package/lib/cjs/TxnManager.js +354 -0
  195. package/lib/cjs/TxnManager.js.map +1 -0
  196. package/lib/cjs/ViewDefinition.d.ts +432 -0
  197. package/lib/cjs/ViewDefinition.d.ts.map +1 -0
  198. package/lib/cjs/ViewDefinition.js +623 -0
  199. package/lib/cjs/ViewDefinition.js.map +1 -0
  200. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -0
  201. package/lib/cjs/core-backend.d.ts +162 -0
  202. package/lib/cjs/core-backend.d.ts.map +1 -0
  203. package/lib/cjs/core-backend.js +181 -0
  204. package/lib/cjs/core-backend.js.map +1 -0
  205. package/lib/cjs/domains/FunctionalElements.d.ts +102 -0
  206. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -0
  207. package/lib/cjs/domains/FunctionalElements.js +146 -0
  208. package/lib/cjs/domains/FunctionalElements.js.map +1 -0
  209. package/lib/cjs/domains/FunctionalSchema.d.ts +14 -0
  210. package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -0
  211. package/lib/cjs/domains/FunctionalSchema.js +41 -0
  212. package/lib/cjs/domains/FunctionalSchema.js.map +1 -0
  213. package/lib/cjs/domains/GenericElements.d.ts +178 -0
  214. package/lib/cjs/domains/GenericElements.d.ts.map +1 -0
  215. package/lib/cjs/domains/GenericElements.js +264 -0
  216. package/lib/cjs/domains/GenericElements.js.map +1 -0
  217. package/lib/cjs/domains/GenericSchema.d.ts +11 -0
  218. package/lib/cjs/domains/GenericSchema.d.ts.map +1 -0
  219. package/lib/cjs/domains/GenericSchema.js +29 -0
  220. package/lib/cjs/domains/GenericSchema.js.map +1 -0
  221. package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts +16 -0
  222. package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts.map +1 -0
  223. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js +33 -0
  224. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -0
  225. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +40 -0
  226. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -0
  227. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +207 -0
  228. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -0
  229. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts +21 -0
  230. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -0
  231. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +193 -0
  232. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -0
  233. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +37 -0
  234. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -0
  235. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +162 -0
  236. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -0
  237. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +17 -0
  238. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts.map +1 -0
  239. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +44 -0
  240. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -0
  241. package/lib/cjs/rpc-impl/WipRpcImpl.d.ts +16 -0
  242. package/lib/cjs/rpc-impl/WipRpcImpl.d.ts.map +1 -0
  243. package/lib/cjs/rpc-impl/WipRpcImpl.js +35 -0
  244. package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -0
  245. package/package.json +101 -0
@@ -0,0 +1,102 @@
1
+ /** @packageDocumentation
2
+ * @module Elements
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { FunctionalElementProps, InformationPartitionElementProps, ModelProps, RelatedElement, TypeDefinitionElementProps } from "@itwin/core-common";
6
+ import { InformationPartitionElement, RoleElement, TypeDefinitionElement } from "../Element";
7
+ import { IModelDb } from "../IModelDb";
8
+ import { RoleModel } from "../Model";
9
+ import { DrawingGraphicRepresentsElement, ElementRefersToElements } from "../Relationship";
10
+ /** A FunctionalPartition element is a key part of the iModel information hierarchy and is always parented
11
+ * to a Subject and broken down by a FunctionalModel.
12
+ * @public
13
+ */
14
+ export declare class FunctionalPartition extends InformationPartitionElement {
15
+ /** @internal */
16
+ static get className(): string;
17
+ /** @internal */
18
+ constructor(props: InformationPartitionElementProps, iModel: IModelDb);
19
+ }
20
+ /** A container for persisting FunctionalElements.
21
+ * @public
22
+ */
23
+ export declare class FunctionalModel extends RoleModel {
24
+ /** @internal */
25
+ static get className(): string;
26
+ constructor(props: ModelProps, iModel: IModelDb);
27
+ /** Insert a FunctionalPartition and a FunctionalModel that breaks it down.
28
+ * @param iModelDb Insert into this iModel
29
+ * @param parentSubjectId The FunctionalPartition will be inserted as a child of this Subject element.
30
+ * @param name The name of the FunctionalPartition that the new FunctionalModel will break down.
31
+ * @returns The Id of the newly inserted FunctionalPartition and FunctionalModel (same value).
32
+ * @throws [[IModelError]] if there is an insert problem.
33
+ */
34
+ static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
35
+ }
36
+ /** A FunctionalElement captures functional requirements that will ultimately be fulfilled by a PhysicalElement.
37
+ * @public
38
+ */
39
+ export declare abstract class FunctionalElement extends RoleElement implements FunctionalElementProps {
40
+ /** @internal */
41
+ static get className(): string;
42
+ /** @internal */
43
+ constructor(props: FunctionalElementProps, iModel: IModelDb);
44
+ }
45
+ /** A FunctionalBreakdownElement is a *folder* node in the functional hierarchy.
46
+ * @public
47
+ */
48
+ export declare abstract class FunctionalBreakdownElement extends FunctionalElement {
49
+ /** @internal */
50
+ static get className(): string;
51
+ /** @internal */
52
+ constructor(props: FunctionalElementProps, iModel: IModelDb);
53
+ }
54
+ /** @public */
55
+ export declare class FunctionalComposite extends FunctionalBreakdownElement {
56
+ /** @internal */
57
+ static get className(): string;
58
+ /** @internal */
59
+ constructor(props: FunctionalElementProps, iModel: IModelDb);
60
+ }
61
+ /** A FunctionalComponentElement is a *leaf* node in the functional hierarchy.
62
+ * @public
63
+ */
64
+ export declare abstract class FunctionalComponentElement extends FunctionalElement {
65
+ /** @internal */
66
+ static get className(): string;
67
+ /** @internal */
68
+ constructor(props: FunctionalElementProps, iModel: IModelDb);
69
+ }
70
+ /** Defines a set of properties (the 'type') that can be associated with a Functional Element.
71
+ * @public
72
+ */
73
+ export declare abstract class FunctionalType extends TypeDefinitionElement {
74
+ /** @internal */
75
+ static get className(): string;
76
+ /** @internal */
77
+ constructor(props: TypeDefinitionElementProps, iModel: IModelDb);
78
+ }
79
+ /** Relates a [[FunctionalElement]] to its [[FunctionalType]]
80
+ * @public
81
+ */
82
+ export declare class FunctionalElementIsOfType extends RelatedElement {
83
+ /** @internal */
84
+ static get className(): string;
85
+ static classFullName: string;
86
+ constructor(id: Id64String, relClassName?: string);
87
+ }
88
+ /** Relates a [[PhysicalElement]] to the [[FunctionalElement]] elements that it fulfills.
89
+ * @public
90
+ */
91
+ export declare class PhysicalElementFulfillsFunction extends ElementRefersToElements {
92
+ /** @internal */
93
+ static get className(): string;
94
+ }
95
+ /** Relates a [[DrawingGraphic]] to the [[FunctionalElement]] that it represents
96
+ * @public
97
+ */
98
+ export declare class DrawingGraphicRepresentsFunctionalElement extends DrawingGraphicRepresentsElement {
99
+ /** @internal */
100
+ static get className(): string;
101
+ }
102
+ //# sourceMappingURL=FunctionalElements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionalElements.d.ts","sourceRoot":"","sources":["../../../src/domains/FunctionalElements.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACL,sBAAsB,EAAU,gCAAgC,EAAE,UAAU,EAAE,cAAc,EAAE,0BAA0B,EACzH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE3F;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,2BAA2B;IAClE,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAAkC;IAChF,gBAAgB;gBACG,KAAK,EAAE,gCAAgC,EAAE,MAAM,EAAE,QAAQ;CAG7E;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;IAC5C,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAA8B;gBACzD,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ;IAGtD;;;;;;OAMG;WACW,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE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AAED;;GAEG;AACH,qBAAa,yCAA0C,SAAQ,+BAA+B;IAC5F,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAAwD;CACvG"}
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Elements
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.DrawingGraphicRepresentsFunctionalElement = exports.PhysicalElementFulfillsFunction = exports.FunctionalElementIsOfType = exports.FunctionalType = exports.FunctionalComponentElement = exports.FunctionalComposite = exports.FunctionalBreakdownElement = exports.FunctionalElement = exports.FunctionalModel = exports.FunctionalPartition = void 0;
11
+ const core_common_1 = require("@itwin/core-common");
12
+ const Element_1 = require("../Element");
13
+ const Model_1 = require("../Model");
14
+ const NavigationRelationship_1 = require("../NavigationRelationship");
15
+ const Relationship_1 = require("../Relationship");
16
+ /** A FunctionalPartition element is a key part of the iModel information hierarchy and is always parented
17
+ * to a Subject and broken down by a FunctionalModel.
18
+ * @public
19
+ */
20
+ class FunctionalPartition extends Element_1.InformationPartitionElement {
21
+ /** @internal */
22
+ static get className() { return "FunctionalPartition"; }
23
+ /** @internal */
24
+ constructor(props, iModel) {
25
+ super(props, iModel);
26
+ }
27
+ }
28
+ exports.FunctionalPartition = FunctionalPartition;
29
+ /** A container for persisting FunctionalElements.
30
+ * @public
31
+ */
32
+ class FunctionalModel extends Model_1.RoleModel {
33
+ /** @internal */
34
+ static get className() { return "FunctionalModel"; }
35
+ constructor(props, iModel) {
36
+ super(props, iModel);
37
+ }
38
+ /** Insert a FunctionalPartition and a FunctionalModel that breaks it down.
39
+ * @param iModelDb Insert into this iModel
40
+ * @param parentSubjectId The FunctionalPartition will be inserted as a child of this Subject element.
41
+ * @param name The name of the FunctionalPartition that the new FunctionalModel will break down.
42
+ * @returns The Id of the newly inserted FunctionalPartition and FunctionalModel (same value).
43
+ * @throws [[IModelError]] if there is an insert problem.
44
+ */
45
+ static insert(iModelDb, parentSubjectId, name) {
46
+ const partitionProps = {
47
+ classFullName: FunctionalPartition.classFullName,
48
+ model: core_common_1.IModel.repositoryModelId,
49
+ parent: new NavigationRelationship_1.SubjectOwnsPartitionElements(parentSubjectId),
50
+ code: FunctionalPartition.createCode(iModelDb, parentSubjectId, name),
51
+ };
52
+ const partitionId = iModelDb.elements.insertElement(partitionProps);
53
+ return iModelDb.models.insertModel({
54
+ classFullName: this.classFullName,
55
+ modeledElement: { id: partitionId },
56
+ });
57
+ }
58
+ }
59
+ exports.FunctionalModel = FunctionalModel;
60
+ /** A FunctionalElement captures functional requirements that will ultimately be fulfilled by a PhysicalElement.
61
+ * @public
62
+ */
63
+ class FunctionalElement extends Element_1.RoleElement {
64
+ /** @internal */
65
+ static get className() { return "FunctionalElement"; }
66
+ /** @internal */
67
+ constructor(props, iModel) {
68
+ super(props, iModel);
69
+ }
70
+ }
71
+ exports.FunctionalElement = FunctionalElement;
72
+ /** A FunctionalBreakdownElement is a *folder* node in the functional hierarchy.
73
+ * @public
74
+ */
75
+ class FunctionalBreakdownElement extends FunctionalElement {
76
+ /** @internal */
77
+ static get className() { return "FunctionalBreakdownElement"; }
78
+ /** @internal */
79
+ constructor(props, iModel) {
80
+ super(props, iModel);
81
+ }
82
+ }
83
+ exports.FunctionalBreakdownElement = FunctionalBreakdownElement;
84
+ /** @public */
85
+ class FunctionalComposite extends FunctionalBreakdownElement {
86
+ /** @internal */
87
+ static get className() { return "FunctionalComposite"; }
88
+ /** @internal */
89
+ constructor(props, iModel) {
90
+ super(props, iModel);
91
+ }
92
+ }
93
+ exports.FunctionalComposite = FunctionalComposite;
94
+ /** A FunctionalComponentElement is a *leaf* node in the functional hierarchy.
95
+ * @public
96
+ */
97
+ class FunctionalComponentElement extends FunctionalElement {
98
+ /** @internal */
99
+ static get className() { return "FunctionalComponentElement"; }
100
+ /** @internal */
101
+ constructor(props, iModel) {
102
+ super(props, iModel);
103
+ }
104
+ }
105
+ exports.FunctionalComponentElement = FunctionalComponentElement;
106
+ /** Defines a set of properties (the 'type') that can be associated with a Functional Element.
107
+ * @public
108
+ */
109
+ class FunctionalType extends Element_1.TypeDefinitionElement {
110
+ /** @internal */
111
+ static get className() { return "FunctionalType"; }
112
+ /** @internal */
113
+ constructor(props, iModel) {
114
+ super(props, iModel);
115
+ }
116
+ }
117
+ exports.FunctionalType = FunctionalType;
118
+ /** Relates a [[FunctionalElement]] to its [[FunctionalType]]
119
+ * @public
120
+ */
121
+ class FunctionalElementIsOfType extends core_common_1.RelatedElement {
122
+ constructor(id, relClassName = FunctionalElementIsOfType.classFullName) {
123
+ super({ id, relClassName });
124
+ }
125
+ /** @internal */
126
+ static get className() { return "FunctionalElementIsOfType"; }
127
+ }
128
+ exports.FunctionalElementIsOfType = FunctionalElementIsOfType;
129
+ FunctionalElementIsOfType.classFullName = "Functional:FunctionalElementIsOfType";
130
+ /** Relates a [[PhysicalElement]] to the [[FunctionalElement]] elements that it fulfills.
131
+ * @public
132
+ */
133
+ class PhysicalElementFulfillsFunction extends Relationship_1.ElementRefersToElements {
134
+ /** @internal */
135
+ static get className() { return "PhysicalElementFulfillsFunction"; }
136
+ }
137
+ exports.PhysicalElementFulfillsFunction = PhysicalElementFulfillsFunction;
138
+ /** Relates a [[DrawingGraphic]] to the [[FunctionalElement]] that it represents
139
+ * @public
140
+ */
141
+ class DrawingGraphicRepresentsFunctionalElement extends Relationship_1.DrawingGraphicRepresentsElement {
142
+ /** @internal */
143
+ static get className() { return "DrawingGraphicRepresentsFunctionalElement"; }
144
+ }
145
+ exports.DrawingGraphicRepresentsFunctionalElement = DrawingGraphicRepresentsFunctionalElement;
146
+ //# sourceMappingURL=FunctionalElements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionalElements.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElements.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,SAAQ,4BAAc;IAI3D,YAAmB,EAAc,EAAE,eAAuB,yBAAyB,CAAC,aAAa;QAC/F,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9B,CAAC;IALD,gBAAgB;IACT,MAAM,KAAK,SAAS,KAAa,OAAO,2BAA2B,CAAC,CAAC,CAAC;;AAF/E,8DAOC;AAJe,uCAAa,GAAG,sCAAsC,CAAC;AAMvE;;GAEG;AACH,MAAa,+BAAgC,SAAQ,sCAAuB;IAC1E,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,iCAAiC,CAAC,CAAC,CAAC;CAC7F;AAHD,0EAGC;AAED;;GAEG;AACH,MAAa,yCAA0C,SAAQ,8CAA+B;IAC5F,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,2CAA2C,CAAC,CAAC,CAAC;CACvG;AAHD,8FAGC","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 Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n FunctionalElementProps, IModel, InformationPartitionElementProps, ModelProps, RelatedElement, TypeDefinitionElementProps,\r\n} from \"@itwin/core-common\";\r\nimport { InformationPartitionElement, RoleElement, TypeDefinitionElement } from \"../Element\";\r\nimport { IModelDb } from \"../IModelDb\";\r\nimport { RoleModel } from \"../Model\";\r\nimport { SubjectOwnsPartitionElements } from \"../NavigationRelationship\";\r\nimport { DrawingGraphicRepresentsElement, ElementRefersToElements } from \"../Relationship\";\r\n\r\n/** A FunctionalPartition element is a key part of the iModel information hierarchy and is always parented\r\n * to a Subject and broken down by a FunctionalModel.\r\n * @public\r\n */\r\nexport class FunctionalPartition extends InformationPartitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalPartition\"; }\r\n /** @internal */\r\n public constructor(props: InformationPartitionElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** A container for persisting FunctionalElements.\r\n * @public\r\n */\r\nexport class FunctionalModel extends RoleModel {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalModel\"; }\r\n public constructor(props: ModelProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n /** Insert a FunctionalPartition and a FunctionalModel that breaks it down.\r\n * @param iModelDb Insert into this iModel\r\n * @param parentSubjectId The FunctionalPartition will be inserted as a child of this Subject element.\r\n * @param name The name of the FunctionalPartition that the new FunctionalModel will break down.\r\n * @returns The Id of the newly inserted FunctionalPartition and FunctionalModel (same value).\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\r\n const partitionProps: InformationPartitionElementProps = {\r\n classFullName: FunctionalPartition.classFullName,\r\n model: IModel.repositoryModelId,\r\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\r\n code: FunctionalPartition.createCode(iModelDb, parentSubjectId, name),\r\n };\r\n const partitionId = iModelDb.elements.insertElement(partitionProps);\r\n return iModelDb.models.insertModel({\r\n classFullName: this.classFullName,\r\n modeledElement: { id: partitionId },\r\n });\r\n }\r\n}\r\n\r\n/** A FunctionalElement captures functional requirements that will ultimately be fulfilled by a PhysicalElement.\r\n * @public\r\n */\r\nexport abstract class FunctionalElement extends RoleElement implements FunctionalElementProps {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalElement\"; }\r\n /** @internal */\r\n public constructor(props: FunctionalElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** A FunctionalBreakdownElement is a *folder* node in the functional hierarchy.\r\n * @public\r\n */\r\nexport abstract class FunctionalBreakdownElement extends FunctionalElement {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalBreakdownElement\"; }\r\n /** @internal */\r\n public constructor(props: FunctionalElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class FunctionalComposite extends FunctionalBreakdownElement {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalComposite\"; }\r\n /** @internal */\r\n public constructor(props: FunctionalElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** A FunctionalComponentElement is a *leaf* node in the functional hierarchy.\r\n * @public\r\n */\r\nexport abstract class FunctionalComponentElement extends FunctionalElement {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalComponentElement\"; }\r\n /** @internal */\r\n public constructor(props: FunctionalElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** Defines a set of properties (the 'type') that can be associated with a Functional Element.\r\n * @public\r\n */\r\nexport abstract class FunctionalType extends TypeDefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalType\"; }\r\n /** @internal */\r\n public constructor(props: TypeDefinitionElementProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n}\r\n\r\n/** Relates a [[FunctionalElement]] to its [[FunctionalType]]\r\n * @public\r\n */\r\nexport class FunctionalElementIsOfType extends RelatedElement {\r\n /** @internal */\r\n public static get className(): string { return \"FunctionalElementIsOfType\"; }\r\n public static classFullName = \"Functional:FunctionalElementIsOfType\";\r\n public constructor(id: Id64String, relClassName: string = FunctionalElementIsOfType.classFullName) {\r\n super({ id, relClassName });\r\n }\r\n}\r\n\r\n/** Relates a [[PhysicalElement]] to the [[FunctionalElement]] elements that it fulfills.\r\n * @public\r\n */\r\nexport class PhysicalElementFulfillsFunction extends ElementRefersToElements {\r\n /** @internal */\r\n public static override get className(): string { return \"PhysicalElementFulfillsFunction\"; }\r\n}\r\n\r\n/** Relates a [[DrawingGraphic]] to the [[FunctionalElement]] that it represents\r\n * @public\r\n */\r\nexport class DrawingGraphicRepresentsFunctionalElement extends DrawingGraphicRepresentsElement {\r\n /** @internal */\r\n public static override get className(): string { return \"DrawingGraphicRepresentsFunctionalElement\"; }\r\n}\r\n"]}
@@ -0,0 +1,14 @@
1
+ /** @packageDocumentation
2
+ * @module Schema
3
+ */
4
+ import { IModelDb } from "../IModelDb";
5
+ import { Schema } from "../Schema";
6
+ /** @public */
7
+ export declare class FunctionalSchema extends Schema {
8
+ static get schemaName(): string;
9
+ static get schemaFilePath(): string;
10
+ static registerSchema(): void;
11
+ /** @deprecated Use [[schemaFilePath]] and IModelDb.importSchemas instead */
12
+ static importSchema(iModelDb: IModelDb): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=FunctionalSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionalSchema.d.ts","sourceRoot":"","sources":["../../../src/domains/FunctionalSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAMH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAW,MAAM,WAAW,CAAC;AAG5C,cAAc;AACd,qBAAa,gBAAiB,SAAQ,MAAM;IAC1C,WAA2B,UAAU,IAAI,MAAM,CAAyB;IACxE,WAAkB,cAAc,IAAI,MAAM,CAA4H;WACxJ,cAAc;IAQ5B,4EAA4E;WACxD,YAAY,CAAC,QAAQ,EAAE,QAAQ;CAUpD"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Schema
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.FunctionalSchema = void 0;
11
+ const path = require("path");
12
+ const core_bentley_1 = require("@itwin/core-bentley");
13
+ const core_common_1 = require("@itwin/core-common");
14
+ const ClassRegistry_1 = require("../ClassRegistry");
15
+ const IModelHost_1 = require("../IModelHost");
16
+ const Schema_1 = require("../Schema");
17
+ const elementsModule = require("./FunctionalElements");
18
+ /** @public */
19
+ class FunctionalSchema extends Schema_1.Schema {
20
+ static get schemaName() { return "Functional"; }
21
+ static get schemaFilePath() { return path.join(IModelHost_1.KnownLocations.nativeAssetsDir, "ECSchemas", "Domain", `${FunctionalSchema.schemaName}.ecschema.xml`); }
22
+ static registerSchema() {
23
+ if (this !== Schema_1.Schemas.getRegisteredSchema(this.schemaName)) {
24
+ Schema_1.Schemas.unregisterSchema(this.schemaName);
25
+ Schema_1.Schemas.registerSchema(this);
26
+ ClassRegistry_1.ClassRegistry.registerModule(elementsModule, this);
27
+ }
28
+ }
29
+ /** @deprecated Use [[schemaFilePath]] and IModelDb.importSchemas instead */
30
+ static async importSchema(iModelDb) {
31
+ if (iModelDb.isBriefcaseDb())
32
+ await iModelDb.acquireSchemaLock();
33
+ const stat = iModelDb.nativeDb.importFunctionalSchema();
34
+ if (core_bentley_1.DbResult.BE_SQLITE_OK !== stat) {
35
+ throw new core_common_1.IModelError(stat, "Error importing Functional schema");
36
+ }
37
+ // FunctionalDomain (C++) does not create Category or other Elements on import
38
+ }
39
+ }
40
+ exports.FunctionalSchema = FunctionalSchema;
41
+ //# sourceMappingURL=FunctionalSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionalSchema.js","sourceRoot":"","sources":["../../../src/domains/FunctionalSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,sDAA+C;AAC/C,oDAAiD;AACjD,oDAAiD;AAEjD,8CAA+C;AAC/C,sCAA4C;AAC5C,uDAAuD;AAEvD,cAAc;AACd,MAAa,gBAAiB,SAAQ,eAAM;IACnC,MAAM,KAAc,UAAU,KAAa,OAAO,YAAY,CAAC,CAAC,CAAC;IACjE,MAAM,KAAK,cAAc,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,2BAAc,CAAC,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC,UAAU,eAAe,CAAC,CAAC,CAAC,CAAC;IAC/J,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,gBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACzD,gBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC1C,gBAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAC7B,6BAAa,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;SACpD;IACH,CAAC;IAED,4EAA4E;IACrE,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,QAAkB;QACjD,IAAI,QAAQ,CAAC,aAAa,EAAE;YAC1B,MAAM,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QAErC,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,EAAE,CAAC;QACxD,IAAI,uBAAQ,CAAC,YAAY,KAAK,IAAI,EAAE;YAClC,MAAM,IAAI,yBAAW,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC;SAClE;QACD,8EAA8E;IAChF,CAAC;CACF;AAtBD,4CAsBC","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 Schema\r\n */\r\n\r\nimport * as path from \"path\";\r\nimport { DbResult } from \"@itwin/core-bentley\";\r\nimport { IModelError } from \"@itwin/core-common\";\r\nimport { ClassRegistry } from \"../ClassRegistry\";\r\nimport { IModelDb } from \"../IModelDb\";\r\nimport { KnownLocations } from \"../IModelHost\";\r\nimport { Schema, Schemas } from \"../Schema\";\r\nimport * as elementsModule from \"./FunctionalElements\";\r\n\r\n/** @public */\r\nexport class FunctionalSchema extends Schema {\r\n public static override get schemaName(): string { return \"Functional\"; }\r\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Domain\", `${FunctionalSchema.schemaName}.ecschema.xml`); }\r\n public static registerSchema() {\r\n if (this !== Schemas.getRegisteredSchema(this.schemaName)) {\r\n Schemas.unregisterSchema(this.schemaName);\r\n Schemas.registerSchema(this);\r\n ClassRegistry.registerModule(elementsModule, this);\r\n }\r\n }\r\n\r\n /** @deprecated Use [[schemaFilePath]] and IModelDb.importSchemas instead */\r\n public static async importSchema(iModelDb: IModelDb) {\r\n if (iModelDb.isBriefcaseDb())\r\n await iModelDb.acquireSchemaLock();\r\n\r\n const stat = iModelDb.nativeDb.importFunctionalSchema();\r\n if (DbResult.BE_SQLITE_OK !== stat) {\r\n throw new IModelError(stat, \"Error importing Functional schema\");\r\n }\r\n // FunctionalDomain (C++) does not create Category or other Elements on import\r\n }\r\n}\r\n"]}
@@ -0,0 +1,178 @@
1
+ /** @packageDocumentation
2
+ * @module Elements
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { CalloutProps, DefinitionElementProps, ElementProps, GeometricElement2dProps, GeometricElement3dProps, GeometricModel3dProps, ModelProps, PhysicalElementProps, PhysicalTypeProps, TypeDefinitionElementProps, ViewAttachmentLabelProps } from "@itwin/core-common";
6
+ import { Document, GraphicalElement2d, GraphicalElement3d, GraphicalType2d, GroupInformationElement, PhysicalElement, PhysicalType, SpatialLocationElement } from "../Element";
7
+ import { IModelDb } from "../IModelDb";
8
+ import { PhysicalMaterial } from "../Material";
9
+ import { GraphicalModel3d, GroupInformationModel } from "../Model";
10
+ /** A graphical detailing symbol that is placed on a [[Drawing]] or [[Sheet]].
11
+ * @public
12
+ */
13
+ export declare abstract class DetailingSymbol extends GraphicalElement2d {
14
+ /** @internal */
15
+ static get className(): string;
16
+ constructor(props: GeometricElement2dProps, iModel: IModelDb);
17
+ }
18
+ /** A graphical DetailingSymbol that contains title text.
19
+ * @public
20
+ */
21
+ export declare class TitleText extends DetailingSymbol {
22
+ /** @internal */
23
+ static get className(): string;
24
+ constructor(props: GeometricElement2dProps, iModel: IModelDb);
25
+ }
26
+ /** A graphical DetailingSymbol that contains a view attachment label.
27
+ * @public
28
+ */
29
+ export declare class ViewAttachmentLabel extends DetailingSymbol implements ViewAttachmentLabelProps {
30
+ /** @internal */
31
+ static get className(): string;
32
+ constructor(props: ViewAttachmentLabelProps, iModel: IModelDb);
33
+ }
34
+ /** A graphical DetailingSymbol that calls out a reference to another drawing.
35
+ * @public
36
+ */
37
+ export declare abstract class Callout extends DetailingSymbol implements CalloutProps {
38
+ /** @internal */
39
+ static get className(): string;
40
+ constructor(props: CalloutProps, iModel: IModelDb);
41
+ }
42
+ /** A graphical Callout that references a section drawing.
43
+ * @public
44
+ */
45
+ export declare class SectionCallout extends Callout {
46
+ /** @internal */
47
+ static get className(): string;
48
+ constructor(props: CalloutProps, iModel: IModelDb);
49
+ }
50
+ /** A graphical Callout that references an elevation drawing.
51
+ * @public
52
+ */
53
+ export declare class ElevationCallout extends Callout {
54
+ /** @internal */
55
+ static get className(): string;
56
+ constructor(props: CalloutProps, iModel: IModelDb);
57
+ }
58
+ /** A graphical Callout that references a plan drawing.
59
+ * @public
60
+ */
61
+ export declare class PlanCallout extends Callout {
62
+ /** @internal */
63
+ static get className(): string;
64
+ constructor(props: CalloutProps, iModel: IModelDb);
65
+ }
66
+ /** A graphical Callout that references a detail drawing.
67
+ * @public
68
+ */
69
+ export declare class DetailCallout extends Callout {
70
+ /** @internal */
71
+ static get className(): string;
72
+ constructor(props: CalloutProps, iModel: IModelDb);
73
+ }
74
+ /** A generic container for persisting BisCore:GraphicalElement3d instances.
75
+ * @public
76
+ */
77
+ export declare class GenericGraphicalModel3d extends GraphicalModel3d {
78
+ /** @internal */
79
+ static get className(): string;
80
+ constructor(props: GeometricModel3dProps, iModel: IModelDb);
81
+ /** Insert a BisCore:GraphicalPartition3d and a Generic:GraphicalModel3d that sub-models it.
82
+ * @param iModelDb Insert into this iModel
83
+ * @param parentSubjectId The GraphicalPartition3d will be inserted as a child of this Subject element.
84
+ * @param name The name of the GraphicalPartition3d that the new Generic:GraphicalModel3d will sub-model.
85
+ * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
86
+ * @returns The Id of the newly inserted GraphicalPartition3d and GraphicalModel3d (same value).
87
+ * @throws [[IModelError]] if there is an insert problem.
88
+ */
89
+ static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
90
+ }
91
+ /** The Generic:Graphic3d class is used when 3D graphics cannot be further classified.
92
+ * @note More-specific BisCore:GraphicalElement3d subclasses should be used wherever possible.
93
+ * @public
94
+ */
95
+ export declare class Graphic3d extends GraphicalElement3d {
96
+ /** @internal */
97
+ static get className(): string;
98
+ constructor(props: GeometricElement3dProps, iModel: IModelDb);
99
+ }
100
+ /** The Generic:PhysicalObject class is used when physical elements cannot be further classified.
101
+ * @note More-specific BisCore:PhysicalElement subclasses should be used wherever possible.
102
+ * @public
103
+ */
104
+ export declare class PhysicalObject extends PhysicalElement {
105
+ /** @internal */
106
+ static get className(): string;
107
+ constructor(props: PhysicalElementProps, iModel: IModelDb);
108
+ }
109
+ /** The Generic:SpatialLocation class is used when spatial locations cannot be further classified.
110
+ * @note More-specific BisCore:SpatialLocationElement subclasses should be used wherever possible.
111
+ * @public
112
+ */
113
+ export declare class SpatialLocation extends SpatialLocationElement {
114
+ /** @internal */
115
+ static get className(): string;
116
+ constructor(props: GeometricElement3dProps, iModel: IModelDb);
117
+ }
118
+ /** A generic container for BisCore:GroupInformationElement instances.
119
+ * @public
120
+ */
121
+ export declare class GroupModel extends GroupInformationModel {
122
+ /** @internal */
123
+ static get className(): string;
124
+ constructor(props: ModelProps, iModel: IModelDb);
125
+ /** Insert a GroupInformationPartition and a GroupModel that breaks it down.
126
+ * @param iModelDb Insert into this iModel
127
+ * @param parentSubjectId The GroupInformationPartition will be inserted as a child of this Subject element.
128
+ * @param name The name of the GroupInformationPartition that the new GroupModel will break down.
129
+ * @returns The Id of the newly inserted GroupModel.
130
+ * @throws [[IModelError]] if there is an insert problem.
131
+ */
132
+ static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
133
+ }
134
+ /** The Generic:Group class is used when the group cannot be further classified.
135
+ * @public
136
+ */
137
+ export declare class Group extends GroupInformationElement {
138
+ /** @internal */
139
+ static get className(): string;
140
+ constructor(props: ElementProps, iModel: IModelDb);
141
+ }
142
+ /** The Generic:Document class is used when a document cannot be further classified.
143
+ * @note More-specific BisCore:Document subclasses should be used wherever possible.
144
+ * @public
145
+ */
146
+ export declare class GenericDocument extends Document {
147
+ /** @internal */
148
+ static get className(): string;
149
+ constructor(props: ElementProps, iModel: IModelDb);
150
+ }
151
+ /** The Generic:PhysicalMaterial class is used when the physical material cannot be further classified.
152
+ * @note More-specific BisCore:PhysicalMaterial subclasses should be used wherever possible.
153
+ * @public
154
+ */
155
+ export declare class GenericPhysicalMaterial extends PhysicalMaterial {
156
+ /** @internal */
157
+ static get className(): string;
158
+ constructor(props: DefinitionElementProps, iModel: IModelDb);
159
+ }
160
+ /** The Generic:PhysicalType class is used when the physical type cannot be further classified.
161
+ * @note More-specific BisCore:PhysicalType subclasses should be used wherever possible.
162
+ * @public
163
+ */
164
+ export declare class GenericPhysicalType extends PhysicalType {
165
+ /** @internal */
166
+ static get className(): string;
167
+ constructor(props: PhysicalTypeProps, iModel: IModelDb);
168
+ }
169
+ /** The Generic:GraphicalType2d class is used when graphical types cannot be further classified.
170
+ * @note More-specific BisCore:GraphicalType2d subclasses should be used wherever possible.
171
+ * @public
172
+ */
173
+ export declare class GenericGraphicalType2d extends GraphicalType2d {
174
+ /** @internal */
175
+ static get className(): string;
176
+ constructor(props: TypeDefinitionElementProps, iModel: IModelDb);
177
+ }
178
+ //# sourceMappingURL=GenericElements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericElements.d.ts","sourceRoot":"","sources":["../../../src/domains/GenericElements.ts"],"names":[],"mappings":"AAIA;;GAEG;A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