@itwin/core-backend 5.0.0-dev.6 → 5.0.0-dev.61

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 (253) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/lib/cjs/BackendHubAccess.js +2 -0
  3. package/lib/cjs/BackendHubAccess.js.map +1 -1
  4. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  5. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  6. package/lib/cjs/BisCoreSchema.js +2 -0
  7. package/lib/cjs/BisCoreSchema.js.map +1 -1
  8. package/lib/cjs/BlobContainerService.d.ts +4 -4
  9. package/lib/cjs/BlobContainerService.d.ts.map +1 -1
  10. package/lib/cjs/BlobContainerService.js.map +1 -1
  11. package/lib/cjs/BriefcaseManager.d.ts +10 -0
  12. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  13. package/lib/cjs/BriefcaseManager.js +51 -8
  14. package/lib/cjs/BriefcaseManager.js.map +1 -1
  15. package/lib/cjs/Category.js +6 -1
  16. package/lib/cjs/Category.js.map +1 -1
  17. package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
  18. package/lib/cjs/ChangeSummaryManager.js +89 -21
  19. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  20. package/lib/cjs/ChangedElementsDb.d.ts +3 -3
  21. package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
  22. package/lib/cjs/ChangedElementsDb.js +2 -1
  23. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  24. package/lib/cjs/ChangesetECAdaptor.d.ts +3 -3
  25. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  26. package/lib/cjs/ChangesetECAdaptor.js +273 -261
  27. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  28. package/lib/cjs/ChannelControl.js.map +1 -1
  29. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  30. package/lib/cjs/CheckpointManager.js +8 -5
  31. package/lib/cjs/CheckpointManager.js.map +1 -1
  32. package/lib/cjs/ClassRegistry.js +13 -23
  33. package/lib/cjs/ClassRegistry.js.map +1 -1
  34. package/lib/cjs/CloudSqlite.d.ts +2 -1
  35. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  36. package/lib/cjs/CloudSqlite.js +16 -9
  37. package/lib/cjs/CloudSqlite.js.map +1 -1
  38. package/lib/cjs/CodeService.d.ts +2 -0
  39. package/lib/cjs/CodeService.d.ts.map +1 -1
  40. package/lib/cjs/CodeService.js +4 -0
  41. package/lib/cjs/CodeService.js.map +1 -1
  42. package/lib/cjs/CodeSpecs.js +3 -2
  43. package/lib/cjs/CodeSpecs.js.map +1 -1
  44. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  45. package/lib/cjs/CustomViewState3dCreator.js +7 -6
  46. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  47. package/lib/cjs/DevTools.js +16 -16
  48. package/lib/cjs/DevTools.js.map +1 -1
  49. package/lib/cjs/DisplayStyle.js +2 -0
  50. package/lib/cjs/DisplayStyle.js.map +1 -1
  51. package/lib/cjs/ECDb.d.ts +3 -9
  52. package/lib/cjs/ECDb.d.ts.map +1 -1
  53. package/lib/cjs/ECDb.js +10 -9
  54. package/lib/cjs/ECDb.js.map +1 -1
  55. package/lib/cjs/ECSchemaXmlContext.js +1 -0
  56. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  57. package/lib/cjs/ECSqlStatement.d.ts +4 -2
  58. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  59. package/lib/cjs/ECSqlStatement.js +13 -4
  60. package/lib/cjs/ECSqlStatement.js.map +1 -1
  61. package/lib/cjs/Element.d.ts +1 -9
  62. package/lib/cjs/Element.d.ts.map +1 -1
  63. package/lib/cjs/Element.js +122 -31
  64. package/lib/cjs/Element.js.map +1 -1
  65. package/lib/cjs/ElementAspect.js +24 -0
  66. package/lib/cjs/ElementAspect.js.map +1 -1
  67. package/lib/cjs/ElementGraphics.js.map +1 -1
  68. package/lib/cjs/ElementTreeWalker.js +13 -12
  69. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  70. package/lib/cjs/Entity.d.ts +18 -0
  71. package/lib/cjs/Entity.d.ts.map +1 -1
  72. package/lib/cjs/Entity.js +53 -16
  73. package/lib/cjs/Entity.js.map +1 -1
  74. package/lib/cjs/EntityReferences.js.map +1 -1
  75. package/lib/cjs/ExportGraphics.js +4 -0
  76. package/lib/cjs/ExportGraphics.js.map +1 -1
  77. package/lib/cjs/ExternalSource.js +22 -0
  78. package/lib/cjs/ExternalSource.js.map +1 -1
  79. package/lib/cjs/FontFile.d.ts +68 -0
  80. package/lib/cjs/FontFile.d.ts.map +1 -0
  81. package/lib/cjs/FontFile.js +36 -0
  82. package/lib/cjs/FontFile.js.map +1 -0
  83. package/lib/cjs/GeoCoordConfig.js +8 -8
  84. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  85. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  86. package/lib/cjs/GeometrySummary.js +53 -50
  87. package/lib/cjs/GeometrySummary.js.map +1 -1
  88. package/lib/cjs/HubMock.js +4 -1
  89. package/lib/cjs/HubMock.js.map +1 -1
  90. package/lib/cjs/IModelCloneContext.js.map +1 -1
  91. package/lib/cjs/IModelDb.d.ts +98 -15
  92. package/lib/cjs/IModelDb.d.ts.map +1 -1
  93. package/lib/cjs/IModelDb.js +192 -88
  94. package/lib/cjs/IModelDb.js.map +1 -1
  95. package/lib/cjs/IModelDbFonts.d.ts +54 -0
  96. package/lib/cjs/IModelDbFonts.d.ts.map +1 -0
  97. package/lib/cjs/IModelDbFonts.js +11 -0
  98. package/lib/cjs/IModelDbFonts.js.map +1 -0
  99. package/lib/cjs/IModelElementCloneContext.d.ts +2 -0
  100. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  101. package/lib/cjs/IModelElementCloneContext.js +11 -1
  102. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  103. package/lib/cjs/IModelHost.d.ts +0 -7
  104. package/lib/cjs/IModelHost.d.ts.map +1 -1
  105. package/lib/cjs/IModelHost.js +56 -35
  106. package/lib/cjs/IModelHost.js.map +1 -1
  107. package/lib/cjs/IModelJsFs.d.ts.map +1 -1
  108. package/lib/cjs/IModelJsFs.js +17 -1
  109. package/lib/cjs/IModelJsFs.js.map +1 -1
  110. package/lib/cjs/IpcHost.js +4 -6
  111. package/lib/cjs/IpcHost.js.map +1 -1
  112. package/lib/cjs/LineStyle.js.map +1 -1
  113. package/lib/cjs/LocalHub.js +9 -3
  114. package/lib/cjs/LocalHub.js.map +1 -1
  115. package/lib/cjs/LocalhostIpcHost.js +5 -6
  116. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  117. package/lib/cjs/LockControl.js.map +1 -1
  118. package/lib/cjs/Material.js +40 -0
  119. package/lib/cjs/Material.js.map +1 -1
  120. package/lib/cjs/Model.d.ts +1 -1
  121. package/lib/cjs/Model.d.ts.map +1 -1
  122. package/lib/cjs/Model.js +27 -2
  123. package/lib/cjs/Model.js.map +1 -1
  124. package/lib/cjs/NativeAppStorage.js +5 -3
  125. package/lib/cjs/NativeAppStorage.js.map +1 -1
  126. package/lib/cjs/NativeHost.js +6 -3
  127. package/lib/cjs/NativeHost.js.map +1 -1
  128. package/lib/cjs/NavigationRelationship.js +25 -25
  129. package/lib/cjs/NavigationRelationship.js.map +1 -1
  130. package/lib/cjs/PromiseMemoizer.d.ts +2 -3
  131. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
  132. package/lib/cjs/PromiseMemoizer.js +12 -5
  133. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  134. package/lib/cjs/PropertyStore.js +1 -4
  135. package/lib/cjs/PropertyStore.js.map +1 -1
  136. package/lib/cjs/Relationship.d.ts.map +1 -1
  137. package/lib/cjs/Relationship.js +13 -1
  138. package/lib/cjs/Relationship.js.map +1 -1
  139. package/lib/cjs/RpcBackend.js.map +1 -1
  140. package/lib/cjs/SQLiteDb.d.ts +6 -4
  141. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  142. package/lib/cjs/SQLiteDb.js +74 -15
  143. package/lib/cjs/SQLiteDb.js.map +1 -1
  144. package/lib/cjs/Schema.d.ts +6 -0
  145. package/lib/cjs/Schema.d.ts.map +1 -1
  146. package/lib/cjs/Schema.js +12 -1
  147. package/lib/cjs/Schema.js.map +1 -1
  148. package/lib/cjs/SchemaSync.js +1 -4
  149. package/lib/cjs/SchemaSync.js.map +1 -1
  150. package/lib/cjs/SchemaUtils.js.map +1 -1
  151. package/lib/cjs/SheetIndex.js +6 -0
  152. package/lib/cjs/SheetIndex.js.map +1 -1
  153. package/lib/cjs/SqliteChangesetReader.d.ts +11 -3
  154. package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
  155. package/lib/cjs/SqliteChangesetReader.js +21 -5
  156. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  157. package/lib/cjs/SqliteStatement.d.ts +4 -2
  158. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  159. package/lib/cjs/SqliteStatement.js +13 -1
  160. package/lib/cjs/SqliteStatement.js.map +1 -1
  161. package/lib/cjs/TextAnnotationElement.js.map +1 -1
  162. package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
  163. package/lib/cjs/TextAnnotationLayout.d.ts +6 -3
  164. package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
  165. package/lib/cjs/TextAnnotationLayout.js +30 -12
  166. package/lib/cjs/TextAnnotationLayout.js.map +1 -1
  167. package/lib/cjs/Texture.js +3 -0
  168. package/lib/cjs/Texture.js.map +1 -1
  169. package/lib/cjs/TileStorage.js +6 -1
  170. package/lib/cjs/TileStorage.js.map +1 -1
  171. package/lib/cjs/TxnManager.d.ts +37 -1
  172. package/lib/cjs/TxnManager.d.ts.map +1 -1
  173. package/lib/cjs/TxnManager.js +210 -55
  174. package/lib/cjs/TxnManager.js.map +1 -1
  175. package/lib/cjs/ViewDefinition.d.ts +6 -6
  176. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  177. package/lib/cjs/ViewDefinition.js +81 -26
  178. package/lib/cjs/ViewDefinition.js.map +1 -1
  179. package/lib/cjs/ViewStateHydrator.d.ts +0 -1
  180. package/lib/cjs/ViewStateHydrator.d.ts.map +1 -1
  181. package/lib/cjs/ViewStateHydrator.js +1 -11
  182. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  183. package/lib/cjs/ViewStore.js +3 -1
  184. package/lib/cjs/ViewStore.js.map +1 -1
  185. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  186. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  187. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  188. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  189. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  190. package/lib/cjs/core-backend.d.ts +2 -0
  191. package/lib/cjs/core-backend.d.ts.map +1 -1
  192. package/lib/cjs/core-backend.js +2 -0
  193. package/lib/cjs/core-backend.js.map +1 -1
  194. package/lib/cjs/domains/FunctionalElements.js +1 -1
  195. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  196. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  197. package/lib/cjs/domains/GenericElements.js.map +1 -1
  198. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  199. package/lib/cjs/internal/ChangesetConflictArgs.d.ts +40 -2
  200. package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -1
  201. package/lib/cjs/internal/ChangesetConflictArgs.js +101 -0
  202. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  203. package/lib/cjs/internal/ChannelAdmin.js +7 -7
  204. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  205. package/lib/cjs/internal/FontFileImpl.d.ts +34 -0
  206. package/lib/cjs/internal/FontFileImpl.d.ts.map +1 -0
  207. package/lib/cjs/internal/FontFileImpl.js +143 -0
  208. package/lib/cjs/internal/FontFileImpl.js.map +1 -0
  209. package/lib/cjs/internal/IModelDbFontsImpl.d.ts +7 -0
  210. package/lib/cjs/internal/IModelDbFontsImpl.d.ts.map +1 -0
  211. package/lib/cjs/internal/IModelDbFontsImpl.js +186 -0
  212. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -0
  213. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  214. package/lib/cjs/internal/NoLocks.js +2 -5
  215. package/lib/cjs/internal/NoLocks.js.map +1 -1
  216. package/lib/cjs/internal/ServerBasedLocks.js +4 -4
  217. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  218. package/lib/cjs/internal/Symbols.d.ts +3 -0
  219. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  220. package/lib/cjs/internal/Symbols.js +4 -1
  221. package/lib/cjs/internal/Symbols.js.map +1 -1
  222. package/lib/cjs/internal/cross-package.js.map +1 -1
  223. package/lib/cjs/internal/workspace/SettingsImpl.js +6 -9
  224. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  225. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +8 -12
  226. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  227. package/lib/cjs/internal/workspace/WorkspaceImpl.js +22 -17
  228. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  229. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +1 -4
  230. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  231. package/lib/cjs/rpc/multipart.d.ts.map +1 -1
  232. package/lib/cjs/rpc/multipart.js +2 -1
  233. package/lib/cjs/rpc/multipart.js.map +1 -1
  234. package/lib/cjs/rpc/tracing.js +2 -2
  235. package/lib/cjs/rpc/tracing.js.map +1 -1
  236. package/lib/cjs/rpc/web/logging.js.map +1 -1
  237. package/lib/cjs/rpc/web/request.d.ts.map +1 -1
  238. package/lib/cjs/rpc/web/request.js +2 -1
  239. package/lib/cjs/rpc/web/request.js.map +1 -1
  240. package/lib/cjs/rpc/web/response.js.map +1 -1
  241. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  242. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +2 -0
  243. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  244. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -3
  245. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  246. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +1 -1
  247. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  248. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  249. package/lib/cjs/workspace/Settings.js.map +1 -1
  250. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  251. package/lib/cjs/workspace/Workspace.js.map +1 -1
  252. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  253. package/package.json +23 -20
