@itwin/rpcinterface-full-stack-tests 4.8.0-dev.16 → 4.8.0-dev.17

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.
@@ -27229,12 +27229,8 @@ class BeEventList {
27229
27229
  "use strict";
27230
27230
  __webpack_require__.r(__webpack_exports__);
27231
27231
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27232
- /* harmony export */ "DbChangeStage": () => (/* binding */ DbChangeStage),
27233
- /* harmony export */ "DbConflictCause": () => (/* binding */ DbConflictCause),
27234
- /* harmony export */ "DbConflictResolution": () => (/* binding */ DbConflictResolution),
27235
27232
  /* harmony export */ "DbOpcode": () => (/* binding */ DbOpcode),
27236
27233
  /* harmony export */ "DbResult": () => (/* binding */ DbResult),
27237
- /* harmony export */ "DbValueType": () => (/* binding */ DbValueType),
27238
27234
  /* harmony export */ "OpenMode": () => (/* binding */ OpenMode)
27239
27235
  /* harmony export */ });
27240
27236
  /*---------------------------------------------------------------------------------------------
@@ -27264,48 +27260,6 @@ var DbOpcode;
27264
27260
  /** Some columns of an existing row were updated. */
27265
27261
  DbOpcode[DbOpcode["Update"] = 23] = "Update";
27266
27262
  })(DbOpcode || (DbOpcode = {}));
27267
- /** Change value stage.
27268
- * @internal
27269
- */
27270
- var DbChangeStage;
27271
- (function (DbChangeStage) {
27272
- DbChangeStage[DbChangeStage["Old"] = 0] = "Old";
27273
- DbChangeStage[DbChangeStage["New"] = 1] = "New";
27274
- })(DbChangeStage || (DbChangeStage = {}));
27275
- /** Change value type.
27276
- * @internal
27277
- */
27278
- var DbValueType;
27279
- (function (DbValueType) {
27280
- DbValueType[DbValueType["IntegerVal"] = 1] = "IntegerVal";
27281
- DbValueType[DbValueType["FloatVal"] = 2] = "FloatVal";
27282
- DbValueType[DbValueType["TextVal"] = 3] = "TextVal";
27283
- DbValueType[DbValueType["BlobVal"] = 4] = "BlobVal";
27284
- DbValueType[DbValueType["NullVal"] = 5] = "NullVal";
27285
- })(DbValueType || (DbValueType = {}));
27286
- /** Cause of conflict when applying a changeset
27287
- * @internal
27288
- */
27289
- var DbConflictCause;
27290
- (function (DbConflictCause) {
27291
- DbConflictCause[DbConflictCause["Data"] = 1] = "Data";
27292
- DbConflictCause[DbConflictCause["NotFound"] = 2] = "NotFound";
27293
- DbConflictCause[DbConflictCause["Conflict"] = 3] = "Conflict";
27294
- DbConflictCause[DbConflictCause["Constraint"] = 4] = "Constraint";
27295
- DbConflictCause[DbConflictCause["ForeignKey"] = 5] = "ForeignKey";
27296
- })(DbConflictCause || (DbConflictCause = {}));
27297
- /** Conflict resolution strategy
27298
- * @internal
27299
- */
27300
- var DbConflictResolution;
27301
- (function (DbConflictResolution) {
27302
- /** Skip incoming change */
27303
- DbConflictResolution[DbConflictResolution["Skip"] = 0] = "Skip";
27304
- /** Replace local row with incoming changed row */
27305
- DbConflictResolution[DbConflictResolution["Replace"] = 1] = "Replace";
27306
- /** Abort apply changeset */
27307
- DbConflictResolution[DbConflictResolution["Abort"] = 2] = "Abort";
27308
- })(DbConflictResolution || (DbConflictResolution = {}));
27309
27263
  /** Values for return codes from BeSQLite functions. Consult SQLite documentation for further explanations.
27310
27264
  * @public
27311
27265
  */
@@ -27483,10 +27437,10 @@ __webpack_require__.r(__webpack_exports__);
27483
27437
  /* harmony export */ "IModelHubStatus": () => (/* binding */ IModelHubStatus),
27484
27438
  /* harmony export */ "IModelStatus": () => (/* binding */ IModelStatus),
27485
27439
  /* harmony export */ "RealityDataStatus": () => (/* binding */ RealityDataStatus),
27486
- /* harmony export */ "RepositoryStatus": () => (/* binding */ RepositoryStatus),
27487
27440
  /* harmony export */ "RpcInterfaceStatus": () => (/* binding */ RpcInterfaceStatus)
27488
27441
  /* harmony export */ });
27489
27442
  /* harmony import */ var _BeSQLite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BeSQLite */ "../../core/bentley/lib/esm/BeSQLite.js");
27443
+ /* harmony import */ var _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/RepositoryStatus */ "../../core/bentley/lib/esm/internal/RepositoryStatus.js");
27490
27444
  /*---------------------------------------------------------------------------------------------
27491
27445
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
27492
27446
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -27495,6 +27449,7 @@ __webpack_require__.r(__webpack_exports__);
27495
27449
  * @module Errors
27496
27450
  */
27497
27451
 
27452
+
27498
27453
  /** Standard status code.
27499
27454
  * This status code should be rarely used.
27500
27455
  * Prefer to throw an exception to indicate an error, rather than returning a special status code.
@@ -27672,43 +27627,6 @@ var ChangeSetStatus;
27672
27627
  /** ChangeSet(s) download was cancelled. */
27673
27628
  ChangeSetStatus[ChangeSetStatus["DownloadCancelled"] = 90138] = "DownloadCancelled";
27674
27629
  })(ChangeSetStatus || (ChangeSetStatus = {}));
27675
- /** Return codes for methods which perform repository management operations
27676
- * @internal
27677
- */
27678
- var RepositoryStatus;
27679
- (function (RepositoryStatus) {
27680
- RepositoryStatus[RepositoryStatus["Success"] = 0] = "Success";
27681
- /** The repository server did not respond to a request */
27682
- RepositoryStatus[RepositoryStatus["ServerUnavailable"] = 86017] = "ServerUnavailable";
27683
- /** A requested lock was already held by another briefcase */
27684
- RepositoryStatus[RepositoryStatus["LockAlreadyHeld"] = 86018] = "LockAlreadyHeld";
27685
- /** Failed to sync briefcase manager with server */
27686
- RepositoryStatus[RepositoryStatus["SyncError"] = 86019] = "SyncError";
27687
- /** Response from server not understood */
27688
- RepositoryStatus[RepositoryStatus["InvalidResponse"] = 86020] = "InvalidResponse";
27689
- /** An operation requires local changes to be committed or abandoned */
27690
- RepositoryStatus[RepositoryStatus["PendingTransactions"] = 86021] = "PendingTransactions";
27691
- /** A lock cannot be relinquished because the associated object has been modified */
27692
- RepositoryStatus[RepositoryStatus["LockUsed"] = 86022] = "LockUsed";
27693
- /** An operation required creation of a ChangeSet, which failed */
27694
- RepositoryStatus[RepositoryStatus["CannotCreateChangeSet"] = 86023] = "CannotCreateChangeSet";
27695
- /** Request to server not understood */
27696
- RepositoryStatus[RepositoryStatus["InvalidRequest"] = 86024] = "InvalidRequest";
27697
- /** A change set committed to the server must be integrated into the briefcase before the operation can be completed */
27698
- RepositoryStatus[RepositoryStatus["ChangeSetRequired"] = 86025] = "ChangeSetRequired";
27699
- /** A requested DgnCode is reserved by another briefcase or in use */
27700
- RepositoryStatus[RepositoryStatus["CodeUnavailable"] = 86026] = "CodeUnavailable";
27701
- /** A DgnCode cannot be released because it has not been reserved by the requesting briefcase */
27702
- RepositoryStatus[RepositoryStatus["CodeNotReserved"] = 86027] = "CodeNotReserved";
27703
- /** A DgnCode cannot be relinquished because it has been used locally */
27704
- RepositoryStatus[RepositoryStatus["CodeUsed"] = 86028] = "CodeUsed";
27705
- /** A required lock is not held by this briefcase */
27706
- RepositoryStatus[RepositoryStatus["LockNotHeld"] = 86029] = "LockNotHeld";
27707
- /** Repository is currently locked, no changes allowed */
27708
- RepositoryStatus[RepositoryStatus["RepositoryIsLocked"] = 86030] = "RepositoryIsLocked";
27709
- /** Channel write constraint violation, such as an attempt to write outside the designated channel. */
27710
- RepositoryStatus[RepositoryStatus["ChannelConstraintViolation"] = 86031] = "ChannelConstraintViolation";
27711
- })(RepositoryStatus || (RepositoryStatus = {}));
27712
27630
  /** Status from returned HTTP status code
27713
27631
  * @beta
27714
27632
  */
