bruce-models 1.9.9 → 2.0.0

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 (60) hide show
  1. package/dist/bruce-models.es5.js +297 -60
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +297 -60
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account.js +20 -4
  6. package/dist/lib/account/account.js.map +1 -1
  7. package/dist/lib/ann-document/ann-document.js +10 -2
  8. package/dist/lib/ann-document/ann-document.js.map +1 -1
  9. package/dist/lib/api/abstract-api.js +14 -0
  10. package/dist/lib/api/abstract-api.js.map +1 -1
  11. package/dist/lib/client-file/client-file.js +5 -1
  12. package/dist/lib/client-file/client-file.js.map +1 -1
  13. package/dist/lib/custom-form/custom-form.js +10 -2
  14. package/dist/lib/custom-form/custom-form.js.map +1 -1
  15. package/dist/lib/entity/entity-attachment-type.js +5 -1
  16. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  17. package/dist/lib/entity/entity-attachment.js +5 -1
  18. package/dist/lib/entity/entity-attachment.js.map +1 -1
  19. package/dist/lib/entity/entity-comment.js +5 -1
  20. package/dist/lib/entity/entity-comment.js.map +1 -1
  21. package/dist/lib/entity/entity-coords.js +5 -1
  22. package/dist/lib/entity/entity-coords.js.map +1 -1
  23. package/dist/lib/entity/entity-link.js +5 -1
  24. package/dist/lib/entity/entity-link.js.map +1 -1
  25. package/dist/lib/entity/entity-lod-category.js +10 -2
  26. package/dist/lib/entity/entity-lod-category.js.map +1 -1
  27. package/dist/lib/entity/entity-lod.js +15 -3
  28. package/dist/lib/entity/entity-lod.js.map +1 -1
  29. package/dist/lib/entity/entity-relation-type.js +10 -2
  30. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  31. package/dist/lib/entity/entity-relation.js +10 -2
  32. package/dist/lib/entity/entity-relation.js.map +1 -1
  33. package/dist/lib/entity/entity-tag.js +10 -2
  34. package/dist/lib/entity/entity-tag.js.map +1 -1
  35. package/dist/lib/entity/entity-type.js +10 -2
  36. package/dist/lib/entity/entity-type.js.map +1 -1
  37. package/dist/lib/entity/entity.js +17 -5
  38. package/dist/lib/entity/entity.js.map +1 -1
  39. package/dist/lib/entity/getters/entity-filter-getter.js +4 -1
  40. package/dist/lib/entity/getters/entity-filter-getter.js.map +1 -1
  41. package/dist/lib/import/imported-file.js +10 -2
  42. package/dist/lib/import/imported-file.js.map +1 -1
  43. package/dist/lib/plugin/plugin.js +10 -2
  44. package/dist/lib/plugin/plugin.js.map +1 -1
  45. package/dist/lib/program-key/program-key.js +10 -2
  46. package/dist/lib/program-key/program-key.js.map +1 -1
  47. package/dist/lib/project/project-view-bookmark.js +15 -3
  48. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  49. package/dist/lib/project/project-view.js +10 -2
  50. package/dist/lib/project/project-view.js.map +1 -1
  51. package/dist/lib/style/style.js +10 -2
  52. package/dist/lib/style/style.js.map +1 -1
  53. package/dist/lib/tileset/tileset.js +20 -4
  54. package/dist/lib/tileset/tileset.js.map +1 -1
  55. package/dist/lib/user/session.js +5 -1
  56. package/dist/lib/user/session.js.map +1 -1
  57. package/dist/lib/user/user.js +37 -9
  58. package/dist/lib/user/user.js.map +1 -1
  59. package/dist/types/api/abstract-api.d.ts +6 -0
  60. package/package.json +1 -1
@@ -153,7 +153,11 @@ var AnnDocument;
153
153
  rej(e);
154
154
  }
155
155
  }));
