bruce-models 1.1.3 → 1.1.5

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 +57 -46
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +57 -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 +1 -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,7 @@
79
79
  EEnv["UAT"] = "UAT";
80
80
  EEnv["PROD"] = "PROD";
81
81
  })(EEnv = Api.EEnv || (Api.EEnv = {}));
82
+ Api.DEFAULT_CACHE_STATE = true;
82
83
  /**
83
84
  * Prepares a string to be included in a url.
84
85
  * @param str
@@ -135,7 +136,7 @@
135
136
  throw ("Doc ID is required.");
136
137
  }
137
138
  const key = GetCacheKey(docId);
138
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
139
+ const cacheData = api.GetCacheItem(key, reqParams);
139
140
  if (cacheData) {
140
141
  return cacheData;
141
142
  }
@@ -150,7 +151,7 @@
150
151
  if (!type) {
151
152
  type = "";
152
153
  }
153
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type));
154
+ const cacheData = api.GetCacheItem(GetListCacheKey(type), reqParams);
154
155
  if (cacheData) {
155
156
  return cacheData;
156
157
  }
@@ -193,7 +194,7 @@
193
194
  if (!id) {
194
195
  throw ("Id is required.");
195
196
  }
196
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
197
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
197
198
  if (cacheData) {
198
199
  return cacheData;
199
200
  }
@@ -216,7 +217,7 @@
216
217
  function GetList(api, typeId, reqParams) {
217
218
  return __awaiter(this, void 0, void 0, function* () {
218
219
  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));
220
+ const cacheData = api.GetCacheItem(GetListCacheKey(typeId), reqParams);
220
221
  if (cacheData) {
221
222
  return cacheData;
222
223
  }
@@ -453,6 +454,16 @@
453
454
  this.Cache = new CacheControl();
454
455
  this.ssidHeader = ssidHeader;
455
456
  }
457
+ GetCacheItem(key, reqParams) {
458
+ let noCache = reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache;
459
+ if (noCache == null) {
460
+ noCache = exports.Api.DEFAULT_CACHE_STATE;
461
+ }
462
+ if (noCache) {
463
+ return null;
464
+ }
465
+ return this.Cache.Get(key);
466
+ }
456
467
  GetSessionId() {
457
468
  return this.ssid;
458
469
  }
@@ -649,7 +660,7 @@
649
660
  ];
650
661
  function Get(api, id, reqParams) {
651
662
  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));
663
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
653
664
  if (cacheData) {
654
665
  return cacheData;
655
666
  }
@@ -661,7 +672,7 @@
661
672
  Account.Get = Get;
662
673
  function GetRelatedList(api, reqParams) {
663
674
  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()));
675
+ const cacheData = api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
665
676
  if (cacheData) {
666
677
  return cacheData;
667
678
  }
@@ -683,7 +694,7 @@
683
694
  Account.GetRelatedList = GetRelatedList;
684
695
  function GetAppSettings(api, id, appId, reqParams) {
685
696
  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));
697
+ const cacheData = api.GetCacheItem(GetCacheKey(id, appId), reqParams);
687
698
  if (cacheData) {
688
699
  return cacheData;
689
700
  }
@@ -1409,7 +1420,7 @@
1409
1420
  throw ("Entity ID is required.");
1410
1421
  }
1411
1422
  const key = GetCacheKey(entityId);
1412
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1423
+ const cacheData = api.GetCacheItem(key, reqParams);
1413
1424
  if (cacheData) {
1414
1425
  return cacheData;
1415
1426
  }
@@ -1429,7 +1440,7 @@
1429
1440
  for (let i = 0; i < entityIds.length; i++) {
1430
1441
  const entityId = entityIds[i];
1431
1442
  const key = GetCacheKey(entityId);
1432
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1443
+ const cacheData = api.GetCacheItem(key, reqParams);
1433
1444
  if (cacheData) {
1434
1445
  reqs.push(cacheData);
1435
1446
  }
@@ -2386,7 +2397,7 @@
2386
2397
  EntityAttachmentType.Update = Update;
2387
2398
  function GetList(api, reqParams) {
2388
2399
  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());
2400
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
2390
2401
  if (cacheData) {
2391
2402
  return cacheData;
2392
2403
  }
@@ -2480,7 +2491,7 @@
2480
2491
  if (!entityId) {
2481
2492
  throw ("Entity ID is required.");
2482
2493
  }
2483
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2494
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
2484
2495
  if (cacheData) {
2485
2496
  return cacheData;
2486
2497
  }
@@ -2550,7 +2561,7 @@
2550
2561
  if (!entityId) {
2551
2562
  throw ("Entity ID is required.");
2552
2563
  }
2553
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2564
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
2554
2565
  if (cacheData) {
2555
2566
  return cacheData;
2556
2567
  }
@@ -2608,7 +2619,7 @@
2608
2619
  if (!entityId) {
2609
2620
  throw ("Entity ID is required.");
2610
2621
  }
2611
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2622
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
2612
2623
  if (cacheData) {
2613
2624
  return cacheData;
2614
2625
  }
@@ -2659,7 +2670,7 @@
2659
2670
  if (!url) {
2660
2671
  throw ("Url is required.");
2661
2672
  }
2662
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(url));
2673
+ const cacheData = api.GetCacheItem(GetCacheKey(url), reqParams);
2663
2674
  if (cacheData) {
2664
2675
  return cacheData;
2665
2676
  }
@@ -2700,7 +2711,7 @@
2700
2711
  if (!group) {
2701
2712
  group = "DEFAULT";
2702
2713
  }
2703
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetTypeListKey(typeId, group));
2714
+ const cacheData = api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
2704
2715
  if (cacheData) {
2705
2716
  return cacheData;
2706
2717
  }
@@ -2749,7 +2760,7 @@
2749
2760
  throw ("Type ID is required.");
2750
2761
  }
2751
2762
  const key = GetCacheKey(typeId);
2752
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
2763
+ const cacheData = api.GetCacheItem(key, reqParams);
2753
2764
  if (cacheData) {
2754
2765
  return cacheData;
2755
2766
  }
@@ -2772,7 +2783,7 @@
2772
2783
  EntityRelationType.Delete = Delete;
2773
2784
  function GetList(api, reqParams) {
2774
2785
  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());
2786
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
2776
2787
  if (cacheData) {
2777
2788
  return cacheData;
2778
2789
  }
@@ -2866,7 +2877,7 @@
2866
2877
  throw ("Entity ID is required.");
2867
2878
  }
2868
2879
  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));
2880
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityId, params), reqParams);
2870
2881
  if (cacheData) {
2871
2882
  return cacheData;
2872
2883
  }
@@ -2894,7 +2905,7 @@
2894
2905
  if (!entityId) {
2895
2906
  throw ("Entity ID is required.");
2896
2907
  }
2897
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEntityCacheKey(entityId));
2908
+ const cacheData = api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
2898
2909
  if (cacheData) {
2899
2910
  return cacheData;
2900
2911
  }
@@ -2917,7 +2928,7 @@
2917
2928
  throw ("Source ID and Source Key are required.");
2918
2929
  }
2919
2930
  const key = GetCacheKey(sourceId, sourceKey);
2920
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
2931
+ const cacheData = api.GetCacheItem(key, reqParams);
2921
2932
  if (cacheData) {
2922
2933
  return cacheData;
2923
2934
  }
@@ -2936,7 +2947,7 @@
2936
2947
  const reqs = [];
2937
2948
  for (let i = 0; i < sourceKeys.length; i++) {
2938
2949
  const sourceKey = sourceKeys[i];
2939
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(sourceId, sourceKey));
2950
+ const cacheData = api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
2940
2951
  if (cacheData) {
2941
2952
  reqs.push(cacheData);
2942
2953
  }
@@ -3026,7 +3037,7 @@
3026
3037
  const reqs = [];
3027
3038
  for (let i = 0; i < tagIds.length; i++) {
3028
3039
  const tagId = tagIds[i];
3029
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tagId));
3040
+ const cacheData = api.GetCacheItem(GetCacheKey(tagId), reqParams);
3030
3041
  if (cacheData) {
3031
3042
  reqs.push(cacheData);
3032
3043
  }
@@ -3066,7 +3077,7 @@
3066
3077
  EntityTag.GetListByIds = GetListByIds;
3067
3078
  function GetList(api, entityTypeId, reqParams) {
3068
3079
  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));
3080
+ const cacheData = api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
3070
3081
  if (cacheData) {
3071
3082
  return cacheData;
3072
3083
  }
@@ -3135,7 +3146,7 @@
3135
3146
  throw ("Type ID is required.");
3136
3147
  }
3137
3148
  const key = GetCacheKey(typeId);
3138
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3149
+ const cacheData = api.GetCacheItem(key, reqParams);
3139
3150
  if (cacheData) {
3140
3151
  return cacheData;
3141
3152
  }
@@ -3158,7 +3169,7 @@
3158
3169
  EntityType.Delete = Delete;
3159
3170
  function GetList(api, reqParams) {
3160
3171
  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());
3172
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
3162
3173
  if (cacheData) {
3163
3174
  return cacheData;
3164
3175
  }
@@ -3773,7 +3784,7 @@
3773
3784
  EntityCoords.GetCacheKey = GetCacheKey;
3774
3785
  function GetEntityCoords(api, entityId, reqParams) {
3775
3786
  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));
3787
+ const cacheData = api.GetCacheItem(GetCacheKey(entityId), reqParams);
3777
3788
  if (cacheData) {
3778
3789
  return cacheData;
3779
3790
  }
@@ -3896,7 +3907,7 @@
3896
3907
  throw ("File ID is required.");
3897
3908
  }
3898
3909
  const key = GetCacheKey(fileId);
3899
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3910
+ const cacheData = api.GetCacheItem(key, reqParams);
3900
3911
  if (cacheData) {
3901
3912
  return cacheData;
3902
3913
  }
@@ -4044,7 +4055,7 @@
4044
4055
  throw ("Program ID is required.");
4045
4056
  }
4046
4057
  const key = GetCacheKey(programId);
4047
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4058
+ const cacheData = api.GetCacheItem(key, reqParams);
4048
4059
  if (cacheData) {
4049
4060
  return cacheData;
4050
4061
  }
@@ -4056,7 +4067,7 @@
4056
4067
  ProgramKey.Get = Get;
4057
4068
  function GetList(api, reqParams) {
4058
4069
  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());
4070
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4060
4071
  if (cacheData) {
4061
4072
  return cacheData;
4062
4073
  }
@@ -4145,7 +4156,7 @@
4145
4156
  if (!tilesetId) {
4146
4157
  throw ("Tileset ID is required.");
4147
4158
  }
4148
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tilesetId, loadFiles));
4159
+ const cacheData = api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
4149
4160
  if (cacheData) {
4150
4161
  return cacheData;
4151
4162
  }
@@ -4157,7 +4168,7 @@
4157
4168
  Tileset.Get = Get;
4158
4169
  function GetList(api, reqParams) {
4159
4170
  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());
4171
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4161
4172
  if (cacheData) {
4162
4173
  return cacheData;
4163
4174
  }
@@ -4318,7 +4329,7 @@
4318
4329
  if (!accountId || !tilesetId) {
4319
4330
  throw ("Client account ID and tileset ID are required.");
4320
4331
  }
4321
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId, tilesetId));
4332
+ const cacheData = api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
4322
4333
  if (cacheData) {
4323
4334
  return cacheData;
4324
4335
  }
@@ -4333,7 +4344,7 @@
4333
4344
  if (!accountId) {
4334
4345
  throw ("Client account ID is required.");
4335
4346
  }
4336
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId));
4347
+ const cacheData = api.GetCacheItem(GetCacheKey(accountId), reqParams);
4337
4348
  if (cacheData) {
4338
4349
  return cacheData;
4339
4350
  }
@@ -4484,7 +4495,7 @@
4484
4495
  throw ("View ID and Bookmark ID are required.");
4485
4496
  }
4486
4497
  const key = GetCacheKey(viewId, bookmarkId);
4487
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4498
+ const cacheData = api.GetCacheItem(key, reqParams);
4488
4499
  if (cacheData) {
4489
4500
  return cacheData;
4490
4501
  }
@@ -4510,7 +4521,7 @@
4510
4521
  if (!viewId) {
4511
4522
  throw ("View ID is required.");
4512
4523
  }
4513
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(viewId));
4524
+ const cacheData = api.GetCacheItem(GetListCacheKey(viewId), reqParams);
4514
4525
  if (cacheData) {
4515
4526
  return cacheData;
4516
4527
  }
@@ -4590,7 +4601,7 @@
4590
4601
  throw ("View ID is required.");
4591
4602
  }
4592
4603
  const key = GetCacheKey(viewId);
4593
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4604
+ const cacheData = api.GetCacheItem(key, reqParams);
4594
4605
  if (cacheData) {
4595
4606
  return cacheData;
4596
4607
  }
@@ -4602,7 +4613,7 @@
4602
4613
  ProjectView.Get = Get;
4603
4614
  function GetList(api, reqParams) {
4604
4615
  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());
4616
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4606
4617
  if (cacheData) {
4607
4618
  return cacheData;
4608
4619
  }
@@ -4888,7 +4899,7 @@
4888
4899
  EPointType["Cylinder"] = "CYLINDER";
4889
4900
  })(EPointType = Style.EPointType || (Style.EPointType = {}));
4890
4901
  function GetList(api, reqParams) {
4891
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4902
+ const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
4892
4903
  if (cacheData) {
4893
4904
  return cacheData;
4894
4905
  }
@@ -4909,7 +4920,7 @@
4909
4920
  if (!id) {
4910
4921
  throw ("Style ID is required.");
4911
4922
  }
4912
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
4923
+ const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
4913
4924
  if (cacheData) {
4914
4925
  return cacheData;
4915
4926
  }
@@ -5002,7 +5013,7 @@
5002
5013
  throw ("Session ID is required.");
5003
5014
  }
5004
5015
  const key = GetCacheKey(sessionId);
5005
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5016
+ const cacheData = api.GetCacheItem(key, reqParams);
5006
5017
  if (cacheData) {
5007
5018
  return cacheData;
5008
5019
  }
@@ -5172,7 +5183,7 @@
5172
5183
  if (!id) {
5173
5184
  throw ("ID is required.");
5174
5185
  }
5175
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id, accountId));
5186
+ const cacheData = api.GetCacheItem(GetCacheKey(id, accountId), reqParams);
5176
5187
  if (cacheData) {
5177
5188
  return cacheData;
5178
5189
  }
@@ -5229,7 +5240,7 @@
5229
5240
  if (!email) {
5230
5241
  throw ("Email is required.");
5231
5242
  }
5232
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEmailCacheKey(email, accountId));
5243
+ const cacheData = api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
5233
5244
  if (cacheData) {
5234
5245
  return cacheData;
5235
5246
  }
@@ -5247,7 +5258,7 @@
5247
5258
  if (!exclusive) {
5248
5259
  exclusive = false;
5249
5260
  }
5250
- const cacheData = exclusive || (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
5261
+ const cacheData = exclusive ? null : api.GetCacheItem(GetListCacheKey(accountId), reqParams);
5251
5262
  if (cacheData) {
5252
5263
  return cacheData;
5253
5264
  }
@@ -5388,7 +5399,7 @@
5388
5399
  AccessToken.GetListCacheKey = GetListCacheKey;
5389
5400
  function GetList(api, accountId, reqParams) {
5390
5401
  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));
5402
+ const cacheData = api.GetCacheItem(GetListCacheKey(accountId), reqParams);
5392
5403
  if (cacheData) {
5393
5404
  return cacheData;
5394
5405
  }
@@ -5665,7 +5676,7 @@
5665
5676
  if (!pageIndex) {
5666
5677
  pageIndex = 0;
5667
5678
  }
5668
- const cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type, pageIndex));
5679
+ const cacheData = api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
5669
5680
  if (cacheData) {
5670
5681
  return cacheData;
5671
5682
  }
@@ -5695,7 +5706,7 @@
5695
5706
  ImportedFile.GetList = GetList;
5696
5707
  function Get(api, fileId, reqParams) {
5697
5708
  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));
5709
+ const cacheData = api.GetCacheItem(GetCacheKey(fileId), reqParams);
5699
5710
  if (cacheData) {
5700
5711
  return cacheData;
5701
5712
  }