bruce-models 7.1.17 → 7.1.19
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 +28 -9
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +28 -9
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-type-trigger.js +14 -5
- package/dist/lib/entity/entity-type-trigger.js.map +1 -1
- package/dist/lib/entity/entity.js +13 -3
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-type-trigger.d.ts +3 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -3925,7 +3925,15 @@ var Entity;
|
|
|
3925
3925
|
});
|
|
3926
3926
|
const cache = api.GetCacheItem(key, reqParams);
|
|
3927
3927
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
3928
|
-
|
|
3928
|
+
const cachedData = cache.data;
|
|
3929
|
+
if (cachedData instanceof Promise || (typeof cachedData === "object" && typeof cachedData.then === "function")) {
|
|
3930
|
+
return cachedData;
|
|
3931
|
+
}
|
|
3932
|
+
else {
|
|
3933
|
+
return Promise.resolve({
|
|
3934
|
+
entity: cachedData
|
|
3935
|
+
});
|
|
3936
|
+
}
|
|
3929
3937
|
}
|
|
3930
3938
|
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
3931
3939
|
try {
|
|
@@ -4204,8 +4212,10 @@ var Entity;
|
|
|
4204
4212
|
const req = crashRiskReqs[i];
|
|
4205
4213
|
try {
|
|
4206
4214
|
const data = yield req;
|
|
4207
|
-
|
|
4208
|
-
|
|
4215
|
+
// Handle both wrapped and direct-Entity blobs.
|
|
4216
|
+
const entity = (data === null || data === void 0 ? void 0 : data.entity) || ((data === null || data === void 0 ? void 0 : data.Bruce) ? data : null);
|
|
4217
|
+
if (entity) {
|
|
4218
|
+
entities.push(entity);
|
|
4209
4219
|
}
|
|
4210
4220
|
}
|
|
4211
4221
|
catch (e) {
|
|
@@ -8425,7 +8435,10 @@ var EntityTypeTrigger;
|
|
|
8425
8435
|
*/
|
|
8426
8436
|
function Get(params) {
|
|
8427
8437
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8428
|
-
let { api, entityTypeTriggerId, req: reqParams } = params;
|
|
8438
|
+
let { api, entityTypeId, entityTypeTriggerId, req: reqParams } = params;
|
|
8439
|
+
if (!entityTypeId) {
|
|
8440
|
+
throw ("Entity Type ID is required.");
|
|
8441
|
+
}
|
|
8429
8442
|
if (entityTypeTriggerId == null || entityTypeTriggerId === "") {
|
|
8430
8443
|
throw ("Entity Type Trigger ID is required.");
|
|
8431
8444
|
}
|
|
@@ -8439,7 +8452,7 @@ var EntityTypeTrigger;
|
|
|
8439
8452
|
}
|
|
8440
8453
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
8441
8454
|
try {
|
|
8442
|
-
const data = yield api.GET(`
|
|
8455
|
+
const data = yield api.GET(`entityType/${entityTypeId}/trigger/${entityTypeTriggerId}`, Api.PrepReqParams(reqParams));
|
|
8443
8456
|
res({
|
|
8444
8457
|
trigger: ParseResponse(data)
|
|
8445
8458
|
});
|
|
@@ -8463,14 +8476,17 @@ var EntityTypeTrigger;
|
|
|
8463
8476
|
*/
|
|
8464
8477
|
function Delete(params) {
|
|
8465
8478
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8466
|
-
let { api, entityTypeTriggerId, req: reqParams } = params;
|
|
8479
|
+
let { api, entityTypeId, entityTypeTriggerId, req: reqParams } = params;
|
|
8480
|
+
if (!entityTypeId) {
|
|
8481
|
+
throw ("Entity Type ID is required.");
|
|
8482
|
+
}
|
|
8467
8483
|
if (entityTypeTriggerId == null || entityTypeTriggerId === "") {
|
|
8468
8484
|
throw ("Entity Type Trigger ID is required.");
|
|
8469
8485
|
}
|
|
8470
8486
|
if (!api) {
|
|
8471
8487
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
8472
8488
|
}
|
|
8473
|
-
yield api.DELETE(`
|
|
8489
|
+
yield api.DELETE(`entityType/${entityTypeId}/trigger/${entityTypeTriggerId}`, Api.PrepReqParams(reqParams));
|
|
8474
8490
|
api.Cache.Remove(GetCacheKey(entityTypeTriggerId));
|
|
8475
8491
|
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
8476
8492
|
});
|
|
@@ -8483,6 +8499,9 @@ var EntityTypeTrigger;
|
|
|
8483
8499
|
function GetList(params) {
|
|
8484
8500
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8485
8501
|
let { api, entityTypeId, req: reqParams } = params;
|
|
8502
|
+
if (!entityTypeId) {
|
|
8503
|
+
throw ("Entity Type ID is required.");
|
|
8504
|
+
}
|
|
8486
8505
|
if (!api) {
|
|
8487
8506
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
8488
8507
|
}
|
|
@@ -8493,7 +8512,7 @@ var EntityTypeTrigger;
|
|
|
8493
8512
|
}
|
|
8494
8513
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
8495
8514
|
try {
|
|
8496
|
-
const data = yield api.GET(
|
|
8515
|
+
const data = yield api.GET(`entityType/${entityTypeId}/triggers`, Api.PrepReqParams(reqParams));
|
|
8497
8516
|
res({
|
|
8498
8517
|
triggers: ParseListResponse(data)
|
|
8499
8518
|
});
|
|
@@ -17442,7 +17461,7 @@ var ChangeSet;
|
|
|
17442
17461
|
})(ChangeSet || (ChangeSet = {}));
|
|
17443
17462
|
|
|
17444
17463
|
// This is updated with the package.json version on build.
|
|
17445
|
-
const VERSION = "7.1.
|
|
17464
|
+
const VERSION = "7.1.19";
|
|
17446
17465
|
|
|
17447
17466
|
export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityTypeTrigger, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient, ChangeSet };
|
|
17448
17467
|
//# sourceMappingURL=bruce-models.es5.js.map
|