156
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
156
+ api.SetCacheItem({
157
+ key,
158
+ value: prom,
159
+ req: reqParams
160
+ });
157
161
  return prom;
158
162
  });
159
163
  }
@@ -180,7 +184,11 @@ var AnnDocument;
180
184
  rej(e);
181
185
  }
182
186
  }));
183
- api.Cache.Set(GetListCacheKey(type), req);
187
+ api.SetCacheItem({
188
+ key: GetListCacheKey(type),
189
+ value: req,
190
+ req: reqParams
191
+ });
184
192
  return req;
185
193
  });
186
194
  }
@@ -230,7 +238,11 @@ var CustomForm;
230
238
  rej(err);
231
239
  }
232
240
  }));
233
- api.Cache.Set(GetCacheKey(id), prom, Api.DEFAULT_CACHE_DURATION);
241
+ api.SetCacheItem({
242
+ key: GetCacheKey(id),
243
+ value: prom,
244
+ req: reqParams
245
+ });
234
246
  return prom;
235
247
  });
236
248
  }
@@ -260,7 +272,11 @@ var CustomForm;
260
272
  forms: data.Items
261
273
  };
262
274
  });
263
- api.Cache.Set(GetListCacheKey(typeId), prom, Api.DEFAULT_CACHE_DURATION);
275
+ api.SetCacheItem({
276
+ key: GetListCacheKey(typeId),
277
+ value: prom,
278
+ req: reqParams
279
+ });
264
280
  return prom;
265
281
  });
266
282
  }
@@ -541,6 +557,20 @@ class AbstractApi {
541
557
  }
542
558
  return this.Cache.Get(key);
543
559
  }
560
+ SetCacheItem(params) {
561
+ let { key, value, duration, req } = params;
562
+ let noCache = req === null || req === void 0 ? void 0 : req.noCache;
563
+ if (noCache == null) {
564
+ noCache = Api.DEFAULT_NO_CACHE;
565
+ }
566
+ if (noCache) {
567
+ return;
568
+ }
569
+ if (isNaN(duration)) {
570
+ duration = Api.DEFAULT_CACHE_DURATION;
571
+ }
572
+ this.Cache.Set(key, value, duration);
573
+ }
544
574
  GetSessionId() {
545
575
  return this.ssid;
546
576
  }
@@ -749,7 +779,11 @@ var Account;
749
779
  const resData = {
750
780
  account: req
751
781
  };
752
- api.Cache.Set(GetCacheKey(id), resData, Api.DEFAULT_CACHE_DURATION);
782
+ api.SetCacheItem({
783
+ key: GetCacheKey(id),
784
+ value: resData,
785
+ req: reqParams
786
+ });
753
787
  return resData;
754
788
  });
755
789
  }
@@ -774,7 +808,11 @@ var Account;
774
808
  rej(e);
775
809
  }
776
810
  }));
777
- api.Cache.Set(GetListCacheKey(api.GetSessionId()), prom, Api.DEFAULT_CACHE_DURATION);
811
+ api.SetCacheItem({
812
+ key: GetListCacheKey(api.GetSessionId()),
813
+ value: prom,
814
+ req: reqParams
815
+ });
778
816
  return prom;
779
817
  });
780
818
  }
@@ -800,7 +838,11 @@ var Account;
800
838
  rej(e);
801
839
  }
802
840
  }));
803
- api.Cache.Set(GetCacheKey(id, appId), prom, Api.DEFAULT_CACHE_DURATION);
841
+ api.SetCacheItem({
842
+ key: GetCacheKey(id, appId),
843
+ value: prom,
844
+ req: reqParams
845
+ });
804
846
  return prom;
805
847
  });
806
848
  }
@@ -865,7 +907,11 @@ var Account;
865
907
  rej(e);
866
908
  }
867
909
  }));
