bruce-models 1.1.3 → 1.1.6

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 (59) hide show
  1. package/dist/bruce-models.es5.js +58 -46
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +58 -46
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account.js +3 -3
  6. package/dist/lib/account/account.js.map +1 -1
  7. package/dist/lib/ann-document/ann-document.js +2 -2
  8. package/dist/lib/ann-document/ann-document.js.map +1 -1
  9. package/dist/lib/api/abstract-api.js +11 -0
  10. package/dist/lib/api/abstract-api.js.map +1 -1
  11. package/dist/lib/api/api.js +2 -0
  12. package/dist/lib/api/api.js.map +1 -1
  13. package/dist/lib/client-file/client-file.js +1 -1
  14. package/dist/lib/client-file/client-file.js.map +1 -1
  15. package/dist/lib/custom-form/custom-form.js +2 -2
  16. package/dist/lib/custom-form/custom-form.js.map +1 -1
  17. package/dist/lib/entity/entity-attachment-type.js +1 -1
  18. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  19. package/dist/lib/entity/entity-attachment.js +1 -1
  20. package/dist/lib/entity/entity-attachment.js.map +1 -1
  21. package/dist/lib/entity/entity-comment.js +1 -1
  22. package/dist/lib/entity/entity-comment.js.map +1 -1
  23. package/dist/lib/entity/entity-coords.js +1 -1
  24. package/dist/lib/entity/entity-coords.js.map +1 -1
  25. package/dist/lib/entity/entity-link.js +1 -1
  26. package/dist/lib/entity/entity-link.js.map +1 -1
  27. package/dist/lib/entity/entity-lod.js +2 -2
  28. package/dist/lib/entity/entity-lod.js.map +1 -1
  29. package/dist/lib/entity/entity-relation-type.js +2 -2
  30. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  31. package/dist/lib/entity/entity-relation.js +2 -2
  32. package/dist/lib/entity/entity-relation.js.map +1 -1
  33. package/dist/lib/entity/entity-source.js +2 -2
  34. package/dist/lib/entity/entity-source.js.map +1 -1
  35. package/dist/lib/entity/entity-tag.js +2 -2
  36. package/dist/lib/entity/entity-tag.js.map +1 -1
  37. package/dist/lib/entity/entity-type.js +2 -2
  38. package/dist/lib/entity/entity-type.js.map +1 -1
  39. package/dist/lib/entity/entity.js +2 -2
  40. package/dist/lib/entity/entity.js.map +1 -1
  41. package/dist/lib/import/imported-file.js +2 -2
  42. package/dist/lib/import/imported-file.js.map +1 -1
  43. package/dist/lib/program-key/program-key.js +2 -2
  44. package/dist/lib/program-key/program-key.js.map +1 -1
  45. package/dist/lib/project/project-view-bookmark.js +2 -2
  46. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  47. package/dist/lib/project/project-view.js +2 -2
  48. package/dist/lib/project/project-view.js.map +1 -1
  49. package/dist/lib/style/style.js +2 -2
  50. package/dist/lib/style/style.js.map +1 -1
  51. package/dist/lib/tileset/tileset.js +4 -4
  52. package/dist/lib/tileset/tileset.js.map +1 -1
  53. package/dist/lib/user/session.js +1 -1
  54. package/dist/lib/user/session.js.map +1 -1
  55. package/dist/lib/user/user.js +4 -4
  56. package/dist/lib/user/user.js.map +1 -1
  57. package/dist/types/api/abstract-api.d.ts +1 -0
  58. package/dist/types/api/api.d.ts +1 -0
  59. package/package.json +1 -1
@@ -79,6 +79,8 @@
79
79
  EEnv["UAT"] = "UAT";
80
80
  EEnv["PROD"] = "PROD";
81
81
  })(EEnv = Api.EEnv || (Api.EEnv = {}));
