bruce-models 1.1.2 → 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.
- package/dist/bruce-models.es5.js +83 -63
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +83 -63
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account.js +3 -3
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +2 -2
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/api/abstract-api.js +11 -0
- package/dist/lib/api/abstract-api.js.map +1 -1
- package/dist/lib/api/api.js +1 -0
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/calculator/calculator.js +26 -17
- package/dist/lib/calculator/calculator.js.map +1 -1
- package/dist/lib/client-file/client-file.js +1 -1
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/custom-form/custom-form.js +2 -2
- package/dist/lib/custom-form/custom-form.js.map +1 -1
- package/dist/lib/entity/entity-attachment-type.js +1 -1
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +1 -1
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/dist/lib/entity/entity-comment.js +1 -1
- package/dist/lib/entity/entity-comment.js.map +1 -1
- package/dist/lib/entity/entity-coords.js +1 -1
- package/dist/lib/entity/entity-coords.js.map +1 -1
- package/dist/lib/entity/entity-link.js +1 -1
- package/dist/lib/entity/entity-link.js.map +1 -1
- package/dist/lib/entity/entity-lod.js +2 -2
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/entity-relation-type.js +2 -2
- package/dist/lib/entity/entity-relation-type.js.map +1 -1
- package/dist/lib/entity/entity-relation.js +2 -2
- package/dist/lib/entity/entity-relation.js.map +1 -1
- package/dist/lib/entity/entity-source.js +2 -2
- package/dist/lib/entity/entity-source.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +2 -2
- package/dist/lib/entity/entity-tag.js.map +1 -1
- package/dist/lib/entity/entity-type.js +2 -2
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +2 -2
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/import/imported-file.js +2 -2
- package/dist/lib/import/imported-file.js.map +1 -1
- package/dist/lib/program-key/program-key.js +2 -2
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +2 -2
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view.js +2 -2
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/lib/style/style.js +2 -2
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/tileset/tileset.js +4 -4
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/lib/user/session.js +1 -1
- package/dist/lib/user/session.js.map +1 -1
- package/dist/lib/user/user.js +4 -4
- package/dist/lib/user/user.js.map +1 -1
- package/dist/types/api/abstract-api.d.ts +1 -0
- package/dist/types/api/api.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
1443
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
1433
1444
|
if (cacheData) {
|
|
1434
1445
|
reqs.push(cacheData);
|
|
1435
1446
|
}
|
|
@@ -1822,31 +1833,40 @@
|
|
|
1822
1833
|
Calculator.GetColor = GetColor;
|
|
1823
1834
|
function GetMappingValue(value, entity) {
|
|
1824
1835
|
const attrPath = parseLegacyPath(value.field);
|
|
1825
|
-
const eValue =
|
|
1836
|
+
const eValue = exports.Entity.GetValue(entity, attrPath);
|
|
1837
|
+
const isValueNum = !isNaN(+eValue);
|
|
1826
1838
|
for (let i = 0; i < value.values.length; i++) {
|
|
1827
1839
|
const option = value.values[i];
|
|
1828
1840
|
const mapValue = option.fieldValue;
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
if (mapSplit.length == 2) {
|
|
1834
|
-
const min = mapSplit[0];
|
|
1835
|
-
const max = mapSplit[1];
|
|
1836
|
-
if (min != "") {
|
|
1837
|
-
if (eValue < +min) {
|
|
1838
|
-
continue;
|
|
1839
|
-
}
|
|
1841
|
+
const isMapValueNum = !isNaN(+mapValue);
|
|
1842
|
+
if (isValueNum && isMapValueNum) {
|
|
1843
|
+
if (+mapValue == +eValue) {
|
|
1844
|
+
return option.appliedValue;
|
|
1840
1845
|
}
|
|
1841
|
-
|
|
1842
|
-
|
|
1846
|
+
const mapSplit = mapValue.split("-");
|
|
1847
|
+
if (mapSplit.length == 2) {
|
|
1848
|
+
const min = mapSplit[0];
|
|
1849
|
+
const max = mapSplit[1];
|
|
1850
|
+
if (min != "") {
|
|
1851
|
+
if (+eValue < +min) {
|
|
1852
|
+
continue;
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
if (max != "") {
|
|
1856
|
+
if (+eValue > +max) {
|
|
1857
|
+
continue;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
if (min == "" && max == "") {
|
|
1843
1861
|
continue;
|
|
1844
1862
|
}
|
|
1863
|
+
return option.appliedValue;
|
|
1845
1864
|
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1865
|
+
}
|
|
1866
|
+
else {
|
|
1867
|
+
if (mapValue == eValue) {
|
|
1868
|
+
return option.appliedValue;
|
|
1848
1869
|
}
|
|
1849
|
-
return option.appliedValue;
|
|
1850
1870
|
}
|
|
1851
1871
|
}
|
|
1852
1872
|
return null;
|
|
@@ -2377,7 +2397,7 @@
|
|
|
2377
2397
|
EntityAttachmentType.Update = Update;
|
|
2378
2398
|
function GetList(api, reqParams) {
|
|
2379
2399
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2380
|
-
const cacheData =
|
|
2400
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2381
2401
|
if (cacheData) {
|
|
2382
2402
|
return cacheData;
|
|
2383
2403
|
}
|
|
@@ -2471,7 +2491,7 @@
|
|
|
2471
2491
|
if (!entityId) {
|
|
2472
2492
|
throw ("Entity ID is required.");
|
|
2473
2493
|
}
|
|
2474
|
-
const cacheData =
|
|
2494
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
2475
2495
|
if (cacheData) {
|
|
2476
2496
|
return cacheData;
|
|
2477
2497
|
}
|
|
@@ -2541,7 +2561,7 @@
|
|
|
2541
2561
|
if (!entityId) {
|
|
2542
2562
|
throw ("Entity ID is required.");
|
|
2543
2563
|
}
|
|
2544
|
-
const cacheData =
|
|
2564
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
2545
2565
|
if (cacheData) {
|
|
2546
2566
|
return cacheData;
|
|
2547
2567
|
}
|
|
@@ -2599,7 +2619,7 @@
|
|
|
2599
2619
|
if (!entityId) {
|
|
2600
2620
|
throw ("Entity ID is required.");
|
|
2601
2621
|
}
|
|
2602
|
-
const cacheData =
|
|
2622
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
2603
2623
|
if (cacheData) {
|
|
2604
2624
|
return cacheData;
|
|
2605
2625
|
}
|
|
@@ -2650,7 +2670,7 @@
|
|
|
2650
2670
|
if (!url) {
|
|
2651
2671
|
throw ("Url is required.");
|
|
2652
2672
|
}
|
|
2653
|
-
const cacheData =
|
|
2673
|
+
const cacheData = api.GetCacheItem(GetCacheKey(url), reqParams);
|
|
2654
2674
|
if (cacheData) {
|
|
2655
2675
|
return cacheData;
|
|
2656
2676
|
}
|
|
@@ -2691,7 +2711,7 @@
|
|
|
2691
2711
|
if (!group) {
|
|
2692
2712
|
group = "DEFAULT";
|
|
2693
2713
|
}
|
|
2694
|
-
const cacheData =
|
|
2714
|
+
const cacheData = api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
|
|
2695
2715
|
if (cacheData) {
|
|
2696
2716
|
return cacheData;
|
|
2697
2717
|
}
|
|
@@ -2740,7 +2760,7 @@
|
|
|
2740
2760
|
throw ("Type ID is required.");
|
|
2741
2761
|
}
|
|
2742
2762
|
const key = GetCacheKey(typeId);
|
|
2743
|
-
const cacheData =
|
|
2763
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
2744
2764
|
if (cacheData) {
|
|
2745
2765
|
return cacheData;
|
|
2746
2766
|
}
|
|
@@ -2763,7 +2783,7 @@
|
|
|
2763
2783
|
EntityRelationType.Delete = Delete;
|
|
2764
2784
|
function GetList(api, reqParams) {
|
|
2765
2785
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2766
|
-
const cacheData =
|
|
2786
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2767
2787
|
if (cacheData) {
|
|
2768
2788
|
return cacheData;
|
|
2769
2789
|
}
|
|
@@ -2857,7 +2877,7 @@
|
|
|
2857
2877
|
throw ("Entity ID is required.");
|
|
2858
2878
|
}
|
|
2859
2879
|
params = Object.assign({ typeId: "", oneWayOnly: false, loadEntityData: false }, params);
|
|
2860
|
-
const cacheData =
|
|
2880
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId, params), reqParams);
|
|
2861
2881
|
if (cacheData) {
|
|
2862
2882
|
return cacheData;
|
|
2863
2883
|
}
|
|
@@ -2885,7 +2905,7 @@
|
|
|
2885
2905
|
if (!entityId) {
|
|
2886
2906
|
throw ("Entity ID is required.");
|
|
2887
2907
|
}
|
|
2888
|
-
const cacheData =
|
|
2908
|
+
const cacheData = api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
|
|
2889
2909
|
if (cacheData) {
|
|
2890
2910
|
return cacheData;
|
|
2891
2911
|
}
|
|
@@ -2908,7 +2928,7 @@
|
|
|
2908
2928
|
throw ("Source ID and Source Key are required.");
|
|
2909
2929
|
}
|
|
2910
2930
|
const key = GetCacheKey(sourceId, sourceKey);
|
|
2911
|
-
const cacheData =
|
|
2931
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
2912
2932
|
if (cacheData) {
|
|
2913
2933
|
return cacheData;
|
|
2914
2934
|
}
|
|
@@ -2927,7 +2947,7 @@
|
|
|
2927
2947
|
const reqs = [];
|
|
2928
2948
|
for (let i = 0; i < sourceKeys.length; i++) {
|
|
2929
2949
|
const sourceKey = sourceKeys[i];
|
|
2930
|
-
const cacheData =
|
|
2950
|
+
const cacheData = api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
|
|
2931
2951
|
if (cacheData) {
|
|
2932
2952
|
reqs.push(cacheData);
|
|
2933
2953
|
}
|
|
@@ -3017,7 +3037,7 @@
|
|
|
3017
3037
|
const reqs = [];
|
|
3018
3038
|
for (let i = 0; i < tagIds.length; i++) {
|
|
3019
3039
|
const tagId = tagIds[i];
|
|
3020
|
-
const cacheData =
|
|
3040
|
+
const cacheData = api.GetCacheItem(GetCacheKey(tagId), reqParams);
|
|
3021
3041
|
if (cacheData) {
|
|
3022
3042
|
reqs.push(cacheData);
|
|
3023
3043
|
}
|
|
@@ -3057,7 +3077,7 @@
|
|
|
3057
3077
|
EntityTag.GetListByIds = GetListByIds;
|
|
3058
3078
|
function GetList(api, entityTypeId, reqParams) {
|
|
3059
3079
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3060
|
-
const cacheData =
|
|
3080
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
|
|
3061
3081
|
if (cacheData) {
|
|
3062
3082
|
return cacheData;
|
|
3063
3083
|
}
|
|
@@ -3126,7 +3146,7 @@
|
|
|
3126
3146
|
throw ("Type ID is required.");
|
|
3127
3147
|
}
|
|
3128
3148
|
const key = GetCacheKey(typeId);
|
|
3129
|
-
const cacheData =
|
|
3149
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
3130
3150
|
if (cacheData) {
|
|
3131
3151
|
return cacheData;
|
|
3132
3152
|
}
|
|
@@ -3149,7 +3169,7 @@
|
|
|
3149
3169
|
EntityType.Delete = Delete;
|
|
3150
3170
|
function GetList(api, reqParams) {
|
|
3151
3171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3152
|
-
const cacheData =
|
|
3172
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
3153
3173
|
if (cacheData) {
|
|
3154
3174
|
return cacheData;
|
|
3155
3175
|
}
|
|
@@ -3764,7 +3784,7 @@
|
|
|
3764
3784
|
EntityCoords.GetCacheKey = GetCacheKey;
|
|
3765
3785
|
function GetEntityCoords(api, entityId, reqParams) {
|
|
3766
3786
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3767
|
-
const cacheData =
|
|
3787
|
+
const cacheData = api.GetCacheItem(GetCacheKey(entityId), reqParams);
|
|
3768
3788
|
if (cacheData) {
|
|
3769
3789
|
return cacheData;
|
|
3770
3790
|
}
|
|
@@ -3887,7 +3907,7 @@
|
|
|
3887
3907
|
throw ("File ID is required.");
|
|
3888
3908
|
}
|
|
3889
3909
|
const key = GetCacheKey(fileId);
|
|
3890
|
-
const cacheData =
|
|
3910
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
3891
3911
|
if (cacheData) {
|
|
3892
3912
|
return cacheData;
|
|
3893
3913
|
}
|
|
@@ -4035,7 +4055,7 @@
|
|
|
4035
4055
|
throw ("Program ID is required.");
|
|
4036
4056
|
}
|
|
4037
4057
|
const key = GetCacheKey(programId);
|
|
4038
|
-
const cacheData =
|
|
4058
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4039
4059
|
if (cacheData) {
|
|
4040
4060
|
return cacheData;
|
|
4041
4061
|
}
|
|
@@ -4047,7 +4067,7 @@
|
|
|
4047
4067
|
ProgramKey.Get = Get;
|
|
4048
4068
|
function GetList(api, reqParams) {
|
|
4049
4069
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4050
|
-
const cacheData =
|
|
4070
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
4051
4071
|
if (cacheData) {
|
|
4052
4072
|
return cacheData;
|
|
4053
4073
|
}
|
|
@@ -4136,7 +4156,7 @@
|
|
|
4136
4156
|
if (!tilesetId) {
|
|
4137
4157
|
throw ("Tileset ID is required.");
|
|
4138
4158
|
}
|
|
4139
|
-
const cacheData =
|
|
4159
|
+
const cacheData = api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
|
|
4140
4160
|
if (cacheData) {
|
|
4141
4161
|
return cacheData;
|
|
4142
4162
|
}
|
|
@@ -4148,7 +4168,7 @@
|
|
|
4148
4168
|
Tileset.Get = Get;
|
|
4149
4169
|
function GetList(api, reqParams) {
|
|
4150
4170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4151
|
-
const cacheData =
|
|
4171
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
4152
4172
|
if (cacheData) {
|
|
4153
4173
|
return cacheData;
|
|
4154
4174
|
}
|
|
@@ -4309,7 +4329,7 @@
|
|
|
4309
4329
|
if (!accountId || !tilesetId) {
|
|
4310
4330
|
throw ("Client account ID and tileset ID are required.");
|
|
4311
4331
|
}
|
|
4312
|
-
const cacheData =
|
|
4332
|
+
const cacheData = api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
|
|
4313
4333
|
if (cacheData) {
|
|
4314
4334
|
return cacheData;
|
|
4315
4335
|
}
|
|
@@ -4324,7 +4344,7 @@
|
|
|
4324
4344
|
if (!accountId) {
|
|
4325
4345
|
throw ("Client account ID is required.");
|
|
4326
4346
|
}
|
|
4327
|
-
const cacheData =
|
|
4347
|
+
const cacheData = api.GetCacheItem(GetCacheKey(accountId), reqParams);
|
|
4328
4348
|
if (cacheData) {
|
|
4329
4349
|
return cacheData;
|
|
4330
4350
|
}
|
|
@@ -4475,7 +4495,7 @@
|
|
|
4475
4495
|
throw ("View ID and Bookmark ID are required.");
|
|
4476
4496
|
}
|
|
4477
4497
|
const key = GetCacheKey(viewId, bookmarkId);
|
|
4478
|
-
const cacheData =
|
|
4498
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4479
4499
|
if (cacheData) {
|
|
4480
4500
|
return cacheData;
|
|
4481
4501
|
}
|
|
@@ -4501,7 +4521,7 @@
|
|
|
4501
4521
|
if (!viewId) {
|
|
4502
4522
|
throw ("View ID is required.");
|
|
4503
4523
|
}
|
|
4504
|
-
const cacheData =
|
|
4524
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(viewId), reqParams);
|
|
4505
4525
|
if (cacheData) {
|
|
4506
4526
|
return cacheData;
|
|
4507
4527
|
}
|
|
@@ -4581,7 +4601,7 @@
|
|
|
4581
4601
|
throw ("View ID is required.");
|
|
4582
4602
|
}
|
|
4583
4603
|
const key = GetCacheKey(viewId);
|
|
4584
|
-
const cacheData =
|
|
4604
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4585
4605
|
if (cacheData) {
|
|
4586
4606
|
return cacheData;
|
|
4587
4607
|
}
|
|
@@ -4593,7 +4613,7 @@
|
|
|
4593
4613
|
ProjectView.Get = Get;
|
|
4594
4614
|
function GetList(api, reqParams) {
|
|
4595
4615
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4596
|
-
const cacheData =
|
|
4616
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
4597
4617
|
if (cacheData) {
|
|
4598
4618
|
return cacheData;
|
|
4599
4619
|
}
|
|
@@ -4879,7 +4899,7 @@
|
|
|
4879
4899
|
EPointType["Cylinder"] = "CYLINDER";
|
|
4880
4900
|
})(EPointType = Style.EPointType || (Style.EPointType = {}));
|
|
4881
4901
|
function GetList(api, reqParams) {
|
|
4882
|
-
const cacheData =
|
|
4902
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
4883
4903
|
if (cacheData) {
|
|
4884
4904
|
return cacheData;
|
|
4885
4905
|
}
|
|
@@ -4900,7 +4920,7 @@
|
|
|
4900
4920
|
if (!id) {
|
|
4901
4921
|
throw ("Style ID is required.");
|
|
4902
4922
|
}
|
|
4903
|
-
const cacheData =
|
|
4923
|
+
const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
4904
4924
|
if (cacheData) {
|
|
4905
4925
|
return cacheData;
|
|
4906
4926
|
}
|
|
@@ -4993,7 +5013,7 @@
|
|
|
4993
5013
|
throw ("Session ID is required.");
|
|
4994
5014
|
}
|
|
4995
5015
|
const key = GetCacheKey(sessionId);
|
|
4996
|
-
const cacheData =
|
|
5016
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4997
5017
|
if (cacheData) {
|
|
4998
5018
|
return cacheData;
|
|
4999
5019
|
}
|
|
@@ -5163,7 +5183,7 @@
|
|
|
5163
5183
|
if (!id) {
|
|
5164
5184
|
throw ("ID is required.");
|
|
5165
5185
|
}
|
|
5166
|
-
const cacheData =
|
|
5186
|
+
const cacheData = api.GetCacheItem(GetCacheKey(id, accountId), reqParams);
|
|
5167
5187
|
if (cacheData) {
|
|
5168
5188
|
return cacheData;
|
|
5169
5189
|
}
|
|
@@ -5220,7 +5240,7 @@
|
|
|
5220
5240
|
if (!email) {
|
|
5221
5241
|
throw ("Email is required.");
|
|
5222
5242
|
}
|
|
5223
|
-
const cacheData =
|
|
5243
|
+
const cacheData = api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
|
|
5224
5244
|
if (cacheData) {
|
|
5225
5245
|
return cacheData;
|
|
5226
5246
|
}
|
|
@@ -5238,7 +5258,7 @@
|
|
|
5238
5258
|
if (!exclusive) {
|
|
5239
5259
|
exclusive = false;
|
|
5240
5260
|
}
|
|
5241
|
-
const cacheData = exclusive
|
|
5261
|
+
const cacheData = exclusive ? null : api.GetCacheItem(GetListCacheKey(accountId), reqParams);
|
|
5242
5262
|
if (cacheData) {
|
|
5243
5263
|
return cacheData;
|
|
5244
5264
|
}
|
|
@@ -5379,7 +5399,7 @@
|
|
|
5379
5399
|
AccessToken.GetListCacheKey = GetListCacheKey;
|
|
5380
5400
|
function GetList(api, accountId, reqParams) {
|
|
5381
5401
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5382
|
-
const cacheData =
|
|
5402
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(accountId), reqParams);
|
|
5383
5403
|
if (cacheData) {
|
|
5384
5404
|
return cacheData;
|
|
5385
5405
|
}
|
|
@@ -5656,7 +5676,7 @@
|
|
|
5656
5676
|
if (!pageIndex) {
|
|
5657
5677
|
pageIndex = 0;
|
|
5658
5678
|
}
|
|
5659
|
-
const cacheData =
|
|
5679
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
|
|
5660
5680
|
if (cacheData) {
|
|
5661
5681
|
return cacheData;
|
|
5662
5682
|
}
|
|
@@ -5686,7 +5706,7 @@
|
|
|
5686
5706
|
ImportedFile.GetList = GetList;
|
|
5687
5707
|
function Get(api, fileId, reqParams) {
|
|
5688
5708
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5689
|
-
const cacheData =
|
|
5709
|
+
const cacheData = api.GetCacheItem(GetCacheKey(fileId), reqParams);
|
|
5690
5710
|
if (cacheData) {
|
|
5691
5711
|
return cacheData;
|
|
5692
5712
|
}
|