@@ -28038,21 +27956,21 @@ class BentleyError extends Error {
28038
27956
  case ChangeSetStatus.CannotMergeIntoMaster: return "Cannot merge changes into a Master DgnDb";
28039
27957
  case ChangeSetStatus.CannotMergeIntoReversed: return "Cannot merge changes into a DgnDb that has reversed change sets";
28040
27958
  case ChangeSetStatus.DownloadCancelled: return "ChangeSet(s) download was cancelled.";
28041
- case RepositoryStatus.ServerUnavailable: return "ServerUnavailable";
28042
- case RepositoryStatus.LockAlreadyHeld: return "LockAlreadyHeld";
28043
- case RepositoryStatus.SyncError: return "SyncError";
28044
- case RepositoryStatus.InvalidResponse: return "InvalidResponse";
28045
- case RepositoryStatus.PendingTransactions: return "PendingTransactions";
28046
- case RepositoryStatus.LockUsed: return "LockUsed";
28047
- case RepositoryStatus.CannotCreateChangeSet: return "CannotCreateChangeSet";
28048
- case RepositoryStatus.InvalidRequest: return "InvalidRequest";
28049
- case RepositoryStatus.ChangeSetRequired: return "ChangeSetRequired";
28050
- case RepositoryStatus.CodeUnavailable: return "CodeUnavailable";
28051
- case RepositoryStatus.CodeNotReserved: return "CodeNotReserved";
28052
- case RepositoryStatus.CodeUsed: return "CodeUsed";
28053
- case RepositoryStatus.LockNotHeld: return "LockNotHeld";
28054
- case RepositoryStatus.RepositoryIsLocked: return "RepositoryIsLocked";
28055
- case RepositoryStatus.ChannelConstraintViolation: return "ChannelConstraintViolation";
27959
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.ServerUnavailable: return "ServerUnavailable";
27960
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.LockAlreadyHeld: return "LockAlreadyHeld";
27961
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.SyncError: return "SyncError";
27962
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.InvalidResponse: return "InvalidResponse";
27963
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.PendingTransactions: return "PendingTransactions";
27964
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.LockUsed: return "LockUsed";
27965
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CannotCreateChangeSet: return "CannotCreateChangeSet";
27966
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.InvalidRequest: return "InvalidRequest";
27967
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.ChangeSetRequired: return "ChangeSetRequired";
27968
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CodeUnavailable: return "CodeUnavailable";
27969
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CodeNotReserved: return "CodeNotReserved";
27970
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CodeUsed: return "CodeUsed";
27971
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.LockNotHeld: return "LockNotHeld";
27972
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.RepositoryIsLocked: return "RepositoryIsLocked";
27973
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.ChannelConstraintViolation: return "ChannelConstraintViolation";
28056
27974
  case HttpStatus.Info: return "HTTP Info";
28057
27975
  case HttpStatus.Redirection: return "HTTP Redirection";
28058
27976
  case HttpStatus.ClientError: return "HTTP Client error";
@@ -30613,8 +30531,10 @@ __webpack_require__.r(__webpack_exports__);
30613
30531
  /* harmony export */ "Logger": () => (/* binding */ Logger),
30614
30532
  /* harmony export */ "PerfLogger": () => (/* binding */ PerfLogger)
30615
30533
  /* harmony export */ });
30616
- /* harmony import */ var _BentleyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BentleyError */ "../../core/bentley/lib/esm/BentleyError.js");
30617
- /* harmony import */ var _BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BentleyLoggerCategory */ "../../core/bentley/lib/esm/BentleyLoggerCategory.js");
30534
+ /* harmony import */ var _BeEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BeEvent */ "../../core/bentley/lib/esm/BeEvent.js");
30535
+ /* harmony import */ var _BentleyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BentleyError */ "../../core/bentley/lib/esm/BentleyError.js");
30536
+ /* harmony import */ var _BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BentleyLoggerCategory */ "../../core/bentley/lib/esm/BentleyLoggerCategory.js");
30537
+ /* harmony import */ var _internal_staticLoggerMetadata__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/staticLoggerMetadata */ "../../core/bentley/lib/esm/internal/staticLoggerMetadata.js");
30618
30538
  /*---------------------------------------------------------------------------------------------
30619
30539
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
30620
30540
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -30624,6 +30544,8 @@ __webpack_require__.r(__webpack_exports__);
30624
30544
  */
30625
30545
 
30626
30546
 
30547
+
30548
+
30627
30549
  /** Use to categorize logging messages by severity.
30628
30550
  * @public
30629
30551
  */
@@ -30645,13 +30567,29 @@ var LogLevel;
30645
30567
  * @public
30646
30568
  */
