bruce-models 4.3.0 → 4.3.2

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.
@@ -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
- const reqUrl = `entity/${data.Bruce.ID}/?dataoverride=${override}&BruceEntityType=${data.Bruce["EntityType.ID"]}`;
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]);
@@ -3799,7 +3804,8 @@ var Entity;
3799
3804
  const { entity: data } = yield Get({
3800
3805
  api,
3801
3806
  entityId,
3802
- entityTypeId: typeId
3807
+ entityTypeId: typeId,
3808
+ migrated: true
3803
3809
  });
3804
3810
  entity = data;
3805
3811
  }
@@ -3835,7 +3841,7 @@ var Entity;
3835
3841
  function GetList(params) {
3836
3842
  var _a;
3837
3843
  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;
3844
+ let { api, filter, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
3839
3845
  if (!api) {
3840
3846
  api = ENVIRONMENT.Api().GetBruceApi();
3841
3847
  }
@@ -3953,6 +3959,7 @@ var Entity;
3953
3959
  if (schemaId) {
3954
3960
  urlParams.set("schema", schemaId);
3955
3961
  }
3962
+ urlParams.set("hasMigrated", String(Boolean(migrated)));
3956
3963
  const urlStr = url.toString();
3957
3964
  const data = yield api.get(urlStr, Api.PrepReqParams(reqParams));
3958
3965
  if (!analysis) {
@@ -3972,6 +3979,7 @@ var Entity;
3972
3979
  if (schemaId) {
3973
3980
  urlParams.set("schema", schemaId);
3974
3981
  }
3982
+ urlParams.set("hasMigrated", String(Boolean(migrated)));
3975
3983
  const urlStr = url.toString();
3976
3984
  const data = yield api.post(urlStr, body, Api.PrepReqParams(reqParams));
3977
3985
  if (!analysis) {
@@ -7644,7 +7652,8 @@ var Comment;
7644
7652
  pageIndex: filter.index == null ? 0 : filter.index,
7645
7653
  entityTypeConditions: reqFilter,
7646
7654
  orderBy: "lastUpdateTime"
7647
- }
7655
+ },
7656
+ migrated: true
7648
7657
  })).entities;
7649
7658
  return {
7650
7659
  comments: records
@@ -13332,7 +13341,7 @@ var DataSource;
13332
13341
  })(DataSource || (DataSource = {}));
13333
13342
 
13334
13343
  // This is updated with the package.json version on build.
13335
- const VERSION = "4.3.0";
13344
+ const VERSION = "4.3.2";
13336
13345
 
13337
13346
  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
13347
  //# sourceMappingURL=bruce-models.es5.js.map