bruce-models 6.9.3 → 6.9.5
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.
- package/dist/bruce-models.es5.js +131 -17
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +131 -17
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +115 -6
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/mcp/navigator-chat.js +3 -0
- package/dist/lib/mcp/navigator-chat.js.map +1 -1
- package/dist/lib/mcp/navigator-mcp-websocket.js +12 -10
- package/dist/lib/mcp/navigator-mcp-websocket.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity.d.ts +12 -0
- package/dist/types/mcp/navigator-chat.d.ts +1 -0
- package/dist/types/mcp/navigator-mcp-websocket.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -3686,7 +3686,7 @@ var Entity;
|
|
|
3686
3686
|
*/
|
|
3687
3687
|
function Get(params) {
|
|
3688
3688
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3689
|
-
let { api, entityId, scenario, migrated, schemaId, req: reqParams, expandLocation, expandRelations, expandAttachments, expandLODs, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3689
|
+
let { api, entityId, scenario, migrated, schemaId, req: reqParams, expandLocation, expandRelations, expandAttachments, expandLODs, expandComments, expandEntityType, expand: expandStr, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3690
3690
|
if (!entityId) {
|
|
3691
3691
|
throw ("Entity ID is required.");
|
|
3692
3692
|
}
|
|
@@ -3704,6 +3704,9 @@ var Entity;
|
|
|
3704
3704
|
expandRelations,
|
|
3705
3705
|
expandAttachments,
|
|
3706
3706
|
expandLODs,
|
|
3707
|
+
expandComments,
|
|
3708
|
+
expandEntityType,
|
|
3709
|
+
expand: expandStr,
|
|
3707
3710
|
historicFrom,
|
|
3708
3711
|
historicKey,
|
|
3709
3712
|
historicTo,
|
|
@@ -3734,6 +3737,24 @@ var Entity;
|
|
|
3734
3737
|
}
|
|
3735
3738
|
expand += "attachment";
|
|
3736
3739
|
}
|
|
3740
|
+
if (expandEntityType) {
|
|
3741
|
+
if (expand) {
|
|
3742
|
+
expand += ",";
|
|
3743
|
+
}
|
|
3744
|
+
expand += "EntityType";
|
|
3745
|
+
}
|
|
3746
|
+
if (expandComments) {
|
|
3747
|
+
if (expand) {
|
|
3748
|
+
expand += ",";
|
|
3749
|
+
}
|
|
3750
|
+
expand += "comment";
|
|
3751
|
+
}
|
|
3752
|
+
if (expandStr) {
|
|
3753
|
+
if (expand) {
|
|
3754
|
+
expand += ",";
|
|
3755
|
+
}
|
|
3756
|
+
expand += expandStr;
|
|
3757
|
+
}
|
|
3737
3758
|
if (expand) {
|
|
3738
3759
|
urlParams.append("Expand", expand);
|
|
3739
3760
|
}
|
|
@@ -3787,7 +3808,7 @@ var Entity;
|
|
|
3787
3808
|
*/
|
|
3788
3809
|
function GetListByIds(params) {
|
|
3789
3810
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3790
|
-
let { api, entityIds, scenario, migrated, schemaId, req: reqParams, expandAttachments, expandLODs, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint,
|
|
3811
|
+
let { api, entityIds, scenario, migrated, schemaId, req: reqParams, expandAttachments, expandLODs, expandRelations, expandLocation, expandSources, expandImports, expandComments, expandEntityType, expand: expandStr, historicFrom, historicKey, historicTo, historicPoint, maxSearchTimeSec } = params;
|
|
3791
3812
|
if (!entityIds.length) {
|
|
3792
3813
|
throw ("Entity IDs are required.");
|
|
3793
3814
|
}
|
|
@@ -3805,13 +3826,16 @@ var Entity;
|
|
|
3805
3826
|
expandSources,
|
|
3806
3827
|
expandAttachments,
|
|
3807
3828
|
expandLODs,
|
|
3829
|
+
expandComments,
|
|
3830
|
+
expandEntityType,
|
|
3831
|
+
expand: expandStr,
|
|
3808
3832
|
entityTypeId: null,
|
|
3809
3833
|
historicFrom: historicFrom,
|
|
3810
3834
|
historicKey: historicKey,
|
|
3811
3835
|
historicTo: historicTo,
|
|
3812
3836
|
historicPoint: historicPoint,
|
|
3813
3837
|
schemaId: schemaId,
|
|
3814
|
-
scenario: scenario
|
|
3838
|
+
scenario: scenario,
|
|
3815
3839
|
};
|
|
3816
3840
|
const crashRiskReqs = [];
|
|
3817
3841
|
const reqIds = [];
|
|
@@ -3861,6 +3885,30 @@ var Entity;
|
|
|
3861
3885
|
reqData["Expand"] = "attachment";
|
|
3862
3886
|
}
|
|
3863
3887
|
}
|
|
3888
|
+
if (expandEntityType) {
|
|
3889
|
+
if (reqData["Expand"]) {
|
|
3890
|
+
reqData["Expand"] += ",EntityType";
|
|
3891
|
+
}
|
|
3892
|
+
else {
|
|
3893
|
+
reqData["Expand"] = "EntityType";
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
if (expandComments) {
|
|
3897
|
+
if (reqData["Expand"]) {
|
|
3898
|
+
reqData["Expand"] += ",comment";
|
|
3899
|
+
}
|
|
3900
|
+
else {
|
|
3901
|
+
reqData["Expand"] = "comment";
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
if (expandStr) {
|
|
3905
|
+
if (reqData["Expand"]) {
|
|
3906
|
+
reqData["Expand"] += `,${expandStr}`;
|
|
3907
|
+
}
|
|
3908
|
+
else {
|
|
3909
|
+
reqData["Expand"] = expandStr;
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3864
3912
|
if (expandLODs) {
|
|
3865
3913
|
reqData["LODType"] = "*";
|
|
3866
3914
|
}
|
|
@@ -4330,7 +4378,7 @@ var Entity;
|
|
|
4330
4378
|
function GetList(params) {
|
|
4331
4379
|
var _a;
|
|
4332
4380
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4333
|
-
let { api, filter, scenario, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, expandImports, historicFrom, historicKey, historicTo, historicPoint,
|
|
4381
|
+
let { api, filter, scenario, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, expandImports, expandLocation, expandSources, expandComments, expandEntityType, expand: expandStr, historicFrom, historicKey, historicTo, historicPoint, maxSearchTimeSec } = params;
|
|
4334
4382
|
if (!api) {
|
|
4335
4383
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
4336
4384
|
}
|
|
@@ -4381,7 +4429,7 @@ var Entity;
|
|
|
4381
4429
|
ExpandSources: expandSources,
|
|
4382
4430
|
Scenario: scenario
|
|
4383
4431
|
};
|
|
4384
|
-
if (expandLocation || expandRelations || expandImports) {
|
|
4432
|
+
if (expandLocation || expandRelations || expandImports || expandEntityType || expandComments || expandStr) {
|
|
4385
4433
|
let expand = "";
|
|
4386
4434
|
if (expandLocation) {
|
|
4387
4435
|
expand += "location";
|
|
@@ -4398,6 +4446,24 @@ var Entity;
|
|
|
4398
4446
|
}
|
|
4399
4447
|
expand += "import";
|
|
4400
4448
|
}
|
|
4449
|
+
if (expandEntityType) {
|
|
4450
|
+
if (expand) {
|
|
4451
|
+
expand += ",";
|
|
4452
|
+
}
|
|
4453
|
+
expand += "EntityType";
|
|
4454
|
+
}
|
|
4455
|
+
if (expandComments) {
|
|
4456
|
+
if (expand) {
|
|
4457
|
+
expand += ",";
|
|
4458
|
+
}
|
|
4459
|
+
expand += "comment";
|
|
4460
|
+
}
|
|
4461
|
+
if (expandStr) {
|
|
4462
|
+
if (expand) {
|
|
4463
|
+
expand += ",";
|
|
4464
|
+
}
|
|
4465
|
+
expand += expandStr;
|
|
4466
|
+
}
|
|
4401
4467
|
if (expand) {
|
|
4402
4468
|
body["Expand"] = expand;
|
|
4403
4469
|
}
|
|
@@ -4458,6 +4524,24 @@ var Entity;
|
|
|
4458
4524
|
}
|
|
4459
4525
|
expand += "Source";
|
|
4460
4526
|
}
|
|
4527
|
+
if (expandEntityType) {
|
|
4528
|
+
if (expand.length) {
|
|
4529
|
+
expand += ",";
|
|
4530
|
+
}
|
|
4531
|
+
expand += "EntityType";
|
|
4532
|
+
}
|
|
4533
|
+
if (expandComments) {
|
|
4534
|
+
if (expand.length) {
|
|
4535
|
+
expand += ",";
|
|
4536
|
+
}
|
|
4537
|
+
expand += "Comment";
|
|
4538
|
+
}
|
|
4539
|
+
if (expandStr) {
|
|
4540
|
+
if (expand.length) {
|
|
4541
|
+
expand += ",";
|
|
4542
|
+
}
|
|
4543
|
+
expand += expandStr;
|
|
4544
|
+
}
|
|
4461
4545
|
if (expand.length) {
|
|
4462
4546
|
urlParams.append("Expand", expand);
|
|
4463
4547
|
}
|
|
@@ -4521,6 +4605,30 @@ var Entity;
|
|
|
4521
4605
|
}
|
|
4522
4606
|
expand += "Import";
|
|
4523
4607
|
}
|
|
4608
|
+
if (expandSources) {
|
|
4609
|
+
if (expand.length) {
|
|
4610
|
+
expand += ",";
|
|
4611
|
+
}
|
|
4612
|
+
expand += "Source";
|
|
4613
|
+
}
|
|
4614
|
+
if (expandEntityType) {
|
|
4615
|
+
if (expand.length) {
|
|
4616
|
+
expand += ",";
|
|
4617
|
+
}
|
|
4618
|
+
expand += "EntityType";
|
|
4619
|
+
}
|
|
4620
|
+
if (expandComments) {
|
|
4621
|
+
if (expand.length) {
|
|
4622
|
+
expand += ",";
|
|
4623
|
+
}
|
|
4624
|
+
expand += "Comment";
|
|
4625
|
+
}
|
|
4626
|
+
if (expandStr) {
|
|
4627
|
+
if (expand.length) {
|
|
4628
|
+
expand += ",";
|
|
4629
|
+
}
|
|
4630
|
+
expand += expandStr;
|
|
4631
|
+
}
|
|
4524
4632
|
if (expand.length) {
|
|
4525
4633
|
urlParams.append("Expand", expand);
|
|
4526
4634
|
}
|
|
@@ -4659,7 +4767,7 @@ var Entity;
|
|
|
4659
4767
|
* @returns
|
|
4660
4768
|
*/
|
|
4661
4769
|
function GetCacheKey(params) {
|
|
4662
|
-
let { entityId, scenario: scenarioId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandAttachments, expandLODs, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
4770
|
+
let { entityId, scenario: scenarioId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandAttachments, expandLODs, expandSources, expandEntityType, expandComments, expand, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
4663
4771
|
if (!scenarioId) {
|
|
4664
4772
|
scenarioId = 0;
|
|
4665
4773
|
}
|
|
@@ -4686,6 +4794,7 @@ var Entity;
|
|
|
4686
4794
|
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}${String(Boolean(expandImports))}`;
|
|
4687
4795
|
key += `${String(Boolean(expandAttachments))}${String(Boolean(expandLODs))}`;
|
|
4688
4796
|
key += `${Api.ECacheKey.EntityHistoricData}${Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
|
|
4797
|
+
key += `${String(Boolean(expandEntityType))}${String(Boolean(expandComments))}${expand || ""}`;
|
|
4689
4798
|
key += `${Api.ECacheKey.Id}${scenarioId}`;
|
|
4690
4799
|
return key;
|
|
4691
4800
|
}
|
|
@@ -16631,6 +16740,9 @@ class NavigatorChatClient {
|
|
|
16631
16740
|
if (auth === null || auth === void 0 ? void 0 : auth.fingerprint) {
|
|
16632
16741
|
headers["X-Fingerprint"] = auth.fingerprint;
|
|
16633
16742
|
}
|
|
16743
|
+
if (auth === null || auth === void 0 ? void 0 : auth.apiBaseUrl) {
|
|
16744
|
+
headers["X-Api-Base-Url"] = auth.apiBaseUrl;
|
|
16745
|
+
}
|
|
16634
16746
|
const response = yield fetchImpl(this.buildUrl(path), Object.assign(Object.assign({}, init), { headers }));
|
|
16635
16747
|
if (!response.ok) {
|
|
16636
16748
|
const message = yield this.safeReadResponseText(response);
|
|
@@ -16693,7 +16805,7 @@ class NavigatorMcpWebSocketClient {
|
|
|
16693
16805
|
}
|
|
16694
16806
|
}
|
|
16695
16807
|
connect(auth) {
|
|
16696
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
16808
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
16697
16809
|
if (auth) {
|
|
16698
16810
|
this.currentAuth = auth;
|
|
16699
16811
|
}
|
|
@@ -16701,14 +16813,10 @@ class NavigatorMcpWebSocketClient {
|
|
|
16701
16813
|
(_c = (_b = this.logger()).debug) === null || _c === void 0 ? void 0 : _c.call(_b, "[NavigatorMcpWS] Connection already active or in-flight; skipping connect.");
|
|
16702
16814
|
return;
|
|
16703
16815
|
}
|
|
16704
|
-
if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId)) {
|
|
16705
|
-
(_f = (_e = this.logger()).debug) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Missing accountId; connection not started.");
|
|
16706
|
-
return;
|
|
16707
|
-
}
|
|
16708
16816
|
try {
|
|
16709
16817
|
this.isConnecting = true;
|
|
16710
16818
|
const url = this.buildUrl();
|
|
16711
|
-
(
|
|
16819
|
+
(_e = (_d = this.logger()).log) === null || _e === void 0 ? void 0 : _e.call(_d, "[NavigatorMcpWS] Connecting to", url);
|
|
16712
16820
|
this.ws = new WebSocket(url);
|
|
16713
16821
|
this.ws.onopen = (event) => {
|
|
16714
16822
|
var _a, _b, _c, _d;
|
|
@@ -16735,7 +16843,7 @@ class NavigatorMcpWebSocketClient {
|
|
|
16735
16843
|
};
|
|
16736
16844
|
}
|
|
16737
16845
|
catch (error) {
|
|
16738
|
-
(
|
|
16846
|
+
(_g = (_f = this.logger()).error) === null || _g === void 0 ? void 0 : _g.call(_f, "[NavigatorMcpWS] Failed to establish connection", error);
|
|
16739
16847
|
this.isConnecting = false;
|
|
16740
16848
|
}
|
|
16741
16849
|
}
|
|
@@ -16769,12 +16877,14 @@ class NavigatorMcpWebSocketClient {
|
|
|
16769
16877
|
return this.appendAuthParams(url);
|
|
16770
16878
|
}
|
|
16771
16879
|
appendAuthParams(url) {
|
|
16772
|
-
|
|
16773
|
-
if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)) {
|
|
16880
|
+
if (!this.currentAuth) {
|
|
16774
16881
|
return url;
|
|
16775
16882
|
}
|
|
16776
16883
|
const urlInstance = new URL(url);
|
|
16777
|
-
|
|
16884
|
+
// Add accountId if provided
|
|
16885
|
+
if (this.currentAuth.accountId) {
|
|
16886
|
+
urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
|
|
16887
|
+
}
|
|
16778
16888
|
// Only add sessionId if it's provided (support anonymous access)
|
|
16779
16889
|
if (this.currentAuth.sessionId) {
|
|
16780
16890
|
urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
|
|
@@ -16783,6 +16893,10 @@ class NavigatorMcpWebSocketClient {
|
|
|
16783
16893
|
if (this.currentAuth.fingerprint) {
|
|
16784
16894
|
urlInstance.searchParams.set("fingerprint", this.currentAuth.fingerprint);
|
|
16785
16895
|
}
|
|
16896
|
+
// Add apiBaseUrl if provided (for anonymous access)
|
|
16897
|
+
if (this.currentAuth.apiBaseUrl) {
|
|
16898
|
+
urlInstance.searchParams.set("apiBaseUrl", this.currentAuth.apiBaseUrl);
|
|
16899
|
+
}
|
|
16786
16900
|
// Preserve the hash (unlikely to be used, but consistent with URL semantics)
|
|
16787
16901
|
return urlInstance.toString();
|
|
16788
16902
|
}
|
|
@@ -16839,7 +16953,7 @@ class NavigatorMcpWebSocketClient {
|
|
|
16839
16953
|
}
|
|
16840
16954
|
|
|
16841
16955
|
// This is updated with the package.json version on build.
|
|
16842
|
-
const VERSION = "6.9.
|
|
16956
|
+
const VERSION = "6.9.5";
|
|
16843
16957
|
|
|
16844
16958
|
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 };
|
|
16845
16959
|
//# sourceMappingURL=bruce-models.es5.js.map
|