868
- api.Cache.Set(GetDbRegionListCacheKey(), prom, Api.DEFAULT_CACHE_DURATION);
910
+ api.SetCacheItem({
911
+ key: GetDbRegionListCacheKey(),
912
+ value: prom,
913
+ req: reqParams
914
+ });
869
915
  return prom;
870
916
  });
871
917
  }
@@ -1740,7 +1786,11 @@ var Entity;
1740
1786
  rej(e);
1741
1787
  }
1742
1788
  }));
1743
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
1789
+ api.SetCacheItem({
1790
+ key,
1791
+ value: prom,
1792
+ req: reqParams
1793
+ });
1744
1794
  return prom;
1745
1795
  });
1746
1796
  }
@@ -1790,7 +1840,11 @@ var Entity;
1790
1840
  }
1791
1841
  res(null);
1792
1842
  }));
1793
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
1843
+ api.SetCacheItem({
1844
+ key,
1845
+ value: prom,
1846
+ req: reqParams
1847
+ });
1794
1848
  reqs.push(prom);
1795
1849
  }
1796
1850
  }
@@ -1999,9 +2053,13 @@ var Entity;
1999
2053
  for (let i = 0; i < entities.length; i++) {
2000
2054
  const entity = entities[i];
2001
2055
  const id = entity.Bruce.ID;
2002
- api.Cache.Set(GetCacheKey(id), {
2003
- entity: entity
2004
- }, Api.DEFAULT_CACHE_DURATION);
2056
+ api.SetCacheItem({
2057
+ key: GetCacheKey(id),
2058
+ value: {
2059
+ entity: entity
2060
+ },
2061
+ req: reqParams
2062
+ });
2005
2063
  }
2006
2064
  }
2007
2065
  return {
@@ -2964,7 +3022,11 @@ var EntityAttachmentType;
2964
3022
  rej(e);
2965
3023
  }
2966
3024
  }));
2967
- api.Cache.Set(GetListCacheKey(), req);
3025
+ api.SetCacheItem({
3026
+ key: GetListCacheKey(),
3027
+ value: req,
3028
+ req: reqParams
3029
+ });
2968
3030
  return req;
2969
3031
  });
2970
3032
  }
@@ -3059,7 +3121,11 @@ var EntityAttachment;
3059
3121
  rej(e);
3060
3122
  }
3061
3123
  }));
3062
- api.Cache.Set(GetListCacheKey(entityId), req);
3124
+ api.SetCacheItem({
3125
+ key: GetListCacheKey(entityId),
3126
+ value: req,
3127
+ req: reqParams
3128
+ });
3063
3129
  return req;
3064
3130
  });
3065
3131
  }
@@ -3144,7 +3210,11 @@ var EntityComment;
3144
3210
  rej(e);
3145
3211
  }
3146
3212
  }));
3147
- api.Cache.Set(GetListCacheKey(entityId), req);
3213
+ api.SetCacheItem({
3214
+ key: GetListCacheKey(entityId),
3215
+ value: req,
3216
+ req: reqParams
3217
+ });
3148
3218
  return req;
3149
3219
  });
3150
3220
  }
@@ -3214,7 +3284,11 @@ var EntityLink;
3214
3284
  rej(e);
3215
3285
  }
3216
3286
  }));
3217
- api.Cache.Set(GetListCacheKey(entityId), req);
3287
+ api.SetCacheItem({
3288
+ key: GetListCacheKey(entityId),
3289
+ value: req,
3290
+ req: reqParams
3291
+ });
3218
3292
  return req;
3219
3293
  });
3220
3294
  }
@@ -3282,7 +3356,11 @@ var EntityLod;
3282
3356
  rej(e);
3283
3357
  }
3284
3358
  }));
3285
- api.Cache.Set(GetCacheKey(url), req, Api.DEFAULT_CACHE_DURATION);
3359
+ api.SetCacheItem({
3360
+ key: GetCacheKey(url),
3361
+ value: req,
3362
+ req: reqParams
3363
+ });
3286
3364
  return req;
