bruce-models 3.7.0 → 3.7.2

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.
Files changed (65) hide show
  1. package/dist/bruce-models.es5.js +524 -494
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +474 -444
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account.js.map +1 -1
  6. package/dist/lib/api/bruce-api.js +81 -53
  7. package/dist/lib/api/bruce-api.js.map +1 -1
  8. package/dist/lib/bruce-models.js +1 -1
  9. package/dist/lib/entity/entity-comment.js +28 -28
  10. package/dist/lib/entity/entity-comment.js.map +1 -1
  11. package/dist/lib/entity/entity-coords.js +14 -14
  12. package/dist/lib/entity/entity-coords.js.map +1 -1
  13. package/dist/lib/entity/entity-link.js +28 -28
  14. package/dist/lib/entity/entity-link.js.map +1 -1
  15. package/dist/lib/entity/entity-lod-category.js +27 -27
  16. package/dist/lib/entity/entity-lod-category.js.map +1 -1
  17. package/dist/lib/entity/entity-lod.js +43 -43
  18. package/dist/lib/entity/entity-lod.js.map +1 -1
  19. package/dist/lib/entity/entity-relation-type.js +27 -27
  20. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  21. package/dist/lib/entity/entity-relation.js +46 -46
  22. package/dist/lib/entity/entity-relation.js.map +1 -1
  23. package/dist/lib/entity/entity-source.js +15 -15
  24. package/dist/lib/entity/entity-source.js.map +1 -1
  25. package/dist/lib/entity/entity-tag.js +31 -31
  26. package/dist/lib/entity/entity-tag.js.map +1 -1
  27. package/dist/lib/entity/entity-type.js +27 -27
  28. package/dist/lib/entity/entity-type.js.map +1 -1
  29. package/dist/lib/entity/entity.js +32 -32
  30. package/dist/lib/entity/entity.js.map +1 -1
  31. package/dist/lib/plugin/plugin.js +4 -0
  32. package/dist/lib/plugin/plugin.js.map +1 -1
  33. package/dist/lib/program-key/program-key.js +27 -27
  34. package/dist/lib/program-key/program-key.js.map +1 -1
  35. package/dist/lib/project/menu-item.js.map +1 -1
  36. package/dist/lib/project/project-view-bookmark.js +29 -29
  37. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  38. package/dist/lib/style/style.js +27 -27
  39. package/dist/lib/style/style.js.map +1 -1
  40. package/dist/lib/tileset/tileset.js +28 -28
  41. package/dist/lib/tileset/tileset.js.map +1 -1
  42. package/dist/lib/user/session.js +13 -13
  43. package/dist/lib/user/session.js.map +1 -1
  44. package/dist/lib/user/user.js +51 -51
  45. package/dist/lib/user/user.js.map +1 -1
  46. package/dist/types/account/account.d.ts +8 -1
  47. package/dist/types/bruce-models.d.ts +1 -1
  48. package/dist/types/entity/entity-comment.d.ts +22 -22
  49. package/dist/types/entity/entity-coords.d.ts +11 -11
  50. package/dist/types/entity/entity-link.d.ts +22 -22
  51. package/dist/types/entity/entity-lod-category.d.ts +21 -21
  52. package/dist/types/entity/entity-lod.d.ts +34 -34
  53. package/dist/types/entity/entity-relation-type.d.ts +21 -21
  54. package/dist/types/entity/entity-relation.d.ts +33 -33
  55. package/dist/types/entity/entity-source.d.ts +12 -12
  56. package/dist/types/entity/entity-tag.d.ts +22 -22
  57. package/dist/types/entity/entity-type.d.ts +21 -21
  58. package/dist/types/entity/entity.d.ts +27 -27
  59. package/dist/types/program-key/program-key.d.ts +21 -21
  60. package/dist/types/project/menu-item.d.ts +1 -0
  61. package/dist/types/project/project-view-bookmark.d.ts +23 -23
  62. package/dist/types/style/style.d.ts +21 -21
  63. package/dist/types/tileset/tileset.d.ts +22 -22
  64. package/dist/types/user/user.d.ts +36 -36
  65. package/package.json +1 -1
@@ -1287,7 +1287,7 @@ var HostingLocation;
1287
1287
  * This API is used to manage your data.
1288
1288
  */
1289
1289
  var BruceApi;