30647
30569
  class Logger {
30648
- /** @internal */
30570
+ /** An event raised whenever [[setLevel]] or [[setLevelDefault]] is called. */
30571
+ static get onLogLevelChanged() {
30572
+ // We have to lazily initialize because it's static and BeEvent imports UnexpectedErrors which imports Logger which wants to instantiate BeEvent.
30573
+ if (undefined === Logger._onLogLevelChanged) {
30574
+ Logger._onLogLevelChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
30575
+ }
30576
+ return Logger._onLogLevelChanged;
30577
+ }
30578
+ /** Maps category names to the least severe level at which messages in that category should be displayed,
30579
+ * or `undefined` if a minimum has not been defined.
30580
+ * @see [[setLevel]] to change the minimum logging level for a category.
30581
+ */
30649
30582
  static get categoryFilter() {
30650
- return { ...Logger._categoryFilter };
30583
+ // NOTE: this property is accessed by native code.
30584
+ return this._categoryFilter;
30651
30585
  }
30652
- /** @internal */
30586
+ /** The least severe level at which messages should be displayed by default.
30587
+ * @see [[setLevelDefault]] to change this default.
30588
+ * @see [[setLevel]] to override this default for specific categories.
30589
+ */
30653
30590
  static get minLevel() {
30654
- return Logger._minLevel;
30591
+ // NOTE: this property is accessed by native code. */
30592
+ return this._minLevel;
30655
30593
  }
30656
30594
  /** Initialize the logger streams. Should be called at application initialization time. */
30657
30595
  static initialize(logError, logWarning, logInfo, logTrace) {
@@ -30670,12 +30608,12 @@ class Logger {
30670
30608
  /** merge the supplied metadata with all static metadata into one object */
30671
30609
  static getMetaData(metaData) {
30672
30610
  const metaObj = {};
30673
- for (const meta of Logger.staticMetaData) {
30674
- const val = _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getMetaData(meta[1]);
30611
+ for (const meta of _internal_staticLoggerMetadata__WEBPACK_IMPORTED_MODULE_3__.staticLoggerMetadata) {
30612
+ const val = _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getMetaData(meta[1]);
30675
30613
  if (val)
30676
30614
  Object.assign(metaObj, val);
30677
30615
  }
30678
- Object.assign(metaObj, _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getMetaData(metaData)); // do this last so user supplied values take precedence
30616
+ Object.assign(metaObj, _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getMetaData(metaData)); // do this last so user supplied values take precedence
30679
30617
  return metaObj;
30680
30618
  }
30681
30619
  /** stringify the metadata for a log message by merging the supplied metadata with all static metadata into one object that is then `JSON.stringify`ed. */
@@ -30686,14 +30624,14 @@ class Logger {
30686
30624
  /** Set the least severe level at which messages should be displayed by default. Call setLevel to override this default setting for specific categories. */
30687
30625
  static setLevelDefault(minLevel) {
30688
30626
  this._minLevel = minLevel;
30689
- this.logLevelChangedFn?.();
30627
+ this.onLogLevelChanged.raiseEvent();
30690
30628
  }
30691
30629
  /** Set the minimum logging level for the specified category. The minimum level is least severe level at which messages in the
30692
30630
  * specified category should be displayed.
30693
30631
  */
30694
30632
  static setLevel(category, minLevel) {
30695
30633
  Logger._categoryFilter[category] = minLevel;
30696
- this.logLevelChangedFn?.();
30634
+ this.onLogLevelChanged.raiseEvent();
30697
30635
  }
30698
30636
  /** Interpret a string as the name of a LogLevel */
30699
30637
  static parseLogLevel(str) {
@@ -30728,20 +30666,20 @@ class Logger {
30728
30666
  const validProps = ["defaultLevel", "categoryLevels"];
30729
30667
  for (const prop of Object.keys(config)) {
30730
30668
  if (!validProps.includes(prop))
30731
- throw new _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.BadArg, `LoggerLevelsConfig - unrecognized property: ${prop}`);
30669
+ throw new _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_1__.IModelStatus.BadArg, `LoggerLevelsConfig - unrecognized property: ${prop}`);
30732
30670
  if (prop === "defaultLevel") {
30733
30671
  if (!Logger.isLogLevel(config.defaultLevel))
30734
- throw new _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.BadArg, `LoggerLevelsConfig.defaultLevel must be a LogLevel. Invalid value: ${JSON.stringify(config.defaultLevel)}`);
30672
+ throw new _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_1__.IModelStatus.BadArg, `LoggerLevelsConfig.defaultLevel must be a LogLevel. Invalid value: ${JSON.stringify(config.defaultLevel)}`);
30735
30673
  }
30736
30674
  else if (prop === "categoryLevels") {
30737
30675
  const value = config[prop];
30738
30676
  if (!Array.isArray(value))
30739
- throw new _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.BadArg, `LoggerLevelsConfig.categoryLevels must be an array. Invalid value: ${JSON.stringify(value)}`);
30677
+ throw new _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_1__.IModelStatus.BadArg, `LoggerLevelsConfig.categoryLevels must be an array. Invalid value: ${JSON.stringify(value)}`);
30740
30678
  for (const item of config[prop]) {
30741
30679
  if (!item.hasOwnProperty("category") || !item.hasOwnProperty("logLevel"))
30742
- throw new _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.BadArg, `LoggerLevelsConfig.categoryLevels - each item must be a LoggerCategoryAndLevel {category: logLevel:}. Invalid value: ${JSON.stringify(item)}`);
30680
+ throw new _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_1__.IModelStatus.BadArg, `LoggerLevelsConfig.categoryLevels - each item must be a LoggerCategoryAndLevel {category: logLevel:}. Invalid value: ${JSON.stringify(item)}`);
30743
30681
  if (!Logger.isLogLevel(item.logLevel))
30744
- throw new _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.BadArg, `LoggerLevelsConfig.categoryLevels - each item's logLevel property must be a LogLevel. Invalid value: ${JSON.stringify(item.logLevel)}`);
30682
+ throw new _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError(_BentleyError__WEBPACK_IMPORTED_MODULE_1__.IModelStatus.BadArg, `LoggerLevelsConfig.categoryLevels - each item's logLevel property must be a LogLevel. Invalid value: ${JSON.stringify(item.logLevel)}`);
30745
30683
  }
30746
30684
  }
30747
30685
  }
@@ -30749,7 +30687,7 @@ class Logger {
30749
30687
  /** Get the minimum logging level for the specified category. */
30750
30688
  static getLevel(category) {
30751
30689
  // Prefer the level set for this category specifically
30752
- const minLevelForThisCategory = Logger._categoryFilter[category];
30690
+ const minLevelForThisCategory = Logger.categoryFilter[category];
30753
30691
  if (minLevelForThisCategory !== undefined)
30754
30692
  return minLevelForThisCategory;
30755
30693
  // Fall back on the level set for the parent of this category.
@@ -30757,7 +30695,7 @@ class Logger {
30757
30695
  if (parent !== -1)
30758
30696
  return Logger.getLevel(category.slice(0, parent));
30759
30697
  // Fall back on the default level.
30760
- return Logger._minLevel;
30698
+ return Logger.minLevel;
30761
30699
  }
30762
30700
  /** Turns off the least severe level at which messages should be displayed by default.
30763
30701
  * This turns off logging for all messages for which no category minimum level is defined.
@@ -30785,8 +30723,8 @@ class Logger {
30785
30723
  Logger._logError(category, message, metaData);
30786
30724
  }
30787
30725
  static getExceptionMessage(err) {
30788
- const stack = Logger.logExceptionCallstacks ? `\n${_BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getErrorStack(err)}` : "";
30789
- return _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getErrorMessage(err) + stack;
30726
+ const stack = Logger.logExceptionCallstacks ? `\n${_BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorStack(err)}` : "";
30727
+ return _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMessage(err) + stack;
30790
30728
  }
30791
30729
  /** Log the specified exception. The special "ExceptionType" property will be added as metadata.
30792
30730
  * @param category The category of the message.
@@ -30795,7 +30733,7 @@ class Logger {
30795
30733
  */
30796
30734
  static logException(category, err, log = (_category, message, metaData) => Logger.logError(_category, message, metaData)) {
30797
30735
  log(category, Logger.getExceptionMessage(err), () => {
30798
- return { ..._BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getErrorMetadata(err), exceptionType: err.constructor.name };
30736
+ return { ..._BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMetadata(err), exceptionType: err.constructor.name };
30799
30737
  });
30800
30738
  }
30801
30739
  /** Log the specified message to the **warning** stream.
@@ -30829,11 +30767,6 @@ class Logger {
30829
30767
  Logger._categoryFilter = {};
30830
30768
  /** Should the call stack be included when an exception is logged? */
30831
30769
  Logger.logExceptionCallstacks = false;
30832
- /** All static metadata is combined with per-call metadata and stringified in every log message.
30833
- * Static metadata can either be an object or a function that returns an object.
30834
- * Use a key to identify entries in the map so the can be removed individually.
30835
- * @internal */
30836
- Logger.staticMetaData = new Map();
30837
30770
  /** Simple performance diagnostics utility.
30838
30771
  * It measures the time from construction to disposal. On disposal it logs the routine name along with
30839
30772
  * the duration in milliseconds.
@@ -30847,19 +30780,19 @@ class PerfLogger {
30847
30780
  constructor(operation, metaData) {
30848
30781
  this._operation = operation;
30849
30782
  this._metaData = metaData;
30850
- if (!Logger.isEnabled(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.BentleyLoggerCategory.Performance, PerfLogger._severity)) {
30783
+ if (!Logger.isEnabled(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.BentleyLoggerCategory.Performance, PerfLogger._severity)) {
30851
30784
  this._startTimeStamp = 0;
30852
30785
  return;
30853
30786
  }
30854
- Logger.logInfo(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.BentleyLoggerCategory.Performance, `${this._operation},START`, this._metaData);
30787
+ Logger.logInfo(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.BentleyLoggerCategory.Performance, `${this._operation},START`, this._metaData);
30855
30788
  this._startTimeStamp = new Date().getTime(); // take timestamp
30856
30789
  }
30857
30790
  logMessage() {
30858
30791
  const endTimeStamp = new Date().getTime();
30859
- if (!Logger.isEnabled(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.BentleyLoggerCategory.Performance, PerfLogger._severity))
30792
+ if (!Logger.isEnabled(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.BentleyLoggerCategory.Performance, PerfLogger._severity))
30860
30793
  return;
30861
- Logger.logInfo(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.BentleyLoggerCategory.Performance, `${this._operation},END`, () => {
30862
- const mdata = this._metaData ? _BentleyError__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getMetaData(this._metaData) : {};
30794
+ Logger.logInfo(_BentleyLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.BentleyLoggerCategory.Performance, `${this._operation},END`, () => {
30795
+ const mdata = this._metaData ? _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getMetaData(this._metaData) : {};
30863
30796
  return {
30864
30797
  ...mdata, TimeElapsed: endTimeStamp - this._startTimeStamp, // eslint-disable-line @typescript-eslint/naming-convention
30865
30798
  };
@@ -30918,14 +30851,18 @@ class ObservableSet extends Set {
30918
30851
  return ret;
30919
30852
  };
30920
30853
  }
30921
- /** @internal */
30854
+ /** Invokes [Set.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/delete), raising
30855
+ * the [[onDeleted]] event if the item was removed from the set.
30856
+ */
30922
30857
  delete(item) {
30923
30858
  const ret = super.delete(item);
30924
30859
  if (ret)
30925
30860
  this.onDeleted.raiseEvent(item);
30926
30861
  return ret;
30927
30862
  }
30928
- /** @internal */
30863
+ /** If this set is not already empty, invokes [Set.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/clear)
30864
+ * and raises the [[onCleared]] event.
30865
+ */
30929
30866
  clear() {
30930
30867
  if (0 !== this.size) {
30931
30868
  super.clear();
@@ -31942,6 +31879,7 @@ __webpack_require__.r(__webpack_exports__);
31942
31879
  /* harmony export */ "SuccessCategory": () => (/* binding */ SuccessCategory)
31943
31880
  /* harmony export */ });
31944
31881
  /* harmony import */ var _BentleyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BentleyError */ "../../core/bentley/lib/esm/BentleyError.js");
31882
+ /* harmony import */ var _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/RepositoryStatus */ "../../core/bentley/lib/esm/internal/RepositoryStatus.js");
31945
31883
  /*---------------------------------------------------------------------------------------------
31946
31884
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
31947
31885
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -31950,6 +31888,7 @@ __webpack_require__.r(__webpack_exports__);
31950
31888
  * @module Errors
31951
31889
  */
