bruce-models 4.9.8 → 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 (68) hide show
  1. package/dist/bruce-models.es5.js +174 -156
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +174 -156
  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 +4 -4
  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/package.json +1 -1
@@ -373,7 +373,7 @@
373
373
  if (noCache) {
374
374
  return;
375
375
  }
376
- if (isNaN(duration)) {
376
+ if (isNaN(duration) || duration == null) {
377
377
  duration = exports.Api.DEFAULT_CACHE_DURATION;
378
378
  }
379
379
  this.Cache.Set({
@@ -1384,6 +1384,15 @@
1384
1384
  this.env = (params === null || params === void 0 ? void 0 : params.env) ? params.env : exports.Api.EEnv.PROD;
1385
1385
  this.sessionId = params === null || params === void 0 ? void 0 : params.sessionId;
1386
1386
  }
1387
+ prepEnv(_env) {
1388
+ if (!_env) {
1389
+ _env = this.env;
1390
+ }
1391
+ if (!_env) {
1392
+ _env = exports.Api.EEnv.PROD;
1393
+ }
1394
+ return _env.toUpperCase();
1395
+ }
1387
1396
  /**
1388
1397
  * Clears all cache items in all API instances.
1389
1398
  */
@@ -1474,7 +1483,7 @@
1474
1483
  }
1475
1484
  let { accountId, env, loadConfig, loadWebSocket } = params;
1476
1485
  accountId = accountId ? accountId : this.accountId;
1477
- env = env ? env : this.env;
1486
+ env = this.prepEnv(env);
1478
1487
  const key = `${accountId}-${env}`;
1479
1488
  if (!this.bruce[key]) {
1480
1489
  this.bruce[key] = new exports.BruceApi.Api({
@@ -1518,7 +1527,7 @@
1518
1527
  params = {};
1519
1528
  }
1520
1529
  let { env } = params;
1521
- env = env ? env : this.env;
1530
+ env = this.prepEnv(env);
1522
1531
  const key = `${env}`;
1523
1532
  if (!this.global[key]) {
1524
1533
  this.global[key] = new exports.GlobalApi.Api({
@@ -1538,7 +1547,7 @@
1538
1547
  params = {};
1539
1548
  }
1540
1549
  let { env } = params;
1541
- env = env ? env : this.env;
1550
+ env = this.prepEnv(env);
1542
1551
  const key = `${env}`;
1543
1552
  if (!this.guardian[key]) {
1544
1553
  this.guardian[key] = new exports.GuardianApi.Api({
@@ -1641,7 +1650,7 @@
1641
1650
  if (!_getters) {
1642
1651
  _getters = new ApiGetters({
1643
1652
  accountId: ENVIRONMENT.PARAMS.accountId,
1644
- env: ENVIRONMENT.PARAMS.env ? ENVIRONMENT.PARAMS.env : exports.Api.EEnv.UAT,
1653
+ env: ENVIRONMENT.PARAMS.env ? ENVIRONMENT.PARAMS.env : exports.Api.EEnv.PROD,
1645
1654
  sessionId: ENVIRONMENT.PARAMS.sessionId
1646
1655
  });
1647
1656
  }
@@ -1698,7 +1707,7 @@
1698
1707
  api = exports.ENVIRONMENT.Api().GetBruceApi();
1699
1708
  }
1700
1709
  const key = GetCacheKey(docId);
1701
- const cache = yield api.GetCacheItem(key, reqParams);
1710
+ const cache = api.GetCacheItem(key, reqParams);
1702
1711
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1703
1712
  return cache.data;
1704
1713
  }
@@ -1713,7 +1722,7 @@
1713
1722
  rej(e);
1714
1723
  }
1715
1724
  }));
1716
- yield api.SetCacheItem({
1725
+ api.SetCacheItem({
1717
1726
  key,
1718
1727
  value: prom,
1719
1728
  req: reqParams
@@ -1736,7 +1745,7 @@
1736
1745
  if (!type) {
1737
1746
  type = "";
1738
1747
  }
1739
- const cache = yield api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
1748
+ const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
1740
1749
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1741
1750
  return cache.data;
1742
1751
  }
@@ -1762,7 +1771,7 @@
1762
1771
  rej(e);
1763
1772
  }
1764
1773
  }));
1765
- yield api.SetCacheItem({
1774
+ api.SetCacheItem({
1766
1775
  key: GetListCacheKey(type, entityId, expandSettings),
1767
1776
  value: req,
1768
1777
  req: reqParams
@@ -1835,7 +1844,7 @@
1835
1844
  if (!api) {
1836
1845
  api = exports.ENVIRONMENT.Api().GetBruceApi();
1837
1846
  }
1838
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
1847
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
1839
1848
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1840
1849
  return cache.data;
1841
1850
  }
@@ -1850,7 +1859,7 @@
1850
1859
  rej(err);
1851
1860
  }
1852
1861
  }));
1853
- yield api.SetCacheItem({
1862
+ api.SetCacheItem({
1854
1863
  key: GetCacheKey(id),
1855
1864
  value: prom,
1856
1865
  req: reqParams
@@ -1873,7 +1882,7 @@
1873
1882
  api = exports.ENVIRONMENT.Api().GetBruceApi();
1874
1883
  }
1875
1884
  yield api.DELETE(`customForm/${id}`, exports.Api.PrepReqParams(reqParams));
1876
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.CustomForm);
1885
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.CustomForm);
1877
1886
  });
1878
1887
  }
1879
1888
  CustomForm.Delete = Delete;
@@ -1889,7 +1898,7 @@
1889
1898
  api = exports.ENVIRONMENT.Api().GetBruceApi();
1890
1899
  }
1891
1900
  const url = typeId ? `entityType/${typeId}/customForms` : "customForms";
1892
- const cache = yield api.GetCacheItem(GetListCacheKey(typeId), reqParams);
1901
+ const cache = api.GetCacheItem(GetListCacheKey(typeId), reqParams);
1893
1902
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1894
1903
  return cache.data;
1895
1904
  }
@@ -1899,7 +1908,7 @@
1899
1908
  forms: data.Items
1900
1909
  };
1901
1910
  });
1902
- yield api.SetCacheItem({
1911
+ api.SetCacheItem({
1903
1912
  key: GetListCacheKey(typeId),
1904
1913
  value: prom,
1905
1914
  req: reqParams
@@ -1923,7 +1932,7 @@
1923
1932
  data.ID = 0;
1924
1933
  }
1925
1934
  const res = yield api.POST(`customForm/${data.ID}`, data, exports.Api.PrepReqParams(reqParams));
1926
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.CustomForm);
1935
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.CustomForm);
1927
1936
  return {
1928
1937
  form: res
1929
1938
  };
@@ -2372,7 +2381,7 @@
2372
2381
  api = exports.ENVIRONMENT.Api().GetBruceApi();
2373
2382
  }
