@itwin/core-backend 4.0.0-dev.1 → 4.0.0-dev.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/CHANGELOG.md +68 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +226 -224
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js +41 -41
  5. package/lib/cjs/BackendHubAccess.js.map +1 -1
  6. package/lib/cjs/BackendLoggerCategory.d.ts +90 -91
  7. package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
  8. package/lib/cjs/BackendLoggerCategory.js +98 -99
  9. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  10. package/lib/cjs/BisCoreSchema.d.ts +21 -21
  11. package/lib/cjs/BisCoreSchema.js +60 -60
  12. package/lib/cjs/BlobContainerService.d.ts +120 -0
  13. package/lib/cjs/BlobContainerService.d.ts.map +1 -0
  14. package/lib/cjs/BlobContainerService.js +18 -0
  15. package/lib/cjs/BlobContainerService.js.map +1 -0
  16. package/lib/cjs/BriefcaseManager.d.ts +184 -170
  17. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  18. package/lib/cjs/BriefcaseManager.js +421 -414
  19. package/lib/cjs/BriefcaseManager.js.map +1 -1
  20. package/lib/cjs/Category.d.ts +153 -153
  21. package/lib/cjs/Category.js +243 -243
  22. package/lib/cjs/Category.js.map +1 -1
  23. package/lib/cjs/ChangeSummaryManager.d.ts +187 -187
  24. package/lib/cjs/ChangeSummaryManager.js +444 -445
  25. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  26. package/lib/cjs/ChangedElementsDb.d.ts +99 -99
  27. package/lib/cjs/ChangedElementsDb.js +165 -165
  28. package/lib/cjs/ChangedElementsManager.d.ts +39 -39
  29. package/lib/cjs/ChangedElementsManager.js +88 -88
  30. package/lib/cjs/ChannelControl.d.ts +70 -0
  31. package/lib/cjs/ChannelControl.d.ts.map +1 -0
  32. package/lib/cjs/ChannelControl.js +89 -0
  33. package/lib/cjs/ChannelControl.js.map +1 -0
  34. package/lib/cjs/CheckpointManager.d.ts +121 -121
  35. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  36. package/lib/cjs/CheckpointManager.js +351 -349
  37. package/lib/cjs/CheckpointManager.js.map +1 -1
  38. package/lib/cjs/ClassRegistry.d.ts +79 -79
  39. package/lib/cjs/ClassRegistry.js +249 -245
  40. package/lib/cjs/ClassRegistry.js.map +1 -1
  41. package/lib/cjs/CloudSqlite.d.ts +572 -350
  42. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  43. package/lib/cjs/CloudSqlite.js +374 -153
  44. package/lib/cjs/CloudSqlite.js.map +1 -1
  45. package/lib/cjs/CodeService.d.ts +399 -396
  46. package/lib/cjs/CodeService.d.ts.map +1 -1
  47. package/lib/cjs/CodeService.js +63 -63
  48. package/lib/cjs/CodeService.js.map +1 -1
  49. package/lib/cjs/CodeSpecs.d.ts +58 -55
  50. package/lib/cjs/CodeSpecs.d.ts.map +1 -1
  51. package/lib/cjs/CodeSpecs.js +154 -124
  52. package/lib/cjs/CodeSpecs.js.map +1 -1
  53. package/lib/cjs/ConcurrentQuery.d.ts +13 -13
  54. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  55. package/lib/cjs/ConcurrentQuery.js +36 -36
  56. package/lib/cjs/CustomViewState3dCreator.d.ts +21 -21
  57. package/lib/cjs/CustomViewState3dCreator.d.ts.map +1 -1
  58. package/lib/cjs/CustomViewState3dCreator.js +80 -81
  59. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  60. package/lib/cjs/DevTools.d.ts +74 -71
  61. package/lib/cjs/DevTools.d.ts.map +1 -1
  62. package/lib/cjs/DevTools.js +156 -154
  63. package/lib/cjs/DevTools.js.map +1 -1
  64. package/lib/cjs/DisplayStyle.d.ts +104 -106
  65. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  66. package/lib/cjs/DisplayStyle.js +251 -256
  67. package/lib/cjs/DisplayStyle.js.map +1 -1
  68. package/lib/cjs/ECDb.d.ts +194 -191
  69. package/lib/cjs/ECDb.d.ts.map +1 -1
  70. package/lib/cjs/ECDb.js +351 -350
  71. package/lib/cjs/ECDb.js.map +1 -1
  72. package/lib/cjs/ECSchemaXmlContext.d.ts +18 -18
  73. package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -1
  74. package/lib/cjs/ECSchemaXmlContext.js +41 -41
  75. package/lib/cjs/ECSqlStatement.d.ts +473 -473
  76. package/lib/cjs/ECSqlStatement.js +791 -791
  77. package/lib/cjs/Element.d.ts +1105 -1109
  78. package/lib/cjs/Element.d.ts.map +1 -1
  79. package/lib/cjs/Element.js +1416 -1427
  80. package/lib/cjs/Element.js.map +1 -1
  81. package/lib/cjs/ElementAspect.d.ts +175 -179
  82. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  83. package/lib/cjs/ElementAspect.js +202 -211
  84. package/lib/cjs/ElementAspect.js.map +1 -1
  85. package/lib/cjs/ElementGraphics.d.ts +9 -9
  86. package/lib/cjs/ElementGraphics.js +41 -41
  87. package/lib/cjs/ElementGraphics.js.map +1 -1
  88. package/lib/cjs/ElementTreeWalker.d.ts +162 -162
  89. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  90. package/lib/cjs/ElementTreeWalker.js +409 -409
  91. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  92. package/lib/cjs/Entity.d.ts +102 -106
  93. package/lib/cjs/Entity.d.ts.map +1 -1
  94. package/lib/cjs/Entity.js +118 -134
  95. package/lib/cjs/Entity.js.map +1 -1
  96. package/lib/cjs/EntityReferences.d.ts +49 -49
  97. package/lib/cjs/EntityReferences.d.ts.map +1 -1
  98. package/lib/cjs/EntityReferences.js +95 -95
  99. package/lib/cjs/ExportGraphics.d.ts +317 -317
  100. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  101. package/lib/cjs/ExportGraphics.js +208 -208
  102. package/lib/cjs/ExternalSource.d.ts +95 -96
  103. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  104. package/lib/cjs/ExternalSource.js +130 -131
  105. package/lib/cjs/ExternalSource.js.map +1 -1
  106. package/lib/cjs/GeoCoordConfig.d.ts +19 -19
  107. package/lib/cjs/GeoCoordConfig.js +85 -85
  108. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  109. package/lib/cjs/GeometrySummary.d.ts +4 -4
  110. package/lib/cjs/GeometrySummary.js +333 -333
  111. package/lib/cjs/GeometrySummary.js.map +1 -1
  112. package/lib/cjs/HubMock.d.ts +94 -94
  113. package/lib/cjs/HubMock.js +220 -222
  114. package/lib/cjs/HubMock.js.map +1 -1
  115. package/lib/cjs/IModelCloneContext.d.ts +8 -8
  116. package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
  117. package/lib/cjs/IModelCloneContext.js +15 -15
  118. package/lib/cjs/IModelDb.d.ts +1222 -1196
  119. package/lib/cjs/IModelDb.d.ts.map +1 -1
  120. package/lib/cjs/IModelDb.js +2389 -2392
  121. package/lib/cjs/IModelDb.js.map +1 -1
  122. package/lib/cjs/IModelElementCloneContext.d.ts +89 -89
  123. package/lib/cjs/IModelElementCloneContext.js +159 -159
  124. package/lib/cjs/IModelHost.d.ts +370 -369
  125. package/lib/cjs/IModelHost.d.ts.map +1 -1
  126. package/lib/cjs/IModelHost.js +476 -496
  127. package/lib/cjs/IModelHost.js.map +1 -1
  128. package/lib/cjs/IModelJsFs.d.ts +62 -62
  129. package/lib/cjs/IModelJsFs.js +139 -140
  130. package/lib/cjs/IModelJsFs.js.map +1 -1
  131. package/lib/cjs/IpcHost.d.ts +104 -104
  132. package/lib/cjs/IpcHost.js +276 -278
  133. package/lib/cjs/IpcHost.js.map +1 -1
  134. package/lib/cjs/LineStyle.d.ts +311 -311
  135. package/lib/cjs/LineStyle.js +295 -295
  136. package/lib/cjs/LocalHub.d.ts +162 -162
  137. package/lib/cjs/LocalHub.d.ts.map +1 -1
  138. package/lib/cjs/LocalHub.js +579 -584
  139. package/lib/cjs/LocalHub.js.map +1 -1
  140. package/lib/cjs/LocalhostIpcHost.d.ts +21 -20
  141. package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -1
  142. package/lib/cjs/LocalhostIpcHost.js +79 -81
  143. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  144. package/lib/cjs/Material.d.ts +131 -131
  145. package/lib/cjs/Material.d.ts.map +1 -1
  146. package/lib/cjs/Material.js +185 -181
  147. package/lib/cjs/Material.js.map +1 -1
  148. package/lib/cjs/Model.d.ts +391 -392
  149. package/lib/cjs/Model.d.ts.map +1 -1
  150. package/lib/cjs/Model.js +487 -485
  151. package/lib/cjs/Model.js.map +1 -1
  152. package/lib/cjs/NativeAppStorage.d.ts +51 -51
  153. package/lib/cjs/NativeAppStorage.js +202 -202
  154. package/lib/cjs/NativeAppStorage.js.map +1 -1
  155. package/lib/cjs/NativeHost.d.ts +52 -52
  156. package/lib/cjs/NativeHost.d.ts.map +1 -1
  157. package/lib/cjs/NativeHost.js +158 -163
  158. package/lib/cjs/NativeHost.js.map +1 -1
  159. package/lib/cjs/NavigationRelationship.d.ts +156 -156
  160. package/lib/cjs/NavigationRelationship.js +225 -225
  161. package/lib/cjs/NavigationRelationship.js.map +1 -1
  162. package/lib/cjs/PromiseMemoizer.d.ts +51 -51
  163. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
  164. package/lib/cjs/PromiseMemoizer.js +101 -101
  165. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  166. package/lib/cjs/PropertyStore.d.ts +123 -132
  167. package/lib/cjs/PropertyStore.d.ts.map +1 -1
  168. package/lib/cjs/PropertyStore.js +179 -11
  169. package/lib/cjs/PropertyStore.js.map +1 -1
  170. package/lib/cjs/Relationship.d.ts +413 -416
  171. package/lib/cjs/Relationship.d.ts.map +1 -1
  172. package/lib/cjs/Relationship.js +491 -494
  173. package/lib/cjs/Relationship.js.map +1 -1
  174. package/lib/cjs/RpcBackend.d.ts +5 -5
  175. package/lib/cjs/RpcBackend.js +32 -32
  176. package/lib/cjs/SQLiteDb.d.ts +317 -219
  177. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  178. package/lib/cjs/SQLiteDb.js +318 -214
  179. package/lib/cjs/SQLiteDb.js.map +1 -1
  180. package/lib/cjs/Schema.d.ts +55 -55
  181. package/lib/cjs/Schema.js +83 -83
  182. package/lib/cjs/Schema.js.map +1 -1
  183. package/lib/cjs/ServerBasedLocks.d.ts +57 -57
  184. package/lib/cjs/ServerBasedLocks.js +168 -168
  185. package/lib/cjs/ServerBasedLocks.js.map +1 -1
  186. package/lib/cjs/SqliteStatement.d.ts +360 -360
  187. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  188. package/lib/cjs/SqliteStatement.js +586 -586
  189. package/lib/cjs/Texture.d.ts +58 -58
  190. package/lib/cjs/Texture.js +82 -82
  191. package/lib/cjs/Texture.js.map +1 -1
  192. package/lib/cjs/TileStorage.d.ts +44 -18
  193. package/lib/cjs/TileStorage.d.ts.map +1 -1
  194. package/lib/cjs/TileStorage.js +109 -90
  195. package/lib/cjs/TileStorage.js.map +1 -1
  196. package/lib/cjs/TxnManager.d.ts +202 -202
  197. package/lib/cjs/TxnManager.d.ts.map +1 -1
  198. package/lib/cjs/TxnManager.js +356 -356
  199. package/lib/cjs/TxnManager.js.map +1 -1
  200. package/lib/cjs/ViewDefinition.d.ts +429 -439
  201. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  202. package/lib/cjs/ViewDefinition.js +640 -646
  203. package/lib/cjs/ViewDefinition.js.map +1 -1
  204. package/lib/cjs/ViewStateHydrator.d.ts +13 -13
  205. package/lib/cjs/ViewStateHydrator.js +103 -103
  206. package/lib/cjs/core-backend.d.ts +181 -184
  207. package/lib/cjs/core-backend.d.ts.map +1 -1
  208. package/lib/cjs/core-backend.js +205 -204
  209. package/lib/cjs/core-backend.js.map +1 -1
  210. package/lib/cjs/domains/FunctionalElements.d.ts +101 -101
  211. package/lib/cjs/domains/FunctionalElements.js +145 -145
  212. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  213. package/lib/cjs/domains/FunctionalSchema.d.ts +13 -13
  214. package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -1
  215. package/lib/cjs/domains/FunctionalSchema.js +39 -40
  216. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  217. package/lib/cjs/domains/GenericElements.d.ts +177 -177
  218. package/lib/cjs/domains/GenericElements.js +263 -263
  219. package/lib/cjs/domains/GenericSchema.d.ts +10 -10
  220. package/lib/cjs/domains/GenericSchema.js +28 -28
  221. package/lib/cjs/rpc/multipart.d.ts +11 -11
  222. package/lib/cjs/rpc/multipart.js +71 -71
  223. package/lib/cjs/rpc/tracing.d.ts +28 -28
  224. package/lib/cjs/rpc/tracing.js +73 -74
  225. package/lib/cjs/rpc/tracing.js.map +1 -1
  226. package/lib/cjs/rpc/web/logging.d.ts +9 -9
  227. package/lib/cjs/rpc/web/logging.js +43 -43
  228. package/lib/cjs/rpc/web/request.d.ts +6 -6
  229. package/lib/cjs/rpc/web/request.js +73 -74
  230. package/lib/cjs/rpc/web/request.js.map +1 -1
  231. package/lib/cjs/rpc/web/response.d.ts +6 -6
  232. package/lib/cjs/rpc/web/response.js +105 -106
  233. package/lib/cjs/rpc/web/response.js.map +1 -1
  234. package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts +15 -15
  235. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js +32 -32
  236. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +47 -47
  237. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +293 -294
  238. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  239. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts +20 -22
  240. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
  241. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +193 -205
  242. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  243. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +36 -36
  244. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +166 -168
  245. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  246. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +16 -16
  247. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +42 -43
  248. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  249. package/lib/cjs/rpc-impl/WipRpcImpl.d.ts +15 -15
  250. package/lib/cjs/rpc-impl/WipRpcImpl.js +37 -37
  251. package/lib/cjs/workspace/Settings.d.ts +186 -186
  252. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  253. package/lib/cjs/workspace/Settings.js +155 -155
  254. package/lib/cjs/workspace/Settings.js.map +1 -1
  255. package/lib/cjs/workspace/SettingsSchemas.d.ts +75 -75
  256. package/lib/cjs/workspace/SettingsSchemas.js +190 -191
  257. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  258. package/lib/cjs/workspace/Workspace.d.ts +411 -414
  259. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  260. package/lib/cjs/workspace/Workspace.js +521 -543
  261. package/lib/cjs/workspace/Workspace.js.map +1 -1
  262. package/package.json +25 -28
  263. package/lib/cjs/AliCloudStorageService.d.ts +0 -24
  264. package/lib/cjs/AliCloudStorageService.d.ts.map +0 -1
  265. package/lib/cjs/AliCloudStorageService.js +0 -72
  266. package/lib/cjs/AliCloudStorageService.js.map +0 -1
  267. package/lib/cjs/CloudStorageBackend.d.ts +0 -59
  268. package/lib/cjs/CloudStorageBackend.d.ts.map +0 -1
  269. package/lib/cjs/CloudStorageBackend.js +0 -174
  270. package/lib/cjs/CloudStorageBackend.js.map +0 -1
