bruce-models 4.9.7 → 4.9.9

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 (69) hide show
  1. package/dist/bruce-models.es5.js +213 -160
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +213 -160
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account-features.js +1 -1
  6. package/dist/lib/account/account-features.js.map +1 -1
  7. package/dist/lib/account/account.js +11 -11
  8. package/dist/lib/account/account.js.map +1 -1
  9. package/dist/lib/ann-document/ann-document.js +4 -4
  10. package/dist/lib/ann-document/ann-document.js.map +1 -1
  11. package/dist/lib/api/abstract-api.js +1 -1
  12. package/dist/lib/api/abstract-api.js.map +1 -1
  13. package/dist/lib/api/api-getters.js +12 -3
  14. package/dist/lib/api/api-getters.js.map +1 -1
  15. package/dist/lib/bruce-models.js +1 -1
  16. package/dist/lib/client-file/client-file.js +2 -2
  17. package/dist/lib/client-file/client-file.js.map +1 -1
  18. package/dist/lib/custom-form/custom-form.js +6 -6
  19. package/dist/lib/custom-form/custom-form.js.map +1 -1
  20. package/dist/lib/data-source/data-source.js +6 -6
  21. package/dist/lib/data-source/data-source.js.map +1 -1
  22. package/dist/lib/entity/entity-attachment-type.js +2 -2
  23. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  24. package/dist/lib/entity/entity-attachment.js +6 -6
  25. package/dist/lib/entity/entity-attachment.js.map +1 -1
  26. package/dist/lib/entity/entity-comment.js +4 -4
  27. package/dist/lib/entity/entity-comment.js.map +1 -1
  28. package/dist/lib/entity/entity-coords.js +2 -2
  29. package/dist/lib/entity/entity-coords.js.map +1 -1
  30. package/dist/lib/entity/entity-link.js +4 -4
  31. package/dist/lib/entity/entity-link.js.map +1 -1
  32. package/dist/lib/entity/entity-lod-category.js +4 -4
  33. package/dist/lib/entity/entity-lod-category.js.map +1 -1
  34. package/dist/lib/entity/entity-lod.js +6 -6
  35. package/dist/lib/entity/entity-lod.js.map +1 -1
  36. package/dist/lib/entity/entity-relation-type.js +4 -4
  37. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  38. package/dist/lib/entity/entity-relation.js +15 -15
  39. package/dist/lib/entity/entity-relation.js.map +1 -1
  40. package/dist/lib/entity/entity-source.js +2 -2
  41. package/dist/lib/entity/entity-source.js.map +1 -1
  42. package/dist/lib/entity/entity-tag.js +5 -5
  43. package/dist/lib/entity/entity-tag.js.map +1 -1
  44. package/dist/lib/entity/entity-type.js +43 -8
  45. package/dist/lib/entity/entity-type.js.map +1 -1
  46. package/dist/lib/environment.js +1 -1
  47. package/dist/lib/environment.js.map +1 -1
  48. package/dist/lib/import/imported-file.js +6 -6
  49. package/dist/lib/import/imported-file.js.map +1 -1
  50. package/dist/lib/plugin/plugin.js +4 -4
  51. package/dist/lib/plugin/plugin.js.map +1 -1
  52. package/dist/lib/program-key/program-key.js +4 -4
  53. package/dist/lib/program-key/program-key.js.map +1 -1
  54. package/dist/lib/project/project-view-bookmark.js +6 -6
  55. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  56. package/dist/lib/project/project-view.js +4 -4
  57. package/dist/lib/project/project-view.js.map +1 -1
  58. package/dist/lib/style/style.js +4 -4
  59. package/dist/lib/style/style.js.map +1 -1
  60. package/dist/lib/tileset/tileset.js +15 -15
  61. package/dist/lib/tileset/tileset.js.map +1 -1
  62. package/dist/lib/user/session.js +2 -2
  63. package/dist/lib/user/session.js.map +1 -1
  64. package/dist/lib/user/user.js +26 -17
  65. package/dist/lib/user/user.js.map +1 -1
  66. package/dist/types/api/api-getters.d.ts +1 -0
  67. package/dist/types/bruce-models.d.ts +1 -1
  68. package/dist/types/entity/entity-type.d.ts +8 -1
  69. package/package.json +1 -1
@@ -368,7 +368,7 @@ class AbstractApi {
368
368
  if (noCache) {
369
369
  return;
370
370
  }
371
- if (isNaN(duration)) {
371
+ if (isNaN(duration) || duration == null) {
372
372
  duration = Api.DEFAULT_CACHE_DURATION;
373
373
  }
374
374
  this.Cache.Set({
@@ -1399,6 +1399,15 @@ class ApiGetters {
1399
1399
  this.env = (params === null || params === void 0 ? void 0 : params.env) ? params.env : Api.EEnv.PROD;
1400
1400
  this.sessionId = params === null || params === void 0 ? void 0 : params.sessionId;
1401
1401
  }
1402
+ prepEnv(_env) {
1403
+ if (!_env) {
1404
+ _env = this.env;
1405
+ }
1406
+ if (!_env) {
1407
+ _env = Api.EEnv.PROD;
1408
+ }
1409
+ return _env.toUpperCase();
1410
+ }
1402
1411
  /**
1403
1412
  * Clears all cache items in all API instances.
1404
1413
  */
@@ -1489,7 +1498,7 @@ class ApiGetters {
1489
1498
  }
1490
1499
  let { accountId, env, loadConfig, loadWebSocket } = params;
1491
1500
  accountId = accountId ? accountId : this.accountId;
1492
- env = env ? env : this.env;
1501
+ env = this.prepEnv(env);
1493
1502
  const key = `${accountId}-${env}`;
1494
1503
  if (!this.bruce[key]) {
1495
1504
  this.bruce[key] = new BruceApi.Api({
@@ -1533,7 +1542,7 @@ class ApiGetters {
1533
1542
  params = {};
1534
1543
  }
1535
1544
  let { env } = params;
1536
- env = env ? env : this.env;
1545
+ env = this.prepEnv(env);
1537
1546
  const key = `${env}`;
1538
1547
  if (!this.global[key]) {
1539
1548
  this.global[key] = new GlobalApi.Api({
@@ -1553,7 +1562,7 @@ class ApiGetters {
1553
1562
  params = {};
1554
1563
  }
1555
1564
  let { env } = params;
1556
- env = env ? env : this.env;
1565
+ env = this.prepEnv(env);
1557
1566
  const key = `${env}`;
1558
1567
  if (!this.guardian[key]) {
1559
1568
  this.guardian[key] = new GuardianApi.Api({
@@ -1657,7 +1666,7 @@ var ENVIRONMENT;
1657
1666
  if (!_getters) {
1658
1667
  _getters = new ApiGetters({
1659
1668
  accountId: ENVIRONMENT.PARAMS.accountId,
1660
- env: ENVIRONMENT.PARAMS.env ? ENVIRONMENT.PARAMS.env : Api.EEnv.UAT,
1669
+ env: ENVIRONMENT.PARAMS.env ? ENVIRONMENT.PARAMS.env : Api.EEnv.PROD,
1661
1670
  sessionId: ENVIRONMENT.PARAMS.sessionId
1662
1671
  });
1663
1672
  }
@@ -1719,7 +1728,7 @@ var AnnDocument;
1719
1728
  api = ENVIRONMENT.Api().GetBruceApi();
1720
1729
  }
1721
1730
  const key = GetCacheKey(docId);
1722
- const cache = yield api.GetCacheItem(key, reqParams);
1731
+ const cache = api.GetCacheItem(key, reqParams);
1723
1732
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1724
1733
  return cache.data;
1725
1734
  }
@@ -1734,7 +1743,7 @@ var AnnDocument;
1734
1743
  rej(e);
1735
1744
  }
1736
1745
  }));
1737
- yield api.SetCacheItem({
1746
+ api.SetCacheItem({
1738
1747
  key,
1739
1748
  value: prom,
1740
1749
  req: reqParams
@@ -1757,7 +1766,7 @@ var AnnDocument;
1757
1766
  if (!type) {
1758
1767
  type = "";
1759
1768
  }
1760
- const cache = yield api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
1769
+ const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
1761
1770
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1762
1771
  return cache.data;
1763
1772
  }
@@ -1783,7 +1792,7 @@ var AnnDocument;
1783
1792
  rej(e);
1784
1793
  }
1785
1794
  }));
1786
- yield api.SetCacheItem({
1795
+ api.SetCacheItem({
1787
1796
  key: GetListCacheKey(type, entityId, expandSettings),
1788
1797
  value: req,
1789
1798
  req: reqParams
@@ -1861,7 +1870,7 @@ var CustomForm;
1861
1870
  if (!api) {
1862
1871
  api = ENVIRONMENT.Api().GetBruceApi();
1863
1872
  }
1864
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
1873
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
1865
1874
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1866
1875
  return cache.data;
1867
1876
  }
@@ -1876,7 +1885,7 @@ var CustomForm;
1876
1885
  rej(err);
1877
1886
  }
1878
1887
  }));
1879
- yield api.SetCacheItem({
1888
+ api.SetCacheItem({
1880
1889
  key: GetCacheKey(id),
1881
1890
  value: prom,
1882
1891
  req: reqParams
@@ -1899,7 +1908,7 @@ var CustomForm;
1899
1908
  api = ENVIRONMENT.Api().GetBruceApi();
1900
1909
  }
1901
1910
  yield api.DELETE(`customForm/${id}`, Api.PrepReqParams(reqParams));
1902
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
1911
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
1903
1912
  });
1904
1913
  }
1905
1914
  CustomForm.Delete = Delete;
@@ -1915,7 +1924,7 @@ var CustomForm;
1915
1924
  api = ENVIRONMENT.Api().GetBruceApi();
1916
1925
  }
1917
1926
  const url = typeId ? `entityType/${typeId}/customForms` : "customForms";
1918
- const cache = yield api.GetCacheItem(GetListCacheKey(typeId), reqParams);
1927
+ const cache = api.GetCacheItem(GetListCacheKey(typeId), reqParams);
1919
1928
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1920
1929
  return cache.data;
1921
1930
  }
@@ -1925,7 +1934,7 @@ var CustomForm;
1925
1934
  forms: data.Items
1926
1935
  };
1927
1936
  });
