@itwin/core-backend 4.6.0-dev.9 → 4.7.0-dev.3

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 (162) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/BackendHubAccess.js +1 -1
  3. package/lib/cjs/BackendHubAccess.js.map +1 -1
  4. package/lib/cjs/BackendLoggerCategory.js +1 -1
  5. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  6. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  7. package/lib/cjs/BisCoreSchema.js +2 -0
  8. package/lib/cjs/BisCoreSchema.js.map +1 -1
  9. package/lib/cjs/BlobContainerService.js +1 -1
  10. package/lib/cjs/BlobContainerService.js.map +1 -1
  11. package/lib/cjs/BriefcaseManager.js +2 -2
  12. package/lib/cjs/BriefcaseManager.js.map +1 -1
  13. package/lib/cjs/Category.d.ts +1 -1
  14. package/lib/cjs/Category.js +1 -1
  15. package/lib/cjs/Category.js.map +1 -1
  16. package/lib/cjs/ChangeSummaryManager.js +1 -1
  17. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  18. package/lib/cjs/ChangedElementsManager.js.map +1 -1
  19. package/lib/cjs/ChangesetECAdaptor.js +2 -2
  20. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  21. package/lib/cjs/ChannelControl.js +2 -2
  22. package/lib/cjs/ChannelControl.js.map +1 -1
  23. package/lib/cjs/CheckpointManager.js +4 -4
  24. package/lib/cjs/CheckpointManager.js.map +1 -1
  25. package/lib/cjs/ClassRegistry.d.ts +3 -0
  26. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  27. package/lib/cjs/ClassRegistry.js +19 -8
  28. package/lib/cjs/ClassRegistry.js.map +1 -1
  29. package/lib/cjs/CloudSqlite.js +1 -1
  30. package/lib/cjs/CloudSqlite.js.map +1 -1
  31. package/lib/cjs/CodeService.js +1 -1
  32. package/lib/cjs/CodeService.js.map +1 -1
  33. package/lib/cjs/CodeSpecs.js +1 -1
  34. package/lib/cjs/CodeSpecs.js.map +1 -1
  35. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  36. package/lib/cjs/DevTools.js +2 -2
  37. package/lib/cjs/DevTools.js.map +1 -1
  38. package/lib/cjs/DisplayStyle.js.map +1 -1
  39. package/lib/cjs/ECDb.js +1 -1
  40. package/lib/cjs/ECDb.js.map +1 -1
  41. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  42. package/lib/cjs/ECSqlStatement.js.map +1 -1
  43. package/lib/cjs/Element.d.ts +0 -16
  44. package/lib/cjs/Element.d.ts.map +1 -1
  45. package/lib/cjs/Element.js +7 -23
  46. package/lib/cjs/Element.js.map +1 -1
  47. package/lib/cjs/ElementAspect.js +1 -1
  48. package/lib/cjs/ElementAspect.js.map +1 -1
  49. package/lib/cjs/ElementGraphics.d.ts +0 -3
  50. package/lib/cjs/ElementGraphics.d.ts.map +1 -1
  51. package/lib/cjs/ElementGraphics.js +2 -5
  52. package/lib/cjs/ElementGraphics.js.map +1 -1
  53. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  54. package/lib/cjs/ElementTreeWalker.js +5 -0
  55. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  56. package/lib/cjs/EntityReferences.js +1 -1
  57. package/lib/cjs/EntityReferences.js.map +1 -1
  58. package/lib/cjs/ExportGraphics.d.ts +1 -1
  59. package/lib/cjs/ExportGraphics.js +2 -2
  60. package/lib/cjs/ExportGraphics.js.map +1 -1
  61. package/lib/cjs/ExternalSource.js.map +1 -1
  62. package/lib/cjs/GeoCoordConfig.js +1 -1
  63. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  64. package/lib/cjs/GeometrySummary.js +5 -5
  65. package/lib/cjs/GeometrySummary.js.map +1 -1
  66. package/lib/cjs/HubMock.js +1 -1
  67. package/lib/cjs/HubMock.js.map +1 -1
  68. package/lib/cjs/IModelDb.d.ts +8 -2
  69. package/lib/cjs/IModelDb.d.ts.map +1 -1
  70. package/lib/cjs/IModelDb.js +62 -21
  71. package/lib/cjs/IModelDb.js.map +1 -1
  72. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  73. package/lib/cjs/IModelHost.js +2 -2
  74. package/lib/cjs/IModelHost.js.map +1 -1
  75. package/lib/cjs/IModelJsFs.js.map +1 -1
  76. package/lib/cjs/IpcHost.js +1 -1
  77. package/lib/cjs/IpcHost.js.map +1 -1
  78. package/lib/cjs/LineStyle.d.ts +1 -1
  79. package/lib/cjs/LineStyle.js +2 -2
  80. package/lib/cjs/LineStyle.js.map +1 -1
  81. package/lib/cjs/LocalHub.js.map +1 -1
  82. package/lib/cjs/LocalhostIpcHost.js +1 -1
  83. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  84. package/lib/cjs/Material.js +1 -1
  85. package/lib/cjs/Material.js.map +1 -1
  86. package/lib/cjs/NativeAppStorage.js +1 -1
  87. package/lib/cjs/NativeAppStorage.js.map +1 -1
  88. package/lib/cjs/NativeHost.js +1 -1
  89. package/lib/cjs/NativeHost.js.map +1 -1
  90. package/lib/cjs/NavigationRelationship.js +21 -21
  91. package/lib/cjs/NavigationRelationship.js.map +1 -1
  92. package/lib/cjs/PromiseMemoizer.d.ts +0 -3
  93. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
  94. package/lib/cjs/PromiseMemoizer.js +2 -5
  95. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  96. package/lib/cjs/PropertyStore.js +1 -1
  97. package/lib/cjs/PropertyStore.js.map +1 -1
  98. package/lib/cjs/Relationship.js.map +1 -1
  99. package/lib/cjs/SQLiteDb.js +2 -2
  100. package/lib/cjs/SQLiteDb.js.map +1 -1
  101. package/lib/cjs/Schema.js +1 -1
  102. package/lib/cjs/Schema.js.map +1 -1
  103. package/lib/cjs/SchemaSync.js +1 -1
  104. package/lib/cjs/SchemaSync.js.map +1 -1
  105. package/lib/cjs/ServerBasedLocks.js.map +1 -1
  106. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  107. package/lib/cjs/SqliteStatement.js +2 -2
  108. package/lib/cjs/SqliteStatement.js.map +1 -1
  109. package/lib/cjs/TextAnnotationElement.d.ts +54 -0
  110. package/lib/cjs/TextAnnotationElement.d.ts.map +1 -0
  111. package/lib/cjs/TextAnnotationElement.js +94 -0
  112. package/lib/cjs/TextAnnotationElement.js.map +1 -0
  113. package/lib/cjs/TextAnnotationGeometry.d.ts +28 -0
  114. package/lib/cjs/TextAnnotationGeometry.d.ts.map +1 -0
  115. package/lib/cjs/TextAnnotationGeometry.js +155 -0
  116. package/lib/cjs/TextAnnotationGeometry.js.map +1 -0
  117. package/lib/cjs/TextAnnotationLayout.d.ts +141 -0
  118. package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -0
  119. package/lib/cjs/TextAnnotationLayout.js +414 -0
  120. package/lib/cjs/TextAnnotationLayout.js.map +1 -0
  121. package/lib/cjs/TileStorage.js.map +1 -1
  122. package/lib/cjs/TxnManager.d.ts.map +1 -1
  123. package/lib/cjs/TxnManager.js +53 -1
  124. package/lib/cjs/TxnManager.js.map +1 -1
  125. package/lib/cjs/ViewDefinition.js +4 -4
  126. package/lib/cjs/ViewDefinition.js.map +1 -1
  127. package/lib/cjs/ViewStateHydrator.d.ts +1 -0
  128. package/lib/cjs/ViewStateHydrator.d.ts.map +1 -1
  129. package/lib/cjs/ViewStateHydrator.js +1 -0
  130. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  131. package/lib/cjs/ViewStore.js +1 -1
  132. package/lib/cjs/ViewStore.js.map +1 -1
  133. package/lib/cjs/core-backend.d.ts +47 -61
  134. package/lib/cjs/core-backend.d.ts.map +1 -1
  135. package/lib/cjs/core-backend.js +49 -62
  136. package/lib/cjs/core-backend.js.map +1 -1
  137. package/lib/cjs/domains/FunctionalElements.js +1 -1
  138. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  139. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  140. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  141. package/lib/cjs/rpc/multipart.js.map +1 -1
  142. package/lib/cjs/rpc/tracing.js +2 -2
  143. package/lib/cjs/rpc/tracing.js.map +1 -1
  144. package/lib/cjs/rpc/web/logging.js +2 -2
  145. package/lib/cjs/rpc/web/logging.js.map +1 -1
  146. package/lib/cjs/rpc/web/request.js.map +1 -1
  147. package/lib/cjs/rpc/web/response.js +1 -1
  148. package/lib/cjs/rpc/web/response.js.map +1 -1
  149. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  150. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  151. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +1 -1
  152. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  153. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  154. package/lib/cjs/workspace/Settings.js +1 -1
  155. package/lib/cjs/workspace/Settings.js.map +1 -1
  156. package/lib/cjs/workspace/SettingsSchemas.d.ts +0 -5
  157. package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -1
  158. package/lib/cjs/workspace/SettingsSchemas.js +1 -10
  159. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  160. package/lib/cjs/workspace/Workspace.js +4 -4
  161. package/lib/cjs/workspace/Workspace.js.map +1 -1
  162. package/package.json +14 -14
