bruce-models 4.0.4 → 4.0.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 +35 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +35 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-attachment-type.js +34 -5
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-attachment-type.d.ts +14 -2
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -4981,21 +4981,50 @@ var EntityAttachmentType;
|
|
|
4981
4981
|
EType["Photo"] = "photo";
|
|
4982
4982
|
EType["Document"] = "document";
|
|
4983
4983
|
})(EType = EntityAttachmentType.EType || (EntityAttachmentType.EType = {}));
|
|
4984
|
+
/**
|
|
4985
|
+
* Gets an attachment type record by ID.
|
|
4986
|
+
* @param params
|
|
4987
|
+
* @returns
|
|
4988
|
+
*/
|
|
4989
|
+
function Get(params) {
|
|
4990
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4991
|
+
let { api, attachmentTypeId, req: reqParams } = params;
|
|
4992
|
+
if (!api) {
|
|
4993
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
4994
|
+
}
|
|
4995
|
+
if (!attachmentTypeId) {
|
|
4996
|
+
throw ("Type ID is required.");
|
|
4997
|
+
}
|
|
4998
|
+
reqParams = Api.PrepReqParams(reqParams);
|
|
4999
|
+
const cacheData = api.GetCacheItem(GetCacheKey(attachmentTypeId), reqParams);
|
|
5000
|
+
if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.found) {
|
|
5001
|
+
return cacheData.data;
|
|
5002
|
+
}
|
|
5003
|
+
const prom = api.GET(`entityAttachmentType/${attachmentTypeId}`, Api.PrepReqParams(reqParams));
|
|
5004
|
+
api.SetCacheItem({
|
|
5005
|
+
key: GetCacheKey(attachmentTypeId),
|
|
5006
|
+
value: prom,
|
|
5007
|
+
req: reqParams
|
|
5008
|
+
});
|
|
5009
|
+
return prom;
|
|
5010
|
+
});
|
|
5011
|
+
}
|
|
5012
|
+
EntityAttachmentType.Get = Get;
|
|
4984
5013
|
/**
|
|
4985
5014
|
* Deletes an attachment type.
|
|
4986
5015
|
* @param params
|
|
4987
5016
|
*/
|
|
4988
5017
|
function Delete(params) {
|
|
4989
5018
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4990
|
-
let { api, attachmentTypeId
|
|
5019
|
+
let { api, attachmentTypeId, req: reqParams } = params;
|
|
4991
5020
|
if (!api) {
|
|
4992
5021
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
4993
5022
|
}
|
|
4994
|
-
if (!
|
|
5023
|
+
if (!attachmentTypeId) {
|
|
4995
5024
|
throw ("Type ID is required.");
|
|
4996
5025
|
}
|
|
4997
|
-
yield api.DELETE(`entityAttachmentType/${
|
|
4998
|
-
api.Cache.Remove(GetCacheKey(
|
|
5026
|
+
yield api.DELETE(`entityAttachmentType/${attachmentTypeId}`, Api.PrepReqParams(reqParams));
|
|
5027
|
+
api.Cache.Remove(GetCacheKey(attachmentTypeId));
|
|
4999
5028
|
api.Cache.Remove(GetListCacheKey());
|
|
5000
5029
|
});
|
|
5001
5030
|
}
|
|
@@ -5030,7 +5059,7 @@ var EntityAttachmentType;
|
|
|
5030
5059
|
*/
|
|
5031
5060
|
function GetList(params) {
|
|
5032
5061
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5033
|
-
let { api, reqParams } = params;
|
|
5062
|
+
let { api, req: reqParams } = params;
|
|
5034
5063
|
if (!api) {
|
|
5035
5064
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
5036
5065
|
}
|
|
@@ -11662,7 +11691,7 @@ var DataSource;
|
|
|
11662
11691
|
})(DataSource || (DataSource = {}));
|
|
11663
11692
|
|
|
11664
11693
|
// This is updated with the package.json version on build.
|
|
11665
|
-
const VERSION = "4.0.
|
|
11694
|
+
const VERSION = "4.0.5";
|
|
11666
11695
|
|
|
11667
11696
|
export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
11668
11697
|
//# sourceMappingURL=bruce-models.es5.js.map
|