1928
- yield api.SetCacheItem({
1937
+ api.SetCacheItem({
1929
1938
  key: GetListCacheKey(typeId),
1930
1939
  value: prom,
1931
1940
  req: reqParams
@@ -1949,7 +1958,7 @@ var CustomForm;
1949
1958
  data.ID = 0;
1950
1959
  }
1951
1960
  const res = yield api.POST(`customForm/${data.ID}`, data, Api.PrepReqParams(reqParams));
1952
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
1961
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
1953
1962
  return {
1954
1963
  form: res
1955
1964
  };
@@ -2407,7 +2416,7 @@ var EntityType;
2407
2416
  api = ENVIRONMENT.Api().GetBruceApi();
2408
2417
  }
2409
2418
  const key = GetCacheKey(typeId);
2410
- const cache = yield api.GetCacheItem(key, reqParams);
2419
+ const cache = api.GetCacheItem(key, reqParams);
2411
2420
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
2412
2421
  return cache.data;
2413
2422
  }
@@ -2423,7 +2432,7 @@ var EntityType;
2423
2432
  rej(e);
2424
2433
  }
2425
2434
  }));
2426
- yield api.SetCacheItem({
2435
+ api.SetCacheItem({
2427
2436
  key,
2428
2437
  value: prom,
2429
2438
  req: reqParams
@@ -2458,11 +2467,16 @@ var EntityType;
2458
2467
  */
2459
2468
  function GetList(params) {
2460
2469
  return __awaiter(this, void 0, void 0, function* () {
2461
- let { entityTypeIds, api, req: reqParams, parentTypeId } = params;
2470
+ let { entityTypeIds, api, req: reqParams, parentTypeId, expandSettings, search } = params;
2462
2471
  if (!api) {
2463
2472
  api = ENVIRONMENT.Api().GetBruceApi();
2464
2473
  }
2465
- const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(entityTypeIds), reqParams);
2474
+ const cache = api.GetCacheItem(GetListCacheKey({
2475
+ typeIds: entityTypeIds,
2476
+ parentTypeId,
2477
+ expandSettings,
2478
+ search
2479
+ }), reqParams);
2466
2480
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
2467
2481
  return cache.data;
2468
2482
  }
@@ -2481,6 +2495,12 @@ var EntityType;
2481
2495
  if (parentTypeId) {
2482
2496
  urlParams.append("parentEntityTypeID", parentTypeId);
2483
2497
  }
2498
+ if (expandSettings) {
2499
+ urlParams.append("expandSettings", "true");
2500
+ }
2501
+ if (search) {
2502
+ urlParams.append("search", search);
2503
+ }
2484
2504
  reqs.push(api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams)));
2485
2505
  }
2486
2506
  }
@@ -2489,6 +2509,12 @@ var EntityType;
2489
2509
  if (parentTypeId) {
2490
2510
  urlParams.append("parentEntityTypeID", parentTypeId);
2491
2511
  }
2512
+ if (expandSettings) {
2513
+ urlParams.append("expandSettings", "true");
2514
+ }
2515
+ if (search) {
2516
+ urlParams.append("search", search);
2517
+ }
2492
2518
  reqs.push(api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams)));
2493
2519
  }
2494
2520
  const data = yield Promise.all(reqs);
@@ -2511,8 +2537,13 @@ var EntityType;
2511
2537
  }
2512
2538
  }));
2513
2539
  if (!parentTypeId) {
2514
- yield api.SetCacheItem({
2515
- key: GetListCacheKey(entityTypeIds),
2540
+ api.SetCacheItem({
2541
+ key: GetListCacheKey({
2542
+ typeIds: entityTypeIds,
2543
+ parentTypeId,
2544
+ expandSettings,
2545
+ search
2546
+ }),
2516
2547
  value: req,
2517
2548
  req: reqParams,
2518
2549
  duration: 60 * 5 // 5 minutes.
@@ -2626,11 +2657,24 @@ var EntityType;
2626
2657
  * @param typeIds
2627
2658
  * @returns
2628
2659
  */
2629
- function GetListCacheKey(typeIds) {
2660
+ function GetListCacheKey(params) {
2661
+ if (!params) {
2662
+ params = {};
2663
+ }
2664
+ let { typeIds, expandSettings, parentTypeId, search } = params;
2665
+ let key = Api.ECacheKey.EntityType;
2630
2666
  if (!typeIds) {
2631
2667
  typeIds = [];
2632
2668
  }
2633
- return Api.ECacheKey.EntityType + (typeIds.length ? Api.ECacheKey.Id : "") + typeIds.join(",");
2669
+ key += (typeIds.length ? Api.ECacheKey.Id : "") + typeIds.join(",");
2670
+ if (parentTypeId) {
2671
+ key += "_PARENT_" + parentTypeId;
2672
+ }
2673
+ if (!expandSettings) {
2674
+ expandSettings = false;
2675
+ }
2676
+ key += "_EXPAND_" + expandSettings;
2677
+ return key;
2634
2678
  }
2635
2679
  EntityType.GetListCacheKey = GetListCacheKey;
2636
2680
  })(EntityType || (EntityType = {}));
@@ -5576,7 +5620,7 @@ var EntityAttachmentType;
5576
5620
  if (!api) {
5577
5621
  api = ENVIRONMENT.Api().GetBruceApi();
5578
5622
  }
5579
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
5623
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
5580
5624
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5581
5625
  return cache.data;
5582
5626
  }
@@ -5591,7 +5635,7 @@ var EntityAttachmentType;
5591
5635
  rej(e);
5592
5636
  }
5593
5637
  }));