@@ -54,6 +54,9 @@ export * from "./Schema";
54
54
  export * from "./SchemaUtils";
55
55
  export * from "./SQLiteDb";
56
56
  export * from "./SqliteStatement";
57
+ export * from "./TextAnnotationElement";
58
+ export { computeTextBlockExtents, ComputeTextBlockExtentsArgs } from "./TextAnnotationLayout";
59
+ export * from "./TextAnnotationGeometry";
57
60
  export * from "./Texture";
58
61
  export * from "./TileStorage";
59
62
  export * from "./TxnManager";
@@ -70,28 +73,8 @@ export * from "./ChangesetECAdaptor";
70
73
  * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.
71
74
  */
72
75
  /**
73
- * @docs-group-description IModelHost
74
- * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).
75
- * See [the learning article]($docs/learning/backend/IModelHost.md).
76
- */
77
- /**
78
- * @docs-group-description iModels
79
- * Classes for working with [iModels]($docs/learning/iModels.md).
80
- * See [the learning article]($docs/learning/backend/index.md).
81
- */
82
- /**
83
- * @docs-group-description Schema
84
- * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)
85
- */
86
- /**
87
- * @docs-group-description Models
88
- * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).
89
- * See [the learning articles]($docs/learning/backend/index.md).
90
- */
91
- /**
92
- * @docs-group-description Elements
93
- * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).
94
- * See [the learning articles]($docs/learning/backend/index.md).
76
+ * @docs-group-description BlobContainers
77
+ * Classes for working with cloud-based blob containers.
95
78
  */
96
79
  /**
97
80
  * @docs-group-description Codes
@@ -99,13 +82,12 @@ export * from "./ChangesetECAdaptor";
99
82
  * See [the learning articles]($docs/learning/backend/index.md).
100
83
  */
101
84
  /**
102
- * @docs-group-description ViewDefinitions
103
- * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).
104
- * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).
85
+ * @docs-group-description ECDb
86
+ * Classes for working with ECDb.
105
87
  */
106
88
  /**
107
- * @docs-group-description Relationships
108
- * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.
89
+ * @docs-group-description ECSQL
90
+ * Classes for working with [ECSQL]($docs/learning/ECSQL.md)
109
91
  */
110
92
  /**
111
93
  * @docs-group-description ElementAspects
@@ -113,75 +95,79 @@ export * from "./ChangesetECAdaptor";
113
95
  * See [the learning articles]($docs/learning/backend/index.md).
114
96
  */
115
97
  /**
116
- * @docs-group-description Categories
117
- * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).
98
+ * @docs-group-description ElementGeometry
99
+ * Classes for defining the symbology and geometry of geometric elements
118
100
  */
119
101
  /**
120
- * @docs-group-description Symbology
121
- * Classes for defining the appearance of element geometry
102
+ * @docs-group-description Elements
103
+ * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).
104
+ * See [the learning articles]($docs/learning/backend/index.md).
122
105
  */
123
106
  /**
124
- * @docs-group-description ECDb
125
- * Classes for working with ECDb.
107
+ * @docs-group-description ExportGraphics
108
+ * APIs for producing low-level graphics primitives from element geometry.
109
+ */
110
+ /**
111
+ * @docs-group-description HubAccess
112
+ * APIs for working with IModelHub
126
113
  */
