@itwin/core-backend 3.4.0-dev.48 → 3.4.0-dev.55

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