5594
- yield api.SetCacheItem({
5638
+ api.SetCacheItem({
5595
5639
  key: GetListCacheKey(),
5596
5640
  value: req,
5597
5641
  req: reqParams
@@ -5661,7 +5705,7 @@ var EntityAttachment;
5661
5705
  api.Cache.Remove(GetCacheKey(attachments[i].ID));
5662
5706
  }
5663
5707
  }
5664
- yield api.Cache.Remove(GetListCacheKey(entityId));
5708
+ api.Cache.Remove(GetListCacheKey(entityId));
5665
5709
  return {
5666
5710
  attachments: res.attachments
5667
5711
  };
@@ -5692,7 +5736,7 @@ var EntityAttachment;
5692
5736
  for (let i = 0; i < attachments.length; i++) {
5693
5737
  api.Cache.Remove(GetCacheKey(attachments[i].ID));
5694
5738
  }
5695
- yield api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
5739
+ api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
5696
5740
  });
5697
5741
  }
5698
5742
  EntityAttachment.UpdateOrder = UpdateOrder;
@@ -5710,8 +5754,8 @@ var EntityAttachment;
5710
5754
  api = ENVIRONMENT.Api().GetBruceApi();
5711
5755
  }
5712
5756
  yield api.DELETE(`entity/${entityId}/attachments/${attachmentId}`, Api.PrepReqParams(req));
5713
- yield api.Cache.Remove(GetCacheKey(attachmentId));
5714
- yield api.Cache.Remove(GetListCacheKey(params.entityId));
5757
+ api.Cache.Remove(GetCacheKey(attachmentId));
5758
+ api.Cache.Remove(GetListCacheKey(params.entityId));
5715
5759
  });
5716
5760
  }
5717
5761
  EntityAttachment.Delete = Delete;
@@ -5729,7 +5773,7 @@ var EntityAttachment;
5729
5773
  if (!api) {
5730
5774
  api = ENVIRONMENT.Api().GetBruceApi();
5731
5775
  }
5732
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5776
+ const cache = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5733
5777
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5734
5778
  return cache.data;
5735
5779
  }
@@ -5744,7 +5788,7 @@ var EntityAttachment;
5744
5788
  rej(e);
5745
5789
  }
5746
5790
  }));
5747
- yield api.SetCacheItem({
5791
+ api.SetCacheItem({
5748
5792
  key: GetListCacheKey(entityId),
5749
5793
  value: req,
5750
5794
  req: reqParams
@@ -5833,7 +5877,7 @@ var EntityComment;
5833
5877
  const url = `entity/${data["TargetObject.ID"]}/comment` + (data.ID == null ? "" : "/" + data.ID);
5834
5878
  const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
5835
5879
  api.Cache.Remove(GetCacheKey(data.ID));
5836
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Comment + Api.ECacheKey.Entity);
5880
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Comment + Api.ECacheKey.Entity);
5837
5881
  return {
5838
5882
  comment: res
5839
5883
  };
@@ -5855,7 +5899,7 @@ var EntityComment;
5855
5899
  }
5856
5900
  yield api.DELETE(`entity/${entityId}/comment/${commentId}`, Api.PrepReqParams(reqParams));
5857
5901
  api.Cache.Remove(GetCacheKey(commentId));
5858
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Comment + Api.ECacheKey.Entity);
5902
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Comment + Api.ECacheKey.Entity);
5859
5903
  });
5860
5904
  }
5861
5905
  EntityComment.Delete = Delete;
@@ -5873,7 +5917,7 @@ var EntityComment;
5873
5917
  if (!api) {
5874
5918
  api = ENVIRONMENT.Api().GetBruceApi();
5875
5919
  }
5876
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5920
+ const cache = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5877
5921
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5878
5922
  return cache.data;
5879
5923
  }
@@ -5888,7 +5932,7 @@ var EntityComment;
5888
5932
  rej(e);
5889
5933
  }
5890
5934
  }));
5891
- yield api.SetCacheItem({
5935
+ api.SetCacheItem({
5892
5936
  key: GetListCacheKey(entityId),
5893
5937
  value: req,
5894
5938
  req: reqParams
@@ -5950,7 +5994,7 @@ var EntityLink;
5950
5994
  const url = `entity/${data["Entity.ID"]}/link` + (data.ID == null ? "" : "/" + data.ID);
5951
5995
  const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
5952
5996
  api.Cache.Remove(GetCacheKey(data.ID));
5953
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Link + Api.ECacheKey.Entity);
5997
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Link + Api.ECacheKey.Entity);
5954
5998
  return {
5955
5999
  link: res
5956
6000
  };
@@ -5972,7 +6016,7 @@ var EntityLink;
5972
6016
  }
5973
6017
  yield api.DELETE(`entity/${entityId}/link/${linkId}`, Api.PrepReqParams(reqParams));
5974
6018
  api.Cache.Remove(GetCacheKey(linkId));
5975
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Link + Api.ECacheKey.Entity);
6019
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Link + Api.ECacheKey.Entity);
5976
6020
  });
5977
6021
  }
5978
6022
  EntityLink.Delete = Delete;
@@ -5990,7 +6034,7 @@ var EntityLink;
5990
6034
  if (!api) {
5991
6035
  api = ENVIRONMENT.Api().GetBruceApi();
5992
6036
  }
5993
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
6037
+ const cache = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5994
6038
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5995
6039
  return cache.data;
5996
6040
  }
@@ -6005,7 +6049,7 @@ var EntityLink;
6005
6049
  rej(e);
6006
6050
  }
6007
6051
  }));
6008
- yield api.SetCacheItem({
6052
+ api.SetCacheItem({
6009
6053
  key: GetListCacheKey(entityId),
6010
6054
  value: req,
6011
6055
  req: reqParams
@@ -6095,7 +6139,7 @@ var EntityLod;
6095
6139
  if (!api) {
6096
6140
  api = ENVIRONMENT.Api().GetBruceApi();
6097
6141
  }
6098
- const cache = yield api.GetCacheItem(GetCacheKey(url), reqParams);
6142
+ const cache = api.GetCacheItem(GetCacheKey(url), reqParams);
6099
6143
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6100
6144
  return cache.data;
6101
6145
  }
@@ -6110,7 +6154,7 @@ var EntityLod;
6110
6154
  rej(e);
6111
6155
  }
6112
6156
  }));
6113
- yield api.SetCacheItem({
6157
+ api.SetCacheItem({
6114
6158
  key: GetCacheKey(url),
6115
6159
  value: req,
6116
6160
  req: reqParams
@@ -6157,7 +6201,7 @@ var EntityLod;
6157
6201
  if (!entityId) {
6158
6202
  throw ("Entity id is required.");
6159
6203
  }
6160
- const cache = yield api.GetCacheItem(GetEntityListKey(entityId), reqParams);
6204
+ const cache = api.GetCacheItem(GetEntityListKey(entityId), reqParams);
6161
6205
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6162
6206
  return cache.data;
6163
6207
  }
@@ -6173,7 +6217,7 @@ var EntityLod;
6173
6217
  rej(e);
6174
6218
  }
6175
6219
  }));
6176
- yield api.SetCacheItem({
6220
+ api.SetCacheItem({
6177
6221
  key: GetEntityListKey(entityId),
6178
6222
  value: prom,
6179
6223
  req: reqParams
@@ -6195,7 +6239,7 @@ var EntityLod;
6195
6239
  if (!group) {
6196
6240
  group = "DEFAULT";
6197
6241
  }
6198
- const cache = yield api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
6242
+ const cache = api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
6199
6243
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6200
6244
  return cache.data;
6201
6245
  }
@@ -6212,7 +6256,7 @@ var EntityLod;
6212
6256
  rej(e);
6213
6257
  }
6214
6258
  }));
6215
- yield api.SetCacheItem({
6259
+ api.SetCacheItem({
6216
6260
  key: GetTypeListKey(typeId, group),
6217
6261
  value: prom,
6218
6262
  req: reqParams
@@ -6331,7 +6375,7 @@ var EntityLodCategory;
6331
6375
  if (!api) {
6332
6376
  api = ENVIRONMENT.Api().GetBruceApi();
6333
6377
  }
6334
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
6378
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
6335
6379
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6336
6380
  return cache.data;
6337
6381
  }
@@ -6346,7 +6390,7 @@ var EntityLodCategory;
6346
6390
  rej(e);
6347
6391
  }
6348
6392
  }));