127
114
  /**
128
- * @docs-group-description SQLiteDb
129
- * Classes for working with SQLiteDb.
115
+ * @docs-group-description IModelHost
116
+ * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).
117
+ * See [the learning article]($docs/learning/backend/IModelHost.md).
130
118
  */
131
119
  /**
132
- * @docs-group-description NativeApp
133
- * Classes for working with Mobile/Desktop Application.
120
+ * @docs-group-description iModels
121
+ * Classes for working with [iModels]($docs/learning/iModels.md).
122
+ * See [the learning article]($docs/learning/backend/index.md).
134
123
  */
135
124
  /**
136
- * @docs-group-description ECSQL
137
- * Classes for working with [ECSQL]($docs/learning/ECSQL.md)
125
+ * @docs-group-description Logging
126
+ * Logger categories used by this package.
138
127
  */
139
128
  /**
140
- * @docs-group-description SQLite
141
- * Classes for working directly with SQLite
129
+ * @docs-group-description Models
130
+ * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).
131
+ * See [the learning articles]($docs/learning/backend/index.md).
142
132
  */
143
133
  /**
144
- * @docs-group-description Portability
145
- * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.
134
+ * @docs-group-description NativeApp
135
+ * Classes for working with Mobile/Desktop Application.
146
136
  */
147
137
  /**
148
- * @docs-group-description Utils
149
- * Miscellaneous utility classes.
138
+ * @docs-group-description Portability
150
139
  */
151
140
  /**
152
- * @docs-group-description Logging
153
- * Logger categories used by this package.
141
+ * @docs-group-description Relationships
142
+ * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.
154
143
  */
155
144
  /**
156
145
  * @docs-group-description RpcInterface
157
146
  * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).
158
147
  */
159
148
  /**
160
- * @docs-group-description BlobContainers
161
- * Classes for working with cloud-based blob containers.
149
+ * @docs-group-description Schema
150
+ * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)
162
151
  */
163
152
  /**
164
- * @docs-group-description TileStorage
165
- * Class for working with cloud storage using iTwin/object-storage cloud providers
153
+ * @docs-group-description SQLite
154
+ * Classes for working directly with SQLite
166
155
  */
167
156
  /**
168
- * @docs-group-description Authentication
169
- * Classes for working with Authentication.
157
+ * @docs-group-description SQLiteDb
158
+ * Classes for working with SQLiteDb.
170
159
  */
171
160
  /**
172
- * @docs-group-description Tiles
173
- * APIs for working with tile graphics.
161
+ * @docs-group-description TileStorage
162
+ * Class for working with cloud storage using iTwin/object-storage cloud providers
174
163
  */
175
164
  /**
176
- * @docs-group-description HubAccess
177
- * APIs for working with IModelHub
165
+ * @docs-group-description ViewDefinitions
166
+ * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).
167
+ * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).
178
168
  */
179
169
  /**
180
170
  * @docs-group-description Workspace
181
171
  * APIs for loading and using Settings and Workspace resources
182
172
  */
183
- /**
184
- * @docs-group-description ViewStateHydrator
185
- * Class responsible for loading ViewStates.
186
- */
187
173
  //# sourceMappingURL=core-backend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnG,cAAc,oBAAoB,CA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C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnG,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB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E,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC9F,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;IAGI;AAEJ;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG"}
@@ -18,7 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.NativeLoggerCategory = exports.NativeCloudSqlite = exports.IModelJsNative = void 0;
21
+ exports.computeTextBlockExtents = exports.NativeLoggerCategory = exports.NativeCloudSqlite = exports.IModelJsNative = void 0;
22
22
  var imodeljs_native_1 = require("@bentley/imodeljs-native");
23
23
  Object.defineProperty(exports, "IModelJsNative", { enumerable: true, get: function () { return imodeljs_native_1.IModelJsNative; } });
24
24
  Object.defineProperty(exports, "NativeCloudSqlite", { enumerable: true, get: function () { return imodeljs_native_1.NativeCloudSqlite; } });
@@ -78,6 +78,10 @@ __exportStar(require("./Schema"), exports);
78
78
  __exportStar(require("./SchemaUtils"), exports);
79
79
  __exportStar(require("./SQLiteDb"), exports);
80
80
  __exportStar(require("./SqliteStatement"), exports);
81
+ __exportStar(require("./TextAnnotationElement"), exports);
82
+ var TextAnnotationLayout_1 = require("./TextAnnotationLayout");
83
+ Object.defineProperty(exports, "computeTextBlockExtents", { enumerable: true, get: function () { return TextAnnotationLayout_1.computeTextBlockExtents; } });
84
+ __exportStar(require("./TextAnnotationGeometry"), exports);
81
85
  __exportStar(require("./Texture"), exports);
82
86
  __exportStar(require("./TileStorage"), exports);
83
87
  __exportStar(require("./TxnManager"), exports);
@@ -94,28 +98,8 @@ __exportStar(require("./ChangesetECAdaptor"), exports);
94
98
  * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.
95
99
  */
96
100
  /**
97
- * @docs-group-description IModelHost
98
- * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).
99
- * See [the learning article]($docs/learning/backend/IModelHost.md).
100
- */
101
- /**
102
- * @docs-group-description iModels
103
- * Classes for working with [iModels]($docs/learning/iModels.md).
104
- * See [the learning article]($docs/learning/backend/index.md).
105
- */
106
- /**
107
- * @docs-group-description Schema
108
- * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)
109
- */
110
- /**
111
- * @docs-group-description Models
112
- * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).
113
- * See [the learning articles]($docs/learning/backend/index.md).
114
- */
115
- /**
116
- * @docs-group-description Elements
117
- * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).
118
- * See [the learning articles]($docs/learning/backend/index.md).
101
+ * @docs-group-description BlobContainers
102
+ * Classes for working with cloud-based blob containers.
119
103
  */
120
104
  /**
121
105
  * @docs-group-description Codes
@@ -123,13 +107,12 @@ __exportStar(require("./ChangesetECAdaptor"), exports);
123
107
  * See [the learning articles]($docs/learning/backend/index.md).
124
108
  */
125
109
  /**
126
- * @docs-group-description ViewDefinitions
127
- * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).
128
- * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).
110
+ * @docs-group-description ECDb
111
+ * Classes for working with ECDb.
129
112
  */
130
113
  /**
131
- * @docs-group-description Relationships
132
- * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.
114
+ * @docs-group-description ECSQL
115
+ * Classes for working with [ECSQL]($docs/learning/ECSQL.md)
133
116
  */
