@itwin/core-backend 4.8.0-dev.8 → 4.9.0-dev.1

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 (266) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +18 -16
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js +16 -15
  5. package/lib/cjs/BackendHubAccess.js.map +1 -1
  6. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  7. package/lib/cjs/BisCoreSchema.js.map +1 -1
  8. package/lib/cjs/BlobContainerService.js.map +1 -1
  9. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseManager.js +19 -11
  11. package/lib/cjs/BriefcaseManager.js.map +1 -1
  12. package/lib/cjs/Category.d.ts +0 -6
  13. package/lib/cjs/Category.d.ts.map +1 -1
  14. package/lib/cjs/Category.js +0 -6
  15. package/lib/cjs/Category.js.map +1 -1
  16. package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
  17. package/lib/cjs/ChangeSummaryManager.js +13 -11
  18. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  19. package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
  20. package/lib/cjs/ChangedElementsDb.js +5 -3
  21. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  22. package/lib/cjs/ChangedElementsManager.js.map +1 -1
  23. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  24. package/lib/cjs/ChangesetECAdaptor.js +242 -237
  25. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  26. package/lib/cjs/ChannelControl.d.ts +4 -26
  27. package/lib/cjs/ChannelControl.d.ts.map +1 -1
  28. package/lib/cjs/ChannelControl.js +2 -101
  29. package/lib/cjs/ChannelControl.js.map +1 -1
  30. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  31. package/lib/cjs/CheckpointManager.js +5 -3
  32. package/lib/cjs/CheckpointManager.js.map +1 -1
  33. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  34. package/lib/cjs/ClassRegistry.js +8 -7
  35. package/lib/cjs/ClassRegistry.js.map +1 -1
  36. package/lib/cjs/CloudSqlite.d.ts +1 -1
  37. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  38. package/lib/cjs/CloudSqlite.js +2 -2
  39. package/lib/cjs/CloudSqlite.js.map +1 -1
  40. package/lib/cjs/CodeService.js.map +1 -1
  41. package/lib/cjs/CodeSpecs.js.map +1 -1
  42. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  43. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  44. package/lib/cjs/DevTools.d.ts.map +1 -1
  45. package/lib/cjs/DevTools.js +2 -1
  46. package/lib/cjs/DevTools.js.map +1 -1
  47. package/lib/cjs/DisplayStyle.d.ts +0 -3
  48. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  49. package/lib/cjs/DisplayStyle.js +0 -3
  50. package/lib/cjs/DisplayStyle.js.map +1 -1
  51. package/lib/cjs/ECDb.d.ts +6 -1
  52. package/lib/cjs/ECDb.d.ts.map +1 -1
  53. package/lib/cjs/ECDb.js +19 -14
  54. package/lib/cjs/ECDb.js.map +1 -1
  55. package/lib/cjs/ECSchemaXmlContext.js +2 -2
  56. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  57. package/lib/cjs/ECSqlStatement.d.ts +6 -3
  58. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  59. package/lib/cjs/ECSqlStatement.js +3 -3
  60. package/lib/cjs/ECSqlStatement.js.map +1 -1
  61. package/lib/cjs/Element.d.ts +2 -59
  62. package/lib/cjs/Element.d.ts.map +1 -1
  63. package/lib/cjs/Element.js +7 -63
  64. package/lib/cjs/Element.js.map +1 -1
  65. package/lib/cjs/ElementAspect.d.ts +0 -5
  66. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  67. package/lib/cjs/ElementAspect.js +4 -8
  68. package/lib/cjs/ElementAspect.js.map +1 -1
  69. package/lib/cjs/ElementGraphics.d.ts.map +1 -1
  70. package/lib/cjs/ElementGraphics.js +2 -1
  71. package/lib/cjs/ElementGraphics.js.map +1 -1
  72. package/lib/cjs/ElementTreeWalker.d.ts +19 -0
  73. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  74. package/lib/cjs/ElementTreeWalker.js +23 -9
  75. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  76. package/lib/cjs/Entity.js.map +1 -1
  77. package/lib/cjs/EntityReferences.js.map +1 -1
  78. package/lib/cjs/ExportGraphics.js.map +1 -1
  79. package/lib/cjs/ExternalSource.js.map +1 -1
  80. package/lib/cjs/GeoCoordConfig.d.ts.map +1 -1
  81. package/lib/cjs/GeoCoordConfig.js +2 -1
  82. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  83. package/lib/cjs/GeographicCRSServices.js +2 -2
  84. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  85. package/lib/cjs/GeometrySummary.d.ts.map +1 -1
  86. package/lib/cjs/GeometrySummary.js +49 -48
  87. package/lib/cjs/GeometrySummary.js.map +1 -1
  88. package/lib/cjs/HubMock.js.map +1 -1
  89. package/lib/cjs/IModelCloneContext.js.map +1 -1
  90. package/lib/cjs/IModelDb.d.ts +24 -94
  91. package/lib/cjs/IModelDb.d.ts.map +1 -1
  92. package/lib/cjs/IModelDb.js +196 -151
  93. package/lib/cjs/IModelDb.js.map +1 -1
  94. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  95. package/lib/cjs/IModelElementCloneContext.js +5 -4
  96. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  97. package/lib/cjs/IModelHost.d.ts +5 -3
  98. package/lib/cjs/IModelHost.d.ts.map +1 -1
  99. package/lib/cjs/IModelHost.js +16 -18
  100. package/lib/cjs/IModelHost.js.map +1 -1
  101. package/lib/cjs/IModelJsFs.js.map +1 -1
  102. package/lib/cjs/IpcHost.d.ts.map +1 -1
  103. package/lib/cjs/IpcHost.js +15 -13
  104. package/lib/cjs/IpcHost.js.map +1 -1
  105. package/lib/cjs/LineStyle.js.map +1 -1
  106. package/lib/cjs/LocalHub.d.ts +2 -2
  107. package/lib/cjs/LocalHub.d.ts.map +1 -1
  108. package/lib/cjs/LocalHub.js +18 -18
  109. package/lib/cjs/LocalHub.js.map +1 -1
  110. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  111. package/lib/cjs/LockControl.d.ts +73 -0
  112. package/lib/cjs/LockControl.d.ts.map +1 -0
  113. package/lib/cjs/LockControl.js +11 -0
  114. package/lib/cjs/LockControl.js.map +1 -0
  115. package/lib/cjs/Material.d.ts +2 -5
  116. package/lib/cjs/Material.d.ts.map +1 -1
  117. package/lib/cjs/Material.js +1 -4
  118. package/lib/cjs/Material.js.map +1 -1
  119. package/lib/cjs/Model.d.ts +0 -22
  120. package/lib/cjs/Model.d.ts.map +1 -1
  121. package/lib/cjs/Model.js +5 -26
  122. package/lib/cjs/Model.js.map +1 -1
  123. package/lib/cjs/NativeAppStorage.js.map +1 -1
  124. package/lib/cjs/NativeHost.js.map +1 -1
  125. package/lib/cjs/NavigationRelationship.js.map +1 -1
  126. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  127. package/lib/cjs/PropertyStore.js.map +1 -1
  128. package/lib/cjs/Relationship.d.ts +0 -12
  129. package/lib/cjs/Relationship.d.ts.map +1 -1
  130. package/lib/cjs/Relationship.js +5 -16
  131. package/lib/cjs/Relationship.js.map +1 -1
  132. package/lib/cjs/RpcBackend.js.map +1 -1
  133. package/lib/cjs/SQLiteDb.d.ts +6 -1
  134. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  135. package/lib/cjs/SQLiteDb.js +23 -16
  136. package/lib/cjs/SQLiteDb.js.map +1 -1
  137. package/lib/cjs/Schema.js.map +1 -1
  138. package/lib/cjs/SchemaSync.d.ts +3 -0
  139. package/lib/cjs/SchemaSync.d.ts.map +1 -1
  140. package/lib/cjs/SchemaSync.js +24 -11
  141. package/lib/cjs/SchemaSync.js.map +1 -1
  142. package/lib/cjs/SchemaUtils.js +3 -3
  143. package/lib/cjs/SchemaUtils.js.map +1 -1
  144. package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
  145. package/lib/cjs/SqliteChangesetReader.js +2 -2
  146. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  147. package/lib/cjs/SqliteStatement.js +2 -2
  148. package/lib/cjs/SqliteStatement.js.map +1 -1
  149. package/lib/cjs/TextAnnotationElement.js.map +1 -1
  150. package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
  151. package/lib/cjs/TextAnnotationLayout.js.map +1 -1
  152. package/lib/cjs/Texture.js.map +1 -1
  153. package/lib/cjs/TileStorage.js.map +1 -1
  154. package/lib/cjs/TxnManager.d.ts +2 -1
  155. package/lib/cjs/TxnManager.d.ts.map +1 -1
  156. package/lib/cjs/TxnManager.js +4 -2
  157. package/lib/cjs/TxnManager.js.map +1 -1
  158. package/lib/cjs/ViewDefinition.d.ts +1 -18
  159. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  160. package/lib/cjs/ViewDefinition.js +1 -18
  161. package/lib/cjs/ViewDefinition.js.map +1 -1
  162. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  163. package/lib/cjs/ViewStore.d.ts.map +1 -1
  164. package/lib/cjs/ViewStore.js +6 -5
  165. package/lib/cjs/ViewStore.js.map +1 -1
  166. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  167. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  168. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  169. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  170. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  171. package/lib/cjs/core-backend.d.ts +2 -1
  172. package/lib/cjs/core-backend.d.ts.map +1 -1
  173. package/lib/cjs/core-backend.js +3 -5
  174. package/lib/cjs/core-backend.js.map +1 -1
  175. package/lib/cjs/domains/FunctionalElements.d.ts +0 -10
  176. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
  177. package/lib/cjs/domains/FunctionalElements.js +0 -10
  178. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  179. package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -1
  180. package/lib/cjs/domains/FunctionalSchema.js +2 -1
  181. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  182. package/lib/cjs/domains/GenericElements.d.ts +0 -18
  183. package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
  184. package/lib/cjs/domains/GenericElements.js +0 -18
  185. package/lib/cjs/domains/GenericElements.js.map +1 -1
  186. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  187. package/lib/cjs/internal/ChangesetConflictArgs.d.ts +24 -0
  188. package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -0
  189. package/lib/cjs/internal/ChangesetConflictArgs.js +7 -0
  190. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -0
  191. package/lib/cjs/internal/ChannelAdmin.d.ts +34 -0
  192. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -0
  193. package/lib/cjs/internal/ChannelAdmin.js +117 -0
  194. package/lib/cjs/internal/ChannelAdmin.js.map +1 -0
  195. package/lib/cjs/internal/NativePlatform.d.ts +15 -0
  196. package/lib/cjs/internal/NativePlatform.d.ts.map +1 -0
  197. package/lib/cjs/internal/NativePlatform.js +49 -0
  198. package/lib/cjs/internal/NativePlatform.js.map +1 -0
  199. package/lib/cjs/internal/NoLocks.d.ts +6 -0
  200. package/lib/cjs/internal/NoLocks.d.ts.map +1 -0
  201. package/lib/cjs/internal/NoLocks.js +31 -0
  202. package/lib/cjs/internal/NoLocks.js.map +1 -0
  203. package/lib/cjs/{ServerBasedLocks.d.ts → internal/ServerBasedLocks.d.ts} +10 -16
  204. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -0
  205. package/lib/cjs/{ServerBasedLocks.js → internal/ServerBasedLocks.js} +29 -18
  206. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -0
  207. package/lib/cjs/internal/Symbols.d.ts +11 -0
  208. package/lib/cjs/internal/Symbols.d.ts.map +1 -0
  209. package/lib/cjs/internal/Symbols.js +21 -0
  210. package/lib/cjs/internal/Symbols.js.map +1 -0
  211. package/lib/cjs/internal/cross-package.d.ts +4 -0
  212. package/lib/cjs/internal/cross-package.d.ts.map +1 -0
  213. package/lib/cjs/internal/cross-package.js +16 -0
  214. package/lib/cjs/internal/cross-package.js.map +1 -0
  215. package/lib/cjs/internal/workspace/SettingsImpl.d.ts +2 -2
  216. package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
  217. package/lib/cjs/internal/workspace/SettingsImpl.js +3 -3
  218. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  219. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +2 -2
  220. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  221. package/lib/cjs/internal/workspace/WorkspaceImpl.js +14 -14
  222. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  223. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.d.ts.map +1 -1
  224. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +2 -1
  225. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  226. package/lib/cjs/rpc/multipart.js.map +1 -1
  227. package/lib/cjs/rpc/tracing.d.ts.map +1 -1
  228. package/lib/cjs/rpc/tracing.js +5 -2
  229. package/lib/cjs/rpc/tracing.js.map +1 -1
  230. package/lib/cjs/rpc/web/logging.js.map +1 -1
  231. package/lib/cjs/rpc/web/request.js.map +1 -1
  232. package/lib/cjs/rpc/web/response.js.map +1 -1
  233. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  234. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -0
  235. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  236. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +9 -4
  237. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  238. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
  239. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -3
  240. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  241. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  242. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  243. package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -1
  244. package/lib/cjs/workspace/Settings.d.ts +3 -3
  245. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  246. package/lib/cjs/workspace/Settings.js +1 -1
  247. package/lib/cjs/workspace/Settings.js.map +1 -1
  248. package/lib/cjs/workspace/SettingsSchemas.d.ts +2 -2
  249. package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -1
  250. package/lib/cjs/workspace/SettingsSchemas.js +1 -1
  251. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  252. package/lib/cjs/workspace/Workspace.d.ts +4 -4
  253. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  254. package/lib/cjs/workspace/Workspace.js +1 -1
  255. package/lib/cjs/workspace/Workspace.js.map +1 -1
  256. package/lib/cjs/workspace/WorkspaceEditor.d.ts +2 -2
  257. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
  258. package/lib/cjs/workspace/WorkspaceEditor.js +1 -1
  259. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  260. package/package.json +12 -12
  261. package/lib/cjs/ServerBasedLocks.d.ts.map +0 -1
  262. package/lib/cjs/ServerBasedLocks.js.map +0 -1
  263. package/lib/cjs/internal/ImplementationProhibited.d.ts +0 -44
  264. package/lib/cjs/internal/ImplementationProhibited.d.ts.map +0 -1
  265. package/lib/cjs/internal/ImplementationProhibited.js +0 -51
  266. package/lib/cjs/internal/ImplementationProhibited.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,50 @@