2374
2383
  const key = GetCacheKey(typeId);
2375
- const cache = yield api.GetCacheItem(key, reqParams);
2384
+ const cache = api.GetCacheItem(key, reqParams);
2376
2385
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
2377
2386
  return cache.data;
2378
2387
  }
@@ -2388,7 +2397,7 @@
2388
2397
  rej(e);
2389
2398
  }
2390
2399
  }));
2391
- yield api.SetCacheItem({
2400
+ api.SetCacheItem({
2392
2401
  key,
2393
2402
  value: prom,
2394
2403
  req: reqParams
@@ -2427,7 +2436,7 @@
2427
2436
  if (!api) {
2428
2437
  api = exports.ENVIRONMENT.Api().GetBruceApi();
2429
2438
  }
2430
- const cache = yield api.GetCacheItem(GetListCacheKey({
2439
+ const cache = api.GetCacheItem(GetListCacheKey({
2431
2440
  typeIds: entityTypeIds,
2432
2441
  parentTypeId,
2433
2442
  expandSettings,
@@ -2493,7 +2502,7 @@
2493
2502
  }
2494
2503
  }));
2495
2504
  if (!parentTypeId) {
2496
- yield api.SetCacheItem({
2505
+ api.SetCacheItem({
2497
2506
  key: GetListCacheKey({
2498
2507
  typeIds: entityTypeIds,
2499
2508
  parentTypeId,
@@ -5541,7 +5550,7 @@
5541
5550
  if (!api) {
5542
5551
  api = exports.ENVIRONMENT.Api().GetBruceApi();
5543
5552
  }
5544
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
5553
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
5545
5554
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5546
5555
  return cache.data;
5547
5556
  }
@@ -5556,7 +5565,7 @@
5556
5565
  rej(e);
5557
5566
  }
5558
5567
  }));
5559
- yield api.SetCacheItem({
5568
+ api.SetCacheItem({
5560
5569
  key: GetListCacheKey(),
5561
5570
  value: req,
5562
5571
  req: reqParams
@@ -5620,7 +5629,7 @@
5620
5629
  api.Cache.Remove(GetCacheKey(attachments[i].ID));
5621
5630
  }
5622
5631
  }
5623
- yield api.Cache.Remove(GetListCacheKey(entityId));
5632
+ api.Cache.Remove(GetListCacheKey(entityId));
5624
5633
  return {
5625
5634
  attachments: res.attachments
5626
5635
  };
@@ -5651,7 +5660,7 @@
5651
5660
  for (let i = 0; i < attachments.length; i++) {
5652
5661
  api.Cache.Remove(GetCacheKey(attachments[i].ID));
5653
5662
  }
5654
- yield api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
5663
+ api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
5655
5664
  });
5656
5665
  }
5657
5666
  EntityAttachment.UpdateOrder = UpdateOrder;
@@ -5669,8 +5678,8 @@
5669
5678
  api = exports.ENVIRONMENT.Api().GetBruceApi();
5670
5679
  }
5671
5680
  yield api.DELETE(`entity/${entityId}/attachments/${attachmentId}`, exports.Api.PrepReqParams(req));
5672
- yield api.Cache.Remove(GetCacheKey(attachmentId));
5673
- yield api.Cache.Remove(GetListCacheKey(params.entityId));
5681
+ api.Cache.Remove(GetCacheKey(attachmentId));
5682
+ api.Cache.Remove(GetListCacheKey(params.entityId));
5674
5683
  });
5675
5684
  }
5676
5685
  EntityAttachment.Delete = Delete;
@@ -5688,7 +5697,7 @@
5688
5697
  if (!api) {
5689
5698
  api = exports.ENVIRONMENT.Api().GetBruceApi();
5690
5699
  }
5691
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5700
+ const cache = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5692
5701
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5693
5702
  return cache.data;
5694
5703
  }
@@ -5703,7 +5712,7 @@
5703
5712
  rej(e);
5704
5713
  }
5705
5714
  }));
5706
- yield api.SetCacheItem({
5715
+ api.SetCacheItem({
5707
5716
  key: GetListCacheKey(entityId),
5708
5717
  value: req,
5709
5718
  req: reqParams
@@ -5784,7 +5793,7 @@
5784
5793
  const url = `entity/${data["TargetObject.ID"]}/comment` + (data.ID == null ? "" : "/" + data.ID);
5785
5794
  const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
5786
5795
  api.Cache.Remove(GetCacheKey(data.ID));
5787
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Comment + exports.Api.ECacheKey.Entity);
5796
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Comment + exports.Api.ECacheKey.Entity);
5788
5797
  return {
5789
5798
  comment: res
5790
5799
  };
@@ -5806,7 +5815,7 @@
5806
5815
  }
5807
5816
  yield api.DELETE(`entity/${entityId}/comment/${commentId}`, exports.Api.PrepReqParams(reqParams));
5808
5817
  api.Cache.Remove(GetCacheKey(commentId));
5809
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Comment + exports.Api.ECacheKey.Entity);
5818
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Comment + exports.Api.ECacheKey.Entity);
5810
5819
  });
5811
5820
  }
5812
5821
  EntityComment.Delete = Delete;
@@ -5824,7 +5833,7 @@
5824
5833
  if (!api) {
5825
5834
  api = exports.ENVIRONMENT.Api().GetBruceApi();
5826
5835
  }
5827
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5836
+ const cache = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5828
5837
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5829
5838
  return cache.data;
5830
5839
  }
@@ -5839,7 +5848,7 @@
5839
5848
  rej(e);
5840
5849
  }
5841
5850
  }));
5842
- yield api.SetCacheItem({
5851
+ api.SetCacheItem({
5843
5852
  key: GetListCacheKey(entityId),
5844
5853
  value: req,
5845
5854
  req: reqParams
@@ -5896,7 +5905,7 @@
5896
5905
  const url = `entity/${data["Entity.ID"]}/link` + (data.ID == null ? "" : "/" + data.ID);
5897
5906
  const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
5898
5907
  api.Cache.Remove(GetCacheKey(data.ID));
5899
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Link + exports.Api.ECacheKey.Entity);
5908
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Link + exports.Api.ECacheKey.Entity);
5900
5909
  return {
5901
5910
  link: res
5902
5911
  };
@@ -5918,7 +5927,7 @@
5918
5927
  }
5919
5928
  yield api.DELETE(`entity/${entityId}/link/${linkId}`, exports.Api.PrepReqParams(reqParams));
5920
5929
  api.Cache.Remove(GetCacheKey(linkId));
5921
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Link + exports.Api.ECacheKey.Entity);
5930
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Link + exports.Api.ECacheKey.Entity);
5922
5931
  });
5923
5932
  }
5924
5933
  EntityLink.Delete = Delete;