31952
31890
 
31891
+
31953
31892
  /** A group of related statuses for aggregate reporting purposes.
31954
31893
  * @alpha
31955
31894
  */
@@ -32314,22 +32253,22 @@ function lookupHttpStatusCategory(statusCode) {
32314
32253
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.ChangeSetStatus.CannotMergeIntoReadonly: return new ValidationError();
32315
32254
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.ChangeSetStatus.CannotMergeIntoMaster: return new ValidationError();
32316
32255
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.ChangeSetStatus.CannotMergeIntoReversed: return new ValidationError();
32317
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.Success: return new Success();
32318
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.ServerUnavailable: return new NetworkError();
32319
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.LockAlreadyHeld: return new Conflict();
32320
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.SyncError: return new NetworkError();
32321
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.InvalidResponse: return new NetworkError();
32322
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.PendingTransactions: return new StateViolation();
32323
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.LockUsed: return new StateViolation();
32324
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.CannotCreateChangeSet: return new InternalError();
32325
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.InvalidRequest: return new NetworkError();
32326
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.ChangeSetRequired: return new StateViolation();
32327
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.CodeUnavailable: return new Conflict();
32328
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.CodeNotReserved: return new StateViolation();
32329
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.CodeUsed: return new StateViolation();
32330
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.LockNotHeld: return new Forbidden();
32331
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.RepositoryIsLocked: return new Locked();
32332
- case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.ChannelConstraintViolation: return new ConstraintViolation();
32256
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.Success: return new Success();
32257
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.ServerUnavailable: return new NetworkError();
32258
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.LockAlreadyHeld: return new Conflict();
32259
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.SyncError: return new NetworkError();
32260
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.InvalidResponse: return new NetworkError();
32261
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.PendingTransactions: return new StateViolation();
32262
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.LockUsed: return new StateViolation();
32263
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CannotCreateChangeSet: return new InternalError();
32264
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.InvalidRequest: return new NetworkError();
32265
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.ChangeSetRequired: return new StateViolation();
32266
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CodeUnavailable: return new Conflict();
32267
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CodeNotReserved: return new StateViolation();
32268
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.CodeUsed: return new StateViolation();
32269
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.LockNotHeld: return new Forbidden();
32270
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.RepositoryIsLocked: return new Locked();
32271
+ case _internal_RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus.ChannelConstraintViolation: return new ConstraintViolation();
32333
32272
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.HttpStatus.Success: return new Success();
32334
32273
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelHubStatus.Success: return new Success();
32335
32274
  case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.IModelHubStatus.Unknown: return new UnknownError();
@@ -32416,8 +32355,7 @@ function lookupHttpStatusCategory(statusCode) {
32416
32355
  __webpack_require__.r(__webpack_exports__);
32417
32356
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32418
32357
  /* harmony export */ "base64StringToUint8Array": () => (/* binding */ base64StringToUint8Array),
32419
- /* harmony export */ "utf8ToString": () => (/* binding */ utf8ToString),
32420
- /* harmony export */ "utf8ToStringPolyfill": () => (/* binding */ utf8ToStringPolyfill)
32358
+ /* harmony export */ "utf8ToString": () => (/* binding */ utf8ToString)
32421
32359
  /* harmony export */ });
32422
32360
  /*---------------------------------------------------------------------------------------------
32423
32361
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -32426,110 +32364,6 @@ __webpack_require__.r(__webpack_exports__);
32426
32364
  /** @packageDocumentation
32427
32365
  * @module Utils
32428
32366
  */
32429
- // TextDecoder is not supported on all platforms - this is an alternative for utf-8.
32430
- // From https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/getStringFromTypedArray.js
32431
- // which is itself inspired by https://github.com/inexorabletash/text-encoding
32432
- /** @internal */
32433
- var Utf8ToString;
32434
- (function (Utf8ToString) {
32435
- function inRange(a, min, max) {
32436
- return min <= a && a <= max;
32437
- }
32438
- function utf8Handler(bytes) {
32439
- let codePoint = 0;
32440
- let bytesSeen = 0;
32441
- let bytesNeeded = 0;
32442
- let lowerBoundary = 0x80;
32443
- let upperBoundary = 0xbf;
32444
- const codePoints = [];
32445
- const length = bytes.length;
32446
- for (let i = 0; i < length; i++) {
32447
- const currentByte = bytes[i];
32448
- // If bytesNeeded = 0, then we are starting a new character
32449
- if (0 === bytesNeeded) {
32450
- // 1 byte ascii character
32451
- if (inRange(currentByte, 0x00, 0x7f)) {
32452
- // return a code point whose value is byte.
32453
- codePoints.push(currentByte);
32454
- continue;
32455
- }
32456
- // 2 byte character
32457
- if (inRange(currentByte, 0xc2, 0xdf)) {
32458
- bytesNeeded = 1;
32459
- codePoint = currentByte & 0x1f;
32460
- continue;
32461
- }
32462
- // 3 byte character
32463
- if (inRange(currentByte, 0xe0, 0xef)) {
32464
- if (0xe0 === currentByte)
32465
- lowerBoundary = 0xa0;
32466
- else if (0xed === currentByte)
32467
- upperBoundary = 0x9f;
32468
- bytesNeeded = 2;
32469
- codePoint = currentByte & 0xf;
32470
- continue;
32471
- }
32472
- // 4 byte character
32473
- if (inRange(currentByte, 0xf0, 0xf4)) {
32474
- if (0xf0 === currentByte)
32475
- lowerBoundary = 0x90;
32476
- else if (0xf4 === currentByte)
32477
- upperBoundary = 0x8f;
32478
- bytesNeeded = 3;
32479
- codePoint = currentByte & 0x7;
32480
- continue;
32481
- }
32482
- // invalid utf-8
32483
- return undefined;
32484
- }
32485
- // out of range so ignore the first part(s) of the character and continue with this byte on its own
32486
- if (!inRange(currentByte, lowerBoundary, upperBoundary)) {
32487
- codePoint = bytesNeeded = bytesSeen = 0;
32488
- lowerBoundary = 0x80;
32489
- upperBoundary = 0xbf;
32490
- --i;
32491
- continue;
32492
- }
32493
- // set appropriate boundaries since we've now checked byte 2 of a potential longer character
32494
- lowerBoundary = 0x80;
32495
- upperBoundary = 0xbf;
32496
- // add byte to code point
32497
- codePoint = (codePoint << 6) | (currentByte & 0x3f);
32498
- // We have the correct number of bytes, so push and reset for next character
32499
- ++bytesSeen;
32500
- if (bytesSeen === bytesNeeded) {
32501
- codePoints.push(codePoint);
32502
- codePoint = bytesNeeded = bytesSeen = 0;
32503
- }
32504
- }
32505
- return codePoints;
32506
- }
32507
- function decodeWithFromCharCode(view) {
32508
- let result = "";
32509
- const codePoints = utf8Handler(view);
32510
- if (undefined === codePoints)
32511
- return undefined;
32512
- for (let cp of codePoints) {
32513
- if (cp <= 0xffff) {
32514
- result += String.fromCharCode(cp);
32515
- }
32516
- else {
32517
- cp -= 0x10000;
32518
- result += String.fromCharCode((cp >> 10) + 0xd800, (cp & 0x3ff) + 0xdc00);
32519
- }
32520
- }
32521
- return result;
32522
- }
32523
- Utf8ToString.decodeWithFromCharCode = decodeWithFromCharCode;
32524
- })(Utf8ToString || (Utf8ToString = {}));
32525
- /** Exposed only for testing the fall-back used when TextDecoder is unsupported.
32526
- * @internal
32527
- */
32528
- function utf8ToStringPolyfill(utf8) {
32529
- return Utf8ToString.decodeWithFromCharCode(utf8);
32530
- }
32531
- // TextDecoder unsupported in Edge at time of writing.
32532
- let textDecoderSupported = true;
32533
32367
  /** Given an array of bytes containing a utf-8 string, convert to a string.
32534
32368
  * @param utf8: An array of utf-8 characters as a byte array
32535
32369
  * @returns An equivalent string, or undefined if the array does not contain a valid utf-8 string.
@@ -32538,19 +32372,8 @@ let textDecoderSupported = true;
32538
32372
  * @public
32539
32373
  */