134
117
  /**
135
118
  * @docs-group-description ElementAspects
@@ -137,75 +120,79 @@ __exportStar(require("./ChangesetECAdaptor"), exports);
137
120
  * See [the learning articles]($docs/learning/backend/index.md).
138
121
  */
139
122
  /**
140
- * @docs-group-description Categories
141
- * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).
123
+ * @docs-group-description ElementGeometry
124
+ * Classes for defining the symbology and geometry of geometric elements
142
125
  */
143
126
  /**
144
- * @docs-group-description Symbology
145
- * Classes for defining the appearance of element geometry
127
+ * @docs-group-description Elements
128
+ * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).
129
+ * See [the learning articles]($docs/learning/backend/index.md).
146
130
  */
147
131
  /**
148
- * @docs-group-description ECDb
149
- * Classes for working with ECDb.
132
+ * @docs-group-description ExportGraphics
133
+ * APIs for producing low-level graphics primitives from element geometry.
134
+ */
135
+ /**
136
+ * @docs-group-description HubAccess
137
+ * APIs for working with IModelHub
150
138
  */
151
139
  /**
152
- * @docs-group-description SQLiteDb
153
- * Classes for working with SQLiteDb.
140
+ * @docs-group-description IModelHost
141
+ * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).
142
+ * See [the learning article]($docs/learning/backend/IModelHost.md).
154
143
  */
155
144
  /**
156
- * @docs-group-description NativeApp
157
- * Classes for working with Mobile/Desktop Application.
145
+ * @docs-group-description iModels
146
+ * Classes for working with [iModels]($docs/learning/iModels.md).
147
+ * See [the learning article]($docs/learning/backend/index.md).
158
148
  */
159
149
  /**
160
- * @docs-group-description ECSQL
161
- * Classes for working with [ECSQL]($docs/learning/ECSQL.md)
150
+ * @docs-group-description Logging
151
+ * Logger categories used by this package.
162
152
  */
163
153
  /**
164
- * @docs-group-description SQLite
165
- * Classes for working directly with SQLite
154
+ * @docs-group-description Models
155
+ * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).
156
+ * See [the learning articles]($docs/learning/backend/index.md).
166
157
  */
167
158
  /**
168
- * @docs-group-description Portability
169
- * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.
159
+ * @docs-group-description NativeApp
160
+ * Classes for working with Mobile/Desktop Application.
170
161
  */
171
162
  /**
172
- * @docs-group-description Utils
173
- * Miscellaneous utility classes.
163
+ * @docs-group-description Portability
174
164
  */
175
165
  /**
176
- * @docs-group-description Logging
177
- * Logger categories used by this package.
166
+ * @docs-group-description Relationships
167
+ * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.
178
168
  */
179
169
  /**
180
170
  * @docs-group-description RpcInterface
181
171
  * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).
182
172
  */
183
173
  /**
184
- * @docs-group-description BlobContainers
185
- * Classes for working with cloud-based blob containers.
174
+ * @docs-group-description Schema
175
+ * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)
186
176
  */
187
177
  /**
188
- * @docs-group-description TileStorage
189
- * Class for working with cloud storage using iTwin/object-storage cloud providers
178
+ * @docs-group-description SQLite
179
+ * Classes for working directly with SQLite
190
180
  */
191
181
  /**
192
- * @docs-group-description Authentication
193
- * Classes for working with Authentication.
182
+ * @docs-group-description SQLiteDb
183
+ * Classes for working with SQLiteDb.
194
184
  */
195
185
  /**
196
- * @docs-group-description Tiles
197
- * APIs for working with tile graphics.
186
+ * @docs-group-description TileStorage
187
+ * Class for working with cloud storage using iTwin/object-storage cloud providers
198
188
  */
199
189
  /**
200
- * @docs-group-description HubAccess
201
- * APIs for working with IModelHub
190
+ * @docs-group-description ViewDefinitions
191
+ * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).
192
+ * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).
202
193
  */
203
194
  /**
204
195
  * @docs-group-description Workspace
205
196
  * APIs for loading and using Settings and Workspace resources
206
197
  */
207
- /**
208
- * @docs-group-description ViewStateHydrator
209
- * Class responsible for loading ViewStates.
210
- */
211
198
  //# sourceMappingURL=core-backend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,4DAAmG;AAA1F,iHAAA,cAAc,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAEhE,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AACnC,6CAA2B;AAC3B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,4DAA0C;AAC1C,0DAAwC;AACxC,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,2CAAyB;AACzB,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,4CAA0B;AAC1B,uDAAqC;AACrC,6CAA2B;AAC3B,8DAA4C;AAC5C,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,qDAAmC;AACnC,+CAA6B;AAC7B,2DAAyC;AACzC,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,2CAAyB;AACzB,gDAA8B;AAC9B,6CAA2B;AAC3B,oDAAkC;AAClC,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,mDAAiC;AACjC,8CAA4B;AAC5B,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,0DAAwC;AACxC,uDAAqC;AAErC;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\r\nexport { IModelJsNative, NativeCloudSqlite, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\n\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./BlobContainerService\";\r\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./ChannelControl\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CloudSqlite\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./EntityReferences\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelDb\";\r\nexport * from \"./IModelElementCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./SchemaSync\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./rpc/tracing\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SchemaUtils\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TileStorage\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./ViewStore\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./SqliteChangesetReader\";\r\nexport * from \"./ChangesetECAdaptor\";\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description BlobContainers\r\n * Classes for working with cloud-based blob containers.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
1
+ {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,4DAAmG;AAA1F,iHAAA,cAAc,OAAA;AAAE,oHAAA,iBAAiB,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAEhE,qDAAmC;AACnC,0DAAwC;AACxC,kDAAgC;AAChC,yDAAuC;AACvC,qDAAmC;AACn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GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;GAGG","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\r\nexport { IModelJsNative, NativeCloudSqlite, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\n\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./BlobContainerService\";\r\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./ChannelControl\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CloudSqlite\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./EntityReferences\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelDb\";\r\nexport * from \"./IModelElementCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./SchemaSync\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./rpc/tracing\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SchemaUtils\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./TextAnnotationElement\";\r\nexport { computeTextBlockExtents, ComputeTextBlockExtentsArgs } from \"./TextAnnotationLayout\";\r\nexport * from \"./TextAnnotationGeometry\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TileStorage\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./ViewStore\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./SqliteChangesetReader\";\r\nexport * from \"./ChangesetECAdaptor\";\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n\r\n/**\r\n * @docs-group-description BlobContainers\r\n * Classes for working with cloud-based blob containers.\r\n */\r\n\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description ElementGeometry\r\n * Classes for defining the symbology and geometry of geometric elements\r\n */\r\n\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description ExportGraphics\r\n * APIs for producing low-level graphics primitives from element geometry.\r\n */\r\n\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n\r\n/**\r\n * @docs-group-description Portability\r\n */\r\n\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n */\r\n\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n"]}
@@ -119,8 +119,8 @@ class FunctionalElementIsOfType extends core_common_1.RelatedElement {
119
119
  super({ id, relClassName });
120
120
  }