82
+ // False = cache is enabled by default for req-params.
83
+ Api.DEFAULT_NO_CACHE = false;
82
84
  /**
83
85
  * Prepares a string to be included in a url.
84
86
  * @param str
@@ -135,7 +137,7 @@
135
137
  throw ("Doc ID is required.");
136
138
  }
137
139
  const key = GetCacheKey(docId);
138
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
140
+ const cacheData = api.GetCacheItem(key, reqParams);
139
141
  if (cacheData) {
140
142
  return cacheData;
141
143
  }
@@ -150,7 +152,7 @@
150
152
  if (!type) {
151
153
  type = "";
152
154
  }
153
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type));
155
+ const cacheData = api.GetCacheItem(GetListCacheKey(type), reqParams);
154
156
  if (cacheData) {
155
157
  return cacheData;
156
158
  }
@@ -193,7 +195,7 @@
193
195
  if (!id) {
194
196
  throw ("Id is required.");
195
197
  }
196
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
198
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
197
199
  if (cacheData) {
198
200
  return cacheData;
199
201
  }
@@ -216,7 +218,7 @@
216
218
  function GetList(api, typeId, reqParams) {
217
219
  return __awaiter(this, void 0, void 0, function* () {
218
220
  const url = typeId ? `entityType/${typeId}/customForms` : "customForms";
219
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(typeId));
221
+ const cacheData = api.GetCacheItem(GetListCacheKey(typeId), reqParams);
220
222
  if (cacheData) {
221
223
  return cacheData;
222
224
  }
@@ -453,6 +455,16 @@
453
455
  this.Cache = new CacheControl();
454
456
  this.ssidHeader = ssidHeader;
455
457
  }
458
+ GetCacheItem(key, reqParams) {
459
+ let noCache = reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache;
460
+ if (noCache == null) {
461
+ noCache = exports.Api.DEFAULT_NO_CACHE;
462
+ }
463
+ if (noCache) {
464
+ return null;
465
+ }
466
+ return this.Cache.Get(key);
467
+ }
456
468
  GetSessionId() {
457
469
  return this.ssid;
458
470
  }
@@ -649,7 +661,7 @@
649
661
  ];
650
662
  function Get(api, id, reqParams) {
651
663
  return __awaiter(this, void 0, void 0, function* () {
652
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
664
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
653
665
  if (cacheData) {
654
666
  return cacheData;
655
667
  }
@@ -661,7 +673,7 @@
661
673
  Account.Get = Get;
662
674
  function GetRelatedList(api, reqParams) {
663
675
  return __awaiter(this, void 0, void 0, function* () {
664
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(api.GetSessionId()));
676
+ const cacheData = api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
665
677
  if (cacheData) {
666
678
  return cacheData;
667
679
  }
@@ -683,7 +695,7 @@
683
695
  Account.GetRelatedList = GetRelatedList;
684
696
  function GetAppSettings(api, id, appId, reqParams) {
685
697
  return __awaiter(this, void 0, void 0, function* () {
686
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id, appId));
698
+ const cacheData = api.GetCacheItem(GetCacheKey(id, appId), reqParams);
687
699
  if (cacheData) {
688
700
  return cacheData;
689
701
  }
@@ -1409,7 +1421,7 @@
1409
1421
  throw ("Entity ID is required.");
1410
1422
  }
1411
1423
  const key = GetCacheKey(entityId);
1412
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1424
+ const cacheData = api.GetCacheItem(key, reqParams);
1413
1425
  if (cacheData) {
1414
1426
  return cacheData;
1415
1427
  }
@@ -1429,7 +1441,7 @@
1429
1441
  for (let i = 0; i < entityIds.length; i++) {
1430
1442
  const entityId = entityIds[i];
1431
1443
  const key = GetCacheKey(entityId);
1432
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1444
+ const cacheData = api.GetCacheItem(key, reqParams);
1433
1445
  if (cacheData) {
1434
1446
  reqs.push(cacheData);
1435
1447
  }
@@ -2386,7 +2398,7 @@
2386
2398
  EntityAttachmentType.Update = Update;
2387
2399
  function GetList(api, reqParams) {
2388
2400
  return __awaiter(this, void 0, void 0, function* () {
2389
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
2401
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
2390
2402
  if (cacheData) {
2391
2403
  return cacheData;
2392
2404
  }
@@ -2480,7 +2492,7 @@
2480
2492
  if (!entityId) {
2481
2493
  throw ("Entity ID is required.");
2482
2494
  }
2483
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2495
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
2484
2496
  if (cacheData) {
2485
2497
  return cacheData;
2486
2498
  }
@@ -2550,7 +2562,7 @@
2550
2562
  if (!entityId) {
2551
2563
  throw ("Entity ID is required.");
2552
2564
  }
2553
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2565
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
2554
2566
  if (cacheData) {
2555
2567
  return cacheData;
2556
2568
  }
@@ -2608,7 +2620,7 @@
2608
2620
  if (!entityId) {
2609
2621
  throw ("Entity ID is required.");
2610
2622
  }
2611
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2623
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
2612
2624
  if (cacheData) {
2613
2625
  return cacheData;
2614
2626
  }
@@ -2659,7 +2671,7 @@
2659
2671
  if (!url) {
2660
2672
  throw ("Url is required.");
2661
2673
  }
2662
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(url));
2674
+ const cacheData = api.GetCacheItem(GetCacheKey(url), reqParams);
2663
2675
  if (cacheData) {
2664
2676
  return cacheData;
2665
2677
  }
@@ -2700,7 +2712,7 @@
2700
2712
  if (!group) {
2701
2713
  group = "DEFAULT";
2702
2714
  }
2703
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetTypeListKey(typeId, group));
2715
+ const cacheData = api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
2704
2716
  if (cacheData) {
2705
2717
  return cacheData;
2706
2718
  }
@@ -2749,7 +2761,7 @@
2749
2761
  throw ("Type ID is required.");
2750
2762
  }
2751
2763
  const key = GetCacheKey(typeId);
2752
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
2764
+ const cacheData = api.GetCacheItem(key, reqParams);
2753
2765
  if (cacheData) {
2754
2766
  return cacheData;
2755
2767
  }
@@ -2772,7 +2784,7 @@
2772
2784
  EntityRelationType.Delete = Delete;
2773
2785
  function GetList(api, reqParams) {
2774
2786
  return __awaiter(this, void 0, void 0, function* () {
2775
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
2787
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
2776
2788
  if (cacheData) {
2777
2789
  return cacheData;
2778
2790
  }
@@ -2866,7 +2878,7 @@
2866
2878
  throw ("Entity ID is required.");
2867
2879
  }
2868
2880
  params = Object.assign({ typeId: "", oneWayOnly: false, loadEntityData: false }, params);
2869
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId, params));
2881
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId, params), reqParams);
2870
2882
  if (cacheData) {
2871
2883
  return cacheData;
2872
2884
  }
@@ -2894,7 +2906,7 @@
2894
2906
  if (!entityId) {
2895
2907
  throw ("Entity ID is required.");
2896
2908
  }
2897
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEntityCacheKey(entityId));
2909
+ const cacheData = api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
2898
2910
  if (cacheData) {
2899
2911
  return cacheData;
2900
2912
  }
@@ -2917,7 +2929,7 @@
2917
2929
  throw ("Source ID and Source Key are required.");
2918
2930
  }
2919
2931
  const key = GetCacheKey(sourceId, sourceKey);
2920
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
2932
+ const cacheData = api.GetCacheItem(key, reqParams);
2921
2933
  if (cacheData) {
2922
2934
  return cacheData;
2923
2935
  }
@@ -2936,7 +2948,7 @@
2936
2948
  const reqs = [];
2937
2949
  for (let i = 0; i < sourceKeys.length; i++) {
2938
2950
  const sourceKey = sourceKeys[i];
2939
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(sourceId, sourceKey));
2951
+ const cacheData = api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
2940
2952
  if (cacheData) {
2941
2953
  reqs.push(cacheData);
2942
2954
  }
@@ -3026,7 +3038,7 @@
3026
3038
  const reqs = [];
3027
3039
  for (let i = 0; i < tagIds.length; i++) {
3028
3040
  const tagId = tagIds[i];
3029
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tagId));
3041
+ const cacheData = api.GetCacheItem(GetCacheKey(tagId), reqParams);
3030
3042
  if (cacheData) {
3031
3043
  reqs.push(cacheData);
3032
3044
  }
@@ -3066,7 +3078,7 @@
3066
3078
  EntityTag.GetListByIds = GetListByIds;
3067
3079
  function GetList(api, entityTypeId, reqParams) {
3068
3080
  return __awaiter(this, void 0, void 0, function* () {
3069
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityTypeId));
3081
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
3070
3082
  if (cacheData) {
3071
3083
  return cacheData;
3072
3084
  }
@@ -3135,7 +3147,7 @@
3135
3147
  throw ("Type ID is required.");
3136
3148
  }
3137
3149
  const key = GetCacheKey(typeId);
3138
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3150
+ const cacheData = api.GetCacheItem(key, reqParams);
3139
3151
  if (cacheData) {
3140
3152
  return cacheData;
3141
3153
  }
@@ -3158,7 +3170,7 @@
3158
3170
  EntityType.Delete = Delete;
3159
3171
  function GetList(api, reqParams) {
3160
3172
  return __awaiter(this, void 0, void 0, function* () {
3161
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
3173
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
3162
3174
  if (cacheData) {
3163
3175
  return cacheData;
3164
3176
  }
@@ -3773,7 +3785,7 @@
3773
3785
  EntityCoords.GetCacheKey = GetCacheKey;
3774
3786
  function GetEntityCoords(api, entityId, reqParams) {
3775
3787
  return __awaiter(this, void 0, void 0, function* () {
3776
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(entityId));
3788
+ const cacheData = api.GetCacheItem(GetCacheKey(entityId), reqParams);
3777
3789
  if (cacheData) {
3778
3790
  return cacheData;
3779
3791
  }
@@ -3896,7 +3908,7 @@
3896
3908
  throw ("File ID is required.");
3897
3909
  }
3898
3910
  const key = GetCacheKey(fileId);
3899
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3911
+ const cacheData = api.GetCacheItem(key, reqParams);
3900
3912
  if (cacheData) {
3901
3913
  return cacheData;
3902
3914
  }
@@ -4044,7 +4056,7 @@
4044
4056
  throw ("Program ID is required.");
4045
4057
  }
4046
4058
  const key = GetCacheKey(programId);
4047
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4059
+ const cacheData = api.GetCacheItem(key, reqParams);
4048
4060
  if (cacheData) {
4049
4061
  return cacheData;
4050
4062
  }
@@ -4056,7 +4068,7 @@
4056
4068
  ProgramKey.Get = Get;
4057
4069
  function GetList(api, reqParams) {
4058
4070
  return __awaiter(this, void 0, void 0, function* () {
4059
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4071
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4060
4072
  if (cacheData) {
4061
4073
  return cacheData;
4062
4074
  }
@@ -4145,7 +4157,7 @@
4145
4157
  if (!tilesetId) {
4146
4158
  throw ("Tileset ID is required.");
4147
4159
  }
4148
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tilesetId, loadFiles));
4160
+ const cacheData = api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
4149
4161
  if (cacheData) {
4150
4162
  return cacheData;
4151
4163
  }
@@ -4157,7 +4169,7 @@
4157
4169
  Tileset.Get = Get;
4158
4170
  function GetList(api, reqParams) {
4159
4171
  return __awaiter(this, void 0, void 0, function* () {
4160
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4172
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4161
4173
  if (cacheData) {
4162
4174
  return cacheData;
4163
4175
  }
@@ -4318,7 +4330,7 @@
4318
4330
  if (!accountId || !tilesetId) {
4319
4331
  throw ("Client account ID and tileset ID are required.");
4320
4332
  }
4321
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId, tilesetId));
4333
+ const cacheData = api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
4322
4334
  if (cacheData) {
4323
4335
  return cacheData;
4324
4336
  }
@@ -4333,7 +4345,7 @@
4333
4345
  if (!accountId) {
4334
4346
  throw ("Client account ID is required.");
4335
4347
  }
4336
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId));
4348
+ const cacheData = api.GetCacheItem(GetCacheKey(accountId), reqParams);
4337
4349
  if (cacheData) {
4338
4350
  return cacheData;
4339
4351
  }
@@ -4484,7 +4496,7 @@
4484
4496
  throw ("View ID and Bookmark ID are required.");
4485
4497
  }
4486
4498
  const key = GetCacheKey(viewId, bookmarkId);
4487
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4499
+ const cacheData = api.GetCacheItem(key, reqParams);
4488
4500
  if (cacheData) {
4489
4501
  return cacheData;
4490
4502
  }
@@ -4510,7 +4522,7 @@
4510
4522
  if (!viewId) {
4511
4523
  throw ("View ID is required.");
4512
4524
  }
4513
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(viewId));
4525
+ const cacheData = api.GetCacheItem(GetListCacheKey(viewId), reqParams);
4514
4526
  if (cacheData) {
4515
4527
  return cacheData;
4516
4528
  }
@@ -4590,7 +4602,7 @@
4590
4602
  throw ("View ID is required.");
4591
4603
  }
4592
4604
  const key = GetCacheKey(viewId);
4593
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4605
+ const cacheData = api.GetCacheItem(key, reqParams);
4594
4606
  if (cacheData) {
4595
4607
  return cacheData;
4596
4608
  }
@@ -4602,7 +4614,7 @@
4602
4614
  ProjectView.Get = Get;
4603
4615
  function GetList(api, reqParams) {
4604
4616
  return __awaiter(this, void 0, void 0, function* () {
4605
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4617
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4606
4618
  if (cacheData) {
4607
4619
  return cacheData;
4608
4620
  }
@@ -4888,7 +4900,7 @@
4888
4900
  EPointType["Cylinder"] = "CYLINDER";
4889
4901
  })(EPointType = Style.EPointType || (Style.EPointType = {}));
4890
4902
  function GetList(api, reqParams) {
4891
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4903
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4892
4904
  if (cacheData) {
4893
4905
  return cacheData;
4894
4906
  }
@@ -4909,7 +4921,7 @@
4909
4921
  if (!id) {
4910
4922
  throw ("Style ID is required.");
4911
4923
  }
4912
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
4924
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
4913
4925
  if (cacheData) {
4914
4926
  return cacheData;
4915
4927
  }
@@ -5002,7 +5014,7 @@
5002
5014
  throw ("Session ID is required.");
5003
5015
  }
5004
5016
  const key = GetCacheKey(sessionId);
5005
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5017
+ const cacheData = api.GetCacheItem(key, reqParams);
5006
5018
  if (cacheData) {
5007
5019
  return cacheData;
5008
5020
  }
@@ -5172,7 +5184,7 @@
5172
5184
  if (!id) {
5173
5185
  throw ("ID is required.");
5174
5186
  }
5175
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id, accountId));
5187
+ const cacheData = api.GetCacheItem(GetCacheKey(id, accountId), reqParams);
5176
5188
  if (cacheData) {
5177
5189
  return cacheData;
5178
5190
  }
@@ -5229,7 +5241,7 @@
5229
5241
  if (!email) {
5230
5242
  throw ("Email is required.");
5231
5243
  }
5232
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEmailCacheKey(email, accountId));
5244
+ const cacheData = api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
5233
5245
  if (cacheData) {
5234
5246
  return cacheData;
5235
5247
  }
@@ -5247,7 +5259,7 @@
5247
5259
  if (!exclusive) {
5248
5260
  exclusive = false;
5249
5261
  }
5250
- const cacheData = exclusive || (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
5262
+ const cacheData = exclusive ? null : api.GetCacheItem(GetListCacheKey(accountId), reqParams);
5251
5263
  if (cacheData) {
5252
5264
  return cacheData;
5253
5265
  }
@@ -5388,7 +5400,7 @@
5388
5400
  AccessToken.GetListCacheKey = GetListCacheKey;
5389
5401
  function GetList(api, accountId, reqParams) {
5390
5402
  return __awaiter(this, void 0, void 0, function* () {
5391
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
5403
+ const cacheData = api.GetCacheItem(GetListCacheKey(accountId), reqParams);
5392
5404
  if (cacheData) {
5393
5405
  return cacheData;
5394
5406
  }
@@ -5665,7 +5677,7 @@
5665
5677
  if (!pageIndex) {
5666
5678
  pageIndex = 0;
5667
5679
  }
5668
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type, pageIndex));
5680
+ const cacheData = api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
5669
5681
  if (cacheData) {
5670
5682
  return cacheData;
5671
5683
  }
@@ -5695,7 +5707,7 @@
5695
5707
  ImportedFile.GetList = GetList;
5696
5708
  function Get(api, fileId, reqParams) {
5697
5709
  return __awaiter(this, void 0, void 0, function* () {
5698
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(fileId));
5710
+ const cacheData = api.GetCacheItem(GetCacheKey(fileId), reqParams);
5699
5711
  if (cacheData) {
5700
5712
  return cacheData;
5701
5713
  }