32540
32374
  function utf8ToString(utf8) {
32541
- let decoder;
32542
- if (textDecoderSupported) {
32543
- try {
32544
- decoder = new TextDecoder("utf-8");
32545
- }
32546
- catch (_ex) {
32547
- textDecoderSupported = false;
32548
- }
32549
- }
32550
- if (undefined !== decoder)
32551
- return decoder.decode(utf8);
32552
- else
32553
- return utf8ToStringPolyfill(utf8);
32375
+ const decoder = new TextDecoder("utf-8");
32376
+ return decoder.decode(utf8);
32554
32377
  }
32555
32378
  /** Given a base-64-encoded string, decode it into an array of bytes.
32556
32379
  * @param base64 The base-64-encoded string.
@@ -32848,7 +32671,6 @@ class Tracing {
32848
32671
  /**
32849
32672
  * Adds a span event describing a runtime exception, as advised in OpenTelemetry documentation
32850
32673
  * @param e error (exception) object
32851
- * @internal
32852
32674
  */
32853
32675
  static recordException(e) {
32854
32676
  Tracing._openTelemetry?.trace.getSpan(Tracing._openTelemetry.context.active())?.recordException(e);
@@ -33413,7 +33235,6 @@ class YieldManager {
33413
33235
  await this.actualYield();
33414
33236
  }
33415
33237
  }
33416
- /** @internal */
33417
33238
  async actualYield() {
33418
33239
  await new Promise((r) => setTimeout(r, 0));
33419
33240
  }
@@ -33444,12 +33265,12 @@ __webpack_require__.r(__webpack_exports__);
33444
33265
  /* harmony export */ "ByteStream": () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
33445
33266
  /* harmony export */ "ChangeSetStatus": () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
33446
33267
  /* harmony export */ "CompressedId64Set": () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
33447
- /* harmony export */ "DbChangeStage": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbChangeStage),
33448
- /* harmony export */ "DbConflictCause": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbConflictCause),
33449
- /* harmony export */ "DbConflictResolution": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbConflictResolution),
33268
+ /* harmony export */ "DbChangeStage": () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbChangeStage),
33269
+ /* harmony export */ "DbConflictCause": () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbConflictCause),
33270
+ /* harmony export */ "DbConflictResolution": () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbConflictResolution),
33450
33271
  /* harmony export */ "DbOpcode": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
33451
33272
  /* harmony export */ "DbResult": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
33452
- /* harmony export */ "DbValueType": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbValueType),
33273
+ /* harmony export */ "DbValueType": () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.DbValueType),
33453
33274
  /* harmony export */ "Dictionary": () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
33454
33275
  /* harmony export */ "DisposableList": () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
33455
33276
  /* harmony export */ "DuplicatePolicy": () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.DuplicatePolicy),
@@ -33482,7 +33303,7 @@ __webpack_require__.r(__webpack_exports__);
33482
33303
  /* harmony export */ "ReadonlyOrderedSet": () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_22__.ReadonlyOrderedSet),
33483
33304
  /* harmony export */ "ReadonlySortedArray": () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.ReadonlySortedArray),
33484
33305
  /* harmony export */ "RealityDataStatus": () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RealityDataStatus),
33485
- /* harmony export */ "RepositoryStatus": () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RepositoryStatus),
33306
+ /* harmony export */ "RepositoryStatus": () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.RepositoryStatus),
33486
33307
  /* harmony export */ "RpcInterfaceStatus": () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RpcInterfaceStatus),
33487
33308
  /* harmony export */ "SortedArray": () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.SortedArray),
33488
33309
  /* harmony export */ "SpanKind": () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_29__.SpanKind),
@@ -33521,9 +33342,9 @@ __webpack_require__.r(__webpack_exports__);
33521
33342
  /* harmony export */ "omit": () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__.omit),
33522
33343
  /* harmony export */ "partitionArray": () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_23__.partitionArray),
33523
33344
  /* harmony export */ "shallowClone": () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.shallowClone),
33345
+ /* harmony export */ "staticLoggerMetadata": () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__.staticLoggerMetadata),
33524
33346
  /* harmony export */ "using": () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.using),
33525
- /* harmony export */ "utf8ToString": () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_27__.utf8ToString),
33526
- /* harmony export */ "utf8ToStringPolyfill": () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_27__.utf8ToStringPolyfill)
33347
+ /* harmony export */ "utf8ToString": () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_27__.utf8ToString)
33527
33348
  /* harmony export */ });
33528
33349
  /* harmony import */ var _AccessToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccessToken */ "../../core/bentley/lib/esm/AccessToken.js");
33529
33350
  /* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Assert */ "../../core/bentley/lib/esm/Assert.js");
@@ -33560,6 +33381,7 @@ __webpack_require__.r(__webpack_exports__);
33560
33381
  /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./UnexpectedErrors */ "../../core/bentley/lib/esm/UnexpectedErrors.js");
33561
33382
  /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UtilityTypes */ "../../core/bentley/lib/esm/UtilityTypes.js");
33562
33383
  /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./YieldManager */ "../../core/bentley/lib/esm/YieldManager.js");
33384
+ /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./internal/cross-package */ "../../core/bentley/lib/esm/internal/cross-package.js");
33563
33385
  /*---------------------------------------------------------------------------------------------
33564
33386
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
33565
33387
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -33598,6 +33420,8 @@ __webpack_require__.r(__webpack_exports__);
33598
33420
 
33599
33421
 
33600
33422
 
33423
+
33424
+ // Temporarily (until 5.0) export top-level internal APIs to avoid breaking callers.
33601
33425
 
33602
33426
  /** @docs-package-description
33603
33427
  * The core-bentley package contains classes to solve problems that are common for both client and server use cases.
@@ -33640,6 +33464,184 @@ __webpack_require__.r(__webpack_exports__);
33640
33464
  */