@@ -5936,7 +5945,7 @@
5936
5945
  if (!api) {
5937
5946
  api = exports.ENVIRONMENT.Api().GetBruceApi();
5938
5947
  }
5939
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5948
+ const cache = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
5940
5949
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
5941
5950
  return cache.data;
5942
5951
  }
@@ -5951,7 +5960,7 @@
5951
5960
  rej(e);
5952
5961
  }
5953
5962
  }));
5954
- yield api.SetCacheItem({
5963
+ api.SetCacheItem({
5955
5964
  key: GetListCacheKey(entityId),
5956
5965
  value: req,
5957
5966
  req: reqParams
@@ -6034,7 +6043,7 @@
6034
6043
  if (!api) {
6035
6044
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6036
6045
  }
6037
- const cache = yield api.GetCacheItem(GetCacheKey(url), reqParams);
6046
+ const cache = api.GetCacheItem(GetCacheKey(url), reqParams);
6038
6047
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6039
6048
  return cache.data;
6040
6049
  }
@@ -6049,7 +6058,7 @@
6049
6058
  rej(e);
6050
6059
  }
6051
6060
  }));
6052
- yield api.SetCacheItem({
6061
+ api.SetCacheItem({
6053
6062
  key: GetCacheKey(url),
6054
6063
  value: req,
6055
6064
  req: reqParams
@@ -6096,7 +6105,7 @@
6096
6105
  if (!entityId) {
6097
6106
  throw ("Entity id is required.");
6098
6107
  }
6099
- const cache = yield api.GetCacheItem(GetEntityListKey(entityId), reqParams);
6108
+ const cache = api.GetCacheItem(GetEntityListKey(entityId), reqParams);
6100
6109
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6101
6110
  return cache.data;
6102
6111
  }
@@ -6112,7 +6121,7 @@
6112
6121
  rej(e);
6113
6122
  }
6114
6123
  }));
6115
- yield api.SetCacheItem({
6124
+ api.SetCacheItem({
6116
6125
  key: GetEntityListKey(entityId),
6117
6126
  value: prom,
6118
6127
  req: reqParams
@@ -6134,7 +6143,7 @@
6134
6143
  if (!group) {
6135
6144
  group = "DEFAULT";
6136
6145
  }
6137
- const cache = yield api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
6146
+ const cache = api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
6138
6147
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6139
6148
  return cache.data;
6140
6149
  }
@@ -6151,7 +6160,7 @@
6151
6160
  rej(e);
6152
6161
  }
6153
6162
  }));
6154
- yield api.SetCacheItem({
6163
+ api.SetCacheItem({
6155
6164
  key: GetTypeListKey(typeId, group),
6156
6165
  value: prom,
6157
6166
  req: reqParams
@@ -6264,7 +6273,7 @@
6264
6273
  if (!api) {
6265
6274
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6266
6275
  }
6267
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
6276
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
6268
6277
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6269
6278
  return cache.data;
6270
6279
  }
@@ -6279,7 +6288,7 @@
6279
6288
  rej(e);
6280
6289
  }
6281
6290
  }));
6282
- yield api.SetCacheItem({
6291
+ api.SetCacheItem({
6283
6292
  key: GetListCacheKey(),
6284
6293
  value: req,
6285
6294
  req: reqParams
@@ -6302,7 +6311,7 @@
6302
6311
  if (!api) {
6303
6312
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6304
6313
  }
6305
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
6314
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
6306
6315
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6307
6316
  return cache.data;
6308
6317
  }
@@ -6317,7 +6326,7 @@
6317
6326
  rej(e);
6318
6327
  }
6319
6328
  }));
6320
- yield api.SetCacheItem({
6329
+ api.SetCacheItem({
6321
6330
  key: GetCacheKey(id),
6322
6331
  value: req,
6323
6332
  req: reqParams
@@ -6413,7 +6422,7 @@
6413
6422
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6414
6423
  }
6415
6424
  const key = GetCacheKey(typeId);
6416
- const cache = yield api.GetCacheItem(key, reqParams);
6425
+ const cache = api.GetCacheItem(key, reqParams);
6417
6426
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6418
6427
  return cache.data;
6419
6428
  }
@@ -6428,7 +6437,7 @@
6428
6437
  rej(e);
6429
6438
  }
6430
6439
  }));
6431
- yield api.SetCacheItem({
6440
+ api.SetCacheItem({
6432
6441
  key,
6433
6442
  value: prom,
6434
6443
  req: reqParams
@@ -6467,7 +6476,7 @@
6467
6476
  if (!api) {
6468
6477
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6469
6478
  }
6470
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
6479
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
6471
6480
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6472
6481
  return cache.data;
6473
6482
  }
@@ -6482,7 +6491,7 @@
6482
6491
  rej(e);
6483
6492
  }
6484
6493
  }));
6485
- yield api.SetCacheItem({
6494
+ api.SetCacheItem({
6486
6495
  key: GetListCacheKey(),
6487
6496
  value: req,
6488
6497
  req: reqParams
@@ -6565,11 +6574,11 @@
6565
6574
  };
6566
6575
  const url = `entity/${data["Principal.Entity.ID"]}/relation/${data["Relation.Type.ID"]}/add`;
6567
6576
  yield api.POST(url, reqData, exports.Api.PrepReqParams(reqParams));
6568
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6569
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Related.Entity.ID"]);
6570
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType);
6577
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6578
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Related.Entity.ID"]);
6579
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType);
6571
6580
  if (data["Data.Entity.ID"]) {
6572
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + data["Data.Entity.ID"]);
6581
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + data["Data.Entity.ID"]);
6573
6582
  }
6574
6583
  });
6575
6584
  }
@@ -6592,9 +6601,9 @@
6592
6601
  "Related.Entity.ID": [relatedEntityId]
6593
6602
  }, exports.Api.PrepReqParams(reqParams));
6594
6603
  // Remove related cache entries
6595
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + principalEntityId);
6596
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + relatedEntityId);
6597
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType + exports.Api.ECacheKey.Id + relationTypeId);
6604
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + principalEntityId);
6605
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + relatedEntityId);
6606
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType + exports.Api.ECacheKey.Id + relationTypeId);
6598
6607
  });
6599
6608
  }
6600
6609
  EntityRelation.Delete = Delete;
@@ -6614,11 +6623,11 @@
6614
6623
  }
6615
6624
  const url = `entity/${data["Principal.Entity.ID"]}/otherEntityID/${data["Related.Entity.ID"]}/relation/${data["Relation.Type.ID"]}/update`;
6616
6625
  const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
6617
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6618
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Related.Entity.ID"]);
6619
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType + exports.Api.ECacheKey.Id + data["Relation.Type.ID"]);
6626
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Principal.Entity.ID"]);
6627
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Related.Entity.ID"]);
6628
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType + exports.Api.ECacheKey.Id + data["Relation.Type.ID"]);
6620
6629
  if (data["Data.Entity.ID"]) {
6621
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + data["Data.Entity.ID"]);
6630
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + data["Data.Entity.ID"]);
6622
6631
  }
