bruce-models 4.3.0 → 4.3.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 +17 -8
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +17 -8
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +14 -6
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity-type-model/comment.js +2 -1
- package/dist/lib/entity-type-model/comment.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity.d.ts +4 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -3241,7 +3241,7 @@
|
|
|
3241
3241
|
*/
|
|
3242
3242
|
function Get(params) {
|
|
3243
3243
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3244
|
-
let { api, entityId, schemaId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3244
|
+
let { api, entityId, migrated, schemaId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3245
3245
|
if (!entityId) {
|
|
3246
3246
|
throw ("Entity ID is required.");
|
|
3247
3247
|
}
|
|
@@ -3297,6 +3297,7 @@
|
|
|
3297
3297
|
if (schemaId) {
|
|
3298
3298
|
urlParams.set("schema", schemaId);
|
|
3299
3299
|
}
|
|
3300
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3300
3301
|
const data = yield api.GET(`entity/${entityId}?${urlParams.toString()}`, exports.Api.PrepReqParams(reqParams));
|
|
3301
3302
|
res({
|
|
3302
3303
|
entity: data
|
|
@@ -3322,7 +3323,7 @@
|
|
|
3322
3323
|
*/
|
|
3323
3324
|
function GetListByIds(params) {
|
|
3324
3325
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3325
|
-
let { api, entityIds, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources } = params;
|
|
3326
|
+
let { api, entityIds, migrated, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources } = params;
|
|
3326
3327
|
if (!entityIds.length) {
|
|
3327
3328
|
throw ("Entity IDs are required.");
|
|
3328
3329
|
}
|
|
@@ -3380,6 +3381,7 @@
|
|
|
3380
3381
|
if (schemaId) {
|
|
3381
3382
|
urlParams.set("schema", schemaId);
|
|
3382
3383
|
}
|
|
3384
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3383
3385
|
const url = `entities?${urlParams.toString()}`;
|
|
3384
3386
|
const reqs = [];
|
|
3385
3387
|
if (reqIds.length > 0) {
|
|
@@ -3490,7 +3492,7 @@
|
|
|
3490
3492
|
function Update(params) {
|
|
3491
3493
|
var _a, _b;
|
|
3492
3494
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3493
|
-
let { api, entity: data, override, req: reqParams } = params;
|
|
3495
|
+
let { api, entity: data, override, req: reqParams, migrated } = params;
|
|
3494
3496
|
if (!((_a = data === null || data === void 0 ? void 0 : data.Bruce) === null || _a === void 0 ? void 0 : _a["EntityType.ID"])) {
|
|
3495
3497
|
throw ("Entity Type ID is required.");
|
|
3496
3498
|
}
|
|
@@ -3500,7 +3502,10 @@
|
|
|
3500
3502
|
if (!((_b = data === null || data === void 0 ? void 0 : data.Bruce) === null || _b === void 0 ? void 0 : _b.ID)) {
|
|
3501
3503
|
data.Bruce = Object.assign(Object.assign({}, data.Bruce), { ID: exports.ObjectUtils.UId() });
|
|
3502
3504
|
}
|
|
3503
|
-
|
|
3505
|
+
let reqUrl = `entity/${data.Bruce.ID}/?dataoverride=${override}&BruceEntityType=${data.Bruce["EntityType.ID"]}`;
|
|
3506
|
+
if (migrated) {
|
|
3507
|
+
reqUrl += "&hasMigrated=true";
|
|
3508
|
+
}
|
|
3504
3509
|
const res = yield api.POST(reqUrl, data, exports.Api.PrepReqParams(reqParams));
|
|
3505
3510
|
api.Cache.RemoveByContains(GetContainsKey(data.Bruce.ID));
|
|
3506
3511
|
exports.EntityHistoricData.ClearCacheByEntityIds(api, [data.Bruce.ID]);
|
|
@@ -3745,7 +3750,8 @@
|
|
|
3745
3750
|
const { entity: data } = yield Get({
|
|
3746
3751
|
api,
|
|
3747
3752
|
entityId,
|
|
3748
|
-
entityTypeId: typeId
|
|
3753
|
+
entityTypeId: typeId,
|
|
3754
|
+
migrated: true
|
|
3749
3755
|
});
|
|
3750
3756
|
entity = data;
|
|
3751
3757
|
}
|
|
@@ -3781,7 +3787,7 @@
|
|
|
3781
3787
|
function GetList(params) {
|
|
3782
3788
|
var _a;
|
|
3783
3789
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3784
|
-
let { api, filter, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
|
|
3790
|
+
let { api, filter, migrated, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
|
|
3785
3791
|
if (!api) {
|
|
3786
3792
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
3787
3793
|
}
|
|
@@ -3899,6 +3905,7 @@
|
|
|
3899
3905
|
if (schemaId) {
|
|
3900
3906
|
urlParams.set("schema", schemaId);
|
|
3901
3907
|
}
|
|
3908
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3902
3909
|
const urlStr = url.toString();
|
|
3903
3910
|
const data = yield api.get(urlStr, exports.Api.PrepReqParams(reqParams));
|
|
3904
3911
|
if (!analysis) {
|
|
@@ -3918,6 +3925,7 @@
|
|
|
3918
3925
|
if (schemaId) {
|
|
3919
3926
|
urlParams.set("schema", schemaId);
|
|
3920
3927
|
}
|
|
3928
|
+
urlParams.set("hasMigrated", String(Boolean(migrated)));
|
|
3921
3929
|
const urlStr = url.toString();
|
|
3922
3930
|
const data = yield api.post(urlStr, body, exports.Api.PrepReqParams(reqParams));
|
|
3923
3931
|
if (!analysis) {
|
|
@@ -7492,7 +7500,8 @@
|
|
|
7492
7500
|
pageIndex: filter.index == null ? 0 : filter.index,
|
|
7493
7501
|
entityTypeConditions: reqFilter,
|
|
7494
7502
|
orderBy: "lastUpdateTime"
|
|
7495
|
-
}
|
|
7503
|
+
},
|
|
7504
|
+
migrated: true
|
|
7496
7505
|
})).entities;
|
|
7497
7506
|
return {
|
|
7498
7507
|
comments: records
|
|
@@ -13066,7 +13075,7 @@
|
|
|
13066
13075
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13067
13076
|
|
|
13068
13077
|
// This is updated with the package.json version on build.
|
|
13069
|
-
const VERSION = "4.3.
|
|
13078
|
+
const VERSION = "4.3.2";
|
|
13070
13079
|
|
|
13071
13080
|
exports.VERSION = VERSION;
|
|
13072
13081
|
exports.AbstractApi = AbstractApi;
|