33641
33465
 
33642
33466
 
33467
+ /***/ }),
33468
+
33469
+ /***/ "../../core/bentley/lib/esm/internal/BeSQLiteInternal.js":
33470
+ /*!***************************************************************!*\
33471
+ !*** ../../core/bentley/lib/esm/internal/BeSQLiteInternal.js ***!
33472
+ \***************************************************************/
33473
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33474
+
33475
+ "use strict";
33476
+ __webpack_require__.r(__webpack_exports__);
33477
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33478
+ /* harmony export */ "DbChangeStage": () => (/* binding */ DbChangeStage),
33479
+ /* harmony export */ "DbConflictCause": () => (/* binding */ DbConflictCause),
33480
+ /* harmony export */ "DbConflictResolution": () => (/* binding */ DbConflictResolution),
33481
+ /* harmony export */ "DbValueType": () => (/* binding */ DbValueType)
33482
+ /* harmony export */ });
33483
+ /*---------------------------------------------------------------------------------------------
33484
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
33485
+ * See LICENSE.md in the project root for license terms and full copyright notice.
33486
+ *--------------------------------------------------------------------------------------------*/
33487
+ /** @packageDocumentation
33488
+ * @module BeSQLite
33489
+ */
33490
+ /** @internal */
33491
+ var DbChangeStage;
33492
+ (function (DbChangeStage) {
33493
+ DbChangeStage[DbChangeStage["Old"] = 0] = "Old";
33494
+ DbChangeStage[DbChangeStage["New"] = 1] = "New";
33495
+ })(DbChangeStage || (DbChangeStage = {}));
33496
+ /** @internal */
33497
+ var DbValueType;
33498
+ (function (DbValueType) {
33499
+ DbValueType[DbValueType["IntegerVal"] = 1] = "IntegerVal";
33500
+ DbValueType[DbValueType["FloatVal"] = 2] = "FloatVal";
33501
+ DbValueType[DbValueType["TextVal"] = 3] = "TextVal";
33502
+ DbValueType[DbValueType["BlobVal"] = 4] = "BlobVal";
33503
+ DbValueType[DbValueType["NullVal"] = 5] = "NullVal";
33504
+ })(DbValueType || (DbValueType = {}));
33505
+ /** Cause of conflict when applying a changeset.
33506
+ * @internal
33507
+ */
33508
+ var DbConflictCause;
33509
+ (function (DbConflictCause) {
33510
+ DbConflictCause[DbConflictCause["Data"] = 1] = "Data";
33511
+ DbConflictCause[DbConflictCause["NotFound"] = 2] = "NotFound";
33512
+ DbConflictCause[DbConflictCause["Conflict"] = 3] = "Conflict";
33513
+ DbConflictCause[DbConflictCause["Constraint"] = 4] = "Constraint";
33514
+ DbConflictCause[DbConflictCause["ForeignKey"] = 5] = "ForeignKey";
33515
+ })(DbConflictCause || (DbConflictCause = {}));
33516
+ /** @internal */
33517
+ var DbConflictResolution;
33518
+ (function (DbConflictResolution) {
33519
+ /** Skip incoming change */
33520
+ DbConflictResolution[DbConflictResolution["Skip"] = 0] = "Skip";
33521
+ /** Replace local row with incoming changed row */
33522
+ DbConflictResolution[DbConflictResolution["Replace"] = 1] = "Replace";
33523
+ /** Abort apply changeset */
33524
+ DbConflictResolution[DbConflictResolution["Abort"] = 2] = "Abort";
33525
+ })(DbConflictResolution || (DbConflictResolution = {}));
33526
+
33527
+
33528
+ /***/ }),
33529
+
33530
+ /***/ "../../core/bentley/lib/esm/internal/RepositoryStatus.js":
33531
+ /*!***************************************************************!*\
33532
+ !*** ../../core/bentley/lib/esm/internal/RepositoryStatus.js ***!
33533
+ \***************************************************************/
33534
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33535
+
33536
+ "use strict";
33537
+ __webpack_require__.r(__webpack_exports__);
33538
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33539
+ /* harmony export */ "RepositoryStatus": () => (/* binding */ RepositoryStatus)
33540
+ /* harmony export */ });
33541
+ /*---------------------------------------------------------------------------------------------
33542
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
33543
+ * See LICENSE.md in the project root for license terms and full copyright notice.
33544
+ *--------------------------------------------------------------------------------------------*/
33545
+ /** @packageDocumentation
33546
+ * @module Errors
33547
+ */
33548
+ /** Return codes for methods which perform repository management operations.
33549
+ * @internal
33550
+ */
33551
+ var RepositoryStatus;
33552
+ (function (RepositoryStatus) {
33553
+ RepositoryStatus[RepositoryStatus["Success"] = 0] = "Success";
33554
+ /** The repository server did not respond to a request */
33555
+ RepositoryStatus[RepositoryStatus["ServerUnavailable"] = 86017] = "ServerUnavailable";
33556
+ /** A requested lock was already held by another briefcase */
33557
+ RepositoryStatus[RepositoryStatus["LockAlreadyHeld"] = 86018] = "LockAlreadyHeld";
33558
+ /** Failed to sync briefcase manager with server */
33559
+ RepositoryStatus[RepositoryStatus["SyncError"] = 86019] = "SyncError";
33560
+ /** Response from server not understood */
33561
+ RepositoryStatus[RepositoryStatus["InvalidResponse"] = 86020] = "InvalidResponse";
33562
+ /** An operation requires local changes to be committed or abandoned */
33563
+ RepositoryStatus[RepositoryStatus["PendingTransactions"] = 86021] = "PendingTransactions";
33564
+ /** A lock cannot be relinquished because the associated object has been modified */
33565
+ RepositoryStatus[RepositoryStatus["LockUsed"] = 86022] = "LockUsed";
33566
+ /** An operation required creation of a ChangeSet, which failed */
33567
+ RepositoryStatus[RepositoryStatus["CannotCreateChangeSet"] = 86023] = "CannotCreateChangeSet";
33568
+ /** Request to server not understood */
33569
+ RepositoryStatus[RepositoryStatus["InvalidRequest"] = 86024] = "InvalidRequest";
33570
+ /** A change set committed to the server must be integrated into the briefcase before the operation can be completed */
33571
+ RepositoryStatus[RepositoryStatus["ChangeSetRequired"] = 86025] = "ChangeSetRequired";
33572
+ /** A requested DgnCode is reserved by another briefcase or in use */
33573
+ RepositoryStatus[RepositoryStatus["CodeUnavailable"] = 86026] = "CodeUnavailable";
33574
+ /** A DgnCode cannot be released because it has not been reserved by the requesting briefcase */
33575
+ RepositoryStatus[RepositoryStatus["CodeNotReserved"] = 86027] = "CodeNotReserved";
33576
+ /** A DgnCode cannot be relinquished because it has been used locally */
33577
+ RepositoryStatus[RepositoryStatus["CodeUsed"] = 86028] = "CodeUsed";
33578
+ /** A required lock is not held by this briefcase */
33579
+ RepositoryStatus[RepositoryStatus["LockNotHeld"] = 86029] = "LockNotHeld";
33580
+ /** Repository is currently locked, no changes allowed */
33581
+ RepositoryStatus[RepositoryStatus["RepositoryIsLocked"] = 86030] = "RepositoryIsLocked";
33582
+ /** Channel write constraint violation, such as an attempt to write outside the designated channel. */
33583
+ RepositoryStatus[RepositoryStatus["ChannelConstraintViolation"] = 86031] = "ChannelConstraintViolation";
33584
+ })(RepositoryStatus || (RepositoryStatus = {}));
33585
+
33586
+
33587
+ /***/ }),
33588
+
33589
+ /***/ "../../core/bentley/lib/esm/internal/cross-package.js":
33590
+ /*!************************************************************!*\
33591
+ !*** ../../core/bentley/lib/esm/internal/cross-package.js ***!
33592
+ \************************************************************/
33593
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33594
+
33595
+ "use strict";
33596
+ __webpack_require__.r(__webpack_exports__);
33597
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33598
+ /* harmony export */ "DbChangeStage": () => (/* reexport safe */ _BeSQLiteInternal__WEBPACK_IMPORTED_MODULE_2__.DbChangeStage),
33599
+ /* harmony export */ "DbConflictCause": () => (/* reexport safe */ _BeSQLiteInternal__WEBPACK_IMPORTED_MODULE_2__.DbConflictCause),
33600
+ /* harmony export */ "DbConflictResolution": () => (/* reexport safe */ _BeSQLiteInternal__WEBPACK_IMPORTED_MODULE_2__.DbConflictResolution),
33601
+ /* harmony export */ "DbValueType": () => (/* reexport safe */ _BeSQLiteInternal__WEBPACK_IMPORTED_MODULE_2__.DbValueType),
33602
+ /* harmony export */ "RepositoryStatus": () => (/* reexport safe */ _RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__.RepositoryStatus),
33603
+ /* harmony export */ "staticLoggerMetadata": () => (/* reexport safe */ _staticLoggerMetadata__WEBPACK_IMPORTED_MODULE_0__.staticLoggerMetadata)
33604
+ /* harmony export */ });
33605
+ /* harmony import */ var _staticLoggerMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./staticLoggerMetadata */ "../../core/bentley/lib/esm/internal/staticLoggerMetadata.js");
33606
+ /* harmony import */ var _RepositoryStatus__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RepositoryStatus */ "../../core/bentley/lib/esm/internal/RepositoryStatus.js");
33607
+ /* harmony import */ var _BeSQLiteInternal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BeSQLiteInternal */ "../../core/bentley/lib/esm/internal/BeSQLiteInternal.js");
33608
+ /*---------------------------------------------------------------------------------------------
33609
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
33610
+ * See LICENSE.md in the project root for license terms and full copyright notice.
33611
+ *--------------------------------------------------------------------------------------------*/
33612
+
33613
+
33614
+
33615
+
33616
+
33617
+ /***/ }),
33618
+
33619
+ /***/ "../../core/bentley/lib/esm/internal/staticLoggerMetadata.js":
33620
+ /*!*******************************************************************!*\
33621
+ !*** ../../core/bentley/lib/esm/internal/staticLoggerMetadata.js ***!
33622
+ \*******************************************************************/
33623
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33624
+
33625
+ "use strict";
33626
+ __webpack_require__.r(__webpack_exports__);
33627
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33628
+ /* harmony export */ "staticLoggerMetadata": () => (/* binding */ staticLoggerMetadata)
33629
+ /* harmony export */ });
33630
+ /*---------------------------------------------------------------------------------------------
33631
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
33632
+ * See LICENSE.md in the project root for license terms and full copyright notice.
33633
+ *--------------------------------------------------------------------------------------------*/
33634
+ /** @packageDocumentation
33635
+ * @module Logging
33636
+ */
33637
+ /** All static metadata is combined with per-call metadata and stringified in every log message.
33638
+ * Static metadata can either be an object or a function that returns an object.
33639
+ * Use a key to identify entries in the map so the can be removed individually.
33640
+ * @internal
33641
+ */
33642
+ const staticLoggerMetadata = new Map();
33643
+
33644
+
33643
33645
  /***/ }),