6623
6632
  });
6624
6633
  }
@@ -6638,7 +6647,7 @@
6638
6647
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6639
6648
  }
6640
6649
  filter = Object.assign({ relationTypeId: "", oneWayOnly: false, loadEntityData: false }, filter);
6641
- const cache = yield api.GetCacheItem(GetListCacheKey(entityId, filter), reqParams);
6650
+ const cache = api.GetCacheItem(GetListCacheKey(entityId, filter), reqParams);
6642
6651
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6643
6652
  return cache.data;
6644
6653
  }
@@ -6658,7 +6667,7 @@
6658
6667
  rej(e);
6659
6668
  }
6660
6669
  }));
6661
- yield api.SetCacheItem({
6670
+ api.SetCacheItem({
6662
6671
  key: GetListCacheKey(entityId, filter),
6663
6672
  value: req,
6664
6673
  req: reqParams
@@ -6681,7 +6690,7 @@
6681
6690
  if (!api) {
6682
6691
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6683
6692
  }
6684
- const cache = yield api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
6693
+ const cache = api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
6685
6694
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6686
6695
  return cache.data;
6687
6696
  }
@@ -6696,7 +6705,7 @@
6696
6705
  rej(e);
6697
6706
  }
6698
6707
  }));
6699
- yield api.SetCacheItem({
6708
+ api.SetCacheItem({
6700
6709
  key: GetEntityCacheKey(entityId),
6701
6710
  value: prom,
6702
6711
  req: reqParams
@@ -6804,7 +6813,7 @@
6804
6813
  const reqs = [];
6805
6814
  for (let i = 0; i < sourceKeys.length; i++) {
6806
6815
  const sourceKey = sourceKeys[i];
6807
- const cache = yield api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
6816
+ const cache = api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
6808
6817
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
6809
6818
  reqs.push(cache.data);
6810
6819
  }
@@ -6900,7 +6909,7 @@
6900
6909
  }
6901
6910
  const res = yield api.POST("entitysource", source);
6902
6911
  const cacheKey = GetCacheKey(source["Source.ID"], source["SourceRecord.Key"]);
6903
- yield api.Cache.Remove(cacheKey);
6912
+ api.Cache.Remove(cacheKey);
6904
6913
  return {
6905
6914
  source: res
6906
6915
  };
@@ -7017,7 +7026,7 @@
7017
7026
  rej(e);
7018
7027
  }
7019
7028
  }));
7020
- yield api.SetCacheItem({
7029
+ api.SetCacheItem({
7021
7030
  key: GetCacheKey(id),
7022
7031
  value: req,
7023
7032
  req: reqParams
@@ -7042,7 +7051,7 @@
7042
7051
  if (!api) {
7043
7052
  api = exports.ENVIRONMENT.Api().GetBruceApi();
7044
7053
  }
7045
- const cache = yield api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
7054
+ const cache = api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
7046
7055
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7047
7056
  return cache.data;
7048
7057
  }
@@ -7057,7 +7066,7 @@
7057
7066
  rej(e);
7058
7067
  }
7059
7068
  }));
7060
- yield api.SetCacheItem({
7069
+ api.SetCacheItem({
7061
7070
  key: GetListCacheKey(entityTypeId),
7062
7071
  value: req,
7063
7072
  req: reqParams
@@ -7081,7 +7090,7 @@
7081
7090
  }
7082
7091
  yield api.DELETE(`layer/${tagId}`, exports.Api.PrepReqParams(reqParams));
7083
7092
  api.Cache.Remove(GetCacheKey(tagId));
7084
- yield api.Cache.RemoveByStartsWith(GetListCacheKey());
7093
+ api.Cache.RemoveByStartsWith(GetListCacheKey());
7085
7094
  });
7086
7095
  }
7087
7096
  EntityTag.Delete = Delete;
@@ -7099,7 +7108,7 @@
7099
7108
  const url = data.ID ? `layer/${data.ID}` : "layer";
7100
7109
  const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
7101
7110
  api.Cache.Remove(GetCacheKey(data.ID));
7102
- yield api.Cache.RemoveByStartsWith(GetListCacheKey());
7111
+ api.Cache.RemoveByStartsWith(GetListCacheKey());
7103
7112
  return {
7104
7113
  tag: res
7105
7114
  };
@@ -7189,7 +7198,7 @@
7189
7198
  if (!api) {
7190
7199
  api = exports.ENVIRONMENT.Api().GetBruceApi();
7191
7200
  }
7192
- const cache = yield api.GetCacheItem(GetCacheKey(entityId), reqParams);
7201
+ const cache = api.GetCacheItem(GetCacheKey(entityId), reqParams);
7193
7202
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7194
7203
  return cache.data;
7195
7204
  }
@@ -7204,7 +7213,7 @@
7204
7213
  rej(e);
7205
7214
  }
7206
7215
  }));
7207
- yield api.SetCacheItem({
7216
+ api.SetCacheItem({
7208
7217
  key: GetCacheKey(entityId),
7209
7218
  value: prom,
7210
7219
  req: reqParams
@@ -7496,7 +7505,7 @@
7496
7505
  if (!api) {
7497
7506
  api = exports.ENVIRONMENT.Api().GetBruceApi();
7498
7507
  }
7499
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
7508
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
7500
7509
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7501
7510
  return cache.data;
7502
7511
  }
@@ -7511,7 +7520,7 @@
7511
7520
  rej(e);
7512
7521
  }
7513
7522
  }));
7514
- yield api.SetCacheItem({
7523
+ api.SetCacheItem({
7515
7524
  key: GetListCacheKey(),
7516
7525
  value: res,
7517
7526
  req: reqParams
@@ -7534,7 +7543,7 @@
7534
7543
  if (!api) {
7535
7544
  api = exports.ENVIRONMENT.Api().GetBruceApi();
7536
7545
  }
7537
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
7546
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
7538
7547
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
7539
7548
  return cache.data;
7540
7549
  }
@@ -7549,7 +7558,7 @@
7549
7558
  rej(e);
7550
7559
  }
7551
7560
  }));
7552
- yield api.SetCacheItem({
7561
+ api.SetCacheItem({
7553
7562
  key: GetCacheKey(id),
7554
7563
  value: prom,
7555
7564
  req: reqParams
@@ -8227,7 +8236,7 @@
8227
8236
  throw ("File ID is required.");
8228
8237
  }
8229
8238
  const key = GetCacheKey(fileId);
8230
- const cache = yield api.GetCacheItem(key, reqParams);
8239
+ const cache = api.GetCacheItem(key, reqParams);
8231
8240
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
8232
8241
  return cache.data;
8233
8242
  }
@@ -8242,7 +8251,7 @@
8242
8251
  rej(e);
8243
8252
  }
8244
8253
  }));
