@itwin/presentation-backend 5.0.0-dev.10 → 5.0.0-dev.102

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 (148) hide show
  1. package/CHANGELOG.md +56 -1
  2. package/lib/cjs/package.json +1 -0
  3. package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts +31 -4
  4. package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts.map +1 -1
  5. package/lib/cjs/presentation-backend/ElementPropertiesHelper.js +161 -56
  6. package/lib/cjs/presentation-backend/ElementPropertiesHelper.js.map +1 -1
  7. package/lib/cjs/presentation-backend/InternalSymbols.d.ts +5 -0
  8. package/lib/cjs/presentation-backend/InternalSymbols.d.ts.map +1 -0
  9. package/lib/cjs/presentation-backend/InternalSymbols.js +16 -0
  10. package/lib/cjs/presentation-backend/InternalSymbols.js.map +1 -0
  11. package/lib/cjs/presentation-backend/NativePlatform.d.ts +2 -2
  12. package/lib/cjs/presentation-backend/NativePlatform.d.ts.map +1 -1
  13. package/lib/cjs/presentation-backend/NativePlatform.js +5 -3
  14. package/lib/cjs/presentation-backend/NativePlatform.js.map +1 -1
  15. package/lib/cjs/presentation-backend/Presentation.d.ts +2 -7
  16. package/lib/cjs/presentation-backend/Presentation.d.ts.map +1 -1
  17. package/lib/cjs/presentation-backend/Presentation.js +40 -29
  18. package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
  19. package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts +3 -3
  20. package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts.map +1 -1
  21. package/lib/cjs/presentation-backend/PresentationIpcHandler.js +5 -7
  22. package/lib/cjs/presentation-backend/PresentationIpcHandler.js.map +1 -1
  23. package/lib/cjs/presentation-backend/PresentationManager.d.ts +13 -90
  24. package/lib/cjs/presentation-backend/PresentationManager.d.ts.map +1 -1
  25. package/lib/cjs/presentation-backend/PresentationManager.js +79 -130
  26. package/lib/cjs/presentation-backend/PresentationManager.js.map +1 -1
  27. package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts +19 -10
  28. package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts.map +1 -1
  29. package/lib/cjs/presentation-backend/PresentationManagerDetail.js +83 -76
  30. package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
  31. package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts +11 -11
  32. package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts.map +1 -1
  33. package/lib/cjs/presentation-backend/PresentationRpcImpl.js +110 -118
  34. package/lib/cjs/presentation-backend/PresentationRpcImpl.js.map +1 -1
  35. package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
  36. package/lib/cjs/presentation-backend/RulesetEmbedder.js +23 -24
  37. package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
  38. package/lib/cjs/presentation-backend/RulesetManager.d.ts +1 -1
  39. package/lib/cjs/presentation-backend/RulesetManager.d.ts.map +1 -1
  40. package/lib/cjs/presentation-backend/RulesetManager.js +2 -1
  41. package/lib/cjs/presentation-backend/RulesetManager.js.map +1 -1
  42. package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts +1 -1
  43. package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts.map +1 -1
  44. package/lib/cjs/presentation-backend/RulesetVariablesManager.js +2 -0
  45. package/lib/cjs/presentation-backend/RulesetVariablesManager.js.map +1 -1
  46. package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts +2 -4
  47. package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts.map +1 -1
  48. package/lib/cjs/presentation-backend/SelectionScopesHelper.js +70 -83
  49. package/lib/cjs/presentation-backend/SelectionScopesHelper.js.map +1 -1
  50. package/lib/cjs/presentation-backend/TemporaryStorage.d.ts +2 -3
  51. package/lib/cjs/presentation-backend/TemporaryStorage.d.ts.map +1 -1
  52. package/lib/cjs/presentation-backend/TemporaryStorage.js +30 -28
  53. package/lib/cjs/presentation-backend/TemporaryStorage.js.map +1 -1
  54. package/lib/cjs/presentation-backend/Utils.d.ts.map +1 -1
  55. package/lib/cjs/presentation-backend/Utils.js +15 -21
  56. package/lib/cjs/presentation-backend/Utils.js.map +1 -1
  57. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js +2 -2
  58. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js.map +1 -1
  59. package/lib/cjs/presentation-backend/domain/RulesetElements.js +4 -4
  60. package/lib/cjs/presentation-backend/domain/RulesetElements.js.map +1 -1
  61. package/lib/cjs/presentation-backend-internal.d.ts +2 -0
  62. package/lib/cjs/presentation-backend-internal.d.ts.map +1 -0
  63. package/lib/cjs/presentation-backend-internal.js +12 -0
  64. package/lib/cjs/presentation-backend-internal.js.map +1 -0
  65. package/lib/cjs/presentation-backend.d.ts +7 -7
  66. package/lib/cjs/presentation-backend.d.ts.map +1 -1
  67. package/lib/cjs/presentation-backend.js +11 -21
  68. package/lib/cjs/presentation-backend.js.map +1 -1
  69. package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts +62 -0
  70. package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts.map +1 -0
  71. package/lib/esm/presentation-backend/BackendLoggerCategory.js +69 -0
  72. package/lib/esm/presentation-backend/BackendLoggerCategory.js.map +1 -0
  73. package/lib/esm/presentation-backend/ElementPropertiesHelper.d.ts +45 -0
  74. package/lib/esm/presentation-backend/ElementPropertiesHelper.d.ts.map +1 -0
  75. package/lib/esm/presentation-backend/ElementPropertiesHelper.js +187 -0
  76. package/lib/esm/presentation-backend/ElementPropertiesHelper.js.map +1 -0
  77. package/lib/esm/presentation-backend/InternalSymbols.d.ts +5 -0
  78. package/lib/esm/presentation-backend/InternalSymbols.d.ts.map +1 -0
  79. package/lib/esm/presentation-backend/InternalSymbols.js +13 -0
  80. package/lib/esm/presentation-backend/InternalSymbols.js.map +1 -0
  81. package/lib/esm/presentation-backend/NativePlatform.d.ts +89 -0
  82. package/lib/esm/presentation-backend/NativePlatform.d.ts.map +1 -0
  83. package/lib/esm/presentation-backend/NativePlatform.js +156 -0
  84. package/lib/esm/presentation-backend/NativePlatform.js.map +1 -0
  85. package/lib/esm/presentation-backend/Presentation.d.ts +97 -0
  86. package/lib/esm/presentation-backend/Presentation.d.ts.map +1 -0
  87. package/lib/esm/presentation-backend/Presentation.js +147 -0
  88. package/lib/esm/presentation-backend/Presentation.js.map +1 -0
  89. package/lib/esm/presentation-backend/PresentationIpcHandler.d.ts +12 -0
  90. package/lib/esm/presentation-backend/PresentationIpcHandler.d.ts.map +1 -0
  91. package/lib/esm/presentation-backend/PresentationIpcHandler.js +25 -0
  92. package/lib/esm/presentation-backend/PresentationIpcHandler.js.map +1 -0
  93. package/lib/esm/presentation-backend/PresentationManager.d.ts +387 -0
  94. package/lib/esm/presentation-backend/PresentationManager.d.ts.map +1 -0
  95. package/lib/esm/presentation-backend/PresentationManager.js +352 -0
  96. package/lib/esm/presentation-backend/PresentationManager.js.map +1 -0
  97. package/lib/esm/presentation-backend/PresentationManagerDetail.d.ts +74 -0
  98. package/lib/esm/presentation-backend/PresentationManagerDetail.d.ts.map +1 -0
  99. package/lib/esm/presentation-backend/PresentationManagerDetail.js +446 -0
  100. package/lib/esm/presentation-backend/PresentationManagerDetail.js.map +1 -0
  101. package/lib/esm/presentation-backend/PresentationRpcImpl.d.ts +63 -0
  102. package/lib/esm/presentation-backend/PresentationRpcImpl.d.ts.map +1 -0
  103. package/lib/esm/presentation-backend/PresentationRpcImpl.js +409 -0
  104. package/lib/esm/presentation-backend/PresentationRpcImpl.js.map +1 -0
  105. package/lib/esm/presentation-backend/RulesetEmbedder.d.ts +109 -0
  106. package/lib/esm/presentation-backend/RulesetEmbedder.d.ts.map +1 -0
  107. package/lib/esm/presentation-backend/RulesetEmbedder.js +269 -0
  108. package/lib/esm/presentation-backend/RulesetEmbedder.js.map +1 -0
  109. package/lib/esm/presentation-backend/RulesetManager.d.ts +54 -0
  110. package/lib/esm/presentation-backend/RulesetManager.d.ts.map +1 -0
  111. package/lib/esm/presentation-backend/RulesetManager.js +74 -0
  112. package/lib/esm/presentation-backend/RulesetManager.js.map +1 -0
  113. package/lib/esm/presentation-backend/RulesetVariablesManager.d.ts +141 -0
  114. package/lib/esm/presentation-backend/RulesetVariablesManager.d.ts.map +1 -0
  115. package/lib/esm/presentation-backend/RulesetVariablesManager.js +140 -0
  116. package/lib/esm/presentation-backend/RulesetVariablesManager.js.map +1 -0
  117. package/lib/esm/presentation-backend/SelectionScopesHelper.d.ts +27 -0
  118. package/lib/esm/presentation-backend/SelectionScopesHelper.d.ts.map +1 -0
  119. package/lib/esm/presentation-backend/SelectionScopesHelper.js +227 -0
  120. package/lib/esm/presentation-backend/SelectionScopesHelper.js.map +1 -0
  121. package/lib/esm/presentation-backend/TemporaryStorage.d.ts +123 -0
  122. package/lib/esm/presentation-backend/TemporaryStorage.d.ts.map +1 -0
  123. package/lib/esm/presentation-backend/TemporaryStorage.js +157 -0
  124. package/lib/esm/presentation-backend/TemporaryStorage.js.map +1 -0
  125. package/lib/esm/presentation-backend/Utils.d.ts +50 -0
  126. package/lib/esm/presentation-backend/Utils.d.ts.map +1 -0
  127. package/lib/esm/presentation-backend/Utils.js +101 -0
  128. package/lib/esm/presentation-backend/Utils.js.map +1 -0
  129. package/lib/esm/presentation-backend/domain/PresentationRulesDomain.d.ts +17 -0
  130. package/lib/esm/presentation-backend/domain/PresentationRulesDomain.d.ts.map +1 -0
  131. package/lib/esm/presentation-backend/domain/PresentationRulesDomain.js +31 -0
  132. package/lib/esm/presentation-backend/domain/PresentationRulesDomain.js.map +1 -0
  133. package/lib/esm/presentation-backend/domain/RulesetElements.d.ts +22 -0
  134. package/lib/esm/presentation-backend/domain/RulesetElements.d.ts.map +1 -0
  135. package/lib/esm/presentation-backend/domain/RulesetElements.js +38 -0
  136. package/lib/esm/presentation-backend/domain/RulesetElements.js.map +1 -0
  137. package/lib/esm/presentation-backend/primary-presentation-rules/ElementProperties.PresentationRuleSet.json +14 -0
  138. package/lib/esm/presentation-backend/supplemental-presentation-rules/BisCore.PresentationRuleSet.json +701 -0
  139. package/lib/esm/presentation-backend/supplemental-presentation-rules/Functional.PresentationRuleSet.json +139 -0
  140. package/lib/esm/presentation-backend-internal.d.ts +2 -0
  141. package/lib/esm/presentation-backend-internal.d.ts.map +1 -0
  142. package/lib/esm/presentation-backend-internal.js +8 -0
  143. package/lib/esm/presentation-backend-internal.js.map +1 -0
  144. package/lib/esm/presentation-backend.d.ts +20 -0
  145. package/lib/esm/presentation-backend.d.ts.map +1 -0
  146. package/lib/esm/presentation-backend.js +21 -0
  147. package/lib/esm/presentation-backend.js.map +1 -0
  148. package/package.json +42 -35