121
121
  }
122
- FunctionalElementIsOfType.classFullName = "Functional:FunctionalElementIsOfType";
123
122
  exports.FunctionalElementIsOfType = FunctionalElementIsOfType;
123
+ FunctionalElementIsOfType.classFullName = "Functional:FunctionalElementIsOfType";
124
124
  /** Relates a [[PhysicalElement]] to the [[FunctionalElement]] elements that it fulfills.
125
125
  * @public
126
126
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FunctionalElements.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElements.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAE4B;AAC5B,wCAA6F;AAE7F,oCAAqC;AACrC,sEAAyE;AACzE,kDAA2F;AAE3F;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,qCAA2B;IAClE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,qBAAqB,CAAC,CAAC,CAAC;IAEhF,YAAsB,KAAuC,EAAE,MAAgB;QAC7E,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,kDAOC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,iBAAS;IAC5C,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,iBAAiB,CAAC,CAAC,CAAC;IAE5E,YAAmB,KAAiB,EAAE,MAAgB;QACpD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,CAAC;IAEhF,YAAsB,KAA6B,EAAE,MAAgB;QACnE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,kDAOC;AAED;;GAEG;AACH,MAAsB,0BAA2B,SAAQ,iBAAiB;IACxE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,4BAA4B,CAAC,CAAC,CAAC;IAEvF,YAAsB,KAA6B,EAAE,MAAgB;QACnE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,gEAOC;AAED;;GAEG;AACH,MAAsB,cAAe,SAAQ,+BAAqB;IAChE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IAE3E,YAAsB,KAAiC,EAAE,MAAgB;QACvE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,wCAOC;AAED;;GAEG;AACH,MAAa,yBAA0B,SAAQ,4BAAc;IAC3D,gBAAgB;IACT,MAAM,KAAK,SAAS,KAAa,OAAO,2BAA2B,CAAC,CAAC,CAAC;IAE7E,YAAmB,EAAc,EAAE,eAAuB,yBAAyB,CAAC,aAAa;QAC/F,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9B,CAAC;;AAHa,uCAAa,GAAG,sCAAsC,CAAC;AAH1D,8DAAyB;AAStC;;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\r\n protected 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\r\n public constructor(props: ModelProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\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 {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalElement\"; }\r\n\r\n protected 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\r\n protected 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\r\n protected 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\r\n protected 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\r\n protected 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"]}
1
+ {"version":3,"file":"FunctionalElements.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElements.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oDAE4B;AAC5B,wCAA6F;AAE7F,oCAAqC;AACrC,sEAAyE;AACzE,kDAA2F;AAE3F;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,qCAA2B;IAClE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,qBAAqB,CAAC,CAAC,CAAC;IAEhF,YAAsB,KAAuC,EAAE,MAAgB;QAC7E,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,kDAOC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,iBAAS;IAC5C,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,iBAAiB,CAAC,CAAC,CAAC;IAE5E,YAAmB,KAAiB,EAAE,MAAgB;QACpD,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CAAC;IAEhF,YAAsB,KAA6B,EAAE,MAAgB;QACnE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,kDAOC;AAED;;GAEG;AACH,MAAsB,0BAA2B,SAAQ,iBAAiB;IACxE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,4BAA4B,CAAC,CAAC,CAAC;IAEvF,YAAsB,KAA6B,EAAE,MAAgB;QACnE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,gEAOC;AAED;;GAEG;AACH,MAAsB,cAAe,SAAQ,+BAAqB;IAChE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC;IAE3E,YAAsB,KAAiC,EAAE,MAAgB;QACvE,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,wCAOC;AAED;;GAEG;AACH,MAAa,yBAA0B,SAAQ,4BAAc;IAC3D,gBAAgB;IACT,MAAM,KAAK,SAAS,KAAa,OAAO,2BAA2B,CAAC,CAAC,CAAC;IAE7E,YAAmB,EAAc,EAAE,eAAuB,yBAAyB,CAAC,aAAa;QAC/F,KAAK,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9B,CAAC;;AANH,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\r\n protected 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\r\n public constructor(props: ModelProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\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 {\r\n /** @internal */\r\n public static override get className(): string { return \"FunctionalElement\"; }\r\n\r\n protected 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\r\n protected 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\r\n protected 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\r\n protected 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\r\n protected 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"]}
@@ -1 +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,cAAc;IACP,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;IACH,CAAC;CACF;AArBD,4CAqBC","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 /** @public */\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 }\r\n}\r\n"]}
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,CAAC;YAC1D,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;QACrD,CAAC;IACH,CAAC;IAED,cAAc;IACP,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,CAAC;YACnC,MAAM,IAAI,yBAAW,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;CACF;AArBD,4CAqBC","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 /** @public */\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 }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GenericSchema.js","sourceRoot":"","sources":["../../../src/domains/GenericSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,oDAAiD;AACjD,8CAA+C;AAC/C,sCAA4C;AAC5C,oDAAoD;AAEpD,cAAc;AACd,MAAa,aAAc,SAAQ,eAAM;IAChC,MAAM,KAAc,UAAU,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IAC9D,MAAM,KAAK,cAAc,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,2BAAc,CAAC,eAAe,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,UAAU,eAAe,CAAC,CAAC,CAAC,CAAC;IACzJ,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;CACF;AAVD,sCAUC","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 { ClassRegistry } from \"../ClassRegistry\";\r\nimport { KnownLocations } from \"../IModelHost\";\r\nimport { Schema, Schemas } from \"../Schema\";\r\nimport * as elementsModule from \"./GenericElements\";\r\n\r\n/** @public */\r\nexport class GenericSchema extends Schema {\r\n public static override get schemaName(): string { return \"Generic\"; }\r\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${GenericSchema.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"]}
1
+ {"version":3,"file":"GenericSchema.js","sourceRoot":"","sources":["../../../src/domains/GenericSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,oDAAiD;AACjD,8CAA+C;AAC/C,sCAA4C;AAC5C,oDAAoD;AAEpD,cAAc;AACd,MAAa,aAAc,SAAQ,eAAM;IAChC,MAAM,KAAc,UAAU,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IAC9D,MAAM,KAAK,cAAc,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,2BAAc,CAAC,eAAe,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,UAAU,eAAe,CAAC,CAAC,CAAC,CAAC;IACzJ,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,gBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1D,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;QACrD,CAAC;IACH,CAAC;CACF;AAVD,sCAUC","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 { ClassRegistry } from \"../ClassRegistry\";\r\nimport { KnownLocations } from \"../IModelHost\";\r\nimport { Schema, Schemas } from \"../Schema\";\r\nimport * as elementsModule from \"./GenericElements\";\r\n\r\n/** @public */\r\nexport class GenericSchema extends Schema {\r\n public static override get schemaName(): string { return \"Generic\"; }\r\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${GenericSchema.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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"multipart.js","sourceRoot":"","sources":["../../../src/rpc/multipart.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAqI;AACrI,sCAAsC;AACtC,yCAAyC;AAEzC,4CAA4C;AAE5C,gBAAgB;AAChB,SAAgB,qBAAqB,CAAC,KAAyB;IAC7D,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;IAC5B,0BAAY,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,mHAAmH;IACnH,gBAAgB;IAChB,OAAO,IAAI,CAAC;AACd,CAAC;AAND,sDAMC;AAED,gBAAgB;AACT,KAAK,UAAU,qBAAqB,CAAC,GAAsB;IAChE,OAAO,IAAI,OAAO,CAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACvB,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,gCAAkB,CAAC,MAAM,EAAE,CAAC;QAC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O,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AA5CD,sDA4CC;AAED,gBAAgB;AAChB,SAAgB,qBAAqB,CAAC,CAAS,EAAE,IAAoB,EAAE,KAAyB;IAC9F,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AACpF,CAAC;AAHD,sDAGC","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 RpcInterface\r\n */\r\n\r\nimport { BentleyStatus, FormDataCommon, HttpServerRequest, IModelError, RpcMultipart, RpcSerializedValue } from \"@itwin/core-common\";\r\nimport * as FormData from \"form-data\";\r\nimport * as multiparty from \"multiparty\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** @internal */\r\nexport function createMultipartStream(value: RpcSerializedValue) {\r\n const form = new FormData();\r\n RpcMultipart.writeValueToForm(form, value);\r\n // Type information for FormData is lying. It actually extends Stream but not Readable, although it appears to work\r\n // fine for now.\r\n return form;\r\n}\r\n\r\n/** @internal */\r\nexport async function parseMultipartRequest(req: HttpServerRequest) {\r\n return new Promise<RpcSerializedValue>((resolve, reject) => {\r\n const form = new multiparty.Form({ maxFieldsSize: Infinity });\r\n form.on(\"error\", (err) => {\r\n reject(err);\r\n });\r\n\r\n const value = RpcSerializedValue.create();\r\n const data: { [index: string]: { size: number, chunks: Buffer[] } } = {};\r\n\r\n form.on(\"part\", (part: multiparty.Part) => {\r\n part.on(\"data\", (chunk: string | Buffer) => {\r\n if (part.name === \"objects\") {\r\n value.objects += chunk.toString();\r\n } else if (Buffer.isBuffer(chunk)) {\r\n if (!data[part.name]) {\r\n data[part.name] = { size: 0, chunks: [] };\r\n }\r\n\r\n data[part.name].size += chunk.byteLength;\r\n data[part.name].chunks.push(chunk);\r\n } else {\r\n throw new IModelError(BentleyStatus.ERROR, \"Unknown input.\");\r\n }\r\n });\r\n });\r\n\r\n form.on(\"close\", () => {\r\n let i = 0;\r\n for (; ;) {\r\n const part = data[`data-${i}`];\r\n if (!part) {\r\n break;\r\n }\r\n\r\n value.data.push(Buffer.concat(part.chunks, part.size));\r\n ++i;\r\n }\r\n\r\n resolve(value);\r\n });\r\n\r\n form.parse(req);\r\n });\r\n}\r\n\r\n/** @internal */\r\nexport function appendToMultipartForm(i: number, form: FormDataCommon, value: RpcSerializedValue) {\r\n const buf = value.data[i];\r\n form.append(`data-${i}`, Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength));\r\n}\r\n"]}
1
+ {"version":3,"file":"multipart.js","sourceRoot":"","sources":["../../../src/rpc/multipart.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAqI;AACrI,sCAAsC;AACtC,yCAAyC;AAEzC,4CAA4C;AAE5C,gBAAgB;AAChB,SAAgB,qBAAqB,CAAC,KAAyB;IAC7D,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;IAC5B,0BAAY,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,mHAAmH;IACnH,gBAAgB;IAChB,OAAO,IAAI,CAAC;AACd,CAAC;AAND,sDAMC;AAED,gBAAgB;AACT,KAAK,UAAU,qBAAqB,CAAC,GAAsB;IAChE,OAAO,IAAI,OAAO,CAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACzD,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,IAA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AU,CAAC;gBACT,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBAC/B,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,MAAM;gBACR,CAAC;gBAED,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACvD,EAAE,CAAC,CAAC;YACN,CAAC;YAED,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AA5CD,sDA4CC;AAED,gBAAgB;AAChB,SAAgB,qBAAqB,CAAC,CAAS,EAAE,IAAoB,EAAE,KAAyB;IAC9F,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AACpF,CAAC;AAHD,sDAGC","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 RpcInterface\r\n */\r\n\r\nimport { BentleyStatus, FormDataCommon, HttpServerRequest, IModelError, RpcMultipart, RpcSerializedValue } from \"@itwin/core-common\";\r\nimport * as FormData from \"form-data\";\r\nimport * as multiparty from \"multiparty\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** @internal */\r\nexport function createMultipartStream(value: RpcSerializedValue) {\r\n const form = new FormData();\r\n RpcMultipart.writeValueToForm(form, value);\r\n // Type information for FormData is lying. It actually extends Stream but not Readable, although it appears to work\r\n // fine for now.\r\n return form;\r\n}\r\n\r\n/** @internal */\r\nexport async function parseMultipartRequest(req: HttpServerRequest) {\r\n return new Promise<RpcSerializedValue>((resolve, reject) => {\r\n const form = new multiparty.Form({ maxFieldsSize: Infinity });\r\n form.on(\"error\", (err) => {\r\n reject(err);\r\n });\r\n\r\n const value = RpcSerializedValue.create();\r\n const data: { [index: string]: { size: number, chunks: Buffer[] } } = {};\r\n\r\n form.on(\"part\", (part: multiparty.Part) => {\r\n part.on(\"data\", (chunk: string | Buffer) => {\r\n if (part.name === \"objects\") {\r\n value.objects += chunk.toString();\r\n } else if (Buffer.isBuffer(chunk)) {\r\n if (!data[part.name]) {\r\n data[part.name] = { size: 0, chunks: [] };\r\n }\r\n\r\n data[part.name].size += chunk.byteLength;\r\n data[part.name].chunks.push(chunk);\r\n } else {\r\n throw new IModelError(BentleyStatus.ERROR, \"Unknown input.\");\r\n }\r\n });\r\n });\r\n\r\n form.on(\"close\", () => {\r\n let i = 0;\r\n for (; ;) {\r\n const part = data[`data-${i}`];\r\n if (!part) {\r\n break;\r\n }\r\n\r\n value.data.push(Buffer.concat(part.chunks, part.size));\r\n ++i;\r\n }\r\n\r\n resolve(value);\r\n });\r\n\r\n form.parse(req);\r\n });\r\n}\r\n\r\n/** @internal */\r\nexport function appendToMultipartForm(i: number, form: FormDataCommon, value: RpcSerializedValue) {\r\n const buf = value.data[i];\r\n form.append(`data-${i}`, Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength));\r\n}\r\n"]}
@@ -44,12 +44,12 @@ class RpcTrace {
44
44
  static async runWithSpan(activity, fn) {
45
45
  return core_bentley_1.Tracing.withSpan(activity.rpcMethod ?? "unknown RPC method", async () => RpcTrace.run(activity, fn), {
46
46
  attributes: { ...core_common_1.RpcInvocation.sanitizeForLog(activity) },
47
- kind: core_bentley_1.SpanKind.SERVER,
47
+ kind: core_bentley_1.SpanKind.INTERNAL,
48
48
  });
49
49
  }
50
50
  }