6349
- yield api.SetCacheItem({
6393
+ api.SetCacheItem({
6350
6394
  key: GetListCacheKey(),
6351
6395
  value: req,
6352
6396
  req: reqParams
@@ -6369,7 +6413,7 @@ var EntityLodCategory;
6369
6413
  if (!api) {
6370
6414
  api = ENVIRONMENT.Api().GetBruceApi();
6371
6415
  }
6372
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
6416
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
6373
6417
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6374
6418
  return cache.data;
6375
6419
  }
@@ -6384,7 +6428,7 @@ var EntityLodCategory;
6384
6428
  rej(e);
6385
6429
  }
6386
6430
  }));
6387
- yield api.SetCacheItem({
6431
+ api.SetCacheItem({
6388
6432
  key: GetCacheKey(id),
6389
6433
  value: req,
6390
6434
  req: reqParams
@@ -6485,7 +6529,7 @@ var EntityRelationType;
6485
6529
  api = ENVIRONMENT.Api().GetBruceApi();
6486
6530
  }
6487
6531
  const key = GetCacheKey(typeId);
6488
- const cache = yield api.GetCacheItem(key, reqParams);
6532
+ const cache = api.GetCacheItem(key, reqParams);
6489
6533
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6490
6534
  return cache.data;
6491
6535
  }
@@ -6500,7 +6544,7 @@ var EntityRelationType;
6500
6544
  rej(e);
6501
6545
  }
6502
6546
  }));
6503
- yield api.SetCacheItem({
6547
+ api.SetCacheItem({
6504
6548
  key,
6505
6549
  value: prom,
6506
6550
  req: reqParams
@@ -6539,7 +6583,7 @@ var EntityRelationType;
6539
6583
  if (!api) {
6540
6584
  api = ENVIRONMENT.Api().GetBruceApi();
6541
6585
  }
6542
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
6586
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
6543
6587
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6544
6588
  return cache.data;
6545
6589
  }
@@ -6554,7 +6598,7 @@ var EntityRelationType;
6554
6598
  rej(e);
6555
6599
  }
6556
6600
  }));
6557
- yield api.SetCacheItem({
6601
+ api.SetCacheItem({
6558
6602
  key: GetListCacheKey(),
6559
6603
  value: req,
6560
6604
  req: reqParams
@@ -6643,11 +6687,11 @@ var EntityRelation;
6643
6687
  };
6644
6688
  const url = `entity/${data["Principal.Entity.ID"]}/relation/${data["Relation.Type.ID"]}/add`;
6645
6689
  yield api.POST(url, reqData, Api.PrepReqParams(reqParams));
6646
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6647
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Related.Entity.ID"]);
6648
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.RelationType);
6690
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6691
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Related.Entity.ID"]);
6692
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.RelationType);
6649
6693
  if (data["Data.Entity.ID"]) {
6650
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Entity + Api.ECacheKey.Id + data["Data.Entity.ID"]);
6694
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Entity + Api.ECacheKey.Id + data["Data.Entity.ID"]);
6651
6695
  }
6652
6696
  });
6653
6697
  }
@@ -6670,9 +6714,9 @@ var EntityRelation;
6670
6714
  "Related.Entity.ID": [relatedEntityId]
6671
6715
  }, Api.PrepReqParams(reqParams));
6672
6716
  // Remove related cache entries
6673
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + principalEntityId);
6674
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + relatedEntityId);
6675
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.RelationType + Api.ECacheKey.Id + relationTypeId);
6717
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + principalEntityId);
6718
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + relatedEntityId);
6719
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.RelationType + Api.ECacheKey.Id + relationTypeId);
6676
6720
  });
6677
6721
  }
6678
6722
  EntityRelation.Delete = Delete;
@@ -6692,11 +6736,11 @@ var EntityRelation;
6692
6736
  }
6693
6737
  const url = `entity/${data["Principal.Entity.ID"]}/otherEntityID/${data["Related.Entity.ID"]}/relation/${data["Relation.Type.ID"]}/update`;
6694
6738
  const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
6695
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6696
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Related.Entity.ID"]);
6697
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.RelationType + Api.ECacheKey.Id + data["Relation.Type.ID"]);
6739
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6740
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Related.Entity.ID"]);
6741
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.RelationType + Api.ECacheKey.Id + data["Relation.Type.ID"]);
6698
6742
  if (data["Data.Entity.ID"]) {
6699
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Entity + Api.ECacheKey.Id + data["Data.Entity.ID"]);
6743
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Entity + Api.ECacheKey.Id + data["Data.Entity.ID"]);
6700
6744
  }
6701
6745
  });
6702
6746
  }
@@ -6716,7 +6760,7 @@ var EntityRelation;
6716
6760
  api = ENVIRONMENT.Api().GetBruceApi();
6717
6761
  }
6718
6762
  filter = Object.assign({ relationTypeId: "", oneWayOnly: false, loadEntityData: false }, filter);
6719
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId, filter), reqParams);
6763
+ const cache = api.GetCacheItem(GetListCacheKey(entityId, filter), reqParams);
6720
6764
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6721
6765
  return cache.data;
6722
6766
  }
@@ -6736,7 +6780,7 @@ var EntityRelation;
6736
6780
  rej(e);
6737
6781
  }
6738
6782
  }));
6739
- yield api.SetCacheItem({
6783
+ api.SetCacheItem({
6740
6784
  key: GetListCacheKey(entityId, filter),
6741
6785
  value: req,
6742
6786
  req: reqParams
@@ -6759,7 +6803,7 @@ var EntityRelation;
6759
6803
  if (!api) {
6760
6804
  api = ENVIRONMENT.Api().GetBruceApi();
6761
6805
  }
6762
- const cache = yield api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
6806
+ const cache = api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
6763
6807
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6764
6808
  return cache.data;
6765
6809
  }
@@ -6774,7 +6818,7 @@ var EntityRelation;
6774
6818
  rej(e);
6775
6819
  }
6776
6820
  }));
6777
- yield api.SetCacheItem({
6821
+ api.SetCacheItem({
6778
6822
  key: GetEntityCacheKey(entityId),
6779
6823
  value: prom,
6780
6824
  req: reqParams
@@ -6888,7 +6932,7 @@ var EntitySource;
6888
6932
  const reqs = [];
6889
6933
  for (let i = 0; i < sourceKeys.length; i++) {
6890
6934
  const sourceKey = sourceKeys[i];
6891
- const cache = yield api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
6935
+ const cache = api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
6892
6936
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6893
6937
  reqs.push(cache.data);
6894
6938
  }
@@ -6984,7 +7028,7 @@ var EntitySource;
6984
7028
  }
6985
7029
  const res = yield api.POST("entitysource", source);
6986
7030
  const cacheKey = GetCacheKey(source["Source.ID"], source["SourceRecord.Key"]);
6987
- yield api.Cache.Remove(cacheKey);
7031
+ api.Cache.Remove(cacheKey);
6988
7032
  return {
6989
7033
  source: res
6990
7034
  };
@@ -7107,7 +7151,7 @@ var EntityTag;
7107
7151
  rej(e);
7108
7152
  }
7109
7153
  }));
7110
- yield api.SetCacheItem({
7154
+ api.SetCacheItem({
7111
7155
  key: GetCacheKey(id),
7112
7156
  value: req,
7113
7157
  req: reqParams
@@ -7132,7 +7176,7 @@ var EntityTag;
7132
7176
  if (!api) {
7133
7177
  api = ENVIRONMENT.Api().GetBruceApi();
7134
7178
  }
7135
- const cache = yield api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
7179
+ const cache = api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
7136
7180
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7137
7181
  return cache.data;
7138
7182
  }
@@ -7147,7 +7191,7 @@ var EntityTag;
7147
7191
  rej(e);
7148
7192
  }
7149
7193
  }));