8245
- yield api.SetCacheItem({
8254
+ api.SetCacheItem({
8246
8255
  key,
8247
8256
  value: prom,
8248
8257
  req: reqParams
@@ -8748,7 +8757,7 @@
8748
8757
  });
8749
8758
  const key = prom.programKeys.find(k => k.ProgramId === programId);
8750
8759
  // const key = GetCacheKey(programId);
8751
- // const cache = await api.GetCacheItem(key, reqParams);
8760
+ // const cache = api.GetCacheItem(key, reqParams);
8752
8761
  // if (cache?.found) {
8753
8762
  // return cache.data;
8754
8763
  // }
@@ -8763,7 +8772,7 @@
8763
8772
  // rej(e);
8764
8773
  // }
8765
8774
  // });
8766
- // await api.SetCacheItem({
8775
+ // api.SetCacheItem({
8767
8776
  // key,
8768
8777
  // value: prom,
8769
8778
  // req: reqParams
@@ -8785,7 +8794,7 @@
8785
8794
  if (!api) {
8786
8795
  api = exports.ENVIRONMENT.Api().GetBruceApi();
8787
8796
  }
8788
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
8797
+ const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
8789
8798
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
8790
8799
  return cache.data;
8791
8800
  }
@@ -8800,7 +8809,7 @@
8800
8809
  rej(e);
8801
8810
  }
8802
8811
  }));
8803
- yield api.SetCacheItem({
8812
+ api.SetCacheItem({
8804
8813
  key: GetListCacheKey(),
8805
8814
  value: req,
8806
8815
  req: reqParams
@@ -9023,7 +9032,7 @@
9023
9032
  if (!api) {
9024
9033
  api = exports.ENVIRONMENT.Api().GetBruceApi();
9025
9034
  }
9026
- const cache = yield api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
9035
+ const cache = api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
9027
9036
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9028
9037
  return cache.data;
9029
9038
  }
@@ -9043,7 +9052,7 @@
9043
9052
  rej(e);
9044
9053
  }
9045
9054
  }));
9046
- yield api.SetCacheItem({
9055
+ api.SetCacheItem({
9047
9056
  key: GetCacheKey(tilesetId, loadFiles),
9048
9057
  value: prom,
9049
9058
  req: reqParams
@@ -9099,7 +9108,7 @@
9099
9108
  if (!api) {
9100
9109
  api = exports.ENVIRONMENT.Api().GetBruceApi();
9101
9110
  }
9102
- const cache = yield api.GetCacheItem(GetListCacheKey({
9111
+ const cache = api.GetCacheItem(GetListCacheKey({
9103
9112
  assertLocation: assertLocation,
9104
9113
  expandSettings: expandSettings,
9105
9114
  type: type
@@ -9139,7 +9148,7 @@
9139
9148
  rej(e);
9140
9149
  }
9141
9150
  }));
9142
- yield api.SetCacheItem({
9151
+ api.SetCacheItem({
9143
9152
  key: GetListCacheKey({
9144
9153
  assertLocation: assertLocation,
9145
9154
  expandSettings: expandSettings,
@@ -9166,8 +9175,8 @@
9166
9175
  api = exports.ENVIRONMENT.Api().GetBruceApi();
9167
9176
  }
9168
9177
  yield api.DELETE(`tileset/delete/${tilesetId}`, reqParams);
9169
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset + exports.Api.ECacheKey.Id + tilesetId);
9170
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset);
9178
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset + exports.Api.ECacheKey.Id + tilesetId);
9179
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset);
9171
9180
  });
9172
9181
  }
9173
9182
  Tileset.Delete = Delete;
@@ -9204,8 +9213,8 @@
9204
9213
  yield api.POST(`tileset/update/${data.id}`, data, exports.Api.PrepReqParams(reqParams));
9205
9214
  }
9206
9215
  }
9207
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset + exports.Api.ECacheKey.Id + data.id);
9208
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset);
9216
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset + exports.Api.ECacheKey.Id + data.id);
9217
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset);
9209
9218
  return {
9210
9219
  tileset: data
9211
9220
  };
@@ -9490,9 +9499,9 @@
9490
9499
  };
9491
9500
  data.ID = res.ID;
9492
9501
  yield api.POST(`tileset/${data.ID}/enableForAccounts`, req, reqParams);
9493
- yield api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"], data["Tileset.ID"]));
9494
- yield api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"]));
9495
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.PublishTileset + exports.Api.ECacheKey.TilesetAccess);
9502
+ api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"], data["Tileset.ID"]));
9503
+ api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"]));
9504
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.PublishTileset + exports.Api.ECacheKey.TilesetAccess);
9496
9505
  return {
9497
9506
  published: data
9498
9507
  };
@@ -9508,7 +9517,7 @@
9508
9517
  if (!accountId || !tilesetId) {
9509
9518
  throw ("Client account ID and tileset ID are required.");
9510
9519
  }
9511
- const cache = yield api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
9520
+ const cache = api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
9512
9521
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9513
9522
  return cache.data;
9514
9523
  }
@@ -9523,7 +9532,7 @@
9523
9532
  rej(e);
9524
9533
  }
9525
9534
  }));
9526
- yield api.SetCacheItem({
9535
+ api.SetCacheItem({
9527
9536
  key: GetCacheKey(accountId, tilesetId),
9528
9537
  value: prom,
9529
9538
  req: reqParams
@@ -9541,7 +9550,7 @@
9541
9550
  if (!accountId) {
9542
9551
  throw ("Client account ID is required.");
9543
9552
  }
9544
- const cache = yield api.GetCacheItem(GetCacheKey(accountId), reqParams);
9553
+ const cache = api.GetCacheItem(GetCacheKey(accountId), reqParams);
9545
9554
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9546
9555
  return cache.data;
9547
9556
  }
@@ -9556,7 +9565,7 @@
9556
9565
  rej(e);
9557
9566
  }
9558
9567
  }));
9559
- yield api.SetCacheItem({
9568
+ api.SetCacheItem({
9560
9569
  key: GetCacheKey(accountId),
9561
9570
  value: req,
9562
9571
  req: reqParams
@@ -9882,7 +9891,7 @@
9882
9891
  api = exports.ENVIRONMENT.Api().GetBruceApi();
9883
9892
  }
9884
9893
  const key = GetCacheKey(viewId, bookmarkId);
9885
- const cache = yield api.GetCacheItem(key, reqParams);
9894
+ const cache = api.GetCacheItem(key, reqParams);
9886
9895
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9887
9896
  return cache.data;
9888
9897
  }
@@ -9897,7 +9906,7 @@
9897
9906
  rej(e);
9898
9907
  }
9899
9908
  }));