1
1
  # Change Log - @itwin/core-backend
2
2
 
3
- This log was last generated on Thu, 13 Jun 2024 22:48:58 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 31 Jul 2024 13:39:32 GMT and should not be manually modified.
4
+
5
+ ## 4.7.8
6
+ Wed, 31 Jul 2024 13:38:04 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.7.7
11
+ Fri, 19 Jul 2024 14:52:42 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.7.6
16
+ Fri, 12 Jul 2024 14:42:55 GMT
17
+
18
+ ### Updates
19
+
20
+ - Add static metadata to OpenTelemetry spans
21
+
22
+ ## 4.7.5
23
+ Thu, 11 Jul 2024 15:24:55 GMT
24
+
25
+ ### Updates
26
+
27
+ - Able to recover from when ExclusiveRootClassId is NULL for overflow table
28
+
29
+ ## 4.7.4
30
+ Mon, 01 Jul 2024 14:06:23 GMT
31
+
32
+ ### Updates
33
+
34
+ - Update IModel.changeset when changes are made by another process.
35
+
36
+ ## 4.7.3
37
+ Thu, 27 Jun 2024 21:09:02 GMT
38
+
39
+ _Version update only_
40
+
41
+ ## 4.7.2
42
+ Sat, 22 Jun 2024 01:09:54 GMT
43
+
44
+ ### Updates
45
+
46
+ - Update changed elements process options for bounding box calculations
47
+ - BriefcaseDb.closeAndReopen now refreshes the changeset property in case another process pulled changes
4
48
 