7150
- yield api.SetCacheItem({
7194
+ api.SetCacheItem({
7151
7195
  key: GetListCacheKey(entityTypeId),
7152
7196
  value: req,
7153
7197
  req: reqParams
@@ -7171,7 +7215,7 @@ var EntityTag;
7171
7215
  }
7172
7216
  yield api.DELETE(`layer/${tagId}`, Api.PrepReqParams(reqParams));
7173
7217
  api.Cache.Remove(GetCacheKey(tagId));
7174
- yield api.Cache.RemoveByStartsWith(GetListCacheKey());
7218
+ api.Cache.RemoveByStartsWith(GetListCacheKey());
7175
7219
  });
7176
7220
  }
7177
7221
  EntityTag.Delete = Delete;
@@ -7189,7 +7233,7 @@ var EntityTag;
7189
7233
  const url = data.ID ? `layer/${data.ID}` : "layer";
7190
7234
  const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
7191
7235
  api.Cache.Remove(GetCacheKey(data.ID));
7192
- yield api.Cache.RemoveByStartsWith(GetListCacheKey());
7236
+ api.Cache.RemoveByStartsWith(GetListCacheKey());
7193
7237
  return {
7194
7238
  tag: res
7195
7239
  };
@@ -7284,7 +7328,7 @@ var EntityCoords;
7284
7328
  if (!api) {
7285
7329
  api = ENVIRONMENT.Api().GetBruceApi();
7286
7330
  }
7287
- const cache = yield api.GetCacheItem(GetCacheKey(entityId), reqParams);
7331
+ const cache = api.GetCacheItem(GetCacheKey(entityId), reqParams);
7288
7332
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7289
7333
  return cache.data;
7290
7334
  }
@@ -7299,7 +7343,7 @@ var EntityCoords;
7299
7343
  rej(e);
7300
7344
  }
7301
7345
  }));
7302
- yield api.SetCacheItem({
7346
+ api.SetCacheItem({
7303
7347
  key: GetCacheKey(entityId),
7304
7348
  value: prom,
7305
7349
  req: reqParams
@@ -7605,7 +7649,7 @@ var Style;
7605
7649
  if (!api) {
7606
7650
  api = ENVIRONMENT.Api().GetBruceApi();
7607
7651
  }
7608
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
7652
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
7609
7653
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7610
7654
  return cache.data;
7611
7655
  }
@@ -7620,7 +7664,7 @@ var Style;
7620
7664
  rej(e);
7621
7665
  }
7622
7666
  }));
7623
- yield api.SetCacheItem({
7667
+ api.SetCacheItem({
7624
7668
  key: GetListCacheKey(),
7625
7669
  value: res,
7626
7670
  req: reqParams
@@ -7643,7 +7687,7 @@ var Style;
7643
7687
  if (!api) {
7644
7688
  api = ENVIRONMENT.Api().GetBruceApi();
7645
7689
  }
7646
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
7690
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
7647
7691
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7648
7692
  return cache.data;
7649
7693
  }
@@ -7658,7 +7702,7 @@ var Style;
7658
7702
  rej(e);
7659
7703
  }
7660
7704
  }));
7661
- yield api.SetCacheItem({
7705
+ api.SetCacheItem({
7662
7706
  key: GetCacheKey(id),
7663
7707
  value: prom,
7664
7708
  req: reqParams
@@ -8351,7 +8395,7 @@ var ClientFile;
8351
8395
  throw ("File ID is required.");
8352
8396
  }
8353
8397
  const key = GetCacheKey(fileId);
8354
- const cache = yield api.GetCacheItem(key, reqParams);
8398
+ const cache = api.GetCacheItem(key, reqParams);
8355
8399
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
8356
8400
  return cache.data;
8357
8401
  }
@@ -8366,7 +8410,7 @@ var ClientFile;
8366
8410
  rej(e);
8367
8411
  }
8368
8412
  }));
8369
- yield api.SetCacheItem({
8413
+ api.SetCacheItem({
8370
8414
  key,
8371
8415
  value: prom,
8372
8416
  req: reqParams
@@ -8877,7 +8921,7 @@ var ProgramKey;
8877
8921
  });
8878
8922
  const key = prom.programKeys.find(k => k.ProgramId === programId);
8879
8923
  // const key = GetCacheKey(programId);
8880
- // const cache = await api.GetCacheItem(key, reqParams);
8924
+ // const cache = api.GetCacheItem(key, reqParams);
8881
8925
  // if (cache?.found) {
8882
8926
  // return cache.data;
8883
8927
  // }
@@ -8892,7 +8936,7 @@ var ProgramKey;
8892
8936
  // rej(e);
8893
8937
  // }
8894
8938
  // });
8895
- // await api.SetCacheItem({
8939
+ // api.SetCacheItem({
8896
8940
  // key,
8897
8941
  // value: prom,
8898
8942
  // req: reqParams
@@ -8914,7 +8958,7 @@ var ProgramKey;
8914
8958
  if (!api) {
8915
8959
  api = ENVIRONMENT.Api().GetBruceApi();
8916
8960
  }
8917
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
8961
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
8918
8962
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
8919
8963
  return cache.data;
8920
8964
  }
@@ -8929,7 +8973,7 @@ var ProgramKey;
8929
8973
  rej(e);
8930
8974
  }
8931
8975
  }));
8932
- yield api.SetCacheItem({
8976
+ api.SetCacheItem({
8933
8977
  key: GetListCacheKey(),
8934
8978
  value: req,
8935
8979
  req: reqParams
@@ -9164,7 +9208,7 @@ var Tileset;
9164
9208
  if (!api) {
9165
9209
  api = ENVIRONMENT.Api().GetBruceApi();
9166
9210
  }
9167
- const cache = yield api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
9211
+ const cache = api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
9168
9212
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9169
9213
  return cache.data;
9170
9214
  }
@@ -9184,7 +9228,7 @@ var Tileset;
9184
9228
  rej(e);
9185
9229
  }
9186
9230
  }));
9187
- yield api.SetCacheItem({
9231
+ api.SetCacheItem({
9188
9232
  key: GetCacheKey(tilesetId, loadFiles),
9189
9233
  value: prom,
9190
9234
  req: reqParams
@@ -9240,7 +9284,7 @@ var Tileset;
9240
9284
  if (!api) {
9241
9285
  api = ENVIRONMENT.Api().GetBruceApi();
9242
9286
  }
9243
- const cache = yield api.GetCacheItem(GetListCacheKey({
9287
+ const cache = api.GetCacheItem(GetListCacheKey({
9244
9288
  assertLocation: assertLocation,
9245
9289
  expandSettings: expandSettings,
9246
9290
  type: type
@@ -9280,7 +9324,7 @@ var Tileset;
9280
9324
  rej(e);
9281
9325
  }
9282
9326
  }));
9283
- yield api.SetCacheItem({
9327
+ api.SetCacheItem({
9284
9328
  key: GetListCacheKey({
9285
9329
  assertLocation: assertLocation,
9286
9330
  expandSettings: expandSettings,
@@ -9307,8 +9351,8 @@ var Tileset;
9307
9351
  api = ENVIRONMENT.Api().GetBruceApi();
9308
9352
  }
9309
9353
  yield api.DELETE(`tileset/delete/${tilesetId}`, reqParams);
9310
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + tilesetId);
9311
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset);
9354
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + tilesetId);
9355
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset);
9312
9356
  });
9313
9357
  }
9314
9358
  Tileset$$1.Delete = Delete;
@@ -9345,8 +9389,8 @@ var Tileset;
9345
9389
  yield api.POST(`tileset/update/${data.id}`, data, Api.PrepReqParams(reqParams));
9346
9390
  }
9347
9391
  }
9348
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + data.id);
9349
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset);
9392
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + data.id);
9393
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset);
9350
9394
  return {
9351
9395
  tileset: data
9352
9396
  };
@@ -9631,9 +9675,9 @@ var Tileset;
9631
9675
  };
9632
9676
  data.ID = res.ID;
9633
9677
  yield api.POST(`tileset/${data.ID}/enableForAccounts`, req, reqParams);