9900
- yield api.SetCacheItem({
9909
+ api.SetCacheItem({
9901
9910
  key,
9902
9911
  value: prom,
9903
9912
  req: reqParams
@@ -9939,7 +9948,7 @@
9939
9948
  if (!api) {
9940
9949
  api = exports.ENVIRONMENT.Api().GetBruceApi();
9941
9950
  }
9942
- const cache = yield api.GetCacheItem(GetListCacheKey(viewId), reqParams);
9951
+ const cache = api.GetCacheItem(GetListCacheKey(viewId), reqParams);
9943
9952
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9944
9953
  return cache.data;
9945
9954
  }
@@ -9957,7 +9966,7 @@
9957
9966
  bookmark: item
9958
9967
  });
9959
9968
  });
9960
- yield api.SetCacheItem({
9969
+ api.SetCacheItem({
9961
9970
  key: GetCacheKey(viewId, item.ID),
9962
9971
  value: prom,
9963
9972
  req: reqParams
@@ -9971,7 +9980,7 @@
9971
9980
  rej(e);
9972
9981
  }
9973
9982
  }));
9974
- yield api.SetCacheItem({
9983
+ api.SetCacheItem({
9975
9984
  key: GetListCacheKey(viewId),
9976
9985
  value: req,
9977
9986
  req: reqParams
@@ -10018,7 +10027,7 @@
10018
10027
  "DisplayOrder.Start": 0
10019
10028
  };
10020
10029
  yield api.POST(`ui.view/${viewId}/slides/setOrder`, reqData, exports.Api.PrepReqParams(reqParams));
10021
- yield api.Cache.RemoveByStartsWith(GetListCacheKey(viewId));
10030
+ api.Cache.RemoveByStartsWith(GetListCacheKey(viewId));
10022
10031
  });
10023
10032
  }
10024
10033
  ProjectViewBookmark.SetOrder = SetOrder;
@@ -10078,7 +10087,7 @@
10078
10087
  api = exports.ENVIRONMENT.Api().GetBruceApi();
10079
10088
  }
10080
10089
  const key = GetCacheKey(viewId);
10081
- const cache = yield api.GetCacheItem(key, reqParams);
10090
+ const cache = api.GetCacheItem(key, reqParams);
10082
10091
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10083
10092
  return cache.data;
10084
10093
  }
@@ -10093,7 +10102,7 @@
10093
10102
  rej(e);
10094
10103
  }
10095
10104
  }));
10096
- yield api.SetCacheItem({
10105
+ api.SetCacheItem({
10097
10106
  key,
10098
10107
  value: prom,
10099
10108
  req: reqParams
@@ -10113,7 +10122,7 @@
10113
10122
  if (!api) {
10114
10123
  api = exports.ENVIRONMENT.Api().GetBruceApi();
10115
10124
  }
10116
- const cache = yield api.GetCacheItem(GetListCacheKey(type), reqParams);
10125
+ const cache = api.GetCacheItem(GetListCacheKey(type), reqParams);
10117
10126
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10118
10127
  return cache.data;
10119
10128
  }
@@ -10128,7 +10137,7 @@
10128
10137
  rej(e);
10129
10138
  }
10130
10139
  }));
10131
- yield api.SetCacheItem({
10140
+ api.SetCacheItem({
10132
10141
  key: GetListCacheKey(type),
10133
10142
  value: prom,
10134
10143
  req: reqParams
@@ -10722,7 +10731,7 @@
10722
10731
  if (!api) {
10723
10732
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
10724
10733
  }
10725
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
10734
+ const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
10726
10735
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10727
10736
  return cache.data;
10728
10737
  }
@@ -10731,7 +10740,7 @@
10731
10740
  const data = yield api.GET(`accountbyid/${id}`, reqParams);
10732
10741
  // Update the cache by subdomain as well in case it's different to the ID.
10733
10742
  if ((data === null || data === void 0 ? void 0 : data.ID) && (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) != false) {
10734
- yield api.SetCacheItem({
10743
+ api.SetCacheItem({
10735
10744
  key: data.Subdomain,
10736
10745
  value: prom,
10737
10746
  req: reqParams
@@ -10745,7 +10754,7 @@
10745
10754
  rej(e);
10746
10755
  }
10747
10756
  }));
10748
- yield api.SetCacheItem({
10757
+ api.SetCacheItem({
10749
10758
  key: GetCacheKey(id),
10750
10759
  value: prom,
10751
10760
  req: reqParams
@@ -10765,7 +10774,7 @@
10765
10774
  if (!api) {
10766
10775
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
10767
10776
  }
10768
- const cache = yield api.GetCacheItem(GetCacheKey(subdomain), reqParams);
10777
+ const cache = api.GetCacheItem(GetCacheKey(subdomain), reqParams);
10769
10778
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10770
10779
  return cache.data;
10771
10780
  }
@@ -10774,7 +10783,7 @@
10774
10783
  const data = yield api.GET(`account/${subdomain}`, reqParams);
10775
10784
  // Update the cache by ID as well in case it's different to the subdomain.
10776
10785
  if ((data === null || data === void 0 ? void 0 : data.ID) && (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) != false) {
10777
- yield api.SetCacheItem({
10786
+ api.SetCacheItem({
10778
10787
  key: data.ID,
10779
10788
  value: prom,
10780
10789
  req: reqParams
@@ -10788,7 +10797,7 @@
10788
10797
  rej(e);
10789
10798
  }
10790
10799
  }));
10791
- yield api.SetCacheItem({
10800
+ api.SetCacheItem({
10792
10801
  key: GetCacheKey(subdomain),
10793
10802
  value: prom,
10794
10803
  req: reqParams
@@ -10808,7 +10817,7 @@
10808
10817
  if (!api) {
10809
10818
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
10810
10819
  }
10811
- const cache = yield api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
10820
+ const cache = api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
10812
10821
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10813
10822
  return cache.data;
10814
10823
  }
@@ -10825,7 +10834,7 @@
10825
10834
  rej(e);
10826
10835
  }
10827
10836
  }));
10828
- yield api.SetCacheItem({
10837
+ api.SetCacheItem({
10829
10838
  key: GetListCacheKey(api.GetSessionId()),
10830
10839
  value: prom,
10831
10840
  req: reqParams
@@ -10845,7 +10854,7 @@
10845
10854
  if (!api) {
10846
10855
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
10847
10856
  }
10848
- const cache = yield api.GetCacheItem(GetCacheKey(id, appId), reqParams);
10857
+ const cache = api.GetCacheItem(GetCacheKey(id, appId), reqParams);
10849
10858
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
10850
10859
  return cache.data;
10851
10860
  }
@@ -10863,7 +10872,7 @@
10863
10872
  rej(e);
10864
10873
  }
10865
10874
  }));
10866
- yield api.SetCacheItem({
10875
+ api.SetCacheItem({
10867
10876
  key: GetCacheKey(id, appId),
10868
10877
  value: prom,
10869
10878
  req: reqParams
@@ -10885,7 +10894,7 @@
10885
10894
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
10886
10895
  }
10887
10896
  const res = yield api.POST(`account/${id}/applicationSettings/${appId}`, data, reqParams);
10888
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + id);
10897
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + id);
10889
10898
  return {
10890
10899
  settings: res
10891
10900
  };
@@ -11214,7 +11223,7 @@
11214
11223
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
11215
11224
  }
11216
11225
  const key = GetCacheKey(sessionId);
11217
- const cache = yield api.GetCacheItem(key, reqParams);
11226
+ const cache = api.GetCacheItem(key, reqParams);
11218
11227
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11219
11228
  return cache.data;
11220
11229
  }
@@ -11229,7 +11238,7 @@
11229
11238
  rej(e);
11230
11239
  }
11231
11240
  }));
11232
- yield api.SetCacheItem({
11241
+ api.SetCacheItem({
11233
11242
  key,
11234
11243
  value: prom,
11235
11244
  req: reqParams,
@@ -11606,13 +11615,22 @@
11606
11615
  if (!api) {
11607
11616
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
11608
11617
  }
11609
- const cache = yield api.GetCacheItem(GetCacheKey(id, accountId), reqParams);
11618
+ const cacheKey = GetCacheKey(id, accountId);
11619
+ const cache = api.GetCacheItem(cacheKey, reqParams);
11610
11620
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11611
11621
  return cache.data;
11612
11622
  }
11613
11623
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
11614
11624
  try {
11615
- const data = yield api.GET(`user/${id}${accountId ? `?clientAccountID=${accountId}` : ""}`, reqParams);
11625
+ const urlParams = new URLSearchParams();
11626
+ if (accountId) {
11627
+ urlParams.append("clientAccountID", accountId);
11628
+ }
11629
+ let url = `user/${id}`;
11630
+ if (urlParams.toString().length) {
11631
+ url += "?" + urlParams.toString();
11632
+ }
11633
+ const data = yield api.GET(url, reqParams);
11616
11634
  res({
11617
11635
  user: data
11618
11636
  });
@@ -11621,8 +11639,8 @@
11621
11639
  rej(e);
11622
11640
  }
11623
11641
  }));
11624
- yield api.SetCacheItem({
11625
- key: GetCacheKey(id, accountId),
11642
+ api.SetCacheItem({
11643
+ key: cacheKey,
11626
11644
  value: prom,
11627
11645
  req: reqParams
11628
11646
  });
@@ -11661,10 +11679,10 @@
11661
11679
  const res = yield api.POST(`user/${data.ID}`, data, reqParams);
11662
11680
  api.Cache.RemoveByContains(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Id + data.ID);
11663
11681
  if (data.Type == EType.AccessToken) {
11664
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account);
11682
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account);
11665
11683
  }
11666
11684
  else if (data.Type == EType.User) {
11667
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Account);
11685
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Account);
11668
11686
  }
