bruce-models 6.1.3 → 6.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 +24 -37
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +24 -37
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/client-file/client-file.js +16 -9
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/entity/entity-lod-category.js +7 -27
- package/dist/lib/entity/entity-lod-category.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/client-file/client-file.d.ts +5 -2
- package/dist/types/entity/entity-lod-category.d.ts +0 -11
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -6852,26 +6852,22 @@
|
|
|
6852
6852
|
if (!api) {
|
|
6853
6853
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
6854
6854
|
}
|
|
6855
|
-
const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
6856
|
-
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
6857
|
-
return cache.data;
|
|
6858
|
-
}
|
|
6859
6855
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
6860
6856
|
try {
|
|
6861
|
-
|
|
6857
|
+
// No singular?
|
|
6858
|
+
const data = yield GetList({
|
|
6859
|
+
api,
|
|
6860
|
+
req: reqParams
|
|
6861
|
+
});
|
|
6862
|
+
const category = data.categories.find((c) => c.Key.toLowerCase() === id.toLowerCase());
|
|
6862
6863
|
res({
|
|
6863
|
-
category:
|
|
6864
|
+
category: category
|
|
6864
6865
|
});
|
|
6865
6866
|
}
|
|
6866
6867
|
catch (e) {
|
|
6867
6868
|
rej(e);
|
|
6868
6869
|
}
|
|
6869
6870
|
}));
|
|
6870
|
-
api.SetCacheItem({
|
|
6871
|
-
key: GetCacheKey(id),
|
|
6872
|
-
value: req,
|
|
6873
|
-
req: reqParams
|
|
6874
|
-
});
|
|
6875
6871
|
return req;
|
|
6876
6872
|
});
|
|
6877
6873
|
}
|
|
@@ -6890,7 +6886,6 @@
|
|
|
6890
6886
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
6891
6887
|
}
|
|
6892
6888
|
yield api.DELETE(`lodCategory/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
6893
|
-
api.Cache.Remove(GetCacheKey(id));
|
|
6894
6889
|
api.Cache.Remove(GetListCacheKey());
|
|
6895
6890
|
});
|
|
6896
6891
|
}
|
|
@@ -6910,7 +6905,6 @@
|
|
|
6910
6905
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
6911
6906
|
}
|
|
6912
6907
|
const res = yield api.POST(`lodCategory/${data.Key}`, data, exports.Api.PrepReqParams(reqParams));
|
|
6913
|
-
api.Cache.Remove(GetCacheKey(data.Key));
|
|
6914
6908
|
api.Cache.Remove(GetListCacheKey());
|
|
6915
6909
|
return {
|
|
6916
6910
|
category: res
|
|
@@ -6918,20 +6912,6 @@
|
|
|
6918
6912
|
});
|
|
6919
6913
|
}
|
|
6920
6914
|
EntityLodCategory.Update = Update;
|
|
6921
|
-
/**
|
|
6922
|
-
* Returns cache identifier for an entity lod category record.
|
|
6923
|
-
* Example: {
|
|
6924
|
-
* const api: BruceApi.Api = ...;
|
|
6925
|
-
* const key = GetCacheKey("abc");
|
|
6926
|
-
* api.Cache.Remove(key);
|
|
6927
|
-
* }
|
|
6928
|
-
* @param id
|
|
6929
|
-
* @returns
|
|
6930
|
-
*/
|
|
6931
|
-
function GetCacheKey(id) {
|
|
6932
|
-
return exports.Api.ECacheKey.LodCategory + exports.Api.ECacheKey.Id + id;
|
|
6933
|
-
}
|
|
6934
|
-
EntityLodCategory.GetCacheKey = GetCacheKey;
|
|
6935
6915
|
/**
|
|
6936
6916
|
* Returns cache identifier for a list of entity lod categories.
|
|
6937
6917
|
* Example: {
|
|
@@ -8898,7 +8878,7 @@
|
|
|
8898
8878
|
});
|
|
8899
8879
|
// TODO: Check if we can add it to the request like the small file upload.
|
|
8900
8880
|
if ((clientFile === null || clientFile === void 0 ? void 0 : clientFile.ID) && purpose) {
|
|
8901
|
-
yield UpdatePurpose({
|
|
8881
|
+
yield ClientFile.UpdatePurpose({
|
|
8902
8882
|
api,
|
|
8903
8883
|
fileId: clientFile.ID,
|
|
8904
8884
|
purpose,
|
|
@@ -8935,23 +8915,30 @@
|
|
|
8935
8915
|
* Updates the purpose of a client file.
|
|
8936
8916
|
* @param params
|
|
8937
8917
|
*/
|
|
8938
|
-
function
|
|
8918
|
+
function Update(params) {
|
|
8939
8919
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8940
|
-
let { api, fileId, purpose, req: reqParams } = params;
|
|
8920
|
+
let { api, fileId, purpose, layerIds, req: reqParams, dataEntityId } = params;
|
|
8941
8921
|
if (!api) {
|
|
8942
8922
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
8943
8923
|
}
|
|
8944
|
-
|
|
8945
|
-
|
|
8924
|
+
const data = {};
|
|
8925
|
+
if (layerIds != null) {
|
|
8926
|
+
data["Layer.ID"] = layerIds;
|
|
8946
8927
|
}
|
|
8947
|
-
|
|
8948
|
-
Purpose:
|
|
8949
|
-
}
|
|
8928
|
+
if (purpose != null) {
|
|
8929
|
+
data.Purpose = purpose ? purpose : "";
|
|
8930
|
+
}
|
|
8931
|
+
if (dataEntityId != null) {
|
|
8932
|
+
data["Data.Entity.ID"] = dataEntityId ? dataEntityId : "";
|
|
8933
|
+
}
|
|
8934
|
+
yield api.POST(`file/${fileId}/details`, data, exports.Api.PrepReqParams(reqParams));
|
|
8950
8935
|
const cacheKey = GetCacheKey(fileId);
|
|
8951
8936
|
api.Cache.RemoveByContains(cacheKey);
|
|
8952
8937
|
});
|
|
8953
8938
|
}
|
|
8954
|
-
ClientFile.
|
|
8939
|
+
ClientFile.Update = Update;
|
|
8940
|
+
// @deprecated. Use Update instead.
|
|
8941
|
+
ClientFile.UpdatePurpose = Update;
|
|
8955
8942
|
/**
|
|
8956
8943
|
* Uploads a temp file.
|
|
8957
8944
|
* This will return a temp file ID.
|
|
@@ -15561,7 +15548,7 @@
|
|
|
15561
15548
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
15562
15549
|
|
|
15563
15550
|
// This is updated with the package.json version on build.
|
|
15564
|
-
const VERSION = "6.1.
|
|
15551
|
+
const VERSION = "6.1.5";
|
|
15565
15552
|
|
|
15566
15553
|
exports.VERSION = VERSION;
|
|
15567
15554
|
exports.AbstractApi = AbstractApi;
|