9634
- yield api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"], data["Tileset.ID"]));
9635
- yield api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"]));
9636
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.PublishTileset + Api.ECacheKey.TilesetAccess);
9678
+ api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"], data["Tileset.ID"]));
9679
+ api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"]));
9680
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.PublishTileset + Api.ECacheKey.TilesetAccess);
9637
9681
  return {
9638
9682
  published: data
9639
9683
  };
@@ -9649,7 +9693,7 @@ var Tileset;
9649
9693
  if (!accountId || !tilesetId) {
9650
9694
  throw ("Client account ID and tileset ID are required.");
9651
9695
  }
9652
- const cache = yield api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
9696
+ const cache = api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
9653
9697
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9654
9698
  return cache.data;
9655
9699
  }
@@ -9664,7 +9708,7 @@ var Tileset;
9664
9708
  rej(e);
9665
9709
  }
9666
9710
  }));
9667
- yield api.SetCacheItem({
9711
+ api.SetCacheItem({
9668
9712
  key: GetCacheKey(accountId, tilesetId),
9669
9713
  value: prom,
9670
9714
  req: reqParams
@@ -9682,7 +9726,7 @@ var Tileset;
9682
9726
  if (!accountId) {
9683
9727
  throw ("Client account ID is required.");
9684
9728
  }
9685
- const cache = yield api.GetCacheItem(GetCacheKey(accountId), reqParams);
9729
+ const cache = api.GetCacheItem(GetCacheKey(accountId), reqParams);
9686
9730
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9687
9731
  return cache.data;
9688
9732
  }
@@ -9697,7 +9741,7 @@ var Tileset;
9697
9741
  rej(e);
9698
9742
  }
9699
9743
  }));
9700
- yield api.SetCacheItem({
9744
+ api.SetCacheItem({
9701
9745
  key: GetCacheKey(accountId),
9702
9746
  value: req,
9703
9747
  req: reqParams
@@ -10036,7 +10080,7 @@ var ProjectViewBookmark;
10036
10080
  api = ENVIRONMENT.Api().GetBruceApi();
10037
10081
  }
10038
10082
  const key = GetCacheKey(viewId, bookmarkId);
10039
- const cache = yield api.GetCacheItem(key, reqParams);
10083
+ const cache = api.GetCacheItem(key, reqParams);
10040
10084
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10041
10085
  return cache.data;
10042
10086
  }
@@ -10051,7 +10095,7 @@ var ProjectViewBookmark;
10051
10095
  rej(e);
10052
10096
  }
10053
10097
  }));
10054
- yield api.SetCacheItem({
10098
+ api.SetCacheItem({
10055
10099
  key,
10056
10100
  value: prom,
10057
10101
  req: reqParams
@@ -10093,7 +10137,7 @@ var ProjectViewBookmark;
10093
10137
  if (!api) {
10094
10138
  api = ENVIRONMENT.Api().GetBruceApi();
10095
10139
  }
10096
- const cache = yield api.GetCacheItem(GetListCacheKey(viewId), reqParams);
10140
+ const cache = api.GetCacheItem(GetListCacheKey(viewId), reqParams);
10097
10141
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10098
10142
  return cache.data;
10099
10143
  }
@@ -10111,7 +10155,7 @@ var ProjectViewBookmark;
10111
10155
  bookmark: item
10112
10156
  });
10113
10157
  });
10114
- yield api.SetCacheItem({
10158
+ api.SetCacheItem({
10115
10159
  key: GetCacheKey(viewId, item.ID),
10116
10160
  value: prom,
10117
10161
  req: reqParams
@@ -10125,7 +10169,7 @@ var ProjectViewBookmark;
10125
10169
  rej(e);
10126
10170
  }
10127
10171
  }));
10128
- yield api.SetCacheItem({
10172
+ api.SetCacheItem({
10129
10173
  key: GetListCacheKey(viewId),
10130
10174
  value: req,
10131
10175
  req: reqParams
@@ -10172,7 +10216,7 @@ var ProjectViewBookmark;
10172
10216
  "DisplayOrder.Start": 0
10173
10217
  };
10174
10218
  yield api.POST(`ui.view/${viewId}/slides/setOrder`, reqData, Api.PrepReqParams(reqParams));
10175
- yield api.Cache.RemoveByStartsWith(GetListCacheKey(viewId));
10219
+ api.Cache.RemoveByStartsWith(GetListCacheKey(viewId));
10176
10220
  });
10177
10221
  }
10178
10222
  ProjectViewBookmark.SetOrder = SetOrder;
@@ -10238,7 +10282,7 @@ var ProjectView;
10238
10282
  api = ENVIRONMENT.Api().GetBruceApi();
10239
10283
  }
10240
10284
  const key = GetCacheKey(viewId);
10241
- const cache = yield api.GetCacheItem(key, reqParams);
10285
+ const cache = api.GetCacheItem(key, reqParams);
10242
10286
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10243
10287
  return cache.data;
10244
10288
  }
@@ -10253,7 +10297,7 @@ var ProjectView;
10253
10297
  rej(e);
10254
10298
  }
10255
10299
  }));
10256
- yield api.SetCacheItem({
10300
+ api.SetCacheItem({
10257
10301
  key,
10258
10302
  value: prom,
10259
10303
  req: reqParams
@@ -10273,7 +10317,7 @@ var ProjectView;
10273
10317
  if (!api) {
10274
10318
  api = ENVIRONMENT.Api().GetBruceApi();
10275
10319
  }
10276
- const cache = yield api.GetCacheItem(GetListCacheKey(type), reqParams);
10320
+ const cache = api.GetCacheItem(GetListCacheKey(type), reqParams);
10277
10321
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10278
10322
  return cache.data;
10279
10323
  }
@@ -10288,7 +10332,7 @@ var ProjectView;
10288
10332
  rej(e);
10289
10333
  }
10290
10334
  }));