5
49
  ## 4.7.1
6
50
  Thu, 13 Jun 2024 22:47:31 GMT
@@ -2,22 +2,9 @@
2
2
  * @module HubAccess
3
3
  */
4
4
  import { AccessToken, GuidString, Id64String } from "@itwin/core-bentley";
5
- import { BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange, IModelError, IModelVersion, LocalDirName, LocalFileName } from "@itwin/core-common";
5
+ import { BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange, LockState as CommonLockState, IModelError, IModelVersion, LocalDirName, LocalFileName } from "@itwin/core-common";
6
6
  import { CheckpointProps, DownloadRequest, ProgressFunction } from "./CheckpointManager";
7
7
  import type { TokenArg } from "./IModelDb";
8
- /** The state of a lock.
9
- * @public
10
- */
11
- export declare enum LockState {
12
- /** The element is not locked */
13
- None = 0,
14
- /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */
15
- Shared = 1,
16
- /** A Lock that permits modifications to an element and blocks other users from making modifications to it.
17
- * Holding an exclusive lock on an "owner" (a model or a parent element), implicitly exclusively locks all its members.
18
- */
19
- Exclusive = 2
20
- }
21
8
  /** Exception thrown if lock cannot be acquired.
22
9
  * @beta
23
10
  */
@@ -32,6 +19,20 @@ export declare class LockConflict extends IModelError {
32
19
  /** Alias of Briefcase holding lock */
33
20
  briefcaseAlias: string, msg: "shared lock is held" | "exclusive lock is already held");
34
21
  }
22
+ /** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).
23
+ * @deprecated in 4.7 Use [LockState]($common)
24
+ * @public
25
+ */
26
+ export declare enum LockState {
27
+ /** The element is not locked */
28
+ None = 0,
29
+ /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */
30
+ Shared = 1,
31
+ /** A Lock that permits modifications to an element and blocks other users from making modifications to it.
32
+ * Holding an exclusive lock on an "owner" (a model or a parent element), implicitly exclusively locks all its members.
33
+ */
34
+ Exclusive = 2
35
+ }
35
36
  /**
36
37
  * The properties to access a V2 checkpoint through a daemon.
37
38
  * @internal
@@ -49,7 +50,7 @@ export interface V2CheckpointAccessProps {
49
50
  readonly storageType: string;
50
51
  }
51
52
  /** @internal */
52
- export type LockMap = Map<Id64String, LockState>;
53
+ export type LockMap = Map<Id64String, CommonLockState>;
53
54
  /**
54
55
  * The properties of a lock that may be obtained from a lock server.
55
56
  * @beta
@@ -58,7 +59,7 @@ export interface LockProps {
58
59
  /** The elementId for the lock */
59
60
  readonly id: Id64String;
60
61
  /** the lock state */
61
- readonly state: LockState;
62
+ readonly state: CommonLockState;
62
63
  }
63
64
  /**
64
65
  * Argument for cancelling and tracking download progress.
@@ -205,6 +206,7 @@ export interface BackendHubAccess {
205
206
  /**
206
207
  * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired
207
208
  * @internal
209
+ * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.
208
210
  */
209
211
  acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;
210
212
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BackendHubAccess.d.ts","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EACL,WAAW,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAC9I,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EACxD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,oBAAY,SAAS;IACnB,gCAAgC;IAChC,IAAI,IAAI;IACR,mJAAmJ;IACnJ,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAI;CACd;AAED;;EAEE;AACF,qBAAa,YAAa,SAAQ,WAAW;IAEzC,mCAAmC;aACnB,WAAW,EAAE,WAAW;IACxC,sCAAsC;a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,WAAW,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEhE;;;;OAIG;IACH,oBAAoB,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE3E;;;OAGG;IACH,iBAAiB,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC;IAE1F;;;;OAIG;IACH,YAAY,EAAE,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE;;;OAGG;IACH,aAAa,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAE7D;;;OAGG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAExD,4FAA4F;IAC5F,iBAAiB,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IAE3E,wEAAwE;IACxE,eAAe,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAEpE,uBAAuB;IACvB,YAAY,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE"}
@@ -7,23 +7,9 @@
7
7
  * @module HubAccess
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.LockConflict = exports.LockState = void 0;
10
+ exports.LockState = exports.LockConflict = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const core_common_1 = require("@itwin/core-common");
13
- /** The state of a lock.
14
- * @public
15
- */
16
- var LockState;
17
- (function (LockState) {
18
- /** The element is not locked */
19
- LockState[LockState["None"] = 0] = "None";
20
- /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */
21
- LockState[LockState["Shared"] = 1] = "Shared";
22
- /** A Lock that permits modifications to an element and blocks other users from making modifications to it.
23
- * Holding an exclusive lock on an "owner" (a model or a parent element), implicitly exclusively locks all its members.
24
- */
25
- LockState[LockState["Exclusive"] = 2] = "Exclusive";
26
- })(LockState || (exports.LockState = LockState = {}));
27
13
  /** Exception thrown if lock cannot be acquired.
28
14
  * @beta
29
15
  */
@@ -39,4 +25,19 @@ class LockConflict extends core_common_1.IModelError {
39
25
  }
40
26
  }
41
27
  exports.LockConflict = LockConflict;
