bruce-models 6.4.0 → 6.4.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.
@@ -3539,6 +3539,11 @@
3539
3539
  })(exports.EntityHistoricData || (exports.EntityHistoricData = {}));
3540
3540
 
3541
3541
  (function (Entity) {
3542
+ let EOutlineKind;
3543
+ (function (EOutlineKind) {
3544
+ EOutlineKind["Entity"] = "ENTITY";
3545
+ EOutlineKind["Attribute"] = "ATTRIBUTE";
3546
+ })(EOutlineKind = Entity.EOutlineKind || (Entity.EOutlineKind = {}));
3542
3547
  /**
3543
3548
  * Returns an entity record for the given entity id.
3544
3549
  * @param params
@@ -3595,7 +3600,7 @@
3595
3600
  expand += "attachment";
3596
3601
  }
3597
3602
  if (expand) {
3598
- urlParams.append("$expand", expand);
3603
+ urlParams.append("Expand", expand);
3599
3604
  }
3600
3605
  if (expandLODs) {
3601
3606
  urlParams.append("LODType", "*");
@@ -4034,7 +4039,7 @@
4034
4039
  value = checkForValue(["Bruce", "AssemblyWorldPosition"].concat(path.slice(1)));
4035
4040
  }
4036
4041
  else if (path[0] == "tilesetID") {
4037
- value = checkForValue(["Bruce", "TilesetIDs"].concat(path.slice(1)));
4042
+ value = checkForValue(["Bruce", "Tileset.ID"].concat(path.slice(1)));
4038
4043
  }
4039
4044
  else if (path[0] == "geometryRadius") {
4040
4045
  value = checkForValue(["Bruce", "GeometryRadius"].concat(path.slice(1)));
@@ -4062,7 +4067,7 @@
4062
4067
  else if (path[1] == "AssemblyWorldPosition") {
4063
4068
  value = checkForValue(["worldPosition"].concat(path.slice(2)));
4064
4069
  }
4065
- else if (path[1] == "TilesetIDs") {
4070
+ else if (path[1] == "Tileset.ID") {
4066
4071
  value = checkForValue(["tilesetID"].concat(path.slice(2)));
4067
4072
  }
4068
4073
  else if (path[1] == "GeometryRadius") {
@@ -4261,6 +4266,8 @@
4261
4266
  let totalCount;
4262
4267
  let entities = [];
4263
4268
  let imports;
4269
+ let sources;
4270
+ let entityTypeSources;
4264
4271
  let nextPage;
4265
4272
  let nextPageUrl;
4266
4273
  if (analysis || expandRelations || (viaCdn && api.GetCdnBaseUrl())) {
@@ -4287,17 +4294,33 @@
4287
4294
  if (body.PageSize) {
4288
4295
  urlParams.set("PageSize", String(body.PageSize));
4289
4296
  }
4297
+ let expand = "";
4290
4298
  if (expandRelations) {
4291
- urlParams.append("$expand", "relation");
4299
+ if (expand.length) {
4300
+ expand += ",";
4301
+ }
4302
+ expand += "Relation";
4292
4303
  }
4293
4304
  if (expandLocation) {
4294
- urlParams.append("$expand", "location");
4305
+ if (expand.length) {
4306
+ expand += ",";
4307
+ }
4308
+ expand += "Location";
4295
4309
  }
4296
4310
  if (expandImports) {
4297
- urlParams.append("$expand", "import");
4311
+ if (expand.length) {
4312
+ expand += ",";
4313
+ }
4314
+ expand += "Import";
4298
4315
  }
4299
4316
  if (expandSources) {
4300
- urlParams.append("ExpandSources", "true");
4317
+ if (expand.length) {
4318
+ expand += ",";
4319
+ }
4320
+ expand += "Source";
4321
+ }
4322
+ if (expand.length) {
4323
+ urlParams.append("Expand", expand);
4301
4324
  }
4302
4325
  if (historicKey) {
4303
4326
  urlParams.set("historicKey", historicKey);
@@ -4322,8 +4345,6 @@
4322
4345
  }
4323
4346
  urlParams.set("hasMigrated", String(Boolean(migrated)));
4324
4347
  let url = analysis ? "entities/summary" : "entities";
4325
- // Adding url params here because this will avoid making them encoded.
4326
- // Our API isn't decoding them properly so $expand is not being recognized.
4327
4348
  url += "?" + urlParams.toString();
4328
4349
  const urlStr = api.ConstructUrl({
4329
4350
  cdn: !analysis && viaCdn,
@@ -4335,19 +4356,34 @@
4335
4356
  }
4336
4357
  totalCount = data.TotalCount;
4337
4358
  imports = data.Imports;
4359
+ sources = data.Source;
4360
+ entityTypeSources = data["EntityType.Source"];
4338
4361
  nextPage = data.NextPage;
4339
4362
  nextPageUrl = data.NextPageURL;
4340
4363
  }
4341
4364
  else {
4342
4365
  const urlParams = new URLSearchParams();
4366
+ let expand = "";
4343
4367
  if (expandRelations) {
4344
- urlParams.append("$expand", "relation");
4368
+ if (expand.length) {
4369
+ expand += ",";
4370
+ }
4371
+ expand += "Relation";
4345
4372
  }
4346
4373
  if (expandLocation) {
4347
- urlParams.append("$expand", "location");
4374
+ if (expand.length) {
4375
+ expand += ",";
4376
+ }
4377
+ expand += "Location";
4348
4378
  }
4349
4379
  if (expandImports) {
4350
- urlParams.append("$expand", "import");
4380
+ if (expand.length) {
4381
+ expand += ",";
4382
+ }
4383
+ expand += "Import";
4384
+ }
4385
+ if (expand.length) {
4386
+ urlParams.append("Expand", expand);
4351
4387
  }
4352
4388
  if (schemaId) {
4353
4389
  urlParams.set("schema", schemaId);
@@ -4400,6 +4436,8 @@
4400
4436
  imports = data.Imports;
4401
4437
  nextPage = data.NextPage;
4402
4438
  nextPageUrl = data.NextPageURL;
4439
+ sources = data.Source;
4440
+ entityTypeSources = data["EntityType.Source"];
4403
4441
  }
4404
4442
  // Callback to get the next page.
4405
4443
  let getNextPage;
@@ -4424,7 +4462,9 @@
4424
4462
  imports: data.Imports,
4425
4463
  nextPage: data.NextPage,
4426
4464
  nextPageUrl: data.NextPageURL,
4427
- getNextPage: nextPageUrl ? getNextPage : null
4465
+ getNextPage: nextPageUrl ? getNextPage : null,
4466
+ sources: data.Source,
4467
+ entityTypeSources: data["EntityType.Source"]
4428
4468
  };
4429
4469
  });
4430
4470
  }
@@ -4434,7 +4474,9 @@
4434
4474
  imports,
4435
4475
  nextPage,
4436
4476
  nextPageUrl,
4437
- getNextPage
4477
+ getNextPage,
4478
+ sources,
4479
+ entityTypeSources
4438
4480
  };
4439
4481
  });
4440
4482
  }
@@ -15673,7 +15715,7 @@
15673
15715
  })(exports.Tracking || (exports.Tracking = {}));
15674
15716
 
15675
15717
  // This is updated with the package.json version on build.
15676
- const VERSION = "6.4.0";
15718
+ const VERSION = "6.4.2";
15677
15719
 
15678
15720
  exports.VERSION = VERSION;
15679
15721
  exports.AbstractApi = AbstractApi;