10291
- yield api.SetCacheItem({
10335
+ api.SetCacheItem({
10292
10336
  key: GetListCacheKey(type),
10293
10337
  value: prom,
10294
10338
  req: reqParams
@@ -10902,7 +10946,7 @@ var Account;
10902
10946
  if (!api) {
10903
10947
  api = ENVIRONMENT.Api().GetGuardianApi();
10904
10948
  }
10905
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
10949
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
10906
10950
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10907
10951
  return cache.data;
10908
10952
  }
@@ -10911,7 +10955,7 @@ var Account;
10911
10955
  const data = yield api.GET(`accountbyid/${id}`, reqParams);
10912
10956
  // Update the cache by subdomain as well in case it's different to the ID.
10913
10957
  if ((data === null || data === void 0 ? void 0 : data.ID) && (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) != false) {
10914
- yield api.SetCacheItem({
10958
+ api.SetCacheItem({
10915
10959
  key: data.Subdomain,
10916
10960
  value: prom,
10917
10961
  req: reqParams
@@ -10925,7 +10969,7 @@ var Account;
10925
10969
  rej(e);
10926
10970
  }
10927
10971
  }));
10928
- yield api.SetCacheItem({
10972
+ api.SetCacheItem({
10929
10973
  key: GetCacheKey(id),
10930
10974
  value: prom,
10931
10975
  req: reqParams
@@ -10945,7 +10989,7 @@ var Account;
10945
10989
  if (!api) {
10946
10990
  api = ENVIRONMENT.Api().GetGuardianApi();
10947
10991
  }
10948
- const cache = yield api.GetCacheItem(GetCacheKey(subdomain), reqParams);
10992
+ const cache = api.GetCacheItem(GetCacheKey(subdomain), reqParams);
10949
10993
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10950
10994
  return cache.data;
10951
10995
  }
@@ -10954,7 +10998,7 @@ var Account;
10954
10998
  const data = yield api.GET(`account/${subdomain}`, reqParams);
10955
10999
  // Update the cache by ID as well in case it's different to the subdomain.
10956
11000
  if ((data === null || data === void 0 ? void 0 : data.ID) && (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) != false) {
10957
- yield api.SetCacheItem({
11001
+ api.SetCacheItem({
10958
11002
  key: data.ID,
10959
11003
  value: prom,
10960
11004
  req: reqParams
@@ -10968,7 +11012,7 @@ var Account;
10968
11012
  rej(e);
10969
11013
  }
10970
11014
  }));
10971
- yield api.SetCacheItem({
11015
+ api.SetCacheItem({
10972
11016
  key: GetCacheKey(subdomain),
10973
11017
  value: prom,
10974
11018
  req: reqParams
@@ -10988,7 +11032,7 @@ var Account;
10988
11032
  if (!api) {
10989
11033
  api = ENVIRONMENT.Api().GetGuardianApi();
10990
11034
  }
10991
- const cache = yield api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
11035
+ const cache = api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
10992
11036
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10993
11037
  return cache.data;
10994
11038
  }
@@ -11005,7 +11049,7 @@ var Account;
11005
11049
  rej(e);
11006
11050
  }
11007
11051
  }));
11008
- yield api.SetCacheItem({
11052
+ api.SetCacheItem({
11009
11053
  key: GetListCacheKey(api.GetSessionId()),
11010
11054
  value: prom,
11011
11055
  req: reqParams
@@ -11025,7 +11069,7 @@ var Account;
11025
11069
  if (!api) {
11026
11070
  api = ENVIRONMENT.Api().GetGuardianApi();
11027
11071
  }
11028
- const cache = yield api.GetCacheItem(GetCacheKey(id, appId), reqParams);
11072
+ const cache = api.GetCacheItem(GetCacheKey(id, appId), reqParams);
11029
11073
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11030
11074
  return cache.data;
11031
11075
  }
@@ -11043,7 +11087,7 @@ var Account;
11043
11087
  rej(e);
11044
11088
  }
11045
11089
  }));
11046
- yield api.SetCacheItem({
11090
+ api.SetCacheItem({
11047
11091
  key: GetCacheKey(id, appId),
11048
11092
  value: prom,
11049
11093
  req: reqParams
@@ -11065,7 +11109,7 @@ var Account;
11065
11109
  api = ENVIRONMENT.Api().GetGuardianApi();
11066
11110
  }
11067
11111
  const res = yield api.POST(`account/${id}/applicationSettings/${appId}`, data, reqParams);
11068
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Account + Api.ECacheKey.Id + id);
11112
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Account + Api.ECacheKey.Id + id);
11069
11113
  return {
11070
11114
  settings: res
11071
11115
  };
@@ -11406,7 +11450,7 @@ var Session;
11406
11450
  api = ENVIRONMENT.Api().GetGuardianApi();
11407
11451
  }
11408
11452
  const key = GetCacheKey(sessionId);
11409
- const cache = yield api.GetCacheItem(key, reqParams);
11453
+ const cache = api.GetCacheItem(key, reqParams);
11410
11454
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11411
11455
  return cache.data;
11412
11456
  }
@@ -11421,7 +11465,7 @@ var Session;
11421
11465
  rej(e);
11422
11466
  }
11423
11467
  }));
11424
- yield api.SetCacheItem({
11468
+ api.SetCacheItem({
11425
11469
  key,
11426
11470
  value: prom,
11427
11471
  req: reqParams,
@@ -11811,13 +11855,22 @@ var User;
11811
11855
  if (!api) {
11812
11856
  api = ENVIRONMENT.Api().GetGuardianApi();
11813
11857
  }
11814
- const cache = yield api.GetCacheItem(GetCacheKey(id, accountId), reqParams);
11858
+ const cacheKey = GetCacheKey(id, accountId);
11859
+ const cache = api.GetCacheItem(cacheKey, reqParams);
11815
11860
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11816
11861
  return cache.data;
11817
11862
  }
11818
11863
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
11819
11864
  try {
11820
- const data = yield api.GET(`user/${id}${accountId ? `?clientAccountID=${accountId}` : ""}`, reqParams);
11865
+ const urlParams = new URLSearchParams();
11866
+ if (accountId) {
11867
+ urlParams.append("clientAccountID", accountId);
11868
+ }
11869
+ let url = `user/${id}`;
11870
+ if (urlParams.toString().length) {
11871
+ url += "?" + urlParams.toString();
11872
+ }
11873
+ const data = yield api.GET(url, reqParams);
11821
11874
  res({
11822
11875
  user: data
11823
11876
  });
@@ -11826,8 +11879,8 @@ var User;
11826
11879
  rej(e);
11827
11880
  }
11828
11881
  }));
11829
- yield api.SetCacheItem({
11830
- key: GetCacheKey(id, accountId),
11882
+ api.SetCacheItem({
11883
+ key: cacheKey,
11831
11884
  value: prom,
11832
11885
  req: reqParams
11833
11886
  });
@@ -11866,10 +11919,10 @@ var User;
11866
11919
  const res = yield api.POST(`user/${data.ID}`, data, reqParams);
11867
11920
  api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + data.ID);
11868
11921
  if (data.Type == EType.AccessToken) {
11869
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
11922
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
11870
11923
  }
11871
11924
  else if (data.Type == EType.User) {
11872
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.User + Api.ECacheKey.Account);
11925
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.User + Api.ECacheKey.Account);
11873
11926
  }
11874
11927
  return {
11875
11928
  user: res
@@ -11891,7 +11944,7 @@ var User;
11891
11944
  if (!api) {
11892
11945
  api = ENVIRONMENT.Api().GetGuardianApi();
11893
11946
  }
11894
- const cache = yield api.GetCacheItem(GetSettingsCacheKey(userId, appId), req);
11947
+ const cache = api.GetCacheItem(GetSettingsCacheKey(userId, appId), req);
11895
11948
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11896
11949
  return cache.data;
11897
11950
  }
@@ -11917,7 +11970,7 @@ var User;
11917
11970
  rej(e);
11918
11971
  }
11919
11972
  }));
11920
- yield api.SetCacheItem({
11973
+ api.SetCacheItem({
11921
11974
  key: GetSettingsCacheKey(userId, appId),
11922
11975
  value: prom,
11923
11976
  req: req
@@ -12013,7 +12066,7 @@ var User;
12013
12066
  if (!api) {
12014
12067
  api = ENVIRONMENT.Api().GetGuardianApi();
12015
12068
  }
12016
- const cache = yield api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
12069
+ const cache = api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
12017
12070
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
12018
12071
  return cache.data;
12019
12072
  }
@@ -12028,7 +12081,7 @@ var User;
12028
12081
  rej(e);
12029
12082
  }
12030
12083
  }));