51
- RpcTrace._storage = new async_hooks_1.AsyncLocalStorage();
52
51
  exports.RpcTrace = RpcTrace;
52
+ RpcTrace._storage = new async_hooks_1.AsyncLocalStorage();
53
53
  /** @internal */
54
54
  function initializeTracing(enableOpenTelemetry = false) {
55
55
  core_common_1.RpcInvocation.runActivity = async (activity, fn) => RpcTrace.run(activity, fn); // redirect the invocation processing to the tracer
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../src/rpc/tracing.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0BAA0B;AAE1B,sDAAwE;AACxE,oDAAgE;AAChE,6CAAgD;AAChD,oEAAiE;AACjE,8CAA2C;AAE3C,4CAA4C;AAE5C;;;;;;GAMG;AACH,MAAa,QAAQ;IAGnB;;SAEK;IACE,MAAM,KAAK,eAAe;QAC/B,OAAO,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAA6B,CAAC;IACjE,CAAC;IAED;;SAEK;IACE,MAAM,KAAK,qBAAqB;QACrC,IAAA,qBAAM,EAAC,SAAS,KAAK,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC/C,OAAO,QAAQ,CAAC,eAAe,CAAC;IAClC,CAAC;IAED,8CAA8C;IACvC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAI,QAAqB,EAAE,EAAoB;QACpE,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,0EAA0E;IACnE,MAAM,CAAC,KAAK,CAAC,WAAW,CAAI,QAAqB,EAAE,EAAoB;QAC5E,OAAO,sBAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,IAAI,oBAAoB,EAAE,KAAK,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE;YAC1G,UAAU,EAAE,EAAE,GAAG,2BAAa,CAAC,cAAc,C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(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 RpcInterface\r\n */\r\n\r\n// cspell:ignore calltrace\r\n\r\nimport { assert, Logger, SpanKind, Tracing } from \"@itwin/core-bentley\";\r\nimport { RpcActivity, RpcInvocation } from \"@itwin/core-common\";\r\nimport { AsyncLocalStorage } from \"async_hooks\";\r\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\r\nimport { IModelHost } from \"../IModelHost\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/**\r\n * Utility for tracing Rpc activity processing. When multiple Rpc requests are being processed asynchronously, this\r\n * class can be used to correlate the current calltrace with the originating RpcActivity. This is used for automatic appending\r\n * of RpcActivity to log messages emitted during Rpc processing. It may also be used to retrieve the user accessToken\r\n * from the RpcActivity.\r\n * @public\r\n */\r\nexport class RpcTrace {\r\n private static _storage = new AsyncLocalStorage();\r\n\r\n /** Get the [RpcActivity]($common) for the currently executing async, or `undefined` if there is no\r\n * RpcActivity in the current call stack.\r\n * */\r\n public static get currentActivity(): RpcActivity | undefined {\r\n return RpcTrace._storage.getStore() as RpcActivity | undefined;\r\n }\r\n\r\n /** Get the [RpcActivity]($common) for the currently executing async. Asserts that the RpcActivity\r\n * exists in the current call stack.\r\n * */\r\n public static get expectCurrentActivity(): RpcActivity {\r\n assert(undefined !== RpcTrace.currentActivity);\r\n return RpcTrace.currentActivity;\r\n }\r\n\r\n /** Start the processing of an RpcActivity. */\r\n public static async run<T>(activity: RpcActivity, fn: () => Promise<T>): Promise<T> {\r\n return RpcTrace._storage.run(activity, fn);\r\n }\r\n\r\n /** Start the processing of an RpcActivity inside an OpenTelemetry span */\r\n public static async runWithSpan<T>(activity: RpcActivity, fn: () => Promise<T>): Promise<T> {\r\n return Tracing.withSpan(activity.rpcMethod ?? \"unknown RPC method\", async () => RpcTrace.run(activity, fn), {\r\n attributes: { ...RpcInvocation.sanitizeForLog(activity) },\r\n kind: SpanKind.SERVER,\r\n });\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function initializeTracing(enableOpenTelemetry: boolean = false) {\r\n RpcInvocation.runActivity = async (activity, fn) => RpcTrace.run(activity, fn); // redirect the invocation processing to the tracer\r\n\r\n if (enableOpenTelemetry) {\r\n try {\r\n // eslint-disable-next-line @typescript-eslint/no-var-requires\r\n const api = require(\"@opentelemetry/api\");\r\n const tracer = api.trace.getTracer(\"@itwin/core-backend\", IModelHost.backendVersion);\r\n Tracing.enableOpenTelemetry(tracer, api);\r\n RpcInvocation.runActivity = async (activity, fn) => RpcTrace.runWithSpan(activity, fn); // wrap invocation in an OpenTelemetry span in addition to RpcTrace\r\n } catch (e) {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Logger.logError(BackendLoggerCategory.IModelHost, \"Failed to initialize OpenTelemetry\");\r\n Logger.logException(BackendLoggerCategory.IModelHost, e);\r\n }\r\n }\r\n\r\n // set up static logger metadata to include current RpcActivity information for logs during rpc processing\r\n Logger.staticMetaData.set(\"rpc\", () => RpcInvocation.sanitizeForLog(RpcTrace.currentActivity));\r\n}\r\n"]}
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../src/rpc/tracing.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0BAA0B;AAE1B,sDAAwE;AACxE,oDAAgE;AAChE,6CAAgD;AAChD,oEAAiE;AACjE,8CAA2C;AAE3C,4CAA4C;AAE5C;;;;;;GAMG;AACH,MAAa,QAAQ;IAGnB;;SAEK;IACE,MAAM,KAAK,eAAe;QAC/B,OAAO,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAA6B,CAAC;IACjE,CAAC;IAED;;SAEK;IACE,MAAM,KAAK,qBAAqB;QACrC,IAAA,qBAAM,EAAC,SAAS,KAAK,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC/C,OAAO,QAAQ,CAAC,eAAe,C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WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,mEAAmE;QAC7J,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,gEAAgE;YAChE,qBAAM,CAAC,QAAQ,CAAC,6CAAqB,CAAC,UAAU,EAAE,oCAAoC,CAAC,CAAC;YACxF,qBAAM,CAAC,YAAY,CAAC,6CAAqB,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,0GAA0G;IAC1G,qBAAM,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,2BAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;AACjG,CAAC;AAnBD,8CAmBC","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 RpcInterface\r\n */\r\n\r\n// cspell:ignore calltrace\r\n\r\nimport { assert, Logger, SpanKind, Tracing } from \"@itwin/core-bentley\";\r\nimport { RpcActivity, RpcInvocation } from \"@itwin/core-common\";\r\nimport { AsyncLocalStorage } from \"async_hooks\";\r\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\r\nimport { IModelHost } from \"../IModelHost\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/**\r\n * Utility for tracing Rpc activity processing. When multiple Rpc requests are being processed asynchronously, this\r\n * class can be used to correlate the current calltrace with the originating RpcActivity. This is used for automatic appending\r\n * of RpcActivity to log messages emitted during Rpc processing. It may also be used to retrieve the user accessToken\r\n * from the RpcActivity.\r\n * @public\r\n */\r\nexport class RpcTrace {\r\n private static _storage = new AsyncLocalStorage();\r\n\r\n /** Get the [RpcActivity]($common) for the currently executing async, or `undefined` if there is no\r\n * RpcActivity in the current call stack.\r\n * */\r\n public static get currentActivity(): RpcActivity | undefined {\r\n return RpcTrace._storage.getStore() as RpcActivity | undefined;\r\n }\r\n\r\n /** Get the [RpcActivity]($common) for the currently executing async. Asserts that the RpcActivity\r\n * exists in the current call stack.\r\n * */\r\n public static get expectCurrentActivity(): RpcActivity {\r\n assert(undefined !== RpcTrace.currentActivity);\r\n return RpcTrace.currentActivity;\r\n }\r\n\r\n /** Start the processing of an RpcActivity. */\r\n public static async run<T>(activity: RpcActivity, fn: () => Promise<T>): Promise<T> {\r\n return RpcTrace._storage.run(activity, fn);\r\n }\r\n\r\n /** Start the processing of an RpcActivity inside an OpenTelemetry span */\r\n public static async runWithSpan<T>(activity: RpcActivity, fn: () => Promise<T>): Promise<T> {\r\n return Tracing.withSpan(activity.rpcMethod ?? \"unknown RPC method\", async () => RpcTrace.run(activity, fn), {\r\n attributes: { ...RpcInvocation.sanitizeForLog(activity) },\r\n kind: SpanKind.INTERNAL,\r\n });\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function initializeTracing(enableOpenTelemetry: boolean = false) {\r\n RpcInvocation.runActivity = async (activity, fn) => RpcTrace.run(activity, fn); // redirect the invocation processing to the tracer\r\n\r\n if (enableOpenTelemetry) {\r\n try {\r\n // eslint-disable-next-line @typescript-eslint/no-var-requires\r\n const api = require(\"@opentelemetry/api\");\r\n const tracer = api.trace.getTracer(\"@itwin/core-backend\", IModelHost.backendVersion);\r\n Tracing.enableOpenTelemetry(tracer, api);\r\n RpcInvocation.runActivity = async (activity, fn) => RpcTrace.runWithSpan(activity, fn); // wrap invocation in an OpenTelemetry span in addition to RpcTrace\r\n } catch (e) {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Logger.logError(BackendLoggerCategory.IModelHost, \"Failed to initialize OpenTelemetry\");\r\n Logger.logException(BackendLoggerCategory.IModelHost, e);\r\n }\r\n }\r\n\r\n // set up static logger metadata to include current RpcActivity information for logs during rpc processing\r\n Logger.staticMetaData.set(\"rpc\", () => RpcInvocation.sanitizeForLog(RpcTrace.currentActivity));\r\n}\r\n"]}
@@ -34,8 +34,8 @@ class WebAppRpcLoggingBackend extends core_common_1.WebAppRpcLogging {
34
34
  status: invocation.status,
35
35
  errorMessage,
36
36
  // Alert! The following properties are required by Bentley DevOps standards. Do not change their names!
37
- ActivityId: invocation.request.id,
38
- MachineName: this.getHostname(),
37
+ ActivityId: invocation.request.id, // eslint-disable-line @typescript-eslint/naming-convention
38
+ MachineName: this.getHostname(), // eslint-disable-line @typescript-eslint/naming-convention
39
39
  ...pathIds,
40
40
  };
41
41
  core_bentley_1.Logger.logError(core_common_1.CommonLoggerCategory.RpcInterfaceBackend, `${message}.${operationDescriptor}`, metadata);