bruce-models 7.1.26 → 7.1.27

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.
@@ -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
- if (expandLODs) {
3338
- urlParams.append("Expand", "LOD");
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
- if (expandSettings && expandLODs) {
3416
- urlParams.append("Expand", "true");
3417
- }
3418
- else if (expandSettings) {
3419
- urlParams.append("Expand", "Schema");
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
- if (expandSettings && expandLODs) {
3436
- urlParams.append("Expand", "true");
3437
- }
3438
- else if (expandSettings) {
3439
- urlParams.append("Expand", "Schema");
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;
@@ -17995,7 +18048,7 @@ var ChangeSet;
17995
18048
  })(ChangeSet || (ChangeSet = {}));
17996
18049
 
17997
18050
  // This is updated with the package.json version on build.
17998
- const VERSION = "7.1.26";
18051
+ const VERSION = "7.1.27";
17999
18052
 
18000
18053
  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
18054
  //# sourceMappingURL=bruce-models.es5.js.map