bruce-models 6.9.4 → 6.9.6

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.
@@ -9231,7 +9231,6 @@ var Uploader;
9231
9231
  };
9232
9232
  data = yield api.UPLOAD(url, partialFile, reqParams);
9233
9233
  retryCount = 0;
9234
- uploaded += partSize;
9235
9234
  // Flush the pending upload.
9236
9235
  const pendingLoaded = uploadedPending.get(filePartIndex) || 0;
9237
9236
  uploaded += pendingLoaded;
@@ -16740,6 +16739,9 @@ class NavigatorChatClient {
16740
16739
  if (auth === null || auth === void 0 ? void 0 : auth.fingerprint) {
16741
16740
  headers["X-Fingerprint"] = auth.fingerprint;
16742
16741
  }
16742
+ if (auth === null || auth === void 0 ? void 0 : auth.apiBaseUrl) {
16743
+ headers["X-Api-Base-Url"] = auth.apiBaseUrl;
16744
+ }
16743
16745
  const response = yield fetchImpl(this.buildUrl(path), Object.assign(Object.assign({}, init), { headers }));
16744
16746
  if (!response.ok) {
16745
16747
  const message = yield this.safeReadResponseText(response);
@@ -16802,7 +16804,7 @@ class NavigatorMcpWebSocketClient {
16802
16804
  }
16803
16805
  }
16804
16806
  connect(auth) {
16805
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16807
+ var _a, _b, _c, _d, _e, _f, _g;
16806
16808
  if (auth) {
16807
16809
  this.currentAuth = auth;
16808
16810
  }
@@ -16810,14 +16812,10 @@ class NavigatorMcpWebSocketClient {
16810
16812
  (_c = (_b = this.logger()).debug) === null || _c === void 0 ? void 0 : _c.call(_b, "[NavigatorMcpWS] Connection already active or in-flight; skipping connect.");
16811
16813
  return;
16812
16814
  }
16813
- if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId)) {
16814
- (_f = (_e = this.logger()).debug) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Missing accountId; connection not started.");
16815
- return;
16816
- }
16817
16815
  try {
16818
16816
  this.isConnecting = true;
16819
16817
  const url = this.buildUrl();
16820
- (_h = (_g = this.logger()).log) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Connecting to", url);
16818
+ (_e = (_d = this.logger()).log) === null || _e === void 0 ? void 0 : _e.call(_d, "[NavigatorMcpWS] Connecting to", url);
16821
16819
  this.ws = new WebSocket(url);
16822
16820
  this.ws.onopen = (event) => {
16823
16821
  var _a, _b, _c, _d;
@@ -16844,7 +16842,7 @@ class NavigatorMcpWebSocketClient {
16844
16842
  };
16845
16843
  }
16846
16844
  catch (error) {
16847
- (_k = (_j = this.logger()).error) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Failed to establish connection", error);
16845
+ (_g = (_f = this.logger()).error) === null || _g === void 0 ? void 0 : _g.call(_f, "[NavigatorMcpWS] Failed to establish connection", error);
16848
16846
  this.isConnecting = false;
16849
16847
  }
16850
16848
  }
@@ -16878,12 +16876,14 @@ class NavigatorMcpWebSocketClient {
16878
16876
  return this.appendAuthParams(url);
16879
16877
  }
16880
16878
  appendAuthParams(url) {
16881
- var _a;
16882
- if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)) {
16879
+ if (!this.currentAuth) {
16883
16880
  return url;
16884
16881
  }
16885
16882
  const urlInstance = new URL(url);
16886
- urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
16883
+ // Add accountId if provided
16884
+ if (this.currentAuth.accountId) {
16885
+ urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
16886
+ }
16887
16887
  // Only add sessionId if it's provided (support anonymous access)
16888
16888
  if (this.currentAuth.sessionId) {
16889
16889
  urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
@@ -16892,6 +16892,10 @@ class NavigatorMcpWebSocketClient {
16892
16892
  if (this.currentAuth.fingerprint) {
16893
16893
  urlInstance.searchParams.set("fingerprint", this.currentAuth.fingerprint);
16894
16894
  }
16895
+ // Add apiBaseUrl if provided (for anonymous access)
16896
+ if (this.currentAuth.apiBaseUrl) {
16897
+ urlInstance.searchParams.set("apiBaseUrl", this.currentAuth.apiBaseUrl);
16898
+ }
16895
16899
  // Preserve the hash (unlikely to be used, but consistent with URL semantics)
16896
16900
  return urlInstance.toString();
16897
16901
  }
@@ -16948,7 +16952,7 @@ class NavigatorMcpWebSocketClient {
16948
16952
  }
16949
16953
 
16950
16954
  // This is updated with the package.json version on build.
16951
- const VERSION = "6.9.4";
16955
+ const VERSION = "6.9.6";
16952
16956
 
16953
16957
  export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient };
16954
16958
  //# sourceMappingURL=bruce-models.es5.js.map