bruce-models 6.0.0 → 6.0.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.
- package/dist/bruce-models.es5.js +33 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +33 -2
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +8 -1
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/tileset/tileset.js +24 -0
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/tileset/tileset.d.ts +15 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -4026,6 +4026,9 @@
|
|
|
4026
4026
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
4027
4027
|
}
|
|
4028
4028
|
let requestFilter = {};
|
|
4029
|
+
if (!filter) {
|
|
4030
|
+
filter = {};
|
|
4031
|
+
}
|
|
4029
4032
|
if (filter.entityTypeConditions) {
|
|
4030
4033
|
requestFilter = Object.assign({}, filter.entityTypeConditions);
|
|
4031
4034
|
}
|
|
@@ -4196,6 +4199,10 @@
|
|
|
4196
4199
|
if (!analysis) {
|
|
4197
4200
|
entities = data.Items;
|
|
4198
4201
|
// Only caching when non-CDN.
|
|
4202
|
+
let typeIdCacheKey = null;
|
|
4203
|
+
if (filter.entityTypeId) {
|
|
4204
|
+
typeIdCacheKey = typeof filter.entityTypeId == "string" ? filter.entityTypeId : filter.entityTypeId.join(",");
|
|
4205
|
+
}
|
|
4199
4206
|
for (let i = 0; i < entities.length; i++) {
|
|
4200
4207
|
const entity = entities[i];
|
|
4201
4208
|
const id = entity.Bruce.ID;
|
|
@@ -4206,7 +4213,7 @@
|
|
|
4206
4213
|
expandLocation,
|
|
4207
4214
|
expandImports,
|
|
4208
4215
|
expandSources,
|
|
4209
|
-
entityTypeId:
|
|
4216
|
+
entityTypeId: typeIdCacheKey,
|
|
4210
4217
|
historicFrom: historicFrom,
|
|
4211
4218
|
historicKey: historicKey,
|
|
4212
4219
|
historicTo: historicTo,
|
|
@@ -9985,6 +9992,30 @@
|
|
|
9985
9992
|
});
|
|
9986
9993
|
}
|
|
9987
9994
|
Tileset.Generate = Generate;
|
|
9995
|
+
/**
|
|
9996
|
+
* Requests to rebake metadata for a given Tileset.
|
|
9997
|
+
* Only supported for Assembly (MODEL) type at the moment.
|
|
9998
|
+
* Returns if changes were made.
|
|
9999
|
+
* This will throw an error if no metadata exists and therefor cannot be rebaked.
|
|
10000
|
+
* @param params
|
|
10001
|
+
* @returns
|
|
10002
|
+
*/
|
|
10003
|
+
function BakeMetadata(params) {
|
|
10004
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10005
|
+
let { api, tilesetId, req: reqParams } = params;
|
|
10006
|
+
if (!tilesetId) {
|
|
10007
|
+
throw ("Tileset ID is required.");
|
|
10008
|
+
}
|
|
10009
|
+
if (!api) {
|
|
10010
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
10011
|
+
}
|
|
10012
|
+
const data = yield api.POST(`v3/tileset/${tilesetId}/bakeMetadata`, exports.Api.PrepReqParams(reqParams));
|
|
10013
|
+
return {
|
|
10014
|
+
changed: Boolean(data === null || data === void 0 ? void 0 : data.Changed)
|
|
10015
|
+
};
|
|
10016
|
+
});
|
|
10017
|
+
}
|
|
10018
|
+
Tileset.BakeMetadata = BakeMetadata;
|
|
9988
10019
|
/**
|
|
9989
10020
|
* Utils for publishing the tileset to other Nextspace accounts.
|
|
9990
10021
|
*/
|
|
@@ -15384,7 +15415,7 @@
|
|
|
15384
15415
|
})(exports.Scenario || (exports.Scenario = {}));
|
|
15385
15416
|
|
|
15386
15417
|
// This is updated with the package.json version on build.
|
|
15387
|
-
const VERSION = "6.0.
|
|
15418
|
+
const VERSION = "6.0.2";
|
|
15388
15419
|
|
|
15389
15420
|
exports.VERSION = VERSION;
|
|
15390
15421
|
exports.AbstractApi = AbstractApi;
|