3287
3365
  });
3288
3366
  }
@@ -3323,7 +3401,11 @@ var EntityLod;
3323
3401
  rej(e);
3324
3402
  }
3325
3403
  }));
3326
- api.Cache.Set(GetEntityListKey(entityId), prom, Api.DEFAULT_CACHE_DURATION);
3404
+ api.SetCacheItem({
3405
+ key: GetEntityListKey(entityId),
3406
+ value: prom,
3407
+ req: reqParams
3408
+ });
3327
3409
  return prom;
3328
3410
  });
3329
3411
  }
@@ -3355,7 +3437,11 @@ var EntityLod;
3355
3437
  rej(e);
3356
3438
  }
3357
3439
  }));
3358
- api.Cache.Set(GetTypeListKey(typeId, group), prom, Api.DEFAULT_CACHE_DURATION);
3440
+ api.SetCacheItem({
3441
+ key: GetTypeListKey(typeId, group),
3442
+ value: prom,
3443
+ req: reqParams
3444
+ });
3359
3445
  return prom;
3360
3446
  });
3361
3447
  }
@@ -3422,7 +3508,11 @@ var EntityLodCategory;
3422
3508
  rej(e);
3423
3509
  }
3424
3510
  }));
3425
- api.Cache.Set(GetListCacheKey(), req);
3511
+ api.SetCacheItem({
3512
+ key: GetListCacheKey(),
3513
+ value: req,
3514
+ req: reqParams
3515
+ });
3426
3516
  return req;
3427
3517
  });
3428
3518
  }
@@ -3448,7 +3538,11 @@ var EntityLodCategory;
3448
3538
  rej(e);
3449
3539
  }
3450
3540
  }));
3451
- api.Cache.Set(GetCacheKey(id), req);
3541
+ api.SetCacheItem({
3542
+ key: GetCacheKey(id),
3543
+ value: req,
3544
+ req: reqParams
3545
+ });
3452
3546
  return req;
3453
3547
  });
3454
3548
  }
@@ -3518,7 +3612,11 @@ var EntityRelationType;
3518
3612
  rej(e);
3519
3613
  }
3520
3614
  }));
3521
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
3615
+ api.SetCacheItem({
3616
+ key,
3617
+ value: prom,
3618
+ req: reqParams
3619
+ });
3522
3620
  return prom;
3523
3621
  });
3524
3622
  }
@@ -3553,7 +3651,11 @@ var EntityRelationType;
3553
3651
  rej(e);
3554
3652
  }
3555
3653
  }));
3556
- api.Cache.Set(GetListCacheKey(), req);
3654
+ api.SetCacheItem({
3655
+ key: GetListCacheKey(),
3656
+ value: req,
3657
+ req: reqParams
3658
+ });
3557
3659
  return req;
3558
3660
  });
3559
3661
  }
@@ -3665,7 +3767,11 @@ var EntityRelation;
3665
3767
  rej(e);
3666
3768
  }
3667
3769
  }));
3668
- api.Cache.Set(GetListCacheKey(entityId, filter), req);
3770
+ api.SetCacheItem({
3771
+ key: GetListCacheKey(entityId, filter),
3772
+ value: req,
3773
+ req: reqParams
3774
+ });
3669
3775
  return req;
3670
3776
  });
3671
3777
  }
@@ -3691,7 +3797,11 @@ var EntityRelation;
3691
3797
  rej(e);
3692
3798
  }
3693
3799
  }));
3694
- api.Cache.Set(GetEntityCacheKey(entityId), prom);
3800
+ api.SetCacheItem({
3801
+ key: GetEntityCacheKey(entityId),
3802
+ value: prom,
3803
+ req: reqParams
3804
+ });
3695
3805
  return prom;
3696
3806
  });
3697
3807
  }