12031
- yield api.SetCacheItem({
12084
+ api.SetCacheItem({
12032
12085
  key: GetEmailCacheKey(email, accountId),
12033
12086
  value: prom,
12034
12087
  req: reqParams
@@ -12054,7 +12107,7 @@ var User;
12054
12107
  if (!exclusive) {
12055
12108
  exclusive = false;
12056
12109
  }
12057
- const cache = exclusive ? null : yield api.GetCacheItem(GetListCacheKey(accountId), reqParams);
12110
+ const cache = exclusive ? null : api.GetCacheItem(GetListCacheKey(accountId), reqParams);
12058
12111
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
12059
12112
  return cache.data;
12060
12113
  }
@@ -12072,7 +12125,7 @@ var User;
12072
12125
  req.then((data) => __awaiter(this, void 0, void 0, function* () {
12073
12126
  const users = data.users;
12074
12127
  for (let i = 0; i < users.length; i++) {
12075
- yield api.SetCacheItem({
12128
+ api.SetCacheItem({
12076
12129
  key: GetCacheKey(users[i].ID, accountId),
12077
12130
  value: {
12078
12131
  user: users[i]
@@ -12082,7 +12135,7 @@ var User;
12082
12135
  }
12083
12136
  }));
12084
12137
  if (!exclusive) {
12085
- yield api.SetCacheItem({
12138
+ api.SetCacheItem({
12086
12139
  key: GetListCacheKey(accountId),
12087
12140
  value: req,
12088
12141
  req: reqParams
@@ -12249,7 +12302,7 @@ var User;
12249
12302
  if (!api) {
12250
12303
  api = ENVIRONMENT.Api().GetGuardianApi();
12251
12304
  }
12252
- const cache = yield api.GetCacheItem(GetListCacheKey(accountId), reqParams);
12305
+ const cache = api.GetCacheItem(GetListCacheKey(accountId), reqParams);
12253
12306
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
12254
12307
  return cache.data;
12255
12308
  }
@@ -12264,7 +12317,7 @@ var User;
12264
12317
  rej(e);
12265
12318
  }
12266
12319
  }));
12267
- yield api.SetCacheItem({
12320
+ api.SetCacheItem({
12268
12321
  key: GetListCacheKey(accountId),
12269
12322
  value: req,
12270
12323
  req: reqParams
@@ -12285,7 +12338,7 @@ var User;
12285
12338
  }
12286
12339
  yield api.DELETE(`accessToken/${id}`, reqParams);
12287
12340
  api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + id);
12288
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
12341
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
12289
12342
  });
12290
12343
  }
12291
12344
  AccessToken.Delete = Delete;
@@ -12310,7 +12363,7 @@ var User;
12310
12363
  data.Type = EType.AccessToken;
12311
12364
  }
12312
12365
  data = yield api.POST("accessToken", data, reqParams);
12313
- yield api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
12366
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
12314
12367
  return {
12315
12368
  user: data
12316
12369
  };
@@ -12524,7 +12577,7 @@ var AccountFeatures;
12524
12577
  api = ENVIRONMENT.Api().GetBruceApi();
12525
12578
  }
12526
12579
  const accountId = api.AccountId;
12527
- const cache = yield api.GetCacheItem(GetCacheKey(accountId), reqParams);
12580
+ const cache = api.GetCacheItem(GetCacheKey(accountId), reqParams);
12528
12581
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
12529
12582
  return cache.data;
12530
12583
  }
@@ -13562,7 +13615,7 @@ var ImportedFile;
13562
13615
  if (!pageIndex) {
13563
13616
  pageIndex = 0;
13564
13617
  }
13565
- const cache = yield api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
13618
+ const cache = api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
13566
13619
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13567
13620
  return cache.data;
13568
13621
  }
@@ -13587,7 +13640,7 @@ var ImportedFile;
13587
13640
  rej(e);
13588
13641
  }
13589
13642
  }));
13590
- yield api.SetCacheItem({
13643
+ api.SetCacheItem({
13591
13644
  key: GetListCacheKey(type, pageIndex),
13592
13645
  value: prom,
13593
13646
  req: reqParams
@@ -13607,7 +13660,7 @@ var ImportedFile;
13607
13660
  if (!api) {
13608
13661
  api = ENVIRONMENT.Api().GetBruceApi();
13609
13662
  }
13610
- const cache = yield api.GetCacheItem(GetCacheKeyByRootId(rootId), reqParams);
13663
+ const cache = api.GetCacheItem(GetCacheKeyByRootId(rootId), reqParams);
13611
13664
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13612
13665
  return cache.data;
13613
13666
  }
@@ -13622,7 +13675,7 @@ var ImportedFile;
13622
13675
  rej(e);
13623
13676
  }
13624
13677
  }));
13625
- yield api.SetCacheItem({
13678
+ api.SetCacheItem({
13626
13679
  key: GetCacheKeyByRootId(rootId),
13627
13680
  value: prom,
13628
13681
  req: reqParams
@@ -13642,7 +13695,7 @@ var ImportedFile;
13642
13695
  if (!api) {
13643
13696
  api = ENVIRONMENT.Api().GetBruceApi();
13644
13697
  }
13645
- const cache = yield api.GetCacheItem(GetCacheKey(fileId), reqParams);
13698
+ const cache = api.GetCacheItem(GetCacheKey(fileId), reqParams);
13646
13699
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13647
13700
  return cache.data;
13648
13701
  }
@@ -13657,7 +13710,7 @@ var ImportedFile;
13657
13710
  rej(e);
13658
13711
  }
13659
13712
  }));
13660
- yield api.SetCacheItem({
13713
+ api.SetCacheItem({
13661
13714
  key: GetCacheKey(fileId),
13662
13715
  value: prom,
13663
13716
  req: reqParams
@@ -13879,7 +13932,7 @@ var Plugin;
13879
13932
  if (!api) {
13880
13933
  api = ENVIRONMENT.Api().GetBruceApi();
13881
13934
  }
13882
- const cache = yield api.GetCacheItem(GetCacheKey(pluginId), req);
13935
+ const cache = api.GetCacheItem(GetCacheKey(pluginId), req);
13883
13936
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13884
13937
  return cache.data;
13885
13938
  }
@@ -13894,7 +13947,7 @@ var Plugin;
13894
13947
  rej(e);
13895
13948
  }
13896
13949
  }));
13897
- yield api.SetCacheItem({
13950
+ api.SetCacheItem({
13898
13951
  key: GetCacheKey(pluginId),
13899
13952
  value: prom,
13900
13953
  req: req
@@ -13914,7 +13967,7 @@ var Plugin;
13914
13967
  if (!api) {
13915
13968
  api = ENVIRONMENT.Api().GetBruceApi();
13916
13969
  }
13917
- const cache = yield api.GetCacheItem(GetListCacheKey(), req);
13970
+ const cache = api.GetCacheItem(GetListCacheKey(), req);
13918
13971
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13919
13972
  return cache.data;
13920
13973
  }
@@ -13929,7 +13982,7 @@ var Plugin;
13929
13982
  rej(e);
13930
13983
  }
13931
13984
  }));
13932
- yield api.SetCacheItem({
13985
+ api.SetCacheItem({
13933
13986
  key: GetListCacheKey(),
13934
13987
  value: prom,
13935
13988
  req: req
@@ -14214,8 +14267,8 @@ var DataSource;
14214
14267
  }
14215
14268
  const url = `source` + (data.ID == null ? "" : "/" + data.ID);
14216
14269
  const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
14217
- yield api.Cache.Remove(GetCacheKey(data.ID));
14218
- yield api.Cache.Remove(GetListCacheKey());
14270
+ api.Cache.Remove(GetCacheKey(data.ID));
14271
+ api.Cache.Remove(GetListCacheKey());
14219
14272
  return {
14220
14273
  source: res
14221
14274
  };
@@ -14233,8 +14286,8 @@ var DataSource;
14233
14286
  api = ENVIRONMENT.Api().GetBruceApi();
14234
14287
  }
14235
14288
  yield api.DELETE(`source/${id}`, Api.PrepReqParams(reqParams));
14236
- yield api.Cache.Remove(GetCacheKey(id));
14237
- yield api.Cache.Remove(GetListCacheKey());
14289
+ api.Cache.Remove(GetCacheKey(id));
14290
+ api.Cache.Remove(GetListCacheKey());
14238
14291
  });
14239
14292
  }
14240
14293
  DataSource.Delete = Delete;
@@ -14250,7 +14303,7 @@ var DataSource;
14250
14303
  api = ENVIRONMENT.Api().GetBruceApi();
14251
14304
  }
14252
14305
  reqParams = Api.PrepReqParams(reqParams);
14253
- const cacheData = yield api.GetCacheItem(GetCacheKey(id), reqParams);
14306
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
14254
14307
  if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.found) {
14255
14308
  return cacheData.data;
14256
14309
  }
@@ -14286,7 +14339,7 @@ var DataSource;
14286
14339
  api = ENVIRONMENT.Api().GetBruceApi();
14287
14340
  }
14288
14341
  reqParams = Api.PrepReqParams(reqParams);
14289
- const cacheData = yield api.GetCacheItem(GetListCacheKey(), reqParams);
14342
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
14290
14343
  if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.found) {
14291
14344
  return cacheData.data;
14292
14345
  }
@@ -14364,7 +14417,7 @@ var DataSource;
14364
14417
  })(DataSource || (DataSource = {}));
14365
14418
 
14366
14419
  // This is updated with the package.json version on build.
14367
- const VERSION = "4.9.7";
14420
+ const VERSION = "4.9.9";
14368
14421
 
14369
14422
  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, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
14370
14423
  //# sourceMappingURL=bruce-models.es5.js.map