bruce-models 6.1.6 → 6.1.8
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 +49 -4
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +49 -4
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +4 -0
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity.js +44 -3
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/client-file/client-file.d.ts +2 -0
- package/dist/types/data-lab/data-lab.d.ts +1 -0
- package/dist/types/entity/entity.d.ts +6 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -3477,18 +3477,24 @@
|
|
|
3477
3477
|
*/
|
|
3478
3478
|
function Get(params) {
|
|
3479
3479
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3480
|
-
let { api, entityId, scenario, migrated, schemaId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3480
|
+
let { api, entityId, scenario, migrated, schemaId, req: reqParams, expandLocation, expandRelations, expandAttachments, expandLODs, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3481
3481
|
if (!entityId) {
|
|
3482
3482
|
throw ("Entity ID is required.");
|
|
3483
3483
|
}
|
|
3484
3484
|
if (!api) {
|
|
3485
3485
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
3486
3486
|
}
|
|
3487
|
+
if (migrated == null || migrated == undefined) {
|
|
3488
|
+
// Changed to default = true. 18th April 2025.
|
|
3489
|
+
migrated = true;
|
|
3490
|
+
}
|
|
3487
3491
|
const key = GetCacheKey({
|
|
3488
3492
|
entityId,
|
|
3489
3493
|
entityTypeId,
|
|
3490
3494
|
expandLocation,
|
|
3491
3495
|
expandRelations,
|
|
3496
|
+
expandAttachments,
|
|
3497
|
+
expandLODs,
|
|
3492
3498
|
historicFrom,
|
|
3493
3499
|
historicKey,
|
|
3494
3500
|
historicTo,
|
|
@@ -3513,9 +3519,18 @@
|
|
|
3513
3519
|
}
|
|
3514
3520
|
expand += "relation";
|
|
3515
3521
|
}
|
|
3522
|
+
if (expandAttachments) {
|
|
3523
|
+
if (expand) {
|
|
3524
|
+
expand += ",";
|
|
3525
|
+
}
|
|
3526
|
+
expand += "attachment";
|
|
3527
|
+
}
|
|
3516
3528
|
if (expand) {
|
|
3517
3529
|
urlParams.append("$expand", expand);
|
|
3518
3530
|
}
|
|
3531
|
+
if (expandLODs) {
|
|
3532
|
+
urlParams.append("LODType", "*");
|
|
3533
|
+
}
|
|
3519
3534
|
if (entityTypeId) {
|
|
3520
3535
|
urlParams.append("BruceEntityType", entityTypeId);
|
|
3521
3536
|
}
|
|
@@ -3563,18 +3578,24 @@
|
|
|
3563
3578
|
*/
|
|
3564
3579
|
function GetListByIds(params) {
|
|
3565
3580
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3566
|
-
let { api, entityIds, scenario, migrated, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources, expandImports, maxSearchTimeSec } = params;
|
|
3581
|
+
let { api, entityIds, scenario, migrated, schemaId, req: reqParams, expandAttachments, expandLODs, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources, expandImports, maxSearchTimeSec } = params;
|
|
3567
3582
|
if (!entityIds.length) {
|
|
3568
3583
|
throw ("Entity IDs are required.");
|
|
3569
3584
|
}
|
|
3570
3585
|
if (!api) {
|
|
3571
3586
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
3572
3587
|
}
|
|
3588
|
+
if (migrated == null || migrated == undefined) {
|
|
3589
|
+
// Changed to default = true. 18th April 2025.
|
|
3590
|
+
migrated = true;
|
|
3591
|
+
}
|
|
3573
3592
|
const cacheKeyData = {
|
|
3574
3593
|
expandLocation,
|
|
3575
3594
|
expandRelations,
|
|
3576
3595
|
expandImports,
|
|
3577
3596
|
expandSources,
|
|
3597
|
+
expandAttachments,
|
|
3598
|
+
expandLODs,
|
|
3578
3599
|
entityTypeId: null,
|
|
3579
3600
|
historicFrom: historicFrom,
|
|
3580
3601
|
historicKey: historicKey,
|
|
@@ -3623,6 +3644,17 @@
|
|
|
3623
3644
|
reqData["Expand"] = "import";
|
|
3624
3645
|
}
|
|
3625
3646
|
}
|
|
3647
|
+
if (expandAttachments) {
|
|
3648
|
+
if (reqData["Expand"]) {
|
|
3649
|
+
reqData["Expand"] += ",attachment";
|
|
3650
|
+
}
|
|
3651
|
+
else {
|
|
3652
|
+
reqData["Expand"] = "attachment";
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
if (expandLODs) {
|
|
3656
|
+
reqData["LODType"] = "*";
|
|
3657
|
+
}
|
|
3626
3658
|
if (expandSources) {
|
|
3627
3659
|
reqData["ExpandSources"] = true;
|
|
3628
3660
|
}
|
|
@@ -3749,6 +3781,10 @@
|
|
|
3749
3781
|
var _a, _b, _c, _d, _e;
|
|
3750
3782
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3751
3783
|
let { api, entity: data, entities, override, req: reqParams, migrated } = params;
|
|
3784
|
+
if (migrated == null || migrated == undefined) {
|
|
3785
|
+
// Changed to default = true. 18th April 2025.
|
|
3786
|
+
migrated = true;
|
|
3787
|
+
}
|
|
3752
3788
|
// Bulk save.
|
|
3753
3789
|
if (entities === null || entities === void 0 ? void 0 : entities.length) {
|
|
3754
3790
|
// If the Entities don't have IDs, then they must have a Type ID.
|
|
@@ -4082,6 +4118,10 @@
|
|
|
4082
4118
|
if (!api) {
|
|
4083
4119
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
4084
4120
|
}
|
|
4121
|
+
if (migrated == null || migrated == undefined) {
|
|
4122
|
+
// Changed to default = true. 18th April 2025.
|
|
4123
|
+
migrated = true;
|
|
4124
|
+
}
|
|
4085
4125
|
let requestFilter = {};
|
|
4086
4126
|
if (!filter) {
|
|
4087
4127
|
filter = {};
|
|
@@ -4366,7 +4406,7 @@
|
|
|
4366
4406
|
* @returns
|
|
4367
4407
|
*/
|
|
4368
4408
|
function GetCacheKey(params) {
|
|
4369
|
-
let { entityId, scenario: scenarioId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
4409
|
+
let { entityId, scenario: scenarioId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandAttachments, expandLODs, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
4370
4410
|
if (!scenarioId) {
|
|
4371
4411
|
scenarioId = 0;
|
|
4372
4412
|
}
|
|
@@ -4391,6 +4431,7 @@
|
|
|
4391
4431
|
}
|
|
4392
4432
|
let key = `${exports.Api.ECacheKey.Entity}${exports.Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${schemaId}`;
|
|
4393
4433
|
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}${String(Boolean(expandImports))}`;
|
|
4434
|
+
key += `${String(Boolean(expandAttachments))}${String(Boolean(expandLODs))}`;
|
|
4394
4435
|
key += `${exports.Api.ECacheKey.EntityHistoricData}${exports.Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
|
|
4395
4436
|
key += `${exports.Api.ECacheKey.Id}${scenarioId}`;
|
|
4396
4437
|
return key;
|
|
@@ -14259,6 +14300,10 @@
|
|
|
14259
14300
|
if (!load) {
|
|
14260
14301
|
load = 50;
|
|
14261
14302
|
}
|
|
14303
|
+
if (migrated == null || migrated == undefined) {
|
|
14304
|
+
// Changed to default = true. 18th April 2025.
|
|
14305
|
+
migrated = true;
|
|
14306
|
+
}
|
|
14262
14307
|
let url = null;
|
|
14263
14308
|
if (analysis) {
|
|
14264
14309
|
url = "entities/datalab/getMatchesCount/PrimarySelection";
|
|
@@ -15548,7 +15593,7 @@
|
|
|
15548
15593
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
15549
15594
|
|
|
15550
15595
|
// This is updated with the package.json version on build.
|
|
15551
|
-
const VERSION = "6.1.
|
|
15596
|
+
const VERSION = "6.1.8";
|
|
15552
15597
|
|
|
15553
15598
|
exports.VERSION = VERSION;
|
|
15554
15599
|
exports.AbstractApi = AbstractApi;
|