bruce-models 1.7.2 → 1.7.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.
@@ -4187,7 +4187,7 @@
4187
4187
  pageSize: PAGE_SIZE,
4188
4188
  pageIndex: curCell.FetchPageIndex,
4189
4189
  entityTypeId: this.typeId,
4190
- layerIds: this.tagIds,
4190
+ //layerIds: this.tagIds,
4191
4191
  bounds: curCell.GetBounds(),
4192
4192
  sortOrder: exports.Api.ESortOrder.Asc,
4193
4193
  entityTypeConditions: this.attrFilter
@@ -4832,6 +4832,9 @@
4832
4832
  EType["Terrain"] = "GEO_TERR";
4833
4833
  EType["ExternalTerrain"] = "EXTERNAL_TERR";
4834
4834
  EType["ExternalGeoMap"] = "EXTERNAL_MAP";
4835
+ EType["LegacyEntitiesSet"] = "D";
4836
+ EType["LegacyStatic"] = "S";
4837
+ EType["LegacyExternal"] = "X";
4835
4838
  })(EType = Tileset.EType || (Tileset.EType = {}));
4836
4839
  let EPivot;
4837
4840
  (function (EPivot) {
@@ -4866,6 +4869,37 @@
4866
4869
  });
4867
4870
  }
4868
4871
  Tileset.Get = Get;
4872
+ /**
4873
+ * Returns tileset types for given tileset ids.
4874
+ * @param params
4875
+ * @returns
4876
+ */
4877
+ function GetTypes(params) {
4878
+ return __awaiter(this, void 0, void 0, function* () {
4879
+ // Our api is auto-converting legacy types right now which makes it impossible to know what they are.
4880
+ // This uses the legacy end-point which doesn't do that...
4881
+ const { api, tilesetIds, req: reqParams } = params;
4882
+ const mapping = {};
4883
+ if (tilesetIds.length == 1) {
4884
+ const tileset = yield api.GET("ui.tileset/" + tilesetIds[0], exports.Api.PrepReqParams(reqParams));
4885
+ if (tileset) {
4886
+ mapping[tilesetIds[0]] = tileset.Type;
4887
+ }
4888
+ }
4889
+ else if (tilesetIds.length > 1) {
4890
+ const tilesets = yield api.GET("ui.tilesets", exports.Api.PrepReqParams(reqParams));
4891
+ for (const tileset of tilesets) {
4892
+ if (tilesetIds.indexOf(tileset.ID) >= 0) {
4893
+ mapping[tileset.ID] = tileset.Type;
4894
+ }
4895
+ }
4896
+ }
4897
+ return {
4898
+ typeMapping: mapping
4899
+ };
4900
+ });
4901
+ }
4902
+ Tileset.GetTypes = GetTypes;
4869
4903
  function GetList(params) {
4870
4904
  return __awaiter(this, void 0, void 0, function* () {
4871
4905
  const { api, req: reqParams } = params;