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.es5.js
CHANGED
|
@@ -74,6 +74,7 @@ var Api;
|
|
|
74
74
|
EEnv["UAT"] = "UAT";
|
|
75
75
|
EEnv["PROD"] = "PROD";
|
|
76
76
|
})(EEnv = Api.EEnv || (Api.EEnv = {}));
|
|
77
|
+
Api.DEFAULT_CACHE_STATE = true;
|
|
77
78
|
/**
|
|
78
79
|
* Prepares a string to be included in a url.
|
|
79
80
|
* @param str
|
|
@@ -135,7 +136,7 @@ var AnnDocument;
|
|
|
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 @@ var AnnDocument;
|
|
|
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
|
}
|
|
@@ -198,7 +199,7 @@ var CustomForm;
|
|
|
198
199
|
if (!id) {
|
|
199
200
|
throw ("Id is required.");
|
|
200
201
|
}
|
|
201
|
-
const cacheData =
|
|
202
|
+
const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
202
203
|
if (cacheData) {
|
|
203
204
|
return cacheData;
|
|
204
205
|
}
|
|
@@ -221,7 +222,7 @@ var CustomForm;
|
|
|
221
222
|
function GetList(api, typeId, reqParams) {
|
|
222
223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
224
|
const url = typeId ? `entityType/${typeId}/customForms` : "customForms";
|
|
224
|
-
const cacheData =
|
|
225
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(typeId), reqParams);
|
|
225
226
|
if (cacheData) {
|
|
226
227
|
return cacheData;
|
|
227
228
|
}
|
|
@@ -459,6 +460,16 @@ class AbstractApi {
|
|
|
459
460
|
this.Cache = new CacheControl();
|
|
460
461
|
this.ssidHeader = ssidHeader;
|
|
461
462
|
}
|
|
463
|
+
GetCacheItem(key, reqParams) {
|
|
464
|
+
let noCache = reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache;
|
|
465
|
+
if (noCache == null) {
|
|
466
|
+
noCache = Api.DEFAULT_CACHE_STATE;
|
|
467
|
+
}
|
|
468
|
+
if (noCache) {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
471
|
+
return this.Cache.Get(key);
|
|
472
|
+
}
|
|
462
473
|
GetSessionId() {
|
|
463
474
|
return this.ssid;
|
|
464
475
|
}
|
|
@@ -660,7 +671,7 @@ var Account;
|
|
|
660
671
|
];
|
|
661
672
|
function Get(api, id, reqParams) {
|
|
662
673
|
return __awaiter(this, void 0, void 0, function* () {
|
|
663
|
-
const cacheData =
|
|
674
|
+
const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
664
675
|
if (cacheData) {
|
|
665
676
|
return cacheData;
|
|
666
677
|
}
|
|
@@ -672,7 +683,7 @@ var Account;
|
|
|
672
683
|
Account.Get = Get;
|
|
673
684
|
function GetRelatedList(api, reqParams) {
|
|
674
685
|
return __awaiter(this, void 0, void 0, function* () {
|
|
675
|
-
const cacheData =
|
|
686
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
|
|
676
687
|
if (cacheData) {
|
|
677
688
|
return cacheData;
|
|
678
689
|
}
|
|
@@ -694,7 +705,7 @@ var Account;
|
|
|
694
705
|
Account.GetRelatedList = GetRelatedList;
|
|
695
706
|
function GetAppSettings(api, id, appId, reqParams) {
|
|
696
707
|
return __awaiter(this, void 0, void 0, function* () {
|
|
697
|
-
const cacheData =
|
|
708
|
+
const cacheData = api.GetCacheItem(GetCacheKey(id, appId), reqParams);
|
|
698
709
|
if (cacheData) {
|
|
699
710
|
return cacheData;
|
|
700
711
|
}
|
|
@@ -1438,7 +1449,7 @@ var Entity;
|
|
|
1438
1449
|
throw ("Entity ID is required.");
|
|
1439
1450
|
}
|
|
1440
1451
|
const key = GetCacheKey(entityId);
|
|
1441
|
-
const cacheData =
|
|
1452
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
1442
1453
|
if (cacheData) {
|
|
1443
1454
|
return cacheData;
|
|
1444
1455
|
}
|
|
@@ -1458,7 +1469,7 @@ var Entity;
|
|
|
1458
1469
|
for (let i = 0; i < entityIds.length; i++) {
|
|
1459
1470
|
const entityId = entityIds[i];
|
|
1460
1471
|
const key = GetCacheKey(entityId);
|
|
1461
|
-
const cacheData =
|
|
1472
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
1462
1473
|
if (cacheData) {
|
|
1463
1474
|
reqs.push(cacheData);
|
|
1464
1475
|
}
|
|
@@ -1863,31 +1874,40 @@ var Calculator;
|
|
|
1863
1874
|
Calculator.GetColor = GetColor;
|
|
1864
1875
|
function GetMappingValue(value, entity) {
|
|
1865
1876
|
const attrPath = parseLegacyPath(value.field);
|
|
1866
|
-
const eValue =
|
|
1877
|
+
const eValue = Entity.GetValue(entity, attrPath);
|
|
1878
|
+
const isValueNum = !isNaN(+eValue);
|
|
1867
1879
|
for (let i = 0; i < value.values.length; i++) {
|
|
1868
1880
|
const option = value.values[i];
|
|
1869
1881
|
const mapValue = option.fieldValue;
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
if (mapSplit.length == 2) {
|
|
1875
|
-
const min = mapSplit[0];
|
|
1876
|
-
const max = mapSplit[1];
|
|
1877
|
-
if (min != "") {
|
|
1878
|
-
if (eValue < +min) {
|
|
1879
|
-
continue;
|
|
1880
|
-
}
|
|
1882
|
+
const isMapValueNum = !isNaN(+mapValue);
|
|
1883
|
+
if (isValueNum && isMapValueNum) {
|
|
1884
|
+
if (+mapValue == +eValue) {
|
|
1885
|
+
return option.appliedValue;
|
|
1881
1886
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1887
|
+
const mapSplit = mapValue.split("-");
|
|
1888
|
+
if (mapSplit.length == 2) {
|
|
1889
|
+
const min = mapSplit[0];
|
|
1890
|
+
const max = mapSplit[1];
|
|
1891
|
+
if (min != "") {
|
|
1892
|
+
if (+eValue < +min) {
|
|
1893
|
+
continue;
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
if (max != "") {
|
|
1897
|
+
if (+eValue > +max) {
|
|
1898
|
+
continue;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
if (min == "" && max == "") {
|
|
1884
1902
|
continue;
|
|
1885
1903
|
}
|
|
1904
|
+
return option.appliedValue;
|
|
1886
1905
|
}
|
|
1887
|
-
|
|
1888
|
-
|
|
1906
|
+
}
|
|
1907
|
+
else {
|
|
1908
|
+
if (mapValue == eValue) {
|
|
1909
|
+
return option.appliedValue;
|
|
1889
1910
|
}
|
|
1890
|
-
return option.appliedValue;
|
|
1891
1911
|
}
|
|
1892
1912
|
}
|
|
1893
1913
|
return null;
|
|
@@ -2428,7 +2448,7 @@ var EntityAttachmentType;
|
|
|
2428
2448
|
EntityAttachmentType.Update = Update;
|
|
2429
2449
|
function GetList(api, reqParams) {
|
|
2430
2450
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2431
|
-
const cacheData =
|
|
2451
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2432
2452
|
if (cacheData) {
|
|
2433
2453
|
return cacheData;
|
|
2434
2454
|
}
|
|
@@ -2528,7 +2548,7 @@ var EntityAttachment;
|
|
|
2528
2548
|
if (!entityId) {
|
|
2529
2549
|
throw ("Entity ID is required.");
|
|
2530
2550
|
}
|
|
2531
|
-
const cacheData =
|
|
2551
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
2532
2552
|
if (cacheData) {
|
|
2533
2553
|
return cacheData;
|
|
2534
2554
|
}
|
|
@@ -2603,7 +2623,7 @@ var EntityComment;
|
|
|
2603
2623
|
if (!entityId) {
|
|
2604
2624
|
throw ("Entity ID is required.");
|
|
2605
2625
|
}
|
|
2606
|
-
const cacheData =
|
|
2626
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
2607
2627
|
if (cacheData) {
|
|
2608
2628
|
return cacheData;
|
|
2609
2629
|
}
|
|
@@ -2666,7 +2686,7 @@ var EntityLink;
|
|
|
2666
2686
|
if (!entityId) {
|
|
2667
2687
|
throw ("Entity ID is required.");
|
|
2668
2688
|
}
|
|
2669
|
-
const cacheData =
|
|
2689
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
2670
2690
|
if (cacheData) {
|
|
2671
2691
|
return cacheData;
|
|
2672
2692
|
}
|
|
@@ -2724,7 +2744,7 @@ var EntityLod;
|
|
|
2724
2744
|
if (!url) {
|
|
2725
2745
|
throw ("Url is required.");
|
|
2726
2746
|
}
|
|
2727
|
-
const cacheData =
|
|
2747
|
+
const cacheData = api.GetCacheItem(GetCacheKey(url), reqParams);
|
|
2728
2748
|
if (cacheData) {
|
|
2729
2749
|
return cacheData;
|
|
2730
2750
|
}
|
|
@@ -2765,7 +2785,7 @@ var EntityLod;
|
|
|
2765
2785
|
if (!group) {
|
|
2766
2786
|
group = "DEFAULT";
|
|
2767
2787
|
}
|
|
2768
|
-
const cacheData =
|
|
2788
|
+
const cacheData = api.GetCacheItem(GetTypeListKey(typeId, group), reqParams);
|
|
2769
2789
|
if (cacheData) {
|
|
2770
2790
|
return cacheData;
|
|
2771
2791
|
}
|
|
@@ -2819,7 +2839,7 @@ var EntityRelationType;
|
|
|
2819
2839
|
throw ("Type ID is required.");
|
|
2820
2840
|
}
|
|
2821
2841
|
const key = GetCacheKey(typeId);
|
|
2822
|
-
const cacheData =
|
|
2842
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
2823
2843
|
if (cacheData) {
|
|
2824
2844
|
return cacheData;
|
|
2825
2845
|
}
|
|
@@ -2842,7 +2862,7 @@ var EntityRelationType;
|
|
|
2842
2862
|
EntityRelationType.Delete = Delete;
|
|
2843
2863
|
function GetList(api, reqParams) {
|
|
2844
2864
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2845
|
-
const cacheData =
|
|
2865
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2846
2866
|
if (cacheData) {
|
|
2847
2867
|
return cacheData;
|
|
2848
2868
|
}
|
|
@@ -2942,7 +2962,7 @@ var EntityRelation;
|
|
|
2942
2962
|
throw ("Entity ID is required.");
|
|
2943
2963
|
}
|
|
2944
2964
|
params = Object.assign({ typeId: "", oneWayOnly: false, loadEntityData: false }, params);
|
|
2945
|
-
const cacheData =
|
|
2965
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityId, params), reqParams);
|
|
2946
2966
|
if (cacheData) {
|
|
2947
2967
|
return cacheData;
|
|
2948
2968
|
}
|
|
@@ -2970,7 +2990,7 @@ var EntityRelation;
|
|
|
2970
2990
|
if (!entityId) {
|
|
2971
2991
|
throw ("Entity ID is required.");
|
|
2972
2992
|
}
|
|
2973
|
-
const cacheData =
|
|
2993
|
+
const cacheData = api.GetCacheItem(GetEntityCacheKey(entityId), reqParams);
|
|
2974
2994
|
if (cacheData) {
|
|
2975
2995
|
return cacheData;
|
|
2976
2996
|
}
|
|
@@ -2999,7 +3019,7 @@ var EntitySource;
|
|
|
2999
3019
|
throw ("Source ID and Source Key are required.");
|
|
3000
3020
|
}
|
|
3001
3021
|
const key = GetCacheKey(sourceId, sourceKey);
|
|
3002
|
-
const cacheData =
|
|
3022
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
3003
3023
|
if (cacheData) {
|
|
3004
3024
|
return cacheData;
|
|
3005
3025
|
}
|
|
@@ -3018,7 +3038,7 @@ var EntitySource;
|
|
|
3018
3038
|
const reqs = [];
|
|
3019
3039
|
for (let i = 0; i < sourceKeys.length; i++) {
|
|
3020
3040
|
const sourceKey = sourceKeys[i];
|
|
3021
|
-
const cacheData =
|
|
3041
|
+
const cacheData = api.GetCacheItem(GetCacheKey(sourceId, sourceKey), reqParams);
|
|
3022
3042
|
if (cacheData) {
|
|
3023
3043
|
reqs.push(cacheData);
|
|
3024
3044
|
}
|
|
@@ -3114,7 +3134,7 @@ var EntityTag;
|
|
|
3114
3134
|
const reqs = [];
|
|
3115
3135
|
for (let i = 0; i < tagIds.length; i++) {
|
|
3116
3136
|
const tagId = tagIds[i];
|
|
3117
|
-
const cacheData =
|
|
3137
|
+
const cacheData = api.GetCacheItem(GetCacheKey(tagId), reqParams);
|
|
3118
3138
|
if (cacheData) {
|
|
3119
3139
|
reqs.push(cacheData);
|
|
3120
3140
|
}
|
|
@@ -3154,7 +3174,7 @@ var EntityTag;
|
|
|
3154
3174
|
EntityTag.GetListByIds = GetListByIds;
|
|
3155
3175
|
function GetList(api, entityTypeId, reqParams) {
|
|
3156
3176
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3157
|
-
const cacheData =
|
|
3177
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
|
|
3158
3178
|
if (cacheData) {
|
|
3159
3179
|
return cacheData;
|
|
3160
3180
|
}
|
|
@@ -3229,7 +3249,7 @@ var EntityType;
|
|
|
3229
3249
|
throw ("Type ID is required.");
|
|
3230
3250
|
}
|
|
3231
3251
|
const key = GetCacheKey(typeId);
|
|
3232
|
-
const cacheData =
|
|
3252
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
3233
3253
|
if (cacheData) {
|
|
3234
3254
|
return cacheData;
|
|
3235
3255
|
}
|
|
@@ -3252,7 +3272,7 @@ var EntityType;
|
|
|
3252
3272
|
EntityType.Delete = Delete;
|
|
3253
3273
|
function GetList(api, reqParams) {
|
|
3254
3274
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3255
|
-
const cacheData =
|
|
3275
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
3256
3276
|
if (cacheData) {
|
|
3257
3277
|
return cacheData;
|
|
3258
3278
|
}
|
|
@@ -3881,7 +3901,7 @@ var EntityCoords;
|
|
|
3881
3901
|
EntityCoords.GetCacheKey = GetCacheKey;
|
|
3882
3902
|
function GetEntityCoords(api, entityId, reqParams) {
|
|
3883
3903
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3884
|
-
const cacheData =
|
|
3904
|
+
const cacheData = api.GetCacheItem(GetCacheKey(entityId), reqParams);
|
|
3885
3905
|
if (cacheData) {
|
|
3886
3906
|
return cacheData;
|
|
3887
3907
|
}
|
|
@@ -4010,7 +4030,7 @@ var ClientFile;
|
|
|
4010
4030
|
throw ("File ID is required.");
|
|
4011
4031
|
}
|
|
4012
4032
|
const key = GetCacheKey(fileId);
|
|
4013
|
-
const cacheData =
|
|
4033
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4014
4034
|
if (cacheData) {
|
|
4015
4035
|
return cacheData;
|
|
4016
4036
|
}
|
|
@@ -4163,7 +4183,7 @@ var ProgramKey;
|
|
|
4163
4183
|
throw ("Program ID is required.");
|
|
4164
4184
|
}
|
|
4165
4185
|
const key = GetCacheKey(programId);
|
|
4166
|
-
const cacheData =
|
|
4186
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4167
4187
|
if (cacheData) {
|
|
4168
4188
|
return cacheData;
|
|
4169
4189
|
}
|
|
@@ -4175,7 +4195,7 @@ var ProgramKey;
|
|
|
4175
4195
|
ProgramKey.Get = Get;
|
|
4176
4196
|
function GetList(api, reqParams) {
|
|
4177
4197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4178
|
-
const cacheData =
|
|
4198
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
4179
4199
|
if (cacheData) {
|
|
4180
4200
|
return cacheData;
|
|
4181
4201
|
}
|
|
@@ -4276,7 +4296,7 @@ var Tileset;
|
|
|
4276
4296
|
if (!tilesetId) {
|
|
4277
4297
|
throw ("Tileset ID is required.");
|
|
4278
4298
|
}
|
|
4279
|
-
const cacheData =
|
|
4299
|
+
const cacheData = api.GetCacheItem(GetCacheKey(tilesetId, loadFiles), reqParams);
|
|
4280
4300
|
if (cacheData) {
|
|
4281
4301
|
return cacheData;
|
|
4282
4302
|
}
|
|
@@ -4288,7 +4308,7 @@ var Tileset;
|
|
|
4288
4308
|
Tileset.Get = Get;
|
|
4289
4309
|
function GetList(api, reqParams) {
|
|
4290
4310
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4291
|
-
const cacheData =
|
|
4311
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
4292
4312
|
if (cacheData) {
|
|
4293
4313
|
return cacheData;
|
|
4294
4314
|
}
|
|
@@ -4449,7 +4469,7 @@ var Tileset;
|
|
|
4449
4469
|
if (!accountId || !tilesetId) {
|
|
4450
4470
|
throw ("Client account ID and tileset ID are required.");
|
|
4451
4471
|
}
|
|
4452
|
-
const cacheData =
|
|
4472
|
+
const cacheData = api.GetCacheItem(GetCacheKey(accountId, tilesetId), reqParams);
|
|
4453
4473
|
if (cacheData) {
|
|
4454
4474
|
return cacheData;
|
|
4455
4475
|
}
|
|
@@ -4464,7 +4484,7 @@ var Tileset;
|
|
|
4464
4484
|
if (!accountId) {
|
|
4465
4485
|
throw ("Client account ID is required.");
|
|
4466
4486
|
}
|
|
4467
|
-
const cacheData =
|
|
4487
|
+
const cacheData = api.GetCacheItem(GetCacheKey(accountId), reqParams);
|
|
4468
4488
|
if (cacheData) {
|
|
4469
4489
|
return cacheData;
|
|
4470
4490
|
}
|
|
@@ -4628,7 +4648,7 @@ var ProjectViewBookmark;
|
|
|
4628
4648
|
throw ("View ID and Bookmark ID are required.");
|
|
4629
4649
|
}
|
|
4630
4650
|
const key = GetCacheKey(viewId, bookmarkId);
|
|
4631
|
-
const cacheData =
|
|
4651
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4632
4652
|
if (cacheData) {
|
|
4633
4653
|
return cacheData;
|
|
4634
4654
|
}
|
|
@@ -4654,7 +4674,7 @@ var ProjectViewBookmark;
|
|
|
4654
4674
|
if (!viewId) {
|
|
4655
4675
|
throw ("View ID is required.");
|
|
4656
4676
|
}
|
|
4657
|
-
const cacheData =
|
|
4677
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(viewId), reqParams);
|
|
4658
4678
|
if (cacheData) {
|
|
4659
4679
|
return cacheData;
|
|
4660
4680
|
}
|
|
@@ -4740,7 +4760,7 @@ var ProjectView;
|
|
|
4740
4760
|
throw ("View ID is required.");
|
|
4741
4761
|
}
|
|
4742
4762
|
const key = GetCacheKey(viewId);
|
|
4743
|
-
const cacheData =
|
|
4763
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
4744
4764
|
if (cacheData) {
|
|
4745
4765
|
return cacheData;
|
|
4746
4766
|
}
|
|
@@ -4752,7 +4772,7 @@ var ProjectView;
|
|
|
4752
4772
|
ProjectView.Get = Get;
|
|
4753
4773
|
function GetList(api, reqParams) {
|
|
4754
4774
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4755
|
-
const cacheData =
|
|
4775
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
4756
4776
|
if (cacheData) {
|
|
4757
4777
|
return cacheData;
|
|
4758
4778
|
}
|
|
@@ -5059,7 +5079,7 @@ var Style;
|
|
|
5059
5079
|
EPointType["Cylinder"] = "CYLINDER";
|
|
5060
5080
|
})(EPointType = Style.EPointType || (Style.EPointType = {}));
|
|
5061
5081
|
function GetList(api, reqParams) {
|
|
5062
|
-
const cacheData =
|
|
5082
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
5063
5083
|
if (cacheData) {
|
|
5064
5084
|
return cacheData;
|
|
5065
5085
|
}
|
|
@@ -5080,7 +5100,7 @@ var Style;
|
|
|
5080
5100
|
if (!id) {
|
|
5081
5101
|
throw ("Style ID is required.");
|
|
5082
5102
|
}
|
|
5083
|
-
const cacheData =
|
|
5103
|
+
const cacheData = api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
5084
5104
|
if (cacheData) {
|
|
5085
5105
|
return cacheData;
|
|
5086
5106
|
}
|
|
@@ -5182,7 +5202,7 @@ var Session;
|
|
|
5182
5202
|
throw ("Session ID is required.");
|
|
5183
5203
|
}
|
|
5184
5204
|
const key = GetCacheKey(sessionId);
|
|
5185
|
-
const cacheData =
|
|
5205
|
+
const cacheData = api.GetCacheItem(key, reqParams);
|
|
5186
5206
|
if (cacheData) {
|
|
5187
5207
|
return cacheData;
|
|
5188
5208
|
}
|
|
@@ -5365,7 +5385,7 @@ var User;
|
|
|
5365
5385
|
if (!id) {
|
|
5366
5386
|
throw ("ID is required.");
|
|
5367
5387
|
}
|
|
5368
|
-
const cacheData =
|
|
5388
|
+
const cacheData = api.GetCacheItem(GetCacheKey(id, accountId), reqParams);
|
|
5369
5389
|
if (cacheData) {
|
|
5370
5390
|
return cacheData;
|
|
5371
5391
|
}
|
|
@@ -5422,7 +5442,7 @@ var User;
|
|
|
5422
5442
|
if (!email) {
|
|
5423
5443
|
throw ("Email is required.");
|
|
5424
5444
|
}
|
|
5425
|
-
const cacheData =
|
|
5445
|
+
const cacheData = api.GetCacheItem(GetEmailCacheKey(email, accountId), reqParams);
|
|
5426
5446
|
if (cacheData) {
|
|
5427
5447
|
return cacheData;
|
|
5428
5448
|
}
|
|
@@ -5440,7 +5460,7 @@ var User;
|
|
|
5440
5460
|
if (!exclusive) {
|
|
5441
5461
|
exclusive = false;
|
|
5442
5462
|
}
|
|
5443
|
-
const cacheData = exclusive
|
|
5463
|
+
const cacheData = exclusive ? null : api.GetCacheItem(GetListCacheKey(accountId), reqParams);
|
|
5444
5464
|
if (cacheData) {
|
|
5445
5465
|
return cacheData;
|
|
5446
5466
|
}
|
|
@@ -5581,7 +5601,7 @@ var User;
|
|
|
5581
5601
|
AccessToken.GetListCacheKey = GetListCacheKey;
|
|
5582
5602
|
function GetList(api, accountId, reqParams) {
|
|
5583
5603
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5584
|
-
const cacheData =
|
|
5604
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(accountId), reqParams);
|
|
5585
5605
|
if (cacheData) {
|
|
5586
5606
|
return cacheData;
|
|
5587
5607
|
}
|
|
@@ -5870,7 +5890,7 @@ var ImportedFile;
|
|
|
5870
5890
|
if (!pageIndex) {
|
|
5871
5891
|
pageIndex = 0;
|
|
5872
5892
|
}
|
|
5873
|
-
const cacheData =
|
|
5893
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(type, pageIndex), reqParams);
|
|
5874
5894
|
if (cacheData) {
|
|
5875
5895
|
return cacheData;
|
|
5876
5896
|
}
|
|
@@ -5900,7 +5920,7 @@ var ImportedFile;
|
|
|
5900
5920
|
ImportedFile.GetList = GetList;
|
|
5901
5921
|
function Get(api, fileId, reqParams) {
|
|
5902
5922
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5903
|
-
const cacheData =
|
|
5923
|
+
const cacheData = api.GetCacheItem(GetCacheKey(fileId), reqParams);
|
|
5904
5924
|
if (cacheData) {
|
|
5905
5925
|
return cacheData;
|
|
5906
5926
|
}
|