@@ -3899,7 +4009,11 @@ var EntityTag;
3899
4009
  rej(e);
3900
4010
  }
3901
4011
  }));
3902
- api.Cache.Set(GetCacheKey(id), req, Api.DEFAULT_CACHE_DURATION);
4012
+ api.SetCacheItem({
4013
+ key: GetCacheKey(id),
4014
+ value: req,
4015
+ req: reqParams
4016
+ });
3903
4017
  reqs.push(req);
3904
4018
  }
3905
4019
  }
@@ -3927,7 +4041,11 @@ var EntityTag;
3927
4041
  rej(e);
3928
4042
  }
3929
4043
  }));
3930
- api.Cache.Set(GetListCacheKey(entityTypeId), req, Api.DEFAULT_CACHE_DURATION);
4044
+ api.SetCacheItem({
4045
+ key: GetListCacheKey(entityTypeId),
4046
+ value: req,
4047
+ req: reqParams
4048
+ });
3931
4049
  return req;
3932
4050
  });
3933
4051
  }
@@ -3996,7 +4114,11 @@ var EntityType;
3996
4114
  rej(e);
3997
4115
  }
3998
4116
  }));
3999
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
4117
+ api.SetCacheItem({
4118
+ key,
4119
+ value: prom,
4120
+ req: reqParams
4121
+ });
4000
4122
  return prom;
4001
4123
  });
4002
4124
  }
@@ -4031,7 +4153,11 @@ var EntityType;
4031
4153
  rej(e);
4032
4154
  }
4033
4155
  }));
4034
- api.Cache.Set(GetListCacheKey(), req, Api.DEFAULT_CACHE_DURATION);
4156
+ api.SetCacheItem({
4157
+ key: GetListCacheKey(),
4158
+ value: req,
4159
+ req: reqParams
4160
+ });
4035
4161
  return req;
4036
4162
  });
4037
4163
  }
@@ -4472,7 +4598,10 @@ var EntityFilterGetter;
4472
4598
  sortOrder: Api.ESortOrder.Asc,
4473
4599
  entityTypeConditions: this.attrFilter
4474
4600
  },
4475
- viaCdn: this.viaCdn
4601
+ viaCdn: this.viaCdn,
4602
+ req: {
4603
+ noCache: true
4604
+ }
4476
4605
  });
4477
4606
  const integrity = this.getIntegrityId();
4478
4607
  if (loopIntegrity == integrity && entities) {
@@ -4675,7 +4804,11 @@ var EntityCoords;
4675
4804
  rej(e);
4676
4805
  }
4677
4806
  }));
4678
- api.Cache.Set(GetCacheKey(entityId), prom, Api.DEFAULT_CACHE_DURATION);
4807
+ api.SetCacheItem({
4808
+ key: GetCacheKey(entityId),
4809
+ value: prom,
4810
+ req: reqParams
4811
+ });
4679
4812
  return prom;
4680
4813
  });
4681
4814
  }
@@ -4929,7 +5062,11 @@ var ClientFile;
4929
5062
  rej(e);
4930
5063
  }
4931
5064
  }));
4932
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
5065
+ api.SetCacheItem({
5066
+ key,
5067
+ value: prom,
5068
+ req: reqParams
5069
+ });
4933
5070
  return prom;
4934
5071
  });
4935
5072
  }
@@ -5161,7 +5298,11 @@ var ProgramKey;
5161
5298
  rej(e);
5162
5299
  }
5163
5300
  }));
5164
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
5301
+ api.SetCacheItem({
5302
+ key,
5303
+ value: prom,
5304
+ req: reqParams
5305
+ });
5165
5306
  return prom;
5166
5307
  });
5167
5308
  }
@@ -5184,7 +5325,11 @@ var ProgramKey;
5184
5325
  rej(e);
5185
5326
  }
5186
5327
  }));
