bruce-models 7.1.26 → 7.1.28
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 +90 -29
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +90 -29
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-type.js +79 -26
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +10 -2
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-type.d.ts +40 -1
- package/dist/types/entity/entity.d.ts +2 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -3319,14 +3319,14 @@ var EntityType;
|
|
|
3319
3319
|
*/
|
|
3320
3320
|
function Get(params) {
|
|
3321
3321
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3322
|
-
let { api, entityTypeId: typeId, req: reqParams, expandLODs } = params;
|
|
3322
|
+
let { api, entityTypeId: typeId, req: reqParams, expandLODs, expandOntologyDiagramSettings } = params;
|
|
3323
3323
|
if (!typeId) {
|
|
3324
3324
|
throw ("Type ID is required.");
|
|
3325
3325
|
}
|
|
3326
3326
|
if (!api) {
|
|
3327
3327
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
3328
3328
|
}
|
|
3329
|
-
const key = GetCacheKey(typeId, expandLODs);
|
|
3329
|
+
const key = GetCacheKey(typeId, expandLODs, expandOntologyDiagramSettings);
|
|
3330
3330
|
const cache = api.GetCacheItem(key, reqParams);
|
|
3331
3331
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
3332
3332
|
return cache.data;
|
|
@@ -3334,9 +3334,10 @@ var EntityType;
|
|
|
3334
3334
|
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
3335
3335
|
try {
|
|
3336
3336
|
const urlParams = new URLSearchParams();
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3337
|
+
appendEntityTypeExpandParams(urlParams, {
|
|
3338
|
+
expandLODs,
|
|
3339
|
+
expandOntologyDiagramSettings
|
|
3340
|
+
});
|
|
3340
3341
|
const url = `entitytype/${typeId}?${urlParams.toString()}`;
|
|
3341
3342
|
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
3342
3343
|
appendInternalAttrSchema(data);
|
|
@@ -3383,7 +3384,7 @@ var EntityType;
|
|
|
3383
3384
|
*/
|
|
3384
3385
|
function GetList(params) {
|
|
3385
3386
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3386
|
-
let { entityTypeIds, api, req: reqParams, parentTypeId, expandSettings, search, expandLODs } = params;
|
|
3387
|
+
let { entityTypeIds, api, req: reqParams, parentTypeId, expandSettings, search, expandLODs, expandOntologyDiagramSettings } = params;
|
|
3387
3388
|
if (!api) {
|
|
3388
3389
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
3389
3390
|
}
|
|
@@ -3392,6 +3393,7 @@ var EntityType;
|
|
|
3392
3393
|
parentTypeId,
|
|
3393
3394
|
expandLODs,
|
|
3394
3395
|
expandSettings,
|
|
3396
|
+
expandOntologyDiagramSettings,
|
|
3395
3397
|
search
|
|
3396
3398
|
}), reqParams);
|
|
3397
3399
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
@@ -3412,15 +3414,11 @@ var EntityType;
|
|
|
3412
3414
|
if (parentTypeId) {
|
|
3413
3415
|
urlParams.append("ParentTypeID", parentTypeId);
|
|
3414
3416
|
}
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
}
|
|
3421
|
-
else if (expandLODs) {
|
|
3422
|
-
urlParams.append("Expand", "LOD");
|
|
3423
|
-
}
|
|
3417
|
+
appendEntityTypeExpandParams(urlParams, {
|
|
3418
|
+
expandSettings,
|
|
3419
|
+
expandLODs,
|
|
3420
|
+
expandOntologyDiagramSettings
|
|
3421
|
+
});
|
|
3424
3422
|
if (search) {
|
|
3425
3423
|
urlParams.append("Search", search);
|
|
3426
3424
|
}
|
|
@@ -3432,15 +3430,11 @@ var EntityType;
|
|
|
3432
3430
|
if (parentTypeId) {
|
|
3433
3431
|
urlParams.append("ParentTypeID", parentTypeId);
|
|
3434
3432
|
}
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
}
|
|
3441
|
-
else if (expandLODs) {
|
|
3442
|
-
urlParams.append("Expand", "LOD");
|
|
3443
|
-
}
|
|
3433
|
+
appendEntityTypeExpandParams(urlParams, {
|
|
3434
|
+
expandSettings,
|
|
3435
|
+
expandLODs,
|
|
3436
|
+
expandOntologyDiagramSettings
|
|
3437
|
+
});
|
|
3444
3438
|
if (search) {
|
|
3445
3439
|
urlParams.append("Search", search);
|
|
3446
3440
|
}
|
|
@@ -3472,6 +3466,7 @@ var EntityType;
|
|
|
3472
3466
|
parentTypeId,
|
|
3473
3467
|
expandSettings,
|
|
3474
3468
|
expandLODs,
|
|
3469
|
+
expandOntologyDiagramSettings,
|
|
3475
3470
|
search
|
|
3476
3471
|
}),
|
|
3477
3472
|
value: req,
|
|
@@ -3517,6 +3512,31 @@ var EntityType;
|
|
|
3517
3512
|
});
|
|
3518
3513
|
}
|
|
3519
3514
|
EntityType.Update = Update;
|
|
3515
|
+
/**
|
|
3516
|
+
* Updates only the OntologyDiagramSettings for the specified Entity Type.
|
|
3517
|
+
* This calls: POST entityType/{entityType_id}/ontologyDiagramSettings
|
|
3518
|
+
*/
|
|
3519
|
+
function UpdateOntologyDiagramSettings(params) {
|
|
3520
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3521
|
+
let { api, entityTypeId, ontologyDiagramSettings, req } = params;
|
|
3522
|
+
if (!entityTypeId) {
|
|
3523
|
+
throw ("Type ID is required.");
|
|
3524
|
+
}
|
|
3525
|
+
if (ontologyDiagramSettings == null) {
|
|
3526
|
+
throw ("OntologyDiagramSettings is required.");
|
|
3527
|
+
}
|
|
3528
|
+
if (!api) {
|
|
3529
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
3530
|
+
}
|
|
3531
|
+
const res = yield api.POST(`entityType/${entityTypeId}/ontologyDiagramSettings`, {
|
|
3532
|
+
OntologyDiagramSettings: ontologyDiagramSettings
|
|
3533
|
+
}, Api.PrepReqParams(req));
|
|
3534
|
+
api.Cache.RemoveByStartsWith(GetCacheKey(entityTypeId));
|
|
3535
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
3536
|
+
return ParseUpdateOntologyDiagramSettingsResponse(res);
|
|
3537
|
+
});
|
|
3538
|
+
}
|
|
3539
|
+
EntityType.UpdateOntologyDiagramSettings = UpdateOntologyDiagramSettings;
|
|
3520
3540
|
/**
|
|
3521
3541
|
* Starts a re-index background action on a specified Entity Type.
|
|
3522
3542
|
* This will ensure searchable data follows the current schema version.
|
|
@@ -3691,6 +3711,21 @@ var EntityType;
|
|
|
3691
3711
|
return [];
|
|
3692
3712
|
}
|
|
3693
3713
|
EntityType.ParseDictionaryDataSchemaDependenciesResponse = ParseDictionaryDataSchemaDependenciesResponse;
|
|
3714
|
+
/**
|
|
3715
|
+
* Normalizes response from UpdateOntologyDiagramSettings.
|
|
3716
|
+
* Supports direct response payloads and wrapper shapes.
|
|
3717
|
+
*/
|
|
3718
|
+
function ParseUpdateOntologyDiagramSettingsResponse(response) {
|
|
3719
|
+
var _a, _b, _c;
|
|
3720
|
+
const parsed = parseObject$1(response);
|
|
3721
|
+
const parsedResult = (_a = parseObject$1(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
|
|
3722
|
+
return {
|
|
3723
|
+
entityTypeId: (_b = parsed === null || parsed === void 0 ? void 0 : parsed["EntityType.ID"]) !== null && _b !== void 0 ? _b : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult["EntityType.ID"],
|
|
3724
|
+
ontologyDiagramSettings: (_c = parsed === null || parsed === void 0 ? void 0 : parsed.OntologyDiagramSettings) !== null && _c !== void 0 ? _c : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.OntologyDiagramSettings,
|
|
3725
|
+
raw: parsed
|
|
3726
|
+
};
|
|
3727
|
+
}
|
|
3728
|
+
EntityType.ParseUpdateOntologyDiagramSettingsResponse = ParseUpdateOntologyDiagramSettingsResponse;
|
|
3694
3729
|
/**
|
|
3695
3730
|
* Normalizes response from ExportOntology.
|
|
3696
3731
|
* Supports both direct response payloads and wrapper shapes.
|
|
@@ -3768,11 +3803,14 @@ var EntityType;
|
|
|
3768
3803
|
* @param expandLODs
|
|
3769
3804
|
* @returns
|
|
3770
3805
|
*/
|
|
3771
|
-
function GetCacheKey(typeId, expandLODs) {
|
|
3806
|
+
function GetCacheKey(typeId, expandLODs, expandOntologyDiagramSettings) {
|
|
3772
3807
|
let key = `${Api.ECacheKey.EntityType}${Api.ECacheKey.Id}${typeId}`;
|
|
3773
3808
|
if (expandLODs) {
|
|
3774
3809
|
key += "_LOD_" + expandLODs;
|
|
3775
3810
|
}
|
|
3811
|
+
if (expandOntologyDiagramSettings) {
|
|
3812
|
+
key += "_ONTOLOGY_DIAGRAM_SETTINGS_" + expandOntologyDiagramSettings;
|
|
3813
|
+
}
|
|
3776
3814
|
return key;
|
|
3777
3815
|
}
|
|
3778
3816
|
EntityType.GetCacheKey = GetCacheKey;
|
|
@@ -3790,7 +3828,7 @@ var EntityType;
|
|
|
3790
3828
|
if (!params) {
|
|
3791
3829
|
params = {};
|
|
3792
3830
|
}
|
|
3793
|
-
let { typeIds, expandSettings, parentTypeId, expandLODs, search } = params;
|
|
3831
|
+
let { typeIds, expandSettings, parentTypeId, expandLODs, expandOntologyDiagramSettings, search } = params;
|
|
3794
3832
|
let key = Api.ECacheKey.EntityType;
|
|
3795
3833
|
if (!typeIds) {
|
|
3796
3834
|
typeIds = [];
|
|
@@ -3805,8 +3843,12 @@ var EntityType;
|
|
|
3805
3843
|
if (!expandLODs) {
|
|
3806
3844
|
expandLODs = false;
|
|
3807
3845
|
}
|
|
3846
|
+
if (!expandOntologyDiagramSettings) {
|
|
3847
|
+
expandOntologyDiagramSettings = false;
|
|
3848
|
+
}
|
|
3808
3849
|
key += "_SCHEMA_" + expandSettings;
|
|
3809
3850
|
key += "_LOD_" + expandLODs;
|
|
3851
|
+
key += "_ONTOLOGY_DIAGRAM_SETTINGS_" + expandOntologyDiagramSettings;
|
|
3810
3852
|
if (search) {
|
|
3811
3853
|
key += "_SEARCH_" + search;
|
|
3812
3854
|
}
|
|
@@ -3814,6 +3856,17 @@ var EntityType;
|
|
|
3814
3856
|
}
|
|
3815
3857
|
EntityType.GetListCacheKey = GetListCacheKey;
|
|
3816
3858
|
})(EntityType || (EntityType = {}));
|
|
3859
|
+
function appendEntityTypeExpandParams(urlParams, params) {
|
|
3860
|
+
if (params.expandSettings) {
|
|
3861
|
+
urlParams.append("Expand", "Schema");
|
|
3862
|
+
}
|
|
3863
|
+
if (params.expandLODs) {
|
|
3864
|
+
urlParams.append("Expand", "LOD");
|
|
3865
|
+
}
|
|
3866
|
+
if (params.expandOntologyDiagramSettings) {
|
|
3867
|
+
urlParams.append("Expand", "ontologydiagramsettings");
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3817
3870
|
function parseObject$1(data) {
|
|
3818
3871
|
if (data == null || data == undefined) {
|
|
3819
3872
|
return null;
|
|
@@ -4170,7 +4223,7 @@ var Entity;
|
|
|
4170
4223
|
*/
|
|
4171
4224
|
function GetListByIds(params) {
|
|
4172
4225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4173
|
-
let { api, entityIds, scenario, migrated, schemaId, req: reqParams, expandAttachments, expandLODs, expandRelations, expandLocation, expandSources, expandImports, expandComments, expandEntityType, expand: expandStr, historicFrom, historicKey, historicTo, historicPoint, maxSearchTimeSec } = params;
|
|
4226
|
+
let { api, entityIds, scenario, migrated, schemaId, req: reqParams, entityTypeId: typeId, expandAttachments, expandLODs, expandRelations, expandLocation, expandSources, expandImports, expandComments, expandEntityType, expand: expandStr, historicFrom, historicKey, historicTo, historicPoint, maxSearchTimeSec } = params;
|
|
4174
4227
|
if (!entityIds.length) {
|
|
4175
4228
|
throw ("Entity IDs are required.");
|
|
4176
4229
|
}
|
|
@@ -4198,6 +4251,7 @@ var Entity;
|
|
|
4198
4251
|
historicPoint: historicPoint,
|
|
4199
4252
|
schemaId: schemaId,
|
|
4200
4253
|
scenario: scenario,
|
|
4254
|
+
typeId: typeId
|
|
4201
4255
|
};
|
|
4202
4256
|
const crashRiskReqs = [];
|
|
4203
4257
|
const reqIds = [];
|
|
@@ -4297,6 +4351,9 @@ var Entity;
|
|
|
4297
4351
|
if (scenario) {
|
|
4298
4352
|
reqData["Scenario"] = scenario;
|
|
4299
4353
|
}
|
|
4354
|
+
if (typeId) {
|
|
4355
|
+
reqData["Type"] = typeId;
|
|
4356
|
+
}
|
|
4300
4357
|
const urlParams = new URLSearchParams();
|
|
4301
4358
|
if (schemaId) {
|
|
4302
4359
|
urlParams.set("Schema", schemaId);
|
|
@@ -5132,7 +5189,7 @@ var Entity;
|
|
|
5132
5189
|
* @returns
|
|
5133
5190
|
*/
|
|
5134
5191
|
function GetCacheKey(params) {
|
|
5135
|
-
let { entityId, scenario: scenarioId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandAttachments, expandLODs, expandSources, expandEntityType, expandComments, expand, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
5192
|
+
let { entityId, scenario: scenarioId, entityTypeId, schemaId, typeId, expandLocation, expandRelations, expandImports, expandAttachments, expandLODs, expandSources, expandEntityType, expandComments, expand, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
5136
5193
|
if (!scenarioId) {
|
|
5137
5194
|
scenarioId = 0;
|
|
5138
5195
|
}
|
|
@@ -5155,12 +5212,16 @@ var Entity;
|
|
|
5155
5212
|
if (!schemaId) {
|
|
5156
5213
|
schemaId = "";
|
|
5157
5214
|
}
|
|
5215
|
+
if (!typeId) {
|
|
5216
|
+
typeId = "";
|
|
5217
|
+
}
|
|
5158
5218
|
let key = `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${schemaId}`;
|
|
5159
5219
|
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}${String(Boolean(expandImports))}`;
|
|
5160
5220
|
key += `${String(Boolean(expandAttachments))}${String(Boolean(expandLODs))}`;
|
|
5161
5221
|
key += `${Api.ECacheKey.EntityHistoricData}${Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
|
|
5162
5222
|
key += `${String(Boolean(expandEntityType))}${String(Boolean(expandComments))}${expand || ""}`;
|
|
5163
5223
|
key += `${Api.ECacheKey.Id}${scenarioId}`;
|
|
5224
|
+
key += `${typeId}`;
|
|
5164
5225
|
return key;
|
|
5165
5226
|
}
|
|
5166
5227
|
Entity.GetCacheKey = GetCacheKey;
|
|
@@ -17995,7 +18056,7 @@ var ChangeSet;
|
|
|
17995
18056
|
})(ChangeSet || (ChangeSet = {}));
|
|
17996
18057
|
|
|
17997
18058
|
// This is updated with the package.json version on build.
|
|
17998
|
-
const VERSION = "7.1.
|
|
18059
|
+
const VERSION = "7.1.28";
|
|
17999
18060
|
|
|
18000
18061
|
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, EntityTypeTrigger, 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, DataFeed, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient, ChangeSet };
|
|
18001
18062
|
//# sourceMappingURL=bruce-models.es5.js.map
|