11669
11687
  return {
11670
11688
  user: res
@@ -11686,7 +11704,7 @@
11686
11704
  if (!api) {
11687
11705
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
11688
11706
  }
11689
- const cache = yield api.GetCacheItem(GetSettingsCacheKey(userId, appId), req);
11707
+ const cache = api.GetCacheItem(GetSettingsCacheKey(userId, appId), req);
11690
11708
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11691
11709
  return cache.data;
11692
11710
  }
@@ -11712,7 +11730,7 @@
11712
11730
  rej(e);
11713
11731
  }
11714
11732
  }));
11715
- yield api.SetCacheItem({
11733
+ api.SetCacheItem({
11716
11734
  key: GetSettingsCacheKey(userId, appId),
11717
11735
  value: prom,
11718
11736
  req: req
@@ -11808,7 +11826,7 @@
11808
11826
  if (!api) {
11809
11827
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
11810
11828
  }
11811
- const cache = yield api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
11829
+ const cache = api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
11812
11830
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11813
11831
  return cache.data;
11814
11832
  }
@@ -11823,7 +11841,7 @@
11823
11841
  rej(e);
11824
11842
  }
11825
11843
  }));
11826
- yield api.SetCacheItem({
11844
+ api.SetCacheItem({
11827
11845
  key: GetEmailCacheKey(email, accountId),
11828
11846
  value: prom,
11829
11847
  req: reqParams
@@ -11849,7 +11867,7 @@
11849
11867
  if (!exclusive) {
11850
11868
  exclusive = false;
11851
11869
  }
11852
- const cache = exclusive ? null : yield api.GetCacheItem(GetListCacheKey(accountId), reqParams);
11870
+ const cache = exclusive ? null : api.GetCacheItem(GetListCacheKey(accountId), reqParams);
11853
11871
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11854
11872
  return cache.data;
11855
11873
  }
@@ -11867,7 +11885,7 @@
11867
11885
  req.then((data) => __awaiter(this, void 0, void 0, function* () {
11868
11886
  const users = data.users;
11869
11887
  for (let i = 0; i < users.length; i++) {
11870
- yield api.SetCacheItem({
11888
+ api.SetCacheItem({
11871
11889
  key: GetCacheKey(users[i].ID, accountId),
11872
11890
  value: {
11873
11891
  user: users[i]
@@ -11877,7 +11895,7 @@
11877
11895
  }
11878
11896
  }));
11879
11897
  if (!exclusive) {
11880
- yield api.SetCacheItem({
11898
+ api.SetCacheItem({
11881
11899
  key: GetListCacheKey(accountId),
11882
11900
  value: req,
11883
11901
  req: reqParams
@@ -12044,7 +12062,7 @@
12044
12062
  if (!api) {
12045
12063
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
12046
12064
  }
12047
- const cache = yield api.GetCacheItem(GetListCacheKey(accountId), reqParams);
12065
+ const cache = api.GetCacheItem(GetListCacheKey(accountId), reqParams);
12048
12066
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
12049
12067
  return cache.data;
12050
12068
  }
@@ -12059,7 +12077,7 @@
12059
12077
  rej(e);
12060
12078
  }
12061
12079
  }));
12062
- yield api.SetCacheItem({
12080
+ api.SetCacheItem({
12063
12081
  key: GetListCacheKey(accountId),
12064
12082
  value: req,
12065
12083
  req: reqParams
@@ -12080,7 +12098,7 @@
12080
12098
  }
12081
12099
  yield api.DELETE(`accessToken/${id}`, reqParams);
12082
12100
  api.Cache.RemoveByContains(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Id + id);
12083
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account);
12101
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account);
12084
12102
  });
12085
12103
  }
12086
12104
  AccessToken.Delete = Delete;
@@ -12105,7 +12123,7 @@
12105
12123
  data.Type = EType.AccessToken;
12106
12124
  }
12107
12125
  data = yield api.POST("accessToken", data, reqParams);
12108
- yield api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account);
12126
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account);
12109
12127
  return {
12110
12128
  user: data
12111
12129
  };
@@ -12309,7 +12327,7 @@
12309
12327
  api = exports.ENVIRONMENT.Api().GetBruceApi();
12310
12328
  }
12311
12329
  const accountId = api.AccountId;
12312
- const cache = yield api.GetCacheItem(GetCacheKey(accountId), reqParams);
12330
+ const cache = api.GetCacheItem(GetCacheKey(accountId), reqParams);
12313
12331
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
12314
12332
  return cache.data;
12315
12333
  }
@@ -13322,7 +13340,7 @@
13322
13340
  if (!pageIndex) {
13323
13341
  pageIndex = 0;
13324
13342
  }
13325
- const cache = yield api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
13343
+ const cache = api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
13326
13344
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13327
13345
  return cache.data;
13328
13346
  }