5187
- api.Cache.Set(GetListCacheKey(), req, Api.DEFAULT_CACHE_DURATION);
5328
+ api.SetCacheItem({
5329
+ key: GetListCacheKey(),
5330
+ value: req,
5331
+ req: reqParams
5332
+ });
5188
5333
  return req;
5189
5334
  });
5190
5335
  }
@@ -5295,7 +5440,11 @@ var Tileset;
5295
5440
  rej(e);
5296
5441
  }
5297
5442
  }));
5298
- api.Cache.Set(GetCacheKey(tilesetId, loadFiles), prom, Api.DEFAULT_CACHE_DURATION);
5443
+ api.SetCacheItem({
5444
+ key: GetCacheKey(tilesetId, loadFiles),
5445
+ value: prom,
5446
+ req: reqParams
5447
+ });
5299
5448
  return prom;
5300
5449
  });
5301
5450
  }
@@ -5349,7 +5498,11 @@ var Tileset;
5349
5498
  rej(e);
5350
5499
  }
5351
5500
  }));
5352
- api.Cache.Set(GetListCacheKey(), req, Api.DEFAULT_CACHE_DURATION);
5501
+ api.SetCacheItem({
5502
+ key: GetListCacheKey(),
5503
+ value: req,
5504
+ req: reqParams
5505
+ });
5353
5506
  return req;
5354
5507
  });
5355
5508
  }
@@ -5584,7 +5737,11 @@ var Tileset;
5584
5737
  rej(e);
5585
5738
  }
5586
5739
  }));
5587
- api.Cache.Set(GetCacheKey(accountId, tilesetId), prom);
5740
+ api.SetCacheItem({
5741
+ key: GetCacheKey(accountId, tilesetId),
5742
+ value: prom,
5743
+ req: reqParams
5744
+ });
5588
5745
  return prom;
5589
5746
  });
5590
5747
  }
@@ -5610,7 +5767,11 @@ var Tileset;
5610
5767
  rej(e);
5611
5768
  }
5612
5769
  }));
5613
- api.Cache.Set(GetCacheKey(accountId), req);
5770
+ api.SetCacheItem({
5771
+ key: GetCacheKey(accountId),
5772
+ value: req,
5773
+ req: reqParams
5774
+ });
5614
5775
  return req;
5615
5776
  });
5616
5777
  }
@@ -5799,7 +5960,11 @@ var ProjectViewBookmark;
5799
5960
  rej(e);
5800
5961
  }
5801
5962
  }));
5802
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
5963
+ api.SetCacheItem({
5964
+ key,
5965
+ value: prom,
5966
+ req: reqParams
5967
+ });
5803
5968
  return prom;
5804
5969
  });
5805
5970
  }
@@ -5840,7 +6005,11 @@ var ProjectViewBookmark;
5840
6005
  bookmark: item
5841
6006
  });
5842
6007
  });
5843
- api.Cache.Set(GetCacheKey(viewId, item.ID), prom, Api.DEFAULT_CACHE_DURATION);
6008
+ api.SetCacheItem({
6009
+ key: GetCacheKey(viewId, item.ID),
6010
+ value: prom,
6011
+ req: reqParams
6012
+ });
5844
6013
  }
5845
6014
  res({
5846
6015
  bookmarks: items
@@ -5850,7 +6019,11 @@ var ProjectViewBookmark;
5850
6019
  rej(e);
5851
6020
  }
5852
6021
  }));
5853
- api.Cache.Set(GetListCacheKey(viewId), req, Api.DEFAULT_CACHE_DURATION);
6022
+ api.SetCacheItem({
6023
+ key: GetListCacheKey(viewId),
6024
+ value: req,
6025
+ req: reqParams
6026
+ });
5854
6027
  return req;
5855
6028
  });
5856
6029
  }
@@ -5932,7 +6105,11 @@ var ProjectView;
5932
6105
  rej(e);
5933
6106
  }
5934
6107
  }));
