bruce-models 0.5.0 → 0.5.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.
@@ -1209,6 +1209,30 @@
1209
1209
  });
1210
1210
  }
1211
1211
  Entity.Delete = Delete;
1212
+ function DeleteList(api, entityIds) {
1213
+ return __awaiter(this, void 0, void 0, function () {
1214
+ var i, entityId;
1215
+ return __generator(this, function (_a) {
1216
+ switch (_a.label) {
1217
+ case 0:
1218
+ if (!(entityIds === null || entityIds === void 0 ? void 0 : entityIds.length)) {
1219
+ throw ("Entity IDs are required.");
1220
+ }
1221
+ return [4 /*yield*/, api.POST("deleteEntities", {
1222
+ Items: entityIds
1223
+ }, exports.Api.PrepReqParams())];
1224
+ case 1:
1225
+ _a.sent();
1226
+ for (i = 0; i < entityIds.length; i++) {
1227
+ entityId = entityIds[i];
1228
+ api.Cache.Remove(GetCacheKey(entityId));
1229
+ }
1230
+ return [2 /*return*/];
1231
+ }
1232
+ });
1233
+ });
1234
+ }
1235
+ Entity.DeleteList = DeleteList;
1212
1236
  function Update(api, data, override) {
1213
1237
  var _a, _b;
1214
1238
  return __awaiter(this, void 0, void 0, function () {