@@ -0,0 +1,387 @@
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { IModelDb } from "@itwin/core-backend";
5
+ import { BeEvent } from "@itwin/core-bentley";
6
+ import { UnitSystemKey } from "@itwin/core-quantity";
7
+ import { SchemaContext } from "@itwin/ecschema-metadata";
8
+ import { UnitSystemFormat as CommonUnitSystemFormat, ComputeSelectionRequestOptions, Content, ContentDescriptorRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, FormatsMap, HierarchyCompareInfo, HierarchyCompareOptions, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, InstanceKey, Item, KeySet, LabelDefinition, MultiElementPropertiesRequestOptions, Node, NodeKey, NodePathElement, Paged, PagedResponse, Prioritized, Ruleset, RulesetVariable, SelectClassInfo, SelectionScope, SelectionScopeRequestOptions, SingleElementPropertiesRequestOptions, WithCancelEvent } from "@itwin/presentation-common";
9
+ import { PresentationManagerDetail } from "./PresentationManagerDetail.js";
10
+ import { RulesetManager } from "./RulesetManager.js";
11
+ import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
12
+ import { BackendDiagnosticsAttribute, BackendDiagnosticsOptions } from "./Utils.js";
13
+ import { _presentation_manager_detail } from "./InternalSymbols.js";
14
+ /**
15
+ * Presentation hierarchy cache mode.
16
+ * @public
17
+ */
18
+ export declare enum HierarchyCacheMode {
19
+ /**
20
+ * Hierarchy cache is created in memory.
21
+ */
22
+ Memory = "memory",
23
+ /**
24
+ * Hierarchy cache is created on disk. In this mode hierarchy cache is persisted between iModel
25
+ * openings.
26
+ */
27
+ Disk = "disk",
28
+ /**
29
+ * Hierarchy cache is created on disk. In this mode everything is cached in memory while creating hierarchy level
30
+ * and persisted in disk cache when whole hierarchy level is created.
31
+ *
32
+ * **Note:** This mode is still experimental.
33
+ */
34
+ Hybrid = "hybrid"
35
+ }
36
+ /**
37
+ * Configuration for hierarchy cache.
38
+ * @public
39
+ */
40
+ export type HierarchyCacheConfig = MemoryHierarchyCacheConfig | DiskHierarchyCacheConfig | HybridCacheConfig;
41
+ /**
42
+ * Base interface for all [[HierarchyCacheConfig]] implementations.
43
+ * @public
44
+ */
45
+ export interface HierarchyCacheConfigBase {
46
+ mode: HierarchyCacheMode;
47
+ }
48
+ /**
49
+ * Configuration for in-memory hierarchy cache.
50
+ *
51
+ * @see [Memory cache documentation page]($docs/presentation/advanced/Caching.md#memory-cache)
52
+ * @public
53
+ */
54
+ export interface MemoryHierarchyCacheConfig extends HierarchyCacheConfigBase {
55
+ mode: HierarchyCacheMode.Memory;
56
+ }
57
+ /**
58
+ * Configuration for persistent disk hierarchy cache.
59
+ *
60
+ * @see [Disk cache documentation page]($docs/presentation/advanced/Caching.md#disk-cache)
61
+ * @public
62
+ */
63
+ export interface DiskHierarchyCacheConfig extends HierarchyCacheConfigBase {
64
+ mode: HierarchyCacheMode.Disk;
65
+ /**
66
+ * A directory for hierarchy caches. If set, the directory must exist. Relative paths start from `process.cwd()`.
67
+ *
68
+ * The default directory depends on the iModel and the way it's opened.
69
+ */
70
+ directory?: string;
71
+ /**
72
+ * While the cache itself is stored on a disk, there's still a required small in-memory cache.
73
+ * The parameter allows controlling size of that cache. Defaults to `32768000` bytes (32 MB).
74
+ */
75
+ memoryCacheSize?: number;
76
+ }
77
+ /**
78
+ * Configuration for the experimental hybrid hierarchy cache.
79
+ *
80
+ * Hybrid cache uses a combination of in-memory and disk caches, which should make it a better
81
+ * alternative for cases when there are lots of simultaneous requests.
82
+ *
83
+ * @see [Hybrid cache documentation page]($docs/presentation/advanced/Caching.md#hybrid-cache)
84
+ * @public
85
+ */
86
+ export interface HybridCacheConfig extends HierarchyCacheConfigBase {
87
+ mode: HierarchyCacheMode.Hybrid;
88
+ /** Configuration for disk cache used to persist hierarchies. */
89
+ disk?: DiskHierarchyCacheConfig;
90
+ }
91
+ /**
92
+ * Configuration for content cache.
93
+ *
94
+ * @see [Content cache documentation page]($docs/presentation/advanced/Caching.md#content-cache)
95
+ * @public
96
+ */
97
+ export interface ContentCacheConfig {
98
+ /**
99
+ * Maximum number of content descriptors cached in memory for quicker paged content requests.
100
+ *
101
+ * Defaults to `100`.
102
+ */
103
+ size?: number;
104
+ }
105
+ /**
106
+ * Caching configuration options for [[PresentationManager]].
107
+ * @public
108
+ */
109
+ export interface PresentationManagerCachingConfig {
110
+ /**
111
+ * Hierarchies-related caching options.
112
+ *
113
+ * @see [Hierarchies cache documentation page]($docs/presentation/advanced/Caching.md#hierarchies-cache)
114
+ */
115
+ hierarchies?: HierarchyCacheConfig;
116
+ /**
117
+ * Content-related caching options.
118
+ *
119
+ * @see [Content cache documentation page]($docs/presentation/advanced/Caching.md#content-cache)
120
+ */
121
+ content?: ContentCacheConfig;
122
+ /**
123
+ * Each worker thread (see [[workerThreadsCount]]) opens a connection to an iModel used for a request. This
124
+ * means there could be `{workerThreadsCount} * {iModels count}` number of connections. Each connection
125
+ * uses a memory cache to increase iModel read performance. This parameter allows controlling the size of that
126
+ * cache. Defaults to `32768000` bytes (32 MB).
127
+ *
128
+ * @see [Worker connections cache documentation page]($docs/presentation/advanced/Caching.md#worker-connections-cache)
129
+ */
130
+ workerConnectionCacheSize?: number;
131
+ }
132
+ /**
133
+ * A data structure that associates unit systems with a format. The associations are used for
134
+ * assigning default unit formats for specific phenomenons (see [[PresentationManagerProps.defaultFormats]]).
135
+ *
136
+ * @public
137
+ * @deprecated in 4.3. The type has been moved to `@itwin/presentation-common` package.
138
+ */
139
+ export type UnitSystemFormat = CommonUnitSystemFormat;
140
+ /**
141
+ * Data structure for multiple element properties request response.
142
+ * @public
143
+ */
144
+ export interface MultiElementPropertiesResponse<TParsedContent = ElementProperties> {
145
+ total: number;
146
+ iterator: () => AsyncGenerator<TParsedContent[]>;
147
+ }
148
+ /**
149
+ * Configuration options for supplying asset paths to [[PresentationManager]].
150
+ * @public
151
+ */
152
+ export interface PresentationAssetsRootConfig {
153
+ /**
154
+ * Path to `presentation-backend` assets. Relative paths start from `process.cwd()`.
155
+ */
156
+ backend: string;
157
+ }
158
+ /**
159
+ * Properties that can be used to configure [[PresentationManager]]
160
+ * @public
161
+ */
162
+ export interface PresentationManagerProps {
163
+ /**
164
+ * Path overrides for presentation backend assets. Need to be overriden by application if it puts these assets someplace else than the default.
165
+ *
166
+ * By default the path to assets directory is determined during the call of [[Presentation.initialize]] using this algorithm:
167
+ *
168
+ * - if path of `.js` file that contains [[PresentationManager]] definition contains "presentation-backend", assume the package is in `node_modules` and the directory structure is:
169
+ * - `assets/*\*\/*`
170
+ * - `presentation-backend/{presentation-backend source files}`
171
+ *
172
+ * which means the assets can be found through a relative path `../assets/` from the JS file being executed.
173
+ *
174
+ * - else, assume the backend is webpacked into a single file with assets next to it:
175
+ * - `assets/*\*\/*`
176
+ * - `{source file being executed}.js`
177
+ *
178
+ * which means the assets can be found through a relative path `./assets/` from the `{source file being executed}`.
179
+ *
180
+ * @deprecated in 4.2. This attribute is not used anymore - the package is not using private assets anymore.
181
+ */
182
+ presentationAssetsRoot?: string | PresentationAssetsRootConfig;
183
+ /**
184
+ * A list of directories containing application's presentation rulesets. Relative
185
+ * paths start from `process.cwd()`. The directories are traversed recursively.
186
+ *
187
+ * @note Only files with `.PresentationRuleSet.json` are read.
188
+ */
189
+ rulesetDirectories?: string[];
190
+ /**
191
+ * A list of directories containing application's supplemental presentation rulesets. Relative
192
+ * paths start from `process.cwd()`. The directories are traversed recursively.
193
+ *
194
+ * @note Only files with `.PresentationRuleSet.json` are read.
195
+ */
196
+ supplementalRulesetDirectories?: string[];
197
+ /**
198
+ * Sets the active unit system to use for formatting property values with
199
+ * units. Default presentation units are used if this is not specified. The active unit
200
+ * system can later be changed through [[PresentationManager.activeUnitSystem]] or overriden for each request
201
+ * through request options.
202
+ */
203
+ defaultUnitSystem?: UnitSystemKey;
204
+ /**
205
+ * A map of default unit formats to use for formatting properties that don't have a presentation format
206
+ * in requested unit system.
207
+ */
208
+ defaultFormats?: FormatsMap;
209
+ /**
210
+ * A number of worker threads to use for handling presentation requests. Defaults to `2`.
211
+ */
212
+ workerThreadsCount?: number;
213
+ /**
214
+ * The interval (in milliseconds) used to poll for presentation data changes. If not set, presentation
215
+ * data changes are not tracked at all.
216
+ *
217
+ * @beta
218
+ * @deprecated in 4.4. The manager now always tracks for iModel data changes without polling.
219
+ */
220
+ updatesPollInterval?: number;
221
+ /** Options for caching. */
222
+ caching?: PresentationManagerCachingConfig;
223
+ /**
224
+ * Use [SQLite's Memory-Mapped I/O](https://sqlite.org/mmap.html) for worker connections. This mode improves performance of handling
225
+ * requests with high I/O intensity, e.g. filtering large tables on non-indexed columns. No downsides have been noticed.
226
+ *
227
+ * Set to a falsy value to turn off. `true` for memory-mapping the whole iModel. Number value for memory-mapping the specified amount of bytes.
228
+ */
229
+ useMmap?: boolean | number;
230
+ /**
231
+ * Localization function to localize data returned by presentation manager when it's used directly on the backend (as opposed to when used through RPC, where
232
+ * data is localized on the frontend). Defaults to English localization.
233
+ *
234
+ * @see [Localization]($docs/presentation/advanced/Localization)
235
+ */
236
+ getLocalizedString?: (key: string) => string;
237
+ /**
238
+ * Callback that provides [SchemaContext]($ecschema-metadata) for supplied [IModelDb]($core-backend).
239
+ * [SchemaContext]($ecschema-metadata) is used for getting metadata required for values formatting.
240
+ */
241
+ schemaContextProvider?: (imodel: IModelDb) => SchemaContext;
242
+ /**
243
+ * Parameters for gathering diagnostics at the manager level. When supplied, they're used with every request
244
+ * made through the manager.
245
+ *
246
+ * @see [Diagnostics documentation page]($docs/presentation/advanced/Diagnostics.md)
247
+ */
248
+ diagnostics?: BackendDiagnosticsOptions;
249
+ }
250
+ /**
251
+ * Backend Presentation manager which pulls the presentation data from
252
+ * an iModel using native platform.
253
+ *
254
+ * @public
255
+ */
256
+ export declare class PresentationManager {
257
+ private _props;
258
+ private _detail;
259
+ private _localizationHelper;
260
+ /**
261
+ * Creates an instance of PresentationManager.
262
+ * @param props Optional configuration properties.
263
+ */
264
+ constructor(props?: PresentationManagerProps);
265
+ /** Get / set active unit system used to format property values with units */
266
+ get activeUnitSystem(): UnitSystemKey | undefined;
267
+ set activeUnitSystem(value: UnitSystemKey | undefined);
268
+ /** Dispose the presentation manager. Must be called to clean up native resources. */
269
+ [Symbol.dispose](): void;
270
+ /** @deprecated in 5.0 Use [Symbol.dispose] instead. */
271
+ dispose(): void;
272
+ /** An event, that this manager raises whenever any request is made on it. */
273
+ get onUsed(): BeEvent<() => void>;
274
+ /** Properties used to initialize the manager */
275
+ get props(): PresentationManagerProps;
276
+ /** Get rulesets manager */
277
+ rulesets(): RulesetManager;
278
+ /**
279
+ * Get ruleset variables manager for specific ruleset
280
+ * @param rulesetId Id of the ruleset to get variables manager for
281
+ */
282
+ vars(rulesetId: string): RulesetVariablesManager;
283
+ /** @internal */
284
+ get [_presentation_manager_detail](): PresentationManagerDetail;
285
+ getRulesetId(rulesetOrId: Ruleset | string): string;
286
+ /**
287
+ * Retrieves nodes
288
+ * @public
289
+ */
290
+ getNodes(requestOptions: WithCancelEvent<Prioritized<Paged<HierarchyRequestOptions<IModelDb, NodeKey, RulesetVariable>>>> & BackendDiagnosticsAttribute): Promise<Node[]>;
291
+ /**
292
+ * Retrieves nodes count
293
+ * @public
294
+ */
295
+ getNodesCount(requestOptions: WithCancelEvent<Prioritized<HierarchyRequestOptions<IModelDb, NodeKey, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<number>;
296
+ /**
297
+ * Retrieves hierarchy level descriptor
298
+ * @public
299
+ */
300
+ getNodesDescriptor(requestOptions: WithCancelEvent<Prioritized<HierarchyLevelDescriptorRequestOptions<IModelDb, NodeKey, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<Descriptor | undefined>;
301
+ /**
302
+ * Retrieves paths from root nodes to children nodes according to specified instance key paths. Intersecting paths will be merged.
303
+ * TODO: Return results in pages
304
+ * @public
305
+ */
306
+ getNodePaths(requestOptions: WithCancelEvent<Prioritized<FilterByInstancePathsHierarchyRequestOptions<IModelDb, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<NodePathElement[]>;
307
+ /**
308
+ * Retrieves paths from root nodes to nodes containing filter text in their label.
309
+ * TODO: Return results in pages
310
+ * @public
311
+ */
312
+ getFilteredNodePaths(requestOptions: WithCancelEvent<Prioritized<FilterByTextHierarchyRequestOptions<IModelDb, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<NodePathElement[]>;
313
+ /**
314
+ * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
315
+ * its related instances for loading related and navigation properties.
316
+ * @public
317
+ */
318
+ getContentSources(requestOptions: WithCancelEvent<Prioritized<ContentSourcesRequestOptions<IModelDb>>> & BackendDiagnosticsAttribute): Promise<SelectClassInfo[]>;
319
+ /**
320
+ * Retrieves the content descriptor which can be used to get content
321
+ * @public
322
+ */
323
+ getContentDescriptor(requestOptions: WithCancelEvent<Prioritized<ContentDescriptorRequestOptions<IModelDb, KeySet, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<Descriptor | undefined>;
324
+ /**
325
+ * Retrieves the content set size based on the supplied content descriptor override
326
+ * @public
327
+ */
328
+ getContentSetSize(requestOptions: WithCancelEvent<Prioritized<ContentRequestOptions<IModelDb, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<number>;
329
+ /**
330
+ * Retrieves the content set based on the supplied content descriptor.
331
+ * @public
332
+ */
333
+ getContentSet(requestOptions: WithCancelEvent<Prioritized<Paged<ContentRequestOptions<IModelDb, Descriptor, KeySet, RulesetVariable>>>> & BackendDiagnosticsAttribute): Promise<Item[]>;
334
+ /**
335
+ * Retrieves the content based on the supplied content descriptor override.
336
+ * @public
337
+ */
338
+ getContent(requestOptions: WithCancelEvent<Prioritized<Paged<ContentRequestOptions<IModelDb, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>>>> & BackendDiagnosticsAttribute): Promise<Content | undefined>;
339
+ /**
340
+ * Retrieves distinct values of specific field from the content based on the supplied content descriptor override.
341
+ * @param requestOptions Options for the request
342
+ * @return A promise object that returns either distinct values on success or an error string on error.
343
+ * @public
344
+ */
345
+ getPagedDistinctValues(requestOptions: WithCancelEvent<Prioritized<DistinctValuesRequestOptions<IModelDb, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<PagedResponse<DisplayValueGroup>>;
346
+ /**
347
+ * Retrieves property data in a simplified format for a single element specified by ID.
348
+ * @public
349
+ */
350
+ getElementProperties<TParsedContent = ElementProperties>(requestOptions: WithCancelEvent<Prioritized<SingleElementPropertiesRequestOptions<IModelDb, TParsedContent>>> & BackendDiagnosticsAttribute): Promise<TParsedContent | undefined>;
351
+ /**
352
+ * Retrieves property data in simplified format for multiple elements specified by class or all element.
353
+ * @return An object that contains element count and AsyncGenerator to iterate over properties of those elements in batches of undefined size.
354
+ * @public
355
+ */
356
+ getElementProperties<TParsedContent = ElementProperties>(requestOptions: WithCancelEvent<Prioritized<MultiElementPropertiesRequestOptions<IModelDb, TParsedContent>>> & BackendDiagnosticsAttribute): Promise<MultiElementPropertiesResponse<TParsedContent>>;
357
+ private getSingleElementProperties;
358
+ private getMultipleElementProperties;
359
+ /**
360
+ * Retrieves display label definition of specific item
361
+ * @public
362
+ */
363
+ getDisplayLabelDefinition(requestOptions: WithCancelEvent<Prioritized<DisplayLabelRequestOptions<IModelDb, InstanceKey>>> & BackendDiagnosticsAttribute): Promise<LabelDefinition>;
364
+ /**
365
+ * Retrieves display label definitions of specific items
366
+ * @public
367
+ */
368
+ getDisplayLabelDefinitions(requestOptions: WithCancelEvent<Prioritized<Paged<DisplayLabelsRequestOptions<IModelDb, InstanceKey>>>> & BackendDiagnosticsAttribute): Promise<LabelDefinition[]>;
369
+ /**
370
+ * Retrieves available selection scopes.
371
+ * @public
372
+ * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
373
+ */
374
+ getSelectionScopes(_requestOptions: SelectionScopeRequestOptions<IModelDb> & BackendDiagnosticsAttribute): Promise<SelectionScope[]>;
375
+ /**
376
+ * Computes selection based on provided element IDs and selection scope.
377
+ * @public
378
+ * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
379
+ */
380
+ computeSelection(requestOptions: ComputeSelectionRequestOptions<IModelDb> & BackendDiagnosticsAttribute): Promise<KeySet>;
381
+ /**
382
+ * Compares two hierarchies specified in the request options
383
+ * @public
384
+ */
385
+ compareHierarchies(requestOptions: HierarchyCompareOptions<IModelDb, NodeKey>): Promise<HierarchyCompareInfo>;
386
+ }
387
+ //# sourceMappingURL=PresentationManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAa,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM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