bruce-models 7.0.8 → 7.0.10
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 +105 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +103 -5
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/change-set/change-set.js +100 -0
- package/dist/lib/change-set/change-set.js.map +1 -0
- package/dist/lib/tileset/tileset.js +21 -4
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/change-set/change-set.d.ts +45 -0
- package/dist/types/tileset/tileset.d.ts +7 -3
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -10131,7 +10131,7 @@
|
|
|
10131
10131
|
*/
|
|
10132
10132
|
function GetList(params) {
|
|
10133
10133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10134
|
-
let { api, req: reqParams, assertLocation, expandSettings, type, pageIndex, pageSize, search, orderBy, sortOrder, tilesetIds } = params;
|
|
10134
|
+
let { api, req: reqParams, entityIds, entityTypeIds, assertLocation, expandSettings, type, pageIndex, pageSize, search, orderBy, sortOrder, tilesetIds } = params;
|
|
10135
10135
|
if (!api) {
|
|
10136
10136
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
10137
10137
|
}
|
|
@@ -10143,6 +10143,8 @@
|
|
|
10143
10143
|
type: type,
|
|
10144
10144
|
orderBy: orderBy,
|
|
10145
10145
|
sortOrder: sortOrder,
|
|
10146
|
+
entityIds: entityIds,
|
|
10147
|
+
entityTypeIds: entityTypeIds,
|
|
10146
10148
|
search: search
|
|
10147
10149
|
});
|
|
10148
10150
|
}
|
|
@@ -10160,7 +10162,7 @@
|
|
|
10160
10162
|
urlParams.append("assertLocation", "true");
|
|
10161
10163
|
}
|
|
10162
10164
|
if (type) {
|
|
10163
|
-
urlParams.append("type", type);
|
|
10165
|
+
urlParams.append("type", Array.isArray(type) ? type.join(",") : String(type));
|
|
10164
10166
|
}
|
|
10165
10167
|
if (search) {
|
|
10166
10168
|
urlParams.append("Search", search);
|
|
@@ -10180,6 +10182,12 @@
|
|
|
10180
10182
|
if (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) {
|
|
10181
10183
|
urlParams.append("ID", tilesetIds.join(","));
|
|
10182
10184
|
}
|
|
10185
|
+
if (entityIds === null || entityIds === void 0 ? void 0 : entityIds.length) {
|
|
10186
|
+
urlParams.append("EntityID", entityIds.join(","));
|
|
10187
|
+
}
|
|
10188
|
+
if (entityTypeIds === null || entityTypeIds === void 0 ? void 0 : entityTypeIds.length) {
|
|
10189
|
+
urlParams.append("EntityTypeID", entityTypeIds.join(","));
|
|
10190
|
+
}
|
|
10183
10191
|
const data = yield api.GET("tileset/getList?" + urlParams.toString(), reqParams);
|
|
10184
10192
|
// Convert legacy records.
|
|
10185
10193
|
// Commented out because it spams :)
|
|
@@ -10768,7 +10776,7 @@
|
|
|
10768
10776
|
if (!params) {
|
|
10769
10777
|
params = {};
|
|
10770
10778
|
}
|
|
10771
|
-
let { expandSettings, assertLocation, type, orderBy, search, sortOrder } = params;
|
|
10779
|
+
let { expandSettings, assertLocation, type, orderBy, search, sortOrder, entityIds, entityTypeIds } = params;
|
|
10772
10780
|
if (expandSettings == null) {
|
|
10773
10781
|
expandSettings = false;
|
|
10774
10782
|
}
|
|
@@ -10781,7 +10789,16 @@
|
|
|
10781
10789
|
if (!orderBy) {
|
|
10782
10790
|
orderBy = "";
|
|
10783
10791
|
}
|
|
10784
|
-
|
|
10792
|
+
if (!entityIds) {
|
|
10793
|
+
entityIds = [];
|
|
10794
|
+
}
|
|
10795
|
+
if (!entityTypeIds) {
|
|
10796
|
+
entityTypeIds = [];
|
|
10797
|
+
}
|
|
10798
|
+
let key = exports.Api.ECacheKey.Tileset + String(expandSettings) + String(assertLocation) + (type ? type : "") + String(orderBy) + String(sortOrder) + exports.Api.ECacheKey.Id + search;
|
|
10799
|
+
key += exports.Api.ECacheKey.Id + entityIds.join(",");
|
|
10800
|
+
key += exports.Api.ECacheKey.Id + entityTypeIds.join(",");
|
|
10801
|
+
return key;
|
|
10785
10802
|
}
|
|
10786
10803
|
Tileset.GetListCacheKey = GetListCacheKey;
|
|
10787
10804
|
})(exports.Tileset || (exports.Tileset = {}));
|
|
@@ -16714,8 +16731,89 @@
|
|
|
16714
16731
|
}
|
|
16715
16732
|
}
|
|
16716
16733
|
|
|
16734
|
+
(function (ChangeSet) {
|
|
16735
|
+
/**
|
|
16736
|
+
* Updates existing or crates new Change Set record.
|
|
16737
|
+
*/
|
|
16738
|
+
function Update(params) {
|
|
16739
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16740
|
+
let { changeSet: data, api, req: reqParams } = params;
|
|
16741
|
+
if (!api) {
|
|
16742
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16743
|
+
}
|
|
16744
|
+
const url = `change` + (data.ID == null ? "" : "/" + data.ID);
|
|
16745
|
+
const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
|
|
16746
|
+
return;
|
|
16747
|
+
});
|
|
16748
|
+
}
|
|
16749
|
+
ChangeSet.Update = Update;
|
|
16750
|
+
/**
|
|
16751
|
+
* Deletes the specified Change Set record.
|
|
16752
|
+
*/
|
|
16753
|
+
function Delete(params) {
|
|
16754
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16755
|
+
let { id, api, req: reqParams } = params;
|
|
16756
|
+
if (!api) {
|
|
16757
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16758
|
+
}
|
|
16759
|
+
yield api.DELETE(`change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
16760
|
+
});
|
|
16761
|
+
}
|
|
16762
|
+
ChangeSet.Delete = Delete;
|
|
16763
|
+
/**
|
|
16764
|
+
* Gets the Change Set record by its ID.
|
|
16765
|
+
*/
|
|
16766
|
+
function Get(params) {
|
|
16767
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16768
|
+
let { id, api, req: reqParams } = params;
|
|
16769
|
+
if (!api) {
|
|
16770
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16771
|
+
}
|
|
16772
|
+
reqParams = exports.Api.PrepReqParams(reqParams);
|
|
16773
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
16774
|
+
try {
|
|
16775
|
+
const data = yield api.GET(`change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
16776
|
+
res({
|
|
16777
|
+
changeSet: data
|
|
16778
|
+
});
|
|
16779
|
+
}
|
|
16780
|
+
catch (e) {
|
|
16781
|
+
rej(e);
|
|
16782
|
+
}
|
|
16783
|
+
}));
|
|
16784
|
+
return prom;
|
|
16785
|
+
});
|
|
16786
|
+
}
|
|
16787
|
+
ChangeSet.Get = Get;
|
|
16788
|
+
/**
|
|
16789
|
+
* Gets the list of all the Change Set records.
|
|
16790
|
+
*/
|
|
16791
|
+
function GetList(params) {
|
|
16792
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16793
|
+
let { api, req: reqParams } = params;
|
|
16794
|
+
if (!api) {
|
|
16795
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16796
|
+
}
|
|
16797
|
+
reqParams = exports.Api.PrepReqParams(reqParams);
|
|
16798
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
16799
|
+
try {
|
|
16800
|
+
const data = yield api.GET("changes", exports.Api.PrepReqParams(reqParams));
|
|
16801
|
+
res({
|
|
16802
|
+
changeSet: data === null || data === void 0 ? void 0 : data.Items
|
|
16803
|
+
});
|
|
16804
|
+
}
|
|
16805
|
+
catch (e) {
|
|
16806
|
+
rej(e);
|
|
16807
|
+
}
|
|
16808
|
+
}));
|
|
16809
|
+
return prom;
|
|
16810
|
+
});
|
|
16811
|
+
}
|
|
16812
|
+
ChangeSet.GetList = GetList;
|
|
16813
|
+
})(exports.ChangeSet || (exports.ChangeSet = {}));
|
|
16814
|
+
|
|
16717
16815
|
// This is updated with the package.json version on build.
|
|
16718
|
-
const VERSION = "7.0.
|
|
16816
|
+
const VERSION = "7.0.10";
|
|
16719
16817
|
|
|
16720
16818
|
exports.VERSION = VERSION;
|
|
16721
16819
|
exports.AbstractApi = AbstractApi;
|