5935
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
6108
+ api.SetCacheItem({
6109
+ key,
6110
+ value: prom,
6111
+ req: reqParams
6112
+ });
5936
6113
  return prom;
5937
6114
  });
5938
6115
  }
@@ -5955,7 +6132,11 @@ var ProjectView;
5955
6132
  rej(e);
5956
6133
  }
5957
6134
  }));
5958
- api.Cache.Set(GetListCacheKey(), prom, Api.DEFAULT_CACHE_DURATION);
6135
+ api.SetCacheItem({
6136
+ key: GetListCacheKey(),
6137
+ value: prom,
6138
+ req: reqParams
6139
+ });
5959
6140
  return prom;
5960
6141
  });
5961
6142
  }
@@ -6295,7 +6476,11 @@ var Style;
6295
6476
  rej(e);
6296
6477
  }
6297
6478
  }));
6298
- api.Cache.Set(GetListCacheKey(), res, Api.DEFAULT_CACHE_DURATION);
6479
+ api.SetCacheItem({
6480
+ key: GetListCacheKey(),
6481
+ value: res,
6482
+ req: reqParams
6483
+ });
6299
6484
  return res;
6300
6485
  }
6301
6486
  Style.GetList = GetList;
@@ -6319,7 +6504,11 @@ var Style;
6319
6504
  rej(e);
6320
6505
  }
6321
6506
  }));
6322
- api.Cache.Set(GetCacheKey(id), prom, Api.DEFAULT_CACHE_DURATION);
6507
+ api.SetCacheItem({
6508
+ key: GetCacheKey(id),
6509
+ value: prom,
6510
+ req: reqParams
6511
+ });
6323
6512
  return prom;
6324
6513
  }
6325
6514
  Style.Get = Get;
@@ -6405,7 +6594,11 @@ var Session;
6405
6594
  rej(e);
6406
6595
  }
6407
6596
  }));
6408
- api.Cache.Set(key, prom, Api.DEFAULT_CACHE_DURATION);
6597
+ api.SetCacheItem({
6598
+ key,
6599
+ value: prom,
6600
+ req: reqParams
6601
+ });
6409
6602
  return prom;
6410
6603
  });
6411
6604
  }
@@ -6633,7 +6826,11 @@ var User;
6633
6826
  rej(e);
6634
6827
  }
6635
6828
  }));
6636
- api.Cache.Set(GetCacheKey(id, accountId), prom, Api.DEFAULT_CACHE_DURATION);
6829
+ api.SetCacheItem({
6830
+ key: GetCacheKey(id, accountId),
6831
+ value: prom,
6832
+ req: reqParams
6833
+ });
6637
6834
  return prom;
6638
6835
  });
6639
6836
  }
@@ -6709,7 +6906,11 @@ var User;
6709
6906
  rej(e);
6710
6907
  }
6711
6908
  }));
6712
- api.Cache.Set(GetSettingsCacheKey(userId, appId), prom, Api.DEFAULT_CACHE_DURATION);
6909
+ api.SetCacheItem({
6910
+ key: GetSettingsCacheKey(userId, appId),
6911
+ value: prom,
6912
+ req: req
6913
+ });
6713
6914
  return prom;
6714
6915
  });
6715
6916
  }
@@ -6786,7 +6987,11 @@ var User;
6786
6987
  rej(e);
6787
6988
  }
6788
6989
  }));
6789
- api.Cache.Set(GetEmailCacheKey(email, accountId), prom, Api.DEFAULT_CACHE_DURATION);
6990
+ api.SetCacheItem({
6991
+ key: GetEmailCacheKey(email, accountId),
6992
+ value: prom,
6993
+ req: reqParams
6994
+ });
6790
6995
  return prom;
6791
6996
  });
6792
6997
  }
