bruce-models 3.9.6 → 3.9.7

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.
@@ -3330,7 +3330,7 @@ var Entity;
3330
3330
  */
3331
3331
  function GetListByIds(params) {
3332
3332
  return __awaiter(this, void 0, void 0, function* () {
3333
- let { api, entityIds, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint } = params;
3333
+ let { api, entityIds, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint } = params;
3334
3334
  if (!entityIds.length) {
3335
3335
  throw ("Entity IDs are required.");
3336
3336
  }
@@ -3376,9 +3376,14 @@ var Entity;
3376
3376
  if (historicPoint) {
3377
3377
  reqData["historicPoint"] = historicPoint;
3378
3378
  }
3379
+ const urlParams = new URLSearchParams();
3380
+ if (schemaId) {
3381
+ urlParams.set("schema", schemaId);
3382
+ }
3383
+ const url = `entities?${urlParams.toString()}`;
3379
3384
  const reqs = [];
3380
3385
  if (reqIds.length > 0) {
3381
- const req = api.POST("entities", reqData, Api.PrepReqParams(reqParams));
3386
+ const req = api.POST(url, reqData, Api.PrepReqParams(reqParams));
3382
3387
  for (let i = 0; i < reqIds.length; i++) {
3383
3388
  const entityId = reqIds[i];
3384
3389
  const key = GetCacheKey({
@@ -3389,7 +3394,8 @@ var Entity;
3389
3394
  historicFrom: historicFrom,
3390
3395
  historicKey: historicKey,
3391
3396
  historicTo: historicTo,
3392
- historicPoint: historicPoint
3397
+ historicPoint: historicPoint,
3398
+ schemaId: schemaId
3393
3399
  });
3394
3400
  const prom = new Promise((res) => __awaiter(this, void 0, void 0, function* () {
3395
3401
  try {
@@ -3674,7 +3680,7 @@ var Entity;
3674
3680
  function GetList(params) {
3675
3681
  var _a;
3676
3682
  return __awaiter(this, void 0, void 0, function* () {
3677
- let { api, filter, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
3683
+ let { api, filter, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
3678
3684
  if (!api) {
3679
3685
  api = ENVIRONMENT.Api().GetBruceApi();
3680
3686
  }
@@ -3767,6 +3773,9 @@ var Entity;
3767
3773
  if (historicPoint) {
3768
3774
  urlParams.set("historicPoint", historicPoint);
3769
3775
  }
3776
+ if (schemaId) {
3777
+ urlParams.set("schema", schemaId);
3778
+ }
3770
3779
  const urlStr = url.toString() + "?" + urlParams.toString();
3771
3780
  const data = yield api.get(urlStr, Api.PrepReqParams(reqParams));
3772
3781
  if (!analysis) {
@@ -3780,6 +3789,9 @@ var Entity;
3780
3789
  if (expandRelations) {
3781
3790
  urlParams.append("$expand", "relation");
3782
3791
  }
3792
+ if (schemaId) {
3793
+ urlParams.set("schema", schemaId);
3794
+ }
3783
3795
  const urlStr = url.toString() + "?" + urlParams.toString();
3784
3796
  const data = yield api.post(urlStr, body, Api.PrepReqParams(reqParams));
3785
3797
  if (!analysis) {
@@ -3796,7 +3808,8 @@ var Entity;
3796
3808
  entityTypeId: filter.entityTypeId,
3797
3809
  historicFrom: historicFrom,
3798
3810
  historicKey: historicKey,
3799
- historicTo: historicTo
3811
+ historicTo: historicTo,
3812
+ schemaId: schemaId
3800
3813
  }),
3801
3814
  value: {
3802
3815
  entity: entity
@@ -11517,7 +11530,7 @@ var DataSource;
11517
11530
  })(DataSource || (DataSource = {}));
11518
11531
 
11519
11532
  // This is updated with the package.json version on build.
11520
- const VERSION = "3.9.6";
11533
+ const VERSION = "3.9.7";
11521
11534
 
11522
11535
  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 };
11523
11536
  //# sourceMappingURL=bruce-models.es5.js.map