@@ -1,370 +1,371 @@
1
- /** @packageDocumentation
2
- * @module IModelHost
3
- */
4
- import { IModelJsNative } from "@bentley/imodeljs-native";
5
- import { ServerStorage } from "@itwin/object-storage-core";
6
- import { AccessToken, BeEvent, GuidString, Mutable } from "@itwin/core-bentley";
7
- import { AuthorizationClient, LocalDirName, SessionProps } from "@itwin/core-common";
8
- import { TelemetryManager } from "@itwin/core-telemetry";
9
- import { BackendHubAccess } from "./BackendHubAccess";
10
- import { AzureBlobStorageCredentials, CloudStorageService, CloudStorageTileUploader } from "./CloudStorageBackend";
11
- import { TileStorage } from "./TileStorage";
12
- import { Workspace, WorkspaceOpts } from "./workspace/Workspace";
13
- /** @alpha */
14
- export interface CrashReportingConfigNameValuePair {
15
- name: string;
16
- value: string;
17
- }
18
- /** Configuration of the crash-reporting system.
19
- * @alpha
20
- */
21
- export interface CrashReportingConfig {
22
- /** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. This directory will be created if it does not already exist. */
23
- crashDir: string;
24
- /** max # .dmp files that may exist in crashDir. The default is 50. */
25
- maxDumpsInDir?: number;
26
- /** Enable crash-dumps? If so, .dmp and .properties.txt files will be generated and written to crashDir in the event of an unhandled native-code exception. If not, only .properties.txt files will be written. The default is false. */
27
- enableCrashDumps?: boolean;
28
- /** If enableCrashDumps is true, do you want a full-memory dump? Defaults to false. */
29
- wantFullMemoryDumps?: boolean;
30
- /** Enable Node.js crash reporting? If so, report files will be generated in the event of an unhandled exception or fatal error and written to crashDir. The default is false. */
31
- enableNodeReport?: boolean;
32
- /** Additional name, value pairs to write to iModelJsNativeCrash*.properties.txt file in the event of a crash. */
33
- params?: CrashReportingConfigNameValuePair[];
34
- /** Run this .js file to process .dmp and Node.js crash reporting .json files in the event of a crash.
35
- * This script will be executed with a single command-line parameter: the name of the dump or Node.js report file.
36
- * In the case of a dump file, there will be a second file with the same basename and the extension ".properties.txt".
37
- * Since it runs in a separate process, this script will have no access to the Javascript
38
- * context of the exiting backend. No default.
39
- */
40
- dumpProcessorScriptFileName?: string;
41
- /** Upload crash dump and node-reports to Bentley's crash-reporting service? Defaults to false */
42
- uploadToBentley?: boolean;
43
- }
44
- /**
45
- * Options for [[IModelHost.startup]]
46
- * @public
47
- */
48
- export interface IModelHostOptions {
49
- /**
50
- * Root of the directory holding all the files that iTwin.js caches
51
- * - If not specified at startup a platform specific default is used -
52
- * - Windows: $(HOMEDIR)/AppData/Local/iModelJs/
53
- * - Mac/iOS: $(HOMEDIR)/Library/Caches/iModelJs/
54
- * - Linux: $(HOMEDIR)/.cache/iModelJs/
55
- * where $(HOMEDIR) is documented [here](https://nodejs.org/api/os.html#os_os_homedir)
56
- * - if specified, ensure it is set to a folder with read/write access.
57
- * - Sub-folders within this folder organize various caches -
58
- * - bc/ -> Briefcases
59
- * - appSettings/ -> Offline application settings (only relevant in native applications)
60
- * - etc.
61
- * @see [[IModelHost.cacheDir]] for the value it's set to after startup
62
- */
63
- cacheDir?: LocalDirName;
64
- /** The directory where application assets are found. */
65
- appAssetsDir?: LocalDirName;
66
- /**
67
- * Options for creating the [[Workspace]]
68
- * @beta
69
- */
70
- workspace?: WorkspaceOpts;
71
- /**
72
- * The kind of iModel hub server to use.
73
- * @beta
74
- */
75
- hubAccess?: BackendHubAccess;
76
- /** The Azure blob storage credentials to use for the tile cache service. If omitted and no external service implementation is provided, a local cache will be used.
77
- * @beta
78
- */
79
- tileCacheAzureCredentials?: AzureBlobStorageCredentials;
80
- /**
81
- * @beta
82
- * @deprecated in 3.x. use tileCacheStorage
83
- */
84
- tileCacheService?: CloudStorageService;
85
- /**
86
- * @beta
87
- * @note A reference implementation is set for AzureServerStorage from @itwin/object-storage-azure if [[tileCacheAzureCredentials]] property is set. To supply a different implementation for any service provider (such as AWS),
88
- * set this property with a custom ServerStorage.
89
- */
90
- tileCacheStorage?: ServerStorage;
91
- /** The maximum size in bytes to which a local sqlite database used for caching tiles can grow before it is purged of least-recently-used tiles.
92
- * The local cache is used only if an external cache has not been configured via [[tileCacheService]], [[tileCacheStorage]], and [[tileCacheAzureCredentials]].
93
- * Defaults to 1 GB. Must be an unsigned integer. A value of zero disables the local cache entirely.
94
- * @beta
95
- */
96
- maxTileCacheDbSize?: number;
97
- /** Whether to restrict tile cache URLs by client IP address (if available).
98
- * @beta
99
- */
100
- restrictTileUrlsByClientIp?: boolean;
101
- /**
102
- * Whether to enable OpenTelemetry tracing
103
- * @beta
104
- */
105
- enableOpenTelemetry?: boolean;
106
- /** Whether to compress cached tiles.
107
- * Defaults to `true`.
108
- */
109
- compressCachedTiles?: boolean;
110
- /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileTreeProps]($common) should wait before returning a "pending" status.
111
- * @internal
112
- */
113
- tileTreeRequestTimeout?: number;
114
- /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileContent]($common) should wait before returning a "pending" status.
115
- * @internal
116
- */
117
- tileContentRequestTimeout?: number;
118
- /** The backend will log when a tile took longer to load than this threshold in seconds.
119
- * @internal
120
- */
121
- logTileLoadTimeThreshold?: number;
122
- /** The backend will log when a tile is loaded with a size in bytes above this threshold.
123
- * @internal
124
- */
125
- logTileSizeThreshold?: number;
126
- /** Crash-reporting configuration
127
- * @alpha
128
- */
129
- crashReportingConfig?: CrashReportingConfig;
130
- /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */
131
- authorizationClient?: AuthorizationClient;
132
- }
133
- /** Configuration of core-backend.
134
- * @public
135
- */
136
- export declare class IModelHostConfiguration implements IModelHostOptions {
137
- static defaultTileRequestTimeout: number;
138
- static defaultLogTileLoadTimeThreshold: number;
139
- static defaultLogTileSizeThreshold: number;
140
- /** @internal */
141
- static defaultMaxTileCacheDbSize: number;
142
- appAssetsDir?: LocalDirName;
143
- cacheDir?: LocalDirName;
144
- /** @beta */
145
- workspace?: WorkspaceOpts;
146
- /** @beta */
147
- hubAccess?: BackendHubAccess;
148
- /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */
149
- authorizationClient?: AuthorizationClient;
150
- /** @beta @deprecated in 3.x. */
151
- tileCacheService?: CloudStorageService;
152
- /** @beta */
153
- restrictTileUrlsByClientIp?: boolean;
154
- compressCachedTiles?: boolean;
155
- /** @beta */
156
- tileCacheAzureCredentials?: AzureBlobStorageCredentials;
157
- /** @internal */
158
- tileTreeRequestTimeout: number;
159
- /** @internal */
160
- tileContentRequestTimeout: number;
161
- /** @internal */
162
- logTileLoadTimeThreshold: number;
163
- /** @internal */
164
- logTileSizeThreshold: number;
165
- /** @alpha */
166
- crashReportingConfig?: CrashReportingConfig;
167
- }
168
- /** IModelHost initializes ($backend) and captures its configuration. A backend must call [[IModelHost.startup]] before using any backend classes.
169
- * See [the learning article]($docs/learning/backend/IModelHost.md)
170
- * @public
171
- */
172
- export declare class IModelHost {
173
- private constructor();
174
- /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */
175
- static authorizationClient?: AuthorizationClient;
176
- /** @alpha */
177
- static readonly telemetry: TelemetryManager;
178
- static backendVersion: string;
179
- private static _cacheDir;
180
- private static _appWorkspace?;
181
- private static _platform?;
182
- /** @internal */
183
- static get platform(): typeof IModelJsNative;
184
- static configuration?: IModelHostOptions;
185
- /** Event raised during startup to allow loading settings data */
186
- static readonly onWorkspaceStartup: BeEvent<() => void>;
187
- /** Event raised just after the backend IModelHost was started */
188
- static readonly onAfterStartup: BeEvent<() => void>;
189
- /** Event raised just before the backend IModelHost is to be shut down */
190
- static readonly onBeforeShutdown: BeEvent<() => void>;
191
- /** @internal */
192
- static readonly session: Mutable<SessionProps>;
193
- /** A uniqueId for this session */
194
- static get sessionId(): GuidString;
195
- static set sessionId(id: GuidString);
196
- /** The Id of this application - needs to be set only if it is an agent application. The applicationId will otherwise originate at the frontend. */
197
- static get applicationId(): string;
198
- static set applicationId(id: string);
199
- /** The version of this application - needs to be set if is an agent application. The applicationVersion will otherwise originate at the frontend. */
200
- static get applicationVersion(): string;
201
- static set applicationVersion(version: string);
202
- /** Root directory holding files that iTwin.js caches */
203
- static get cacheDir(): LocalDirName;
204
- /** The application [[Workspace]] for this `IModelHost`
205
- * @note this `Workspace` only holds [[WorkspaceContainer]]s and [[Settings]] scoped to the currently loaded application(s).
206
- * All organization, iTwin, and iModel based containers or settings must be accessed through [[IModelDb.workspace]] and
207
- * attempting to add them to this Workspace will fail.
208
- * @beta
209
- */
210
- static get appWorkspace(): Workspace;
211
- /** The optional [[FileNameResolver]] that resolves keys and partial file names for snapshot iModels. */
212
- static snapshotFileNameResolver?: FileNameResolver;
213
- /** Get the current access token for this IModelHost, or a blank string if none is available.
214
- * @note for web backends, this will *always* return a blank string because the backend itself has no token (but never needs one either.)
215
- * For all IpcHosts, where this backend is servicing a single frontend, this will be the user's token. For ElectronHost, the backend
216
- * obtains the token and forwards it to the frontend.
217
- * @note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value
218
- * returned by this method may change over time throughout the course of a session.
219
- */
220
- static getAccessToken(): Promise<AccessToken>;
221
- /** @internal */
222
- static flushLog(): void;
223
- /** @internal */
224
- static loadNative(): void;
225
- private static syncNativeLogLevels;
226
- private static registerPlatform;
227
- /**
228
- * @internal
229
- * @deprecated in 3.x.
230
- * @note Use [[IModelHostOptions.tileCacheService]] to set the service provider.
231
- */
232
- static tileCacheService?: CloudStorageService;
233
- /** @internal */
234
- static tileStorage?: TileStorage;
235
- /**
236
- * @internal
237
- * @deprecated in 3.x.
238
- */
239
- static tileUploader?: CloudStorageTileUploader;
240
- private static _hubAccess?;
241
- /** @internal */
242
- static setHubAccess(hubAccess: BackendHubAccess | undefined): void;
243
- /** get the current hubAccess, if present.
244
- * @beta
245
- */
246
- static getHubAccess(): BackendHubAccess | undefined;
247
- /** Provides access to the IModelHub for this IModelHost
248
- * @beta
249
- * @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.
250
- * To determine whether one is present, use [[getHubAccess]].
251
- */
252
- static get hubAccess(): BackendHubAccess;
253
- private static initializeWorkspace;
254
- private static _isValid;
255
- /** Returns true if IModelHost is started. */
256
- static get isValid(): boolean;
257
- /** This method must be called before any iTwin.js services are used.
258
- * @param options Host configuration data.
259
- * Raises [[onAfterStartup]].
260
- * @see [[shutdown]].
261
- */
262
- static startup(options?: IModelHostOptions): Promise<void>;
263
- private static _briefcaseCacheDir;
264
- private static logStartup;
265
- private static setupHostDirs;
266
- /** This method must be called when an iTwin.js host is shut down. Raises [[onBeforeShutdown]] */
267
- static shutdown(): Promise<void>;
268
- /**
269
- * Add or update a property that should be included in a crash report.
270
- * @param name The name of the property
271
- * @param value The value of the property
272
- * @alpha
273
- */
274
- static setCrashReportProperty(name: string, value: string): void;
275
- /**
276
- * Remove a previously defined property so that will not be included in a crash report.
277
- * @param name The name of the property
278
- * @alpha
279
- */
280
- static removeCrashReportProperty(name: string): void;
281
- /**
282
- * Get all properties that will be included in a crash report.
283
- * @alpha
284
- */
285
- static getCrashReportProperties(): CrashReportingConfigNameValuePair[];
286
- /** The directory where application assets may be found */
287
- static get appAssetsDir(): string | undefined;
288
- /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileTreeProps should wait before returning a "pending" status.
289
- * @internal
290
- */
291
- static get tileTreeRequestTimeout(): number;
292
- /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileContent should wait before returning a "pending" status.
293
- * @internal
294
- */
295
- static get tileContentRequestTimeout(): number;
296
- /** The backend will log when a tile took longer to load than this threshold in seconds. */
297
- static get logTileLoadTimeThreshold(): number;
298
- /** The backend will log when a tile is loaded with a size in bytes above this threshold. */
299
- static get logTileSizeThreshold(): number;
300
- /** Whether external tile caching is active.
301
- * @internal
302
- */
303
- static get usingExternalTileCache(): boolean;
304
- /** Whether to restrict tile cache URLs by client IP address.
305
- * @internal
306
- */
307
- static get restrictTileUrlsByClientIp(): boolean;
308
- /** Whether to compress cached tiles.
309
- * @internal
310
- */
311
- static get compressCachedTiles(): boolean;
312
- private static setupTileCache;
313
- private static setupAzureTileCache;
314
- /** @internal */
315
- static computeSchemaChecksum(arg: {
316
- schemaXmlPath: string;
317
- referencePaths: string[];
318
- exactMatch?: boolean;
319
- }): string;
320
- }
321
- /** Information about the platform on which the app is running. Also see [[KnownLocations]] and [[IModelJsFs]].
322
- * @public
323
- */
324
- export declare class Platform {
325
- /** Get the name of the platform. */
326
- static get platformName(): "win32" | "linux" | "darwin" | "ios" | "android" | "uwp";
327
- /** @internal */
328
- static load(): typeof IModelJsNative;
329
- }
330
- /** Well known directories that may be used by the application. Also see [[Platform]]
331
- * @public
332
- */
333
- export declare class KnownLocations {
334
- /** The directory where the imodeljs-native assets are stored. */
335
- static get nativeAssetsDir(): string;
336
- /** The directory where the core-backend assets are stored. */
337
- static get packageAssetsDir(): string;
338
- /** The temporary directory. */
339
- static get tmpdir(): string;
340
- }
341
- /** Extend this class to provide custom file name resolution behavior.
342
- * @note Only `tryResolveKey` and/or `tryResolveFileName` need to be overridden as the implementations of `resolveKey` and `resolveFileName` work for most purposes.
343
- * @see [[IModelHost.snapshotFileNameResolver]]
344
- * @public
345
- */
346
- export declare abstract class FileNameResolver {
347
- /** Resolve a file name from the specified key.
348
- * @param _fileKey The key that identifies the file name in a `Map` or other similar data structure.
349
- * @returns The resolved file name or `undefined` if not found.
350
- */
351
- tryResolveKey(_fileKey: string): string | undefined;
352
- /** Resolve a file name from the specified key.
353
- * @param fileKey The key that identifies the file name in a `Map` or other similar data structure.
354
- * @returns The resolved file name.
355
- * @throws [[IModelError]] if not found.
356
- */
357
- resolveKey(fileKey: string): string;
358
- /** Resolve the input file name, which may be a partial name, into a full path file name.
359
- * @param inFileName The partial file name.
360
- * @returns The resolved full path file name or `undefined` if not found.
361
- */
362
- tryResolveFileName(inFileName: string): string | undefined;
363
- /** Resolve the input file name, which may be a partial name, into a full path file name.
364
- * @param inFileName The partial file name.
365
- * @returns The resolved full path file name.
366
- * @throws [[IModelError]] if not found.
367
- */
368
- resolveFileName(inFileName: string): string;
369
- }
1
+ /** @packageDocumentation
2
+ * @module IModelHost
3
+ */
4
+ import "./IModelDb";
5
+ import { IModelJsNative } from "@bentley/imodeljs-native";
6
+ import { AccessToken, BeEvent, GuidString, Mutable } from "@itwin/core-bentley";
7
+ import { AuthorizationClient, LocalDirName, SessionProps } from "@itwin/core-common";
8
+ import { TelemetryManager } from "@itwin/core-telemetry";
9
+ import { ServerStorage } from "@itwin/object-storage-core";
10
+ import { BackendHubAccess } from "./BackendHubAccess";
11
+ import { TileStorage } from "./TileStorage";
12
+ import { Workspace, WorkspaceOpts } from "./workspace/Workspace";
13
+ /** @internal */
14
+ export interface CrashReportingConfigNameValuePair {
15
+ name: string;
16
+ value: string;
17
+ }
18
+ /** Configuration of the crash-reporting system.
19
+ * @internal
20
+ */
21
+ export interface CrashReportingConfig {
22
+ /** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. This directory will be created if it does not already exist. */
23
+ crashDir: string;
24
+ /** max # .dmp files that may exist in crashDir. The default is 50. */
25
+ maxDumpsInDir?: number;
26
+ /** Enable crash-dumps? If so, .dmp and .properties.txt files will be generated and written to crashDir in the event of an unhandled native-code exception. If not, only .properties.txt files will be written. The default is false. */
27
+ enableCrashDumps?: boolean;
28
+ /** If enableCrashDumps is true, do you want a full-memory dump? Defaults to false. */
29
+ wantFullMemoryDumps?: boolean;
30
+ /** Enable Node.js crash reporting? If so, report files will be generated in the event of an unhandled exception or fatal error and written to crashDir. The default is false. */
31
+ enableNodeReport?: boolean;
32
+ /** Additional name, value pairs to write to iModelJsNativeCrash*.properties.txt file in the event of a crash. */
33
+ params?: CrashReportingConfigNameValuePair[];
34
+ /** Run this .js file to process .dmp and Node.js crash reporting .json files in the event of a crash.
35
+ * This script will be executed with a single command-line parameter: the name of the dump or Node.js report file.
36
+ * In the case of a dump file, there will be a second file with the same basename and the extension ".properties.txt".
37
+ * Since it runs in a separate process, this script will have no access to the Javascript
38
+ * context of the exiting backend. No default.
39
+ */
40
+ dumpProcessorScriptFileName?: string;
41
+ /** Upload crash dump and node-reports to Bentley's crash-reporting service? Defaults to false */
42
+ uploadToBentley?: boolean;
43
+ }
44
+ /** @beta */
45
+ export interface AzureBlobStorageCredentials {
46
+ account: string;
47
+ accessKey: string;
48
+ baseUrl?: string;
49
+ }
50
+ /**
51
+ * Options for [[IModelHost.startup]]
52
+ * @public
53
+ */
54
+ export interface IModelHostOptions {
55
+ /**
56
+ * The name of the *Profile* subdirectory of [[cacheDir]] for this process. If not present, "default" is used.
57
+ * @see [[IModelHost.profileName]]
58
+ * @beta
59
+ */
60
+ profileName?: string;
61
+ /**
62
+ * Root of the directory holding all the files that iTwin.js caches
63
+ * - If not specified at startup a platform specific default is used -
64
+ * - Windows: $(HOMEDIR)/AppData/Local/iModelJs/
65
+ * - Mac/iOS: $(HOMEDIR)/Library/Caches/iModelJs/
66
+ * - Linux: $(HOMEDIR)/.cache/iModelJs/
67
+ * where $(HOMEDIR) is documented [here](https://nodejs.org/api/os.html#os_os_homedir)
68
+ * - if specified, ensure it is set to a folder with read/write access.
69
+ * @see [[IModelHost.cacheDir]] for the value it's set to after startup
70
+ */
71
+ cacheDir?: LocalDirName;
72
+ /** The directory where application assets are found. */
73
+ appAssetsDir?: LocalDirName;
74
+ /**
75
+ * Options for creating the [[Workspace]]
76
+ * @beta
77
+ */
78
+ workspace?: WorkspaceOpts;
79
+ /**
80
+ * The kind of iModel hub server to use.
81
+ * @internal
82
+ */
83
+ hubAccess?: BackendHubAccess;
84
+ /** The Azure blob storage credentials to use for the tile cache service. If omitted and no external service implementation is provided, a local cache will be used.
85
+ * @beta
86
+ */
87
+ tileCacheAzureCredentials?: AzureBlobStorageCredentials;
88
+ /**
89
+ * @beta
90
+ * @note A reference implementation is set for AzureServerStorage from @itwin/object-storage-azure if [[tileCacheAzureCredentials]] property is set. To supply a different implementation for any service provider (such as AWS),
91
+ * set this property with a custom ServerStorage.
92
+ */
93
+ tileCacheStorage?: ServerStorage;
94
+ /** The maximum size in bytes to which a local sqlite database used for caching tiles can grow before it is purged of least-recently-used tiles.
95
+ * The local cache is used only if an external cache has not been configured via [[tileCacheStorage]], and [[tileCacheAzureCredentials]].
96
+ * Defaults to 1 GB. Must be an unsigned integer. A value of zero disables the local cache entirely.
97
+ * @beta
98
+ */
99
+ maxTileCacheDbSize?: number;
100
+ /** Whether to restrict tile cache URLs by client IP address (if available).
101
+ * @beta
102
+ */
103
+ restrictTileUrlsByClientIp?: boolean;
104
+ /** Whether to enable OpenTelemetry tracing.
105
+ * Defaults to `false`.
106
+ */
107
+ enableOpenTelemetry?: boolean;
108
+ /** Whether to compress cached tiles.
109
+ * Defaults to `true`.
110
+ */
111
+ compressCachedTiles?: boolean;
112
+ /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileTreeProps]($common) should wait before returning a "pending" status.
113
+ * @internal
114
+ */
115
+ tileTreeRequestTimeout?: number;
116
+ /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileContent]($common) should wait before returning a "pending" status.
117
+ * @internal
118
+ */
119
+ tileContentRequestTimeout?: number;
120
+ /** The backend will log when a tile took longer to load than this threshold in seconds.
121
+ * @internal
122
+ */
123
+ logTileLoadTimeThreshold?: number;
124
+ /** The backend will log when a tile is loaded with a size in bytes above this threshold.
125
+ * @internal
126
+ */
127
+ logTileSizeThreshold?: number;
128
+ /** Crash-reporting configuration
129
+ * @internal
130
+ */
131
+ crashReportingConfig?: CrashReportingConfig;
132
+ /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */
133
+ authorizationClient?: AuthorizationClient;
134
+ }
135
+ /** Configuration of core-backend.
136
+ * @public
137
+ */
138
+ export declare class IModelHostConfiguration implements IModelHostOptions {
139
+ static defaultTileRequestTimeout: number;
140
+ static defaultLogTileLoadTimeThreshold: number;
141
+ static defaultLogTileSizeThreshold: number;
142
+ /** @internal */
143
+ static defaultMaxTileCacheDbSize: number;
144
+ appAssetsDir?: LocalDirName;
145
+ cacheDir?: LocalDirName;
146
+ /** @beta */
147
+ workspace?: WorkspaceOpts;
148
+ /** @internal */
149
+ hubAccess?: BackendHubAccess;
150
+ /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */
151
+ authorizationClient?: AuthorizationClient;
152
+ /** @beta */
153
+ restrictTileUrlsByClientIp?: boolean;
154
+ compressCachedTiles?: boolean;
155
+ /** @beta */
156
+ tileCacheAzureCredentials?: AzureBlobStorageCredentials;
157
+ /** @internal */
158
+ tileTreeRequestTimeout: number;
159
+ /** @internal */
160
+ tileContentRequestTimeout: number;
161
+ /** @internal */
162
+ logTileLoadTimeThreshold: number;
163
+ /** @internal */
164
+ logTileSizeThreshold: number;
165
+ /** @internal */
166
+ crashReportingConfig?: CrashReportingConfig;
167
+ }
168
+ /** IModelHost initializes ($backend) and captures its configuration. A backend must call [[IModelHost.startup]] before using any backend classes.
169
+ * See [the learning article]($docs/learning/backend/IModelHost.md)
170
+ * @public
171
+ */
172
+ export declare class IModelHost {
173
+ private constructor();
174
+ /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */
175
+ static authorizationClient?: AuthorizationClient;
176
+ /** @alpha */
177
+ static readonly telemetry: TelemetryManager;
178
+ static backendVersion: string;
179
+ private static _profileName;
180
+ private static _cacheDir;
181
+ private static _appWorkspace?;
182
+ private static _platform?;
183
+ /** @internal */
184
+ static get platform(): typeof IModelJsNative;
185
+ static configuration?: IModelHostOptions;
186
+ /**
187
+ * The name of the *Profile* directory (a subdirectory of "[[cacheDir]]/profiles/") for this process.
188
+ *
189
+ * The *Profile* directory is used to cache data that is specific to a type-of-usage of the iTwin.js library.
190
+ * It is important that information in the profile cache be consistent but isolated across sessions (i.e.
191
+ * data for a profile is maintained between runs, but each profile is completely independent and
192
+ * unaffected by the presence ot use of others.)
193
+ * @note **Only one process at a time may be using a given profile**, and an exception will be thrown by [[startup]]
194
+ * if a second process attempts to use the same profile.
195
+ * @beta
196
+ */
197
+ static get profileName(): string;
198
+ /** The full path of the Profile directory.
199
+ * @see [[profileName]]
200
+ * @beta
201
+ */
202
+ static get profileDir(): LocalDirName;
203
+ /** Event raised during startup to allow loading settings data */
204
+ static readonly onWorkspaceStartup: BeEvent<() => void>;
205
+ /** Event raised just after the backend IModelHost was started */
206
+ static readonly onAfterStartup: BeEvent<() => void>;
207
+ /** Event raised just before the backend IModelHost is to be shut down */
208
+ static readonly onBeforeShutdown: BeEvent<() => void>;
209
+ /** @internal */
210
+ static readonly session: Mutable<SessionProps>;
211
+ /** A uniqueId for this session */
212
+ static get sessionId(): GuidString;
213
+ static set sessionId(id: GuidString);
214
+ /** The Id of this application - needs to be set only if it is an agent application. The applicationId will otherwise originate at the frontend. */
215
+ static get applicationId(): string;
216
+ static set applicationId(id: string);
217
+ /** The version of this application - needs to be set if is an agent application. The applicationVersion will otherwise originate at the frontend. */
218
+ static get applicationVersion(): string;
219
+ static set applicationVersion(version: string);
220
+ /** A string that can identify the current user to other users when collaborating. */
221
+ static userMoniker: string;
222
+ /** Root directory holding files that iTwin.js caches */
223
+ static get cacheDir(): LocalDirName;
224
+ /** The application [[Workspace]] for this `IModelHost`
225
+ * @note this `Workspace` only holds [[WorkspaceContainer]]s and [[Settings]] scoped to the currently loaded application(s).
226
+ * All organization, iTwin, and iModel based containers or settings must be accessed through [[IModelDb.workspace]] and
227
+ * attempting to add them to this Workspace will fail.
228
+ * @beta
229
+ */
230
+ static get appWorkspace(): Workspace;
231
+ /** The optional [[FileNameResolver]] that resolves keys and partial file names for snapshot iModels. */
232
+ static snapshotFileNameResolver?: FileNameResolver;
233
+ /** Get the current access token for this IModelHost, or a blank string if none is available.
234
+ * @note for web backends, this will *always* return a blank string because the backend itself has no token (but never needs one either.)
235
+ * For all IpcHosts, where this backend is servicing a single frontend, this will be the user's token. For ElectronHost, the backend
236
+ * obtains the token and forwards it to the frontend.
237
+ * @note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value
238
+ * returned by this method may change over time throughout the course of a session.
239
+ */
240
+ static getAccessToken(): Promise<AccessToken>;
241
+ /** @internal */
242
+ static flushLog(): void;
243
+ private static syncNativeLogLevels;
244
+ private static loadNative;
245
+ /** @internal */
246
+ static tileStorage?: TileStorage;
247
+ private static _hubAccess?;
248
+ /** @internal */
249
+ static setHubAccess(hubAccess: BackendHubAccess | undefined): void;
250
+ /** get the current hubAccess, if present.
251
+ * @internal
252
+ */
253
+ static getHubAccess(): BackendHubAccess | undefined;
254
+ /** Provides access to the IModelHub for this IModelHost
255
+ * @internal
256
+ * @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.
257
+ * To determine whether one is present, use [[getHubAccess]].
258
+ */
259
+ static get hubAccess(): BackendHubAccess;
260
+ private static initializeWorkspace;
261
+ private static _isValid;
262
+ /** true between a successful call to [[startup]] and before [[shutdown]] */
263
+ static get isValid(): boolean;
264
+ /** This method must be called before any iTwin.js services are used.
265
+ * @param options Host configuration data.
266
+ * Raises [[onAfterStartup]].
267
+ * @see [[shutdown]].
268
+ */
269
+ static startup(options?: IModelHostOptions): Promise<void>;
270
+ private static setupCacheDir;
271
+ /** This method must be called when an iTwin.js host is shut down. Raises [[onBeforeShutdown]] */
272
+ static shutdown(): Promise<void>;
273
+ private static doShutdown;
274
+ /**
275
+ * Add or update a property that should be included in a crash report.
276
+ * @internal
277
+ */
278
+ static setCrashReportProperty(name: string, value: string): void;
279
+ /**
280
+ * Remove a previously defined property so that will not be included in a crash report.
281
+ * @internal
282
+ */
283
+ static removeCrashReportProperty(name: string): void;
284
+ /**
285
+ * Get all properties that will be included in a crash report.
286
+ * @internal
287
+ */
288
+ static getCrashReportProperties(): CrashReportingConfigNameValuePair[];
289
+ /** The directory where application assets may be found */
290
+ static get appAssetsDir(): string | undefined;
291
+ /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileTreeProps should wait before returning a "pending" status.
292
+ * @internal
293
+ */
294
+ static get tileTreeRequestTimeout(): number;
295
+ /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileContent should wait before returning a "pending" status.
296
+ * @internal
297
+ */
298
+ static get tileContentRequestTimeout(): number;
299
+ /** The backend will log when a tile took longer to load than this threshold in seconds. */
300
+ static get logTileLoadTimeThreshold(): number;
301
+ /** The backend will log when a tile is loaded with a size in bytes above this threshold. */
302
+ static get logTileSizeThreshold(): number;
303
+ /** Whether external tile caching is active.
304
+ * @internal
305
+ */
306
+ static get usingExternalTileCache(): boolean;
307
+ /** Whether to restrict tile cache URLs by client IP address.
308
+ * @internal
309
+ */
310
+ static get restrictTileUrlsByClientIp(): boolean;
311
+ /** Whether to compress cached tiles.
312
+ * @internal
313
+ */
314
+ static get compressCachedTiles(): boolean;
315
+ private static setupTileCache;
316
+ private static setupAzureTileCache;
317
+ /** @internal */
318
+ static computeSchemaChecksum(arg: {
319
+ schemaXmlPath: string;
320
+ referencePaths: string[];
321
+ exactMatch?: boolean;
322
+ }): string;
323
+ }
324
+ /** Information about the platform on which the app is running.
325
+ * @public
326
+ */
327
+ export declare class Platform {
328
+ /** Get the name of the platform. */
329
+ static get platformName(): "win32" | "linux" | "darwin" | "ios" | "android" | "uwp";
330
+ }
331
+ /** Well known directories that may be used by the application.
332
+ * @public
333
+ */
334
+ export declare class KnownLocations {
335
+ /** The directory where the imodeljs-native assets are stored. */
336
+ static get nativeAssetsDir(): LocalDirName;
337
+ /** The directory where the core-backend assets are stored. */
338
+ static get packageAssetsDir(): LocalDirName;
339
+ /** The temporary directory. */
340
+ static get tmpdir(): LocalDirName;
341
+ }
342
+ /** Extend this class to provide custom file name resolution behavior.
343
+ * @note Only `tryResolveKey` and/or `tryResolveFileName` need to be overridden as the implementations of `resolveKey` and `resolveFileName` work for most purposes.
344
+ * @see [[IModelHost.snapshotFileNameResolver]]
345
+ * @public
346
+ */
347
+ export declare abstract class FileNameResolver {
348
+ /** Resolve a file name from the specified key.
349
+ * @param _fileKey The key that identifies the file name in a `Map` or other similar data structure.
350
+ * @returns The resolved file name or `undefined` if not found.
351
+ */
352
+ tryResolveKey(_fileKey: string): string | undefined;
353
+ /** Resolve a file name from the specified key.
354
+ * @param fileKey The key that identifies the file name in a `Map` or other similar data structure.
355
+ * @returns The resolved file name.
356
+ * @throws [[IModelError]] if not found.
357
+ */
358
+ resolveKey(fileKey: string): string;
359
+ /** Resolve the input file name, which may be a partial name, into a full path file name.
360
+ * @param inFileName The partial file name.
361
+ * @returns The resolved full path file name or `undefined` if not found.
362
+ */
363
+ tryResolveFileName(inFileName: string): string | undefined;
364
+ /** Resolve the input file name, which may be a partial name, into a full path file name.
365
+ * @param inFileName The partial file name.
366
+ * @returns The resolved full path file name.
367
+ * @throws [[IModelError]] if not found.
368
+ */
369
+ resolveFileName(inFileName: string): string;
370
+ }
370
371
  //# sourceMappingURL=IModelHost.d.ts.map