bruce-models 6.9.2 → 6.9.4

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.
@@ -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, expandSources, expandImports, maxSearchTimeSec } = params;
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, expandLocation, expandSources, maxSearchTimeSec } = params;
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
  }
@@ -9431,9 +9540,14 @@ var ClientFile;
9431
9540
  percent: 100,
9432
9541
  uploaded: true
9433
9542
  });
9434
- return {
9435
- tempFileId: tempFile["TempFile.ID"]
9436
- };
9543
+ // Keeping any other magic properties in there.
9544
+ // When we upload a plant-3dz file it also returns its 'projects' which is a fun magic side-effect we really need to kill.
9545
+ const res = Object.assign({}, tempFile);
9546
+ if (res["TempFile.ID"]) {
9547
+ res.tempFileId = res["TempFile.ID"];
9548
+ delete res["TempFile.ID"];
9549
+ }
9550
+ return res;
9437
9551
  });
9438
9552
  }
9439
9553
  ClientFile.UploadTemp = UploadTemp;
@@ -16834,7 +16948,7 @@ class NavigatorMcpWebSocketClient {
16834
16948
  }
16835
16949
 
16836
16950
  // This is updated with the package.json version on build.
16837
- const VERSION = "6.9.2";
16951
+ const VERSION = "6.9.4";
16838
16952
 
16839
16953
  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 };
16840
16954
  //# sourceMappingURL=bruce-models.es5.js.map