28
+ /** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).
29
+ * @deprecated in 4.7 Use [LockState]($common)
30
+ * @public
31
+ */
32
+ var LockState;
33
+ (function (LockState) {
34
+ /** The element is not locked */
35
+ LockState[LockState["None"] = 0] = "None";
36
+ /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */
37
+ LockState[LockState["Shared"] = 1] = "Shared";
38
+ /** A Lock that permits modifications to an element and blocks other users from making modifications to it.
39
+ * Holding an exclusive lock on an "owner" (a model or a parent element), implicitly exclusively locks all its members.
40
+ */
41
+ LockState[LockState["Exclusive"] = 2] = "Exclusive";
42
+ })(LockState || (exports.LockState = LockState = {}));
42
43
  //# sourceMappingURL=BackendHubAccess.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2F;AAC3F,oDAG4B;AAI5B;;GAEG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB;AAED;;EAEE;AACF,MAAa,YAAa,SAAQ,yBAAW;IAC3C;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,8BAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAVD,oCAUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module HubAccess\n */\n\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\nimport {\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\n IModelError, IModelVersion, LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, DownloadRequest, ProgressFunction } from \"./CheckpointManager\";\nimport type { TokenArg } from \"./IModelDb\";\n\n/** The state of a lock.\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\n}\n\n/** Exception thrown if lock cannot be acquired.\n * @beta\n*/\nexport class LockConflict extends IModelError {\n public constructor(\n /** Id of Briefcase holding lock */\n public readonly briefcaseId: BriefcaseId,\n /** Alias of Briefcase holding lock */\n public readonly briefcaseAlias: string,\n msg: \"shared lock is held\" | \"exclusive lock is already held\",\n ) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\n }\n}\n\n/**\n * The properties to access a V2 checkpoint through a daemon.\n * @internal\n */\nexport interface V2CheckpointAccessProps {\n /** blob store account name. */\n readonly accountName: string;\n /** AccessToken that grants access to the container. */\n readonly sasToken: AccessToken;\n /** The name of the iModel's blob store container holding all checkpoints. */\n readonly containerId: string;\n /** The name of the virtual file within the container, used for the checkpoint */\n readonly dbName: string;\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\n readonly storageType: string;\n}\n\n/** @internal */\nexport type LockMap = Map<Id64String, LockState>;\n\n/**\n * The properties of a lock that may be obtained from a lock server.\n * @beta\n */\nexport interface LockProps {\n /** The elementId for the lock */\n readonly id: Id64String;\n /** the lock state */\n readonly state: LockState;\n}\n\n/**\n * Argument for cancelling and tracking download progress.\n * @beta\n */\nexport interface DownloadProgressArg {\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\n progressCallback?: ProgressFunction;\n}\n\n/**\n * Argument for methods that must supply an iTwinId\n * @public\n */\nexport interface ITwinIdArg {\n readonly iTwinId: GuidString;\n}\n\n/**\n * Argument for methods that must supply an IModelId\n * @public\n */\nexport interface IModelIdArg extends TokenArg {\n readonly iModelId: GuidString;\n}\n\n/**\n * Argument for acquiring a new BriefcaseId\n * @public\n */\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\n readonly briefcaseAlias?: string;\n}\n\n/** Argument for methods that must supply an IModel name and iTwinId\n * @public\n */\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\n readonly iModelName: string;\n}\n\n/** Argument for methods that must supply an IModelId and a BriefcaseId\n * @public\n */\nexport interface BriefcaseIdArg extends IModelIdArg {\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Argument for methods that must supply a briefcaseId and a changeset\n * @public\n */\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a changeset\n * @public\n */\nexport interface ChangesetArg extends IModelIdArg {\n readonly changeset: ChangesetIndexOrId;\n}\n\n/** Argument for downloading a changeset.\n * @beta\n */\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\n /** Directory where the changeset should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/** @internal */\nexport interface ChangesetIndexArg extends IModelIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a range of Changesets.\n * @public\n */\nexport interface ChangesetRangeArg extends IModelIdArg {\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\n readonly range?: ChangesetRange;\n}\n\n/** Argument for downloading a changeset range.\n * @beta\n */\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\n /** Directory where the changesets should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/**\n * @deprecated in 3.x. Use [[DownloadRequest]].\n * @internal\n */\nexport type CheckpointArg = DownloadRequest;\n\n/**\n * Arguments to create a new iModel in iModelHub\n * @public\n */\nexport interface CreateNewIModelProps extends IModelNameArg {\n readonly description?: string;\n readonly version0?: LocalFileName;\n readonly noLocks?: true;\n}\n\n/**\n * Methods for accessing services of IModelHub from an iTwin.js backend.\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\n * @note This interface is implemented in another repository. Any changes made to this interface must be validated against\n * the implementation found here: https://github.com/iTwin/imodels-clients/blob/main/itwin-platform-access/imodels-access-backend/src/BackendIModelsAccess.ts\n * @internal\n */\nexport interface BackendHubAccess {\n /** Download all the changesets in the specified range. */\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\n /** Download a single changeset. */\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\n /** Query the changeset properties given a ChangesetIndex */\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\n /** Query an array of changeset properties given a range of ChangesetIndexes */\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\n /** Get the ChangesetProps of the most recent changeset */\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for an IModelVersion */\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for a named version */\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\n\n /** Acquire a new briefcaseId for the supplied iModelId\n * @note usually there should only be one briefcase per iModel per user.\n */\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\n\n /** get an array of the briefcases assigned to a user. */\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\n\n /**\n * Download a v1 checkpoint\n * @deprecated in 3.x. V1 checkpoints are deprecated. Download V2 checkpoint using [[V2CheckpointManager.downloadCheckpoint]].\n * @internal\n */\n downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>; // eslint-disable-line deprecation/deprecation\n\n /**\n * Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists.\n * @internal\n */\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\n\n /**\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\n * @internal\n */\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\n\n /**\n * Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests.\n * @internal\n */\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\n\n /**\n * Release all currently held locks\n * @internal\n */\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\n\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\n\n /** create a new iModel. Returns the Guid of the newly created iModel */\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\n\n /** delete an iModel */\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2F;AAC3F,oDAI4B;AAI5B;;EAEE;AACF,MAAa,YAAa,SAAQ,yBAAW;IAC3C;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,8BAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAVD,oCAUC;AAED;;;GAGG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB","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 HubAccess\r\n */\r\n\r\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\r\nimport {\r\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\r\n LockState as CommonLockState, IModelError, IModelVersion,\r\n LocalDirName, LocalFileName,\r\n} from \"@itwin/core-common\";\r\nimport { CheckpointProps, DownloadRequest, ProgressFunction } from \"./CheckpointManager\";\r\nimport type { TokenArg } from \"./IModelDb\";\r\n\r\n/** Exception thrown if lock cannot be acquired.\r\n * @beta\r\n*/\r\nexport class LockConflict extends IModelError {\r\n public constructor(\r\n /** Id of Briefcase holding lock */\r\n public readonly briefcaseId: BriefcaseId,\r\n /** Alias of Briefcase holding lock */\r\n public readonly briefcaseAlias: string,\r\n msg: \"shared lock is held\" | \"exclusive lock is already held\",\r\n ) {\r\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\r\n }\r\n}\r\n\r\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\r\n * @deprecated in 4.7 Use [LockState]($common)\r\n * @public\r\n */\r\nexport enum LockState {\r\n /** The element is not locked */\r\n None = 0,\r\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\r\n Shared = 1,\r\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\r\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\r\n */\r\n Exclusive = 2,\r\n}\r\n\r\n/**\r\n * The properties to access a V2 checkpoint through a daemon.\r\n * @internal\r\n */\r\nexport interface V2CheckpointAccessProps {\r\n /** blob store account name. */\r\n readonly accountName: string;\r\n /** AccessToken that grants access to the container. */\r\n readonly sasToken: AccessToken;\r\n /** The name of the iModel's blob store container holding all checkpoints. */\r\n readonly containerId: string;\r\n /** The name of the virtual file within the container, used for the checkpoint */\r\n readonly dbName: string;\r\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\r\n readonly storageType: string;\r\n}\r\n\r\n/** @internal */\r\nexport type LockMap = Map<Id64String, CommonLockState>;\r\n\r\n/**\r\n * The properties of a lock that may be obtained from a lock server.\r\n * @beta\r\n */\r\nexport interface LockProps {\r\n /** The elementId for the lock */\r\n readonly id: Id64String;\r\n /** the lock state */\r\n readonly state: CommonLockState;\r\n}\r\n\r\n/**\r\n * Argument for cancelling and tracking download progress.\r\n * @beta\r\n */\r\nexport interface DownloadProgressArg {\r\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\r\n progressCallback?: ProgressFunction;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an iTwinId\r\n * @public\r\n */\r\nexport interface ITwinIdArg {\r\n readonly iTwinId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an IModelId\r\n * @public\r\n */\r\nexport interface IModelIdArg extends TokenArg {\r\n readonly iModelId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for acquiring a new BriefcaseId\r\n * @public\r\n */\r\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\r\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\r\n readonly briefcaseAlias?: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModel name and iTwinId\r\n * @public\r\n */\r\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\r\n readonly iModelName: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a BriefcaseId\r\n * @public\r\n */\r\nexport interface BriefcaseIdArg extends IModelIdArg {\r\n readonly briefcaseId: BriefcaseId;\r\n}\r\n\r\n/** Argument for methods that must supply a briefcaseId and a changeset\r\n * @public\r\n */\r\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a changeset\r\n * @public\r\n */\r\nexport interface ChangesetArg extends IModelIdArg {\r\n readonly changeset: ChangesetIndexOrId;\r\n}\r\n\r\n/** Argument for downloading a changeset.\r\n * @beta\r\n */\r\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\r\n /** Directory where the changeset should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/** @internal */\r\nexport interface ChangesetIndexArg extends IModelIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a range of Changesets.\r\n * @public\r\n */\r\nexport interface ChangesetRangeArg extends IModelIdArg {\r\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\r\n readonly range?: ChangesetRange;\r\n}\r\n\r\n/** Argument for downloading a changeset range.\r\n * @beta\r\n */\r\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\r\n /** Directory where the changesets should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/**\r\n * @deprecated in 3.x. Use [[DownloadRequest]].\r\n * @internal\r\n */\r\nexport type CheckpointArg = DownloadRequest;\r\n\r\n/**\r\n * Arguments to create a new iModel in iModelHub\r\n * @public\r\n */\r\nexport interface CreateNewIModelProps extends IModelNameArg {\r\n readonly description?: string;\r\n readonly version0?: LocalFileName;\r\n readonly noLocks?: true;\r\n}\r\n\r\n/**\r\n * Methods for accessing services of IModelHub from an iTwin.js backend.\r\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\r\n * @note This interface is implemented in another repository. Any changes made to this interface must be validated against\r\n * the implementation found here: https://github.com/iTwin/imodels-clients/blob/main/itwin-platform-access/imodels-access-backend/src/BackendIModelsAccess.ts\r\n * @internal\r\n */\r\nexport interface BackendHubAccess {\r\n /** Download all the changesets in the specified range. */\r\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\r\n /** Download a single changeset. */\r\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\r\n /** Query the changeset properties given a ChangesetIndex */\r\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\r\n /** Query an array of changeset properties given a range of ChangesetIndexes */\r\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\r\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\r\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\r\n /** Get the ChangesetProps of the most recent changeset */\r\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for an IModelVersion */\r\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for a named version */\r\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\r\n\r\n /** Acquire a new briefcaseId for the supplied iModelId\r\n * @note usually there should only be one briefcase per iModel per user.\r\n */\r\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\r\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\r\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\r\n\r\n /** get an array of the briefcases assigned to a user. */\r\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\r\n\r\n /**\r\n * Download a v1 checkpoint\r\n * @deprecated in 3.x. V1 checkpoints are deprecated. Download V2 checkpoint using [[V2CheckpointManager.downloadCheckpoint]].\r\n * @internal\r\n */\r\n downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>; // eslint-disable-line deprecation/deprecation\r\n\r\n /**\r\n * Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists.\r\n * @internal\r\n */\r\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\r\n\r\n /**\r\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\r\n * @internal\r\n * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.\r\n */\r\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\r\n\r\n /**\r\n * Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests.\r\n * @internal\r\n */\r\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\r\n\r\n /**\r\n * Release all currently held locks\r\n * @internal\r\n */\r\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\r\n\r\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\r\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\r\n\r\n /** create a new iModel. Returns the Guid of the newly created iModel */\r\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\r\n\r\n /** delete an iModel */\r\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,qBA+FX;AA/FD,WAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,qEAA4C,CAAA;IAE5C;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;OAEG;IACH,2FAAkE,CAAA;IAElE;;OAEG;IACH,2DAAkC,CAAA;IAElC;;;;OAIG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;;OAGG;IACH,2DAAkC,CAAA;IAElC;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,mFAA0D,CAAA;IAE1D;;OAEG;IACH,2EAAkD,CAAA;IAElD;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;OAEG;IACH,mEAA0C,CAAA;IAE1C;;OAEG;IACH,yDAAgC,CAAA;IAEhC;;OAEG;IACH,yEAAgD,CAAA;IAChD;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6EAAoD,CAAA;IAEpD,gBAAgB;IAChB,6DAAoC,CAAA;AACtC,CAAC,EA/FW,qBAAqB,qCAArB,qBAAqB,QA+FhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Logging\n */\n\n/** Logger categories used by this package\n * @note All logger categories in this package start with the `core-backend` prefix.\n * @see [Logger]($bentley)\n * @public\n */\nexport enum BackendLoggerCategory {\n /** The logger category used by API related to authorization */\n Authorization = \"core-backend.Authorization\",\n\n /** The logger category used by the following classes:\n * - [[CodeSpecs]]\n */\n CodeSpecs = \"core-backend.CodeSpecs\",\n\n /** The logger category used by the following classes:\n * - [[CustomViewState3dCreator]]\n */\n CustomViewState3dCreator = \"core-backend.CustomViewState3dCreator\",\n\n /** The logger category used by the [[DevTools]] class and related classes.\n * @internal\n */\n DevTools = \"core-backend.DevTools\",\n\n /** The logger category used by the following classes:\n * - [[ChangeSummaryManager]]\n * - [[ECDb]]\n * - [[ECSqlStatement]]\n */\n ECDb = \"core-backend.ECDb\",\n\n /** The logger category used by the following classes:\n * - [[Functional]]\n */\n Functional = \"core-backend.Functional\",\n\n /** The logger category used by the following classes:\n * - [[LinearReferencing]]\n */\n LinearReferencing = \"core-backend.LinearReferencing\",\n\n /** The logger category used by the following classes:\n * - BriefcaseManager\n * - [[IModelDb]]\n */\n IModelDb = \"core-backend.IModelDb\",\n\n /** The logger category used by the following classes:\n * - [[IModelHost]]\n */\n IModelHost = \"core-backend.IModelHost\",\n\n /** The logger category used by the following classes:\n * - TileRequestMemoizer\n */\n IModelTileRequestRpc = \"core-backend.IModelTileRequestRpc\",\n\n /** The logger category used by the following classes:\n * - IModelTileRpcImpl (Tile Uploading)\n */\n IModelTileUpload = \"core-backend.IModelTileUpload\",\n\n /** The logger category used by the following classes:\n * - TileStorage (tile upload/download)\n */\n IModelTileStorage = \"core-backend.IModelTileStorage\",\n\n /** The logger category used by the following classes:\n * - [[Relationship]]\n */\n Relationship = \"core-backend.Relationship\",\n\n /** The logger category used by the following classes:\n * - [[Schemas]]\n */\n Schemas = \"core-backend.Schemas\",\n\n /** The logger category used by the following classes:\n * - [[PromiseMemoizer]]\n */\n PromiseMemoizer = \"core-backend.PromiseMemoizer\",\n /** The logger category used by the following classes:\n * - [[EventSink]]\n */\n EventSink = \"core-backend.EventSink\",\n\n /** The logger category used by the following classes:\n * - [[NativeHost]], [[NativeAppStorage]]\n * @internal\n */\n NativeApp = \"core-backend.NativeApp\",\n\n /** The logger category used by the following classes:\n * - [[ViewStateHydrator]]\n * @internal\n */\n ViewStateHydrator = \"core-backend.ViewStateHydrator\",\n\n /** @internal */\n Workspace = \"core-backend.Workspace\",\n}\n"]}
