bruce-models 4.6.9 → 4.7.1

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.
@@ -3131,7 +3131,7 @@ var Entity;
3131
3131
  */
3132
3132
  function GetListByIds(params) {
3133
3133
  return __awaiter(this, void 0, void 0, function* () {
3134
- let { api, entityIds, migrated, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources } = params;
3134
+ let { api, entityIds, migrated, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources, expandImports } = params;
3135
3135
  if (!entityIds.length) {
3136
3136
  throw ("Entity IDs are required.");
3137
3137
  }
@@ -3170,6 +3170,14 @@ var Entity;
3170
3170
  reqData["Expand"] = "location";
3171
3171
  }
3172
3172
  }
3173
+ if (expandImports) {
3174
+ if (reqData["Expand"]) {
3175
+ reqData["Expand"] += ",import";
3176
+ }
3177
+ else {
3178
+ reqData["Expand"] = "import";
3179
+ }
3180
+ }
3173
3181
  if (expandSources) {
3174
3182
  reqData["ExpandSources"] = true;
3175
3183
  }
@@ -3200,6 +3208,7 @@ var Entity;
3200
3208
  entityId,
3201
3209
  expandLocation,
3202
3210
  expandRelations,
3211
+ expandImports,
3203
3212
  expandSources,
3204
3213
  entityTypeId: null,
3205
3214
  historicFrom: historicFrom,
@@ -3595,7 +3604,7 @@ var Entity;
3595
3604
  function GetList(params) {
3596
3605
  var _a;
3597
3606
  return __awaiter(this, void 0, void 0, function* () {
3598
- let { api, filter, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
3607
+ let { api, filter, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, expandImports, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
3599
3608
  if (!api) {
3600
3609
  api = ENVIRONMENT.Api().GetBruceApi();
3601
3610
  }
@@ -3638,7 +3647,7 @@ var Entity;
3638
3647
  historicPoint: historicPoint,
3639
3648
  ExpandSources: expandSources
3640
3649
  };
3641
- if (expandLocation || expandRelations) {
3650
+ if (expandLocation || expandRelations || expandImports) {
3642
3651
  let expand = "";
3643
3652
  if (expandLocation) {
3644
3653
  expand += "location";
@@ -3649,12 +3658,19 @@ var Entity;
3649
3658
  }
3650
3659
  expand += "relation";
3651
3660
  }
3661
+ if (expandImports) {
3662
+ if (expand) {
3663
+ expand += ",";
3664
+ }
3665
+ expand += "import";
3666
+ }
3652
3667
  if (expand) {
3653
3668
  body["Expand"] = expand;
3654
3669
  }
3655
3670
  }
3656
3671
  let totalCount;
3657
3672
  let entities = [];
3673
+ let imports;
3658
3674
  if (analysis || expandRelations || (viaCdn && api.GetCdnBaseUrl())) {
3659
3675
  const urlParams = new URLSearchParams();
3660
3676
  urlParams.set("cacheToken", String(viaCdnCacheToken ? viaCdnCacheToken : 0));
@@ -3685,6 +3701,9 @@ var Entity;
3685
3701
  if (expandLocation) {
3686
3702
  urlParams.append("$expand", "location");
3687
3703
  }
3704
+ if (expandImports) {
3705
+ urlParams.append("$expand", "import");
3706
+ }
3688
3707
  if (expandSources) {
3689
3708
  urlParams.append("ExpandSources", "true");
3690
3709
  }
@@ -3717,6 +3736,7 @@ var Entity;
3717
3736
  entities = data.Items;
3718
3737
  }
3719
3738
  totalCount = data.TotalCount;
3739
+ imports = data.Imports;
3720
3740
  }
3721
3741
  else {
3722
3742
  const urlParams = new URLSearchParams();
@@ -3726,6 +3746,9 @@ var Entity;
3726
3746
  if (expandLocation) {
3727
3747
  urlParams.append("$expand", "location");
3728
3748
  }
3749
+ if (expandImports) {
3750
+ urlParams.append("$expand", "import");
3751
+ }
3729
3752
  if (schemaId) {
3730
3753
  urlParams.set("schema", schemaId);
3731
3754
  }
@@ -3750,6 +3773,7 @@ var Entity;
3750
3773
  entityId: id,
3751
3774
  expandRelations,
3752
3775
  expandLocation,
3776
+ expandImports,
3753
3777
  expandSources,
3754
3778
  entityTypeId: filter.entityTypeId,
3755
3779
  historicFrom: historicFrom,
@@ -3765,10 +3789,12 @@ var Entity;
3765
3789
  }
3766
3790
  }
3767
3791
  totalCount = data.TotalCount;
3792
+ imports = data.Imports;
3768
3793
  }
3769
3794
  return {
3770
3795
  entities,
3771
- totalCount
3796
+ totalCount,
3797
+ imports
3772
3798
  };
3773
3799
  });
3774
3800
  }
@@ -3812,7 +3838,7 @@ var Entity;
3812
3838
  * @returns
3813
3839
  */
3814
3840
  function GetCacheKey(params) {
3815
- let { entityId, entityTypeId, schemaId, expandLocation, expandRelations, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
3841
+ let { entityId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
3816
3842
  if (!entityTypeId) {
3817
3843
  entityTypeId = "";
3818
3844
  }
@@ -3832,7 +3858,7 @@ var Entity;
3832
3858
  schemaId = "";
3833
3859
  }
3834
3860
  let key = `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${schemaId}`;
3835
- key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}`;
3861
+ key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}${String(Boolean(expandImports))}`;
3836
3862
  key += `${Api.ECacheKey.EntityHistoricData}${Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
3837
3863
  return key;
3838
3864
  }
@@ -14037,7 +14063,7 @@ var DataSource;
14037
14063
  })(DataSource || (DataSource = {}));
14038
14064
 
14039
14065
  // This is updated with the package.json version on build.
14040
- const VERSION = "4.6.9";
14066
+ const VERSION = "4.7.1";
14041
14067
 
14042
14068
  export { VERSION, 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, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
14043
14069
  //# sourceMappingURL=bruce-models.es5.js.map