@@ -13347,7 +13365,7 @@
13347
13365
  rej(e);
13348
13366
  }
13349
13367
  }));
13350
- yield api.SetCacheItem({
13368
+ api.SetCacheItem({
13351
13369
  key: GetListCacheKey(type, pageIndex),
13352
13370
  value: prom,
13353
13371
  req: reqParams
@@ -13367,7 +13385,7 @@
13367
13385
  if (!api) {
13368
13386
  api = exports.ENVIRONMENT.Api().GetBruceApi();
13369
13387
  }
13370
- const cache = yield api.GetCacheItem(GetCacheKeyByRootId(rootId), reqParams);
13388
+ const cache = api.GetCacheItem(GetCacheKeyByRootId(rootId), reqParams);
13371
13389
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13372
13390
  return cache.data;
13373
13391
  }
@@ -13382,7 +13400,7 @@
13382
13400
  rej(e);
13383
13401
  }
13384
13402
  }));
13385
- yield api.SetCacheItem({
13403
+ api.SetCacheItem({
13386
13404
  key: GetCacheKeyByRootId(rootId),
13387
13405
  value: prom,
13388
13406
  req: reqParams
@@ -13402,7 +13420,7 @@
13402
13420
  if (!api) {
13403
13421
  api = exports.ENVIRONMENT.Api().GetBruceApi();
13404
13422
  }
13405
- const cache = yield api.GetCacheItem(GetCacheKey(fileId), reqParams);
13423
+ const cache = api.GetCacheItem(GetCacheKey(fileId), reqParams);
13406
13424
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13407
13425
  return cache.data;
13408
13426
  }
@@ -13417,7 +13435,7 @@
13417
13435
  rej(e);
13418
13436
  }
13419
13437
  }));
13420
- yield api.SetCacheItem({
13438
+ api.SetCacheItem({
13421
13439
  key: GetCacheKey(fileId),
13422
13440
  value: prom,
13423
13441
  req: reqParams
@@ -13637,7 +13655,7 @@
13637
13655
  if (!api) {
13638
13656
  api = exports.ENVIRONMENT.Api().GetBruceApi();
13639
13657
  }
13640
- const cache = yield api.GetCacheItem(GetCacheKey(pluginId), req);
13658
+ const cache = api.GetCacheItem(GetCacheKey(pluginId), req);
13641
13659
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13642
13660
  return cache.data;
13643
13661
  }
@@ -13652,7 +13670,7 @@
13652
13670
  rej(e);
13653
13671
  }
13654
13672
  }));
13655
- yield api.SetCacheItem({
13673
+ api.SetCacheItem({
13656
13674
  key: GetCacheKey(pluginId),
13657
13675
  value: prom,
13658
13676
  req: req
@@ -13672,7 +13690,7 @@
13672
13690
  if (!api) {
13673
13691
  api = exports.ENVIRONMENT.Api().GetBruceApi();
13674
13692
  }
13675
- const cache = yield api.GetCacheItem(GetListCacheKey(), req);
13693
+ const cache = api.GetCacheItem(GetListCacheKey(), req);
13676
13694
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
13677
13695
  return cache.data;
13678
13696
  }
@@ -13687,7 +13705,7 @@
13687
13705
  rej(e);
13688
13706
  }
13689
13707
  }));
13690
- yield api.SetCacheItem({
13708
+ api.SetCacheItem({
13691
13709
  key: GetListCacheKey(),
13692
13710
  value: prom,
13693
13711
  req: req
@@ -13971,8 +13989,8 @@
13971
13989
  }
13972
13990
  const url = `source` + (data.ID == null ? "" : "/" + data.ID);
13973
13991
  const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
13974
- yield api.Cache.Remove(GetCacheKey(data.ID));
13975
- yield api.Cache.Remove(GetListCacheKey());
13992
+ api.Cache.Remove(GetCacheKey(data.ID));
13993
+ api.Cache.Remove(GetListCacheKey());
13976
13994
  return {
13977
13995
  source: res
13978
13996
  };
@@ -13990,8 +14008,8 @@
13990
14008
  api = exports.ENVIRONMENT.Api().GetBruceApi();
13991
14009
  }
13992
14010
  yield api.DELETE(`source/${id}`, exports.Api.PrepReqParams(reqParams));
13993
- yield api.Cache.Remove(GetCacheKey(id));
13994
- yield api.Cache.Remove(GetListCacheKey());
14011
+ api.Cache.Remove(GetCacheKey(id));
14012
+ api.Cache.Remove(GetListCacheKey());
13995
14013
  });
13996
14014
  }
13997
14015
  DataSource.Delete = Delete;
@@ -14007,7 +14025,7 @@
14007
14025
  api = exports.ENVIRONMENT.Api().GetBruceApi();
14008
14026
  }
14009
14027
  reqParams = exports.Api.PrepReqParams(reqParams);
14010
- const cacheData = yield api.GetCacheItem(GetCacheKey(id), reqParams);
14028
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
14011
14029
  if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.found) {
14012
14030
  return cacheData.data;
14013
14031
  }
@@ -14043,7 +14061,7 @@
14043
14061
  api = exports.ENVIRONMENT.Api().GetBruceApi();
14044
14062
  }
14045
14063
  reqParams = exports.Api.PrepReqParams(reqParams);
14046
- const cacheData = yield api.GetCacheItem(GetListCacheKey(), reqParams);
14064
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
14047
14065
  if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.found) {
14048
14066
  return cacheData.data;
14049
14067
  }
@@ -14121,7 +14139,7 @@
14121
14139
  })(exports.DataSource || (exports.DataSource = {}));
14122
14140
 
14123
14141
  // This is updated with the package.json version on build.
14124
- const VERSION = "4.9.8";
14142
+ const VERSION = "4.9.9";
14125
14143
 
14126
14144
  exports.VERSION = VERSION;
14127
14145
  exports.AbstractApi = AbstractApi;