1
+ {"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,qBA+FX;AA/FD,WAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,qEAA4C,CAAA;IAE5C;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;OAEG;IACH,2FAAkE,CAAA;IAElE;;OAEG;IACH,2DAAkC,CAAA;IAElC;;;;OAIG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;;OAGG;IACH,2DAAkC,CAAA;IAElC;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,mFAA0D,CAAA;IAE1D;;OAEG;IACH,2EAAkD,CAAA;IAElD;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;OAEG;IACH,mEAA0C,CAAA;IAE1C;;OAEG;IACH,yDAAgC,CAAA;IAEhC;;OAEG;IACH,yEAAgD,CAAA;IAChD;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6EAAoD,CAAA;IAEpD,gBAAgB;IAChB,6DAAoC,CAAA;AACtC,CAAC,EA/FW,qBAAqB,qCAArB,qBAAqB,QA+FhC","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 Logging\r\n */\r\n\r\n/** Logger categories used by this package\r\n * @note All logger categories in this package start with the `core-backend` prefix.\r\n * @see [Logger]($bentley)\r\n * @public\r\n */\r\nexport enum BackendLoggerCategory {\r\n /** The logger category used by API related to authorization */\r\n Authorization = \"core-backend.Authorization\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CodeSpecs]]\r\n */\r\n CodeSpecs = \"core-backend.CodeSpecs\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CustomViewState3dCreator]]\r\n */\r\n CustomViewState3dCreator = \"core-backend.CustomViewState3dCreator\",\r\n\r\n /** The logger category used by the [[DevTools]] class and related classes.\r\n * @internal\r\n */\r\n DevTools = \"core-backend.DevTools\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ChangeSummaryManager]]\r\n * - [[ECDb]]\r\n * - [[ECSqlStatement]]\r\n */\r\n ECDb = \"core-backend.ECDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Functional]]\r\n */\r\n Functional = \"core-backend.Functional\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[LinearReferencing]]\r\n */\r\n LinearReferencing = \"core-backend.LinearReferencing\",\r\n\r\n /** The logger category used by the following classes:\r\n * - BriefcaseManager\r\n * - [[IModelDb]]\r\n */\r\n IModelDb = \"core-backend.IModelDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[IModelHost]]\r\n */\r\n IModelHost = \"core-backend.IModelHost\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileRequestMemoizer\r\n */\r\n IModelTileRequestRpc = \"core-backend.IModelTileRequestRpc\",\r\n\r\n /** The logger category used by the following classes:\r\n * - IModelTileRpcImpl (Tile Uploading)\r\n */\r\n IModelTileUpload = \"core-backend.IModelTileUpload\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileStorage (tile upload/download)\r\n */\r\n IModelTileStorage = \"core-backend.IModelTileStorage\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Relationship]]\r\n */\r\n Relationship = \"core-backend.Relationship\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Schemas]]\r\n */\r\n Schemas = \"core-backend.Schemas\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[PromiseMemoizer]]\r\n */\r\n PromiseMemoizer = \"core-backend.PromiseMemoizer\",\r\n /** The logger category used by the following classes:\r\n * - [[EventSink]]\r\n */\r\n EventSink = \"core-backend.EventSink\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[NativeHost]], [[NativeAppStorage]]\r\n * @internal\r\n */\r\n NativeApp = \"core-backend.NativeApp\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ViewStateHydrator]]\r\n * @internal\r\n */\r\n ViewStateHydrator = \"core-backend.ViewStateHydrator\",\r\n\r\n /** @internal */\r\n Workspace = \"core-backend.Workspace\",\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BisCoreSchema.js","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,0CAA0C;AAC1C,mDAAgD;AAChD,wCAAwC;AACxC,6CAA6C;AAC7C,sDAAsD;AACtD,6CAA8C;AAC9C,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C,qCAA2C;AAC3C,wCAAwC;AACxC,4CAA4C;AAC5C,kDAAkD;AAClD,0DAA0D;AAE1D;;;;;;;;;;GAUG;AACH,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;IAEhK,gBAAgB;IACT,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,gBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC;YACvD,OAAO;QAET,gBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,gBAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,sHAAsH;QACtH;YACE,UAAU;YACV,SAAS;YACT,QAAQ;YACR,WAAW;YACX,OAAO;YACP,OAAO;YACP,UAAU;YACV,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,cAAc;SACf,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACF;AA3BD,sCA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Schema\n */\n\nimport * as path from \"path\";\nimport * as categoryMod from \"./Category\";\nimport { ClassRegistry } from \"./ClassRegistry\";\nimport * as elementMod from \"./Element\";\nimport * as aspectMod from \"./ElementAspect\";\nimport * as externalSourceMod from \"./ExternalSource\";\nimport { KnownLocations } from \"./IModelHost\";\nimport * as materialMod from \"./Material\";\nimport * as modelMod from \"./Model\";\nimport * as linkMod from \"./Relationship\";\nimport { Schema, Schemas } from \"./Schema\";\nimport * as textureMod from \"./Texture\";\nimport * as viewMod from \"./ViewDefinition\";\nimport * as displayStyleMod from \"./DisplayStyle\";\nimport * as annotationsMod from \"./TextAnnotationElement\";\n\n/**\n * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.\n *\n * It is automatically registered when [[IModelHost.startup]] is called.\n *\n * Example:\n * ``` ts\n * [[include:BisCore.registerSchemaAndGetClass]]\n * ```\n * @public\n */\nexport class BisCoreSchema extends Schema {\n public static override get schemaName(): string { return \"BisCore\"; }\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${BisCoreSchema.schemaName}.ecschema.xml`); }\n\n /** @internal */\n public static registerSchema() {\n if (this === Schemas.getRegisteredSchema(this.schemaName))\n return;\n\n Schemas.unregisterSchema(this.schemaName);\n Schemas.registerSchema(this);\n\n // this list should include all backend .ts files with implementations of Entity-based classes. Order does not matter.\n [\n elementMod,\n aspectMod,\n modelMod,\n categoryMod,\n viewMod,\n linkMod,\n textureMod,\n materialMod,\n externalSourceMod,\n displayStyleMod,\n annotationsMod,\n ].forEach((module) => ClassRegistry.registerModule(module, this));\n }\n}\n"]}
1
+ {"version":3,"file":"BisCoreSchema.js","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,0CAA0C;AAC1C,mDAAgD;AAChD,wCAAwC;AACxC,6CAA6C;AAC7C,sDAAsD;AACtD,6CAA8C;AAC9C,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C,qCAA2C;AAC3C,wCAAwC;AACxC,4CAA4C;AAC5C,kDAAkD;AAClD,0DAA0D;AAE1D;;;;;;;;;;GAUG;AACH,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;IAEhK,gBAAgB;IACT,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,gBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC;YACvD,OAAO;QAET,gBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,gBAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,sHAAsH;QACtH;YACE,UAAU;YACV,SAAS;YACT,QAAQ;YACR,WAAW;YACX,OAAO;YACP,OAAO;YACP,UAAU;YACV,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,cAAc;SACf,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACF;AA3BD,sCA2BC","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 * as categoryMod from \"./Category\";\r\nimport { ClassRegistry } from \"./ClassRegistry\";\r\nimport * as elementMod from \"./Element\";\r\nimport * as aspectMod from \"./ElementAspect\";\r\nimport * as externalSourceMod from \"./ExternalSource\";\r\nimport { KnownLocations } from \"./IModelHost\";\r\nimport * as materialMod from \"./Material\";\r\nimport * as modelMod from \"./Model\";\r\nimport * as linkMod from \"./Relationship\";\r\nimport { Schema, Schemas } from \"./Schema\";\r\nimport * as textureMod from \"./Texture\";\r\nimport * as viewMod from \"./ViewDefinition\";\r\nimport * as displayStyleMod from \"./DisplayStyle\";\r\nimport * as annotationsMod from \"./TextAnnotationElement\";\r\n\r\n/**\r\n * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.\r\n *\r\n * It is automatically registered when [[IModelHost.startup]] is called.\r\n *\r\n * Example:\r\n * ``` ts\r\n * [[include:BisCore.registerSchemaAndGetClass]]\r\n * ```\r\n * @public\r\n */\r\nexport class BisCoreSchema extends Schema {\r\n public static override get schemaName(): string { return \"BisCore\"; }\r\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${BisCoreSchema.schemaName}.ecschema.xml`); }\r\n\r\n /** @internal */\r\n public static registerSchema() {\r\n if (this === Schemas.getRegisteredSchema(this.schemaName))\r\n return;\r\n\r\n Schemas.unregisterSchema(this.schemaName);\r\n Schemas.registerSchema(this);\r\n\r\n // this list should include all backend .ts files with implementations of Entity-based classes. Order does not matter.\r\n [\r\n elementMod,\r\n aspectMod,\r\n modelMod,\r\n categoryMod,\r\n viewMod,\r\n linkMod,\r\n textureMod,\r\n materialMod,\r\n externalSourceMod,\r\n displayStyleMod,\r\n annotationsMod,\r\n ].forEach((module) => ClassRegistry.registerModule(module, this));\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAiB,aAAa,CAiJ7B;AAjJD,WAAiB,aAAa;AAiJ9B,CAAC,EAjJgB,aAAa,6BAAb,aAAa,QAiJ7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module BlobContainers\n */\n\n// spell:ignore datacenter\n\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { SettingsContainer } from \"./workspace/Settings\";\n\n/**\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\n * @beta\n */\nexport namespace BlobContainer {\n\n /** Object that implements the methods to create, delete, and request access to a container. */\n export let service: BlobContainer.ContainerService | undefined;\n\n /** name of cloud provider for a container. */\n export type Provider = \"azure\" | \"google\";\n\n /** the name of the container within its `Scope` */\n export type ContainerId = string;\n\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\n export type UserToken = AccessToken;\n\n /** token that authenticates access to a container for either read or write. */\n export type ContainerToken = AccessToken;\n\n /**\n * The scope for a container. This determines:\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\n * - the administrators who may configure RBAC permissions\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\n * determines the region for data residency requirements.\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\n */\n export interface Scope {\n /** iTwinId of the owner of this container. */\n iTwinId: Id64String;\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\n iModelId?: Id64String;\n /** the user GUID an individual, if this container is private. */\n ownerGuid?: GuidString;\n }\n\n /**\n * Metadata about the use of a container so that:\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\n * - usage reports can aggregate types of containers\n * - applications can identify their containers\n * - applications can store properties about their containers\n */\n export interface Metadata {\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\n containerType: string;\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\n label: string;\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\n description?: string;\n /** optional properties for the container */\n json?: SettingsContainer;\n }\n\n /** Properties returned by `Service.requestToken` */\n export interface TokenProps {\n /**\n * expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\n * and must be refreshed before it expires\n */\n token: ContainerToken;\n /** scope of the container. */\n scope: Scope;\n /** name of the blob storage provider. */\n provider: Provider;\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\n expiration: Date;\n /** Metadata of the container. */\n metadata: Metadata;\n }\n\n /** The URI and Id of the container. */\n export interface UriAndId {\n baseUri: string;\n containerId: ContainerId;\n }\n\n /** Information required to access an existing container. */\n export interface AccessContainerProps extends UriAndId {\n userToken: UserToken;\n }\n\n /** Information about a newly created container. */\n export interface CreatedContainerProps extends UriAndId {\n /** name of the blob storage provider. */\n provider: Provider;\n }\n\n /**\n * Access level to request for token.\n * - `\"write\"`: request a writeable AccessToken.\n * - `\"read\"`: request a read-only AccessToken.\n * - `\"admin\"`: request a admin AccessToken.\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\n * If the user is not authorized for the level requested, an exception is thrown.\n */\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\n\n /** Information required to request an access token for a container. */\n export interface RequestTokenProps extends AccessContainerProps {\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\n accessLevel?: RequestAccessLevel;\n /** the number of seconds before the token should expire.\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\n */\n durationSeconds?: number;\n }\n\n /** Information required to create a new container. */\n export interface CreateNewContainerProps {\n /** the scope of the new container */\n scope: Scope;\n /** metadata to be stored on the new container */\n metadata: Metadata;\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\n userToken: UserToken;\n /**\n * the id for the container. Useful for tests.\n * @internal\n */\n containerId?: ContainerId;\n }\n\n /** Methods to create, delete, and access blob containers. */\n export interface ContainerService {\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\n\n /**\n * Delete an existing blob container.\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\n */\n delete(container: AccessContainerProps): Promise<void>;\n\n /** query the Scope for a container */\n queryScope(container: AccessContainerProps): Promise<Scope>;\n\n /** query the Metadata for a container */\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\n\n /** update the json properties of this container */\n updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;\n\n /** Request a `ContainerToken` for a container. Throws on failure. */\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\n }\n}\n"]}
1
+ {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAiB,aAAa,CAiJ7B;AAjJD,WAAiB,aAAa;AAiJ9B,CAAC,EAjJgB,aAAa,6BAAb,aAAa,QAiJ7B","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 BlobContainers\r\n */\r\n\r\n// spell:ignore datacenter\r\n\r\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { SettingsContainer } from \"./workspace/Settings\";\r\n\r\n/**\r\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\r\n * @beta\r\n */\r\nexport namespace BlobContainer {\r\n\r\n /** Object that implements the methods to create, delete, and request access to a container. */\r\n export let service: BlobContainer.ContainerService | undefined;\r\n\r\n /** name of cloud provider for a container. */\r\n export type Provider = \"azure\" | \"google\";\r\n\r\n /** the name of the container within its `Scope` */\r\n export type ContainerId = string;\r\n\r\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\r\n export type UserToken = AccessToken;\r\n\r\n /** token that authenticates access to a container for either read or write. */\r\n export type ContainerToken = AccessToken;\r\n\r\n /**\r\n * The scope for a container. This determines:\r\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\r\n * - the administrators who may configure RBAC permissions\r\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\r\n * determines the region for data residency requirements.\r\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\r\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\r\n */\r\n export interface Scope {\r\n /** iTwinId of the owner of this container. */\r\n iTwinId: Id64String;\r\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\r\n iModelId?: Id64String;\r\n /** the user GUID an individual, if this container is private. */\r\n ownerGuid?: GuidString;\r\n }\r\n\r\n /**\r\n * Metadata about the use of a container so that:\r\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\r\n * - usage reports can aggregate types of containers\r\n * - applications can identify their containers\r\n * - applications can store properties about their containers\r\n */\r\n export interface Metadata {\r\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\r\n containerType: string;\r\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\r\n label: string;\r\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\r\n description?: string;\r\n /** optional properties for the container */\r\n json?: SettingsContainer;\r\n }\r\n\r\n /** Properties returned by `Service.requestToken` */\r\n export interface TokenProps {\r\n /**\r\n * expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\r\n * and must be refreshed before it expires\r\n */\r\n token: ContainerToken;\r\n /** scope of the container. */\r\n scope: Scope;\r\n /** name of the blob storage provider. */\r\n provider: Provider;\r\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\r\n expiration: Date;\r\n /** Metadata of the container. */\r\n metadata: Metadata;\r\n }\r\n\r\n /** The URI and Id of the container. */\r\n export interface UriAndId {\r\n baseUri: string;\r\n containerId: ContainerId;\r\n }\r\n\r\n /** Information required to access an existing container. */\r\n export interface AccessContainerProps extends UriAndId {\r\n userToken: UserToken;\r\n }\r\n\r\n /** Information about a newly created container. */\r\n export interface CreatedContainerProps extends UriAndId {\r\n /** name of the blob storage provider. */\r\n provider: Provider;\r\n }\r\n\r\n /**\r\n * Access level to request for token.\r\n * - `\"write\"`: request a writeable AccessToken.\r\n * - `\"read\"`: request a read-only AccessToken.\r\n * - `\"admin\"`: request a admin AccessToken.\r\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\r\n * If the user is not authorized for the level requested, an exception is thrown.\r\n */\r\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\r\n\r\n /** Information required to request an access token for a container. */\r\n export interface RequestTokenProps extends AccessContainerProps {\r\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\r\n accessLevel?: RequestAccessLevel;\r\n /** the number of seconds before the token should expire.\r\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\r\n */\r\n durationSeconds?: number;\r\n }\r\n\r\n /** Information required to create a new container. */\r\n export interface CreateNewContainerProps {\r\n /** the scope of the new container */\r\n scope: Scope;\r\n /** metadata to be stored on the new container */\r\n metadata: Metadata;\r\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\r\n userToken: UserToken;\r\n /**\r\n * the id for the container. Useful for tests.\r\n * @internal\r\n */\r\n containerId?: ContainerId;\r\n }\r\n\r\n /** Methods to create, delete, and access blob containers. */\r\n export interface ContainerService {\r\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\r\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\r\n\r\n /**\r\n * Delete an existing blob container.\r\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\r\n */\r\n delete(container: AccessContainerProps): Promise<void>;\r\n\r\n /** query the Scope for a container */\r\n queryScope(container: AccessContainerProps): Promise<Scope>;\r\n\r\n /** query the Metadata for a container */\r\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\r\n\r\n /** update the json properties of this container */\r\n updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;\r\n\r\n /** Request a `ContainerToken` for a container. Throws on failure. */\r\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Bri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AW,GAAG,OAAO,CAAC,IAAI,CAAC;IAsC3G;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAUzB;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAclC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAenC,4EAA4E;WACxD,cAAc,CAAC,GAAG,EAAE;QAAE,QAAQ,EAAE,UAAU,CAAC;QAAC,SAAS,EAAE,kBAAkB,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAIzH,gFAAgF;WAC5D,eAAe,CAAC,GAAG,EAAE;QAAE,QAAQ,EAAE,UAAU,CAAC;QAAC,KAAK,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIpH,wEAAwE;WACpD,kBAAkB,CAAC,GAAG,EAAE;QAAE,QAAQ,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAI9F;;;OAGG;WACiB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAI1F;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;mBAajB,oBAAoB;IAWzC,gBAAgB;WACI,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC7F,4EAA4E;mBACvD,WAAW;IA4ChC;;OAEG;WACiB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAexF"}
@@ -18,6 +18,8 @@ const IModelDb_1 = require("./IModelDb");
18
18
  const IModelHost_1 = require("./IModelHost");
19
19
  const IModelJsFs_1 = require("./IModelJsFs");
20
20
  const SchemaSync_1 = require("./SchemaSync");
21
+ const Symbols_1 = require("./internal/Symbols");
22
+ const NativePlatform_1 = require("./internal/NativePlatform");
21
23
  const loggerCategory = BackendLoggerCategory_1.BackendLoggerCategory.IModelDb;
22
24
  /** Manages downloading Briefcases and downloading and uploading changesets.
23
25
  * @public
@@ -145,10 +147,16 @@ class BriefcaseManager {
145
147
  await CheckpointManager_1.CheckpointManager.downloadCheckpoint({ localFile: fileName, checkpoint, onProgress: arg.onProgress });
146
148
  }
147
149
  catch (error) {
148
- if (arg.accessToken && arg.briefcaseId === undefined)
150
+ const errorMessage = `Failed to download briefcase to ${fileName}, errorMessage: ${error.message}`;
151
+ if (arg.accessToken && arg.briefcaseId === undefined) {
152
+ core_bentley_1.Logger.logInfo(loggerCategory, `${errorMessage}, releasing the briefcaseId...`);
149
153
  await this.releaseBriefcase(arg.accessToken, { briefcaseId, iModelId: arg.iModelId });
154
+ }
150
155
  if (IModelJsFs_1.IModelJsFs.existsSync(fileName)) {
151
- core_bentley_1.Logger.logInfo(loggerCategory, `Failed to download briefcase to ${fileName}, errorMessage: ${error.message}, deleting the file...`);
156
+ if (arg.accessToken && arg.briefcaseId === undefined)
157
+ core_bentley_1.Logger.logTrace(loggerCategory, `Deleting the file: ${fileName}...`);
158
+ else
159
+ core_bentley_1.Logger.logInfo(loggerCategory, `${errorMessage}, deleting the file...`);
152
160
  try {
153
161
  IModelJsFs_1.IModelJsFs.unlinkSync(fileName);
154
162
  core_bentley_1.Logger.logInfo(loggerCategory, `Deleted ${fileName}`);
@@ -169,7 +177,7 @@ class BriefcaseManager {
169
177
  fileSize,
170
178
  };
171
179
  // now open the downloaded checkpoint and reset its BriefcaseId
172
- const nativeDb = new IModelHost_1.IModelHost.platform.DgnDb();
180
+ const nativeDb = new NativePlatform_1.IModelNative.platform.DgnDb();
173
181
  try {
174
182
  nativeDb.openIModel(fileName, core_bentley_1.OpenMode.ReadWrite);
175
183
  }
@@ -331,14 +339,14 @@ class BriefcaseManager {
331
339
  static async applySingleChangeset(db, changesetFile) {
332
340
  if (changesetFile.changesType === core_common_1.ChangesetType.Schema || changesetFile.changesType === core_common_1.ChangesetType.SchemaSync)
333
341
  db.clearCaches(); // for schema changesets, statement caches may become invalid. Do this *before* applying, in case db needs to be closed (open statements hold db open.)
334
- db.nativeDb.applyChangeset(changesetFile);
335
- db.changeset = db.nativeDb.getCurrentChangeset();
342
+ db[Symbols_1._nativeDb].applyChangeset(changesetFile);
343
+ db.changeset = db[Symbols_1._nativeDb].getCurrentChangeset();
336
344
  // we're done with this changeset, delete it
337
345
  IModelJsFs_1.IModelJsFs.removeSync(changesetFile.pathname);
338
346
  }
339
347
  /** @internal */
340
348
  static async pullAndApplyChangesets(db, arg) {
341
- if (!db.isOpen || db.nativeDb.isReadonly()) // don't use db.isReadonly - we reopen the file writable just for this operation but db.isReadonly is still true
349
+ if (!db.isOpen || db[Symbols_1._nativeDb].isReadonly()) // don't use db.isReadonly - we reopen the file writable just for this operation but db.isReadonly is still true
342
350
  throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "Briefcase must be open ReadWrite to process change sets");
343
351
  let currentIndex = db.changeset.index;
344
352
  if (currentIndex === undefined)
@@ -367,7 +375,7 @@ class BriefcaseManager {
367
375
  }
368
376
  /** create a changeset from the current changes, and push it to iModelHub */
369
377
  static async pushChanges(db, arg) {
370
- const changesetProps = db.nativeDb.startCreateChangeset();
378
+ const changesetProps = db[Symbols_1._nativeDb].startCreateChangeset();
371
379
  changesetProps.briefcaseId = db.briefcaseId;
372
380
  changesetProps.description = arg.description;
373
381
  const fileSize = IModelJsFs_1.IModelJsFs.lstatSync(changesetProps.pathname)?.size;
@@ -379,10 +387,10 @@ class BriefcaseManager {
379
387
  try {
380
388
  const accessToken = await IModelHost_1.IModelHost.getAccessToken();
381
389
  const index = await IModelHost_1.IModelHost.hubAccess.pushChangeset({ accessToken, iModelId: db.iModelId, changesetProps });
382
- db.nativeDb.completeCreateChangeset({ index });
383
- db.changeset = db.nativeDb.getCurrentChangeset();
390
+ db[Symbols_1._nativeDb].completeCreateChangeset({ index });
391
+ db.changeset = db[Symbols_1._nativeDb].getCurrentChangeset();
384
392
  if (!arg.retainLocks)
385
- await db.locks.releaseAllLocks();
393
+ await db.locks[Symbols_1._releaseAllLocks]();
386
394
  return;
387
395
  }
388
396
  catch (err) {
@@ -398,7 +406,7 @@ class BriefcaseManager {
398
406
  return false;
399
407
  };
400
408
  if (!shouldRetry()) {
401
- db.nativeDb.abandonCreateChangeset();
409
+ db[Symbols_1._nativeDb].abandonCreateChangeset();
402
410
  throw err;
403
411
  }
404
412
  }