1290
- (function (BruceApi) {
1290
+ (function (BruceApi$$1) {
1291
1291
  /**
1292
1292
  * This is the request handler for Bruce Api,
1293
1293
  * it should be passed to any method that wants to communicate with this particular api.
@@ -1401,69 +1401,96 @@ var BruceApi;
1401
1401
  env: this.env
1402
1402
  });
1403
1403
  }
1404
- const env = this.env.toUpperCase();
1405
- const domain = this.getDomain();
1406
- const host = yield HostingLocation.GetByAccountId({
1404
+ const { account } = yield Account.Get({
1407
1405
  accountId: this.accountId,
1408
1406
  api: guardian
1409
1407
  });
1410
- if (host === null || host === void 0 ? void 0 : host.location) {
1411
- const settings = host.location.Settings;
1412
- if (!this.loadCancelled) {
1413
- // Attempt to load regional base url.
1414
- // First try go through settings.
1415
- let urlSet = false;
1416
- if (settings === null || settings === void 0 ? void 0 : settings.BruceAPIURL) {
1417
- let envUrl = settings.BruceAPIURL[env];
1418
- if (envUrl) {
1419
- envUrl = envUrl
1408
+ // Precalculated URLs exist.
1409
+ // Soon this will be a stable requirement for any account record.
1410
+ if (account.URL) {
1411
+ const urls = account.URL;
1412
+ if (urls === null || urls === void 0 ? void 0 : urls.Base) {
1413
+ this.baseUrl = urls.Base;
1414
+ }
1415
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNEntities) {
1416
+ this.EntityCdnUrl = urls.CDNEntities;
1417
+ }
1418
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNTileset) {
1419
+ this.TilesetCdnUrl = urls.CDNTileset;
1420
+ }
1421
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNLegacyTileset) {
1422
+ this.LegacyTilesetCdnUrl = urls.CDNLegacyTileset;
1423
+ }
1424
+ if (urls === null || urls === void 0 ? void 0 : urls.CDNBase) {
1425
+ this.cdnBaseUrl = urls.CDNBase;
1426
+ }
1427
+ }
1428
+ // Deprecated and will eventually stop working at all.
1429
+ else {
1430
+ const env = this.env.toUpperCase();
1431
+ const domain = this.getDomain();
1432
+ const host = yield HostingLocation.GetByAccountId({
1433
+ accountId: this.accountId,
1434
+ api: guardian
1435
+ });
1436
+ if (host === null || host === void 0 ? void 0 : host.location) {
1437
+ const settings = host.location.Settings;
1438
+ if (!this.loadCancelled) {
1439
+ // Attempt to load regional base url.
1440
+ // First try go through settings.
1441
+ let urlSet = false;
1442
+ if (settings === null || settings === void 0 ? void 0 : settings.BruceAPIURL) {
1443
+ let envUrl = settings.BruceAPIURL[env];
1444
+ if (envUrl) {
1445
+ envUrl = envUrl
1446
+ .replace("<ACCOUNTID>", this.accountId)
1447
+ .replace("<ACCOUNT>", this.accountId);
1448
+ if (envUrl && envUrl.length > 1) {
1449
+ this.baseUrl = envUrl;
1450
+ urlSet = true;
1451
+ }
1452
+ }
1453
+ }
1454
+ // Try go through host location's base url.
1455
+ // This may be wrong env which is why it's used as fallback right now.
1456
+ if (!urlSet && host.location.BruceAPIURL) {
1457
+ const regionalUrl = host.location.BruceAPIURL
1420
1458
  .replace("<ACCOUNTID>", this.accountId)
1421
- .replace("<ACCOUNT>", this.accountId);
1422
- if (envUrl && envUrl.length > 1) {
1423
- this.baseUrl = envUrl;
1459
+ .replace("<ACCOUNT>", this.accountId)
1460
+ .replace("<DOMAIN>", domain);
1461
+ if (regionalUrl && regionalUrl.length > 1) {
1462
+ this.baseUrl = regionalUrl;
1424
1463
  urlSet = true;
1425
1464
  }
1426
1465
  }
1427
1466
  }
1428
- // Try go through host location's base url.
1429
- // This may be wrong env which is why it's used as fallback right now.
1430
- if (!urlSet && host.location.BruceAPIURL) {
1431
- const regionalUrl = host.location.BruceAPIURL
1432
- .replace("<ACCOUNTID>", this.accountId)
1433
- .replace("<ACCOUNT>", this.accountId)
1434
- .replace("<DOMAIN>", domain);
1435
- if (regionalUrl && regionalUrl.length > 1) {
1436
- this.baseUrl = regionalUrl;
1437
- urlSet = true;
1438
- }
1439
- }
1440
- }
1441
- // Attempt to load CDN settings.
1442
- if (settings === null || settings === void 0 ? void 0 : settings.CDN) {
1443
- this.EntityCdnUrl = (_a = settings.CDN.entityURL) === null || _a === void 0 ? void 0 : _a[env];
1444
- // We need to fix our configs.
1445
- if (this.EntityCdnUrl) {
1446
- if (this.EntityCdnUrl.includes("entitiesListForCDN")) {
1447
- this.EntityCdnUrl = this.EntityCdnUrl.replace("<ACCOUNT>", this.accountId);
1448
- }
1449
- else {
1450
- this.EntityCdnUrl = this.EntityCdnUrl.replace("<ACCOUNT>", "entitiesListForCDN/" + this.accountId);
1467
+ // Attempt to load CDN settings.
1468
+ if (settings === null || settings === void 0 ? void 0 : settings.CDN) {
1469
+ this.EntityCdnUrl = (_a = settings.CDN.entityURL) === null || _a === void 0 ? void 0 : _a[env];
1470
+ // We need to fix our configs.
1471
+ if (this.EntityCdnUrl) {
1472
+ if (this.EntityCdnUrl.includes("entitiesListForCDN")) {
1473
+ this.EntityCdnUrl = this.EntityCdnUrl.replace("<ACCOUNT>", this.accountId);
1474
+ }
1475
+ else {
1476
+ this.EntityCdnUrl = this.EntityCdnUrl.replace("<ACCOUNT>", "entitiesListForCDN/" + this.accountId);
1477
+ }
1451
1478
  }
1452
- }
1453
- this.LegacyTilesetCdnUrl = (_b = settings.CDN.legacyTilesetURL) === null || _b === void 0 ? void 0 : _b[env];
1454
- this.TilesetCdnUrl = (_c = settings.CDN.tilesetURL) === null || _c === void 0 ? void 0 : _c[env];
1455
- if (this.TilesetCdnUrl) {
1456
- this.TilesetCdnUrl = this.TilesetCdnUrl.replace("<ACCOUNT>", this.accountId);
1457
- }
1458
- // TilesetCdnUrl example: "https://blah.cloudfront.net/tilesets/<TILESETID>/files/<FILEPATH>?accountId=<ACCOUNT>".
1459
- // Lazy at the moment to go around updating every region we have, I'll interpret the url from tilesetCdnUrl.
1460
- if (this.TilesetCdnUrl) {
1461
- try {
1462
- const url = new URL(this.TilesetCdnUrl);
1463
- this.cdnBaseUrl = `${url.protocol}//${url.hostname}/`;
1479
+ this.LegacyTilesetCdnUrl = (_b = settings.CDN.legacyTilesetURL) === null || _b === void 0 ? void 0 : _b[env];
1480
+ this.TilesetCdnUrl = (_c = settings.CDN.tilesetURL) === null || _c === void 0 ? void 0 : _c[env];
1481
+ if (this.TilesetCdnUrl) {
1482
+ this.TilesetCdnUrl = this.TilesetCdnUrl.replace("<ACCOUNT>", this.accountId);
1464
1483
  }
1465
- catch (e) {
1466
- console.error(e);
1484
+ // TilesetCdnUrl example: "https://blah.cloudfront.net/tilesets/<TILESETID>/files/<FILEPATH>?accountId=<ACCOUNT>".
1485
+ // Lazy at the moment to go around updating every region we have, I'll interpret the url from tilesetCdnUrl.
1486
+ if (this.TilesetCdnUrl) {
1487
+ try {
1488
+ const url = new URL(this.TilesetCdnUrl);
1489
+ this.cdnBaseUrl = `${url.protocol}//${url.hostname}/`;
1490
+ }
1491
+ catch (e) {
1492
+ console.error(e);
1493
+ }
1467
1494
  }
1468
1495
  }
1469
1496
  }
@@ -1622,7 +1649,7 @@ var BruceApi;
1622
1649
  });
1623
1650
  }
1624
1651
  }
1625
- BruceApi.Api = Api$$1;
1652
+ BruceApi$$1.Api = Api$$1;
1626
1653
  })(BruceApi || (BruceApi = {}));
1627
1654
 
1628
1655
  /**
@@ -2692,33 +2719,6 @@ var ObjectUtils;
2692
2719
  */
2693
2720
  var EntityType;
2694
2721
  (function (EntityType) {
2695
- /**
2696
- * Returns cache identifier for an entity type.
2697
- * Example: {
2698
- * const api: BruceApi.Api = ...;
2699
- * const key = GetCacheKey("abc");
2700
- * api.Cache.Remove(key);
2701
- * }
2702
- * @param typeId
2703
- * @returns
2704
- */
2705
- function GetCacheKey(typeId) {
2706
- return `${Api.ECacheKey.EntityType}${Api.ECacheKey.Id}${typeId}`;
2707
- }
2708
- EntityType.GetCacheKey = GetCacheKey;
2709
- /**
2710
- * Returns cache identifier for a list of entity types.
2711
- * Example: {
2712
- * const api: BruceApi.Api = ...;
2713
- * const key = GetListCacheKey();
2714
- * api.Cache.Remove(key);
2715
- * }
2716
- * @returns
2717
- */
2718
- function GetListCacheKey() {
2719
- return Api.ECacheKey.EntityType;
2720
- }
2721
- EntityType.GetListCacheKey = GetListCacheKey;
2722
2722
  /**
2723
2723
  * Gets an entity type record.
2724
2724
  * @param params
@@ -2848,6 +2848,33 @@ var EntityType;
2848
2848
  });
2849
2849
  }
2850
2850
  EntityType.Update = Update;
2851
+ /**
2852
+ * Returns cache identifier for an entity type.
2853
+ * Example: {
2854
+ * const api: BruceApi.Api = ...;
2855
+ * const key = GetCacheKey("abc");
2856
+ * api.Cache.Remove(key);
2857
+ * }
2858
+ * @param typeId
2859
+ * @returns
2860
+ */
2861
+ function GetCacheKey(typeId) {
2862
+ return `${Api.ECacheKey.EntityType}${Api.ECacheKey.Id}${typeId}`;
2863
+ }
2864
+ EntityType.GetCacheKey = GetCacheKey;
2865
+ /**
2866
+ * Returns cache identifier for a list of entity types.
2867
+ * Example: {
2868
+ * const api: BruceApi.Api = ...;
2869
+ * const key = GetListCacheKey();
2870
+ * api.Cache.Remove(key);
2871
+ * }
2872
+ * @returns
2873
+ */
2874
+ function GetListCacheKey() {
2875
+ return Api.ECacheKey.EntityType;
2876
+ }
2877
+ EntityType.GetListCacheKey = GetListCacheKey;
2851
2878
  })(EntityType || (EntityType = {}));
2852
2879
 
2853
2880
  /**
@@ -2953,38 +2980,6 @@ var ZoomControl;
2953
2980
  */
2954
2981
  var Entity;
2955
2982
  (function (Entity) {
2956
- /**
2957
- * Returns cache identifier for an entity record.
2958
- * Example: {
2959
- * const api: BruceApi.Api = ...;
2960
- * const key = GetCacheKey({...});
2961
- * api.Cache.Remove(key);
2962
- * }
2963
- * @param params
2964
- * @returns
2965
- */
2966
- function GetCacheKey(params) {
2967
- let { entityId, entityTypeId, expandLocation, expandRelations } = params;
2968
- if (!entityTypeId) {
2969
- entityTypeId = "";
2970
- }
2971
- return `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}`;
2972
- }
2973
- Entity.GetCacheKey = GetCacheKey;
2974
- /**
2975
- * Returns cache identifier for an entity record.
2976
- * Example: {
2977
- * const api: BruceApi.Api = ...;
2978
- * const key = GetCacheKey("abc");
2979
- * api.Cache.Remove(key);
2980
- * }
2981
- * @param entityId
2982
- * @returns
2983
- */
2984
- function GetContainsKey(entityId) {
2985
- return `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}`;
2986
- }
2987
- Entity.GetContainsKey = GetContainsKey;
2988
2983
  /**
2989
2984
  * Returns an entity record for the given entity id.
2990
2985
  * @param params
@@ -3599,6 +3594,38 @@ var Entity;
3599
3594
  };
3600
3595
  }
3601
3596
  Entity.ToGeoJson = ToGeoJson;
3597
+ /**
3598
+ * Returns cache identifier for an entity record.
3599
+ * Example: {
3600
+ * const api: BruceApi.Api = ...;
3601
+ * const key = GetCacheKey({...});
3602
+ * api.Cache.Remove(key);
3603
+ * }
3604
+ * @param params
3605
+ * @returns
3606
+ */
3607
+ function GetCacheKey(params) {
3608
+ let { entityId, entityTypeId, expandLocation, expandRelations } = params;
3609
+ if (!entityTypeId) {
3610
+ entityTypeId = "";
3611
+ }
3612
+ return `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}`;
3613
+ }
3614
+ Entity.GetCacheKey = GetCacheKey;
3615
+ /**
3616
+ * Returns cache identifier for an entity record.
3617
+ * Example: {
3618
+ * const api: BruceApi.Api = ...;
3619
+ * const key = GetCacheKey("abc");
3620
+ * api.Cache.Remove(key);
3621
+ * }
3622
+ * @param entityId
3623
+ * @returns
3624
+ */
3625
+ function GetContainsKey(entityId) {
3626
+ return `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}`;
3627
+ }
3628
+ Entity.GetContainsKey = GetContainsKey;
3602
3629
  })(Entity || (Entity = {}));
3603
3630
 
3604
3631
  /**
@@ -4865,34 +4892,6 @@ var EntityAttachment;
4865
4892
  */
4866
4893
  var EntityComment;
4867
4894
  (function (EntityComment) {
4868
- /**
4869
- * Returns cache identifier for a comment by ID.
4870
- * Example: {
4871
- * const api: BruceApi.Api = ...;
4872
- * const key = GetCacheKey("123");
4873
- * api.Cache.Remove(key);
4874
- * }
4875
- * @param id
4876
- * @returns
4877
- */
4878
- function GetCacheKey(id) {
4879
- return Api.ECacheKey.Comment + Api.ECacheKey.Id + id;
4880
- }
4881
- EntityComment.GetCacheKey = GetCacheKey;
4882
- /**
4883
- * Returns cache identifier for a list of comments for an entity.
4884
- * Example: {
4885
- * const api: BruceApi.Api = ...;
4886
- * const key = GetListCacheKey("abc");
4887
- * api.Cache.Remove(key);
4888
- * }
4889
- * @param entityId
4890
- * @returns
4891
- */
4892
- function GetListCacheKey(entityId) {
4893
- return Api.ECacheKey.Comment + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
4894
- }
4895
- EntityComment.GetListCacheKey = GetListCacheKey;
4896
4895
  /**
4897
4896
  * Creates or updates a comment.
4898
4897
  * @param params
@@ -4974,30 +4973,22 @@ var EntityComment;
4974
4973
  });
4975
4974
  }
4976
4975
  EntityComment.GetListByEntityId = GetListByEntityId;
4977
- })(EntityComment || (EntityComment = {}));
4978
-
4979
- /**
4980
- * Describes the "Entity Link" concept within Nextspace.
4981
- * An entity link is an external URL linked to an entity record.
4982
- */
4983
- var EntityLink;
4984
- (function (EntityLink) {
4985
4976
  /**
4986
- * Returns cache identifier for a link record.
4977
+ * Returns cache identifier for a comment by ID.
4987
4978
  * Example: {
4988
4979
  * const api: BruceApi.Api = ...;
4989
- * const key = GetCacheKey(1);
4980
+ * const key = GetCacheKey("123");
4990
4981
  * api.Cache.Remove(key);
4991
4982
  * }
4992
4983
  * @param id
4993
4984
  * @returns
4994
4985
  */
4995
4986
  function GetCacheKey(id) {
4996
- return Api.ECacheKey.Link + Api.ECacheKey.Id + id;
4987
+ return Api.ECacheKey.Comment + Api.ECacheKey.Id + id;
4997
4988
  }
4998
- EntityLink.GetCacheKey = GetCacheKey;
4989
+ EntityComment.GetCacheKey = GetCacheKey;
4999
4990
  /**
5000
- * Returns cache identifier for a list of links for an entity.
4991
+ * Returns cache identifier for a list of comments for an entity.
5001
4992
  * Example: {
5002
4993
  * const api: BruceApi.Api = ...;
5003
4994
  * const key = GetListCacheKey("abc");
@@ -5007,9 +4998,17 @@ var EntityLink;
5007
4998
  * @returns
5008
4999
  */
5009
5000
  function GetListCacheKey(entityId) {
5010
- return Api.ECacheKey.Link + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
5001
+ return Api.ECacheKey.Comment + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
5011
5002
  }
5012
- EntityLink.GetListCacheKey = GetListCacheKey;
5003
+ EntityComment.GetListCacheKey = GetListCacheKey;
5004
+ })(EntityComment || (EntityComment = {}));
5005
+
5006
+ /**
5007
+ * Describes the "Entity Link" concept within Nextspace.
5008
+ * An entity link is an external URL linked to an entity record.
5009
+ */
5010
+ var EntityLink;
5011
+ (function (EntityLink) {
5013
5012
  /**
5014
5013
  * Creates or updates a link record.
5015
5014
  * @param params
@@ -5091,47 +5090,22 @@ var EntityLink;
5091
5090
  });
5092
5091
  }
5093
5092
  EntityLink.GetListByEntityId = GetListByEntityId;
5094
- })(EntityLink || (EntityLink = {}));
5095
-
5096
- /**
5097
- * Describes the "Entity LOD" concept within Nextspace.
5098
- * LOD stands for Level of Detail.
5099
- * An lod record is a possible 2d/3d visualization of the entity record.
5100
- * The most common kind is a GLB.
5101
- */
5102
- var EntityLod;
5103
- (function (EntityLod) {
5104
5093
  /**
5105
- * Returns cache identifier for an entity lod record.
5106
- * Example: {
5107
- * const api: BruceApi.Api = ...;
5108
- * const key = GetCacheKey("abc");
5109
- * api.Cache.Remove(key);
5110
- * }
5111
- * @param url
5112
- * @returns
5113
- */
5114
- function GetCacheKey(url) {
5115
- return Api.ECacheKey.Lod + Api.ECacheKey.Id + url;
5116
- }
5117
- EntityLod.GetCacheKey = GetCacheKey;
5118
- /**
5119
- * Returns cache identifier for a list of entity lods.
5094
+ * Returns cache identifier for a link record.
5120
5095
  * Example: {
5121
5096
  * const api: BruceApi.Api = ...;
5122
- * const key = GetListCacheKey("abc", "def");
5097
+ * const key = GetCacheKey(1);
5123
5098
  * api.Cache.Remove(key);
5124
5099
  * }
5125
- * @param typeId
5126
- * @param group
5100
+ * @param id
5127
5101
  * @returns
5128
5102
  */
5129
- function GetTypeListKey(typeId, group) {
5130
- return Api.ECacheKey.Lod + Api.ECacheKey.EntityType + typeId + Api.ECacheKey.Id + group;
5103
+ function GetCacheKey(id) {
5104
+ return Api.ECacheKey.Link + Api.ECacheKey.Id + id;
5131
5105
  }
5132
- EntityLod.GetTypeListKey = GetTypeListKey;
5106
+ EntityLink.GetCacheKey = GetCacheKey;
5133
5107
  /**
5134
- * Returns cache identifier for a list of entity lods.
5108
+ * Returns cache identifier for a list of links for an entity.
5135
5109
  * Example: {
5136
5110
  * const api: BruceApi.Api = ...;
5137
5111
  * const key = GetListCacheKey("abc");
@@ -5140,10 +5114,20 @@ var EntityLod;
5140
5114
  * @param entityId
5141
5115
  * @returns
5142
5116
  */
5143
- function GetEntityListKey(entityId) {
5144
- return Api.ECacheKey.Lod + Api.ECacheKey.Entity + entityId;
5117
+ function GetListCacheKey(entityId) {
5118
+ return Api.ECacheKey.Link + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
5145
5119
  }
5146
- EntityLod.GetEntityListKey = GetEntityListKey;
5120
+ EntityLink.GetListCacheKey = GetListCacheKey;
5121
+ })(EntityLink || (EntityLink = {}));
5122
+
5123
+ /**
5124
+ * Describes the "Entity LOD" concept within Nextspace.
5125
+ * LOD stands for Level of Detail.
5126
+ * An lod record is a possible 2d/3d visualization of the entity record.
5127
+ * The most common kind is a GLB.
5128
+ */
5129
+ var EntityLod;
5130
+ (function (EntityLod) {
5147
5131
  /**
5148
5132
  * Returns a url for an entity lod record file.
5149
5133
  * @param params
@@ -5359,42 +5343,58 @@ var EntityLod;
5359
5343
  });
5360
5344
  }
5361
5345
  EntityLod.Delete = Delete;
5362
- })(EntityLod || (EntityLod = {}));
5363
-
5364
- /**
5365
- * Describes the "Entity LOD Category" concept within Nextspace.
5366
- * An LOD category is a level of categorization for LODs.
5367
- * This is typically used to group LODs by their extension.
5368
- */
5369
- var EntityLodCategory;
5370
- (function (EntityLodCategory) {
5371
5346
  /**
5372
- * Returns cache identifier for an entity lod category record.
5347
+ * Returns cache identifier for an entity lod record.
5373
5348
  * Example: {
5374
5349
  * const api: BruceApi.Api = ...;
5375
5350
  * const key = GetCacheKey("abc");
5376
5351
  * api.Cache.Remove(key);
5377
5352
  * }
5378
- * @param id
5353
+ * @param url
5379
5354
  * @returns
5380
5355
  */
5381
- function GetCacheKey(id) {
5382
- return Api.ECacheKey.LodCategory + Api.ECacheKey.Id + id;
5356
+ function GetCacheKey(url) {
5357
+ return Api.ECacheKey.Lod + Api.ECacheKey.Id + url;
5383
5358
  }
5384
- EntityLodCategory.GetCacheKey = GetCacheKey;
5359
+ EntityLod.GetCacheKey = GetCacheKey;
5385
5360
  /**
5386
- * Returns cache identifier for a list of entity lod categories.
5361
+ * Returns cache identifier for a list of entity lods.
5387
5362
  * Example: {
5388
5363
  * const api: BruceApi.Api = ...;
5389
- * const key = GetListCacheKey();
5364
+ * const key = GetListCacheKey("abc", "def");
5390
5365
  * api.Cache.Remove(key);
5391
5366
  * }
5367
+ * @param typeId
5368
+ * @param group
5392
5369
  * @returns
5393
5370
  */
5394
- function GetListCacheKey() {
5395
- return Api.ECacheKey.LodCategory;
5371
+ function GetTypeListKey(typeId, group) {
5372
+ return Api.ECacheKey.Lod + Api.ECacheKey.EntityType + typeId + Api.ECacheKey.Id + group;
5396
5373
  }
5397
- EntityLodCategory.GetListCacheKey = GetListCacheKey;
5374
+ EntityLod.GetTypeListKey = GetTypeListKey;
5375
+ /**
5376
+ * Returns cache identifier for a list of entity lods.
5377
+ * Example: {
5378
+ * const api: BruceApi.Api = ...;
5379
+ * const key = GetListCacheKey("abc");
5380
+ * api.Cache.Remove(key);
5381
+ * }
5382
+ * @param entityId
5383
+ * @returns
5384
+ */
5385
+ function GetEntityListKey(entityId) {
5386
+ return Api.ECacheKey.Lod + Api.ECacheKey.Entity + entityId;
5387
+ }
5388
+ EntityLod.GetEntityListKey = GetEntityListKey;
5389
+ })(EntityLod || (EntityLod = {}));
5390
+
5391
+ /**
5392
+ * Describes the "Entity LOD Category" concept within Nextspace.
5393
+ * An LOD category is a level of categorization for LODs.
5394
+ * This is typically used to group LODs by their extension.
5395
+ */
5396
+ var EntityLodCategory;
5397
+ (function (EntityLodCategory) {
5398
5398
  /**
5399
5399
  * Returns a list of entity lod categories.
5400
5400
  * @param params
@@ -5510,16 +5510,8 @@ var EntityLodCategory;
5510
5510
  });
5511
5511
  }
5512
5512
  EntityLodCategory.Update = Update;
5513
- })(EntityLodCategory || (EntityLodCategory = {}));
5514
-
5515
- /**
5516
- * Describes the "Entity Relationship Type" concept within Nextspace.
5517
- * A relationship type record describes the purpose of a relationship.
5518
- */
5519
- var EntityRelationType;
5520
- (function (EntityRelationType) {
5521
5513
  /**
5522
- * Returns cache identifier for an entity relation type record.
5514
+ * Returns cache identifier for an entity lod category record.
5523
5515
  * Example: {
5524
5516
  * const api: BruceApi.Api = ...;
5525
5517
  * const key = GetCacheKey("abc");
@@ -5529,11 +5521,11 @@ var EntityRelationType;
5529
5521
  * @returns
5530
5522
  */
5531
5523
  function GetCacheKey(id) {
5532
- return Api.ECacheKey.RelationType + Api.ECacheKey.Id + id;
5524
+ return Api.ECacheKey.LodCategory + Api.ECacheKey.Id + id;
5533
5525
  }
5534
- EntityRelationType.GetCacheKey = GetCacheKey;
5526
+ EntityLodCategory.GetCacheKey = GetCacheKey;
5535
5527
  /**
5536
- * Returns cache identifier for a list of entity relation types.
5528
+ * Returns cache identifier for a list of entity lod categories.
5537
5529
  * Example: {
5538
5530
  * const api: BruceApi.Api = ...;
5539
5531
  * const key = GetListCacheKey();
@@ -5542,9 +5534,17 @@ var EntityRelationType;
5542
5534
  * @returns
5543
5535
  */
5544
5536
  function GetListCacheKey() {
5545
- return Api.ECacheKey.RelationType;
5537
+ return Api.ECacheKey.LodCategory;
5546
5538
  }
5547
- EntityRelationType.GetListCacheKey = GetListCacheKey;
5539
+ EntityLodCategory.GetListCacheKey = GetListCacheKey;
5540
+ })(EntityLodCategory || (EntityLodCategory = {}));
5541
+
5542
+ /**
5543
+ * Describes the "Entity Relationship Type" concept within Nextspace.
5544
+ * A relationship type record describes the purpose of a relationship.
5545
+ */
5546
+ var EntityRelationType;
5547
+ (function (EntityRelationType) {
5548
5548
  /**
5549
5549
  * Gets a single entity relation type record.
5550
5550
  * @param params
@@ -5664,31 +5664,8 @@ var EntityRelationType;
5664
5664
  });
5665
5665
  }
5666
5666
  EntityRelationType.Update = Update;
5667
- })(EntityRelationType || (EntityRelationType = {}));
5668
-
5669
- /**
5670
- * Describes the "Entity Relationship" concept within Nextspace.
5671
- * An entity relationship is an arbitrary link between two entity records.
5672
- * The relationship can have a "data entity" linked to it as well for the relationship to store arbitrary data about itself.
5673
- */
5674
- var EntityRelation;
5675
- (function (EntityRelation) {
5676
5667
  /**
5677
- * Returns cache identifier for an entity relation record.
5678
- * Example: {
5679
- * const api: BruceApi.Api = ...;
5680
- * const key = GetCacheKey("abc", "def", "ghi");
5681
- * api.Cache.Remove(key);
5682
- * }
5683
- * @param id
5684
- * @returns
5685
- */
5686
- function GetCacheKey(entityA, entityB, typeId) {
5687
- return `${Api.ECacheKey.Relation}${Api.ECacheKey.Id}${entityA}${Api.ECacheKey.Id}${entityB}${Api.ECacheKey.Id}${typeId}`;
5688
- }
5689
- EntityRelation.GetCacheKey = GetCacheKey;
5690
- /**
5691
- * Returns cache identifier for a list of entity relations.
5668
+ * Returns cache identifier for an entity relation type record.
5692
5669
  * Example: {
5693
5670
  * const api: BruceApi.Api = ...;
5694
5671
  * const key = GetCacheKey("abc");
@@ -5697,28 +5674,32 @@ var EntityRelation;
5697
5674
  * @param id
5698
5675
  * @returns
5699
5676
  */
5700
- function GetEntityCacheKey(entityId) {
5701
- return Api.ECacheKey.Relation + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
5677
+ function GetCacheKey(id) {
5678
+ return Api.ECacheKey.RelationType + Api.ECacheKey.Id + id;
5702
5679
  }
5703
- EntityRelation.GetEntityCacheKey = GetEntityCacheKey;
5680
+ EntityRelationType.GetCacheKey = GetCacheKey;
5704
5681
  /**
5705
- * Returns cache identifier for a list of entity relations.
5682
+ * Returns cache identifier for a list of entity relation types.
5706
5683
  * Example: {
5707
5684
  * const api: BruceApi.Api = ...;
5708
- * const key = GetCacheKey("abc", {...});
5685
+ * const key = GetListCacheKey();
5709
5686
  * api.Cache.Remove(key);
5710
5687
  * }
5711
- * @param id
5712
5688
  * @returns
5713
5689
  */
5714
- function GetListCacheKey(entityId, params) {
5715
- return Api.ECacheKey.Relation + Api.ECacheKey.RelationType +
5716
- Api.ECacheKey.Id + params.relationTypeId +
5717
- Api.ECacheKey.Id + params.oneWayOnly +
5718
- Api.ECacheKey.Id + params.loadEntityData +
5719
- Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
5690
+ function GetListCacheKey() {
5691
+ return Api.ECacheKey.RelationType;
5720
5692
  }
5721
- EntityRelation.GetListCacheKey = GetListCacheKey;
5693
+ EntityRelationType.GetListCacheKey = GetListCacheKey;
5694
+ })(EntityRelationType || (EntityRelationType = {}));
5695
+
5696
+ /**
5697
+ * Describes the "Entity Relationship" concept within Nextspace.
5698
+ * An entity relationship is an arbitrary link between two entity records.
5699
+ * The relationship can have a "data entity" linked to it as well for the relationship to store arbitrary data about itself.
5700
+ */
5701
+ var EntityRelation;
5702
+ (function (EntityRelation) {
5722
5703
  /**
5723
5704
  * Creates a new entity relation.
5724
5705
  * @param params
@@ -5877,6 +5858,52 @@ var EntityRelation;
5877
5858
  });
5878
5859
  }
5879
5860
  EntityRelation.GetByDataEntityId = GetByDataEntityId;
5861
+ /**
5862
+ * Returns cache identifier for an entity relation record.
5863
+ * Example: {
5864
+ * const api: BruceApi.Api = ...;
5865
+ * const key = GetCacheKey("abc", "def", "ghi");
5866
+ * api.Cache.Remove(key);
5867
+ * }
5868
+ * @param id
5869
+ * @returns
5870
+ */
5871
+ function GetCacheKey(entityA, entityB, typeId) {
5872
+ return `${Api.ECacheKey.Relation}${Api.ECacheKey.Id}${entityA}${Api.ECacheKey.Id}${entityB}${Api.ECacheKey.Id}${typeId}`;
5873
+ }
5874
+ EntityRelation.GetCacheKey = GetCacheKey;
5875
+ /**
5876
+ * Returns cache identifier for a list of entity relations.
5877
+ * Example: {
5878
+ * const api: BruceApi.Api = ...;
5879
+ * const key = GetCacheKey("abc");
5880
+ * api.Cache.Remove(key);
5881
+ * }
5882
+ * @param id
5883
+ * @returns
5884
+ */
5885
+ function GetEntityCacheKey(entityId) {
5886
+ return Api.ECacheKey.Relation + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
5887
+ }
5888
+ EntityRelation.GetEntityCacheKey = GetEntityCacheKey;
5889
+ /**
5890
+ * Returns cache identifier for a list of entity relations.
5891
+ * Example: {
5892
+ * const api: BruceApi.Api = ...;
5893
+ * const key = GetCacheKey("abc", {...});
5894
+ * api.Cache.Remove(key);
5895
+ * }
5896
+ * @param id
5897
+ * @returns
5898
+ */
5899
+ function GetListCacheKey(entityId, params) {
5900
+ return Api.ECacheKey.Relation + Api.ECacheKey.RelationType +
5901
+ Api.ECacheKey.Id + params.relationTypeId +
5902
+ Api.ECacheKey.Id + params.oneWayOnly +
5903
+ Api.ECacheKey.Id + params.loadEntityData +
5904
+ Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
5905
+ }
5906
+ EntityRelation.GetListCacheKey = GetListCacheKey;
5880
5907
  })(EntityRelation || (EntityRelation = {}));
5881
5908
 
5882
5909
  /**
@@ -5886,21 +5913,6 @@ var EntityRelation;
5886
5913
  */
5887
5914
  var EntitySource;
5888
5915
  (function (EntitySource) {
5889
- /**
5890
- * Returns cache identifier for an entity source record.
5891
- * Example: {
5892
- * const api: BruceApi.Api = ...;
5893
- * const key = GetCacheKey(1, "def");
5894
- * api.Cache.Remove(key);
5895
- * }
5896
- * @param sourceId
5897
- * @param sourceKey
5898
- * @returns
5899
- */
5900
- function GetCacheKey(sourceId, sourceKey) {
5901
- return `${Api.ECacheKey.EntitySource}${Api.ECacheKey.Id}${sourceId}${Api.ECacheKey.Id}${sourceKey}`;
5902
- }
5903
- EntitySource.GetCacheKey = GetCacheKey;
5904
5916
  /**
5905
5917
  * Returns an entity source record for the given source id and source key.
5906
5918
  * @param params
@@ -6054,6 +6066,21 @@ var EntitySource;
6054
6066
  });
6055
6067
  }
6056
6068
  EntitySource.CreateLink = CreateLink;
6069
+ /**
6070
+ * Returns cache identifier for an entity source record.
6071
+ * Example: {
6072
+ * const api: BruceApi.Api = ...;
6073
+ * const key = GetCacheKey(1, "def");
6074
+ * api.Cache.Remove(key);
6075
+ * }
6076
+ * @param sourceId
6077
+ * @param sourceKey
6078
+ * @returns
6079
+ */
6080
+ function GetCacheKey(sourceId, sourceKey) {
6081
+ return `${Api.ECacheKey.EntitySource}${Api.ECacheKey.Id}${sourceId}${Api.ECacheKey.Id}${sourceKey}`;
6082
+ }
6083
+ EntitySource.GetCacheKey = GetCacheKey;
6057
6084
  })(EntitySource || (EntitySource = {}));
6058
6085
 
6059
6086
  /**
@@ -6063,37 +6090,6 @@ var EntitySource;
6063
6090
  */
6064
6091
  var EntityTag;
6065
6092
  (function (EntityTag) {
6066
- /**
6067
- * Returns cache identifier for an entity tag record.
6068
- * Example: {
6069
- * const api: BruceApi.Api = ...;
6070
- * const key = GetCacheKey(1);
6071
- * api.Cache.Remove(key);
6072
- * }
6073
- * @param tagId
6074
- * @returns
6075
- */
6076
- function GetCacheKey(tagId) {
6077
- return `${Api.ECacheKey.Tag}${Api.ECacheKey.Id}${tagId}`;
6078
- }
6079
- EntityTag.GetCacheKey = GetCacheKey;
6080
- /**
6081
- * Returns cache identifier for a list of entity tags.
6082
- * Example: {
6083
- * const api: BruceApi.Api = ...;
6084
- * const key = GetListCacheKey("abc");
6085
- * api.Cache.Remove(key);
6086
- * }
6087
- * @param entityTypeId
6088
- * @returns
6089
- */
6090
- function GetListCacheKey(entityTypeId) {
6091
- if (entityTypeId) {
6092
- return Api.ECacheKey.Tag + Api.ECacheKey.EntityType + Api.ECacheKey.Id + entityTypeId;
6093
- }
6094
- return Api.ECacheKey.Tag;
6095
- }
6096
- EntityTag.GetListCacheKey = GetListCacheKey;
6097
6093
  /**
6098
6094
  * Returns an entity tag record for the given tag id.
6099
6095
  * @param params
@@ -6275,6 +6271,37 @@ var EntityTag;
6275
6271
  });
6276
6272
  }
6277
6273
  EntityTag.Update = Update;
6274
+ /**
6275
+ * Returns cache identifier for an entity tag record.
6276
+ * Example: {
6277
+ * const api: BruceApi.Api = ...;
6278
+ * const key = GetCacheKey(1);
6279
+ * api.Cache.Remove(key);
6280
+ * }
6281
+ * @param tagId
6282
+ * @returns
6283
+ */
6284
+ function GetCacheKey(tagId) {
6285
+ return `${Api.ECacheKey.Tag}${Api.ECacheKey.Id}${tagId}`;
6286
+ }
6287
+ EntityTag.GetCacheKey = GetCacheKey;
6288
+ /**
6289
+ * Returns cache identifier for a list of entity tags.
6290
+ * Example: {
6291
+ * const api: BruceApi.Api = ...;
6292
+ * const key = GetListCacheKey("abc");
6293
+ * api.Cache.Remove(key);
6294
+ * }
6295
+ * @param entityTypeId
6296
+ * @returns
6297
+ */
6298
+ function GetListCacheKey(entityTypeId) {
6299
+ if (entityTypeId) {
6300
+ return Api.ECacheKey.Tag + Api.ECacheKey.EntityType + Api.ECacheKey.Id + entityTypeId;
6301
+ }
6302
+ return Api.ECacheKey.Tag;
6303
+ }
6304
+ EntityTag.GetListCacheKey = GetListCacheKey;
6278
6305
  })(EntityTag || (EntityTag = {}));
6279
6306
 
6280
6307
  var MathUtils;
@@ -6321,20 +6348,6 @@ var MathUtils;
6321
6348
  var EntityCoords;
6322
6349
  (function (EntityCoords) {
6323
6350
  EntityCoords.UCS_ENTITY_TYPE_ID = "Bruce_UCS_Type";
6324
- /**
6325
- * Returns cache identifier for a UCS by entity id.
6326
- * Example: {
6327
- * const api: BruceApi.Api = ...;
6328
- * const key = GetCacheKey("123");
6329
- * api.Cache.Remove(key);
6330
- * }
6331
- * @param entityId
6332
- * @returns
6333
- */
6334
- function GetCacheKey(entityId) {
6335
- return Api.ECacheKey.EntityCoords + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
6336
- }
6337
- EntityCoords.GetCacheKey = GetCacheKey;
6338
6351
  /**
6339
6352
  * Returns an entity's location with expanded UCS information.
6340
6353
  * @param params
@@ -6506,6 +6519,20 @@ var EntityCoords;
6506
6519
  });
6507
6520
  }
6508
6521
  EntityCoords.UnlinkCoords = UnlinkCoords;
6522
+ /**
6523
+ * Returns cache identifier for a UCS by entity id.
6524
+ * Example: {
6525
+ * const api: BruceApi.Api = ...;
6526
+ * const key = GetCacheKey("123");
6527
+ * api.Cache.Remove(key);
6528
+ * }
6529
+ * @param entityId
6530
+ * @returns
6531
+ */
6532
+ function GetCacheKey(entityId) {
6533
+ return Api.ECacheKey.EntityCoords + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
6534
+ }
6535
+ EntityCoords.GetCacheKey = GetCacheKey;
6509
6536
  })(EntityCoords || (EntityCoords = {}));
6510
6537
 
6511
6538
  /**
@@ -7053,33 +7080,6 @@ var ClientFile;
7053
7080
  */
7054
7081
  var ProgramKey;
7055
7082
  (function (ProgramKey) {
7056
- /**
7057
- * Returns cache identifier for a program key.
7058
- * Example: {
7059
- * const api: BruceApi.Api = ...;
7060
- * const key = GetCacheKey("abc");
7061
- * api.Cache.Remove(key);
7062
- * }
7063
- * @param programId
7064
- * @returns
7065
- */
7066
- function GetCacheKey(programId) {
7067
- return Api.ECacheKey.ProgramKey + Api.ECacheKey.Id + programId;
7068
- }
7069
- ProgramKey.GetCacheKey = GetCacheKey;
7070
- /**
7071
- * Returns cache identifier for a list of program keys.
7072
- * Example: {
7073
- * const api: BruceApi.Api = ...;
7074
- * const key = GetListCacheKey();
7075
- * api.Cache.Remove(key);
7076
- * }
7077
- * @returns
7078
- */
7079
- function GetListCacheKey() {
7080
- return Api.ECacheKey.ProgramKey;
7081
- }
7082
- ProgramKey.GetListCacheKey = GetListCacheKey;
7083
7083
  /**
7084
7084
  * Known program IDs that Nextspace applications will reference.
7085
7085
  */
@@ -7220,37 +7220,22 @@ var ProgramKey;
7220
7220
  });
7221
7221
  }
7222
7222
  ProgramKey.Update = Update;
7223
- })(ProgramKey || (ProgramKey = {}));
7224
-
7225
- /**
7226
- * Describes the "Tileset" concept in Nextspace.
7227
- *
7228
- * Tilesets come in three possible variants,
7229
- * 1- A set of instructions to generate a tileset.
7230
- * 2- Settings to load a tileset hosted elsewhere.
7231
- * 3- A set of user-provided files to serve.
7232
- *
7233
- * Read the individual tileset-type settings for each variant.
7234
- */
7235
- var Tileset;
7236
- (function (Tileset) {
7237
7223
  /**
7238
- * Returns cache identifier for a tileset.
7224
+ * Returns cache identifier for a program key.
7239
7225
  * Example: {
7240
7226
  * const api: BruceApi.Api = ...;
7241
- * const key = GetCacheKey("abc", false);
7227
+ * const key = GetCacheKey("abc");
7242
7228
  * api.Cache.Remove(key);
7243
7229
  * }
7244
- * @param tilesetId
7245
- * @param loadFiles
7230
+ * @param programId
7246
7231
  * @returns
7247
7232
  */
7248
- function GetCacheKey(tilesetId, loadFiles) {
7249
- return `${Api.ECacheKey.Tileset}${Api.ECacheKey.Id}${tilesetId}${Api.ECacheKey.Id}${loadFiles}`;
7233
+ function GetCacheKey(programId) {
7234
+ return Api.ECacheKey.ProgramKey + Api.ECacheKey.Id + programId;
7250
7235
  }
7251
- Tileset.GetCacheKey = GetCacheKey;
7236
+ ProgramKey.GetCacheKey = GetCacheKey;
7252
7237
  /**
7253
- * Returns cache identifier for a list of tilesets.
7238
+ * Returns cache identifier for a list of program keys.
7254
7239
  * Example: {
7255
7240
  * const api: BruceApi.Api = ...;
7256
7241
  * const key = GetListCacheKey();
@@ -7259,9 +7244,23 @@ var Tileset;
7259
7244
  * @returns
7260
7245
  */
7261
7246
  function GetListCacheKey() {
7262
- return Api.ECacheKey.Tileset;
7247
+ return Api.ECacheKey.ProgramKey;
7263
7248
  }
7264
- Tileset.GetListCacheKey = GetListCacheKey;
7249
+ ProgramKey.GetListCacheKey = GetListCacheKey;
7250
+ })(ProgramKey || (ProgramKey = {}));
7251
+
7252
+ /**
7253
+ * Describes the "Tileset" concept in Nextspace.
7254
+ *
7255
+ * Tilesets come in three possible variants,
7256
+ * 1- A set of instructions to generate a tileset.
7257
+ * 2- Settings to load a tileset hosted elsewhere.
7258
+ * 3- A set of user-provided files to serve.
7259
+ *
7260
+ * Read the individual tileset-type settings for each variant.
7261
+ */
7262
+ var Tileset;
7263
+ (function (Tileset) {
7265
7264
  /**
7266
7265
  * Available tileset types.
7267
7266
  */
@@ -7845,6 +7844,34 @@ var Tileset;
7845
7844
  EExternalMapType["CustomTemplate"] = "Static";
7846
7845
  })(EExternalMapType = Settings.EExternalMapType || (Settings.EExternalMapType = {}));
7847
7846
  })(Settings = Tileset.Settings || (Tileset.Settings = {}));
7847
+ /**
7848
+ * Returns cache identifier for a tileset.
7849
+ * Example: {
7850
+ * const api: BruceApi.Api = ...;
7851
+ * const key = GetCacheKey("abc", false);
7852
+ * api.Cache.Remove(key);
7853
+ * }
7854
+ * @param tilesetId
7855
+ * @param loadFiles
7856
+ * @returns
7857
+ */
7858
+ function GetCacheKey(tilesetId, loadFiles) {
7859
+ return `${Api.ECacheKey.Tileset}${Api.ECacheKey.Id}${tilesetId}${Api.ECacheKey.Id}${loadFiles}`;
7860
+ }
7861
+ Tileset.GetCacheKey = GetCacheKey;
7862
+ /**
7863
+ * Returns cache identifier for a list of tilesets.
7864
+ * Example: {
7865
+ * const api: BruceApi.Api = ...;
7866
+ * const key = GetListCacheKey();
7867
+ * api.Cache.Remove(key);
7868
+ * }
7869
+ * @returns
7870
+ */
7871
+ function GetListCacheKey() {
7872
+ return Api.ECacheKey.Tileset;
7873
+ }
7874
+ Tileset.GetListCacheKey = GetListCacheKey;
7848
7875
  })(Tileset || (Tileset = {}));
7849
7876
 
7850
7877
  /**
@@ -8016,35 +8043,6 @@ var MenuItem;
8016
8043
  */
8017
8044
  var ProjectViewBookmark;
8018
8045
  (function (ProjectViewBookmark) {
8019
- /**
8020
- * Returns cache identifier for a bookmark.
8021
- * Example: {
8022
- * const api: BruceApi.Api = ...;
8023
- * const key = GetCacheKey("abc", "def");
8024
- * api.Cache.Remove(key);
8025
- * }
8026
- * @param viewId
8027
- * @param bookmarkId
8028
- * @returns
8029
- */
8030
- function GetCacheKey(viewId, bookmarkId) {
8031
- return `${Api.ECacheKey.ProjectViewBookmark}${Api.ECacheKey.Id}${viewId}${Api.ECacheKey.Id}${bookmarkId}`;
8032
- }
8033
- ProjectViewBookmark.GetCacheKey = GetCacheKey;
8034
- /**
8035
- * Returns cache identifier for a list of bookmarks.
8036
- * Example: {
8037
- * const api: BruceApi.Api = ...;
8038
- * const key = GetListCacheKey("abc");
8039
- * api.Cache.Remove(key);
8040
- * }
8041
- * @param viewId
8042
- * @returns
8043
- */
8044
- function GetListCacheKey(viewId) {
8045
- return `${Api.ECacheKey.ProjectViewBookmark}${Api.ECacheKey.Id}${viewId}`;
8046
- }
8047
- ProjectViewBookmark.GetListCacheKey = GetListCacheKey;
8048
8046
  // This is the expected default version for the DataVersion value.
8049
8047
  // This value should NOT be changed without looking at our API and seeing what the default value is.
8050
8048
  ProjectViewBookmark.DEFAULT_DATA_VERSION = 2;
@@ -8203,6 +8201,35 @@ var ProjectViewBookmark;
8203
8201
  });
8204
8202
  }
8205
8203
  ProjectViewBookmark.SetOrder = SetOrder;
8204
+ /**
8205
+ * Returns cache identifier for a bookmark.
8206
+ * Example: {
8207
+ * const api: BruceApi.Api = ...;
8208
+ * const key = GetCacheKey("abc", "def");
8209
+ * api.Cache.Remove(key);
8210
+ * }
8211
+ * @param viewId
8212
+ * @param bookmarkId
8213
+ * @returns
8214
+ */
8215
+ function GetCacheKey(viewId, bookmarkId) {
8216
+ return `${Api.ECacheKey.ProjectViewBookmark}${Api.ECacheKey.Id}${viewId}${Api.ECacheKey.Id}${bookmarkId}`;
8217
+ }
8218
+ ProjectViewBookmark.GetCacheKey = GetCacheKey;
8219
+ /**
8220
+ * Returns cache identifier for a list of bookmarks.
8221
+ * Example: {
8222
+ * const api: BruceApi.Api = ...;
8223
+ * const key = GetListCacheKey("abc");
8224
+ * api.Cache.Remove(key);
8225
+ * }
8226
+ * @param viewId
8227
+ * @returns
8228
+ */
8229
+ function GetListCacheKey(viewId) {
8230
+ return `${Api.ECacheKey.ProjectViewBookmark}${Api.ECacheKey.Id}${viewId}`;
8231
+ }
8232
+ ProjectViewBookmark.GetListCacheKey = GetListCacheKey;
8206
8233
  })(ProjectViewBookmark || (ProjectViewBookmark = {}));
8207
8234
 
8208
8235
  /**
@@ -8717,33 +8744,6 @@ var PendingAction;
8717
8744
  */
8718
8745
  var Style;
8719
8746
  (function (Style) {
8720
- /**
8721
- * Returns cache identifier for a style.
8722
- * Example: {
8723
- * const api: BruceApi.Api = ...;
8724
- * const key = GetCacheKey(1);
8725
- * api.Cache.Remove(key);
8726
- * }
8727
- * @param id
8728
- * @returns
8729
- */
8730
- function GetCacheKey(id) {
8731
- return Api.ECacheKey.Style + Api.ECacheKey.Id + id;
8732
- }
8733
- Style.GetCacheKey = GetCacheKey;
8734
- /**
8735
- * Returns cache identifier for a list of styles.
8736
- * Example: {
8737
- * const api: BruceApi.Api = ...;
8738
- * const key = GetListCacheKey();
8739
- * api.Cache.Remove(key);
8740
- * }
8741
- * @returns
8742
- */
8743
- function GetListCacheKey() {
8744
- return Api.ECacheKey.Style;
8745
- }
8746
- Style.GetListCacheKey = GetListCacheKey;
8747
8747
  /**
8748
8748
  * Types of styles available.
8749
8749
  * The type will dictate what settings are available.
@@ -8884,6 +8884,33 @@ var Style;
8884
8884
  });
8885
8885
  }
8886
8886
  Style.Delete = Delete;
8887
+ /**
8888
+ * Returns cache identifier for a style.
8889
+ * Example: {
8890
+ * const api: BruceApi.Api = ...;
8891
+ * const key = GetCacheKey(1);
8892
+ * api.Cache.Remove(key);
8893
+ * }
8894
+ * @param id
8895
+ * @returns
8896
+ */
8897
+ function GetCacheKey(id) {
8898
+ return Api.ECacheKey.Style + Api.ECacheKey.Id + id;
8899
+ }
8900
+ Style.GetCacheKey = GetCacheKey;
8901
+ /**
8902
+ * Returns cache identifier for a list of styles.
8903
+ * Example: {
8904
+ * const api: BruceApi.Api = ...;
8905
+ * const key = GetListCacheKey();
8906
+ * api.Cache.Remove(key);
8907
+ * }
8908
+ * @returns
8909
+ */
8910
+ function GetListCacheKey() {
8911
+ return Api.ECacheKey.Style;
8912
+ }
8913
+ Style.GetListCacheKey = GetListCacheKey;
8887
8914
  })(Style || (Style = {}));
8888
8915
 
8889
8916
  /**
@@ -8934,19 +8961,6 @@ var Permission;
8934
8961
  */
8935
8962
  var Session;
8936
8963
  (function (Session) {
8937
- /**
8938
- * Returns cache identifier for a session.
8939
- * Example: {
8940
- * const api: BruceApi.Api = ...;
8941
- * const key = GetCacheKey("abc");
8942
- * api.Cache.Remove(key);
8943
- * }
8944
- * @param sessionId
8945
- * @returns
8946
- */
8947
- function GetCacheKey(sessionId) {
8948
- return `${Api.ECacheKey.Session}${Api.ECacheKey.Id}${sessionId}`;
8949
- }
8950
8964
  /**
8951
8965
  * Gets a session record.
8952
8966
  * @param params
@@ -9123,6 +9137,19 @@ var Session;
9123
9137
  });
9124
9138
  }
9125
9139
  Session.IsSuperAdmin = IsSuperAdmin;
9140
+ /**
9141
+ * Returns cache identifier for a session.
9142
+ * Example: {
9143
+ * const api: BruceApi.Api = ...;
9144
+ * const key = GetCacheKey("abc");
9145
+ * api.Cache.Remove(key);
9146
+ * }
9147
+ * @param sessionId
9148
+ * @returns
9149
+ */
9150
+ function GetCacheKey(sessionId) {
9151
+ return `${Api.ECacheKey.Session}${Api.ECacheKey.Id}${sessionId}`;
9152
+ }
9126
9153
  })(Session || (Session = {}));
9127
9154
 
9128
9155
  /**
@@ -9265,57 +9292,6 @@ var UserGroup;
9265
9292
  */
9266
9293
  var User;
9267
9294
  (function (User) {
9268
- /**
9269
- * Returns cache identifier for a user.
9270
- * Example: {
9271
- * const api: BruceApi.Api = ...;
9272
- * const key = GetCacheKey("abc", "def");
9273
- * api.Cache.Remove(key);
9274
- * }
9275
- * @param userId
9276
- * @param accountId
9277
- * @returns
9278
- */
9279
- function GetCacheKey(userId, accountId) {
9280
- if (!accountId) {
9281
- accountId = "";
9282
- }
9283
- return Api.ECacheKey.User + Api.ECacheKey.Id + userId + Api.ECacheKey.Id + accountId;
9284
- }
9285
- User.GetCacheKey = GetCacheKey;
9286
- /**
9287
- * Returns cache identifier for a user.
9288
- * Example: {
9289
- * const api: BruceApi.Api = ...;
9290
- * const key = GetCacheKey("abc", "def");
9291
- * api.Cache.Remove(key);
9292
- * }
9293
- * @param email
9294
- * @param accountId
9295
- * @returns
9296
- */
9297
- function GetEmailCacheKey(email, accountId) {
9298
- if (!accountId) {
9299
- accountId = "";
9300
- }
9301
- return Api.ECacheKey.User + Api.ECacheKey.UserEmail + email + Api.ECacheKey.Id + accountId;
9302
- }
9303
- User.GetEmailCacheKey = GetEmailCacheKey;
9304
- /**
9305
- * Returns cache identifier for a user's settings.
9306
- * Example: {
9307
- * const api: BruceApi.Api = ...;
9308
- * const key = GetCacheKey("abc", "def");
9309
- * api.Cache.Remove(key);
9310
- * }
9311
- * @param userId
9312
- * @param appId
9313
- * @returns
9314
- */
9315
- function GetSettingsCacheKey(userId, appId) {
9316
- return Api.ECacheKey.User + Api.ECacheKey.UserSettings + userId + Api.ECacheKey.Id + appId;
9317
- }
9318
- User.GetSettingsCacheKey = GetSettingsCacheKey;
9319
9295
  /**
9320
9296
  * Available user types.
9321
9297
  */
@@ -9859,6 +9835,57 @@ var User;
9859
9835
  }
9860
9836
  AccessToken.Create = Create;
9861
9837
  })(AccessToken = User.AccessToken || (User.AccessToken = {}));
9838
+ /**
9839
+ * Returns cache identifier for a user.
9840
+ * Example: {
9841
+ * const api: BruceApi.Api = ...;
9842
+ * const key = GetCacheKey("abc", "def");
9843
+ * api.Cache.Remove(key);
9844
+ * }
9845
+ * @param userId
9846
+ * @param accountId
9847
+ * @returns
9848
+ */
9849
+ function GetCacheKey(userId, accountId) {
9850
+ if (!accountId) {
9851
+ accountId = "";
9852
+ }
9853
+ return Api.ECacheKey.User + Api.ECacheKey.Id + userId + Api.ECacheKey.Id + accountId;
9854
+ }
9855
+ User.GetCacheKey = GetCacheKey;
9856
+ /**
9857
+ * Returns cache identifier for a user.
9858
+ * Example: {
9859
+ * const api: BruceApi.Api = ...;
9860
+ * const key = GetCacheKey("abc", "def");
9861
+ * api.Cache.Remove(key);
9862
+ * }
9863
+ * @param email
9864
+ * @param accountId
9865
+ * @returns
9866
+ */
9867
+ function GetEmailCacheKey(email, accountId) {
9868
+ if (!accountId) {
9869
+ accountId = "";
9870
+ }
9871
+ return Api.ECacheKey.User + Api.ECacheKey.UserEmail + email + Api.ECacheKey.Id + accountId;
9872
+ }
9873
+ User.GetEmailCacheKey = GetEmailCacheKey;
9874
+ /**
9875
+ * Returns cache identifier for a user's settings.
9876
+ * Example: {
9877
+ * const api: BruceApi.Api = ...;
9878
+ * const key = GetCacheKey("abc", "def");
9879
+ * api.Cache.Remove(key);
9880
+ * }
9881
+ * @param userId
9882
+ * @param appId
9883
+ * @returns
9884
+ */
9885
+ function GetSettingsCacheKey(userId, appId) {
9886
+ return Api.ECacheKey.User + Api.ECacheKey.UserSettings + userId + Api.ECacheKey.Id + appId;
9887
+ }
9888
+ User.GetSettingsCacheKey = GetSettingsCacheKey;
9862
9889
  })(User || (User = {}));
9863
9890
 
9864
9891
  /**
@@ -10836,6 +10863,8 @@ var Plugin;
10836
10863
  req: req
10837
10864
  });
10838
10865
  }
10866
+ // We changed the expected plugin code without changing the API response so we need to read and reformat the file content.
10867
+ // TODO: Create a v3 request that gives us the plugin code in a more usable format.
10839
10868
  let fileContent = yield fileContentProm;
10840
10869
  const start = fileContent.indexOf("{");
10841
10870
  const end = fileContent.lastIndexOf("}");
@@ -10885,6 +10914,7 @@ var Plugin;
10885
10914
  }
10886
10915
  return {
10887
10916
  run: () => {
10917
+ // 'eval2 = eval' stops the linter from complaining about using eval.
10888
10918
  const eval2 = eval;
10889
10919
  eval2(script);
10890
10920
  // Ensure a function is returned, even if the plugin is not configured properly to return one.
@@ -11089,7 +11119,7 @@ var DataSource;
11089
11119
  })(DataSource || (DataSource = {}));
11090
11120
 
11091
11121
  // This is updated with the package.json version on build.
11092
- const VERSION = "3.7.0";
11122
+ const VERSION = "3.7.2";
11093
11123
 
11094
11124
  export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
11095
11125
  //# sourceMappingURL=bruce-models.es5.js.map