package/CHANGELOG.md CHANGED
@@ -1,6 +1,55 @@
1
1
  # Change Log - @itwin/core-backend
2
2
 
3
- This log was last generated on Wed, 06 Nov 2024 19:24:30 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 24 Jan 2025 08:05:17 GMT and should not be manually modified.
4
+
5
+ ## 4.10.6
6
+ Fri, 24 Jan 2025 08:02:40 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.10.5
11
+ Tue, 21 Jan 2025 21:56:45 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.10.4
16
+ Mon, 13 Jan 2025 14:06:43 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 4.10.3
21
+ Mon, 06 Jan 2025 14:00:13 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 4.10.2
26
+ Thu, 21 Nov 2024 15:22:20 GMT
27
+
28
+ ### Updates
29
+
30
+ - Add test for BE_SQLITE_CONSTRAINT_UNIQUE
31
+ - Fix CloudSqlite.DbAccess.createBlobContainer always overwriting containerType with "property-store".
32
+
33
+ ## 4.10.1
34
+ Thu, 14 Nov 2024 18:11:00 GMT
35
+
36
+ _Version update only_
37
+
38
+ ## 4.10.0
39
+ Wed, 13 Nov 2024 15:23:38 GMT
40
+
41
+ ### Updates
42
+
43
+ - Added basic TS implementation for Sheet Indexes
44
+ - Comply with 4.8.x ECSql row format
45
+ - fix regression related to classid
46
+ - Allow revert timeline changes
47
+ - Add support for Node 22
48
+ - `Object` methods are now prohibited through IPC.
49
+ - Deprecate `IModelHost.snapshotFileNameResolver` and `FileNameResolver`
50
+ - Require db in `SqliteChangesetReaderArgs`
51
+ - omit baseuri from RequestTokenProps interface
52
+ - Removed added tests for boolean exps in select statement
4
53
 