33644
33646
 
33645
33647
  /***/ "../../core/bentley/lib/esm/partitionArray.js":
@@ -42530,6 +42532,17 @@ class IModel {
42530
42532
  get iTwinId() { return this._iTwinId; }
42531
42533
  /** The Guid that identifies this iModel. */
42532
42534
  get iModelId() { return this._iModelId; }
42535
+ /** @public */
42536
+ get changeset() {
42537
+ return { ...this._changeset };
42538
+ }
42539
+ set changeset(changeset) {
42540
+ const prev = this._changeset;
42541
+ if (prev.id !== changeset.id || prev.index !== changeset.index) {
42542
+ this._changeset = { id: changeset.id, index: changeset.index };
42543
+ this.onChangesetChanged.raiseEvent(prev);
42544
+ }
42545
+ }
42533
42546
  /** The [[OpenMode]] used for this IModel. */
42534
42547
  get openMode() { return this._openMode; }
42535
42548
  /** Return a token for RPC operations.
@@ -42566,15 +42579,15 @@ class IModel {
42566
42579
  this.onEcefLocationChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42567
42580
  /** Event raised after [[geographicCoordinateSystem]] changes. */
42568
42581
  this.onGeographicCoordinateSystemChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42582
+ /** Event raised after [[changeset]] changes. */
42583
+ this.onChangesetChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
42569
42584
  this._openMode = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.OpenMode.Readonly;
42570
- this.changeset = { id: "", index: 0 };
42585
+ this._changeset = tokenProps?.changeset ?? { id: "", index: 0 };
42571
42586
  this._fileKey = "";
42572
42587
  if (tokenProps) {
42573
42588
  this._fileKey = tokenProps.key;
42574
42589
  this._iTwinId = tokenProps.iTwinId;
42575
42590
  this._iModelId = tokenProps.iModelId;
42576
- if (tokenProps.changeset)
42577
- this.changeset = tokenProps.changeset;
42578
42591
  }
42579
42592
  }
42580
42593
  /** @internal */
@@ -42656,7 +42669,6 @@ __webpack_require__.r(__webpack_exports__);
42656
42669
  /* harmony export */ "BentleyStatus": () => (/* reexport safe */ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus),
42657
42670
  /* harmony export */ "BriefcaseStatus": () => (/* reexport safe */ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BriefcaseStatus),
42658
42671
  /* harmony export */ "ChangeSetStatus": () => (/* reexport safe */ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ChangeSetStatus),
42659
- /* harmony export */ "ChannelConstraintError": () => (/* binding */ ChannelConstraintError),
42660
42672
  /* harmony export */ "ConflictingLocksError": () => (/* binding */ ConflictingLocksError),
42661
42673
  /* harmony export */ "DbResult": () => (/* reexport safe */ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.DbResult),
42662
42674
  /* harmony export */ "IModelError": () => (/* binding */ IModelError),
@@ -42731,15 +42743,6 @@ class BackendError extends IModelError {
42731
42743
  this.name = name;
42732
42744
  }
42733
42745
  }
42734
- /**
42735
- * Channel constraint error
42736
- * @alpha
42737
- */
42738
- class ChannelConstraintError extends IModelError {
42739
- constructor(message, getMetaData) {
42740
- super(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.RepositoryStatus.ChannelConstraintViolation, message, getMetaData);
42741
- }
42742
- }
42743
42746
  /** Intended for API "no content" semantics where the error case should not trigger application failure monitoring systems.
42744
42747
  * @public
42745
42748
  */
@@ -51308,7 +51311,6 @@ __webpack_require__.r(__webpack_exports__);
51308
51311
  /* harmony export */ "ChangeSetStatus": () => (/* reexport safe */ _IModelError__WEBPACK_IMPORTED_MODULE_68__.ChangeSetStatus),
51309
51312
  /* harmony export */ "ChangedValueState": () => (/* reexport safe */ _ECSqlTypes__WEBPACK_IMPORTED_MODULE_26__.ChangedValueState),
51310
51313
  /* harmony export */ "ChangesetType": () => (/* reexport safe */ _ChangesetProps__WEBPACK_IMPORTED_MODULE_16__.ChangesetType),
51311
- /* harmony export */ "ChannelConstraintError": () => (/* reexport safe */ _IModelError__WEBPACK_IMPORTED_MODULE_68__.ChannelConstraintError),
51312
51314
  /* harmony export */ "ClipIntersectionStyle": () => (/* reexport safe */ _ClipStyle__WEBPACK_IMPORTED_MODULE_17__.ClipIntersectionStyle),
51313
51315
  /* harmony export */ "ClipStyle": () => (/* reexport safe */ _ClipStyle__WEBPACK_IMPORTED_MODULE_17__.ClipStyle),
51314
51316
  /* harmony export */ "Code": () => (/* reexport safe */ _Code__WEBPACK_IMPORTED_MODULE_18__.Code),
