bruce-models 4.6.9 → 4.7.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 +33 -7
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +33 -7
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +32 -6
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity.d.ts +5 -0
- package/dist/types/tileset/tileset.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -3088,7 +3088,7 @@
|
|
|
3088
3088
|
*/
|
|
3089
3089
|
function GetListByIds(params) {
|
|
3090
3090
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3091
|
-
let { api, entityIds, migrated, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources } = params;
|
|
3091
|
+
let { api, entityIds, migrated, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources, expandImports } = params;
|
|
3092
3092
|
if (!entityIds.length) {
|
|
3093
3093
|
throw ("Entity IDs are required.");
|
|
3094
3094
|
}
|
|
@@ -3127,6 +3127,14 @@
|
|
|
3127
3127
|
reqData["Expand"] = "location";
|
|
3128
3128
|
}
|
|
3129
3129
|
}
|
|
3130
|
+
if (expandImports) {
|
|
3131
|
+
if (reqData["Expand"]) {
|
|
3132
|
+
reqData["Expand"] += ",import";
|
|
3133
|
+
}
|
|
3134
|
+
else {
|
|
3135
|
+
reqData["Expand"] = "import";
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3130
3138
|
if (expandSources) {
|
|
3131
3139
|
reqData["ExpandSources"] = true;
|
|
3132
3140
|
}
|
|
@@ -3157,6 +3165,7 @@
|
|
|
3157
3165
|
entityId,
|
|
3158
3166
|
expandLocation,
|
|
3159
3167
|
expandRelations,
|
|
3168
|
+
expandImports,
|
|
3160
3169
|
expandSources,
|
|
3161
3170
|
entityTypeId: null,
|
|
3162
3171
|
historicFrom: historicFrom,
|
|
@@ -3552,7 +3561,7 @@
|
|
|
3552
3561
|
function GetList(params) {
|
|
3553
3562
|
var _a;
|
|
3554
3563
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3555
|
-
let { api, filter, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
|
|
3564
|
+
let { api, filter, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, expandImports, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
|
|
3556
3565
|
if (!api) {
|
|
3557
3566
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
3558
3567
|
}
|
|
@@ -3595,7 +3604,7 @@
|
|
|
3595
3604
|
historicPoint: historicPoint,
|
|
3596
3605
|
ExpandSources: expandSources
|
|
3597
3606
|
};
|
|
3598
|
-
if (expandLocation || expandRelations) {
|
|
3607
|
+
if (expandLocation || expandRelations || expandImports) {
|
|
3599
3608
|
let expand = "";
|
|
3600
3609
|
if (expandLocation) {
|
|
3601
3610
|
expand += "location";
|
|
@@ -3606,12 +3615,19 @@
|
|
|
3606
3615
|
}
|
|
3607
3616
|
expand += "relation";
|
|
3608
3617
|
}
|
|
3618
|
+
if (expandImports) {
|
|
3619
|
+
if (expand) {
|
|
3620
|
+
expand += ",";
|
|
3621
|
+
}
|
|
3622
|
+
expand += "import";
|
|
3623
|
+
}
|
|
3609
3624
|
if (expand) {
|
|
3610
3625
|
body["Expand"] = expand;
|
|
3611
3626
|
}
|
|
3612
3627
|
}
|
|
3613
3628
|
let totalCount;
|
|
3614
3629
|
let entities = [];
|
|
3630
|
+
let imports;
|
|
3615
3631
|
if (analysis || expandRelations || (viaCdn && api.GetCdnBaseUrl())) {
|
|
3616
3632
|
const urlParams = new URLSearchParams();
|
|
3617
3633
|
urlParams.set("cacheToken", String(viaCdnCacheToken ? viaCdnCacheToken : 0));
|
|
@@ -3642,6 +3658,9 @@
|
|
|
3642
3658
|
if (expandLocation) {
|
|
3643
3659
|
urlParams.append("$expand", "location");
|
|
3644
3660
|
}
|
|
3661
|
+
if (expandImports) {
|
|
3662
|
+
urlParams.append("$expand", "import");
|
|
3663
|
+
}
|
|
3645
3664
|
if (expandSources) {
|
|
3646
3665
|
urlParams.append("ExpandSources", "true");
|
|
3647
3666
|
}
|
|
@@ -3674,6 +3693,7 @@
|
|
|
3674
3693
|
entities = data.Items;
|
|
3675
3694
|
}
|
|
3676
3695
|
totalCount = data.TotalCount;
|
|
3696
|
+
imports = data.Imports;
|
|
3677
3697
|
}
|
|
3678
3698
|
else {
|
|
3679
3699
|
const urlParams = new URLSearchParams();
|
|
@@ -3683,6 +3703,9 @@
|
|
|
3683
3703
|
if (expandLocation) {
|
|
3684
3704
|
urlParams.append("$expand", "location");
|
|
3685
3705
|
}
|
|
3706
|
+
if (expandImports) {
|
|
3707
|
+
urlParams.append("$expand", "import");
|
|
3708
|
+
}
|
|
3686
3709
|
if (schemaId) {
|
|
3687
3710
|
urlParams.set("schema", schemaId);
|
|
3688
3711
|
}
|
|
@@ -3707,6 +3730,7 @@
|
|
|
3707
3730
|
entityId: id,
|
|
3708
3731
|
expandRelations,
|
|
3709
3732
|
expandLocation,
|
|
3733
|
+
expandImports,
|
|
3710
3734
|
expandSources,
|
|
3711
3735
|
entityTypeId: filter.entityTypeId,
|
|
3712
3736
|
historicFrom: historicFrom,
|
|
@@ -3722,10 +3746,12 @@
|
|
|
3722
3746
|
}
|
|
3723
3747
|
}
|
|
3724
3748
|
totalCount = data.TotalCount;
|
|
3749
|
+
imports = data.Imports;
|
|
3725
3750
|
}
|
|
3726
3751
|
return {
|
|
3727
3752
|
entities,
|
|
3728
|
-
totalCount
|
|
3753
|
+
totalCount,
|
|
3754
|
+
imports
|
|
3729
3755
|
};
|
|
3730
3756
|
});
|
|
3731
3757
|
}
|
|
@@ -3769,7 +3795,7 @@
|
|
|
3769
3795
|
* @returns
|
|
3770
3796
|
*/
|
|
3771
3797
|
function GetCacheKey(params) {
|
|
3772
|
-
let { entityId, entityTypeId, schemaId, expandLocation, expandRelations, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3798
|
+
let { entityId, entityTypeId, schemaId, expandLocation, expandRelations, expandImports, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3773
3799
|
if (!entityTypeId) {
|
|
3774
3800
|
entityTypeId = "";
|
|
3775
3801
|
}
|
|
@@ -3789,7 +3815,7 @@
|
|
|
3789
3815
|
schemaId = "";
|
|
3790
3816
|
}
|
|
3791
3817
|
let key = `${exports.Api.ECacheKey.Entity}${exports.Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${schemaId}`;
|
|
3792
|
-
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}`;
|
|
3818
|
+
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}${String(Boolean(expandImports))}`;
|
|
3793
3819
|
key += `${exports.Api.ECacheKey.EntityHistoricData}${exports.Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
|
|
3794
3820
|
return key;
|
|
3795
3821
|
}
|
|
@@ -13762,7 +13788,7 @@
|
|
|
13762
13788
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13763
13789
|
|
|
13764
13790
|
// This is updated with the package.json version on build.
|
|
13765
|
-
const VERSION = "4.
|
|
13791
|
+
const VERSION = "4.7.1";
|
|
13766
13792
|
|
|
13767
13793
|
exports.VERSION = VERSION;
|
|
13768
13794
|
exports.AbstractApi = AbstractApi;
|