bruce-models 6.9.3 → 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.
@@ -3637,7 +3637,7 @@
3637
3637
  */
3638
3638
  function Get(params) {
3639
3639
  return __awaiter(this, void 0, void 0, function* () {
3640
- let { api, entityId, scenario, migrated, schemaId, req: reqParams, expandLocation, expandRelations, expandAttachments, expandLODs, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
3640
+ let { api, entityId, scenario, migrated, schemaId, req: reqParams, expandLocation, expandRelations, expandAttachments, expandLODs, expandComments, expandEntityType, expand: expandStr, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
3641
3641
  if (!entityId) {
3642
3642
  throw ("Entity ID is required.");
3643
3643
  }
@@ -3655,6 +3655,9 @@
3655
3655
  expandRelations,
3656
3656
  expandAttachments,
3657
3657
  expandLODs,
3658
+ expandComments,
3659
+ expandEntityType,
3660
+ expand: expandStr,
3658
3661
  historicFrom,
3659
3662
  historicKey,
3660
3663
  historicTo,
@@ -3685,6 +3688,24 @@
3685
3688
  }
3686
3689
  expand += "attachment";
3687
3690
  }
3691
+ if (expandEntityType) {
3692
+ if (expand) {
3693
+ expand += ",";
3694
+ }
3695
+ expand += "EntityType";
3696
+ }
3697
+ if (expandComments) {
3698
+ if (expand) {
3699
+ expand += ",";
3700
+ }
3701
+ expand += "comment";
3702
+ }
3703
+ if (expandStr) {
3704
+ if (expand) {
3705
+ expand += ",";
3706
+ }
3707
+ expand += expandStr;
3708
+ }
3688
3709
  if (expand) {
3689
3710
  urlParams.append("Expand", expand);
3690
3711
  }
@@ -3738,7 +3759,7 @@
3738
3759
  */
3739
3760
  function GetListByIds(params) {
3740
3761
  return __awaiter(this, void 0, void 0, function* () {
3741
- let { api, entityIds, scenario, migrated, schemaId, req: reqParams, expandAttachments, expandLODs, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources, expandImports, maxSearchTimeSec } = params;
3762
+ let { api, entityIds, scenario, migrated, schemaId, req: reqParams, expandAttachments, expandLODs, expandRelations, expandLocation, expandSources, expandImports, expandComments, expandEntityType, expand: expandStr, historicFrom, historicKey, historicTo, historicPoint, maxSearchTimeSec } = params;
3742
3763
  if (!entityIds.length) {
3743
3764
  throw ("Entity IDs are required.");
3744
3765
  }
@@ -3756,13 +3777,16 @@
3756
3777
  expandSources,
3757
3778
  expandAttachments,
3758
3779
  expandLODs,
3780
+ expandComments,
3781
+ expandEntityType,
3782
+ expand: expandStr,
3759
3783
  entityTypeId: null,
3760
3784
  historicFrom: historicFrom,
3761
3785
  historicKey: historicKey,
3762
3786
  historicTo: historicTo,
3763
3787
  historicPoint: historicPoint,
3764
3788
  schemaId: schemaId,
3765
- scenario: scenario
3789
+ scenario: scenario,
3766
3790
  };
3767
3791
  const crashRiskReqs = [];
3768
3792
  const reqIds = [];
@@ -3812,6 +3836,30 @@
3812
3836
  reqData["Expand"] = "attachment";
3813
3837
  }
3814
3838
  }
3839
+ if (expandEntityType) {
3840
+ if (reqData["Expand"]) {
3841
+ reqData["Expand"] += ",EntityType";
3842
+ }
3843
+ else {
3844
+ reqData["Expand"] = "EntityType";
3845
+ }
3846
+ }
3847
+ if (expandComments) {
3848
+ if (reqData["Expand"]) {
3849
+ reqData["Expand"] += ",comment";
3850
+ }
3851
+ else {
3852
+ reqData["Expand"] = "comment";
3853
+ }
3854
+ }
3855
+ if (expandStr) {
3856
+ if (reqData["Expand"]) {
3857
+ reqData["Expand"] += `,${expandStr}`;
3858
+ }
3859
+ else {
3860
+ reqData["Expand"] = expandStr;
3861
+ }
3862
+ }
3815
3863
  if (expandLODs) {
3816
3864
  reqData["LODType"] = "*";
3817
3865
  }
@@ -4281,7 +4329,7 @@
4281
4329
  function GetList(params) {
4282
4330
  var _a;
4283
4331
  return __awaiter(this, void 0, void 0, function* () {
4284
- let { api, filter, scenario, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, expandImports, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources, maxSearchTimeSec } = params;
4332
+ 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;
4285
4333
  if (!api) {
4286
4334
  api = exports.ENVIRONMENT.Api().GetBruceApi();
4287
4335
  }
@@ -4332,7 +4380,7 @@
4332
4380
  ExpandSources: expandSources,
4333
4381
  Scenario: scenario
4334
4382
  };
4335
- if (expandLocation || expandRelations || expandImports) {
4383
+ if (expandLocation || expandRelations || expandImports || expandEntityType || expandComments || expandStr) {
4336
4384
  let expand = "";
4337
4385
  if (expandLocation) {
4338
4386
  expand += "location";
@@ -4349,6 +4397,24 @@
4349
4397
  }
4350
4398
  expand += "import";
4351
4399
  }
4400
+ if (expandEntityType) {
4401
+ if (expand) {
4402
+ expand += ",";
4403
+ }
4404
+ expand += "EntityType";
4405
+ }
4406
+ if (expandComments) {
4407
+ if (expand) {
4408
+ expand += ",";
4409
+ }
4410
+ expand += "comment";
4411
+ }
4412
+ if (expandStr) {
4413
+ if (expand) {
4414
+ expand += ",";
4415
+ }
4416
+ expand += expandStr;
4417
+ }
4352
4418
  if (expand) {
4353
4419
  body["Expand"] = expand;
4354
4420
  }
@@ -4409,6 +4475,24 @@
4409
4475
  }
4410
4476
  expand += "Source";
4411
4477
  }
4478
+ if (expandEntityType) {
4479
+ if (expand.length) {
4480
+ expand += ",";
4481
+ }
4482
+ expand += "EntityType";
4483
+ }
4484
+ if (expandComments) {
4485
+ if (expand.length) {
4486
+ expand += ",";
4487
+ }
4488
+ expand += "Comment";
4489
+ }
4490
+ if (expandStr) {
4491
+ if (expand.length) {
4492
+ expand += ",";
4493
+ }
4494
+ expand += expandStr;
4495
+ }
4412
4496
  if (expand.length) {
4413
4497
  urlParams.append("Expand", expand);
4414
4498
  }
@@ -4472,6 +4556,30 @@
4472
4556
  }
4473
4557
  expand += "Import";
4474
4558
  }
4559
+ if (expandSources) {
4560
+ if (expand.length) {
4561
+ expand += ",";
4562
+ }
4563
+ expand += "Source";
4564
+ }
4565
+ if (expandEntityType) {
4566
+ if (expand.length) {
4567
+ expand += ",";
4568
+ }
4569
+ expand += "EntityType";
4570
+ }
4571
+ if (expandComments) {
4572
+ if (expand.length) {
4573
+ expand += ",";
4574
+ }
4575
+ expand += "Comment";
4576
+ }
4577
+ if (expandStr) {
4578
+ if (expand.length) {
4579
+ expand += ",";
4580
+ }
4581
+ expand += expandStr;
4582
+ }
4475
4583
  if (expand.length) {
4476
4584
  urlParams.append("Expand", expand);
4477
4585
  }
@@ -4610,7 +4718,7 @@
4610
4718
  * @returns
4611
4719
  */
4612
4720
  function GetCacheKey(params) {
4613
- let { entityId, scenario: scenarioId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandAttachments, expandLODs, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
4721
+ let { entityId, scenario: scenarioId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandAttachments, expandLODs, expandSources, expandEntityType, expandComments, expand, historicFrom, historicKey, historicTo, historicPoint } = params;
4614
4722
  if (!scenarioId) {
4615
4723
  scenarioId = 0;
4616
4724
  }
@@ -4637,6 +4745,7 @@
4637
4745
  key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}${String(Boolean(expandImports))}`;
4638
4746
  key += `${String(Boolean(expandAttachments))}${String(Boolean(expandLODs))}`;
4639
4747
  key += `${exports.Api.ECacheKey.EntityHistoricData}${exports.Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
4748
+ key += `${String(Boolean(expandEntityType))}${String(Boolean(expandComments))}${expand || ""}`;
4640
4749
  key += `${exports.Api.ECacheKey.Id}${scenarioId}`;
4641
4750
  return key;
4642
4751
  }
@@ -16524,7 +16633,7 @@
16524
16633
  }
16525
16634
 
16526
16635
  // This is updated with the package.json version on build.
16527
- const VERSION = "6.9.3";
16636
+ const VERSION = "6.9.4";
16528
16637
 
16529
16638
  exports.VERSION = VERSION;
16530
16639
  exports.AbstractApi = AbstractApi;