@@ -61227,6 +61229,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__.
61227
61229
  async getConnectionProps(_iModelToken) { return this.forward(arguments); }
61228
61230
  async queryRows(_iModelToken, _request) { return this.forward(arguments); }
61229
61231
  async querySubCategories(_iModelToken, _categoryIds) { return this.forward(arguments); }
61232
+ async queryAllUsedSpatialSubCategories(_iModelToken) { return this.forward(arguments); }
61230
61233
  async queryBlob(_iModelToken, _request) { return this.forward(arguments); }
61231
61234
  async getModelProps(_iModelToken, _modelIds) { return this.forward(arguments); }
61232
61235
  async queryModelRanges(_iModelToken, _modelIds) { return this.forward(arguments); }
@@ -61266,13 +61269,16 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__.
61266
61269
  /** The immutable name of the interface. */
61267
61270
  IModelReadRpcInterface.interfaceName = "IModelReadRpcInterface";
61268
61271
  /** The semantic version of the interface. */
61269
- IModelReadRpcInterface.interfaceVersion = "3.6.0";
61272
+ IModelReadRpcInterface.interfaceVersion = "3.7.0";
61270
61273
  __decorate([
61271
61274
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_4__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
61272
61275
  ], IModelReadRpcInterface.prototype, "getConnectionProps", null);
61273
61276
  __decorate([
61274
61277
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_4__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
61275
61278
  ], IModelReadRpcInterface.prototype, "querySubCategories", null);
61279
+ __decorate([
61280
+ _core_RpcOperation__WEBPACK_IMPORTED_MODULE_4__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
61281
+ ], IModelReadRpcInterface.prototype, "queryAllUsedSpatialSubCategories", null);
61276
61282
  __decorate([
61277
61283
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_4__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
61278
61284
  ], IModelReadRpcInterface.prototype, "getModelProps", null);
@@ -88278,6 +88284,14 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
88278
88284
  async querySubCategories(compressedCategoryIds) {
88279
88285
  return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this.routingContext.token).querySubCategories(this.getRpcProps(), compressedCategoryIds);
88280
88286
  }
88287
+ /**
88288
+ * queries the BisCore.SubCategory table for entries that are children of used spatial categories and 3D elements.
88289
+ * @returns array of SubCategoryResultRow
88290
+ * @internal
88291
+ */
88292
+ async queryAllUsedSpatialSubCategories() {
88293
+ return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this.routingContext.token).queryAllUsedSpatialSubCategories(this.getRpcProps());
88294
+ }
88281
88295
  /** Execute a query and stream its results
88282
88296
  * The result of the query is async iterator over the rows. The iterator will get next page automatically once rows in current page has been read.
88283
88297
  * [ECSQL row]($docs/learning/ECSQLRowFormat).
@@ -94167,6 +94181,18 @@ class SubCategoriesCache {
94167
94181
  cancel: () => request.cancel(),
94168
94182
  };
94169
94183
  }
94184
+ /** Load all subcategories that come from used spatial categories of the iModel into the cache. */
94185
+ async loadAllUsedSpatialSubCategories() {
94186
+ try {
94187
+ const results = await this._imodel.queryAllUsedSpatialSubCategories();
94188
+ if (undefined !== results) {
94189
+ this.processResults(results, new Set(), false);
94190
+ }
94191
+ }
94192
+ catch (e) {
94193
+ // In case of a truncated response, gracefully handle the error and exit.
94194
+ }
94195
+ }
94170
94196
  /** Given categoryIds, return which of these are not cached. */
94171
94197
  getMissing(categoryIds) {
94172
94198
  let missing;
@@ -94192,9 +94218,10 @@ class SubCategoriesCache {
94192
94218
  props = JSON.parse(json);
94193
94219
  return new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.SubCategoryAppearance(props);
94194
94220
  }
94195
- processResults(result, missing) {
94196
- for (const row of result)
94197
- this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance));
94221
+ processResults(result, missing, override = true) {
94222
+ for (const row of result) {
94223
+ this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance), override);
94224
+ }
94198
94225
  // Ensure that any category Ids which returned no results (e.g., non-existent category, invalid Id, etc) are still recorded so they are not repeatedly re-requested
94199
94226
  for (const id of missing)
94200
94227
  if (undefined === this._byCategoryId.get(id))
@@ -94203,12 +94230,13 @@ class SubCategoriesCache {
94203
94230
  /** Exposed strictly for tests.
94204
94231
  * @internal
94205
94232
  */
94206
- add(categoryId, subCategoryId, appearance) {
94233
+ add(categoryId, subCategoryId, appearance, override) {
94207
94234
  let set = this._byCategoryId.get(categoryId);
94208
94235
  if (undefined === set)
94209
94236
  this._byCategoryId.set(categoryId, set = new Set());
94210
94237
  set.add(subCategoryId);
94211
- this._appearances.set(subCategoryId, appearance);
94238
+ if (override)
94239
+ this._appearances.set(subCategoryId, appearance);
94212
94240
  }
94213
94241
  async getCategoryInfo(inputCategoryIds) {
94214
94242
  // Eliminate duplicates...
@@ -95773,6 +95801,7 @@ class ViewCreator3d {
95773
95801
  const props = await this._createViewStateProps(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.CompressedId64Set.decompressArray(serializedProps.modelIds), _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.CompressedId64Set.decompressArray(serializedProps.categoryIds), baseExtents, options);
95774
95802
  const viewState = _SpatialViewState__WEBPACK_IMPORTED_MODULE_3__.SpatialViewState.createFromProps(props, this._imodel);
95775
95803
  try {
95804
+ await viewState.iModel.subcategories.loadAllUsedSpatialSubCategories();
95776
95805
  await viewState.load();
95777
95806
  }
95778
95807
  catch {
@@ -291017,7 +291046,7 @@ class TestContext {
291017
291046
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
291018
291047
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
291019
291048
  await core_frontend_1.NoRenderApp.startup({
291020
- applicationVersion: "4.8.0-dev.16",
291049
+ applicationVersion: "4.8.0-dev.17",
291021
291050
  applicationId: this.settings.gprid,
291022
291051
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
291023
291052
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -315009,7 +315038,7 @@ function __disposeResources(env) {
315009
315038
  /***/ ((module) => {
315010
315039
 
315011
315040
  "use strict";
315012
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.8.0-dev.16","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.8.0-dev.16","@itwin/core-bentley":"workspace:^4.8.0-dev.16","@itwin/core-common":"workspace:^4.8.0-dev.16","@itwin/core-geometry":"workspace:^4.8.0-dev.16","@itwin/core-orbitgt":"workspace:^4.8.0-dev.16","@itwin/core-quantity":"workspace:^4.8.0-dev.16"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
315041
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.8.0-dev.17","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.8.0-dev.17","@itwin/core-bentley":"workspace:^4.8.0-dev.17","@itwin/core-common":"workspace:^4.8.0-dev.17","@itwin/core-geometry":"workspace:^4.8.0-dev.17","@itwin/core-orbitgt":"workspace:^4.8.0-dev.17","@itwin/core-quantity":"workspace:^4.8.0-dev.17"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
315013
315042
 
315014
315043
  /***/ }),
315015
315044
 
@@ -315876,6 +315905,11 @@ describe("IModelReadRpcInterface Methods from an IModelConnection", () => {
315876
315905
  expect(candidate1Result).to.deep.eq({ ...expectedCandidate1Result, candidate: candidates[0] });
315877
315906
  expect(candidate2Result).to.deep.eq({ ...expectedCandidate2Result, candidate: candidates[1] });
315878
315907
  });
315908
+ it("queryAllUsedSpatialSubCategories should find subcategories coming from spatial categories of 3d Elements", async () => {
315909
+ const result = await iModel.queryAllUsedSpatialSubCategories();
315910
+ expect(result).to.not.be.null;
315911
+ expect(result.length).to.not.be.equal(0);
315912
+ });
315879
315913
  });
315880
315914
  describe("Snapping", () => {
315881
315915
  let iModel;