5
54
  ## 4.9.7
6
55
  Wed, 06 Nov 2024 19:23:04 GMT
@@ -14,6 +14,8 @@ const core_common_1 = require("@itwin/core-common");
14
14
  * @beta
15
15
  */
16
16
  class LockConflict extends core_common_1.IModelError {
17
+ briefcaseId;
18
+ briefcaseAlias;
17
19
  constructor(
18
20
  /** Id of Briefcase holding lock */
19
21
  briefcaseId,
@@ -1 +1 @@
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 @typescript-eslint/no-deprecated\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
+ {"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;IAGzB;IAEA;IAJlB;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":["/*---------------------------------------------------------------------------------------------\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 LockState as CommonLockState, IModelError, IModelVersion,\n LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, DownloadRequest, ProgressFunction } from \"./CheckpointManager\";\nimport type { TokenArg } from \"./IModelDb\";\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/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @deprecated in 4.7 Use [LockState]($common)\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/**\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, CommonLockState>;\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: CommonLockState;\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 @typescript-eslint/no-deprecated\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 * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.\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 +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":["/*---------------------------------------------------------------------------------------------\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
+ {"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 +1 @@
1
- {"version":3,"file":"BisCoreSchema.d.ts","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAM3C;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,WAA2B,UAAU,IAAI,MAAM,CAAsB;IACrE,WAAkB,cAAc,IAAI,MAAM,CAAsH;IAEhK,gBAAgB;WACF,cAAc;CAsB7B"}
1
+ {"version":3,"file":"BisCoreSchema.d.ts","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAO3C;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,WAA2B,UAAU,IAAI,MAAM,CAAsB;IACrE,WAAkB,cAAc,IAAI,MAAM,CAAsH;IAEhK,gBAAgB;WACF,cAAc;CAuB7B"}
@@ -23,6 +23,7 @@ const textureMod = require("./Texture");
23
23
  const viewMod = require("./ViewDefinition");
24
24
  const displayStyleMod = require("./DisplayStyle");
25
25
  const annotationsMod = require("./TextAnnotationElement");
26
+ const sheetIndex = require("./SheetIndex");
26
27
  /**
27
28
  * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.
28
29
  *
@@ -56,6 +57,7 @@ class BisCoreSchema extends Schema_1.Schema {
56
57
  externalSourceMod,
57
58
  displayStyleMod,
58
59
  annotationsMod,
60
+ sheetIndex
59
61
  ].forEach((module) => ClassRegistry_1.ClassRegistry.registerModule(module, this));
60
62
  }
61
63
  }
@@ -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":["/*---------------------------------------------------------------------------------------------\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
+ {"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;AAC1D,2CAA2C;AAE3C;;;;;;;;;;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;YACd,UAAU;SACX,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACF;AA5BD,sCA4BC","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\";\nimport * as sheetIndex from \"./SheetIndex\";\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 sheetIndex\n ].forEach((module) => ClassRegistry.registerModule(module, this));\n }\n}\n"]}
@@ -61,19 +61,19 @@ export declare namespace BlobContainer {
61
61
  /** Properties returned by `Service.requestToken` */
62
62
  interface TokenProps {
63
63
  /**
64
- * expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,
64
+ * Expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,
65
65
  * and must be refreshed before it expires
66
66
  */
67
67
  token: ContainerToken;
68
- /** scope of the container. */
68
+ /** Scope of the container. */
69
69
  scope: Scope;
70
- /** name of the blob storage provider. */
70
+ /** Name of the blob storage provider. */
71
71
  provider: Provider;
72
72
  /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */
73
73
  expiration: Date;
74
74
  /** Metadata of the container. */
75
75
  metadata: Metadata;
76
- /** Base URI of container */
76
+ /** Base URI of the storage account that hosts the container */
77
77
  baseUri: string;
78
78
  }
79
79
  /** The URI and Id of the container. */
@@ -1 +1 @@
1
- {"version":3,"file":"BlobContainerService.d.ts","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;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obContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAiB,aAAa,CA2K7B;AA3KD,WAAiB,aAAa;AA2K9B,CAAC,EA3KgB,aAAa,6BAAb,aAAa,QA2K7B","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 /**\r\n * Properties returned by queryContainersMetadata\r\n */\r\n export interface MetadataResponse extends Metadata {\r\n containerId: string;\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 /** Base URI of container */\r\n baseUri: string;\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 Omit<AccessContainerProps, \"baseUri\"> {\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 /**\r\n * Query Parameters for querying containers\r\n */\r\n export interface QueryContainerProps {\r\n /** the iTwinId of the containers to query */\r\n iTwinId: GuidString;\r\n /** optional iModelId of the containers to query */\r\n iModelId?: GuidString;\r\n /** optional containerType of the containers to query */\r\n containerType?: GuidString;\r\n /** optional label of the containers to query */\r\n label?: GuidString;\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 specific container */\r\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\r\n\r\n /** Returns all containers and their metadata associated with a given iTwinId. Can be further queried by label and containerType. */\r\n queryContainersMetadata(userToken: UserToken, args: QueryContainerProps): Promise<MetadataResponse[]>;\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
+ {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAiB,aAAa,CA2K7B;AA3KD,WAAiB,aAAa;AA2K9B,CAAC,EA3KgB,aAAa,6BAAb,aAAa,QA2K7B","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 /**\n * Properties returned by queryContainersMetadata\n */\n export interface MetadataResponse extends Metadata {\n containerId: string;\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 /** Base URI of the storage account that hosts the container */\n baseUri: string;\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 Omit<AccessContainerProps, \"baseUri\"> {\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 /**\n * Query Parameters for querying containers\n */\n export interface QueryContainerProps {\n /** the iTwinId of the containers to query */\n iTwinId: GuidString;\n /** optional iModelId of the containers to query */\n iModelId?: GuidString;\n /** optional containerType of the containers to query */\n containerType?: GuidString;\n /** optional label of the containers to query */\n label?: GuidString;\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 specific container */\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\n\n /** Returns all containers and their metadata associated with a given iTwinId. Can be further queried by label and containerType. */\n queryContainersMetadata(userToken: UserToken, args: QueryContainerProps): Promise<MetadataResponse[]>;\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"]}
@@ -32,6 +32,11 @@ export interface PushChangesArgs extends TokenArg {
32
32
  pushRetryCount?: number;
33
33
  /** The delay to wait between retry attempts on failed pushes. Default is 3 seconds. */
34
34
  pushRetryDelay?: BeDuration;
35
+ /**
36
+ * For testing purpose
37
+ * @internal
38
+ */
39
+ noFastForward?: true;
35
40
  }
36
41
  /**
37
42
  * Specifies a specific index for pulling changes.
@@ -49,6 +54,11 @@ export type PullChangesArgs = ToChangesetArgs & {
49
54
  * @note return non-zero from this function to abort the download.
50
55
  */
51
56
  onProgress?: ProgressFunction;
57
+ /**
58
+ * For testing purpose
59
+ * @internal
60
+ */
61
+ noFastForward?: true;
52
62
  };
53
63
  /** Arguments for [[BriefcaseManager.revertTimelineChanges]]
54
64
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"BriefcaseManager.d.ts","sourceRoot":"","sources":["../../src/BriefcaseManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EACL,WAAW,EAAE,UAAU,EAAmB,UAAU,EAAmD,QAAQ,EAChH,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,WAAW,EAAoB,cAAc,EAAsB,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAA6C,mBAAmB,EACrM,YAAY,EAAE,aAAa,EAAE,wBAAwB,EACtD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAsC,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,QAAQ,E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AC;IA8E7F,4EAA4E;mBACvD,WAAW;IA4ChC;;OAEG;WACiB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBxF"}
@@ -33,6 +33,7 @@ class BriefcaseManager {
33
33
  static getChangeCachePathName(iModelId) { return path.join(this.getIModelPath(iModelId), iModelId.concat(".bim.ecchanges")); }
34
34
  /** @internal */
35
35
  static getChangedElementsPathName(iModelId) { return path.join(this.getIModelPath(iModelId), iModelId.concat(".bim.elems")); }
36
+ static _briefcaseSubDir = "briefcases";
36
37
  /** Get the local path of the folder storing briefcases associated with the specified iModel. */
37
38
  static getBriefcaseBasePath(iModelId) {
38
39
  return path.join(this.getIModelPath(iModelId), this._briefcaseSubDir);
@@ -49,6 +50,7 @@ class BriefcaseManager {
49
50
  this._cacheDir = cacheRootDir;
50
51
  IModelJsFs_1.IModelJsFs.recursiveMkDirSync(this._cacheDir);
51
52
  }
53
+ static _initialized;
52
54
  /** Initialize BriefcaseManager
53
55
  * @param cacheRootDir The root directory for storing a cache of downloaded briefcase files on the local computer.
54
56
  * Briefcases are stored relative to this path in sub-folders organized by IModelId.
@@ -99,6 +101,7 @@ class BriefcaseManager {
99
101
  }
100
102
  return briefcaseList;
101
103
  }
104
+ static _cacheDir;
102
105
  /** Get the root directory for the briefcase cache */
103
106
  static get cacheDir() { return this._cacheDir; }
104
107
  /** Determine whether the supplied briefcaseId is in the range of assigned BriefcaseIds issued by iModelHub
@@ -333,10 +336,10 @@ class BriefcaseManager {
333
336
  status = BriefcaseManager.deleteFolderIfEmpty(folderPathname);
334
337
  return status;
335
338
  }
336
- static async applySingleChangeset(db, changesetFile) {
339
+ static async applySingleChangeset(db, changesetFile, fastForward) {
337
340
  if (changesetFile.changesType === core_common_1.ChangesetType.Schema || changesetFile.changesType === core_common_1.ChangesetType.SchemaSync)
338
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.)
339
- db[Symbols_1._nativeDb].applyChangeset(changesetFile);
342
+ db[Symbols_1._nativeDb].applyChangeset(changesetFile, fastForward);
340
343
  db.changeset = db[Symbols_1._nativeDb].getCurrentChangeset();
341
344
  // we're done with this changeset, delete it
342
345
  IModelJsFs_1.IModelJsFs.removeSync(changesetFile.pathname);
@@ -393,6 +396,9 @@ class BriefcaseManager {
393
396
  if (currentIndex === undefined)
394
397
  currentIndex = (await IModelHost_1.IModelHost.hubAccess.queryChangeset({ accessToken: arg.accessToken, iModelId: db.iModelId, changeset: { id: db.changeset.id } })).index;
395
398
  const reverse = (arg.toIndex && arg.toIndex < currentIndex) ? true : false;
399
+ if (db[Symbols_1._nativeDb].hasPendingTxns() && reverse) {
400
+ throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "Cannot reverse changesets when there are pending changes");
401
+ }
396
402
  // Download change sets
397
403
  const changesets = await IModelHost_1.IModelHost.hubAccess.downloadChangesets({
398
404
  accessToken: arg.accessToken,
@@ -405,11 +411,49 @@ class BriefcaseManager {
405
411
  return; // nothing to apply
406
412
  if (reverse)
407
413
  changesets.reverse();
408
- for (const changeset of changesets) {
409
- const stopwatch = new core_bentley_1.StopWatch(`[${changeset.id}]`, true);
410
- core_bentley_1.Logger.logInfo(loggerCategory, `Starting application of changeset with id ${stopwatch.description}`);
411
- await this.applySingleChangeset(db, changeset);
412
- core_bentley_1.Logger.logInfo(loggerCategory, `Applied changeset with id ${stopwatch.description} (${stopwatch.elapsedSeconds} seconds)`);
414
+ let appliedChangesets = -1;
415
+ if (db[Symbols_1._nativeDb].hasPendingTxns() && !reverse && !arg.noFastForward) {
416
+ // attempt to perform fast forward
417
+ for (const changeset of changesets) {
418
+ // do not waste time on schema changesets. They cannot be fastforwarded.
419
+ if (changeset.changesType === core_common_1.ChangesetType.Schema || changeset.changesType === core_common_1.ChangesetType.SchemaSync)
420
+ break;
421
+ try {
422
+ const stopwatch = new core_bentley_1.StopWatch(`[${changeset.id}]`, true);
423
+ core_bentley_1.Logger.logInfo(loggerCategory, `Starting application of changeset with id ${stopwatch.description} using fast forward method`);
424
+ await this.applySingleChangeset(db, changeset, true);
425
+ core_bentley_1.Logger.logInfo(loggerCategory, `Applied changeset with id ${stopwatch.description} (${stopwatch.elapsedSeconds} seconds)`);
426
+ appliedChangesets++;
427
+ db.saveChanges();
428
+ }
429
+ catch {
430
+ db.abandonChanges();
431
+ break;
432
+ }
433
+ }
434
+ }
435
+ if (appliedChangesets < changesets.length - 1) {
436
+ db[Symbols_1._nativeDb].pullMergeBegin();
437
+ for (const changeset of changesets.filter((_, index) => index > appliedChangesets)) {
438
+ const stopwatch = new core_bentley_1.StopWatch(`[${changeset.id}]`, true);
439
+ core_bentley_1.Logger.logInfo(loggerCategory, `Starting application of changeset with id ${stopwatch.description}`);
440
+ try {
441
+ await this.applySingleChangeset(db, changeset, false);
442
+ core_bentley_1.Logger.logInfo(loggerCategory, `Applied changeset with id ${stopwatch.description} (${stopwatch.elapsedSeconds} seconds)`);
443
+ }
444
+ catch (err) {
445
+ if (err instanceof Error) {
446
+ core_bentley_1.Logger.logError(loggerCategory, `Error applying changeset with id ${stopwatch.description}: ${err.message}`);
447
+ }
448
+ db.abandonChanges();
449
+ db[Symbols_1._nativeDb].pullMergeEnd();
450
+ throw err;
451
+ }
452
+ }
453
+ db[Symbols_1._nativeDb].pullMergeEnd();
454
+ if (!db.isReadonly) {
455
+ db.saveChanges("Merge.");
456
+ }
413
457
  }
414
458
  // notify listeners
415
459
  db.notifyChangesetApplied();
@@ -477,5 +521,4 @@ class BriefcaseManager {
477
521
  }
478
522
  }
479
523
  exports.BriefcaseManager = BriefcaseManager;
480
- BriefcaseManager._briefcaseSubDir = "briefcases";
481
524
  //# sourceMappingURL=BriefcaseManager.js.map