bruce-models 4.3.0 → 4.3.1
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 +13 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +13 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +12 -5
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity.d.ts +4 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -3295,7 +3295,7 @@ var Entity;
|
|
|
3295
3295
|
*/
|
|
3296
3296
|
function Get(params) {
|
|
3297
3297
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3298
|
-
let { api, entityId, schemaId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3298
|
+
let { api, entityId, migrated, schemaId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3299
3299
|
if (!entityId) {
|
|
3300
3300
|
throw ("Entity ID is required.");
|
|
3301
3301
|
}
|
|
@@ -3351,6 +3351,7 @@ var Entity;
|
|
|
3351
3351
|
if (schemaId) {
|
|
3352
3352
|
urlParams.set("schema", schemaId);
|
|
3353
3353
|
}
|
|
3354
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3354
3355
|
const data = yield api.GET(`entity/${entityId}?${urlParams.toString()}`, Api.PrepReqParams(reqParams));
|
|
3355
3356
|
res({
|
|
3356
3357
|
entity: data
|
|
@@ -3376,7 +3377,7 @@ var Entity;
|
|
|
3376
3377
|
*/
|
|
3377
3378
|
function GetListByIds(params) {
|
|
3378
3379
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3379
|
-
let { api, entityIds, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources } = params;
|
|
3380
|
+
let { api, entityIds, migrated, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources } = params;
|
|
3380
3381
|
if (!entityIds.length) {
|
|
3381
3382
|
throw ("Entity IDs are required.");
|
|
3382
3383
|
}
|
|
@@ -3434,6 +3435,7 @@ var Entity;
|
|
|
3434
3435
|
if (schemaId) {
|
|
3435
3436
|
urlParams.set("schema", schemaId);
|
|
3436
3437
|
}
|
|
3438
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3437
3439
|
const url = `entities?${urlParams.toString()}`;
|
|
3438
3440
|
const reqs = [];
|
|
3439
3441
|
if (reqIds.length > 0) {
|
|
@@ -3544,7 +3546,7 @@ var Entity;
|
|
|
3544
3546
|
function Update(params) {
|
|
3545
3547
|
var _a, _b;
|
|
3546
3548
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3547
|
-
let { api, entity: data, override, req: reqParams } = params;
|
|
3549
|
+
let { api, entity: data, override, req: reqParams, migrated } = params;
|
|
3548
3550
|
if (!((_a = data === null || data === void 0 ? void 0 : data.Bruce) === null || _a === void 0 ? void 0 : _a["EntityType.ID"])) {
|
|
3549
3551
|
throw ("Entity Type ID is required.");
|
|
3550
3552
|
}
|
|
@@ -3554,7 +3556,10 @@ var Entity;
|
|
|
3554
3556
|
if (!((_b = data === null || data === void 0 ? void 0 : data.Bruce) === null || _b === void 0 ? void 0 : _b.ID)) {
|
|
3555
3557
|
data.Bruce = Object.assign(Object.assign({}, data.Bruce), { ID: ObjectUtils.UId() });
|
|
3556
3558
|
}
|
|
3557
|
-
|
|
3559
|
+
let reqUrl = `entity/${data.Bruce.ID}/?dataoverride=${override}&BruceEntityType=${data.Bruce["EntityType.ID"]}`;
|
|
3560
|
+
if (migrated) {
|
|
3561
|
+
reqUrl += "&hasMigrated=true";
|
|
3562
|
+
}
|
|
3558
3563
|
const res = yield api.POST(reqUrl, data, Api.PrepReqParams(reqParams));
|
|
3559
3564
|
api.Cache.RemoveByContains(GetContainsKey(data.Bruce.ID));
|
|
3560
3565
|
EntityHistoricData.ClearCacheByEntityIds(api, [data.Bruce.ID]);
|
|
@@ -3835,7 +3840,7 @@ var Entity;
|
|
|
3835
3840
|
function GetList(params) {
|
|
3836
3841
|
var _a;
|
|
3837
3842
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3838
|
-
let { api, filter, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
|
|
3843
|
+
let { api, filter, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
|
|
3839
3844
|
if (!api) {
|
|
3840
3845
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
3841
3846
|
}
|
|
@@ -3953,6 +3958,7 @@ var Entity;
|
|
|
3953
3958
|
if (schemaId) {
|
|
3954
3959
|
urlParams.set("schema", schemaId);
|
|
3955
3960
|
}
|
|
3961
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3956
3962
|
const urlStr = url.toString();
|
|
3957
3963
|
const data = yield api.get(urlStr, Api.PrepReqParams(reqParams));
|
|
3958
3964
|
if (!analysis) {
|
|
@@ -3972,6 +3978,7 @@ var Entity;
|
|
|
3972
3978
|
if (schemaId) {
|
|
3973
3979
|
urlParams.set("schema", schemaId);
|
|
3974
3980
|
}
|
|
3981
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3975
3982
|
const urlStr = url.toString();
|
|
3976
3983
|
const data = yield api.post(urlStr, body, Api.PrepReqParams(reqParams));
|
|
3977
3984
|
if (!analysis) {
|
|
@@ -13332,7 +13339,7 @@ var DataSource;
|
|
|
13332
13339
|
})(DataSource || (DataSource = {}));
|
|
13333
13340
|
|
|
13334
13341
|
// This is updated with the package.json version on build.
|
|
13335
|
-
const VERSION = "4.3.
|
|
13342
|
+
const VERSION = "4.3.1";
|
|
13336
13343
|
|
|
13337
13344
|
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, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
13338
13345
|
//# sourceMappingURL=bruce-models.es5.js.map
|