@@ -6818,13 +7023,21 @@ var User;
6818
7023
  req.then((data) => {
6819
7024
  const users = data.users;
6820
7025
  for (let i = 0; i < users.length; i++) {
6821
- api.Cache.Set(GetCacheKey(users[i].ID, accountId), {
6822
- user: users[i]
7026
+ api.SetCacheItem({
7027
+ key: GetCacheKey(users[i].ID, accountId),
7028
+ value: {
7029
+ user: users[i]
7030
+ },
7031
+ req: reqParams
6823
7032
  });
6824
7033
  }
6825
7034
  });
6826
7035
  if (!exclusive) {
6827
- api.Cache.Set(GetListCacheKey(accountId), req, Api.DEFAULT_CACHE_DURATION);
7036
+ api.SetCacheItem({
7037
+ key: GetListCacheKey(accountId),
7038
+ value: req,
7039
+ req: reqParams
7040
+ });
6828
7041
  }
6829
7042
  return req;
6830
7043
  });
@@ -6972,12 +7185,20 @@ var User;
6972
7185
  req.then((data) => {
6973
7186
  const users = data.tokens;
6974
7187
  for (let i = 0; i < users.length; i++) {
6975
- api.Cache.Set(GetCacheKey(users[i].ID, accountId), {
6976
- user: users[i]
7188
+ api.SetCacheItem({
7189
+ key: GetCacheKey(users[i].ID, accountId),
7190
+ value: {
7191
+ user: users[i]
7192
+ },
7193
+ req: reqParams
6977
7194
  });
6978
7195
  }
6979
7196
  });
6980
- api.Cache.Set(GetListCacheKey(accountId), req, Api.DEFAULT_CACHE_DURATION);
7197
+ api.SetCacheItem({
7198
+ key: GetListCacheKey(accountId),
7199
+ value: req,
7200
+ req: reqParams
7201
+ });
6981
7202
  return req;
6982
7203
  });
6983
7204
  }
@@ -7283,7 +7504,11 @@ var ImportedFile;
7283
7504
  rej(e);
7284
7505
  }
7285
7506
  }));
7286
- api.Cache.Set(GetListCacheKey(type, pageIndex), prom, Api.DEFAULT_CACHE_DURATION);
7507
+ api.SetCacheItem({
7508
+ key: GetListCacheKey(type, pageIndex),
7509
+ value: prom,
7510
+ req: reqParams
7511
+ });
7287
7512
  return prom;
7288
7513
  });
7289
7514
  }
@@ -7306,7 +7531,11 @@ var ImportedFile;
7306
7531
  rej(e);
7307
7532
  }
7308
7533
  }));
7309
- api.Cache.Set(GetCacheKey(fileId), prom, Api.DEFAULT_CACHE_DURATION);
7534
+ api.SetCacheItem({
7535
+ key: GetCacheKey(fileId),
7536
+ value: prom,
7537
+ req: reqParams
7538
+ });
7310
7539
  return prom;
7311
7540
  });
7312
7541
  }
@@ -7527,7 +7756,11 @@ var Plugin;
7527
7756
  rej(e);
7528
7757
  }
7529
7758
  }));
7530
- api.Cache.Set(GetCacheKey(pluginId), prom, Api.DEFAULT_CACHE_DURATION);
7759
+ api.SetCacheItem({
7760
+ key: GetCacheKey(pluginId),
7761
+ value: prom,
7762
+ req: req
7763
+ });
7531
7764
  return prom;
7532
7765
  });
7533
7766
  }
@@ -7550,7 +7783,11 @@ var Plugin;
7550
7783
  rej(e);
7551
7784
  }
7552
7785
  }));
7553
- api.Cache.Set(GetListCacheKey(), prom, Api.DEFAULT_CACHE_DURATION);
7786
+ api.SetCacheItem({
7787
+ key: GetListCacheKey(),
7788
+ value: prom,
7789
+ req: req
7790
+ });
7554
7791
  return prom;
7555
7792
  });
7556
7793
  }