bruce-models 7.1.64 → 7.1.65
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 +167 -5
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +161 -4
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/api.js +1 -0
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/entity/entity-type.js +15 -3
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/ontology.js +164 -0
- package/dist/lib/entity/ontology.js.map +1 -0
- package/dist/types/api/api.d.ts +1 -0
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/entity/entity-type.d.ts +3 -0
- package/dist/types/entity/ontology.d.ts +56 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -39,6 +39,7 @@ var Api;
|
|
|
39
39
|
ECacheKey["Assembly"] = "assembly";
|
|
40
40
|
ECacheKey["Entity"] = "entity";
|
|
41
41
|
ECacheKey["EntityType"] = "entitytype";
|
|
42
|
+
ECacheKey["Ontology"] = "ontology";
|
|
42
43
|
ECacheKey["EntityTypeTrigger"] = "entitytypetrigger";
|
|
43
44
|
ECacheKey["DataFeed"] = "datafeed";
|
|
44
45
|
ECacheKey["ProjectView"] = "projectview";
|
|
@@ -5295,7 +5296,7 @@ var EntityType;
|
|
|
5295
5296
|
*/
|
|
5296
5297
|
function GetList(params) {
|
|
5297
5298
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5298
|
-
let { entityTypeIds, api, req: reqParams, parentTypeId, expandSettings, search, expandLODs, expandOntologyDiagramSettings } = params;
|
|
5299
|
+
let { entityTypeIds, api, req: reqParams, parentTypeId, ontologyId, expandSettings, search, expandLODs, expandOntologyDiagramSettings } = params;
|
|
5299
5300
|
if (!api) {
|
|
5300
5301
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
5301
5302
|
}
|
|
@@ -5325,6 +5326,10 @@ var EntityType;
|
|
|
5325
5326
|
if (parentTypeId) {
|
|
5326
5327
|
urlParams.append("ParentTypeID", parentTypeId);
|
|
5327
5328
|
}
|
|
5329
|
+
if (ontologyId != null && ontologyId !== "") {
|
|
5330
|
+
urlParams.append("Ontology.ID", String(ontologyId));
|
|
5331
|
+
urlParams.append("ontologyId", String(ontologyId));
|
|
5332
|
+
}
|
|
5328
5333
|
appendEntityTypeExpandParams(urlParams, {
|
|
5329
5334
|
expandSettings,
|
|
5330
5335
|
expandLODs,
|
|
@@ -5341,6 +5346,10 @@ var EntityType;
|
|
|
5341
5346
|
if (parentTypeId) {
|
|
5342
5347
|
urlParams.append("ParentTypeID", parentTypeId);
|
|
5343
5348
|
}
|
|
5349
|
+
if (ontologyId != null && ontologyId !== "") {
|
|
5350
|
+
urlParams.append("Ontology.ID", String(ontologyId));
|
|
5351
|
+
urlParams.append("ontologyId", String(ontologyId));
|
|
5352
|
+
}
|
|
5344
5353
|
appendEntityTypeExpandParams(urlParams, {
|
|
5345
5354
|
expandSettings,
|
|
5346
5355
|
expandLODs,
|
|
@@ -5378,7 +5387,8 @@ var EntityType;
|
|
|
5378
5387
|
expandSettings,
|
|
5379
5388
|
expandLODs,
|
|
5380
5389
|
expandOntologyDiagramSettings,
|
|
5381
|
-
search
|
|
5390
|
+
search,
|
|
5391
|
+
ontologyId
|
|
5382
5392
|
}),
|
|
5383
5393
|
value: req,
|
|
5384
5394
|
req: reqParams,
|
|
@@ -5806,7 +5816,7 @@ var EntityType;
|
|
|
5806
5816
|
if (!params) {
|
|
5807
5817
|
params = {};
|
|
5808
5818
|
}
|
|
5809
|
-
let { typeIds, expandSettings, parentTypeId, expandLODs, expandOntologyDiagramSettings, search } = params;
|
|
5819
|
+
let { typeIds, expandSettings, parentTypeId, ontologyId, expandLODs, expandOntologyDiagramSettings, search } = params;
|
|
5810
5820
|
let key = Api.ECacheKey.EntityType;
|
|
5811
5821
|
if (!typeIds) {
|
|
5812
5822
|
typeIds = [];
|
|
@@ -5815,6 +5825,9 @@ var EntityType;
|
|
|
5815
5825
|
if (parentTypeId) {
|
|
5816
5826
|
key += "_PARENT_" + parentTypeId;
|
|
5817
5827
|
}
|
|
5828
|
+
if (ontologyId != null && ontologyId !== "") {
|
|
5829
|
+
key += "_ONTOLOGY_" + ontologyId;
|
|
5830
|
+
}
|
|
5818
5831
|
if (!expandSettings) {
|
|
5819
5832
|
expandSettings = false;
|
|
5820
5833
|
}
|
|
@@ -13900,6 +13913,155 @@ function parseObject$3(data) {
|
|
|
13900
13913
|
return data;
|
|
13901
13914
|
}
|
|
13902
13915
|
|
|
13916
|
+
/**
|
|
13917
|
+
* Describes the "Ontology" concept within Nextspace.
|
|
13918
|
+
* Ontologies group Entity Types and can be used to filter entity-type listings.
|
|
13919
|
+
*/
|
|
13920
|
+
var Ontology;
|
|
13921
|
+
(function (Ontology) {
|
|
13922
|
+
function Get(params) {
|
|
13923
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13924
|
+
let { api, ontologyId, req: reqParams } = params;
|
|
13925
|
+
if (ontologyId == null || ontologyId === "") {
|
|
13926
|
+
throw ("Ontology ID is required.");
|
|
13927
|
+
}
|
|
13928
|
+
if (!api) {
|
|
13929
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13930
|
+
}
|
|
13931
|
+
const key = GetCacheKey(ontologyId);
|
|
13932
|
+
const cache = api.GetCacheItem(key, reqParams);
|
|
13933
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
13934
|
+
return cache.data;
|
|
13935
|
+
}
|
|
13936
|
+
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
13937
|
+
try {
|
|
13938
|
+
const data = yield api.GET(`ontology/${ontologyId}`, Api.PrepReqParams(reqParams));
|
|
13939
|
+
res({
|
|
13940
|
+
ontology: ParseResponse(data)
|
|
13941
|
+
});
|
|
13942
|
+
}
|
|
13943
|
+
catch (e) {
|
|
13944
|
+
rej(e);
|
|
13945
|
+
}
|
|
13946
|
+
}));
|
|
13947
|
+
api.SetCacheItem({
|
|
13948
|
+
key,
|
|
13949
|
+
value: req,
|
|
13950
|
+
req: reqParams
|
|
13951
|
+
});
|
|
13952
|
+
return req;
|
|
13953
|
+
});
|
|
13954
|
+
}
|
|
13955
|
+
Ontology.Get = Get;
|
|
13956
|
+
function GetList(params) {
|
|
13957
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13958
|
+
let { api, req: reqParams } = params;
|
|
13959
|
+
if (!api) {
|
|
13960
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13961
|
+
}
|
|
13962
|
+
const key = GetListCacheKey();
|
|
13963
|
+
const cache = api.GetCacheItem(key, reqParams);
|
|
13964
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
13965
|
+
return cache.data;
|
|
13966
|
+
}
|
|
13967
|
+
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
13968
|
+
try {
|
|
13969
|
+
const data = yield api.GET("ontologies", Api.PrepReqParams(reqParams));
|
|
13970
|
+
res({
|
|
13971
|
+
ontologies: ParseListResponse(data)
|
|
13972
|
+
});
|
|
13973
|
+
}
|
|
13974
|
+
catch (e) {
|
|
13975
|
+
rej(e);
|
|
13976
|
+
}
|
|
13977
|
+
}));
|
|
13978
|
+
api.SetCacheItem({
|
|
13979
|
+
key,
|
|
13980
|
+
value: req,
|
|
13981
|
+
req: reqParams
|
|
13982
|
+
});
|
|
13983
|
+
return req;
|
|
13984
|
+
});
|
|
13985
|
+
}
|
|
13986
|
+
Ontology.GetList = GetList;
|
|
13987
|
+
function Update(params) {
|
|
13988
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13989
|
+
let { api, ontology: data, req: reqParams } = params;
|
|
13990
|
+
if (!api) {
|
|
13991
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13992
|
+
}
|
|
13993
|
+
if (!data) {
|
|
13994
|
+
data = {};
|
|
13995
|
+
}
|
|
13996
|
+
if (data.ID == null || data.ID === "") {
|
|
13997
|
+
data.ID = ObjectUtils.UId();
|
|
13998
|
+
}
|
|
13999
|
+
const res = yield api.POST(`ontology/${data.ID}`, data, Api.PrepReqParams(reqParams));
|
|
14000
|
+
api.Cache.Remove(GetCacheKey(data.ID));
|
|
14001
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
14002
|
+
return {
|
|
14003
|
+
ontology: ParseResponse(res)
|
|
14004
|
+
};
|
|
14005
|
+
});
|
|
14006
|
+
}
|
|
14007
|
+
Ontology.Update = Update;
|
|
14008
|
+
function Delete(params) {
|
|
14009
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14010
|
+
let { api, ontologyId, req: reqParams } = params;
|
|
14011
|
+
if (ontologyId == null || ontologyId === "") {
|
|
14012
|
+
throw ("Ontology ID is required.");
|
|
14013
|
+
}
|
|
14014
|
+
if (!api) {
|
|
14015
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
14016
|
+
}
|
|
14017
|
+
yield api.DELETE(`ontology/${ontologyId}`, Api.PrepReqParams(reqParams));
|
|
14018
|
+
api.Cache.Remove(GetCacheKey(ontologyId));
|
|
14019
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
14020
|
+
});
|
|
14021
|
+
}
|
|
14022
|
+
Ontology.Delete = Delete;
|
|
14023
|
+
function ParseResponse(response) {
|
|
14024
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14025
|
+
const parsed = parseObject$4(response);
|
|
14026
|
+
const parsedResult = (_a = parseObject$4(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
|
|
14027
|
+
return (_f = (_e = (_d = (_c = (_b = parsed === null || parsed === void 0 ? void 0 : parsed.Ontology) !== null && _b !== void 0 ? _b : parsed === null || parsed === void 0 ? void 0 : parsed.BruceOntology) !== null && _c !== void 0 ? _c : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.Ontology) !== null && _d !== void 0 ? _d : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.BruceOntology) !== null && _e !== void 0 ? _e : parsedResult) !== null && _f !== void 0 ? _f : parsed;
|
|
14028
|
+
}
|
|
14029
|
+
Ontology.ParseResponse = ParseResponse;
|
|
14030
|
+
function ParseListResponse(response) {
|
|
14031
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
14032
|
+
const parsed = parseObject$4(response);
|
|
14033
|
+
const parsedResult = (_a = parseObject$4(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
|
|
14034
|
+
const list = (_h = (_g = (_f = (_e = (_d = (_c = (_b = parsed === null || parsed === void 0 ? void 0 : parsed.Items) !== null && _b !== void 0 ? _b : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.Items) !== null && _c !== void 0 ? _c : parsed === null || parsed === void 0 ? void 0 : parsed.Ontologies) !== null && _d !== void 0 ? _d : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.Ontologies) !== null && _e !== void 0 ? _e : parsed === null || parsed === void 0 ? void 0 : parsed.BruceOntologies) !== null && _f !== void 0 ? _f : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.BruceOntologies) !== null && _g !== void 0 ? _g : parsedResult) !== null && _h !== void 0 ? _h : parsed;
|
|
14035
|
+
if (Array.isArray(list)) {
|
|
14036
|
+
return list;
|
|
14037
|
+
}
|
|
14038
|
+
return [];
|
|
14039
|
+
}
|
|
14040
|
+
Ontology.ParseListResponse = ParseListResponse;
|
|
14041
|
+
function GetCacheKey(id) {
|
|
14042
|
+
return `${Api.ECacheKey.Ontology}${Api.ECacheKey.Id}${id}`;
|
|
14043
|
+
}
|
|
14044
|
+
Ontology.GetCacheKey = GetCacheKey;
|
|
14045
|
+
function GetListCacheKey() {
|
|
14046
|
+
return Api.ECacheKey.Ontology;
|
|
14047
|
+
}
|
|
14048
|
+
Ontology.GetListCacheKey = GetListCacheKey;
|
|
14049
|
+
})(Ontology || (Ontology = {}));
|
|
14050
|
+
function parseObject$4(data) {
|
|
14051
|
+
if (data == null || data == undefined) {
|
|
14052
|
+
return null;
|
|
14053
|
+
}
|
|
14054
|
+
if (typeof data == "string") {
|
|
14055
|
+
try {
|
|
14056
|
+
return JSON.parse(data);
|
|
14057
|
+
}
|
|
14058
|
+
catch (_a) {
|
|
14059
|
+
return null;
|
|
14060
|
+
}
|
|
14061
|
+
}
|
|
14062
|
+
return data;
|
|
14063
|
+
}
|
|
14064
|
+
|
|
13903
14065
|
var ExportBrz;
|
|
13904
14066
|
(function (ExportBrz) {
|
|
13905
14067
|
function Export(params) {
|
|
@@ -19354,7 +19516,7 @@ var UrlUtils;
|
|
|
19354
19516
|
})(UrlUtils || (UrlUtils = {}));
|
|
19355
19517
|
|
|
19356
19518
|
// This is updated with the package.json version on build.
|
|
19357
|
-
const VERSION = "7.1.
|
|
19519
|
+
const VERSION = "7.1.65";
|
|
19358
19520
|
|
|
19359
|
-
export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeTrigger, ENVIRONMENT, ExportBrz, ExportUsd, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportedFile, Uploader, Markup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils };
|
|
19521
|
+
export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeTrigger, Ontology, ENVIRONMENT, ExportBrz, ExportUsd, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportedFile, Uploader, Markup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils };
|
|
19360
19522
|
//# sourceMappingURL=bruce-models.es5.js.map
|